From f0b00c1ae92a2e8fdff9c532e7f2f79ad708b184 Mon Sep 17 00:00:00 2001 From: riperiperi Date: Thu, 2 Sep 2021 04:17:43 +0100 Subject: Fix TXQ for 3D textures. (#2613) * Fix TXQ for 3D textures. Assumes the texture is 3D if the component mask contains Z. This fixes a bug in UE4 games where parts of the map had garbage pointers to lighting voxels, as the lookup 3D texture was not being initialized. Most notable game is THPS1+2. May need another PR to keep image store data alive and properly flush it in order using the AutoDeleteCache. * Get sampler type for TextureSize from bound textures. --- Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs') diff --git a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs index 7d3246db..72fa7733 100644 --- a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs +++ b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs @@ -294,7 +294,7 @@ namespace Ryujinx.Graphics.Shader.Translation inst &= Instruction.Mask; bool isImage = inst == Instruction.ImageLoad || inst == Instruction.ImageStore || inst == Instruction.ImageAtomic; bool isWrite = inst == Instruction.ImageStore || inst == Instruction.ImageAtomic; - bool accurateType = inst != Instruction.TextureSize && inst != Instruction.Lod; + bool accurateType = inst != Instruction.Lod; if (isImage) { -- cgit v1.2.3