Skip to content

Commit

Permalink
Compile out code for GL_EXT_shader_image_int64 for ANGLE (KhronosGrou…
Browse files Browse the repository at this point in the history
…p#2463)

Fixes a crash in ANGLE.

Closes: KhronosGroup#2452
  • Loading branch information
ShabbyX committed Nov 16, 2020
1 parent beec2e4 commit 7f6559d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions glslang/MachineIndependent/Initialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5436,6 +5436,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}

if (version >= 300 /* both ES and non-ES */) {
stageBuiltins[EShLangFragment].append(
"flat in highp uint gl_ViewID_OVR;" // GL_OVR_multiview, GL_OVR_multiview2
"\n");
}

#ifndef GLSLANG_ANGLE
// GL_ARB_shader_ballot
if (profile != EEsProfile && version >= 450) {
Expand Down Expand Up @@ -5707,14 +5713,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
commonBuiltins.append("const int gl_StorageSemanticsOutput = 0x1000;\n");
}

#endif // !GLSLANG_ANGLE

if (version >= 300 /* both ES and non-ES */) {
stageBuiltins[EShLangFragment].append(
"flat in highp uint gl_ViewID_OVR;" // GL_OVR_multiview, GL_OVR_multiview2
"\n");
}

// Adding these to common built-ins triggers an assert due to a memory corruption in related code when testing
// So instead add to each stage individually, avoiding the GLSLang bug
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) {
Expand Down Expand Up @@ -5764,6 +5762,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
}
}
}
#endif // !GLSLANG_ANGLE

#endif // !GLSLANG_WEB

Expand Down

0 comments on commit 7f6559d

Please sign in to comment.