summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_state_tracker.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-03-13 15:08:57 +0100
committerGitHub <noreply@github.com>2020-03-13 15:08:57 +0100
commitb30b1f741dcbcb69672d065b0bec4f4a9e5f0993 (patch)
treeb8416dffe6beb924c574ef25755aad12db0a68fb /src/video_core/renderer_opengl/gl_state_tracker.cpp
parentMerge pull request #3483 from namkazt/patch-1 (diff)
parentgl_rasterizer: Implement polygon modes and fill rectangles (diff)
downloadyuzu-b30b1f741dcbcb69672d065b0bec4f4a9e5f0993.tar
yuzu-b30b1f741dcbcb69672d065b0bec4f4a9e5f0993.tar.gz
yuzu-b30b1f741dcbcb69672d065b0bec4f4a9e5f0993.tar.bz2
yuzu-b30b1f741dcbcb69672d065b0bec4f4a9e5f0993.tar.lz
yuzu-b30b1f741dcbcb69672d065b0bec4f4a9e5f0993.tar.xz
yuzu-b30b1f741dcbcb69672d065b0bec4f4a9e5f0993.tar.zst
yuzu-b30b1f741dcbcb69672d065b0bec4f4a9e5f0993.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_state_tracker.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_state_tracker.cpp b/src/video_core/renderer_opengl/gl_state_tracker.cpp
index 1e43c9ec0..3f3bdf812 100644
--- a/src/video_core/renderer_opengl/gl_state_tracker.cpp
+++ b/src/video_core/renderer_opengl/gl_state_tracker.cpp
@@ -94,6 +94,15 @@ void SetupDirtyShaders(Tables& tables) {
Shaders);
}
+void SetupDirtyPolygonModes(Tables& tables) {
+ tables[0][OFF(polygon_mode_front)] = PolygonModeFront;
+ tables[0][OFF(polygon_mode_back)] = PolygonModeBack;
+
+ tables[1][OFF(polygon_mode_front)] = PolygonModes;
+ tables[1][OFF(polygon_mode_back)] = PolygonModes;
+ tables[0][OFF(fill_rectangle)] = PolygonModes;
+}
+
void SetupDirtyDepthTest(Tables& tables) {
auto& table = tables[0];
table[OFF(depth_test_enable)] = DepthTest;
@@ -211,6 +220,7 @@ void StateTracker::Initialize() {
SetupDirtyVertexArrays(tables);
SetupDirtyVertexFormat(tables);
SetupDirtyShaders(tables);
+ SetupDirtyPolygonModes(tables);
SetupDirtyDepthTest(tables);
SetupDirtyStencilTest(tables);
SetupDirtyAlphaTest(tables);