summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2019-12-25 21:00:38 -0300
committerGravatar ReinUsesLisp2020-02-28 16:51:45 -0300
commit0f343d32c41efc411fddb1a66a9f11fb68eebf06 (patch)
tree15187a755644c036af4b8463a0ed18b935b9e2f0 /src
parentgl_state: Remove logic op tracker (diff)
downloadyuzu-0f343d32c41efc411fddb1a66a9f11fb68eebf06.tar.gz
yuzu-0f343d32c41efc411fddb1a66a9f11fb68eebf06.tar.xz
yuzu-0f343d32c41efc411fddb1a66a9f11fb68eebf06.zip
gl_state: Remove primitive restart tracking
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp4
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp10
-rw-r--r--src/video_core/renderer_opengl/gl_state.h6
3 files changed, 2 insertions, 18 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 9d4b351fb..975cd2f12 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -1029,8 +1029,8 @@ void RasterizerOpenGL::SyncCullMode() {
1029void RasterizerOpenGL::SyncPrimitiveRestart() { 1029void RasterizerOpenGL::SyncPrimitiveRestart() {
1030 const auto& regs = system.GPU().Maxwell3D().regs; 1030 const auto& regs = system.GPU().Maxwell3D().regs;
1031 1031
1032 state.primitive_restart.enabled = regs.primitive_restart.enabled; 1032 oglEnable(GL_PRIMITIVE_RESTART, regs.primitive_restart.enabled);
1033 state.primitive_restart.index = regs.primitive_restart.index; 1033 glPrimitiveRestartIndex(regs.primitive_restart.index);
1034} 1034}
1035 1035
1036void RasterizerOpenGL::SyncDepthTestState() { 1036void RasterizerOpenGL::SyncDepthTestState() {
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index ddc534eb4..49a15f82f 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -197,15 +197,6 @@ void OpenGLState::ApplyDepth() {
197 } 197 }
198} 198}
199 199
200void OpenGLState::ApplyPrimitiveRestart() {
201 Enable(GL_PRIMITIVE_RESTART, cur_state.primitive_restart.enabled, primitive_restart.enabled);
202
203 if (cur_state.primitive_restart.index != primitive_restart.index) {
204 cur_state.primitive_restart.index = primitive_restart.index;
205 glPrimitiveRestartIndex(primitive_restart.index);
206 }
207}
208
209void OpenGLState::ApplyStencilTest() { 200void OpenGLState::ApplyStencilTest() {
210 Enable(GL_STENCIL_TEST, cur_state.stencil.test_enabled, stencil.test_enabled); 201 Enable(GL_STENCIL_TEST, cur_state.stencil.test_enabled, stencil.test_enabled);
211 202
@@ -390,7 +381,6 @@ void OpenGLState::Apply() {
390 ApplyStencilTest(); 381 ApplyStencilTest();
391 ApplySRgb(); 382 ApplySRgb();
392 ApplyDepth(); 383 ApplyDepth();
393 ApplyPrimitiveRestart();
394 ApplyBlending(); 384 ApplyBlending();
395 ApplyTextures(); 385 ApplyTextures();
396 ApplySamplers(); 386 ApplySamplers();
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h
index 958af5771..938222d38 100644
--- a/src/video_core/renderer_opengl/gl_state.h
+++ b/src/video_core/renderer_opengl/gl_state.h
@@ -37,11 +37,6 @@ public:
37 GLenum test_func = GL_LESS; // GL_DEPTH_FUNC 37 GLenum test_func = GL_LESS; // GL_DEPTH_FUNC
38 } depth; 38 } depth;
39 39
40 struct {
41 bool enabled = false;
42 GLuint index = 0;
43 } primitive_restart; // GL_PRIMITIVE_RESTART
44
45 bool rasterizer_discard = false; // GL_RASTERIZER_DISCARD 40 bool rasterizer_discard = false; // GL_RASTERIZER_DISCARD
46 41
47 struct ColorMask { 42 struct ColorMask {
@@ -143,7 +138,6 @@ public:
143 void ApplyRasterizerDiscard(); 138 void ApplyRasterizerDiscard();
144 void ApplyColorMask(); 139 void ApplyColorMask();
145 void ApplyDepth(); 140 void ApplyDepth();
146 void ApplyPrimitiveRestart();
147 void ApplyStencilTest(); 141 void ApplyStencilTest();
148 void ApplyViewport(); 142 void ApplyViewport();
149 void ApplyTargetBlending(std::size_t target, bool force); 143 void ApplyTargetBlending(std::size_t target, bool force);