From ece7aa6136a5c0e2d2c20f8e13d226673138f057 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Mon, 16 Sep 2024 02:30:25 +0200 Subject: [PATCH] Set BVHs in descriptor sets --- Sources/integrations/kope.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Sources/integrations/kope.c b/Sources/integrations/kope.c index d2cdda1..7c56df3 100644 --- a/Sources/integrations/kope.c +++ b/Sources/integrations/kope.c @@ -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; @@ -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) {