aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2024-11-12 04:09:38 +0100
committerLynne <dev@lynne.ee>2024-11-18 07:45:46 +0100
commit16fa7103402bfd204f3c5f08c45652afcd9a96cf (patch)
tree282c8d4870bc5320709c3e51b5b913b552db1cc4
parenta516b2da2256b0774b332d682a0ff062f4437576 (diff)
downloadffmpeg-16fa7103402bfd204f3c5f08c45652afcd9a96cf.tar.gz
vulkan: fix printing descriptors to shader for shaders with no descriptors
-rw-r--r--libavutil/vulkan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c
index 159165a19d..2813bc1af9 100644
--- a/libavutil/vulkan.c
+++ b/libavutil/vulkan.c
@@ -2135,7 +2135,7 @@ print:
/* Write shader info */
for (int i = 0; i < nb; i++) {
const struct descriptor_props *prop = &descriptor_props[desc[i].type];
- GLSLA("layout (set = %i, binding = %i", shd->nb_descriptor_sets - 1, i);
+ GLSLA("layout (set = %i, binding = %i", FFMAX(shd->nb_descriptor_sets - 1, 0), i);
if (desc[i].mem_layout)
GLSLA(", %s", desc[i].mem_layout);