mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-25 15:16:22 +00:00
Add D3D12 helper to set descriptor table parameter offset
This commit is contained in:
@@ -170,7 +170,7 @@ D3D12_ROOT_PARAMETER1 constParam(D3D12_SHADER_VISIBILITY vis, UINT space, UINT r
|
||||
}
|
||||
|
||||
D3D12_ROOT_PARAMETER1 tableParam(D3D12_SHADER_VISIBILITY vis, D3D12_DESCRIPTOR_RANGE_TYPE type,
|
||||
UINT space, UINT basereg, UINT numreg)
|
||||
UINT space, UINT basereg, UINT numreg, UINT descOffset)
|
||||
{
|
||||
// this is a super hack but avoids the need to be clumsy with allocation of these structs
|
||||
static D3D12_DESCRIPTOR_RANGE1 ranges[32] = {};
|
||||
@@ -192,7 +192,7 @@ D3D12_ROOT_PARAMETER1 tableParam(D3D12_SHADER_VISIBILITY vis, D3D12_DESCRIPTOR_R
|
||||
range.RegisterSpace = space;
|
||||
range.BaseShaderRegister = basereg;
|
||||
range.NumDescriptors = numreg;
|
||||
range.OffsetInDescriptorsFromTableStart = 0;
|
||||
range.OffsetInDescriptorsFromTableStart = descOffset;
|
||||
range.Flags = D3D12_DESCRIPTOR_RANGE_FLAG_NONE;
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -257,7 +257,7 @@ D3D12_ROOT_PARAMETER1 cbvParam(D3D12_SHADER_VISIBILITY vis, UINT space, UINT reg
|
||||
D3D12_ROOT_PARAMETER1 constParam(D3D12_SHADER_VISIBILITY vis, UINT space, UINT reg, UINT num);
|
||||
|
||||
D3D12_ROOT_PARAMETER1 tableParam(D3D12_SHADER_VISIBILITY vis, D3D12_DESCRIPTOR_RANGE_TYPE type,
|
||||
UINT space, UINT basereg, UINT numreg);
|
||||
UINT space, UINT basereg, UINT numreg, UINT descOffset = 0);
|
||||
|
||||
#define GET_REFCOUNT(val, obj) \
|
||||
do \
|
||||
|
||||
Reference in New Issue
Block a user