summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/engines/maxwell_3d.h7
-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.h1
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 8808bbf76..ab9bbf2e7 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -862,7 +862,11 @@ public:
862 862
863 float point_size; 863 float point_size;
864 864
865 INSERT_UNION_PADDING_WORDS(0x7); 865 INSERT_UNION_PADDING_WORDS(0x1);
866
867 u32 point_sprite_enable;
868
869 INSERT_UNION_PADDING_WORDS(0x5);
866 870
867 u32 zeta_enable; 871 u32 zeta_enable;
868 872
@@ -1494,6 +1498,7 @@ ASSERT_REG_POSITION(vb_element_base, 0x50D);
1494ASSERT_REG_POSITION(vb_base_instance, 0x50E); 1498ASSERT_REG_POSITION(vb_base_instance, 0x50E);
1495ASSERT_REG_POSITION(clip_distance_enabled, 0x544); 1499ASSERT_REG_POSITION(clip_distance_enabled, 0x544);
1496ASSERT_REG_POSITION(point_size, 0x546); 1500ASSERT_REG_POSITION(point_size, 0x546);
1501ASSERT_REG_POSITION(point_sprite_enable, 0x548);
1497ASSERT_REG_POSITION(zeta_enable, 0x54E); 1502ASSERT_REG_POSITION(zeta_enable, 0x54E);
1498ASSERT_REG_POSITION(multisample_control, 0x54F); 1503ASSERT_REG_POSITION(multisample_control, 0x54F);
1499ASSERT_REG_POSITION(condition, 0x554); 1504ASSERT_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 362942e09..0537a2abe 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -1293,6 +1293,7 @@ void RasterizerOpenGL::SyncPointState() {
1293 // Limit the point size to 1 since nouveau sometimes sets a point size of 0 (and that's invalid 1293 // Limit the point size to 1 since nouveau sometimes sets a point size of 0 (and that's invalid
1294 // in OpenGL). 1294 // in OpenGL).
1295 state.point.program_control = regs.vp_point_size.enable != 0; 1295 state.point.program_control = regs.vp_point_size.enable != 0;
1296 state.point.sprite = regs.point_sprite_enable != 0;
1296 state.point.size = std::max(1.0f, regs.point_size); 1297 state.point.size = std::max(1.0f, regs.point_size);
1297} 1298}
1298 1299
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() {
128 128
129void OpenGLState::ApplyPointSize() { 129void OpenGLState::ApplyPointSize() {
130 Enable(GL_PROGRAM_POINT_SIZE, cur_state.point.program_control, point.program_control); 130 Enable(GL_PROGRAM_POINT_SIZE, cur_state.point.program_control, point.program_control);
131 Enable(GL_POINT_SPRITE, cur_state.point.sprite, point.sprite);
131 if (UpdateValue(cur_state.point.size, point.size)) { 132 if (UpdateValue(cur_state.point.size, point.size)) {
132 glPointSize(point.size); 133 glPointSize(point.size);
133 } 134 }
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:
132 132
133 struct { 133 struct {
134 bool program_control = false; // GL_PROGRAM_POINT_SIZE 134 bool program_control = false; // GL_PROGRAM_POINT_SIZE
135 bool sprite = false; // GL_POINT_SPRITE
135 GLfloat size = 1.0f; // GL_POINT_SIZE 136 GLfloat size = 1.0f; // GL_POINT_SIZE
136 } point; 137 } point;
137 138