From 8f675fa3c2de42727cbea40bc5bce1094bf21137 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 23 Oct 2026 18:13:27 +0100 Subject: [PATCH] Fix check for unbounded cbuffer arrays on DXBC * Previous check was gated behind vendor extensions being used accidentally. --- renderdoc/driver/shaders/dxbc/dxbc_bytecode.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/renderdoc/driver/shaders/dxbc/dxbc_bytecode.cpp b/renderdoc/driver/shaders/dxbc/dxbc_bytecode.cpp index 1d6ee2ba7..d3c55145b 100644 --- a/renderdoc/driver/shaders/dxbc/dxbc_bytecode.cpp +++ b/renderdoc/driver/shaders/dxbc/dxbc_bytecode.cpp @@ -617,22 +617,18 @@ DXBC::Reflection *Program::GuessReflection() rdcstr Program::GetDebugStatus() { - // if there are no vendor extensions this is always debuggable + if(m_Reflection) + for(const DXBC::CBuffer &c : m_Reflection->CBuffers) + if(c.bindCount == ~0U) + return "Unsupported unbounded ConstantBuffer array"; + + // if there are no vendor extensions this is always debuggable for <=SM5.0 if(m_ShaderExt.second == ~0U) return rdcstr(); // otherwise we need to check that no unsupported vendor extensions are used DecodeProgram(); - for(const Declaration &decl : m_Declarations) - { - if(decl.operand.type == TYPE_CONSTANT_BUFFER && decl.operand.indices.size() == 3 && - decl.operand.indices[2].index == 0xffffffff) - { - return "Unsupported unbounded ConstantBuffer array"; - } - } - for(const Operation &op : m_Instructions) { if(op.operation >= OPCODE_VENDOR_FIRST)