mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 15:30:50 +00:00
[vkgen] Shorten "qfv_*" enum names
The up-coming changes to push constant handling has qfv_float etc type enum values and using "float" instead of "qfv_float" is highly desirable as the names match the glsl type names.
This commit is contained in:
parent
57da924c1b
commit
bcfb2ad182
1 changed files with 9 additions and 5 deletions
|
@ -22,8 +22,11 @@ typedef enum VkBool32 {
|
|||
end = "_FLAG_BITS_MAX_ENUM_EXT";
|
||||
} else if (str_mid([self name], -3) == "KHR") {
|
||||
end = "_MAX_ENUM_KHR";
|
||||
} else if (str_mid([self name], 0, 4) == "qfv_") {
|
||||
prefix = "qfv_";
|
||||
}
|
||||
len = -strlen (end);
|
||||
if (!prefix) {
|
||||
for (int i = 0; i < type.strct.num_fields; i++) {
|
||||
qfot_var_t *var = &type.strct.fields[i];
|
||||
if (str_mid (var.name, len) == end) {
|
||||
|
@ -31,6 +34,7 @@ typedef enum VkBool32 {
|
|||
prefix = str_hold (str_mid (var.name, 0, len + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (prefix) {
|
||||
prefix_length = strlen (prefix);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue