diff options
author | Lynne <dev@lynne.ee> | 2024-10-10 05:24:32 +0200 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2024-10-11 23:54:22 +0200 |
commit | 1addd0fdca14b354d85dc6f002813c015c5ef3cb (patch) | |
tree | f2072e9d033a7024983ee9706744845a84ed7ee7 /libavutil/vulkan.c | |
parent | c982376076b6c433077c631e54b731778f90c5c8 (diff) | |
download | ffmpeg-1addd0fdca14b354d85dc6f002813c015c5ef3cb.tar.gz |
vulkan: use correct signed image type for storage images
Using signed or unsigned integer formats/layouts requires that
"uimage" or "iimage" are used.
Diffstat (limited to 'libavutil/vulkan.c')
-rw-r--r-- | libavutil/vulkan.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index ba79387c6f..724d633bf9 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -2005,8 +2005,21 @@ print: if (prop->mem_quali && desc[i].mem_quali) GLSLA(" %s", desc[i].mem_quali); - if (prop->type) - GLSLA(" %s", prop->type); + if (prop->type) { + GLSLA(" "); + if (desc[i].type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) { + if (desc[i].mem_layout) { + int len = strlen(desc[i].mem_layout); + if (desc[i].mem_layout[len - 1] == 'i' && + desc[i].mem_layout[len - 2] == 'u') { + GLSLA("u"); + } else if (desc[i].mem_layout[len - 1] == 'i') { + GLSLA("i"); + } + } + } + GLSLA("%s", prop->type); + } if (prop->dim_needed) GLSLA("%iD", desc[i].dimensions); |