mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 12:32:52 +00:00
GPU: Assert when finding a texture with a format type other than UNORM.
This commit is contained in:
parent
b0ca330e14
commit
dcc27d6dc1
|
@ -231,6 +231,8 @@ Texture::TICEntry Maxwell3D::GetTICEntry(u32 tic_index) const {
|
||||||
|
|
||||||
// TODO(Subv): Different data types for separate components are not supported
|
// TODO(Subv): Different data types for separate components are not supported
|
||||||
ASSERT(r_type == g_type && r_type == b_type && r_type == a_type);
|
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;
|
return tic_entry;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,16 @@ enum class TICHeaderVersion : u32 {
|
||||||
BlockLinearColorKey = 4,
|
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 {
|
union TextureHandle {
|
||||||
u32 raw;
|
u32 raw;
|
||||||
BitField<0, 20, u32> tic_id;
|
BitField<0, 20, u32> tic_id;
|
||||||
|
@ -48,10 +58,10 @@ struct TICEntry {
|
||||||
union {
|
union {
|
||||||
u32 raw;
|
u32 raw;
|
||||||
BitField<0, 7, TextureFormat> format;
|
BitField<0, 7, TextureFormat> format;
|
||||||
BitField<7, 3, u32> r_type;
|
BitField<7, 3, ComponentType> r_type;
|
||||||
BitField<10, 3, u32> g_type;
|
BitField<10, 3, ComponentType> g_type;
|
||||||
BitField<13, 3, u32> b_type;
|
BitField<13, 3, ComponentType> b_type;
|
||||||
BitField<16, 3, u32> a_type;
|
BitField<16, 3, ComponentType> a_type;
|
||||||
};
|
};
|
||||||
u32 address_low;
|
u32 address_low;
|
||||||
union {
|
union {
|
||||||
|
|
Loading…
Reference in a new issue