[FFmpeg-devel] [PATCH v3 04/10] vulkan: fix printing descriptors to shader for shaders with no descriptors

Lynne dev at lynne.ee
Fri Nov 15 06:50:08 EET 2024


---
 libavutil/vulkan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
-- 
2.45.2.753.g447d99e1c3b


More information about the ffmpeg-devel mailing list