d3d12: Sets all SRV descriptors as data-static

As Mesa d3d12 is currently implemented, all resource data is static
at the time a SRV or CBV is created.  Therefore, it makes sense for all
descriptors to use the DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS
flag.  Use of this flag broadens debug validation and allows some
optimizations in the underlying driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10871>
This commit is contained in:
BillKristiansen 2021-05-18 10:58:35 -07:00 committed by Marge Bot
parent bb1d0025d8
commit 1208290558
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ init_range_root_param(D3D12_ROOT_PARAMETER1 *param,
if (type == D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER)
range->Flags = D3D12_DESCRIPTOR_RANGE_FLAG_NONE;
else
range->Flags = D3D12_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE;
range->Flags = D3D12_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS;
range->OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
param->ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;