[Fix, Test] (DirectGLES): give every repaired image uniform a per-stage name so no linker can merge two stages' qualifiers

This commit is contained in:
2026-08-21 04:28:44 -04:00
parent 668f3e90c9
commit 02b59bef80
4 changed files with 288 additions and 88 deletions
+4 -1
View File
@@ -6192,8 +6192,11 @@ namespace MobileGL::MG_Backend::DirectGLES {
// declaration and preserves its binding - an image unit cannot be set from
// the API in ES, so the qualifier is the only binding mechanism there is,
// and both halves of the pair have to still be carrying theirs when it runs.
// * and it needs the STAGE, because the qualifier it adds is a per-stage decision
// and the rename that keeps two stages from declaring one image uniform
// differently is keyed on it.
Uint splitImageUniformCount = 0;
source = SplitReadWriteImageUniforms(source, &splitImageUniformCount);
source = SplitReadWriteImageUniforms(source, glShaderType, &splitImageUniformCount);
if (splitImageUniformCount != 0) {
splitImageUniformStages.push_back({shader->GetShaderStage(), splitImageUniformCount});
}