[FFmpeg-cvslog] vulkan: use correct signed image type for storage images
Lynne
git at videolan.org
Sat Oct 12 00:55:04 EEST 2024
ffmpeg | branch: master | Lynne <dev at lynne.ee> | Thu Oct 10 05:24:32 2024 +0200| [1addd0fdca14b354d85dc6f002813c015c5ef3cb] | committer: Lynne
vulkan: use correct signed image type for storage images
Using signed or unsigned integer formats/layouts requires that
"uimage" or "iimage" are used.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1addd0fdca14b354d85dc6f002813c015c5ef3cb
---
libavutil/vulkan.c | 17 +++++++++++++++--
1 file 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);
More information about the ffmpeg-cvslog
mailing list