diff options
Diffstat (limited to 'src/video_core/textures/texture.h')
| -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 { | |||
| 172 | BitField<26, 1, u32> use_header_opt_control; | 172 | BitField<26, 1, u32> use_header_opt_control; |
| 173 | BitField<27, 1, u32> depth_texture; | 173 | BitField<27, 1, u32> depth_texture; |
| 174 | BitField<28, 4, u32> max_mip_level; | 174 | BitField<28, 4, u32> max_mip_level; |
| 175 | |||
| 176 | BitField<0, 16, u32> buffer_high_width_minus_one; | ||
| 175 | }; | 177 | }; |
| 176 | union { | 178 | union { |
| 177 | BitField<0, 16, u32> width_minus_1; | 179 | BitField<0, 16, u32> width_minus_1; |
| 178 | BitField<22, 1, u32> srgb_conversion; | 180 | BitField<22, 1, u32> srgb_conversion; |
| 179 | BitField<23, 4, TextureType> texture_type; | 181 | BitField<23, 4, TextureType> texture_type; |
| 180 | BitField<29, 3, u32> border_size; | 182 | BitField<29, 3, u32> border_size; |
| 183 | |||
| 184 | BitField<0, 16, u32> buffer_low_width_minus_one; | ||
| 181 | }; | 185 | }; |
| 182 | union { | 186 | union { |
| 183 | BitField<0, 16, u32> height_minus_1; | 187 | BitField<0, 16, u32> height_minus_1; |
| @@ -206,7 +210,10 @@ struct TICEntry { | |||
| 206 | } | 210 | } |
| 207 | 211 | ||
| 208 | u32 Width() const { | 212 | u32 Width() const { |
| 209 | return width_minus_1 + 1; | 213 | if (header_version != TICHeaderVersion::OneDBuffer) { |
| 214 | return width_minus_1 + 1; | ||
| 215 | } | ||
| 216 | return (buffer_high_width_minus_one << 16) | buffer_low_width_minus_one; | ||
| 210 | } | 217 | } |
| 211 | 218 | ||
| 212 | u32 Height() const { | 219 | u32 Height() const { |
| @@ -237,6 +244,15 @@ struct TICEntry { | |||
| 237 | header_version == TICHeaderVersion::BlockLinearColorKey; | 244 | header_version == TICHeaderVersion::BlockLinearColorKey; |
| 238 | } | 245 | } |
| 239 | 246 | ||
| 247 | bool IsLineal() const { | ||
| 248 | return header_version == TICHeaderVersion::Pitch || | ||
| 249 | header_version == TICHeaderVersion::PitchColorKey; | ||
| 250 | } | ||
| 251 | |||
| 252 | bool IsBuffer() const { | ||
| 253 | return header_version == TICHeaderVersion::OneDBuffer; | ||
| 254 | } | ||
| 255 | |||
| 240 | bool IsSrgbConversionEnabled() const { | 256 | bool IsSrgbConversionEnabled() const { |
| 241 | return srgb_conversion != 0; | 257 | return srgb_conversion != 0; |
| 242 | } | 258 | } |