diff options
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state_tracker.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_state_tracker.h | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_state_tracker.h b/src/video_core/renderer_opengl/gl_state_tracker.h index 93c64a44a..5153dc5d1 100644 --- a/src/video_core/renderer_opengl/gl_state_tracker.h +++ b/src/video_core/renderer_opengl/gl_state_tracker.h @@ -15,15 +15,30 @@ class System; namespace OpenGL { namespace Dirty { + enum : u8 { First = VideoCommon::Dirty::LastCommonEntry, VertexFormats, + VertexBuffers, + VertexBuffer0, + VertexBuffer31 = VertexBuffer0 + 31, + VertexInstances, - Shaders, - Viewports, + VertexInstance0, + VertexInstance31 = VertexInstance0 + 31, + ViewportTransform, + Viewports, + Viewport0, + Viewport15 = Viewport0 + 15, + + Scissors, + Scissor0, + Scissor15 = Scissor0 + 15, + + Shaders, CullTestEnable, FrontFace, CullFace, @@ -34,11 +49,11 @@ enum : u8 { BlendState, PolygonOffset, - Viewport0, - VertexBuffer0 = Viewport0 + 16, - VertexInstance0 = VertexBuffer0 + 32, + Last }; -} +static_assert(Last <= 0xff); + +} // namespace Dirty class StateTracker { public: @@ -52,6 +67,12 @@ public: flags[OpenGL::Dirty::Viewport0] = true; } + void NotifyScissor0() { + auto& flags = system.GPU().Maxwell3D().dirty.flags; + flags[OpenGL::Dirty::Scissors] = true; + flags[OpenGL::Dirty::Scissor0] = true; + } + void NotifyFramebuffer() { auto& flags = system.GPU().Maxwell3D().dirty.flags; flags[VideoCommon::Dirty::RenderTargets] = true; |