From 98bcfec0f3a44af8f2adbe8cca26f3cd27c3364b Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 2 Jan 2018 20:20:52 +0100 Subject: [PATCH] [dxbc] More debug info for constant buffers --- src/dxbc/dxbc_compiler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index 32739d50..02a25c94 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -516,8 +516,12 @@ namespace dxvk { // SPIR-V requires us to put that array into a // struct and decorate that struct as a block. const uint32_t structType = m_module.defStructTypeUnique(1, &arrayType); + + m_module.decorateBlock (structType); m_module.memberDecorateOffset(structType, 0, 0); - m_module.decorateBlock(structType); + + m_module.setDebugName (structType, str::format("struct_cb", bufferId).c_str()); + m_module.setDebugMemberName (structType, 0, "m"); // Variable that we'll use to access the buffer const uint32_t varId = m_module.newVar(