diff options
Diffstat (limited to '3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/builtin_functions.cpp')
-rw-r--r-- | 3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/builtin_functions.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/builtin_functions.cpp b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/builtin_functions.cpp index c7931fab7a4..531fe72c1d3 100644 --- a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/builtin_functions.cpp +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/builtin_functions.cpp @@ -3830,21 +3830,6 @@ builtin_builder::_all(const glsl_type *type) UNOP(not, ir_unop_logic_not, always_available) -static bool -has_lod(const glsl_type *sampler_type) -{ - assert(sampler_type->is_sampler()); - - switch (sampler_type->sampler_dimensionality) { - case GLSL_SAMPLER_DIM_RECT: - case GLSL_SAMPLER_DIM_BUF: - case GLSL_SAMPLER_DIM_MS: - return false; - default: - return true; - } -} - ir_function_signature * builtin_builder::_textureSize(builtin_available_predicate avail, const glsl_type *return_type, @@ -3857,7 +3842,7 @@ builtin_builder::_textureSize(builtin_available_predicate avail, ir_texture *tex = new(mem_ctx) ir_texture(ir_txs); tex->set_sampler(new(mem_ctx) ir_dereference_variable(s), return_type); - if (has_lod(sampler_type)) { + if (ir_texture::has_lod(sampler_type)) { ir_variable *lod = in_var(glsl_type::int_type, "lod"); sig->parameters.push_tail(lod); tex->lod_info.lod = var_ref(lod); @@ -4017,7 +4002,7 @@ builtin_builder::_texelFetch(builtin_available_predicate avail, sig->parameters.push_tail(sample); tex->lod_info.sample_index = var_ref(sample); tex->op = ir_txf_ms; - } else if (has_lod(sampler_type)) { + } else if (ir_texture::has_lod(sampler_type)) { ir_variable *lod = in_var(glsl_type::int_type, "lod"); sig->parameters.push_tail(lod); tex->lod_info.lod = var_ref(lod); |