|
|
@@ -3,7 +3,7 @@
|
|
|
// Copyright (C) 2012-2016 LunarG, Inc.
|
|
|
// Copyright (C) 2015-2020 Google, Inc.
|
|
|
// Copyright (C) 2017 ARM Limited.
|
|
|
-// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
|
|
+// Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. All rights reserved.
|
|
|
//
|
|
|
// All rights reserved.
|
|
|
//
|
|
|
@@ -4159,106 +4159,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"u16vec4 unpack16(uint64_t);"
|
|
|
"i32vec2 unpack32(int64_t);"
|
|
|
"u32vec2 unpack32(uint64_t);"
|
|
|
-
|
|
|
- "float64_t radians(float64_t);"
|
|
|
- "f64vec2 radians(f64vec2);"
|
|
|
- "f64vec3 radians(f64vec3);"
|
|
|
- "f64vec4 radians(f64vec4);"
|
|
|
-
|
|
|
- "float64_t degrees(float64_t);"
|
|
|
- "f64vec2 degrees(f64vec2);"
|
|
|
- "f64vec3 degrees(f64vec3);"
|
|
|
- "f64vec4 degrees(f64vec4);"
|
|
|
-
|
|
|
- "float64_t sin(float64_t);"
|
|
|
- "f64vec2 sin(f64vec2);"
|
|
|
- "f64vec3 sin(f64vec3);"
|
|
|
- "f64vec4 sin(f64vec4);"
|
|
|
-
|
|
|
- "float64_t cos(float64_t);"
|
|
|
- "f64vec2 cos(f64vec2);"
|
|
|
- "f64vec3 cos(f64vec3);"
|
|
|
- "f64vec4 cos(f64vec4);"
|
|
|
-
|
|
|
- "float64_t tan(float64_t);"
|
|
|
- "f64vec2 tan(f64vec2);"
|
|
|
- "f64vec3 tan(f64vec3);"
|
|
|
- "f64vec4 tan(f64vec4);"
|
|
|
-
|
|
|
- "float64_t asin(float64_t);"
|
|
|
- "f64vec2 asin(f64vec2);"
|
|
|
- "f64vec3 asin(f64vec3);"
|
|
|
- "f64vec4 asin(f64vec4);"
|
|
|
-
|
|
|
- "float64_t acos(float64_t);"
|
|
|
- "f64vec2 acos(f64vec2);"
|
|
|
- "f64vec3 acos(f64vec3);"
|
|
|
- "f64vec4 acos(f64vec4);"
|
|
|
-
|
|
|
- "float64_t atan(float64_t, float64_t);"
|
|
|
- "f64vec2 atan(f64vec2, f64vec2);"
|
|
|
- "f64vec3 atan(f64vec3, f64vec3);"
|
|
|
- "f64vec4 atan(f64vec4, f64vec4);"
|
|
|
-
|
|
|
- "float64_t atan(float64_t);"
|
|
|
- "f64vec2 atan(f64vec2);"
|
|
|
- "f64vec3 atan(f64vec3);"
|
|
|
- "f64vec4 atan(f64vec4);"
|
|
|
-
|
|
|
- "float64_t sinh(float64_t);"
|
|
|
- "f64vec2 sinh(f64vec2);"
|
|
|
- "f64vec3 sinh(f64vec3);"
|
|
|
- "f64vec4 sinh(f64vec4);"
|
|
|
-
|
|
|
- "float64_t cosh(float64_t);"
|
|
|
- "f64vec2 cosh(f64vec2);"
|
|
|
- "f64vec3 cosh(f64vec3);"
|
|
|
- "f64vec4 cosh(f64vec4);"
|
|
|
-
|
|
|
- "float64_t tanh(float64_t);"
|
|
|
- "f64vec2 tanh(f64vec2);"
|
|
|
- "f64vec3 tanh(f64vec3);"
|
|
|
- "f64vec4 tanh(f64vec4);"
|
|
|
-
|
|
|
- "float64_t asinh(float64_t);"
|
|
|
- "f64vec2 asinh(f64vec2);"
|
|
|
- "f64vec3 asinh(f64vec3);"
|
|
|
- "f64vec4 asinh(f64vec4);"
|
|
|
-
|
|
|
- "float64_t acosh(float64_t);"
|
|
|
- "f64vec2 acosh(f64vec2);"
|
|
|
- "f64vec3 acosh(f64vec3);"
|
|
|
- "f64vec4 acosh(f64vec4);"
|
|
|
-
|
|
|
- "float64_t atanh(float64_t);"
|
|
|
- "f64vec2 atanh(f64vec2);"
|
|
|
- "f64vec3 atanh(f64vec3);"
|
|
|
- "f64vec4 atanh(f64vec4);"
|
|
|
-
|
|
|
- "float64_t pow(float64_t, float64_t);"
|
|
|
- "f64vec2 pow(f64vec2, f64vec2);"
|
|
|
- "f64vec3 pow(f64vec3, f64vec3);"
|
|
|
- "f64vec4 pow(f64vec4, f64vec4);"
|
|
|
-
|
|
|
- "float64_t exp(float64_t);"
|
|
|
- "f64vec2 exp(f64vec2);"
|
|
|
- "f64vec3 exp(f64vec3);"
|
|
|
- "f64vec4 exp(f64vec4);"
|
|
|
-
|
|
|
- "float64_t log(float64_t);"
|
|
|
- "f64vec2 log(f64vec2);"
|
|
|
- "f64vec3 log(f64vec3);"
|
|
|
- "f64vec4 log(f64vec4);"
|
|
|
-
|
|
|
- "float64_t exp2(float64_t);"
|
|
|
- "f64vec2 exp2(f64vec2);"
|
|
|
- "f64vec3 exp2(f64vec3);"
|
|
|
- "f64vec4 exp2(f64vec4);"
|
|
|
-
|
|
|
- "float64_t log2(float64_t);"
|
|
|
- "f64vec2 log2(f64vec2);"
|
|
|
- "f64vec3 log2(f64vec3);"
|
|
|
- "f64vec4 log2(f64vec4);"
|
|
|
"\n");
|
|
|
}
|
|
|
|
|
|
@@ -4653,13 +4553,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"\n");
|
|
|
}
|
|
|
|
|
|
- // GL_ARB_shader_clock & GL_EXT_shader_realtime_clock
|
|
|
+ // GL_ARB_shader_clock
|
|
|
if (profile != EEsProfile && version >= 450) {
|
|
|
commonBuiltins.append(
|
|
|
"uvec2 clock2x32ARB();"
|
|
|
"uint64_t clockARB();"
|
|
|
- "uvec2 clockRealtime2x32EXT();"
|
|
|
- "uint64_t clockRealtimeEXT();"
|
|
|
"\n");
|
|
|
}
|
|
|
|
|
|
@@ -5174,9 +5072,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- if (version >= 450)
|
|
|
+ if (version >= 430)
|
|
|
stageBuiltins[EShLangVertex].append(
|
|
|
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
|
|
|
+ );
|
|
|
+
|
|
|
+ if (version >= 450)
|
|
|
+ stageBuiltins[EShLangVertex].append(
|
|
|
"out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
|
|
"out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
|
|
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
|
|
@@ -5312,9 +5214,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"in int gl_InvocationID;"
|
|
|
);
|
|
|
|
|
|
- if (version >= 450)
|
|
|
+ if (version >= 430)
|
|
|
stageBuiltins[EShLangGeometry].append(
|
|
|
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
|
|
|
+ );
|
|
|
+
|
|
|
+ if (version >= 450)
|
|
|
+ stageBuiltins[EShLangGeometry].append(
|
|
|
"out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
|
|
"out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
|
|
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
|
|
@@ -5390,7 +5296,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
if (version >= 450)
|
|
|
stageBuiltins[EShLangTessControl].append(
|
|
|
"float gl_CullDistance[];"
|
|
|
+ );
|
|
|
+ if (version >= 430)
|
|
|
+ stageBuiltins[EShLangTessControl].append(
|
|
|
"int gl_ViewportMask[];" // GL_NV_viewport_array2
|
|
|
+ );
|
|
|
+ if (version >= 450)
|
|
|
+ stageBuiltins[EShLangTessControl].append(
|
|
|
"vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
|
|
"int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
|
|
"vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
|
|
@@ -5493,9 +5405,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"out int gl_Layer;"
|
|
|
"\n");
|
|
|
|
|
|
- if (version >= 450)
|
|
|
+ if (version >= 430)
|
|
|
stageBuiltins[EShLangTessEvaluation].append(
|
|
|
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
|
|
|
+ );
|
|
|
+
|
|
|
+ if (version >= 450)
|
|
|
+ stageBuiltins[EShLangTessEvaluation].append(
|
|
|
"out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
|
|
"out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
|
|
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
|
|
@@ -8408,9 +8324,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
symbolTable.setFunctionExtensions("clockARB", 1, &E_GL_ARB_shader_clock);
|
|
|
symbolTable.setFunctionExtensions("clock2x32ARB", 1, &E_GL_ARB_shader_clock);
|
|
|
|
|
|
- symbolTable.setFunctionExtensions("clockRealtimeEXT", 1, &E_GL_EXT_shader_realtime_clock);
|
|
|
- symbolTable.setFunctionExtensions("clockRealtime2x32EXT", 1, &E_GL_EXT_shader_realtime_clock);
|
|
|
-
|
|
|
if (profile == EEsProfile && version < 320) {
|
|
|
symbolTable.setVariableExtensions("gl_PrimitiveID", Num_AEP_geometry_shader, AEP_geometry_shader);
|
|
|
symbolTable.setVariableExtensions("gl_Layer", Num_AEP_geometry_shader, AEP_geometry_shader);
|