diff options
Diffstat (limited to 'src/video_core/pica_state.h')
-rw-r--r-- | src/video_core/pica_state.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/video_core/pica_state.h b/src/video_core/pica_state.h index 2d23d34e6..c6634a0bc 100644 --- a/src/video_core/pica_state.h +++ b/src/video_core/pica_state.h @@ -8,6 +8,7 @@ #include "common/bit_field.h" #include "common/common_types.h" #include "common/vector_math.h" +#include "video_core/geometry_pipeline.h" #include "video_core/primitive_assembly.h" #include "video_core/regs.h" #include "video_core/shader/shader.h" @@ -16,6 +17,7 @@ namespace Pica { /// Struct used to describe current Pica state struct State { + State(); void Reset(); /// Pica registers @@ -79,7 +81,7 @@ struct State { std::array<ColorDifferenceEntry, 256> color_diff_table; } proctex; - struct { + struct Lighting { union LutEntry { // Used for raw access u32 raw; @@ -137,8 +139,17 @@ struct State { Shader::AttributeBuffer input_vertex; // Index of the next attribute to be loaded into `input_vertex`. u32 current_attribute = 0; + // Indicates the immediate mode just started and the geometry pipeline needs to reconfigure + bool reset_geometry_pipeline = true; } immediate; + // the geometry shader needs to be kept in the global state because some shaders relie on + // preserved register value across shader invocation. + // TODO: also bring the three vertex shader units here and implement the shader scheduler. + Shader::GSUnitState gs_unit; + + GeometryPipeline geometry_pipeline; + // This is constructed with a dummy triangle topology PrimitiveAssembler<Shader::OutputVertex> primitive_assembler; }; |