extension: GL_QCOM_image_processing support
This commit is contained in:
parent
4e7ccd4af5
commit
db8719ae07
24 changed files with 939 additions and 5 deletions
|
|
@ -1100,6 +1100,12 @@ enum TOperator {
|
|||
// Shader tile image ops
|
||||
EOpStencilAttachmentReadEXT, // Fragment only
|
||||
EOpDepthAttachmentReadEXT, // Fragment only
|
||||
|
||||
// Image processing
|
||||
EOpImageSampleWeightedQCOM,
|
||||
EOpImageBoxFilterQCOM,
|
||||
EOpImageBlockMatchSADQCOM,
|
||||
EOpImageBlockMatchSSDQCOM,
|
||||
};
|
||||
|
||||
class TIntermTraverser;
|
||||
|
|
|
|||
|
|
@ -4135,6 +4135,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.
|
||||
|
|
@ -4624,7 +4636,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"uvec4 fragmentFetchAMD(usubpassInputMS, uint);"
|
||||
|
||||
"\n");
|
||||
}
|
||||
}
|
||||
|
||||
// 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
|
||||
|
|
@ -8095,7 +8107,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable);
|
||||
}
|
||||
|
||||
if (profile != EEsProfile) {
|
||||
if (profile != EEsProfile) {
|
||||
BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable);
|
||||
BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable);
|
||||
BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable);
|
||||
|
|
@ -8725,6 +8737,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.setFunctionExtensions("stencilAttachmentReadEXT", 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);
|
||||
|
||||
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;
|
||||
|
||||
case EShLangCompute:
|
||||
|
|
@ -9890,6 +9910,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.relateToOperator("shadow2DEXT", EOpTexture);
|
||||
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) {
|
||||
|
|
@ -10030,7 +10058,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
if (profile != EEsProfile && version >= 460) {
|
||||
symbolTable.relateToOperator("reportIntersectionNV", EOpReportIntersection);
|
||||
symbolTable.relateToOperator("reportIntersectionEXT", EOpReportIntersection);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EShLangAnyHit:
|
||||
if (profile != EEsProfile && version >= 460) {
|
||||
|
|
|
|||
|
|
@ -307,6 +307,9 @@ void TParseVersions::initializeExtensionBehavior()
|
|||
// ARM
|
||||
extensionBehavior[E_GL_ARM_shader_core_builtins] = EBhDisable;
|
||||
|
||||
// QCOM
|
||||
extensionBehavior[E_GL_QCOM_image_processing] = EBhDisable;
|
||||
|
||||
// AEP
|
||||
extensionBehavior[E_GL_ANDROID_extension_pack_es31a] = EBhDisable;
|
||||
extensionBehavior[E_GL_KHR_blend_equation_advanced] = EBhDisable;
|
||||
|
|
@ -431,6 +434,8 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
"#define GL_OES_texture_buffer 1\n"
|
||||
"#define GL_OES_texture_cube_map_array 1\n"
|
||||
"#define GL_EXT_shader_non_constant_global_initializers 1\n"
|
||||
|
||||
"#define GL_QCOM_image_processing 1\n"
|
||||
;
|
||||
|
||||
if (version >= 300) {
|
||||
|
|
@ -555,6 +560,8 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
"#define GL_NV_integer_cooperative_matrix 1\n"
|
||||
"#define GL_NV_shader_invocation_reorder 1\n"
|
||||
|
||||
"#define GL_QCOM_image_processing 1\n"
|
||||
|
||||
"#define GL_EXT_shader_explicit_arithmetic_types 1\n"
|
||||
"#define GL_EXT_shader_explicit_arithmetic_types_int8 1\n"
|
||||
"#define GL_EXT_shader_explicit_arithmetic_types_int16 1\n"
|
||||
|
|
|
|||
|
|
@ -281,6 +281,8 @@ const char* const E_GL_NV_shader_sm_builtins = "GL_NV_shader_
|
|||
const char* const E_GL_NV_integer_cooperative_matrix = "GL_NV_integer_cooperative_matrix";
|
||||
const char* const E_GL_NV_shader_invocation_reorder = "GL_NV_shader_invocation_reorder";
|
||||
|
||||
const char* const E_GL_QCOM_image_processing = "GL_QCOM_image_processing";
|
||||
|
||||
// AEP
|
||||
const char* const E_GL_ANDROID_extension_pack_es31a = "GL_ANDROID_extension_pack_es31a";
|
||||
const char* const E_GL_KHR_blend_equation_advanced = "GL_KHR_blend_equation_advanced";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue