mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Explicitly handle unbounded arrays and display declared fixed vars
* GL and Vulkan allow buffers to have fixed variables before a trailing AoS unbounded array. These fixed variables can't be easily displayed in a table and previously we skipped them. Now we display these in a tree format. * We also support formats which don't have an unbounded array at all and display these just with the tree. This will allow the BufferViewer to subsume the capabilities of the ConstantBufferPreviewer (though it needs to handle opaque non-buffer-backed variables, and slot-following).
This commit is contained in:
@@ -294,7 +294,12 @@ void ConstantBufferPreviewer::processFormat(const QString &format)
|
||||
{
|
||||
QString errors;
|
||||
|
||||
m_formatOverride = BufferFormatter::ParseFormatString(format, ~0ULL, errors);
|
||||
ShaderConstant fixed, repeating;
|
||||
rdctie(fixed, repeating) = BufferFormatter::ParseFormatString(format, ~0ULL, errors);
|
||||
m_formatOverride = fixed;
|
||||
// we don't handle true unbounded repeating data here, add it as another single element
|
||||
if(repeating.type.descriptor.type != VarType::Unknown)
|
||||
m_formatOverride.type.members.push_back(repeating);
|
||||
ui->formatSpecifier->setErrors(errors);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user