Add sampler slots usage and inputs/outputs count to GPU shader program bindings meta

This commit is contained in:
Wojtek Figat
2026-02-26 12:02:52 +01:00
parent ac4526744a
commit 20c9ed27fb
7 changed files with 35 additions and 14 deletions

View File

@@ -112,15 +112,13 @@ bool GPUPipelineState::Init(const Description& desc)
#endif
// Cache shader stages usage flags for pipeline state
_meta.InstructionsCount = 0;
_meta.UsedCBsMask = 0;
_meta.UsedSRsMask = 0;
_meta.UsedUAsMask = 0;
Platform::MemoryClear(&_meta, sizeof(_meta));
#define CHECK_STAGE(stage) \
if (desc.stage) { \
_meta.UsedCBsMask |= desc.stage->GetBindings().UsedCBsMask; \
_meta.UsedSRsMask |= desc.stage->GetBindings().UsedSRsMask; \
_meta.UsedUAsMask |= desc.stage->GetBindings().UsedUAsMask; \
_meta.UsedSamplersMask |= desc.stage->GetBindings().UsedSamplersMask; \
}
CHECK_STAGE(VS);
CHECK_STAGE(HS);