summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwwylele <wwylele@gmail.com>2017-07-24 13:13:33 +0200
committerwwylele <wwylele@gmail.com>2017-08-10 00:53:08 +0200
commitdb309b2423a996cb792273080e73906b07f8b45b (patch)
tree3cd253487dc6e533fd39e89edb3a0c955826efe5
parentMerge pull request #2862 from j-selby/update-cryptopp (diff)
downloadyuzu-db309b2423a996cb792273080e73906b07f8b45b.tar
yuzu-db309b2423a996cb792273080e73906b07f8b45b.tar.gz
yuzu-db309b2423a996cb792273080e73906b07f8b45b.tar.bz2
yuzu-db309b2423a996cb792273080e73906b07f8b45b.tar.lz
yuzu-db309b2423a996cb792273080e73906b07f8b45b.tar.xz
yuzu-db309b2423a996cb792273080e73906b07f8b45b.tar.zst
yuzu-db309b2423a996cb792273080e73906b07f8b45b.zip
-rw-r--r--src/video_core/regs_pipeline.h34
-rw-r--r--src/video_core/regs_shader.h7
2 files changed, 39 insertions, 2 deletions
diff --git a/src/video_core/regs_pipeline.h b/src/video_core/regs_pipeline.h
index 8b6369297..e78c3e331 100644
--- a/src/video_core/regs_pipeline.h
+++ b/src/video_core/regs_pipeline.h
@@ -147,7 +147,15 @@ struct PipelineRegs {
// Number of vertices to render
u32 num_vertices;
- INSERT_PADDING_WORDS(0x1);
+ enum class UseGS : u32 {
+ No = 0,
+ Yes = 2,
+ };
+
+ union {
+ BitField<0, 2, UseGS> use_gs;
+ BitField<31, 1, u32> variable_primitive;
+ };
// The index of the first vertex to render
u32 vertex_offset;
@@ -218,7 +226,29 @@ struct PipelineRegs {
GPUMode gpu_mode;
- INSERT_PADDING_WORDS(0x18);
+ INSERT_PADDING_WORDS(0x4);
+ BitField<0, 4, u32> vs_outmap_total_minus_1_a;
+ INSERT_PADDING_WORDS(0x6);
+ BitField<0, 4, u32> vs_outmap_total_minus_1_b;
+
+ enum class GSMode : u32 {
+ Point = 0,
+ VariablePrimitive = 1,
+ FixedPrimitive = 2,
+ };
+
+ union {
+ BitField<0, 8, GSMode> mode;
+ BitField<8, 4, u32> fixed_vertex_num_minus_1;
+ BitField<12, 4, u32> stride_minus_1;
+ BitField<16, 4, u32> start_index;
+ } gs_config;
+
+ INSERT_PADDING_WORDS(0x1);
+
+ u32 variable_vertex_main_num_minus_1;
+
+ INSERT_PADDING_WORDS(0x9);
enum class TriangleTopology : u32 {
List = 0,
diff --git a/src/video_core/regs_shader.h b/src/video_core/regs_shader.h
index ddb1ee451..c15d4d162 100644
--- a/src/video_core/regs_shader.h
+++ b/src/video_core/regs_shader.h
@@ -24,9 +24,16 @@ struct ShaderRegs {
INSERT_PADDING_WORDS(0x4);
+ enum ShaderMode {
+ GS = 0x08,
+ VS = 0xA0,
+ };
+
union {
// Number of input attributes to shader unit - 1
BitField<0, 4, u32> max_input_attribute_index;
+ BitField<8, 8, u32> input_to_uniform;
+ BitField<24, 8, ShaderMode> shader_mode;
};
// Offset to shader program entry point (in words)