|
@@ -61,10 +61,6 @@ const bool ARBCompatibility = true;
|
|
|
|
|
|
|
|
const bool ForwardCompatibility = false;
|
|
const bool ForwardCompatibility = false;
|
|
|
|
|
|
|
|
-// change this back to false if depending on textual spellings of texturing calls when consuming the AST
|
|
|
|
|
-// Using PureOperatorBuiltins=false is deprecated.
|
|
|
|
|
-bool PureOperatorBuiltins = true;
|
|
|
|
|
-
|
|
|
|
|
namespace {
|
|
namespace {
|
|
|
|
|
|
|
|
//
|
|
//
|
|
@@ -4135,6 +4131,18 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // QCOM_image_processing
|
|
|
|
|
+ if ((profile == EEsProfile && version >= 310) ||
|
|
|
|
|
+ (profile != EEsProfile && version >= 140)) {
|
|
|
|
|
+ commonBuiltins.append(
|
|
|
|
|
+ "vec4 textureWeightedQCOM(sampler2D, vec2, sampler2DArray);"
|
|
|
|
|
+ "vec4 textureWeightedQCOM(sampler2D, vec2, sampler1DArray);"
|
|
|
|
|
+ "vec4 textureBoxFilterQCOM(sampler2D, vec2, vec2);"
|
|
|
|
|
+ "vec4 textureBlockMatchSADQCOM(sampler2D, uvec2, sampler2D, uvec2, uvec2);"
|
|
|
|
|
+ "vec4 textureBlockMatchSSDQCOM(sampler2D, uvec2, sampler2D, uvec2, uvec2);"
|
|
|
|
|
+ "\n");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//============================================================================
|
|
//============================================================================
|
|
|
//
|
|
//
|
|
|
// Prototypes for built-in functions seen by vertex shaders only.
|
|
// Prototypes for built-in functions seen by vertex shaders only.
|
|
@@ -4624,7 +4632,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|
|
"uvec4 fragmentFetchAMD(usubpassInputMS, uint);"
|
|
"uvec4 fragmentFetchAMD(usubpassInputMS, uint);"
|
|
|
|
|
|
|
|
"\n");
|
|
"\n");
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// Builtins for GL_NV_ray_tracing/GL_NV_ray_tracing_motion_blur/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/
|
|
|
// GL_NV_shader_invocation_reorder/GL_KHR_ray_tracing_position_Fetch
|
|
// GL_NV_shader_invocation_reorder/GL_KHR_ray_tracing_position_Fetch
|
|
@@ -8095,7 +8103,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable);
|
|
BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (profile != EEsProfile) {
|
|
|
|
|
|
|
+ if (profile != EEsProfile) {
|
|
|
BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable);
|
|
BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable);
|
|
|
BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable);
|
|
BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable);
|
|
|
BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable);
|
|
BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable);
|
|
@@ -8725,6 +8733,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
symbolTable.setFunctionExtensions("stencilAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image);
|
|
symbolTable.setFunctionExtensions("stencilAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image);
|
|
|
symbolTable.setFunctionExtensions("depthAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image);
|
|
symbolTable.setFunctionExtensions("depthAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image);
|
|
|
symbolTable.setFunctionExtensions("colorAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image);
|
|
symbolTable.setFunctionExtensions("colorAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image);
|
|
|
|
|
+
|
|
|
|
|
+ if ((profile == EEsProfile && version >= 310) ||
|
|
|
|
|
+ (profile != EEsProfile && version >= 140)) {
|
|
|
|
|
+ symbolTable.setFunctionExtensions("textureWeightedQCOM", 1, &E_GL_QCOM_image_processing);
|
|
|
|
|
+ symbolTable.setFunctionExtensions("textureBoxFilterQCOM", 1, &E_GL_QCOM_image_processing);
|
|
|
|
|
+ symbolTable.setFunctionExtensions("textureBlockMatchSADQCOM", 1, &E_GL_QCOM_image_processing);
|
|
|
|
|
+ symbolTable.setFunctionExtensions("textureBlockMatchSSDQCOM", 1, &E_GL_QCOM_image_processing);
|
|
|
|
|
+ }
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
case EShLangCompute:
|
|
case EShLangCompute:
|
|
@@ -9206,7 +9222,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_Layer", 1, &E_GL_EXT_mesh_shader);
|
|
symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_Layer", 1, &E_GL_EXT_mesh_shader);
|
|
|
symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_ViewportIndex", 1, &E_GL_EXT_mesh_shader);
|
|
symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_ViewportIndex", 1, &E_GL_EXT_mesh_shader);
|
|
|
symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_CullPrimitiveEXT", 1, &E_GL_EXT_mesh_shader);
|
|
symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_CullPrimitiveEXT", 1, &E_GL_EXT_mesh_shader);
|
|
|
- symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_PrimitiveShadingRateEXT", 1, &E_GL_EXT_mesh_shader);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // note: technically this member requires both GL_EXT_mesh_shader and GL_EXT_fragment_shading_rate
|
|
|
|
|
+ // since setVariableExtensions only needs *one of* the extensions to validate, it's more useful to specify EXT_fragment_shading_rate
|
|
|
|
|
+ // GL_EXT_mesh_shader will be required in practice by use of other fields of gl_MeshPrimitivesEXT
|
|
|
|
|
+ symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_PrimitiveShadingRateEXT", 1, &E_GL_EXT_fragment_shading_rate);
|
|
|
|
|
|
|
|
BuiltInVariable("gl_MeshPrimitivesEXT", "gl_PrimitiveID", EbvPrimitiveId, symbolTable);
|
|
BuiltInVariable("gl_MeshPrimitivesEXT", "gl_PrimitiveID", EbvPrimitiveId, symbolTable);
|
|
|
BuiltInVariable("gl_MeshPrimitivesEXT", "gl_Layer", EbvLayer, symbolTable);
|
|
BuiltInVariable("gl_MeshPrimitivesEXT", "gl_Layer", EbvLayer, symbolTable);
|
|
@@ -9886,6 +9906,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
symbolTable.relateToOperator("shadow2DEXT", EOpTexture);
|
|
symbolTable.relateToOperator("shadow2DEXT", EOpTexture);
|
|
|
symbolTable.relateToOperator("shadow2DProjEXT", EOpTextureProj);
|
|
symbolTable.relateToOperator("shadow2DProjEXT", EOpTextureProj);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if ((profile == EEsProfile && version >= 310) ||
|
|
|
|
|
+ (profile != EEsProfile && version >= 140)) {
|
|
|
|
|
+ symbolTable.relateToOperator("textureWeightedQCOM", EOpImageSampleWeightedQCOM);
|
|
|
|
|
+ symbolTable.relateToOperator("textureBoxFilterQCOM", EOpImageBoxFilterQCOM);
|
|
|
|
|
+ symbolTable.relateToOperator("textureBlockMatchSADQCOM", EOpImageBlockMatchSADQCOM);
|
|
|
|
|
+ symbolTable.relateToOperator("textureBlockMatchSSDQCOM", EOpImageBlockMatchSSDQCOM);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
switch(language) {
|
|
switch(language) {
|
|
@@ -10026,7 +10054,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|
|
if (profile != EEsProfile && version >= 460) {
|
|
if (profile != EEsProfile && version >= 460) {
|
|
|
symbolTable.relateToOperator("reportIntersectionNV", EOpReportIntersection);
|
|
symbolTable.relateToOperator("reportIntersectionNV", EOpReportIntersection);
|
|
|
symbolTable.relateToOperator("reportIntersectionEXT", EOpReportIntersection);
|
|
symbolTable.relateToOperator("reportIntersectionEXT", EOpReportIntersection);
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
break;
|
|
break;
|
|
|
case EShLangAnyHit:
|
|
case EShLangAnyHit:
|
|
|
if (profile != EEsProfile && version >= 460) {
|
|
if (profile != EEsProfile && version >= 460) {
|