mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
gl_state_tracker: Implement dirty flags for multisample
This commit is contained in:
parent
3c22bd92d8
commit
b727d99441
|
@ -1130,6 +1130,13 @@ void RasterizerOpenGL::SyncColorMask() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerOpenGL::SyncMultiSampleState() {
|
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;
|
const auto& regs = system.GPU().Maxwell3D().regs;
|
||||||
oglEnable(GL_SAMPLE_ALPHA_TO_COVERAGE, regs.multisample_control.alpha_to_coverage);
|
oglEnable(GL_SAMPLE_ALPHA_TO_COVERAGE, regs.multisample_control.alpha_to_coverage);
|
||||||
oglEnable(GL_SAMPLE_ALPHA_TO_ONE, regs.multisample_control.alpha_to_one);
|
oglEnable(GL_SAMPLE_ALPHA_TO_ONE, regs.multisample_control.alpha_to_one);
|
||||||
|
|
|
@ -185,6 +185,10 @@ void SetupDirtyPolygonOffset(Tables& tables) {
|
||||||
table[OFF(polygon_offset_clamp)] = PolygonOffset;
|
table[OFF(polygon_offset_clamp)] = PolygonOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetupDirtyMultisampleControl(Tables& tables) {
|
||||||
|
FillBlock(tables[0], OFF(multisample_control), NUM(multisample_control), MultisampleControl);
|
||||||
|
}
|
||||||
|
|
||||||
void SetupDirtyMisc(Tables& tables) {
|
void SetupDirtyMisc(Tables& tables) {
|
||||||
auto& table = tables[0];
|
auto& table = tables[0];
|
||||||
|
|
||||||
|
@ -216,6 +220,7 @@ void StateTracker::Initialize() {
|
||||||
SetupDirtyBlend(tables);
|
SetupDirtyBlend(tables);
|
||||||
SetupDirtyPrimitiveRestart(tables);
|
SetupDirtyPrimitiveRestart(tables);
|
||||||
SetupDirtyPolygonOffset(tables);
|
SetupDirtyPolygonOffset(tables);
|
||||||
|
SetupDirtyMultisampleControl(tables);
|
||||||
SetupDirtyMisc(tables);
|
SetupDirtyMisc(tables);
|
||||||
|
|
||||||
auto& store = dirty.on_write_stores;
|
auto& store = dirty.on_write_stores;
|
||||||
|
|
|
@ -65,6 +65,7 @@ enum : u8 {
|
||||||
AlphaTest,
|
AlphaTest,
|
||||||
PrimitiveRestart,
|
PrimitiveRestart,
|
||||||
PolygonOffset,
|
PolygonOffset,
|
||||||
|
MultisampleControl,
|
||||||
|
|
||||||
Last
|
Last
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue