diff options
author | Brian Clinkenbeard <brianclinkenbeard@users.noreply.github.com> | 2020-02-13 01:07:07 +0100 |
---|---|---|
committer | Brian Clinkenbeard <brianclinkenbeard@users.noreply.github.com> | 2020-02-13 01:07:07 +0100 |
commit | 0d85b6bfe17541ea64d51ebe755a4c6120687005 (patch) | |
tree | 7042d6646778f08f13b8cd4cdb950769f322ae71 /src/video_core | |
parent | use config mode for finding SDL2 with CMake (diff) | |
parent | Merge pull request #3403 from lioncash/debug (diff) | |
download | yuzu-0d85b6bfe17541ea64d51ebe755a4c6120687005.tar yuzu-0d85b6bfe17541ea64d51ebe755a4c6120687005.tar.gz yuzu-0d85b6bfe17541ea64d51ebe755a4c6120687005.tar.bz2 yuzu-0d85b6bfe17541ea64d51ebe755a4c6120687005.tar.lz yuzu-0d85b6bfe17541ea64d51ebe755a4c6120687005.tar.xz yuzu-0d85b6bfe17541ea64d51ebe755a4c6120687005.tar.zst yuzu-0d85b6bfe17541ea64d51ebe755a4c6120687005.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/engines/maxwell_3d.h | 7 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 1 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 1 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.h | 1 |
4 files changed, 9 insertions, 1 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index e437bacb7..7b1912a66 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -862,7 +862,11 @@ public: float point_size; - INSERT_UNION_PADDING_WORDS(0x7); + INSERT_UNION_PADDING_WORDS(0x1); + + u32 point_sprite_enable; + + INSERT_UNION_PADDING_WORDS(0x5); u32 zeta_enable; @@ -1494,6 +1498,7 @@ ASSERT_REG_POSITION(vb_element_base, 0x50D); ASSERT_REG_POSITION(vb_base_instance, 0x50E); ASSERT_REG_POSITION(clip_distance_enabled, 0x544); ASSERT_REG_POSITION(point_size, 0x546); +ASSERT_REG_POSITION(point_sprite_enable, 0x548); ASSERT_REG_POSITION(zeta_enable, 0x54E); ASSERT_REG_POSITION(multisample_control, 0x54F); ASSERT_REG_POSITION(condition, 0x554); diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 46a7433ea..b0eb14c8b 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -1220,6 +1220,7 @@ void RasterizerOpenGL::SyncPointState() { // Limit the point size to 1 since nouveau sometimes sets a point size of 0 (and that's invalid // in OpenGL). state.point.program_control = regs.vp_point_size.enable != 0; + state.point.sprite = regs.point_sprite_enable != 0; state.point.size = std::max(1.0f, regs.point_size); } diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index cc185e9e1..ab1f7983c 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -128,6 +128,7 @@ void OpenGLState::ApplyClipDistances() { void OpenGLState::ApplyPointSize() { Enable(GL_PROGRAM_POINT_SIZE, cur_state.point.program_control, point.program_control); + Enable(GL_POINT_SPRITE, cur_state.point.sprite, point.sprite); if (UpdateValue(cur_state.point.size, point.size)) { glPointSize(point.size); } diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index 678e5cd89..4953eeda2 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h @@ -132,6 +132,7 @@ public: struct { bool program_control = false; // GL_PROGRAM_POINT_SIZE + bool sprite = false; // GL_POINT_SPRITE GLfloat size = 1.0f; // GL_POINT_SIZE } point; |