[Fix] (MG_Test/Program): fix hardcoded stage-index relationship

This commit is contained in:
2026-02-09 20:30:22 +08:00
parent 37f26d1bb1
commit ce8a2356d7
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -983,7 +983,7 @@ TEST_F(ProgramTest, CompileAndLinkWithExplicitFragmentOut) {
auto programObject = MG_State::pGLContext->GetCurrentProgram();
auto& spirvs = programObject->GetGeneratedSpirv();
auto& fragSpirv = spirvs[0]; // 0 - fragment, 1 - vertex
auto& fragSpirv = spirvs[programObject->GetShaderIndexByStage(ShaderStage::Fragment)];
char* pSrcfragOut = nullptr;
const char* needle = "layout(location = 7) out vec4 fragColor;";
// for (auto spirv: spirvs) {