|
@@ -483,7 +483,8 @@ void TBuiltIns::relateTabledBuiltins(int /* version */, EProfile /* profile */,
|
|
|
|
|
|
inline bool IncludeLegacy(int version, EProfile profile, const SpvVersion& spvVersion)
|
|
|
{
|
|
|
- return profile != EEsProfile && (version <= 130 || (spvVersion.spv == 0 && ARBCompatibility) || profile == ECompatibilityProfile);
|
|
|
+ return profile != EEsProfile && (version <= 130 || (spvVersion.spv == 0 && version == 140 && ARBCompatibility) ||
|
|
|
+ profile == ECompatibilityProfile);
|
|
|
}
|
|
|
|
|
|
// Construct TBuiltInParseables base class. This can be used for language-common constructs.
|
|
@@ -931,7 +932,203 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"\n");
|
|
|
}
|
|
|
|
|
|
- if (profile != EEsProfile && version >= 450) {
|
|
|
+ if (profile == EEsProfile && version >= 310) { // Explicit Types
|
|
|
+ commonBuiltins.append(
|
|
|
+
|
|
|
+ "float64_t sqrt(float64_t);"
|
|
|
+ "f64vec2 sqrt(f64vec2);"
|
|
|
+ "f64vec3 sqrt(f64vec3);"
|
|
|
+ "f64vec4 sqrt(f64vec4);"
|
|
|
+
|
|
|
+ "float64_t inversesqrt(float64_t);"
|
|
|
+ "f64vec2 inversesqrt(f64vec2);"
|
|
|
+ "f64vec3 inversesqrt(f64vec3);"
|
|
|
+ "f64vec4 inversesqrt(f64vec4);"
|
|
|
+
|
|
|
+ "float64_t abs(float64_t);"
|
|
|
+ "f64vec2 abs(f64vec2);"
|
|
|
+ "f64vec3 abs(f64vec3);"
|
|
|
+ "f64vec4 abs(f64vec4);"
|
|
|
+
|
|
|
+ "float64_t sign(float64_t);"
|
|
|
+ "f64vec2 sign(f64vec2);"
|
|
|
+ "f64vec3 sign(f64vec3);"
|
|
|
+ "f64vec4 sign(f64vec4);"
|
|
|
+
|
|
|
+ "float64_t floor(float64_t);"
|
|
|
+ "f64vec2 floor(f64vec2);"
|
|
|
+ "f64vec3 floor(f64vec3);"
|
|
|
+ "f64vec4 floor(f64vec4);"
|
|
|
+
|
|
|
+ "float64_t trunc(float64_t);"
|
|
|
+ "f64vec2 trunc(f64vec2);"
|
|
|
+ "f64vec3 trunc(f64vec3);"
|
|
|
+ "f64vec4 trunc(f64vec4);"
|
|
|
+
|
|
|
+ "float64_t round(float64_t);"
|
|
|
+ "f64vec2 round(f64vec2);"
|
|
|
+ "f64vec3 round(f64vec3);"
|
|
|
+ "f64vec4 round(f64vec4);"
|
|
|
+
|
|
|
+ "float64_t roundEven(float64_t);"
|
|
|
+ "f64vec2 roundEven(f64vec2);"
|
|
|
+ "f64vec3 roundEven(f64vec3);"
|
|
|
+ "f64vec4 roundEven(f64vec4);"
|
|
|
+
|
|
|
+ "float64_t ceil(float64_t);"
|
|
|
+ "f64vec2 ceil(f64vec2);"
|
|
|
+ "f64vec3 ceil(f64vec3);"
|
|
|
+ "f64vec4 ceil(f64vec4);"
|
|
|
+
|
|
|
+ "float64_t fract(float64_t);"
|
|
|
+ "f64vec2 fract(f64vec2);"
|
|
|
+ "f64vec3 fract(f64vec3);"
|
|
|
+ "f64vec4 fract(f64vec4);"
|
|
|
+
|
|
|
+ "float64_t mod(float64_t, float64_t);"
|
|
|
+ "f64vec2 mod(f64vec2 , float64_t);"
|
|
|
+ "f64vec3 mod(f64vec3 , float64_t);"
|
|
|
+ "f64vec4 mod(f64vec4 , float64_t);"
|
|
|
+ "f64vec2 mod(f64vec2 , f64vec2);"
|
|
|
+ "f64vec3 mod(f64vec3 , f64vec3);"
|
|
|
+ "f64vec4 mod(f64vec4 , f64vec4);"
|
|
|
+
|
|
|
+ "float64_t modf(float64_t, out float64_t);"
|
|
|
+ "f64vec2 modf(f64vec2, out f64vec2);"
|
|
|
+ "f64vec3 modf(f64vec3, out f64vec3);"
|
|
|
+ "f64vec4 modf(f64vec4, out f64vec4);"
|
|
|
+
|
|
|
+ "float64_t min(float64_t, float64_t);"
|
|
|
+ "f64vec2 min(f64vec2, float64_t);"
|
|
|
+ "f64vec3 min(f64vec3, float64_t);"
|
|
|
+ "f64vec4 min(f64vec4, float64_t);"
|
|
|
+ "f64vec2 min(f64vec2, f64vec2);"
|
|
|
+ "f64vec3 min(f64vec3, f64vec3);"
|
|
|
+ "f64vec4 min(f64vec4, f64vec4);"
|
|
|
+
|
|
|
+ "float64_t max(float64_t, float64_t);"
|
|
|
+ "f64vec2 max(f64vec2 , float64_t);"
|
|
|
+ "f64vec3 max(f64vec3 , float64_t);"
|
|
|
+ "f64vec4 max(f64vec4 , float64_t);"
|
|
|
+ "f64vec2 max(f64vec2 , f64vec2);"
|
|
|
+ "f64vec3 max(f64vec3 , f64vec3);"
|
|
|
+ "f64vec4 max(f64vec4 , f64vec4);"
|
|
|
+
|
|
|
+ "float64_t clamp(float64_t, float64_t, float64_t);"
|
|
|
+ "f64vec2 clamp(f64vec2 , float64_t, float64_t);"
|
|
|
+ "f64vec3 clamp(f64vec3 , float64_t, float64_t);"
|
|
|
+ "f64vec4 clamp(f64vec4 , float64_t, float64_t);"
|
|
|
+ "f64vec2 clamp(f64vec2 , f64vec2 , f64vec2);"
|
|
|
+ "f64vec3 clamp(f64vec3 , f64vec3 , f64vec3);"
|
|
|
+ "f64vec4 clamp(f64vec4 , f64vec4 , f64vec4);"
|
|
|
+
|
|
|
+ "float64_t mix(float64_t, float64_t, float64_t);"
|
|
|
+ "f64vec2 mix(f64vec2, f64vec2, float64_t);"
|
|
|
+ "f64vec3 mix(f64vec3, f64vec3, float64_t);"
|
|
|
+ "f64vec4 mix(f64vec4, f64vec4, float64_t);"
|
|
|
+ "f64vec2 mix(f64vec2, f64vec2, f64vec2);"
|
|
|
+ "f64vec3 mix(f64vec3, f64vec3, f64vec3);"
|
|
|
+ "f64vec4 mix(f64vec4, f64vec4, f64vec4);"
|
|
|
+ "float64_t mix(float64_t, float64_t, bool);"
|
|
|
+ "f64vec2 mix(f64vec2, f64vec2, bvec2);"
|
|
|
+ "f64vec3 mix(f64vec3, f64vec3, bvec3);"
|
|
|
+ "f64vec4 mix(f64vec4, f64vec4, bvec4);"
|
|
|
+
|
|
|
+ "float64_t step(float64_t, float64_t);"
|
|
|
+ "f64vec2 step(f64vec2 , f64vec2);"
|
|
|
+ "f64vec3 step(f64vec3 , f64vec3);"
|
|
|
+ "f64vec4 step(f64vec4 , f64vec4);"
|
|
|
+ "f64vec2 step(float64_t, f64vec2);"
|
|
|
+ "f64vec3 step(float64_t, f64vec3);"
|
|
|
+ "f64vec4 step(float64_t, f64vec4);"
|
|
|
+
|
|
|
+ "float64_t smoothstep(float64_t, float64_t, float64_t);"
|
|
|
+ "f64vec2 smoothstep(f64vec2 , f64vec2 , f64vec2);"
|
|
|
+ "f64vec3 smoothstep(f64vec3 , f64vec3 , f64vec3);"
|
|
|
+ "f64vec4 smoothstep(f64vec4 , f64vec4 , f64vec4);"
|
|
|
+ "f64vec2 smoothstep(float64_t, float64_t, f64vec2);"
|
|
|
+ "f64vec3 smoothstep(float64_t, float64_t, f64vec3);"
|
|
|
+ "f64vec4 smoothstep(float64_t, float64_t, f64vec4);"
|
|
|
+
|
|
|
+ "float64_t length(float64_t);"
|
|
|
+ "float64_t length(f64vec2);"
|
|
|
+ "float64_t length(f64vec3);"
|
|
|
+ "float64_t length(f64vec4);"
|
|
|
+
|
|
|
+ "float64_t distance(float64_t, float64_t);"
|
|
|
+ "float64_t distance(f64vec2 , f64vec2);"
|
|
|
+ "float64_t distance(f64vec3 , f64vec3);"
|
|
|
+ "float64_t distance(f64vec4 , f64vec4);"
|
|
|
+
|
|
|
+ "float64_t dot(float64_t, float64_t);"
|
|
|
+ "float64_t dot(f64vec2 , f64vec2);"
|
|
|
+ "float64_t dot(f64vec3 , f64vec3);"
|
|
|
+ "float64_t dot(f64vec4 , f64vec4);"
|
|
|
+
|
|
|
+ "f64vec3 cross(f64vec3, f64vec3);"
|
|
|
+
|
|
|
+ "float64_t normalize(float64_t);"
|
|
|
+ "f64vec2 normalize(f64vec2);"
|
|
|
+ "f64vec3 normalize(f64vec3);"
|
|
|
+ "f64vec4 normalize(f64vec4);"
|
|
|
+
|
|
|
+ "float64_t faceforward(float64_t, float64_t, float64_t);"
|
|
|
+ "f64vec2 faceforward(f64vec2, f64vec2, f64vec2);"
|
|
|
+ "f64vec3 faceforward(f64vec3, f64vec3, f64vec3);"
|
|
|
+ "f64vec4 faceforward(f64vec4, f64vec4, f64vec4);"
|
|
|
+
|
|
|
+ "float64_t reflect(float64_t, float64_t);"
|
|
|
+ "f64vec2 reflect(f64vec2 , f64vec2 );"
|
|
|
+ "f64vec3 reflect(f64vec3 , f64vec3 );"
|
|
|
+ "f64vec4 reflect(f64vec4 , f64vec4 );"
|
|
|
+
|
|
|
+ "float64_t refract(float64_t, float64_t, float64_t);"
|
|
|
+ "f64vec2 refract(f64vec2 , f64vec2 , float64_t);"
|
|
|
+ "f64vec3 refract(f64vec3 , f64vec3 , float64_t);"
|
|
|
+ "f64vec4 refract(f64vec4 , f64vec4 , float64_t);"
|
|
|
+
|
|
|
+ "f64mat2 matrixCompMult(f64mat2, f64mat2);"
|
|
|
+ "f64mat3 matrixCompMult(f64mat3, f64mat3);"
|
|
|
+ "f64mat4 matrixCompMult(f64mat4, f64mat4);"
|
|
|
+ "f64mat2x3 matrixCompMult(f64mat2x3, f64mat2x3);"
|
|
|
+ "f64mat2x4 matrixCompMult(f64mat2x4, f64mat2x4);"
|
|
|
+ "f64mat3x2 matrixCompMult(f64mat3x2, f64mat3x2);"
|
|
|
+ "f64mat3x4 matrixCompMult(f64mat3x4, f64mat3x4);"
|
|
|
+ "f64mat4x2 matrixCompMult(f64mat4x2, f64mat4x2);"
|
|
|
+ "f64mat4x3 matrixCompMult(f64mat4x3, f64mat4x3);"
|
|
|
+
|
|
|
+ "f64mat2 outerProduct(f64vec2, f64vec2);"
|
|
|
+ "f64mat3 outerProduct(f64vec3, f64vec3);"
|
|
|
+ "f64mat4 outerProduct(f64vec4, f64vec4);"
|
|
|
+ "f64mat2x3 outerProduct(f64vec3, f64vec2);"
|
|
|
+ "f64mat3x2 outerProduct(f64vec2, f64vec3);"
|
|
|
+ "f64mat2x4 outerProduct(f64vec4, f64vec2);"
|
|
|
+ "f64mat4x2 outerProduct(f64vec2, f64vec4);"
|
|
|
+ "f64mat3x4 outerProduct(f64vec4, f64vec3);"
|
|
|
+ "f64mat4x3 outerProduct(f64vec3, f64vec4);"
|
|
|
+
|
|
|
+ "f64mat2 transpose(f64mat2);"
|
|
|
+ "f64mat3 transpose(f64mat3);"
|
|
|
+ "f64mat4 transpose(f64mat4);"
|
|
|
+ "f64mat2x3 transpose(f64mat3x2);"
|
|
|
+ "f64mat3x2 transpose(f64mat2x3);"
|
|
|
+ "f64mat2x4 transpose(f64mat4x2);"
|
|
|
+ "f64mat4x2 transpose(f64mat2x4);"
|
|
|
+ "f64mat3x4 transpose(f64mat4x3);"
|
|
|
+ "f64mat4x3 transpose(f64mat3x4);"
|
|
|
+
|
|
|
+ "float64_t determinant(f64mat2);"
|
|
|
+ "float64_t determinant(f64mat3);"
|
|
|
+ "float64_t determinant(f64mat4);"
|
|
|
+
|
|
|
+ "f64mat2 inverse(f64mat2);"
|
|
|
+ "f64mat3 inverse(f64mat3);"
|
|
|
+ "f64mat4 inverse(f64mat4);"
|
|
|
+
|
|
|
+ "\n");
|
|
|
+ }
|
|
|
+
|
|
|
+ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) {
|
|
|
commonBuiltins.append(
|
|
|
|
|
|
"int64_t abs(int64_t);"
|
|
@@ -998,25 +1195,25 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"u64vec3 mix(u64vec3, u64vec3, bvec3);"
|
|
|
"u64vec4 mix(u64vec4, u64vec4, bvec4);"
|
|
|
|
|
|
- "int64_t doubleBitsToInt64(double);"
|
|
|
- "i64vec2 doubleBitsToInt64(dvec2);"
|
|
|
- "i64vec3 doubleBitsToInt64(dvec3);"
|
|
|
- "i64vec4 doubleBitsToInt64(dvec4);"
|
|
|
+ "int64_t doubleBitsToInt64(float64_t);"
|
|
|
+ "i64vec2 doubleBitsToInt64(f64vec2);"
|
|
|
+ "i64vec3 doubleBitsToInt64(f64vec3);"
|
|
|
+ "i64vec4 doubleBitsToInt64(f64vec4);"
|
|
|
|
|
|
- "uint64_t doubleBitsToUint64(double);"
|
|
|
- "u64vec2 doubleBitsToUint64(dvec2);"
|
|
|
- "u64vec3 doubleBitsToUint64(dvec3);"
|
|
|
- "u64vec4 doubleBitsToUint64(dvec4);"
|
|
|
+ "uint64_t doubleBitsToUint64(float64_t);"
|
|
|
+ "u64vec2 doubleBitsToUint64(f64vec2);"
|
|
|
+ "u64vec3 doubleBitsToUint64(f64vec3);"
|
|
|
+ "u64vec4 doubleBitsToUint64(f64vec4);"
|
|
|
|
|
|
- "double int64BitsToDouble(int64_t);"
|
|
|
- "dvec2 int64BitsToDouble(i64vec2);"
|
|
|
- "dvec3 int64BitsToDouble(i64vec3);"
|
|
|
- "dvec4 int64BitsToDouble(i64vec4);"
|
|
|
+ "float64_t int64BitsToDouble(int64_t);"
|
|
|
+ "f64vec2 int64BitsToDouble(i64vec2);"
|
|
|
+ "f64vec3 int64BitsToDouble(i64vec3);"
|
|
|
+ "f64vec4 int64BitsToDouble(i64vec4);"
|
|
|
|
|
|
- "double uint64BitsToDouble(uint64_t);"
|
|
|
- "dvec2 uint64BitsToDouble(u64vec2);"
|
|
|
- "dvec3 uint64BitsToDouble(u64vec3);"
|
|
|
- "dvec4 uint64BitsToDouble(u64vec4);"
|
|
|
+ "float64_t uint64BitsToDouble(uint64_t);"
|
|
|
+ "f64vec2 uint64BitsToDouble(u64vec2);"
|
|
|
+ "f64vec3 uint64BitsToDouble(u64vec3);"
|
|
|
+ "f64vec4 uint64BitsToDouble(u64vec4);"
|
|
|
|
|
|
"int64_t packInt2x32(ivec2);"
|
|
|
"uint64_t packUint2x32(uvec2);"
|
|
@@ -1065,6 +1262,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"bvec3 notEqual(u64vec3, u64vec3);"
|
|
|
"bvec4 notEqual(u64vec4, u64vec4);"
|
|
|
|
|
|
+ "int64_t bitCount(int64_t);"
|
|
|
+ "i64vec2 bitCount(i64vec2);"
|
|
|
+ "i64vec3 bitCount(i64vec3);"
|
|
|
+ "i64vec4 bitCount(i64vec4);"
|
|
|
+
|
|
|
+ "int64_t bitCount(uint64_t);"
|
|
|
+ "i64vec2 bitCount(u64vec2);"
|
|
|
+ "i64vec3 bitCount(u64vec3);"
|
|
|
+ "i64vec4 bitCount(u64vec4);"
|
|
|
+
|
|
|
"int64_t findLSB(int64_t);"
|
|
|
"i64vec2 findLSB(i64vec2);"
|
|
|
"i64vec3 findLSB(i64vec3);"
|
|
@@ -1230,11 +1437,23 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
" int64_t atomicMin(coherent volatile inout int64_t, int64_t);"
|
|
|
"uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t, int, int, int);"
|
|
|
" int64_t atomicMin(coherent volatile inout int64_t, int64_t, int, int, int);"
|
|
|
+ "float16_t atomicMin(coherent volatile inout float16_t, float16_t);"
|
|
|
+ "float16_t atomicMin(coherent volatile inout float16_t, float16_t, int, int, int);"
|
|
|
+ " float atomicMin(coherent volatile inout float, float);"
|
|
|
+ " float atomicMin(coherent volatile inout float, float, int, int, int);"
|
|
|
+ " double atomicMin(coherent volatile inout double, double);"
|
|
|
+ " double atomicMin(coherent volatile inout double, double, int, int, int);"
|
|
|
|
|
|
"uint64_t atomicMax(coherent volatile inout uint64_t, uint64_t);"
|
|
|
" int64_t atomicMax(coherent volatile inout int64_t, int64_t);"
|
|
|
"uint64_t atomicMax(coherent volatile inout uint64_t, uint64_t, int, int, int);"
|
|
|
" int64_t atomicMax(coherent volatile inout int64_t, int64_t, int, int, int);"
|
|
|
+ "float16_t atomicMax(coherent volatile inout float16_t, float16_t);"
|
|
|
+ "float16_t atomicMax(coherent volatile inout float16_t, float16_t, int, int, int);"
|
|
|
+ " float atomicMax(coherent volatile inout float, float);"
|
|
|
+ " float atomicMax(coherent volatile inout float, float, int, int, int);"
|
|
|
+ " double atomicMax(coherent volatile inout double, double);"
|
|
|
+ " double atomicMax(coherent volatile inout double, double, int, int, int);"
|
|
|
|
|
|
"uint64_t atomicAnd(coherent volatile inout uint64_t, uint64_t);"
|
|
|
" int64_t atomicAnd(coherent volatile inout int64_t, int64_t);"
|
|
@@ -1255,6 +1474,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
" int64_t atomicAdd(coherent volatile inout int64_t, int64_t);"
|
|
|
"uint64_t atomicAdd(coherent volatile inout uint64_t, uint64_t, int, int, int);"
|
|
|
" int64_t atomicAdd(coherent volatile inout int64_t, int64_t, int, int, int);"
|
|
|
+ "float16_t atomicAdd(coherent volatile inout float16_t, float16_t);"
|
|
|
+ "float16_t atomicAdd(coherent volatile inout float16_t, float16_t, int, int, int);"
|
|
|
" float atomicAdd(coherent volatile inout float, float);"
|
|
|
" float atomicAdd(coherent volatile inout float, float, int, int, int);"
|
|
|
" double atomicAdd(coherent volatile inout double, double);"
|
|
@@ -1264,6 +1485,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
" int64_t atomicExchange(coherent volatile inout int64_t, int64_t);"
|
|
|
"uint64_t atomicExchange(coherent volatile inout uint64_t, uint64_t, int, int, int);"
|
|
|
" int64_t atomicExchange(coherent volatile inout int64_t, int64_t, int, int, int);"
|
|
|
+ "float16_t atomicExchange(coherent volatile inout float16_t, float16_t);"
|
|
|
+ "float16_t atomicExchange(coherent volatile inout float16_t, float16_t, int, int, int);"
|
|
|
" float atomicExchange(coherent volatile inout float, float);"
|
|
|
" float atomicExchange(coherent volatile inout float, float, int, int, int);"
|
|
|
" double atomicExchange(coherent volatile inout double, double);"
|
|
@@ -1276,11 +1499,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
|
|
|
"uint64_t atomicLoad(coherent volatile in uint64_t, int, int, int);"
|
|
|
" int64_t atomicLoad(coherent volatile in int64_t, int, int, int);"
|
|
|
+ "float16_t atomicLoad(coherent volatile in float16_t, int, int, int);"
|
|
|
" float atomicLoad(coherent volatile in float, int, int, int);"
|
|
|
" double atomicLoad(coherent volatile in double, int, int, int);"
|
|
|
|
|
|
"void atomicStore(coherent volatile out uint64_t, uint64_t, int, int, int);"
|
|
|
"void atomicStore(coherent volatile out int64_t, int64_t, int, int, int);"
|
|
|
+ "void atomicStore(coherent volatile out float16_t, float16_t, int, int, int);"
|
|
|
"void atomicStore(coherent volatile out float, float, int, int, int);"
|
|
|
"void atomicStore(coherent volatile out double, double, int, int, int);"
|
|
|
"\n");
|
|
@@ -1335,6 +1560,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"dvec4 fma(dvec4, dvec4, dvec4 );"
|
|
|
"\n");
|
|
|
}
|
|
|
+
|
|
|
+ if (profile == EEsProfile && version >= 310) { // ARB_gpu_shader_fp64
|
|
|
+ commonBuiltins.append(
|
|
|
+ "float64_t fma(float64_t, float64_t, float64_t);"
|
|
|
+ "f64vec2 fma(f64vec2, f64vec2, f64vec2 );"
|
|
|
+ "f64vec3 fma(f64vec3, f64vec3, f64vec3 );"
|
|
|
+ "f64vec4 fma(f64vec4, f64vec4, f64vec4 );"
|
|
|
+ "\n");
|
|
|
+ }
|
|
|
#endif
|
|
|
|
|
|
if ((profile == EEsProfile && version >= 310) ||
|
|
@@ -1371,6 +1605,21 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
|
|
|
"\n");
|
|
|
}
|
|
|
+
|
|
|
+ if (profile == EEsProfile && version >= 310) { // ARB_gpu_shader_fp64
|
|
|
+ commonBuiltins.append(
|
|
|
+ "float64_t frexp(float64_t, out int);"
|
|
|
+ "f64vec2 frexp( f64vec2, out ivec2);"
|
|
|
+ "f64vec3 frexp( f64vec3, out ivec3);"
|
|
|
+ "f64vec4 frexp( f64vec4, out ivec4);"
|
|
|
+
|
|
|
+ "float64_t ldexp(float64_t, int);"
|
|
|
+ "f64vec2 ldexp( f64vec2, ivec2);"
|
|
|
+ "f64vec3 ldexp( f64vec3, ivec3);"
|
|
|
+ "f64vec4 ldexp( f64vec4, ivec4);"
|
|
|
+
|
|
|
+ "\n");
|
|
|
+ }
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
@@ -1615,6 +1864,22 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
|
|
|
"\n");
|
|
|
}
|
|
|
+ if (profile != EEsProfile && version == 450) {
|
|
|
+ commonBuiltins.append(
|
|
|
+ "uint atomicCounterAddARB(atomic_uint, uint);"
|
|
|
+ "uint atomicCounterSubtractARB(atomic_uint, uint);"
|
|
|
+ "uint atomicCounterMinARB(atomic_uint, uint);"
|
|
|
+ "uint atomicCounterMaxARB(atomic_uint, uint);"
|
|
|
+ "uint atomicCounterAndARB(atomic_uint, uint);"
|
|
|
+ "uint atomicCounterOrARB(atomic_uint, uint);"
|
|
|
+ "uint atomicCounterXorARB(atomic_uint, uint);"
|
|
|
+ "uint atomicCounterExchangeARB(atomic_uint, uint);"
|
|
|
+ "uint atomicCounterCompSwapARB(atomic_uint, uint, uint);"
|
|
|
+
|
|
|
+ "\n");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
if (profile != EEsProfile && version >= 460) {
|
|
|
commonBuiltins.append(
|
|
|
"uint atomicCounterAdd(atomic_uint, uint);"
|
|
@@ -1627,6 +1892,36 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"uint atomicCounterExchange(atomic_uint, uint);"
|
|
|
"uint atomicCounterCompSwap(atomic_uint, uint, uint);"
|
|
|
|
|
|
+ "\n");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (spvVersion.vulkanRelaxed) {
|
|
|
+ //
|
|
|
+ // Atomic counter functions act as aliases to normal atomic functions.
|
|
|
+ // replace definitions to take 'volatile coherent uint' instead of 'atomic_uint'
|
|
|
+ // and map to equivalent non-counter atomic op
|
|
|
+ //
|
|
|
+ if ((profile != EEsProfile && version >= 300) ||
|
|
|
+ (profile == EEsProfile && version >= 310)) {
|
|
|
+ commonBuiltins.append(
|
|
|
+ "uint atomicCounterIncrement(volatile coherent uint);"
|
|
|
+ "uint atomicCounterDecrement(volatile coherent uint);"
|
|
|
+ "uint atomicCounter(volatile coherent uint);"
|
|
|
+
|
|
|
+ "\n");
|
|
|
+ }
|
|
|
+ if (profile != EEsProfile && version >= 460) {
|
|
|
+ commonBuiltins.append(
|
|
|
+ "uint atomicCounterAdd(volatile coherent uint, uint);"
|
|
|
+ "uint atomicCounterSubtract(volatile coherent uint, uint);"
|
|
|
+ "uint atomicCounterMin(volatile coherent uint, uint);"
|
|
|
+ "uint atomicCounterMax(volatile coherent uint, uint);"
|
|
|
+ "uint atomicCounterAnd(volatile coherent uint, uint);"
|
|
|
+ "uint atomicCounterOr(volatile coherent uint, uint);"
|
|
|
+ "uint atomicCounterXor(volatile coherent uint, uint);"
|
|
|
+ "uint atomicCounterExchange(volatile coherent uint, uint);"
|
|
|
+ "uint atomicCounterCompSwap(volatile coherent uint, uint, uint);"
|
|
|
+
|
|
|
"\n");
|
|
|
}
|
|
|
}
|
|
@@ -3116,7 +3411,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
|
|
|
#ifndef GLSLANG_ANGLE
|
|
|
// GL_AMD_gpu_shader_half_float/Explicit types
|
|
|
- if (profile != EEsProfile && version >= 450) {
|
|
|
+ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) {
|
|
|
commonBuiltins.append(
|
|
|
"float16_t radians(float16_t);"
|
|
|
"f16vec2 radians(f16vec2);"
|
|
@@ -3464,7 +3759,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
}
|
|
|
|
|
|
// Explicit types
|
|
|
- if (profile != EEsProfile && version >= 450) {
|
|
|
+ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) {
|
|
|
commonBuiltins.append(
|
|
|
"int8_t abs(int8_t);"
|
|
|
"i8vec2 abs(i8vec2);"
|
|
@@ -4124,7 +4419,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
}
|
|
|
#ifndef GLSLANG_WEB
|
|
|
if ((profile != EEsProfile && version >= 420) || esBarrier) {
|
|
|
- if (spvVersion.vulkan == 0) {
|
|
|
+ if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed) {
|
|
|
commonBuiltins.append("void memoryBarrierAtomicCounter();");
|
|
|
}
|
|
|
commonBuiltins.append("void memoryBarrierImage();");
|
|
@@ -4382,7 +4677,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"\n");
|
|
|
}
|
|
|
|
|
|
- // Builtins for GL_NV_ray_tracing/GL_EXT_ray_tracing/GL_EXT_ray_query
|
|
|
+ // Builtins for GL_NV_ray_tracing/GL_NV_ray_tracing_motion_blur/GL_EXT_ray_tracing/GL_EXT_ray_query
|
|
|
if (profile != EEsProfile && version >= 460) {
|
|
|
commonBuiltins.append("void rayQueryInitializeEXT(rayQueryEXT, accelerationStructureEXT, uint, uint, vec3, float, vec3, float);"
|
|
|
"void rayQueryTerminateEXT(rayQueryEXT);"
|
|
@@ -4411,6 +4706,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
|
|
|
stageBuiltins[EShLangRayGen].append(
|
|
|
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
|
|
+ "void traceRayMotionNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);"
|
|
|
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
|
|
"void executeCallableNV(uint, int);"
|
|
|
"void executeCallableEXT(uint, int);"
|
|
@@ -4425,12 +4721,14 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"\n");
|
|
|
stageBuiltins[EShLangClosestHit].append(
|
|
|
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
|
|
+ "void traceRayMotionNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);"
|
|
|
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
|
|
"void executeCallableNV(uint, int);"
|
|
|
"void executeCallableEXT(uint, int);"
|
|
|
"\n");
|
|
|
stageBuiltins[EShLangMiss].append(
|
|
|
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
|
|
+ "void traceRayMotionNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);"
|
|
|
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
|
|
"void executeCallableNV(uint, int);"
|
|
|
"void executeCallableEXT(uint, int);"
|
|
@@ -4848,6 +5146,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"in int gl_VertexIndex;"
|
|
|
"in int gl_InstanceIndex;"
|
|
|
);
|
|
|
+
|
|
|
+ if (spvVersion.vulkan > 0 && version >= 140 && spvVersion.vulkanRelaxed)
|
|
|
+ stageBuiltins[EShLangVertex].append(
|
|
|
+ "in int gl_VertexID;" // declare with 'in' qualifier
|
|
|
+ "in int gl_InstanceID;"
|
|
|
+ );
|
|
|
+
|
|
|
if (version >= 440) {
|
|
|
stageBuiltins[EShLangVertex].append(
|
|
|
"in int gl_BaseVertexARB;"
|
|
@@ -4885,7 +5190,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"mediump float gl_PointSize;" // needs qualifier fixed later
|
|
|
);
|
|
|
} else {
|
|
|
- if (spvVersion.vulkan == 0)
|
|
|
+ if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed)
|
|
|
stageBuiltins[EShLangVertex].append(
|
|
|
"in highp int gl_VertexID;" // needs qualifier fixed later
|
|
|
"in highp int gl_InstanceID;" // needs qualifier fixed later
|
|
@@ -5632,6 +5937,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"in mat3x4 gl_WorldToObject3x4EXT;"
|
|
|
"in uint gl_IncomingRayFlagsNV;"
|
|
|
"in uint gl_IncomingRayFlagsEXT;"
|
|
|
+ "in float gl_CurrentRayTimeNV;"
|
|
|
"\n";
|
|
|
const char *hitDecls =
|
|
|
"in uvec3 gl_LaunchIDNV;"
|
|
@@ -5667,6 +5973,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"in mat3x4 gl_WorldToObject3x4EXT;"
|
|
|
"in uint gl_IncomingRayFlagsNV;"
|
|
|
"in uint gl_IncomingRayFlagsEXT;"
|
|
|
+ "in float gl_CurrentRayTimeNV;"
|
|
|
"\n";
|
|
|
const char *missDecls =
|
|
|
"in uvec3 gl_LaunchIDNV;"
|
|
@@ -5685,6 +5992,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"in float gl_RayTmaxEXT;"
|
|
|
"in uint gl_IncomingRayFlagsNV;"
|
|
|
"in uint gl_IncomingRayFlagsEXT;"
|
|
|
+ "in float gl_CurrentRayTimeNV;"
|
|
|
"\n";
|
|
|
|
|
|
const char *callableDecls =
|
|
@@ -6211,6 +6519,24 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int
|
|
|
commonBuiltins.append(imageParams);
|
|
|
commonBuiltins.append(", float");
|
|
|
commonBuiltins.append(", int, int, int);\n");
|
|
|
+
|
|
|
+ commonBuiltins.append("float imageAtomicMin(volatile coherent ");
|
|
|
+ commonBuiltins.append(imageParams);
|
|
|
+ commonBuiltins.append(", float);\n");
|
|
|
+
|
|
|
+ commonBuiltins.append("float imageAtomicMin(volatile coherent ");
|
|
|
+ commonBuiltins.append(imageParams);
|
|
|
+ commonBuiltins.append(", float");
|
|
|
+ commonBuiltins.append(", int, int, int);\n");
|
|
|
+
|
|
|
+ commonBuiltins.append("float imageAtomicMax(volatile coherent ");
|
|
|
+ commonBuiltins.append(imageParams);
|
|
|
+ commonBuiltins.append(", float);\n");
|
|
|
+
|
|
|
+ commonBuiltins.append("float imageAtomicMax(volatile coherent ");
|
|
|
+ commonBuiltins.append(imageParams);
|
|
|
+ commonBuiltins.append(", float");
|
|
|
+ commonBuiltins.append(", int, int, int);\n");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -6538,7 +6864,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
|
|
|
s.append(");\n");
|
|
|
|
|
|
// Add to the per-language set of built-ins
|
|
|
- if (bias || lodClamp != 0) {
|
|
|
+ if (!grad && (bias || lodClamp != 0)) {
|
|
|
stageBuiltins[EShLangFragment].append(s);
|
|
|
stageBuiltins[EShLangCompute].append(s);
|
|
|
} else
|
|
@@ -6979,6 +7305,9 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|
|
|
|
|
snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentUniformVectors = %d;", resources.maxFragmentUniformVectors);
|
|
|
s.append(builtInConstant);
|
|
|
+
|
|
|
+ snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingVectors = %d;", resources.maxVaryingVectors);
|
|
|
+ s.append(builtInConstant);
|
|
|
}
|
|
|
|
|
|
snprintf(builtInConstant, maxSize, "const int gl_MaxVertexAttribs = %d;", resources.maxVertexAttribs);
|
|
@@ -7011,7 +7340,8 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|
|
snprintf(builtInConstant, maxSize, "const int gl_MaxVertexUniformComponents = %d;", resources.maxVertexUniformComponents);
|
|
|
s.append(builtInConstant);
|
|
|
|
|
|
- if (version < 150 || ARBCompatibility) {
|
|
|
+ // Moved from just being deprecated into compatibility profile only as of 4.20
|
|
|
+ if (version < 420 || profile == ECompatibilityProfile) {
|
|
|
snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingFloats = %d;", resources.maxVaryingFloats);
|
|
|
s.append(builtInConstant);
|
|
|
}
|
|
@@ -7436,6 +7766,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
SpecialQualifier("gl_InstanceID", EvqInstanceId, EbvInstanceId, symbolTable);
|
|
|
}
|
|
|
|
|
|
+ if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) {
|
|
|
+ // treat these built-ins as aliases of VertexIndex and InstanceIndex
|
|
|
+ BuiltInVariable("gl_VertexID", EbvVertexIndex, symbolTable);
|
|
|
+ BuiltInVariable("gl_InstanceID", EbvInstanceIndex, symbolTable);
|
|
|
+ }
|
|
|
+
|
|
|
if (profile != EEsProfile) {
|
|
|
if (version >= 440) {
|
|
|
symbolTable.setVariableExtensions("gl_BaseVertexARB", 1, &E_GL_ARB_shader_draw_parameters);
|
|
@@ -7947,6 +8283,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
symbolTable.setFunctionExtensions("atomicCounter" , 1, &E_GL_ARB_shader_atomic_counters);
|
|
|
}
|
|
|
|
|
|
+ // E_GL_ARB_shader_atomic_counter_ops
|
|
|
+ if (profile != EEsProfile && version == 450) {
|
|
|
+ symbolTable.setFunctionExtensions("atomicCounterAddARB" , 1, &E_GL_ARB_shader_atomic_counter_ops);
|
|
|
+ symbolTable.setFunctionExtensions("atomicCounterSubtractARB", 1, &E_GL_ARB_shader_atomic_counter_ops);
|
|
|
+ symbolTable.setFunctionExtensions("atomicCounterMinARB" , 1, &E_GL_ARB_shader_atomic_counter_ops);
|
|
|
+ symbolTable.setFunctionExtensions("atomicCounterMaxARB" , 1, &E_GL_ARB_shader_atomic_counter_ops);
|
|
|
+ symbolTable.setFunctionExtensions("atomicCounterAndARB" , 1, &E_GL_ARB_shader_atomic_counter_ops);
|
|
|
+ symbolTable.setFunctionExtensions("atomicCounterOrARB" , 1, &E_GL_ARB_shader_atomic_counter_ops);
|
|
|
+ symbolTable.setFunctionExtensions("atomicCounterXorARB" , 1, &E_GL_ARB_shader_atomic_counter_ops);
|
|
|
+ symbolTable.setFunctionExtensions("atomicCounterExchangeARB", 1, &E_GL_ARB_shader_atomic_counter_ops);
|
|
|
+ symbolTable.setFunctionExtensions("atomicCounterCompSwapARB", 1, &E_GL_ARB_shader_atomic_counter_ops);
|
|
|
+ }
|
|
|
+
|
|
|
// E_GL_ARB_derivative_control
|
|
|
if (profile != EEsProfile && version < 450) {
|
|
|
symbolTable.setFunctionExtensions("dFdxFine", 1, &E_GL_ARB_derivative_control);
|
|
@@ -8475,11 +8824,13 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
symbolTable.setVariableExtensions("gl_WorldToObject3x4EXT", 1, &E_GL_EXT_ray_tracing);
|
|
|
symbolTable.setVariableExtensions("gl_IncomingRayFlagsNV", 1, &E_GL_NV_ray_tracing);
|
|
|
symbolTable.setVariableExtensions("gl_IncomingRayFlagsEXT", 1, &E_GL_EXT_ray_tracing);
|
|
|
+ symbolTable.setVariableExtensions("gl_CurrentRayTimeNV", 1, &E_GL_NV_ray_tracing_motion_blur);
|
|
|
|
|
|
symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group);
|
|
|
|
|
|
|
|
|
symbolTable.setFunctionExtensions("traceNV", 1, &E_GL_NV_ray_tracing);
|
|
|
+ symbolTable.setFunctionExtensions("traceRayMotionNV", 1, &E_GL_NV_ray_tracing_motion_blur);
|
|
|
symbolTable.setFunctionExtensions("traceRayEXT", 1, &E_GL_EXT_ray_tracing);
|
|
|
symbolTable.setFunctionExtensions("reportIntersectionNV", 1, &E_GL_NV_ray_tracing);
|
|
|
symbolTable.setFunctionExtensions("reportIntersectionEXT", 1, &E_GL_EXT_ray_tracing);
|
|
@@ -8523,6 +8874,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
BuiltInVariable("gl_IncomingRayFlagsNV", EbvIncomingRayFlags, symbolTable);
|
|
|
BuiltInVariable("gl_IncomingRayFlagsEXT", EbvIncomingRayFlags, symbolTable);
|
|
|
BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
|
|
|
+ BuiltInVariable("gl_CurrentRayTimeNV", EbvCurrentRayTimeNV, symbolTable);
|
|
|
|
|
|
// GL_ARB_shader_ballot
|
|
|
symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot);
|
|
@@ -8912,6 +9264,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
symbolTable.relateToOperator("memoryBarrierAtomicCounter", EOpMemoryBarrierAtomicCounter);
|
|
|
symbolTable.relateToOperator("memoryBarrierImage", EOpMemoryBarrierImage);
|
|
|
|
|
|
+ if (spvVersion.vulkanRelaxed) {
|
|
|
+ //
|
|
|
+ // functions signature have been replaced to take uint operations on buffer variables
|
|
|
+ // remap atomic counter functions to atomic operations
|
|
|
+ //
|
|
|
+ symbolTable.relateToOperator("memoryBarrierAtomicCounter", EOpMemoryBarrierBuffer);
|
|
|
+ }
|
|
|
+
|
|
|
symbolTable.relateToOperator("atomicLoad", EOpAtomicLoad);
|
|
|
symbolTable.relateToOperator("atomicStore", EOpAtomicStore);
|
|
|
|
|
@@ -8919,12 +9279,38 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
symbolTable.relateToOperator("atomicCounterDecrement", EOpAtomicCounterDecrement);
|
|
|
symbolTable.relateToOperator("atomicCounter", EOpAtomicCounter);
|
|
|
|
|
|
+ if (spvVersion.vulkanRelaxed) {
|
|
|
+ //
|
|
|
+ // functions signature have been replaced to take uint operations
|
|
|
+ // remap atomic counter functions to atomic operations
|
|
|
+ //
|
|
|
+ // these atomic counter functions do not match signatures of glsl
|
|
|
+ // atomic functions, so they will be remapped to semantically
|
|
|
+ // equivalent functions in the parser
|
|
|
+ //
|
|
|
+ symbolTable.relateToOperator("atomicCounterIncrement", EOpNull);
|
|
|
+ symbolTable.relateToOperator("atomicCounterDecrement", EOpNull);
|
|
|
+ symbolTable.relateToOperator("atomicCounter", EOpNull);
|
|
|
+ }
|
|
|
+
|
|
|
symbolTable.relateToOperator("clockARB", EOpReadClockSubgroupKHR);
|
|
|
symbolTable.relateToOperator("clock2x32ARB", EOpReadClockSubgroupKHR);
|
|
|
|
|
|
symbolTable.relateToOperator("clockRealtimeEXT", EOpReadClockDeviceKHR);
|
|
|
symbolTable.relateToOperator("clockRealtime2x32EXT", EOpReadClockDeviceKHR);
|
|
|
|
|
|
+ if (profile != EEsProfile && version == 450) {
|
|
|
+ symbolTable.relateToOperator("atomicCounterAddARB", EOpAtomicCounterAdd);
|
|
|
+ symbolTable.relateToOperator("atomicCounterSubtractARB", EOpAtomicCounterSubtract);
|
|
|
+ symbolTable.relateToOperator("atomicCounterMinARB", EOpAtomicCounterMin);
|
|
|
+ symbolTable.relateToOperator("atomicCounterMaxARB", EOpAtomicCounterMax);
|
|
|
+ symbolTable.relateToOperator("atomicCounterAndARB", EOpAtomicCounterAnd);
|
|
|
+ symbolTable.relateToOperator("atomicCounterOrARB", EOpAtomicCounterOr);
|
|
|
+ symbolTable.relateToOperator("atomicCounterXorARB", EOpAtomicCounterXor);
|
|
|
+ symbolTable.relateToOperator("atomicCounterExchangeARB", EOpAtomicCounterExchange);
|
|
|
+ symbolTable.relateToOperator("atomicCounterCompSwapARB", EOpAtomicCounterCompSwap);
|
|
|
+ }
|
|
|
+
|
|
|
if (profile != EEsProfile && version >= 460) {
|
|
|
symbolTable.relateToOperator("atomicCounterAdd", EOpAtomicCounterAdd);
|
|
|
symbolTable.relateToOperator("atomicCounterSubtract", EOpAtomicCounterSubtract);
|
|
@@ -8937,6 +9323,23 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
symbolTable.relateToOperator("atomicCounterCompSwap", EOpAtomicCounterCompSwap);
|
|
|
}
|
|
|
|
|
|
+ if (spvVersion.vulkanRelaxed) {
|
|
|
+ //
|
|
|
+ // functions signature have been replaced to take 'uint' instead of 'atomic_uint'
|
|
|
+ // remap atomic counter functions to non-counter atomic ops so
|
|
|
+ // functions act as aliases to non-counter atomic ops
|
|
|
+ //
|
|
|
+ symbolTable.relateToOperator("atomicCounterAdd", EOpAtomicAdd);
|
|
|
+ symbolTable.relateToOperator("atomicCounterSubtract", EOpAtomicSubtract);
|
|
|
+ symbolTable.relateToOperator("atomicCounterMin", EOpAtomicMin);
|
|
|
+ symbolTable.relateToOperator("atomicCounterMax", EOpAtomicMax);
|
|
|
+ symbolTable.relateToOperator("atomicCounterAnd", EOpAtomicAnd);
|
|
|
+ symbolTable.relateToOperator("atomicCounterOr", EOpAtomicOr);
|
|
|
+ symbolTable.relateToOperator("atomicCounterXor", EOpAtomicXor);
|
|
|
+ symbolTable.relateToOperator("atomicCounterExchange", EOpAtomicExchange);
|
|
|
+ symbolTable.relateToOperator("atomicCounterCompSwap", EOpAtomicCompSwap);
|
|
|
+ }
|
|
|
+
|
|
|
symbolTable.relateToOperator("fma", EOpFma);
|
|
|
symbolTable.relateToOperator("frexp", EOpFrexp);
|
|
|
symbolTable.relateToOperator("ldexp", EOpLdexp);
|
|
@@ -9315,6 +9718,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
case EShLangMiss:
|
|
|
if (profile != EEsProfile && version >= 460) {
|
|
|
symbolTable.relateToOperator("traceNV", EOpTraceNV);
|
|
|
+ symbolTable.relateToOperator("traceRayMotionNV", EOpTraceRayMotionNV);
|
|
|
symbolTable.relateToOperator("traceRayEXT", EOpTraceKHR);
|
|
|
symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallableNV);
|
|
|
symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallableKHR);
|