|
@@ -15,15 +15,30 @@ class System;
|
|
|
namespace OpenGL {
|
|
namespace OpenGL {
|
|
|
|
|
|
|
|
namespace Dirty {
|
|
namespace Dirty {
|
|
|
|
|
+
|
|
|
enum : u8 {
|
|
enum : u8 {
|
|
|
First = VideoCommon::Dirty::LastCommonEntry,
|
|
First = VideoCommon::Dirty::LastCommonEntry,
|
|
|
|
|
|
|
|
VertexFormats,
|
|
VertexFormats,
|
|
|
|
|
+
|
|
|
VertexBuffers,
|
|
VertexBuffers,
|
|
|
|
|
+ VertexBuffer0,
|
|
|
|
|
+ VertexBuffer31 = VertexBuffer0 + 31,
|
|
|
|
|
+
|
|
|
VertexInstances,
|
|
VertexInstances,
|
|
|
- Shaders,
|
|
|
|
|
- Viewports,
|
|
|
|
|
|
|
+ VertexInstance0,
|
|
|
|
|
+ VertexInstance31 = VertexInstance0 + 31,
|
|
|
|
|
+
|
|
|
ViewportTransform,
|
|
ViewportTransform,
|
|
|
|
|
+ Viewports,
|
|
|
|
|
+ Viewport0,
|
|
|
|
|
+ Viewport15 = Viewport0 + 15,
|
|
|
|
|
+
|
|
|
|
|
+ Scissors,
|
|
|
|
|
+ Scissor0,
|
|
|
|
|
+ Scissor15 = Scissor0 + 15,
|
|
|
|
|
+
|
|
|
|
|
+ Shaders,
|
|
|
CullTestEnable,
|
|
CullTestEnable,
|
|
|
FrontFace,
|
|
FrontFace,
|
|
|
CullFace,
|
|
CullFace,
|
|
@@ -34,11 +49,11 @@ enum : u8 {
|
|
|
BlendState,
|
|
BlendState,
|
|
|
PolygonOffset,
|
|
PolygonOffset,
|
|
|
|
|
|
|
|
- Viewport0,
|
|
|
|
|
- VertexBuffer0 = Viewport0 + 16,
|
|
|
|
|
- VertexInstance0 = VertexBuffer0 + 32,
|
|
|
|
|
|
|
+ Last
|
|
|
};
|
|
};
|
|
|
-}
|
|
|
|
|
|
|
+static_assert(Last <= 0xff);
|
|
|
|
|
+
|
|
|
|
|
+} // namespace Dirty
|
|
|
|
|
|
|
|
class StateTracker {
|
|
class StateTracker {
|
|
|
public:
|
|
public:
|
|
@@ -52,6 +67,12 @@ public:
|
|
|
flags[OpenGL::Dirty::Viewport0] = true;
|
|
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() {
|
|
void NotifyFramebuffer() {
|
|
|
auto& flags = system.GPU().Maxwell3D().dirty.flags;
|
|
auto& flags = system.GPU().Maxwell3D().dirty.flags;
|
|
|
flags[VideoCommon::Dirty::RenderTargets] = true;
|
|
flags[VideoCommon::Dirty::RenderTargets] = true;
|