Store the original VkFormat as anv_format::vk_format. This will be used
to reduce format indirection, such as lookups into the VkFormat ->
anv_format translation table.
#define UNSUPPORTED 0xffff
#define fmt(__vk_fmt, ...) \
- [__vk_fmt] = { .name = #__vk_fmt, __VA_ARGS__ }
+ [__vk_fmt] = { .vk_format = __vk_fmt, .name = #__vk_fmt, __VA_ARGS__ }
static const struct anv_format anv_formats[] = {
fmt(VK_FORMAT_UNDEFINED, RAW, .cpp = 1, .num_channels = 1),
void anv_compiler_free(struct anv_pipeline *pipeline);
struct anv_format {
+ const VkFormat vk_format;
const char *name;
uint16_t surface_format; /**< RENDER_SURFACE_STATE.SurfaceFormat */
uint8_t cpp; /**< Bytes-per-pixel of anv_format::surface_format. */