History

vulkan: use correct signed image type for storage images

Using signed or unsigned integer formats/layouts requires that "uimage" or "iimage" are used.

Lynne committed 2 years ago

Commit 1addd0f1 parent c9823761 file · +15 −2Browse files

Unified · Split

libavutil/vulkan.c+15−2
@@ -2005,8 +2005,21 @@ print: · 2004 unmodified lines
20052005 if (prop->mem_quali && desc[i].mem_quali)
20062006 GLSLA(" %s", desc[i].mem_quali);
20072007
2008− if (prop->type)
2009− GLSLA(" %s", prop->type);
2008+ if (prop->type) {
2009+ GLSLA(" ");
2010+ if (desc[i].type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) {
2011+ if (desc[i].mem_layout) {
2012+ int len = strlen(desc[i].mem_layout);
2013+ if (desc[i].mem_layout[len - 1] == 'i' &&
2014+ desc[i].mem_layout[len - 2] == 'u') {
2015+ GLSLA("u");
2016+ } else if (desc[i].mem_layout[len - 1] == 'i') {
2017+ GLSLA("i");
2018+ }
2019+ }
2020+ }
2021+ GLSLA("%s", prop->type);
2022+ }
20102023
20112024 if (prop->dim_needed)
20122025 GLSLA("%iD", desc[i].dimensions);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t