Merge pull request #1595 from dgkoch/EXT_fragment_invocation_density
Implement GL_EXT_fragment_invocation_density
This commit is contained in:
commit
d7baecfab7
17 changed files with 214 additions and 11 deletions
|
|
@ -5939,6 +5939,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"bool gl_HelperInvocation;" // needs qualifier fixed later
|
||||
);
|
||||
|
||||
if (version >= 450)
|
||||
stageBuiltins[EShLangFragment].append( // GL_EXT_fragment_invocation_density
|
||||
"flat in ivec2 gl_FragSizeEXT;"
|
||||
"flat in int gl_FragInvocationCountEXT;"
|
||||
);
|
||||
|
||||
#ifdef AMD_EXTENSIONS
|
||||
if (version >= 450)
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
|
|
@ -5959,9 +5965,9 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
);
|
||||
if (version >= 450)
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
"flat in ivec2 gl_FragmentSizeNV;"
|
||||
"flat in ivec2 gl_FragmentSizeNV;" // GL_NV_shading_rate_image
|
||||
"flat in int gl_InvocationsPerPixelNV;"
|
||||
"in vec3 gl_BaryCoordNV;"
|
||||
"in vec3 gl_BaryCoordNV;" // GL_NV_fragment_shader_barycentric
|
||||
"in vec3 gl_BaryCoordNoPerspNV;"
|
||||
);
|
||||
|
||||
|
|
@ -6006,13 +6012,19 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
stageBuiltins[EShLangFragment].append(
|
||||
"highp float gl_FragDepthEXT;" // GL_EXT_frag_depth
|
||||
);
|
||||
|
||||
if (version >= 310)
|
||||
stageBuiltins[EShLangFragment].append( // GL_EXT_fragment_invocation_density
|
||||
"flat in ivec2 gl_FragSizeEXT;"
|
||||
"flat in int gl_FragInvocationCountEXT;"
|
||||
);
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (version >= 320)
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
stageBuiltins[EShLangFragment].append( // GL_NV_shading_rate_image
|
||||
"flat in ivec2 gl_FragmentSizeNV;"
|
||||
"flat in int gl_InvocationsPerPixelNV;"
|
||||
);
|
||||
if (version >= 320)
|
||||
if (version >= 320)
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
"in vec3 gl_BaryCoordNV;"
|
||||
"in vec3 gl_BaryCoordNoPerspNV;"
|
||||
|
|
@ -8342,6 +8354,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
}
|
||||
#endif
|
||||
|
||||
if ((profile != EEsProfile && version >= 450) ||
|
||||
(profile == EEsProfile && version >= 310)) {
|
||||
symbolTable.setVariableExtensions("gl_FragSizeEXT", 1, &E_GL_EXT_fragment_invocation_density);
|
||||
symbolTable.setVariableExtensions("gl_FragInvocationCountEXT", 1, &E_GL_EXT_fragment_invocation_density);
|
||||
BuiltInVariable("gl_FragSizeEXT", EbvFragSizeEXT, symbolTable);
|
||||
BuiltInVariable("gl_FragInvocationCountEXT", EbvFragInvocationCountEXT, symbolTable);
|
||||
}
|
||||
|
||||
symbolTable.setVariableExtensions("gl_FragDepthEXT", 1, &E_GL_EXT_frag_depth);
|
||||
|
||||
if (profile == EEsProfile && version < 320) {
|
||||
|
|
|
|||
|
|
@ -205,6 +205,7 @@ void TParseVersions::initializeExtensionBehavior()
|
|||
extensionBehavior[E_GL_EXT_nonuniform_qualifier] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_samplerless_texture_functions] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_scalar_block_layout] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_fragment_invocation_density] = EBhDisable;
|
||||
|
||||
extensionBehavior[E_GL_EXT_shader_16bit_storage] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_shader_8bit_storage] = EBhDisable;
|
||||
|
|
@ -380,6 +381,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
"#define GL_EXT_shader_8bit_storage 1\n"
|
||||
"#define GL_EXT_samplerless_texture_functions 1\n"
|
||||
"#define GL_EXT_scalar_block_layout 1\n"
|
||||
"#define GL_EXT_fragment_invocation_density 1\n"
|
||||
|
||||
// GL_KHR_shader_subgroup
|
||||
"#define GL_KHR_shader_subgroup_basic 1\n"
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ const char* const E_GL_EXT_control_flow_attributes = "GL_EXT_control_fl
|
|||
const char* const E_GL_EXT_nonuniform_qualifier = "GL_EXT_nonuniform_qualifier";
|
||||
const char* const E_GL_EXT_samplerless_texture_functions = "GL_EXT_samplerless_texture_functions";
|
||||
const char* const E_GL_EXT_scalar_block_layout = "GL_EXT_scalar_block_layout";
|
||||
const char* const E_GL_EXT_fragment_invocation_density = "GL_EXT_fragment_invocation_density";
|
||||
|
||||
// Arrays of extensions for the above viewportEXTs duplications
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue