[vulkan] Replaced old logic for DescriptorType for a numeric handling per type to avoid mismatches during format binding

This commit is contained in:
CamilleLaVey 2026-03-05 21:45:38 -04:00 committed by lizzie
parent ee1ffbaf2e
commit 186c0b0cc7
6 changed files with 112 additions and 41 deletions

View file

@ -38,6 +38,12 @@ enum class TextureType : u32 {
};
constexpr u32 NUM_TEXTURE_TYPES = 9;
enum class NumericType : u8 {
Float,
SignedInt,
UnsignedInt,
};
enum class TexturePixelFormat {
A8B8G8R8_UNORM,
A8B8G8R8_SNORM,
@ -177,6 +183,7 @@ struct StorageBufferDescriptor {
};
struct TextureBufferDescriptor {
NumericType numeric_type;
bool has_secondary;
u32 cbuf_index;
u32 cbuf_offset;
@ -195,7 +202,7 @@ struct ImageBufferDescriptor {
ImageFormat format;
bool is_written;
bool is_read;
bool is_integer;
NumericType numeric_type;
u32 cbuf_index;
u32 cbuf_offset;
u32 count;
@ -209,6 +216,7 @@ struct TextureDescriptor {
TextureType type;
bool is_depth;
bool is_multisample;
NumericType numeric_type;
bool has_secondary;
u32 cbuf_index;
u32 cbuf_offset;
@ -228,7 +236,7 @@ struct ImageDescriptor {
ImageFormat format;
bool is_written;
bool is_read;
bool is_integer;
NumericType numeric_type;
u32 cbuf_index;
u32 cbuf_offset;
u32 count;