From 8c644dd120c63244f4b576b45cd4ae96842736f8 Mon Sep 17 00:00:00 2001 From: quou Date: Sun, 9 Feb 2025 18:49:00 +1100 Subject: support for structured buffers --- editor.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'editor.cpp') diff --git a/editor.cpp b/editor.cpp index 455b194..c4c18d0 100644 --- a/editor.cpp +++ b/editor.cpp @@ -189,7 +189,8 @@ static void init_pso_view(UI::Element* content, const Pipeline* pso) { auto table = ui->create_element(tree, rows); disp_enum(table, "Type", (int)d.type, "Texture", - "Constant Buffer" + "Constant Buffer", + "Structured Buffer" ); switch (d.type) { case Descriptor::Type::texture: { @@ -198,9 +199,10 @@ static void init_pso_view(UI::Element* content, const Pipeline* pso) { disp_val(table, "Texture ID", "%d", (int)tex.texture.index); disp_val(table, "Sampler ID", "%d", (int)tex.sampler.index); } break; - case Descriptor::Type::constant_buffer: { - Constant_Buffer_Descriptor& cb = - *(Constant_Buffer_Descriptor*)d.payload; + case Descriptor::Type::constant_buffer: + case Descriptor::Type::structured_buffer: { + Buffer_Descriptor& cb = + *(Buffer_Descriptor*)d.payload; disp_val(table, "Offset", "%d", cb.offset); disp_val(table, "Size", "%d", cb.size); disp_val(table, "Buffer ID", "%d", (int)cb.buffer.index); -- cgit v1.2.3-54-g00ecf