Add support for extension GL_ARB_texture_query_lod. (#2194)
This commit is contained in:
parent
b858d41964
commit
f03cb290ac
7 changed files with 192 additions and 49 deletions
|
|
@ -5843,9 +5843,9 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int
|
|||
|
||||
//
|
||||
// textureQueryLod(), fragment stage only
|
||||
//
|
||||
// Also enabled with extension GL_ARB_texture_query_lod
|
||||
|
||||
if (profile != EEsProfile && version >= 400 && sampler.isCombined() && sampler.dim != EsdRect &&
|
||||
if (profile != EEsProfile && version >= 150 && sampler.isCombined() && sampler.dim != EsdRect &&
|
||||
! sampler.isMultiSample() && ! sampler.isBuffer()) {
|
||||
for (int f16TexAddr = 0; f16TexAddr < 2; ++f16TexAddr) {
|
||||
if (f16TexAddr && sampler.type != EbtFloat16)
|
||||
|
|
@ -7549,6 +7549,10 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
BuiltInVariable("gl_FragStencilRefARB", EbvFragStencilRef, symbolTable);
|
||||
}
|
||||
|
||||
if (profile != EEsProfile && version < 400) {
|
||||
symbolTable.setFunctionExtensions("textureQueryLod", 1, &E_GL_ARB_texture_query_lod);
|
||||
}
|
||||
|
||||
if (profile != EEsProfile && version >= 460) {
|
||||
symbolTable.setFunctionExtensions("rayQueryInitializeEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryTerminateEXT", 1, &E_GL_EXT_ray_query);
|
||||
|
|
@ -8065,6 +8069,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_ARB_compute_shader);
|
||||
}
|
||||
|
||||
|
||||
symbolTable.setFunctionExtensions("controlBarrier", 1, &E_GL_KHR_memory_scope_semantics);
|
||||
symbolTable.setFunctionExtensions("debugPrintfEXT", 1, &E_GL_EXT_debug_printf);
|
||||
|
||||
|
|
|
|||
|
|
@ -201,6 +201,7 @@ void TParseVersions::initializeExtensionBehavior()
|
|||
extensionBehavior[E_GL_ARB_shader_image_size] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_shader_storage_buffer_object] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_shading_language_packing] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_texture_query_lod] = EBhDisable;
|
||||
|
||||
extensionBehavior[E_GL_KHR_shader_subgroup_basic] = EBhDisable;
|
||||
extensionBehavior[E_GL_KHR_shader_subgroup_vote] = EBhDisable;
|
||||
|
|
@ -417,6 +418,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
"#define GL_ARB_uniform_buffer_object 1\n"
|
||||
"#define GL_ARB_shader_bit_encoding 1\n"
|
||||
"#define GL_ARB_shader_storage_buffer_object 1\n"
|
||||
"#define GL_ARB_texture_query_lod 1\n"
|
||||
"#define GL_EXT_shader_non_constant_global_initializers 1\n"
|
||||
"#define GL_EXT_shader_image_load_formatted 1\n"
|
||||
"#define GL_EXT_post_depth_coverage 1\n"
|
||||
|
|
|
|||
|
|
@ -156,6 +156,7 @@ const char* const E_GL_ARB_shader_bit_encoding = "GL_ARB_shader_bit_enc
|
|||
const char* const E_GL_ARB_shader_image_size = "GL_ARB_shader_image_size";
|
||||
const char* const E_GL_ARB_shader_storage_buffer_object = "GL_ARB_shader_storage_buffer_object";
|
||||
const char* const E_GL_ARB_shading_language_packing = "GL_ARB_shading_language_packing";
|
||||
const char* const E_GL_ARB_texture_query_lod = "GL_ARB_texture_query_lod";
|
||||
|
||||
const char* const E_GL_KHR_shader_subgroup_basic = "GL_KHR_shader_subgroup_basic";
|
||||
const char* const E_GL_KHR_shader_subgroup_vote = "GL_KHR_shader_subgroup_vote";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue