summaryrefslogtreecommitdiff
path: root/src/video_core/textures/texture.h
diff options
context:
space:
mode:
authorGravatar bunnei2018-09-04 22:00:24 -0400
committerGravatar bunnei2018-09-08 02:53:38 -0400
commitce8291f6c5a7e0dba5e7d72e94de06bf4423d539 (patch)
tree2012ec97e3014c2fb9e3df67d9c39545c131ddd4 /src/video_core/textures/texture.h
parentgl_rasterizer_cache: Remove impl. of FlushGLBuffer. (diff)
downloadyuzu-ce8291f6c5a7e0dba5e7d72e94de06bf4423d539.tar.gz
yuzu-ce8291f6c5a7e0dba5e7d72e94de06bf4423d539.tar.xz
yuzu-ce8291f6c5a7e0dba5e7d72e94de06bf4423d539.zip
gl_rasterizer_cache: Track texture depth.
Diffstat (limited to 'src/video_core/textures/texture.h')
-rw-r--r--src/video_core/textures/texture.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/video_core/textures/texture.h b/src/video_core/textures/texture.h
index c6bd2f4b9..c2fb824b2 100644
--- a/src/video_core/textures/texture.h
+++ b/src/video_core/textures/texture.h
@@ -170,8 +170,12 @@ struct TICEntry {
170 BitField<0, 16, u32> width_minus_1; 170 BitField<0, 16, u32> width_minus_1;
171 BitField<23, 4, TextureType> texture_type; 171 BitField<23, 4, TextureType> texture_type;
172 }; 172 };
173 u16 height_minus_1; 173 union {
174 INSERT_PADDING_BYTES(10); 174 BitField<0, 16, u32> height_minus_1;
175 BitField<16, 15, u32> depth_minus_1;
176 };
177
178 INSERT_PADDING_BYTES(8);
175 179
176 GPUVAddr Address() const { 180 GPUVAddr Address() const {
177 return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) | address_low); 181 return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) | address_low);
@@ -192,6 +196,10 @@ struct TICEntry {
192 return height_minus_1 + 1; 196 return height_minus_1 + 1;
193 } 197 }
194 198
199 u32 Depth() const {
200 return depth_minus_1 + 1;
201 }
202
195 u32 BlockHeight() const { 203 u32 BlockHeight() const {
196 ASSERT(header_version == TICHeaderVersion::BlockLinear || 204 ASSERT(header_version == TICHeaderVersion::BlockLinear ||
197 header_version == TICHeaderVersion::BlockLinearColorKey); 205 header_version == TICHeaderVersion::BlockLinearColorKey);