Skip to content

Commit

Permalink
Only make attributed constants indexable
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Oct 4, 2024
1 parent cf270ef commit b917239
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Sources/integrations/kope.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,9 +707,12 @@ void kope_export(char *directory, api_kind api) {
fprintf(output, "void kong_set_descriptor_set_%s(kope_g5_command_list *list, %s_set *set", get_name(set->name), get_name(set->name));
for (size_t definition_index = 0; definition_index < set->definitions_count; ++definition_index) {
definition d = set->definitions[definition_index];

switch (d.kind) {
case DEFINITION_CONST_CUSTOM:
fprintf(output, ", uint32_t %s_index", get_name(get_global(d.global)->name));
if (has_attribute(&get_global(d.global)->attributes, add_name("indexed"))) {
fprintf(output, ", uint32_t %s_index", get_name(get_global(d.global)->name));
}
break;
}
}
Expand Down Expand Up @@ -1081,7 +1084,9 @@ void kope_export(char *directory, api_kind api) {
definition d = set->definitions[definition_index];
switch (d.kind) {
case DEFINITION_CONST_CUSTOM:
fprintf(output, ", uint32_t %s_index", get_name(get_global(d.global)->name));
if (has_attribute(&get_global(d.global)->attributes, add_name("indexed"))) {
fprintf(output, ", uint32_t %s_index", get_name(get_global(d.global)->name));
}
break;
}
}
Expand Down

0 comments on commit b917239

Please sign in to comment.