diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-04-28 06:01:22 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-06-21 02:36:12 +0200 |
commit | b8c75a845b1784045a10fa8b5f1f57f2ec53eeca (patch) | |
tree | b71f71b5d3d8c3d12556e3fbf9344dbb9e8f220c /src/video_core/textures/texture.h | |
parent | gl_shader_decompiler: Allow 1D textures to be texture buffers (diff) | |
download | yuzu-b8c75a845b1784045a10fa8b5f1f57f2ec53eeca.tar yuzu-b8c75a845b1784045a10fa8b5f1f57f2ec53eeca.tar.gz yuzu-b8c75a845b1784045a10fa8b5f1f57f2ec53eeca.tar.bz2 yuzu-b8c75a845b1784045a10fa8b5f1f57f2ec53eeca.tar.lz yuzu-b8c75a845b1784045a10fa8b5f1f57f2ec53eeca.tar.xz yuzu-b8c75a845b1784045a10fa8b5f1f57f2ec53eeca.tar.zst yuzu-b8c75a845b1784045a10fa8b5f1f57f2ec53eeca.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/textures/texture.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/video_core/textures/texture.h b/src/video_core/textures/texture.h index f22b4e7c7..ddeed73d0 100644 --- a/src/video_core/textures/texture.h +++ b/src/video_core/textures/texture.h @@ -172,12 +172,16 @@ struct TICEntry { BitField<26, 1, u32> use_header_opt_control; BitField<27, 1, u32> depth_texture; BitField<28, 4, u32> max_mip_level; + + BitField<0, 16, u32> buffer_high_width_minus_one; }; union { BitField<0, 16, u32> width_minus_1; BitField<22, 1, u32> srgb_conversion; BitField<23, 4, TextureType> texture_type; BitField<29, 3, u32> border_size; + + BitField<0, 16, u32> buffer_low_width_minus_one; }; union { BitField<0, 16, u32> height_minus_1; @@ -206,7 +210,10 @@ struct TICEntry { } u32 Width() const { - return width_minus_1 + 1; + if (header_version != TICHeaderVersion::OneDBuffer) { + return width_minus_1 + 1; + } + return (buffer_high_width_minus_one << 16) | buffer_low_width_minus_one; } u32 Height() const { @@ -237,6 +244,15 @@ struct TICEntry { header_version == TICHeaderVersion::BlockLinearColorKey; } + bool IsLineal() const { + return header_version == TICHeaderVersion::Pitch || + header_version == TICHeaderVersion::PitchColorKey; + } + + bool IsBuffer() const { + return header_version == TICHeaderVersion::OneDBuffer; + } + bool IsSrgbConversionEnabled() const { return srgb_conversion != 0; } |