diff --git a/rpcs3/Emu/RSX/Common/TextureUtils.h b/rpcs3/Emu/RSX/Common/TextureUtils.h index 1cc9c21248..eb64410418 100644 --- a/rpcs3/Emu/RSX/Common/TextureUtils.h +++ b/rpcs3/Emu/RSX/Common/TextureUtils.h @@ -159,6 +159,15 @@ namespace rsx bool host_snorm_format_active() const { return host_features & RSX_HOST_FORMAT_FEATURE_SNORM; } bool host_srgb_format_active() const { return host_features & RSX_HOST_FORMAT_FEATURE_SRGB; } + operator bool() const { return valid(); } + + bool operator == (const texture_format_ex& that) const + { + return this->format_bits == that.format_bits && + this->features == that.features && + this->host_features == that.host_features; + } + //private: u32 format_bits = 0; u32 features = 0; diff --git a/rpcs3/Emu/RSX/GL/GLDraw.cpp b/rpcs3/Emu/RSX/GL/GLDraw.cpp index 10e5f6da31..940534cdea 100644 --- a/rpcs3/Emu/RSX/GL/GLDraw.cpp +++ b/rpcs3/Emu/RSX/GL/GLDraw.cpp @@ -342,7 +342,7 @@ void GLGSRender::load_texture_env() m_graphics_state |= rsx::fragment_program_state_dirty; } - if (m_fs_sampler_states[i]) + if (sampler_state->format_ex) { // Nothing to change, use cached sampler continue; diff --git a/rpcs3/Emu/RSX/VK/VKDraw.cpp b/rpcs3/Emu/RSX/VK/VKDraw.cpp index 2e62edd331..c0cb429593 100644 --- a/rpcs3/Emu/RSX/VK/VKDraw.cpp +++ b/rpcs3/Emu/RSX/VK/VKDraw.cpp @@ -334,7 +334,7 @@ void VKGSRender::load_texture_env() m_graphics_state |= rsx::fragment_program_state_dirty; } - if (fs_sampler_handles[i]) + if (sampler_state->format_ex) { // Nothing to change, use cached sampler continue;