You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
vulkan: enable using .elems field for buffer content definitions
This avoids needing to snprintf when the buffer only contains an array of a struct, while letting the validation layers detect errors more reliably.
This commit is contained in:
@@ -2188,10 +2188,18 @@ print:
|
|||||||
|
|
||||||
GLSLA(" %s", desc[i].name);
|
GLSLA(" %s", desc[i].name);
|
||||||
|
|
||||||
if (prop->buf_content)
|
if (prop->buf_content) {
|
||||||
GLSLA(" {\n %s\n}", desc[i].buf_content);
|
GLSLA(" {\n ");
|
||||||
else if (desc[i].elems > 0)
|
if (desc[i].elems) {
|
||||||
|
GLSLA("%s", desc[i].buf_content);
|
||||||
|
GLSLA("[%i];", desc[i].elems);
|
||||||
|
} else {
|
||||||
|
GLSLA("%s", desc[i].buf_content);
|
||||||
|
}
|
||||||
|
GLSLA("\n}");
|
||||||
|
} else if (desc[i].elems > 0) {
|
||||||
GLSLA("[%i]", desc[i].elems);
|
GLSLA("[%i]", desc[i].elems);
|
||||||
|
}
|
||||||
|
|
||||||
GLSLA(";");
|
GLSLA(";");
|
||||||
GLSLA("\n");
|
GLSLA("\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user