diff options
| author | 2021-05-23 04:28:34 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:30 -0400 | |
| commit | d621e96d0de212cc16897eadf71e8a1b2e1eb5dc (patch) | |
| tree | 8695f2f4dddf2564b63e4574d6616ccb0e79568c /src/video_core/textures/texture.h | |
| parent | spirv: Be aware of NAN unaware drivers (diff) | |
| download | yuzu-d621e96d0de212cc16897eadf71e8a1b2e1eb5dc.tar.gz yuzu-d621e96d0de212cc16897eadf71e8a1b2e1eb5dc.tar.xz yuzu-d621e96d0de212cc16897eadf71e8a1b2e1eb5dc.zip | |
shader: Initial OpenGL implementation
Diffstat (limited to 'src/video_core/textures/texture.h')
| -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 { |