diff options
| author | 2014-07-22 13:21:57 +0200 | |
|---|---|---|
| committer | 2014-07-23 00:44:31 +0200 | |
| commit | 61e2ffd4483bf2da0862e32449caa9f1cecc5b72 (patch) | |
| tree | f49e4c830aa879fdcb3a0c9147fac0dadeacf268 /src/core | |
| parent | GSP: Add a few comments. (diff) | |
| download | yuzu-61e2ffd4483bf2da0862e32449caa9f1cecc5b72.tar.gz yuzu-61e2ffd4483bf2da0862e32449caa9f1cecc5b72.tar.xz yuzu-61e2ffd4483bf2da0862e32449caa9f1cecc5b72.zip | |
GPU: Add documentation.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hw/gpu.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h index 4ef0a047f..3078e4142 100644 --- a/src/core/hw/gpu.h +++ b/src/core/hw/gpu.h | |||
| @@ -84,11 +84,14 @@ struct Regs::Struct<Regs::FramebufferTop> { | |||
| 84 | union { | 84 | union { |
| 85 | u32 active_fb; | 85 | u32 active_fb; |
| 86 | 86 | ||
| 87 | // 0: Use parameters ending with "1" | ||
| 88 | // 1: Use parameters ending with "2" | ||
| 87 | BitField<0, 1, u32> second_fb_active; | 89 | BitField<0, 1, u32> second_fb_active; |
| 88 | }; | 90 | }; |
| 89 | 91 | ||
| 90 | u32 pad2[5]; | 92 | u32 pad2[5]; |
| 91 | 93 | ||
| 94 | // Distance between two pixel rows, in bytes | ||
| 92 | u32 stride; | 95 | u32 stride; |
| 93 | 96 | ||
| 94 | u32 address_right1; | 97 | u32 address_right1; |
| @@ -132,23 +135,32 @@ struct Regs::Struct<Regs::DisplayTransfer> { | |||
| 132 | union { | 135 | union { |
| 133 | u32 flags; | 136 | u32 flags; |
| 134 | 137 | ||
| 135 | BitField< 0, 1, u32> flip_data; | 138 | BitField< 0, 1, u32> flip_data; // flips input data horizontally (TODO) if true |
| 136 | BitField< 8, 3, Format> input_format; | 139 | BitField< 8, 3, Format> input_format; |
| 137 | BitField<12, 3, Format> output_format; | 140 | BitField<12, 3, Format> output_format; |
| 138 | BitField<16, 1, u32> output_tiled; | 141 | BitField<16, 1, u32> output_tiled; // stores output in a tiled format |
| 139 | }; | 142 | }; |
| 140 | 143 | ||
| 141 | u32 unknown; | 144 | u32 unknown; |
| 145 | |||
| 146 | // it seems that writing to this field triggers the display transfer | ||
| 142 | u32 trigger; | 147 | u32 trigger; |
| 143 | }; | 148 | }; |
| 144 | static_assert(sizeof(Regs::Struct<Regs::DisplayTransfer>) == 0x1C, "Structure size and register block length don't match"); | 149 | static_assert(sizeof(Regs::Struct<Regs::DisplayTransfer>) == 0x1C, "Structure size and register block length don't match"); |
| 145 | 150 | ||
| 146 | template<> | 151 | template<> |
| 147 | struct Regs::Struct<Regs::CommandProcessor> { | 152 | struct Regs::Struct<Regs::CommandProcessor> { |
| 153 | // command list size | ||
| 148 | u32 size; | 154 | u32 size; |
| 155 | |||
| 149 | u32 pad0; | 156 | u32 pad0; |
| 157 | |||
| 158 | // command list address | ||
| 150 | u32 address; | 159 | u32 address; |
| 160 | |||
| 151 | u32 pad1; | 161 | u32 pad1; |
| 162 | |||
| 163 | // it seems that writing to this field triggers command list processing | ||
| 152 | u32 trigger; | 164 | u32 trigger; |
| 153 | }; | 165 | }; |
| 154 | static_assert(sizeof(Regs::Struct<Regs::CommandProcessor>) == 0x14, "Structure size and register block length don't match"); | 166 | static_assert(sizeof(Regs::Struct<Regs::CommandProcessor>) == 0x14, "Structure size and register block length don't match"); |