From 0f664ef89d68bb008c386680a7b1d747d50ac698 Mon Sep 17 00:00:00 2001 From: wwylele Date: Wed, 3 May 2017 19:59:48 +0300 Subject: pica: use correct coordinates for texture 2 --- src/video_core/swrasterizer/rasterizer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/video_core/swrasterizer/rasterizer.cpp') diff --git a/src/video_core/swrasterizer/rasterizer.cpp b/src/video_core/swrasterizer/rasterizer.cpp index cb1b90a81..fa8377f80 100644 --- a/src/video_core/swrasterizer/rasterizer.cpp +++ b/src/video_core/swrasterizer/rasterizer.cpp @@ -276,8 +276,9 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve DEBUG_ASSERT(0 != texture.config.address); - float24 u = uv[i].u(); - float24 v = uv[i].v(); + int coordinate_i = (i == 2 && regs.texturing.texture2_use_coord1) ? 1 : i; + float24 u = uv[coordinate_i].u(); + float24 v = uv[coordinate_i].v(); // Only unit 0 respects the texturing type (according to 3DBrew) // TODO: Refactor so cubemaps and shadowmaps can be handled -- cgit v1.2.3 From 039b2930928c34c011fcc236d7f8c32599077ad0 Mon Sep 17 00:00:00 2001 From: wwylele Date: Fri, 5 May 2017 15:29:35 +0300 Subject: pica: shader_dirty if texture2 coord changed --- src/video_core/swrasterizer/rasterizer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/video_core/swrasterizer/rasterizer.cpp') diff --git a/src/video_core/swrasterizer/rasterizer.cpp b/src/video_core/swrasterizer/rasterizer.cpp index fa8377f80..20addf0bd 100644 --- a/src/video_core/swrasterizer/rasterizer.cpp +++ b/src/video_core/swrasterizer/rasterizer.cpp @@ -276,7 +276,8 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve DEBUG_ASSERT(0 != texture.config.address); - int coordinate_i = (i == 2 && regs.texturing.texture2_use_coord1) ? 1 : i; + int coordinate_i = + (i == 2 && regs.texturing.main_config.texture2_use_coord1) ? 1 : i; float24 u = uv[coordinate_i].u(); float24 v = uv[coordinate_i].v(); -- cgit v1.2.3