vulkan: use correct signed image type for storage images

Using signed or unsigned integer formats/layouts requires that
"uimage" or "iimage" are used.
This commit is contained in:
Lynne 2024-10-10 05:24:32 +02:00
parent c982376076
commit 1addd0fdca
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464

View File

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