diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2018-09-28 06:31:01 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2018-09-28 07:13:29 +0200 |
commit | e3e51d3ddb45597b843ae710d8d9a33caec6931f (patch) | |
tree | 63a4125d1102bdec94d1772e11f824d98a0f68c8 /src/video_core/renderer_opengl | |
parent | Merge pull request #1360 from FearlessTobi/port-3979 (diff) | |
download | yuzu-e3e51d3ddb45597b843ae710d8d9a33caec6931f.tar yuzu-e3e51d3ddb45597b843ae710d8d9a33caec6931f.tar.gz yuzu-e3e51d3ddb45597b843ae710d8d9a33caec6931f.tar.bz2 yuzu-e3e51d3ddb45597b843ae710d8d9a33caec6931f.tar.lz yuzu-e3e51d3ddb45597b843ae710d8d9a33caec6931f.tar.xz yuzu-e3e51d3ddb45597b843ae710d8d9a33caec6931f.tar.zst yuzu-e3e51d3ddb45597b843ae710d8d9a33caec6931f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 7 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.h | 3 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 7 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.h | 4 |
4 files changed, 21 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 44850d193..1fcd13f04 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -452,6 +452,7 @@ void RasterizerOpenGL::DrawArrays() { SyncCullMode(); SyncAlphaTest(); SyncTransformFeedback(); + SyncPointState(); // TODO(bunnei): Sync framebuffer_scale uniform here // TODO(bunnei): Sync scissorbox uniform(s) here @@ -905,4 +906,10 @@ void RasterizerOpenGL::SyncTransformFeedback() { } } +void RasterizerOpenGL::SyncPointState() { + const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; + + state.point.size = regs.point_size; +} + } // namespace OpenGL diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index c3f1e14bf..db6ff191c 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h @@ -164,6 +164,9 @@ private: /// Syncs the transform feedback state to match the guest state void SyncTransformFeedback(); + /// Syncs the point state to match the guest state + void SyncPointState(); + bool has_ARB_direct_state_access = false; bool has_ARB_multi_bind = false; bool has_ARB_separate_shader_objects = false; diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index e5173e20a..9c3b3b546 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -79,6 +79,8 @@ OpenGLState::OpenGLState() { viewport.height = 0; clip_distance = {}; + + point.size = 1; } void OpenGLState::Apply() const { @@ -283,6 +285,11 @@ void OpenGLState::Apply() const { } } + // Point + if (point.size != cur_state.point.size) { + glPointSize(point.size); + } + cur_state = *this; } diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index 9a93029d8..ac4bb0555 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h @@ -141,6 +141,10 @@ public: GLsizei height; } viewport; + struct { + float size; // GL_POINT_SIZE + } point; + std::array<bool, 2> clip_distance; // GL_CLIP_DISTANCE OpenGLState(); |