gl: Remove flag test optimization as it does not work properly

- Most texture cache operations will break sampler state and the extra complexity is not worth the very small speed bump
This commit is contained in:
kd-11 2017-12-28 15:46:57 +03:00
parent 90f825aa49
commit 688569e5c8
1 changed files with 0 additions and 12 deletions

View File

@ -318,11 +318,6 @@ void GLGSRender::end()
if (m_program->uniforms.has_location("tex" + std::to_string(i), &unused_location)) if (m_program->uniforms.has_location("tex" + std::to_string(i), &unused_location))
{ {
auto sampler_state = static_cast<gl::texture_cache::sampled_image_descriptor*>(fs_sampler_state[i].get()); auto sampler_state = static_cast<gl::texture_cache::sampled_image_descriptor*>(fs_sampler_state[i].get());
if (sampler_state->flag)
continue;
sampler_state->flag = true;
auto &tex = rsx::method_registers.fragment_textures[i]; auto &tex = rsx::method_registers.fragment_textures[i];
glActiveTexture(GL_TEXTURE0 + i); glActiveTexture(GL_TEXTURE0 + i);
@ -338,7 +333,6 @@ void GLGSRender::end()
{ {
void *unused = nullptr; void *unused = nullptr;
glBindTexture(target, m_gl_texture_cache.create_temporary_subresource(unused, sampler_state->external_subresource_desc)); glBindTexture(target, m_gl_texture_cache.create_temporary_subresource(unused, sampler_state->external_subresource_desc));
sampler_state->flag = false;
} }
else else
{ {
@ -357,11 +351,6 @@ void GLGSRender::end()
if (m_program->uniforms.has_location("vtex" + std::to_string(i), &unused_location)) if (m_program->uniforms.has_location("vtex" + std::to_string(i), &unused_location))
{ {
auto sampler_state = static_cast<gl::texture_cache::sampled_image_descriptor*>(vs_sampler_state[i].get()); auto sampler_state = static_cast<gl::texture_cache::sampled_image_descriptor*>(vs_sampler_state[i].get());
if (sampler_state->flag)
continue;
sampler_state->flag = true;
glActiveTexture(GL_TEXTURE0 + rsx::limits::fragment_textures_count + i); glActiveTexture(GL_TEXTURE0 + rsx::limits::fragment_textures_count + i);
if (sampler_state->image_handle) if (sampler_state->image_handle)
@ -372,7 +361,6 @@ void GLGSRender::end()
{ {
void *unused = nullptr; void *unused = nullptr;
glBindTexture(GL_TEXTURE_2D, m_gl_texture_cache.create_temporary_subresource(unused, sampler_state->external_subresource_desc)); glBindTexture(GL_TEXTURE_2D, m_gl_texture_cache.create_temporary_subresource(unused, sampler_state->external_subresource_desc));
sampler_state->flag = false;
} }
else else
{ {