rsx: Minor optimization - dont update sampler state if texture state registers have not changed

This commit is contained in:
kd-11 2017-11-03 21:09:29 +03:00
parent 75504b3f5e
commit 0d35363ea0
2 changed files with 4 additions and 2 deletions

View file

@ -250,7 +250,9 @@ void GLGSRender::end()
if (rsx::method_registers.fragment_textures[i].enabled())
{
*sampler_state = m_gl_texture_cache.upload_texture(unused, rsx::method_registers.fragment_textures[i], m_rtts);
m_gl_sampler_states[i].apply(rsx::method_registers.fragment_textures[i]);
if (m_textures_dirty[i])
m_gl_sampler_states[i].apply(rsx::method_registers.fragment_textures[i]);
}
else
{

View file

@ -1101,7 +1101,7 @@ void VKGSRender::end()
mip_mode = VK_SAMPLER_MIPMAP_MODE_NEAREST;
}
if (fs_sampler_handles[i])
if (fs_sampler_handles[i] && m_textures_dirty[i])
{
if (!fs_sampler_handles[i]->matches(wrap_s, wrap_t, wrap_r, false, lod_bias, af_level, min_lod, max_lod,
min_filter, mag_filter, mip_mode, border_color, fs_sampler_state[i]->is_depth_texture, depth_compare))