vk/formats: Add a name to the metadata and better logging
This commit is contained in:
+13
-1
@@ -26,7 +26,7 @@
|
||||
#define UNSUPPORTED 0xffff
|
||||
|
||||
#define fmt(__vk_fmt, ...) \
|
||||
[VK_FORMAT_##__vk_fmt] = { __VA_ARGS__ }
|
||||
[VK_FORMAT_##__vk_fmt] = { .name = "VK_FORMAT_" #__vk_fmt, __VA_ARGS__ }
|
||||
|
||||
static const struct anv_format anv_formats[] = {
|
||||
fmt(UNDEFINED, .format = RAW, .cpp = 1, .channels = 1),
|
||||
@@ -234,6 +234,18 @@ struct surface_format_info {
|
||||
|
||||
extern const struct surface_format_info surface_formats[];
|
||||
|
||||
VkResult anv_validate_GetFormatInfo(
|
||||
VkDevice _device,
|
||||
VkFormat _format,
|
||||
VkFormatInfoType infoType,
|
||||
size_t* pDataSize,
|
||||
void* pData)
|
||||
{
|
||||
const struct anv_format *format = anv_format_for_vk_format(_format);
|
||||
fprintf(stderr, "vkGetFormatInfo(%s)\n", format->name);
|
||||
return anv_GetFormatInfo(_device, _format, infoType, pDataSize, pData);
|
||||
}
|
||||
|
||||
VkResult anv_GetFormatInfo(
|
||||
VkDevice _device,
|
||||
VkFormat _format,
|
||||
|
||||
@@ -716,6 +716,7 @@ int anv_compiler_run(struct anv_compiler *compiler, struct anv_pipeline *pipelin
|
||||
void anv_compiler_free(struct anv_pipeline *pipeline);
|
||||
|
||||
struct anv_format {
|
||||
const char * name;
|
||||
uint16_t format;
|
||||
uint8_t cpp;
|
||||
uint8_t channels;
|
||||
|
||||
Reference in New Issue
Block a user