diff options
author | Subv <subv2112@gmail.com> | 2018-03-29 20:12:53 +0200 |
---|---|---|
committer | James Rowe <jroweboy@gmail.com> | 2018-04-07 04:44:46 +0200 |
commit | dcc27d6dc1153cf0d9ed33a210d46e4111e13e8b (patch) | |
tree | 3039df6c723820c87fa748912ed02432621e5c7b | |
parent | GL: Set up the textures used for each draw call. (diff) | |
download | yuzu-dcc27d6dc1153cf0d9ed33a210d46e4111e13e8b.tar yuzu-dcc27d6dc1153cf0d9ed33a210d46e4111e13e8b.tar.gz yuzu-dcc27d6dc1153cf0d9ed33a210d46e4111e13e8b.tar.bz2 yuzu-dcc27d6dc1153cf0d9ed33a210d46e4111e13e8b.tar.lz yuzu-dcc27d6dc1153cf0d9ed33a210d46e4111e13e8b.tar.xz yuzu-dcc27d6dc1153cf0d9ed33a210d46e4111e13e8b.tar.zst yuzu-dcc27d6dc1153cf0d9ed33a210d46e4111e13e8b.zip |
-rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 2 | ||||
-rw-r--r-- | src/video_core/textures/texture.h | 18 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 124753032..2d7c3152f 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -231,6 +231,8 @@ Texture::TICEntry Maxwell3D::GetTICEntry(u32 tic_index) const { // TODO(Subv): Different data types for separate components are not supported ASSERT(r_type == g_type && r_type == b_type && r_type == a_type); + // TODO(Subv): Only UNORM formats are supported for now. + ASSERT(r_type == Texture::ComponentType::UNORM); return tic_entry; } 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 { |