summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-01-18 07:56:32 +0100
committerGitHub <noreply@github.com>2020-01-18 07:56:32 +0100
commit9bf4850f7492bf9370acedb6135a79b944eb942f (patch)
tree93c1e266c2412d19bb6760227c1238151d3c219b /src/video_core/renderer_opengl
parentMerge pull request #3312 from ReinUsesLisp/atoms-u32 (diff)
parentgl_state: Implement PROGRAM_POINT_SIZE (diff)
downloadyuzu-9bf4850f7492bf9370acedb6135a79b944eb942f.tar
yuzu-9bf4850f7492bf9370acedb6135a79b944eb942f.tar.gz
yuzu-9bf4850f7492bf9370acedb6135a79b944eb942f.tar.bz2
yuzu-9bf4850f7492bf9370acedb6135a79b944eb942f.tar.lz
yuzu-9bf4850f7492bf9370acedb6135a79b944eb942f.tar.xz
yuzu-9bf4850f7492bf9370acedb6135a79b944eb942f.tar.zst
yuzu-9bf4850f7492bf9370acedb6135a79b944eb942f.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-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
3 files changed, 4 insertions, 1 deletions
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() {
const auto& regs = system.GPU().Maxwell3D().regs;
// 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 ? GL_TRUE : GL_FALSE;
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 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() {
}
void OpenGLState::ApplyPointSize() {
+ Enable(GL_PROGRAM_POINT_SIZE, cur_state.point.program_control, point.program_control);
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 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:
std::array<Viewport, Tegra::Engines::Maxwell3D::Regs::NumViewports> viewports;
struct {
- float size = 1.0f; // GL_POINT_SIZE
+ GLboolean program_control = GL_FALSE; // GL_PROGRAM_POINT_SIZE
+ GLfloat size = 1.0f; // GL_POINT_SIZE
} point;
struct {