mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Fix handling of RANGE_OFFSET_APPEND in multi-type tables in D3D12
* Previously we would only process ranges we were interested in when looking for a descriptor, but we need to process all ranges in a table to properly track the offset for APPEND.
This commit is contained in:
@@ -693,9 +693,6 @@ D3D12Descriptor D3D12DebugAPIWrapper::FindDescriptor(DXBCBytecode::OperandType t
|
||||
{
|
||||
const D3D12_DESCRIPTOR_RANGE1 &range = param.ranges[r];
|
||||
|
||||
if(range.RangeType != searchRangeType)
|
||||
continue;
|
||||
|
||||
// For every range, check the number of descriptors so that we are accessing the
|
||||
// correct data for append descriptor tables, even if the range type doesn't match
|
||||
// what we need to fetch
|
||||
@@ -703,10 +700,6 @@ D3D12Descriptor D3D12DebugAPIWrapper::FindDescriptor(DXBCBytecode::OperandType t
|
||||
if(range.OffsetInDescriptorsFromTableStart == D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND)
|
||||
offset = prevTableOffset;
|
||||
|
||||
D3D12Descriptor *desc = (D3D12Descriptor *)heap->GetCPUDescriptorHandleForHeapStart().ptr;
|
||||
desc += element.offset;
|
||||
desc += offset;
|
||||
|
||||
UINT numDescriptors = range.NumDescriptors;
|
||||
if(numDescriptors == UINT_MAX)
|
||||
{
|
||||
@@ -719,6 +712,13 @@ D3D12Descriptor D3D12DebugAPIWrapper::FindDescriptor(DXBCBytecode::OperandType t
|
||||
|
||||
prevTableOffset = offset + numDescriptors;
|
||||
|
||||
if(range.RangeType != searchRangeType)
|
||||
continue;
|
||||
|
||||
D3D12Descriptor *desc = (D3D12Descriptor *)heap->GetCPUDescriptorHandleForHeapStart().ptr;
|
||||
desc += element.offset;
|
||||
desc += offset;
|
||||
|
||||
// Check if the slot we want is contained
|
||||
if(slot.shaderRegister >= range.BaseShaderRegister &&
|
||||
slot.shaderRegister < range.BaseShaderRegister + numDescriptors &&
|
||||
|
||||
Reference in New Issue
Block a user