From 122ccca50e3508905aff79200e5ada12308275eb Mon Sep 17 00:00:00 2001 From: kd-11 Date: Tue, 31 Mar 2026 00:13:25 +0300 Subject: [PATCH] rsx: Propagate texture flags when MSAA sampling is required --- rpcs3/Emu/RSX/Program/GLSLCommon.cpp | 5 +++++ .../Program/GLSLSnippets/RSXProg/RSXFragmentTextureOps.glsl | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/Program/GLSLCommon.cpp b/rpcs3/Emu/RSX/Program/GLSLCommon.cpp index 28cbaa61f0..febb5c93bd 100644 --- a/rpcs3/Emu/RSX/Program/GLSLCommon.cpp +++ b/rpcs3/Emu/RSX/Program/GLSLCommon.cpp @@ -418,6 +418,11 @@ namespace glsl enabled_options.push_back("_ENABLE_DEPTH_FORMAT_RECONSTRUCTION"); } + if (props.require_msaa_ops) + { + enabled_options.push_back("_ENABLE_TEXTURE_MULTISAMPLE"); + } + program_common::define_glsl_switches(OS, enabled_options); enabled_options.clear(); diff --git a/rpcs3/Emu/RSX/Program/GLSLSnippets/RSXProg/RSXFragmentTextureOps.glsl b/rpcs3/Emu/RSX/Program/GLSLSnippets/RSXProg/RSXFragmentTextureOps.glsl index aaf4dc434a..19f3ff3f9c 100644 --- a/rpcs3/Emu/RSX/Program/GLSLSnippets/RSXProg/RSXFragmentTextureOps.glsl +++ b/rpcs3/Emu/RSX/Program/GLSLSnippets/RSXProg/RSXFragmentTextureOps.glsl @@ -46,7 +46,7 @@ R"( _texture_bx2_active = false; \ } while (false) #define TEX_FLAGS(index) ((TEX_PARAM(index).flags & ~(_texture_flag_erase)) | _texture_flag_override) -#elif defined(_ENABLE_TEXTURE_ALPHA_KILL) || defined(_ENABLE_FORMAT_CONVERSION) || defined(_ENABLE_DEPTH_FORMAT_RECONSTRUCTION) +#elif defined(_ENABLE_TEXTURE_ALPHA_KILL) || defined(_ENABLE_FORMAT_CONVERSION) || defined(_ENABLE_DEPTH_FORMAT_RECONSTRUCTION) || defined(_ENABLE_TEXTURE_MULTISAMPLE) #define TEX_FLAGS(index) (TEX_PARAM(index).flags) #else #define TEX_FLAGS(index) 0