vulkan: fix printing descriptors to shader for shaders with no descriptors

This commit is contained in:
Lynne 2024-11-12 04:09:38 +01:00
parent a516b2da22
commit 16fa710340
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464
1 changed files with 1 additions and 1 deletions

View File

@ -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);