summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2019-03-27 13:25:59 -0400
committerGravatar Lioncash2019-03-28 11:16:21 -0400
commit16505939271ef0ddd5a108123f22bc1a2f854a23 (patch)
tree33187e8a270cb46907799f9f28de0d099636d7dd
parentgl_shader_manager: Remove reliance on global accessor within MaxwellUniformDa... (diff)
downloadyuzu-16505939271ef0ddd5a108123f22bc1a2f854a23.tar.gz
yuzu-16505939271ef0ddd5a108123f22bc1a2f854a23.tar.xz
yuzu-16505939271ef0ddd5a108123f22bc1a2f854a23.zip
gl_shader_manager: Move using statement into the cpp file
Avoids introducing Maxwell3D into the namespace for everything that includes the header.
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_manager.cpp4
-rw-r--r--src/video_core/renderer_opengl/gl_shader_manager.h4
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
7namespace OpenGL::GLShader { 7namespace OpenGL::GLShader {
8 8
9using Tegra::Engines::Maxwell3D;
10
9void MaxwellUniformData::SetFromRegs(const Maxwell3D& maxwell, std::size_t shader_stage) { 11void 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
13namespace OpenGL::GLShader { 13namespace OpenGL::GLShader {
14 14
15using 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.
21struct MaxwellUniformData { 19struct 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) {