summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines/fermi_2d.h
diff options
context:
space:
mode:
authorFernandoS27 <fsahmkow27@gmail.com>2018-10-08 20:34:55 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2018-10-10 03:14:32 +0200
commitaf653906d0cf38556acae1f8e5d3f8968ff7074a (patch)
tree55197afb627984e1756a885a9c4df9b0091d923c /src/video_core/engines/fermi_2d.h
parentMerge pull request #1423 from DarkLordZach/romfs-file-exts (diff)
downloadyuzu-af653906d0cf38556acae1f8e5d3f8968ff7074a.tar
yuzu-af653906d0cf38556acae1f8e5d3f8968ff7074a.tar.gz
yuzu-af653906d0cf38556acae1f8e5d3f8968ff7074a.tar.bz2
yuzu-af653906d0cf38556acae1f8e5d3f8968ff7074a.tar.lz
yuzu-af653906d0cf38556acae1f8e5d3f8968ff7074a.tar.xz
yuzu-af653906d0cf38556acae1f8e5d3f8968ff7074a.tar.zst
yuzu-af653906d0cf38556acae1f8e5d3f8968ff7074a.zip
Diffstat (limited to 'src/video_core/engines/fermi_2d.h')
-rw-r--r--src/video_core/engines/fermi_2d.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/video_core/engines/fermi_2d.h b/src/video_core/engines/fermi_2d.h
index 81d15c62a..2a6e8bbbb 100644
--- a/src/video_core/engines/fermi_2d.h
+++ b/src/video_core/engines/fermi_2d.h
@@ -36,9 +36,9 @@ public:
RenderTargetFormat format;
BitField<0, 1, u32> linear;
union {
- BitField<0, 4, u32> block_depth;
+ BitField<0, 4, u32> block_width;
BitField<4, 4, u32> block_height;
- BitField<8, 4, u32> block_width;
+ BitField<8, 4, u32> block_depth;
};
u32 depth;
u32 layer;
@@ -53,10 +53,20 @@ public:
address_low);
}
+ u32 BlockWidth() const {
+ // The block width is stored in log2 format.
+ return 1 << block_width;
+ }
+
u32 BlockHeight() const {
// The block height is stored in log2 format.
return 1 << block_height;
}
+
+ u32 BlockDepth() const {
+ // The block depth is stored in log2 format.
+ return 1 << block_depth;
+ }
};
static_assert(sizeof(Surface) == 0x28, "Surface has incorrect size");