mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Fix shader debugging and pipeline viewer with constant buffer arrays
With SM5.1 and D3D12, constant buffer arrays can be declared which are treated as an array of resources on the shader side, and a simple collection of descriptors on the D3D12 side. DXBCDebug::GlobalState handles the bridge between these by storing each array resource as a nested ShaderVariable struct. Accessing the data for instructions traverses the structure similarly. The shader viewer handles nested resources and displays them in the appropriate tree view. In the pipeline viewer, descriptors for CB arrays now indicate the array index and correctly handle buffer offsets for viewing.
This commit is contained in:
committed by
Baldur Karlsson
parent
392d362ee8
commit
671add4035
@@ -144,8 +144,11 @@ void ConstantBufferPreviewer::OnEventChanged(uint32_t eventId)
|
||||
setVariables(vars);
|
||||
if(wasEmpty)
|
||||
{
|
||||
// Expand before resizing so that collapsed data will already be visible when expanded
|
||||
ui->variables->expandAll();
|
||||
for(int i = 0; i < 3; i++)
|
||||
ui->variables->resizeColumnToContents(i);
|
||||
ui->variables->collapseAll();
|
||||
}
|
||||
ui->variables->applyExpansion(state, 0);
|
||||
});
|
||||
@@ -169,8 +172,11 @@ void ConstantBufferPreviewer::OnEventChanged(uint32_t eventId)
|
||||
setVariables(vars);
|
||||
if(wasEmpty)
|
||||
{
|
||||
// Expand before resizing so that collapsed data will already be visible when expanded
|
||||
ui->variables->expandAll();
|
||||
for(int i = 0; i < 3; i++)
|
||||
ui->variables->resizeColumnToContents(i);
|
||||
ui->variables->collapseAll();
|
||||
}
|
||||
|
||||
// if we have saved expansion state for the new shader, apply it, otherwise apply the
|
||||
|
||||
Reference in New Issue
Block a user