mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 03:47:07 -05:00
Removed glsl-optimizer texture LOD workarounds.
This commit is contained in:
parent
f186c7eeaa
commit
567701c750
1 changed files with 6 additions and 3 deletions
|
@ -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.
|
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 *precStrings[3] = {"lowp", "mediump", "highp"};
|
||||||
static const char *precNameStrings[3] = { "low_", "medium_", "high_" };
|
static const char *precNameStrings[3] = { "low_", "medium_", "high_" };
|
||||||
|
@ -283,7 +283,9 @@ _mesa_print_ir_glsl(exec_list *instructions,
|
||||||
|
|
||||||
delete ls;
|
delete ls;
|
||||||
|
|
||||||
|
#if 0 // BK - disable LOD workarounds.
|
||||||
print_texlod_workarounds(uses_texlod_impl, uses_texlodproj_impl, str);
|
print_texlod_workarounds(uses_texlod_impl, uses_texlodproj_impl, str);
|
||||||
|
#endif // 0
|
||||||
|
|
||||||
// Add the optimized glsl code
|
// Add the optimized glsl code
|
||||||
str.asprintf_append("%s", body.c_str());
|
str.asprintf_append("%s", body.c_str());
|
||||||
|
@ -821,7 +823,8 @@ void ir_print_glsl_visitor::visit(ir_texture *ir)
|
||||||
sampler_uv_dim += 1;
|
sampler_uv_dim += 1;
|
||||||
const bool is_proj = (uv_dim > sampler_uv_dim);
|
const bool is_proj = (uv_dim > sampler_uv_dim);
|
||||||
const bool is_lod = (ir->op == ir_txl);
|
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)
|
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.
|
// 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
|
else
|
||||||
uses_texlod_impl |= (1 << position);
|
uses_texlod_impl |= (1 << position);
|
||||||
}
|
}
|
||||||
|
#endif // 0
|
||||||
|
|
||||||
|
|
||||||
// texture function name
|
// texture function name
|
||||||
//ACS: shadow lookups and lookups with dimensionality included in the name were deprecated in 130
|
//ACS: shadow lookups and lookups with dimensionality included in the name were deprecated in 130
|
||||||
if(state->language_version<130)
|
if(state->language_version<130)
|
||||||
|
|
Loading…
Reference in a new issue