mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 20:15:27 +00:00
rsx: Minor optimization - dont update sampler state if texture state registers have not changed
This commit is contained in:
parent
75504b3f5e
commit
0d35363ea0
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue