diff options
| author | 2018-03-26 15:44:20 -0500 | |
|---|---|---|
| committer | 2018-03-26 15:44:20 -0500 | |
| commit | 6afe9e01056f3f4a99fe04f41e995a79ca468727 (patch) | |
| tree | 925c7783b49286f15260b89f420853b22c35c8c0 /src | |
| parent | Merge pull request #280 from bunnei/misc-service-fixes (diff) | |
| download | yuzu-6afe9e01056f3f4a99fe04f41e995a79ca468727.tar.gz yuzu-6afe9e01056f3f4a99fe04f41e995a79ca468727.tar.xz yuzu-6afe9e01056f3f4a99fe04f41e995a79ca468727.zip | |
GPU: Added more fields to the TIC structure.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/textures/texture.h | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/src/video_core/textures/texture.h b/src/video_core/textures/texture.h index d969bcdd9..ac3b110fc 100644 --- a/src/video_core/textures/texture.h +++ b/src/video_core/textures/texture.h | |||
| @@ -17,11 +17,32 @@ enum class TextureFormat : u32 { | |||
| 17 | DXT1 = 0x24, | 17 | DXT1 = 0x24, |
| 18 | }; | 18 | }; |
| 19 | 19 | ||
| 20 | enum class TextureType : u32 { | ||
| 21 | Texture1D = 0, | ||
| 22 | Texture2D = 1, | ||
| 23 | Texture3D = 2, | ||
| 24 | TextureCubemap = 3, | ||
| 25 | Texture1DArray = 4, | ||
| 26 | Texture2DArray = 5, | ||
| 27 | Texture1DBuffer = 6, | ||
| 28 | Texture2DNoMipmap = 7, | ||
| 29 | TextureCubeArray = 8, | ||
| 30 | }; | ||
| 31 | |||
| 32 | enum class TICHeaderVersion : u32 { | ||
| 33 | OneDBuffer = 0, | ||
| 34 | PitchColorKey = 1, | ||
| 35 | Pitch = 2, | ||
| 36 | BlockLinear = 3, | ||
| 37 | BlockLinearColorKey = 4, | ||
| 38 | }; | ||
| 39 | |||
| 20 | union TextureHandle { | 40 | union TextureHandle { |
| 21 | u32 raw; | 41 | u32 raw; |
| 22 | BitField<0, 20, u32> tic_id; | 42 | BitField<0, 20, u32> tic_id; |
| 23 | BitField<20, 12, u32> tsc_id; | 43 | BitField<20, 12, u32> tsc_id; |
| 24 | }; | 44 | }; |
| 45 | static_assert(sizeof(TextureHandle) == 4, "TextureHandle has wrong size"); | ||
| 25 | 46 | ||
| 26 | struct TICEntry { | 47 | struct TICEntry { |
| 27 | union { | 48 | union { |
| @@ -33,10 +54,15 @@ struct TICEntry { | |||
| 33 | BitField<16, 3, u32> a_type; | 54 | BitField<16, 3, u32> a_type; |
| 34 | }; | 55 | }; |
| 35 | u32 address_low; | 56 | u32 address_low; |
| 36 | u16 address_high; | 57 | union { |
| 37 | INSERT_PADDING_BYTES(6); | 58 | BitField<0, 16, u32> address_high; |
| 38 | u16 width_minus_1; | 59 | BitField<21, 3, TICHeaderVersion> header_version; |
| 39 | INSERT_PADDING_BYTES(2); | 60 | }; |
| 61 | INSERT_PADDING_BYTES(4); | ||
| 62 | union { | ||
| 63 | BitField<0, 16, u32> width_minus_1; | ||
| 64 | BitField<23, 4, TextureType> texture_type; | ||
| 65 | }; | ||
| 40 | u16 height_minus_1; | 66 | u16 height_minus_1; |
| 41 | INSERT_PADDING_BYTES(10); | 67 | INSERT_PADDING_BYTES(10); |
| 42 | 68 | ||