summaryrefslogtreecommitdiffstats
path: root/src/video_core/textures/texture.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-09-08 22:14:46 +0200
committerGitHub <noreply@github.com>2018-09-08 22:14:46 +0200
commitaf074ee422a5350a3adb7586fab3c3fb5ed6bdc4 (patch)
tree6425e9818766c88b2fe33aa559b4815b3f6cf9f1 /src/video_core/textures/texture.h
parentMerge pull request #1265 from zhaowenlan1779/patch-1 (diff)
parentgl_rasterizer_cache: Improve accuracy of RecreateSurface for non-2D textures. (diff)
downloadyuzu-af074ee422a5350a3adb7586fab3c3fb5ed6bdc4.tar
yuzu-af074ee422a5350a3adb7586fab3c3fb5ed6bdc4.tar.gz
yuzu-af074ee422a5350a3adb7586fab3c3fb5ed6bdc4.tar.bz2
yuzu-af074ee422a5350a3adb7586fab3c3fb5ed6bdc4.tar.lz
yuzu-af074ee422a5350a3adb7586fab3c3fb5ed6bdc4.tar.xz
yuzu-af074ee422a5350a3adb7586fab3c3fb5ed6bdc4.tar.zst
yuzu-af074ee422a5350a3adb7586fab3c3fb5ed6bdc4.zip
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 {
BitField<0, 16, u32> width_minus_1;
BitField<23, 4, TextureType> texture_type;
};
- u16 height_minus_1;
- INSERT_PADDING_BYTES(10);
+ union {
+ BitField<0, 16, u32> height_minus_1;
+ BitField<16, 15, u32> depth_minus_1;
+ };
+
+ INSERT_PADDING_BYTES(8);
GPUVAddr Address() const {
return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) | address_low);
@@ -192,6 +196,10 @@ struct TICEntry {
return height_minus_1 + 1;
}
+ u32 Depth() const {
+ return depth_minus_1 + 1;
+ }
+
u32 BlockHeight() const {
ASSERT(header_version == TICHeaderVersion::BlockLinear ||
header_version == TICHeaderVersion::BlockLinearColorKey);