|
@@ -4878,7 +4878,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"void barrier();"
|
|
"void barrier();"
|
|
|
);
|
|
);
|
|
|
#ifdef NV_EXTENSIONS
|
|
#ifdef NV_EXTENSIONS
|
|
|
- if ((profile != EEsProfile && version >= 450) || esBarrier) {
|
|
|
|
|
|
|
+ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
|
|
stageBuiltins[EShLangMeshNV].append(
|
|
stageBuiltins[EShLangMeshNV].append(
|
|
|
"void barrier();"
|
|
"void barrier();"
|
|
|
);
|
|
);
|
|
@@ -4903,7 +4903,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
#ifdef NV_EXTENSIONS
|
|
#ifdef NV_EXTENSIONS
|
|
|
- if (profile != EEsProfile && version >= 450) {
|
|
|
|
|
|
|
+ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
|
|
stageBuiltins[EShLangMeshNV].append(
|
|
stageBuiltins[EShLangMeshNV].append(
|
|
|
"void memoryBarrierShared();"
|
|
"void memoryBarrierShared();"
|
|
|
"void groupMemoryBarrier();"
|
|
"void groupMemoryBarrier();"
|
|
@@ -5094,7 +5094,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Builtins for GL_NV_mesh_shader
|
|
// Builtins for GL_NV_mesh_shader
|
|
|
- if (profile != EEsProfile && version >= 450) {
|
|
|
|
|
|
|
+ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
|
|
stageBuiltins[EShLangMeshNV].append(
|
|
stageBuiltins[EShLangMeshNV].append(
|
|
|
"void writePackedPrimitiveIndices4x8NV(uint, uint);"
|
|
"void writePackedPrimitiveIndices4x8NV(uint, uint);"
|
|
|
"\n");
|
|
"\n");
|
|
@@ -5287,7 +5287,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
//
|
|
//
|
|
|
//============================================================================
|
|
//============================================================================
|
|
|
|
|
|
|
|
- if (profile != EEsProfile && version >= 450) {
|
|
|
|
|
|
|
+ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
|
|
// per-vertex attributes
|
|
// per-vertex attributes
|
|
|
stageBuiltins[EShLangMeshNV].append(
|
|
stageBuiltins[EShLangMeshNV].append(
|
|
|
"out gl_MeshPerVertexNV {"
|
|
"out gl_MeshPerVertexNV {"
|
|
@@ -5328,17 +5328,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"in highp uvec3 gl_GlobalInvocationID;"
|
|
"in highp uvec3 gl_GlobalInvocationID;"
|
|
|
"in highp uint gl_LocalInvocationIndex;"
|
|
"in highp uint gl_LocalInvocationIndex;"
|
|
|
|
|
|
|
|
- "in highp int gl_DeviceIndex;" // GL_EXT_device_group
|
|
|
|
|
- "in int gl_DrawIDARB;" // GL_ARB_shader_draw_parameters
|
|
|
|
|
-
|
|
|
|
|
"\n");
|
|
"\n");
|
|
|
|
|
|
|
|
- if (version >= 460) {
|
|
|
|
|
- stageBuiltins[EShLangMeshNV].append(
|
|
|
|
|
- "in int gl_DrawID;"
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
stageBuiltins[EShLangTaskNV].append(
|
|
stageBuiltins[EShLangTaskNV].append(
|
|
|
"out uint gl_TaskCountNV;"
|
|
"out uint gl_TaskCountNV;"
|
|
|
|
|
|
|
@@ -5350,15 +5341,28 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"in highp uvec3 gl_GlobalInvocationID;"
|
|
"in highp uvec3 gl_GlobalInvocationID;"
|
|
|
"in highp uint gl_LocalInvocationIndex;"
|
|
"in highp uint gl_LocalInvocationIndex;"
|
|
|
|
|
|
|
|
|
|
+ "\n");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (profile != EEsProfile && version >= 450) {
|
|
|
|
|
+ stageBuiltins[EShLangMeshNV].append(
|
|
|
"in highp int gl_DeviceIndex;" // GL_EXT_device_group
|
|
"in highp int gl_DeviceIndex;" // GL_EXT_device_group
|
|
|
"in int gl_DrawIDARB;" // GL_ARB_shader_draw_parameters
|
|
"in int gl_DrawIDARB;" // GL_ARB_shader_draw_parameters
|
|
|
|
|
+ "\n");
|
|
|
|
|
|
|
|
|
|
+ stageBuiltins[EShLangTaskNV].append(
|
|
|
|
|
+ "in highp int gl_DeviceIndex;" // GL_EXT_device_group
|
|
|
|
|
+ "in int gl_DrawIDARB;" // GL_ARB_shader_draw_parameters
|
|
|
"\n");
|
|
"\n");
|
|
|
|
|
|
|
|
if (version >= 460) {
|
|
if (version >= 460) {
|
|
|
|
|
+ stageBuiltins[EShLangMeshNV].append(
|
|
|
|
|
+ "in int gl_DrawID;"
|
|
|
|
|
+ "\n");
|
|
|
|
|
+
|
|
|
stageBuiltins[EShLangTaskNV].append(
|
|
stageBuiltins[EShLangTaskNV].append(
|
|
|
"in int gl_DrawID;"
|
|
"in int gl_DrawID;"
|
|
|
- );
|
|
|
|
|
|
|
+ "\n");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
#endif
|
|
#endif
|
|
@@ -7658,7 +7662,7 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|
|
|
|
|
|
|
#ifdef NV_EXTENSIONS
|
|
#ifdef NV_EXTENSIONS
|
|
|
// SPV_NV_mesh_shader
|
|
// SPV_NV_mesh_shader
|
|
|
- if (profile != EEsProfile && version >= 450) {
|
|
|
|
|
|
|
+ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
|
|
snprintf(builtInConstant, maxSize, "const int gl_MaxMeshOutputVerticesNV = %d;", resources.maxMeshOutputVerticesNV);
|
|
snprintf(builtInConstant, maxSize, "const int gl_MaxMeshOutputVerticesNV = %d;", resources.maxMeshOutputVerticesNV);
|
|
|
s.append(builtInConstant);
|
|
s.append(builtInConstant);
|
|
|
|
|
|
|
@@ -8633,7 +8637,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
case EShLangMeshNV:
|
|
case EShLangMeshNV:
|
|
|
- if (profile != EEsProfile && version >= 450) {
|
|
|
|
|
|
|
+ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
|
|
// Per-vertex builtins
|
|
// Per-vertex builtins
|
|
|
BuiltInVariable("gl_MeshVerticesNV", "gl_Position", EbvPosition, symbolTable);
|
|
BuiltInVariable("gl_MeshVerticesNV", "gl_Position", EbvPosition, symbolTable);
|
|
|
BuiltInVariable("gl_MeshVerticesNV", "gl_PointSize", EbvPointSize, symbolTable);
|
|
BuiltInVariable("gl_MeshVerticesNV", "gl_PointSize", EbvPointSize, symbolTable);
|
|
@@ -8681,7 +8685,9 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
symbolTable.setFunctionExtensions("barrier", 1, &E_GL_NV_mesh_shader);
|
|
symbolTable.setFunctionExtensions("barrier", 1, &E_GL_NV_mesh_shader);
|
|
|
symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_NV_mesh_shader);
|
|
symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_NV_mesh_shader);
|
|
|
symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_NV_mesh_shader);
|
|
symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_NV_mesh_shader);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ if (profile != EEsProfile && version >= 450) {
|
|
|
// GL_EXT_device_group
|
|
// GL_EXT_device_group
|
|
|
symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group);
|
|
symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group);
|
|
|
BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
|
|
BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
|
|
@@ -8743,7 +8749,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
case EShLangTaskNV:
|
|
case EShLangTaskNV:
|
|
|
- if (profile != EEsProfile && version >= 450) {
|
|
|
|
|
|
|
+ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
|
|
symbolTable.setVariableExtensions("gl_TaskCountNV", 1, &E_GL_NV_mesh_shader);
|
|
symbolTable.setVariableExtensions("gl_TaskCountNV", 1, &E_GL_NV_mesh_shader);
|
|
|
symbolTable.setVariableExtensions("gl_WorkGroupSize", 1, &E_GL_NV_mesh_shader);
|
|
symbolTable.setVariableExtensions("gl_WorkGroupSize", 1, &E_GL_NV_mesh_shader);
|
|
|
symbolTable.setVariableExtensions("gl_WorkGroupID", 1, &E_GL_NV_mesh_shader);
|
|
symbolTable.setVariableExtensions("gl_WorkGroupID", 1, &E_GL_NV_mesh_shader);
|
|
@@ -8763,7 +8769,9 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
symbolTable.setFunctionExtensions("barrier", 1, &E_GL_NV_mesh_shader);
|
|
symbolTable.setFunctionExtensions("barrier", 1, &E_GL_NV_mesh_shader);
|
|
|
symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_NV_mesh_shader);
|
|
symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_NV_mesh_shader);
|
|
|
symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_NV_mesh_shader);
|
|
symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_NV_mesh_shader);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ if (profile != EEsProfile && version >= 450) {
|
|
|
// GL_EXT_device_group
|
|
// GL_EXT_device_group
|
|
|
symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group);
|
|
symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group);
|
|
|
BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
|
|
BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
|
|
@@ -9379,12 +9387,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
case EShLangMeshNV:
|
|
case EShLangMeshNV:
|
|
|
- if (profile != EEsProfile && version >= 450) {
|
|
|
|
|
|
|
+ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
|
|
symbolTable.relateToOperator("writePackedPrimitiveIndices4x8NV", EOpWritePackedPrimitiveIndices4x8NV);
|
|
symbolTable.relateToOperator("writePackedPrimitiveIndices4x8NV", EOpWritePackedPrimitiveIndices4x8NV);
|
|
|
}
|
|
}
|
|
|
// fall through
|
|
// fall through
|
|
|
case EShLangTaskNV:
|
|
case EShLangTaskNV:
|
|
|
- if (profile != EEsProfile && version >= 450) {
|
|
|
|
|
|
|
+ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
|
|
symbolTable.relateToOperator("memoryBarrierShared", EOpMemoryBarrierShared);
|
|
symbolTable.relateToOperator("memoryBarrierShared", EOpMemoryBarrierShared);
|
|
|
symbolTable.relateToOperator("groupMemoryBarrier", EOpGroupMemoryBarrier);
|
|
symbolTable.relateToOperator("groupMemoryBarrier", EOpGroupMemoryBarrier);
|
|
|
}
|
|
}
|