From 4709aeaf06fea2c7d501298fb46a13700dfdc769 Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Tue, 25 Jan 2022 00:36:13 -0600 Subject: [PATCH] GS:MTL: Only bind rt if needed Reduces barriers making AMD gpus happy --- pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm b/pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm index b41c119b4108b..8da8a6a75c7af 100644 --- a/pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm +++ b/pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm @@ -1585,7 +1585,8 @@ static API_AVAILABLE(macos(10.13)) id getTexture(GSTexture* tex) SetTexture(enc, config.tex, GSMTLTextureIndexTex); SetTexture(enc, config.pal, GSMTLTextureIndexPalette); SetTexture(enc, config.raw_tex, GSMTLTextureIndexRawTex); - SetTexture(enc, config.rt, GSMTLTextureIndexRenderTarget); + if (config.require_one_barrier || config.require_full_barrier) + SetTexture(enc, config.rt, GSMTLTextureIndexRenderTarget); SetSampler(enc, config.sampler); if (config.blend.index && config.blend.is_constant) enc.SetBlendColor(config.blend.factor);