summaryrefslogtreecommitdiffstats
path: root/src/video_core/pica_state.h
diff options
context:
space:
mode:
authorwwylele <wwylele@gmail.com>2017-08-04 16:03:17 +0200
committerwwylele <wwylele@gmail.com>2017-08-19 09:13:20 +0200
commit0f35755572fe63534813528de9a0710193f2e335 (patch)
treeb0eeedaff959cde5195e1d5cf1a3c784954f5273 /src/video_core/pica_state.h
parentpica/shader/jit: implement SETEMIT and EMIT (diff)
downloadyuzu-0f35755572fe63534813528de9a0710193f2e335.tar
yuzu-0f35755572fe63534813528de9a0710193f2e335.tar.gz
yuzu-0f35755572fe63534813528de9a0710193f2e335.tar.bz2
yuzu-0f35755572fe63534813528de9a0710193f2e335.tar.lz
yuzu-0f35755572fe63534813528de9a0710193f2e335.tar.xz
yuzu-0f35755572fe63534813528de9a0710193f2e335.tar.zst
yuzu-0f35755572fe63534813528de9a0710193f2e335.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/pica_state.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/pica_state.h b/src/video_core/pica_state.h
index 864a2c9e6..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
@@ -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;
};