mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Disallow shader debugging when unbounded cbuffers are used on SPIR-V
This commit is contained in:
@@ -962,6 +962,33 @@ void Reflector::CheckDebuggable(bool &debuggable, rdcstr &debugStatus) const
|
||||
debugStatus += StringFormat::Fmt("Unsupported extended instruction set: '%s'\n", setname.c_str());
|
||||
}
|
||||
|
||||
// we don't currently support debugging unbounded arrays of cbuffers
|
||||
for(const Variable &v : globals)
|
||||
{
|
||||
if(v.storage == StorageClass::Uniform)
|
||||
{
|
||||
const DataType &type = dataTypes[v.type];
|
||||
|
||||
// global variables should all be pointers into opaque storage
|
||||
RDCASSERT(type.type == DataType::PointerType);
|
||||
|
||||
const DataType *innertype = &dataTypes[type.InnerType()];
|
||||
|
||||
if(innertype->type == DataType::ArrayType)
|
||||
{
|
||||
if(innertype->length == Id())
|
||||
{
|
||||
debuggable = false;
|
||||
rdcstr name = strings[v.id];
|
||||
if(name.empty())
|
||||
name = GetRawName(v.id);
|
||||
debugStatus +=
|
||||
StringFormat::Fmt("Unsupported unbounded uniform buffer array: '%s'\n", name.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
debugStatus.trim();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user