Skip to content

Commit a59428d

Browse files
hzqstTheMostDiligent
authored andcommitted
Update comment in PipelineResourceSignatureVkImpl::CommitInlineConstants
1 parent bb1e435 commit a59428d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,9 @@ void PipelineResourceSignatureVkImpl::CommitInlineConstants(const CommitInlineCo
11181118
else
11191119
{
11201120
// Get the buffer from the SRB cache (not from the signature's InlineCBAttr.pBuffer).
1121-
1121+
// This ensures we update the same buffer that was committed by DeviceContextVkImpl::CommitDescriptorSets.
1122+
// When an SRB created from a compatible but different signature is used (e.g., via PSO serialization),
1123+
// the SRB's cache contains inline constant buffers from another signature, not from this one.
11221124
const ShaderResourceCacheVk::DescriptorSet& DescrSet = ResourceCache.GetDescriptorSet(InlineCBAttr.DescrSet);
11231125
const ShaderResourceCacheVk::Resource& CachedRes = DescrSet.GetResource(InlineCBAttr.SRBCacheOffset);
11241126
BufferVkImpl* pBuffer = CachedRes.pObject.RawPtr<BufferVkImpl>();

0 commit comments

Comments
 (0)