From dcc27d6dc1153cf0d9ed33a210d46e4111e13e8b Mon Sep 17 00:00:00 2001 From: Subv Date: Thu, 29 Mar 2018 13:12:53 -0500 Subject: GPU: Assert when finding a texture with a format type other than UNORM. --- src/video_core/textures/texture.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/video_core/textures') diff --git a/src/video_core/textures/texture.h b/src/video_core/textures/texture.h index 1145e39f8..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 { -- cgit v1.2.3