When using Metal argument buffers, include all

descriptor bindings in all stages of shading compilation.
This commit is contained in:
Bill Hollings 2021-04-17 15:25:56 -04:00
parent fc3bc1b635
commit 2be819a364

View File

@ -523,8 +523,9 @@ void MVKDescriptorSetLayoutBinding::populateShaderConverterContext(mvk::SPIRVToM
MVKShaderResourceBinding mtlIdxs = _mtlResourceIndexOffsets + dslMTLRezIdxOffsets;
uint32_t descCnt = getDescriptorCount();
bool isUsingMtlArgBuff = isUsingMetalArgumentBuffer();
for (uint32_t stage = kMVKShaderStageVertex; stage < kMVKShaderStageMax; stage++) {
if (_applyToStage[stage] && descCnt > 0) {
if ((_applyToStage[stage] || isUsingMtlArgBuff) && descCnt > 0) {
mvkPopulateShaderConverterContext(context,
mtlIdxs.stages[stage],
MVKShaderStage(stage),