summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_state.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-07-13 22:52:32 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-07-17 23:29:51 +0200
commita081dea8abd9539ab45e53fbfb0e9c6243b87180 (patch)
treedab378fcaab484aff60eb9d6c7cf74127cd341d4 /src/video_core/renderer_opengl/gl_state.cpp
parentMaxwell3D: Rework CBData Upload (diff)
downloadyuzu-a081dea8abd9539ab45e53fbfb0e9c6243b87180.tar
yuzu-a081dea8abd9539ab45e53fbfb0e9c6243b87180.tar.gz
yuzu-a081dea8abd9539ab45e53fbfb0e9c6243b87180.tar.bz2
yuzu-a081dea8abd9539ab45e53fbfb0e9c6243b87180.tar.lz
yuzu-a081dea8abd9539ab45e53fbfb0e9c6243b87180.tar.xz
yuzu-a081dea8abd9539ab45e53fbfb0e9c6243b87180.tar.zst
yuzu-a081dea8abd9539ab45e53fbfb0e9c6243b87180.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index 0eae98afe..cac03dc31 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -526,7 +526,7 @@ void OpenGLState::ApplySamplers() const {
}
}
-void OpenGLState::Apply() const {
+void OpenGLState::Apply() {
MICROPROFILE_SCOPE(OpenGL_State);
ApplyFramebufferState();
ApplyVertexArrayState();
@@ -536,19 +536,31 @@ void OpenGLState::Apply() const {
ApplyPointSize();
ApplyFragmentColorClamp();
ApplyMultisample();
+ if (dirty.color_mask) {
+ ApplyColorMask();
+ dirty.color_mask = false;
+ }
ApplyDepthClamp();
- ApplyColorMask();
ApplyViewport();
- ApplyStencilTest();
+ if (dirty.stencil_state) {
+ ApplyStencilTest();
+ dirty.stencil_state = false;
+ }
ApplySRgb();
ApplyCulling();
ApplyDepth();
ApplyPrimitiveRestart();
- ApplyBlending();
+ if (dirty.blend_state) {
+ ApplyBlending();
+ dirty.blend_state = false;
+ }
ApplyLogicOp();
ApplyTextures();
ApplySamplers();
- ApplyPolygonOffset();
+ if (dirty.polygon_offset) {
+ ApplyPolygonOffset();
+ dirty.polygon_offset = false;
+ }
ApplyAlphaTest();
}