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); | |||
| 93 | ASSERT_REG_POSITION(rasterizer.depthmap_enable, 0x6D); | 93 | ASSERT_REG_POSITION(rasterizer.depthmap_enable, 0x6D); |
| 94 | 94 | ||
| 95 | ASSERT_REG_POSITION(texturing, 0x80); | 95 | ASSERT_REG_POSITION(texturing, 0x80); |
| 96 | ASSERT_REG_POSITION(texturing.texture0_enable, 0x80); | 96 | ASSERT_REG_POSITION(texturing.main_config, 0x80); |
| 97 | ASSERT_REG_POSITION(texturing.texture0, 0x81); | 97 | ASSERT_REG_POSITION(texturing.texture0, 0x81); |
| 98 | ASSERT_REG_POSITION(texturing.texture0_format, 0x8e); | 98 | ASSERT_REG_POSITION(texturing.texture0_format, 0x8e); |
| 99 | ASSERT_REG_POSITION(texturing.fragment_lighting_enable, 0x8f); | 99 | 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 { | |||
| 126 | BitField<10, 1, u32> texture3_enable; // TODO: unimplemented | 126 | BitField<10, 1, u32> texture3_enable; // TODO: unimplemented |
| 127 | BitField<13, 1, u32> texture2_use_coord1; | 127 | BitField<13, 1, u32> texture2_use_coord1; |
| 128 | BitField<16, 1, u32> clear_texture_cache; // TODO: unimplemented | 128 | BitField<16, 1, u32> clear_texture_cache; // TODO: unimplemented |
| 129 | }; | 129 | } main_config; |
| 130 | TextureConfig texture0; | 130 | TextureConfig texture0; |
| 131 | INSERT_PADDING_WORDS(0x8); | 131 | INSERT_PADDING_WORDS(0x8); |
| 132 | BitField<0, 4, TextureFormat> texture0_format; | 132 | BitField<0, 4, TextureFormat> texture0_format; |
| @@ -146,9 +146,9 @@ struct TexturingRegs { | |||
| 146 | }; | 146 | }; |
| 147 | const std::array<FullTextureConfig, 3> GetTextures() const { | 147 | const std::array<FullTextureConfig, 3> GetTextures() const { |
| 148 | return {{ | 148 | return {{ |
| 149 | {texture0_enable.ToBool(), texture0, texture0_format}, | 149 | {main_config.texture0_enable.ToBool(), texture0, texture0_format}, |
| 150 | {texture1_enable.ToBool(), texture1, texture1_format}, | 150 | {main_config.texture1_enable.ToBool(), texture1, texture1_format}, |
| 151 | {texture2_enable.ToBool(), texture2, texture2_format}, | 151 | {main_config.texture2_enable.ToBool(), texture2, texture2_format}, |
| 152 | }}; | 152 | }}; |
| 153 | } | 153 | } |
| 154 | 154 | ||
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) { | |||
| 402 | SyncLogicOp(); | 402 | SyncLogicOp(); |
| 403 | break; | 403 | break; |
| 404 | 404 | ||
| 405 | case PICA_REG_INDEX(texturing.main_config): | ||
| 406 | shader_dirty = true; | ||
| 407 | break; | ||
| 408 | |||
| 405 | // Texture 0 type | 409 | // Texture 0 type |
| 406 | case PICA_REG_INDEX(texturing.texture0.type): | 410 | case PICA_REG_INDEX(texturing.texture0.type): |
| 407 | shader_dirty = true; | 411 | 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) { | |||
| 40 | 40 | ||
| 41 | state.texture0_type = regs.texturing.texture0.type; | 41 | state.texture0_type = regs.texturing.texture0.type; |
| 42 | 42 | ||
| 43 | state.texture2_use_coord1 = regs.texturing.texture2_use_coord1 != 0; | 43 | state.texture2_use_coord1 = regs.texturing.main_config.texture2_use_coord1 != 0; |
| 44 | 44 | ||
| 45 | // Copy relevant tev stages fields. | 45 | // Copy relevant tev stages fields. |
| 46 | // We don't sync const_color here because of the high variance, it is a | 46 | // 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 | |||
| 276 | 276 | ||
| 277 | DEBUG_ASSERT(0 != texture.config.address); | 277 | DEBUG_ASSERT(0 != texture.config.address); |
| 278 | 278 | ||
| 279 | int coordinate_i = (i == 2 && regs.texturing.texture2_use_coord1) ? 1 : i; | 279 | int coordinate_i = |
| 280 | (i == 2 && regs.texturing.main_config.texture2_use_coord1) ? 1 : i; | ||
| 280 | float24 u = uv[coordinate_i].u(); | 281 | float24 u = uv[coordinate_i].u(); |
| 281 | float24 v = uv[coordinate_i].v(); | 282 | float24 v = uv[coordinate_i].v(); |
| 282 | 283 | ||