summaryrefslogtreecommitdiff
path: root/src/video_core/textures/texture.h
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-05-23 04:28:34 -0300
committerGravatar ameerj2021-07-22 21:51:30 -0400
commitd621e96d0de212cc16897eadf71e8a1b2e1eb5dc (patch)
tree8695f2f4dddf2564b63e4574d6616ccb0e79568c /src/video_core/textures/texture.h
parentspirv: Be aware of NAN unaware drivers (diff)
downloadyuzu-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.h9
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};
155static_assert(sizeof(TextureHandle) == 4, "TextureHandle has wrong size"); 155static_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
157struct TICEntry { 166struct TICEntry {
158 union { 167 union {
159 struct { 168 struct {