diff options
author | bunnei <bunneidev@gmail.com> | 2018-04-08 00:46:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-08 00:46:16 +0200 |
commit | 227bc78cbefef0866fc39db1383ea4f012583e11 (patch) | |
tree | 4b6979d7483cf98463afa394d2e11001e91aa195 /src/video_core/textures | |
parent | Merge pull request #315 from jroweboy/spelling-fix (diff) | |
parent | Fix clang format issues (diff) | |
download | yuzu-227bc78cbefef0866fc39db1383ea4f012583e11.tar yuzu-227bc78cbefef0866fc39db1383ea4f012583e11.tar.gz yuzu-227bc78cbefef0866fc39db1383ea4f012583e11.tar.bz2 yuzu-227bc78cbefef0866fc39db1383ea4f012583e11.tar.lz yuzu-227bc78cbefef0866fc39db1383ea4f012583e11.tar.xz yuzu-227bc78cbefef0866fc39db1383ea4f012583e11.tar.zst yuzu-227bc78cbefef0866fc39db1383ea4f012583e11.zip |
Diffstat (limited to 'src/video_core/textures')
-rw-r--r-- | src/video_core/textures/texture.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/video_core/textures/texture.h b/src/video_core/textures/texture.h index 07936f8a3..c12ed6e1d 100644 --- a/src/video_core/textures/texture.h +++ b/src/video_core/textures/texture.h @@ -37,6 +37,16 @@ enum class TICHeaderVersion : u32 { BlockLinearColorKey = 4, }; +enum class ComponentType : u32 { + SNORM = 1, + UNORM = 2, + SINT = 3, + UINT = 4, + SNORM_FORCE_FP16 = 5, + UNORM_FORCE_FP16 = 6, + FLOAT = 7 +}; + union TextureHandle { u32 raw; BitField<0, 20, u32> tic_id; @@ -48,10 +58,10 @@ struct TICEntry { union { u32 raw; BitField<0, 7, TextureFormat> format; - BitField<7, 3, u32> r_type; - BitField<10, 3, u32> g_type; - BitField<13, 3, u32> b_type; - BitField<16, 3, u32> a_type; + BitField<7, 3, ComponentType> r_type; + BitField<10, 3, ComponentType> g_type; + BitField<13, 3, ComponentType> b_type; + BitField<16, 3, ComponentType> a_type; }; u32 address_low; union { @@ -77,6 +87,11 @@ struct TICEntry { u32 Height() const { return height_minus_1 + 1; } + + bool IsTiled() const { + return header_version == TICHeaderVersion::BlockLinear || + header_version == TICHeaderVersion::BlockLinearColorKey; + } }; static_assert(sizeof(TICEntry) == 0x20, "TICEntry has wrong size"); |