summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/video_core/engines/maxwell_3d.h10
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp1
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp1
-rw-r--r--src/video_core/renderer_opengl/gl_state.h3
4 files changed, 13 insertions, 2 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h
index 16f95b77d..ee79260fc 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -1018,7 +1018,14 @@ public:
1018 } 1018 }
1019 } instanced_arrays; 1019 } instanced_arrays;
1020 1020
1021 INSERT_UNION_PADDING_WORDS(0x6); 1021 INSERT_UNION_PADDING_WORDS(0x4);
1022
1023 union {
1024 BitField<0, 1, u32> enable;
1025 BitField<4, 8, u32> unk4;
1026 } vp_point_size;
1027
1028 INSERT_UNION_PADDING_WORDS(1);
1022 1029
1023 Cull cull; 1030 Cull cull;
1024 1031
@@ -1503,6 +1510,7 @@ ASSERT_REG_POSITION(primitive_restart, 0x591);
1503ASSERT_REG_POSITION(index_array, 0x5F2); 1510ASSERT_REG_POSITION(index_array, 0x5F2);
1504ASSERT_REG_POSITION(polygon_offset_clamp, 0x61F); 1511ASSERT_REG_POSITION(polygon_offset_clamp, 0x61F);
1505ASSERT_REG_POSITION(instanced_arrays, 0x620); 1512ASSERT_REG_POSITION(instanced_arrays, 0x620);
1513ASSERT_REG_POSITION(vp_point_size, 0x644);
1506ASSERT_REG_POSITION(cull, 0x646); 1514ASSERT_REG_POSITION(cull, 0x646);
1507ASSERT_REG_POSITION(pixel_center_integer, 0x649); 1515ASSERT_REG_POSITION(pixel_center_integer, 0x649);
1508ASSERT_REG_POSITION(viewport_transform_enabled, 0x64B); 1516ASSERT_REG_POSITION(viewport_transform_enabled, 0x64B);
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 672051102..926bccd42 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -1272,6 +1272,7 @@ void RasterizerOpenGL::SyncPointState() {
1272 const auto& regs = system.GPU().Maxwell3D().regs; 1272 const auto& regs = system.GPU().Maxwell3D().regs;
1273 // Limit the point size to 1 since nouveau sometimes sets a point size of 0 (and that's invalid 1273 // Limit the point size to 1 since nouveau sometimes sets a point size of 0 (and that's invalid
1274 // in OpenGL). 1274 // in OpenGL).
1275 state.point.program_control = regs.vp_point_size.enable ? GL_TRUE : GL_FALSE;
1275 state.point.size = std::max(1.0f, regs.point_size); 1276 state.point.size = std::max(1.0f, regs.point_size);
1276} 1277}
1277 1278
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index df2e2395a..cc185e9e1 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -127,6 +127,7 @@ void OpenGLState::ApplyClipDistances() {
127} 127}
128 128
129void OpenGLState::ApplyPointSize() { 129void OpenGLState::ApplyPointSize() {
130 Enable(GL_PROGRAM_POINT_SIZE, cur_state.point.program_control, point.program_control);
130 if (UpdateValue(cur_state.point.size, point.size)) { 131 if (UpdateValue(cur_state.point.size, point.size)) {
131 glPointSize(point.size); 132 glPointSize(point.size);
132 } 133 }
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h
index fb180f302..71d418776 100644
--- a/src/video_core/renderer_opengl/gl_state.h
+++ b/src/video_core/renderer_opengl/gl_state.h
@@ -131,7 +131,8 @@ public:
131 std::array<Viewport, Tegra::Engines::Maxwell3D::Regs::NumViewports> viewports; 131 std::array<Viewport, Tegra::Engines::Maxwell3D::Regs::NumViewports> viewports;
132 132
133 struct { 133 struct {
134 float size = 1.0f; // GL_POINT_SIZE 134 GLboolean program_control = GL_FALSE; // GL_PROGRAM_POINT_SIZE
135 GLfloat size = 1.0f; // GL_POINT_SIZE
135 } point; 136 } point;
136 137
137 struct { 138 struct {