summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp7
-rw-r--r--src/video_core/renderer_opengl/gl_state_tracker.cpp5
-rw-r--r--src/video_core/renderer_opengl/gl_state_tracker.h1
3 files changed, 13 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 5949f53ab..e4875608a 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -1130,6 +1130,13 @@ void RasterizerOpenGL::SyncColorMask() {
}
void RasterizerOpenGL::SyncMultiSampleState() {
+ auto& gpu = system.GPU().Maxwell3D();
+ auto& flags = gpu.dirty.flags;
+ if (!flags[Dirty::MultisampleControl]) {
+ return;
+ }
+ flags[Dirty::MultisampleControl] = false;
+
const auto& regs = system.GPU().Maxwell3D().regs;
oglEnable(GL_SAMPLE_ALPHA_TO_COVERAGE, regs.multisample_control.alpha_to_coverage);
oglEnable(GL_SAMPLE_ALPHA_TO_ONE, regs.multisample_control.alpha_to_one);
diff --git a/src/video_core/renderer_opengl/gl_state_tracker.cpp b/src/video_core/renderer_opengl/gl_state_tracker.cpp
index 314d6f14d..c979046a3 100644
--- a/src/video_core/renderer_opengl/gl_state_tracker.cpp
+++ b/src/video_core/renderer_opengl/gl_state_tracker.cpp
@@ -185,6 +185,10 @@ void SetupDirtyPolygonOffset(Tables& tables) {
table[OFF(polygon_offset_clamp)] = PolygonOffset;
}
+void SetupDirtyMultisampleControl(Tables& tables) {
+ FillBlock(tables[0], OFF(multisample_control), NUM(multisample_control), MultisampleControl);
+}
+
void SetupDirtyMisc(Tables& tables) {
auto& table = tables[0];
@@ -216,6 +220,7 @@ void StateTracker::Initialize() {
SetupDirtyBlend(tables);
SetupDirtyPrimitiveRestart(tables);
SetupDirtyPolygonOffset(tables);
+ SetupDirtyMultisampleControl(tables);
SetupDirtyMisc(tables);
auto& store = dirty.on_write_stores;
diff --git a/src/video_core/renderer_opengl/gl_state_tracker.h b/src/video_core/renderer_opengl/gl_state_tracker.h
index bef4e6ce6..afa8efc28 100644
--- a/src/video_core/renderer_opengl/gl_state_tracker.h
+++ b/src/video_core/renderer_opengl/gl_state_tracker.h
@@ -65,6 +65,7 @@ enum : u8 {
AlphaTest,
PrimitiveRestart,
PolygonOffset,
+ MultisampleControl,
Last
};