diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/regs.h | 2 | ||||
-rw-r--r-- | src/video_core/regs_texturing.h | 8 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 4 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_gen.cpp | 2 | ||||
-rw-r--r-- | src/video_core/swrasterizer/rasterizer.cpp | 3 |
5 files changed, 12 insertions, 7 deletions
diff --git a/src/video_core/regs.h b/src/video_core/regs.h index 86826088b..1776dad89 100644 --- a/src/video_core/regs.h +++ b/src/video_core/regs.h @@ -93,7 +93,7 @@ ASSERT_REG_POSITION(rasterizer.viewport_corner, 0x68); ASSERT_REG_POSITION(rasterizer.depthmap_enable, 0x6D); ASSERT_REG_POSITION(texturing, 0x80); -ASSERT_REG_POSITION(texturing.texture0_enable, 0x80); +ASSERT_REG_POSITION(texturing.main_config, 0x80); ASSERT_REG_POSITION(texturing.texture0, 0x81); ASSERT_REG_POSITION(texturing.texture0_format, 0x8e); ASSERT_REG_POSITION(texturing.fragment_lighting_enable, 0x8f); diff --git a/src/video_core/regs_texturing.h b/src/video_core/regs_texturing.h index 515848bd6..8a7c6efe4 100644 --- a/src/video_core/regs_texturing.h +++ b/src/video_core/regs_texturing.h @@ -126,7 +126,7 @@ struct TexturingRegs { BitField<10, 1, u32> texture3_enable; // TODO: unimplemented BitField<13, 1, u32> texture2_use_coord1; BitField<16, 1, u32> clear_texture_cache; // TODO: unimplemented - }; + } main_config; TextureConfig texture0; INSERT_PADDING_WORDS(0x8); BitField<0, 4, TextureFormat> texture0_format; @@ -146,9 +146,9 @@ struct TexturingRegs { }; const std::array<FullTextureConfig, 3> GetTextures() const { return {{ - {texture0_enable.ToBool(), texture0, texture0_format}, - {texture1_enable.ToBool(), texture1, texture1_format}, - {texture2_enable.ToBool(), texture2, texture2_format}, + {main_config.texture0_enable.ToBool(), texture0, texture0_format}, + {main_config.texture1_enable.ToBool(), texture1, texture1_format}, + {main_config.texture2_enable.ToBool(), texture2, texture2_format}, }}; } diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index a47307099..12ac9bbd9 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -402,6 +402,10 @@ void RasterizerOpenGL::NotifyPicaRegisterChanged(u32 id) { SyncLogicOp(); break; + case PICA_REG_INDEX(texturing.main_config): + shader_dirty = true; + break; + // Texture 0 type case PICA_REG_INDEX(texturing.texture0.type): shader_dirty = true; diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 5077e38b7..7b44dade8 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -40,7 +40,7 @@ PicaShaderConfig PicaShaderConfig::BuildFromRegs(const Pica::Regs& regs) { state.texture0_type = regs.texturing.texture0.type; - state.texture2_use_coord1 = regs.texturing.texture2_use_coord1 != 0; + state.texture2_use_coord1 = regs.texturing.main_config.texture2_use_coord1 != 0; // Copy relevant tev stages fields. // We don't sync const_color here because of the high variance, it is a 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(); |