-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dump root parameters, insted of descriptor heap #1862
Conversation
CI gfxreconstruct build queued with queue ID 293105. |
CI gfxreconstruct build # 5272 running. |
f4fd1f4
to
4dbf259
Compare
CI gfxreconstruct build queued with queue ID 293145. |
CI gfxreconstruct build # 5273 running. |
4dbf259
to
57d648d
Compare
CI gfxreconstruct build queued with queue ID 293168. |
CI gfxreconstruct build # 5274 running. |
CI gfxreconstruct build # 5274 passed. |
CI gfxreconstruct build queued with queue ID 305224. |
CI gfxreconstruct build # 5346 running. |
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.
3c28817
to
ec23d8b
Compare
CI gfxreconstruct build queued with queue ID 305241. |
CI gfxreconstruct build # 5347 running. |
CI gfxreconstruct build # 5347 passed. |
ec23d8b
to
dd89adb
Compare
CI gfxreconstruct build queued with queue ID 305353. |
CI gfxreconstruct build # 5348 running. |
CI gfxreconstruct build # 5348 passed. |
Move GetDescriptorSubresourceIndices to Dx12DumpResources. And fix two "<=" to "<".
dd89adb
to
6c3c13e
Compare
CI gfxreconstruct build queued with queue ID 305653. |
CI gfxreconstruct build # 5349 running. |
I added a small change. The given parameter in |
CI gfxreconstruct build # 5349 passed. |
Add WriteRootParameterInfo, WriteNotFoundView, WriteNULLResource, WriteNULLBufferLocation in Dx12DumpResourcesDelegate to make writing infos simpler. Move checking TEST_WRITE_NULL_RESOURCE_VIEWS into CopyDrawCallResourceByGPUVA and CopyDrawCallResourceBySubresource.
CI gfxreconstruct build queued with queue ID 305973. |
Added one commit to move writing info code to functions to make it simpler. It doesn't change output data. |
CI gfxreconstruct build # 5351 running. |
CI gfxreconstruct build # 5351 passed. |
Ex:
new
old
Dump
SetXXXRootDescriptorTable
,SetXXXRootConstantBufferView
,SetXXXRootShaderResourceView
andSetXXXRootUnorderedAccessView
fromID3D12GraphicsCommandList
, instead of descriptor heaps. Root parameters are more straightforward since they are used by shaders.Find RootParameters info in
dx12_browse_consumer.h
andDx12DumpResources::CreateRootSignature
.Dump some infos about root parameters. Although
root_signature_type
andcmd_bind_type
are the same thing, but they come from different places. I saw some titles that they were different, so I chose to write both. That's a mistake and should trigger validation log. Added a functionDx12DumpResourcesDelegate::WriteNote
to write some help info into .json, like error log.Added two flags in
dx12_dump_resources.cpp
:TEST_WRITE_NOT_FOUND_VIEWS
andTEST_WRITE_NULL_RESOURCE_VIEWS
.The
NumDescriptors
in root parameters could be large, but the index might not be found incbv_srv_uav_infos
ofD3D12DescriptorHeapInfo
. SetTEST_WRITE_NOT_FOUND_VIEWS
: true to write the heap info even if the index isn't found. Set false to skip it.BufferLocation
inCreateConstantBufferView
orpResource
inCreateShaderResourceView
orCreateUnorderedAccessView
could be 0. SetTEST_WRITE_NULL_RESOURCE_VIEWS
: true to write the heap info even if the value is 0. Set false to skip it.CreateConstantBufferView
,CreateShaderResourceView
andCreateUnorderedAccessView
could set the sameDestDescriptor
. The newer view setting could override the older to get theDestDescriptor
. In this case, changed these struct infos into one struct info.If the target draw call 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.CaptureGPUAddrMatchDescriptorHeap
find the heap index 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 longer.MatchDescriptorCPUGPUHandle
has a bug to find a wrong view.RelayCPUAddrMatchDescriptorHeap
find the heap index for rtvs and dsv.