diff options
Diffstat (limited to 'src/video_core/textures')
| -rw-r--r-- | src/video_core/textures/texture.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/textures/texture.h b/src/video_core/textures/texture.h index c1d14335e..1a9399455 100644 --- a/src/video_core/textures/texture.h +++ b/src/video_core/textures/texture.h | |||
| @@ -154,6 +154,15 @@ union TextureHandle { | |||
| 154 | }; | 154 | }; |
| 155 | static_assert(sizeof(TextureHandle) == 4, "TextureHandle has wrong size"); | 155 | static_assert(sizeof(TextureHandle) == 4, "TextureHandle has wrong size"); |
| 156 | 156 | ||
| 157 | [[nodiscard]] inline std::pair<u32, u32> TexturePair(u32 raw, bool via_header_index) { | ||
| 158 | if (via_header_index) { | ||
| 159 | return {raw, raw}; | ||
| 160 | } else { | ||
| 161 | const Tegra::Texture::TextureHandle handle{raw}; | ||
| 162 | return {handle.tic_id, via_header_index ? handle.tic_id : handle.tsc_id}; | ||
| 163 | } | ||
| 164 | } | ||
| 165 | |||
| 157 | struct TICEntry { | 166 | struct TICEntry { |
| 158 | union { | 167 | union { |
| 159 | struct { | 168 | struct { |