Skip to content

Commit c9706bd

Browse files
authored
Merge pull request KhronosGroup#2817 from greg-lunarg/sdk0
Revert port GL_EXT_shader_realtime_clock to GL_EXT_spirv_intrinsics
2 parents 9255030 + 1f8c8b8 commit c9706bd

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

glslang/ExtensionHeaders/GL_EXT_shader_realtime_clock.glsl

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,3 @@
3636
// POSSIBILITY OF SUCH DAMAGE.
3737
//
3838

39-
#extension GL_EXT_spirv_intrinsics : enable
40-
#extension GL_ARB_gpu_shader_int64 : enable
41-
42-
uvec2 clockRealtime2x32EXT(void) {
43-
spirv_instruction (extensions = ["SPV_KHR_shader_clock"], capabilities = [5055], id = 5056)
44-
uvec2 clockRealtime2x32EXT_internal(uint scope);
45-
46-
return clockRealtime2x32EXT_internal(1 /*Device scope*/);
47-
}
48-
49-
uint64_t clockRealtimeEXT(void) {
50-
spirv_instruction (extensions = ["SPV_KHR_shader_clock"], capabilities = [5055], id = 5056)
51-
uint64_t clockRealtimeEXT_internal(uint scope);
52-
53-
return clockRealtimeEXT_internal(1 /*Device scope*/);
54-
}

glslang/MachineIndependent/Initialize.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4553,11 +4553,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
45534553
"\n");
45544554
}
45554555

4556-
// GL_ARB_shader_clock
4556+
// GL_ARB_shader_clock& GL_EXT_shader_realtime_clock
45574557
if (profile != EEsProfile && version >= 450) {
45584558
commonBuiltins.append(
45594559
"uvec2 clock2x32ARB();"
45604560
"uint64_t clockARB();"
4561+
"uvec2 clockRealtime2x32EXT();"
4562+
"uint64_t clockRealtimeEXT();"
45614563
"\n");
45624564
}
45634565

@@ -8324,6 +8326,9 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
83248326
symbolTable.setFunctionExtensions("clockARB", 1, &E_GL_ARB_shader_clock);
83258327
symbolTable.setFunctionExtensions("clock2x32ARB", 1, &E_GL_ARB_shader_clock);
83268328

8329+
symbolTable.setFunctionExtensions("clockRealtimeEXT", 1, &E_GL_EXT_shader_realtime_clock);
8330+
symbolTable.setFunctionExtensions("clockRealtime2x32EXT", 1, &E_GL_EXT_shader_realtime_clock);
8331+
83278332
if (profile == EEsProfile && version < 320) {
83288333
symbolTable.setVariableExtensions("gl_PrimitiveID", Num_AEP_geometry_shader, AEP_geometry_shader);
83298334
symbolTable.setVariableExtensions("gl_Layer", Num_AEP_geometry_shader, AEP_geometry_shader);

0 commit comments

Comments
 (0)