From eff4e95c99d7842fad516b0923948240ddae3664 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Thu, 17 Oct 2019 23:30:49 +0300 Subject: [PATCH] rsx: Minor cache fixup for cyclic references. - Logic was broken by mipmaps PR. Do not issue a texture barrier if a temp copy is being done. --- rpcs3/Emu/RSX/Common/texture_cache.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/Common/texture_cache.h b/rpcs3/Emu/RSX/Common/texture_cache.h index e0c97de3c4..db51e54fd1 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache.h +++ b/rpcs3/Emu/RSX/Common/texture_cache.h @@ -1494,10 +1494,13 @@ namespace rsx auto result = texture_cache_helpers::process_framebuffer_resource_fast( cmd, texptr, attr, scale, extended_dimension, encoded_remap, remap, true, force_convert); - if (!options.skip_texture_barriers) + if (!options.skip_texture_barriers && result.is_cyclic_reference) { + // A texture barrier is only necessary when the rendertarget is going to be bound as a shader input. + // If a temporary copy is to be made, this should not be invoked insert_texture_barrier(cmd, texptr); } + return result; } }