summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/engines/maxwell_3d.h49
1 files changed, 48 insertions, 1 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h
index 096679162..c2db3154a 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -31,6 +31,7 @@ public:
31 struct Regs { 31 struct Regs {
32 static constexpr size_t NUM_REGS = 0xE36; 32 static constexpr size_t NUM_REGS = 0xE36;
33 33
34 static constexpr size_t NumRenderTargets = 8;
34 static constexpr size_t NumCBData = 16; 35 static constexpr size_t NumCBData = 16;
35 static constexpr size_t NumVertexArrays = 32; 36 static constexpr size_t NumVertexArrays = 32;
36 static constexpr size_t MaxShaderProgram = 6; 37 static constexpr size_t MaxShaderProgram = 6;
@@ -62,7 +63,50 @@ public:
62 63
63 union { 64 union {
64 struct { 65 struct {
65 INSERT_PADDING_WORDS(0x557); 66 INSERT_PADDING_WORDS(0x200);
67
68 struct {
69 u32 address_high;
70 u32 address_low;
71 u32 horiz;
72 u32 vert;
73 u32 format;
74 u32 block_dimensions;
75 u32 array_mode;
76 u32 layer_stride;
77 u32 base_layer;
78 INSERT_PADDING_WORDS(7);
79
80 GPUVAddr Address() const {
81 return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) |
82 address_low);
83 }
84 } rt[NumRenderTargets];
85
86 INSERT_PADDING_WORDS(0x178);
87
88 struct {
89 u32 address_high;
90 u32 address_low;
91 u32 format;
92 u32 block_dimensions;
93 u32 layer_stride;
94
95 GPUVAddr Address() const {
96 return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) |
97 address_low);
98 }
99 } zeta;
100
101 INSERT_PADDING_WORDS(0x8A);
102
103 struct {
104 union {
105 BitField<0, 4, u32> count;
106 };
107 } rt_control;
108
109 INSERT_PADDING_WORDS(0xCF);
66 110
67 struct { 111 struct {
68 u32 tsc_address_high; 112 u32 tsc_address_high;
@@ -291,6 +335,9 @@ private:
291 static_assert(offsetof(Maxwell3D::Regs, field_name) == position * 4, \ 335 static_assert(offsetof(Maxwell3D::Regs, field_name) == position * 4, \
292 "Field " #field_name " has invalid position") 336 "Field " #field_name " has invalid position")
293 337
338ASSERT_REG_POSITION(rt, 0x200);
339ASSERT_REG_POSITION(zeta, 0x3F8);
340ASSERT_REG_POSITION(rt_control, 0x487);
294ASSERT_REG_POSITION(tsc, 0x557); 341ASSERT_REG_POSITION(tsc, 0x557);
295ASSERT_REG_POSITION(tic, 0x55D); 342ASSERT_REG_POSITION(tic, 0x55D);
296ASSERT_REG_POSITION(code_address, 0x582); 343ASSERT_REG_POSITION(code_address, 0x582);