Skip to content

Commit

Permalink
vulkan: fix printing descriptors to shader for shaders with no descri…
Browse files Browse the repository at this point in the history
…ptors
  • Loading branch information
cyanreg committed Nov 18, 2024
1 parent a516b2d commit 16fa710
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavutil/vulkan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2135,7 +2135,7 @@ int ff_vk_shader_add_descriptor_set(FFVulkanContext *s, FFVulkanShader *shd,
/* 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);
Expand Down

0 comments on commit 16fa710

Please sign in to comment.