Skip to content

Commit 7f6559d

Browse files
authored
Compile out code for GL_EXT_shader_image_int64 for ANGLE (KhronosGroup#2463)
Fixes a crash in ANGLE. Closes: KhronosGroup#2452
1 parent beec2e4 commit 7f6559d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

glslang/MachineIndependent/Initialize.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5436,6 +5436,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
54365436
"\n");
54375437
}
54385438

5439+
if (version >= 300 /* both ES and non-ES */) {
5440+
stageBuiltins[EShLangFragment].append(
5441+
"flat in highp uint gl_ViewID_OVR;" // GL_OVR_multiview, GL_OVR_multiview2
5442+
"\n");
5443+
}
5444+
54395445
#ifndef GLSLANG_ANGLE
54405446
// GL_ARB_shader_ballot
54415447
if (profile != EEsProfile && version >= 450) {
@@ -5707,14 +5713,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
57075713
commonBuiltins.append("const int gl_StorageSemanticsOutput = 0x1000;\n");
57085714
}
57095715

5710-
#endif // !GLSLANG_ANGLE
5711-
5712-
if (version >= 300 /* both ES and non-ES */) {
5713-
stageBuiltins[EShLangFragment].append(
5714-
"flat in highp uint gl_ViewID_OVR;" // GL_OVR_multiview, GL_OVR_multiview2
5715-
"\n");
5716-
}
5717-
57185716
// Adding these to common built-ins triggers an assert due to a memory corruption in related code when testing
57195717
// So instead add to each stage individually, avoiding the GLSLang bug
57205718
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) {
@@ -5764,6 +5762,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
57645762
}
57655763
}
57665764
}
5765+
#endif // !GLSLANG_ANGLE
57675766

57685767
#endif // !GLSLANG_WEB
57695768

0 commit comments

Comments
 (0)