mirror of https://github.com/bkaradzic/bgfx
Removed glsl-optimizer texture LOD workarounds.
This commit is contained in:
parent
f186c7eeaa
commit
567701c750
|
@ -160,7 +160,7 @@ public:
|
|||
int uses_texlodproj_impl; // 3 bits per tex_dimension, bit set for each precision if any texture sampler needs the GLES2 lod workaround.
|
||||
};
|
||||
|
||||
static void print_texlod_workarounds(int usage_bitfield, int usage_proj_bitfield, string_buffer &str)
|
||||
void print_texlod_workarounds(int usage_bitfield, int usage_proj_bitfield, string_buffer &str)
|
||||
{
|
||||
static const char *precStrings[3] = {"lowp", "mediump", "highp"};
|
||||
static const char *precNameStrings[3] = { "low_", "medium_", "high_" };
|
||||
|
@ -283,7 +283,9 @@ _mesa_print_ir_glsl(exec_list *instructions,
|
|||
|
||||
delete ls;
|
||||
|
||||
#if 0 // BK - disable LOD workarounds.
|
||||
print_texlod_workarounds(uses_texlod_impl, uses_texlodproj_impl, str);
|
||||
#endif // 0
|
||||
|
||||
// Add the optimized glsl code
|
||||
str.asprintf_append("%s", body.c_str());
|
||||
|
@ -821,7 +823,8 @@ void ir_print_glsl_visitor::visit(ir_texture *ir)
|
|||
sampler_uv_dim += 1;
|
||||
const bool is_proj = (uv_dim > sampler_uv_dim);
|
||||
const bool is_lod = (ir->op == ir_txl);
|
||||
|
||||
|
||||
#if 0 // BK - disable LOD workarounds.
|
||||
if (is_lod && state->es_shader && state->language_version < 300 && state->stage == MESA_SHADER_FRAGMENT)
|
||||
{
|
||||
// Special workaround for GLES 2.0 LOD samplers to prevent a lot of debug spew.
|
||||
|
@ -850,8 +853,8 @@ void ir_print_glsl_visitor::visit(ir_texture *ir)
|
|||
else
|
||||
uses_texlod_impl |= (1 << position);
|
||||
}
|
||||
#endif // 0
|
||||
|
||||
|
||||
// texture function name
|
||||
//ACS: shadow lookups and lookups with dimensionality included in the name were deprecated in 130
|
||||
if(state->language_version<130)
|
||||
|
|
Loading…
Reference in New Issue