Skip to content

Commit

Permalink
Set BVHs in descriptor sets
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Sep 16, 2024
1 parent ddedd3c commit ece7aa6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Sources/integrations/kope.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,9 @@ void kope_export(char *directory, api_kind api) {
case DEFINITION_CONST_CUSTOM:
fprintf(output, "\tkope_g5_buffer *%s;\n", get_name(get_global(d.global)->name));
break;
case DEFINITION_BVH:
fprintf(output, "\tkope_g5_buffer *%s;\n", get_name(get_global(d.global)->name));
break;
case DEFINITION_TEX2D:
fprintf(output, "\tkope_g5_texture *%s;\n", get_name(get_global(d.global)->name));
break;
Expand Down Expand Up @@ -876,6 +879,12 @@ void kope_export(char *directory, api_kind api) {
fprintf(output, "\tset->%s = parameters->%s;\n", get_name(get_global(d.global)->name), get_name(get_global(d.global)->name));
other_index += 1;
break;
case DEFINITION_BVH:
fprintf(output, "\tkope_d3d12_descriptor_set_set_buffer_view_srv(device, &set->set, parameters->%s, %" PRIu64 ");\n",
get_name(get_global(d.global)->name), other_index);
fprintf(output, "\tset->%s = parameters->%s;\n", get_name(get_global(d.global)->name), get_name(get_global(d.global)->name));
other_index += 1;
break;
case DEFINITION_TEX2D: {
attribute *write_attribute = find_attribute(&get_global(d.global)->attributes, add_name("write"));
if (write_attribute != NULL) {
Expand Down

0 comments on commit ece7aa6

Please sign in to comment.