diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_manager.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_manager.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_manager.cpp b/src/video_core/renderer_opengl/gl_shader_manager.cpp index a670855b0..eaf3e03a0 100644 --- a/src/video_core/renderer_opengl/gl_shader_manager.cpp +++ b/src/video_core/renderer_opengl/gl_shader_manager.cpp | |||
| @@ -6,6 +6,8 @@ | |||
| 6 | 6 | ||
| 7 | namespace OpenGL::GLShader { | 7 | namespace OpenGL::GLShader { |
| 8 | 8 | ||
| 9 | using Tegra::Engines::Maxwell3D; | ||
| 10 | |||
| 9 | void MaxwellUniformData::SetFromRegs(const Maxwell3D& maxwell, std::size_t shader_stage) { | 11 | void MaxwellUniformData::SetFromRegs(const Maxwell3D& maxwell, std::size_t shader_stage) { |
| 10 | const auto& regs = maxwell.regs; | 12 | const auto& regs = maxwell.regs; |
| 11 | const auto& state = maxwell.state; | 13 | const auto& state = maxwell.state; |
| @@ -16,7 +18,7 @@ void MaxwellUniformData::SetFromRegs(const Maxwell3D& maxwell, std::size_t shade | |||
| 16 | 18 | ||
| 17 | u32 func = static_cast<u32>(regs.alpha_test_func); | 19 | u32 func = static_cast<u32>(regs.alpha_test_func); |
| 18 | // Normalize the gl variants of opCompare to be the same as the normal variants | 20 | // Normalize the gl variants of opCompare to be the same as the normal variants |
| 19 | u32 op_gl_variant_base = static_cast<u32>(Tegra::Engines::Maxwell3D::Regs::ComparisonOp::Never); | 21 | const u32 op_gl_variant_base = static_cast<u32>(Maxwell3D::Regs::ComparisonOp::Never); |
| 20 | if (func >= op_gl_variant_base) { | 22 | if (func >= op_gl_variant_base) { |
| 21 | func = func - op_gl_variant_base + 1U; | 23 | func = func - op_gl_variant_base + 1U; |
| 22 | } | 24 | } |
diff --git a/src/video_core/renderer_opengl/gl_shader_manager.h b/src/video_core/renderer_opengl/gl_shader_manager.h index 98217eed6..8eef2a920 100644 --- a/src/video_core/renderer_opengl/gl_shader_manager.h +++ b/src/video_core/renderer_opengl/gl_shader_manager.h | |||
| @@ -12,14 +12,12 @@ | |||
| 12 | 12 | ||
| 13 | namespace OpenGL::GLShader { | 13 | namespace OpenGL::GLShader { |
| 14 | 14 | ||
| 15 | using Tegra::Engines::Maxwell3D; | ||
| 16 | |||
| 17 | /// Uniform structure for the Uniform Buffer Object, all vectors must be 16-byte aligned | 15 | /// Uniform structure for the Uniform Buffer Object, all vectors must be 16-byte aligned |
| 18 | /// @note Always keep a vec4 at the end. The GL spec is not clear whether the alignment at | 16 | /// @note Always keep a vec4 at the end. The GL spec is not clear whether the alignment at |
| 19 | /// the end of a uniform block is included in UNIFORM_BLOCK_DATA_SIZE or not. | 17 | /// the end of a uniform block is included in UNIFORM_BLOCK_DATA_SIZE or not. |
| 20 | /// Not following that rule will cause problems on some AMD drivers. | 18 | /// Not following that rule will cause problems on some AMD drivers. |
| 21 | struct MaxwellUniformData { | 19 | struct MaxwellUniformData { |
| 22 | void SetFromRegs(const Maxwell3D& maxwell, std::size_t shader_stage); | 20 | void SetFromRegs(const Tegra::Engines::Maxwell3D& maxwell, std::size_t shader_stage); |
| 23 | 21 | ||
| 24 | alignas(16) GLvec4 viewport_flip; | 22 | alignas(16) GLvec4 viewport_flip; |
| 25 | struct alignas(16) { | 23 | struct alignas(16) { |