anv/formats: Add fields for block dimensions
A non-compressed texture is a 1x1x1 block. Compressed textures could have values which vary in different dimensions WxHxD. Reviewed-by: Chad Versace <chad.versace@intel.com>
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
#define UNSUPPORTED 0xffff
|
||||
|
||||
#define fmt(__vk_fmt, __hw_fmt, ...) \
|
||||
[__vk_fmt] = { .vk_format = __vk_fmt, .name = #__vk_fmt, .surface_format = __hw_fmt, __VA_ARGS__ }
|
||||
[__vk_fmt] = { .vk_format = __vk_fmt, .name = #__vk_fmt, .surface_format = __hw_fmt, .bw = 1, .bh = 1, .bd = 1, __VA_ARGS__ }
|
||||
|
||||
static const struct anv_format anv_formats[] = {
|
||||
fmt(VK_FORMAT_UNDEFINED, RAW, .bs = 1, .num_channels = 1),
|
||||
|
||||
@@ -1208,6 +1208,9 @@ struct anv_format {
|
||||
const char *name;
|
||||
uint16_t surface_format; /**< RENDER_SURFACE_STATE.SurfaceFormat */
|
||||
uint8_t bs; /**< Block size (in bytes) of anv_format::surface_format. */
|
||||
uint8_t bw; /**< Block width of anv_format::surface_format. */
|
||||
uint8_t bh; /**< Block height of anv_format::surface_format. */
|
||||
uint8_t bd; /**< Block depth of anv_format::surface_format. */
|
||||
uint8_t num_channels;
|
||||
uint16_t depth_format; /**< 3DSTATE_DEPTH_BUFFER.SurfaceFormat */
|
||||
bool has_stencil;
|
||||
|
||||
Reference in New Issue
Block a user