File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Graphics/GraphicsEngineVulkan Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -303,6 +303,14 @@ class ShaderResourceCacheVk : public ShaderResourceCacheBase
303303 }
304304 }
305305
306+ // Explicitly marks that this cache contains inline constants.
307+ // This is useful when inline constant memory is initialized externally
308+ // (e.g., during SRB cache setup) before any data is written.
309+ void MarkHasInlineConstants ()
310+ {
311+ m_HasInlineConstants = 1 ;
312+ }
313+
306314 Uint32 GetNumPushConstantBuffers () const { return m_NumPushConstantBuffers; }
307315
308316 Uint32 GetNumDescriptorSets () const { return m_NumSets; }
Original file line number Diff line number Diff line change @@ -684,6 +684,10 @@ void PipelineResourceSignatureVkImpl::InitSRBResourceCache(ShaderResourceCacheVk
684684 // For emulated inline constants, data is stored in the descriptor set resources
685685 if (m_NumInlineConstantBuffers > 0 )
686686 {
687+ // Ensure the cache reports inline constants so DeviceContextVkImpl
688+ // updates emulated buffers even if no data has been written yet.
689+ ResourceCache.MarkHasInlineConstants ();
690+
687691 // Count push constant buffers and calculate total memory size
688692 Uint32 NumPushConstantBuffers = 0 ;
689693 Uint32 TotalInlineConstantSize = 0 ;
You can’t perform that action at this time.
0 commit comments