-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dump root parameters, insted of descriptor heap (#1862)
* Dump root parameters, insted of descriptor heap 1. Dump SetXXXRootDescriptorTable, SetXXXRootConstantBufferView, SetXXXRootShaderResourceView, SetXXXRootUnorderedAccessView, instead of descriptor heap. Root parameters are more straightforward since they are used by shaders. 2. Find RootParameters info in dx12_browse_consumer.h and Dx12DumpResources::CreateRootSignature, and then dump them. 3. Dump some infos about root parameters. Although root_signature_type and cmd_bind_type are the same thing, but I saw some titles that they were different, so I chose to write both. That's mistakes and should trigger validation log. Added a function Dx12DumpResourcesDelegate::WriteNote to write some help info into .json, like some mistakes are found. 4. Added two flags in dx12_dump_resources.cpp: TEST_WRITE_NOT_FOUND_VIEWS,TEST_WRITE_NULL_RESOURCE_VIEWS. The NumDescriptors in RootParameters could be large, but the index might not be found in cbv_srv_uav_infos of D3D12DescriptorHeapInfo. Set TEST_WRITE_NOT_FOUND_VIEWS: true to write the heap index info even if the index isn't found. Set false to skip it. BufferLocation in CreateConstantBufferView or pResource in CreateShaderResourceView or CreateUnorderedAccessView could be 0. Set TEST_WRITE_NULL_RESOURCE_VIEWS: true to write the heap index info even if the value is 0. Set false to skip it. 5. CreateConstantBufferView, CreateShaderResourceView and CreateUnorderedAccessView could set the same DestDescriptor. The newer view setting could override it to get the DestDescriptor. The older view setting is quit. In this case, changed these struct infos into one struct info. 6. If the target drawcall is dispatch, dump compute root parameters. If it's not, dump graphics. But if it's ExecuteIndirect, dump both graphics and compute root parameters, since we don't know what it's inside. 7. CaptureGPUAddrMatchDescriptorHeap find the index of the heap for the address of root descriptor tables. Use the index to find the view in the map in the heap. Not using MatchDescriptorCPUGPUHandle and "for loop" to find the view any more. MatchDescriptorCPUGPUHandle has a bug to find a wrong view. RelayCPUAddrMatchDescriptorHeap find the index of the heap for the address of rtvs and dsv. Use the index to find the view in the map in the heap. 8. Skip dump vertices, index, rtv and dsv if the taget drawcall is dispatch. * Move GetDescriptorSubresourceIndices Move GetDescriptorSubresourceIndices to Dx12DumpResources. And fix two "<=" to "<". * Clean up writing dump infos Add WriteRootParameterInfo, WriteNotFoundView, WriteNULLResource, WriteNULLBufferLocation in Dx12DumpResourcesDelegate to make writing infos simpler. Move checking TEST_WRITE_NULL_RESOURCE_VIEWS into CopyDrawCallResourceByGPUVA and CopyDrawCallResourceBySubresource.
- Loading branch information
1 parent
3d082df
commit 0000a1e
Showing
7 changed files
with
1,846 additions
and
963 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.