diff options
author | Jason Ekstrand <[email protected]> | 2015-06-02 11:03:22 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-06-02 11:30:39 -0700 |
commit | e702197e3fdc46f3dea72211cbde4a9812371d9f (patch) | |
tree | c4e8736f09b034b419f0c2eeacd6d6bbf06ed152 /src/vulkan | |
parent | fbafc946c60f16ffa128ec8c310991d533a6febf (diff) |
vk/formats: Add a name to the metadata and better logging
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/formats.c | 14 | ||||
-rw-r--r-- | src/vulkan/private.h | 1 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/vulkan/formats.c b/src/vulkan/formats.c index fb491d07327..c5e52c47b5f 100644 --- a/src/vulkan/formats.c +++ b/src/vulkan/formats.c @@ -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, diff --git a/src/vulkan/private.h b/src/vulkan/private.h index 5ae39cf7cc9..1a6c3e0ca2f 100644 --- a/src/vulkan/private.h +++ b/src/vulkan/private.h @@ -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; |