Skip to content
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

Use reflection to get DXIL library shader exports #1710

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

davidd-lunarg
Copy link
Contributor

No description provided.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 249564.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 4762 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 4762 failed.

@davidd-lunarg
Copy link
Contributor Author

davidd-lunarg commented Sep 4, 2024

CI gfxreconstruct build # 4762 failed.

This is failing because it is finding the wrong dxcompiler.dll. GFXR may need to redistribute that file from the Windows SDK, I will look into it.

@davidd-lunarg davidd-lunarg marked this pull request as draft September 4, 2024 22:51
@davidd-lunarg davidd-lunarg self-assigned this Sep 20, 2024
@bradgrantham-lunarg bradgrantham-lunarg added the d3d12 Issue with D3D 12 support label Oct 7, 2024
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 280092.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5089 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5089 failed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 284685.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 284685 cancelled.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 284709.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5150 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5150 failed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 285414.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5161 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 285445.

@davidd-lunarg davidd-lunarg marked this pull request as ready for review October 23, 2024 16:42
@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5162 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5162 failed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 285554.

framework/decode/dx12_resource_value_mapper.cpp Outdated Show resolved Hide resolved
#if defined(GFXRECON_DXC_SUPPORT)
// If D3D12_DXIL_LIBRARY_DESC::NumExports == 0, everything in the DXIL library is exported. Use
// reflection to get the list of exported shader names.
HRESULT hr;
Copy link
Collaborator

@rurra-amd rurra-amd Oct 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of machinery here - do we know how it might affect perf to do this work?

Wondering if any of these things can be a 1-time init and reusable thing? For instance all DxcCreateInstance calls

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not do any specific performance measuring. This code should only run during unoptimized DXR or EI replay where performance is already heavily affected.

The dxc_utils object could be reused but I don't know whether that is a heavy-weight operation. The other classes are based on the incoming DXIL library so the code would need to compare the DXIL library's bytes to detect if previous objects or results could be reused.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5165 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5165 failed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 286451.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5181 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5181 failed.

{
// Create a DXC blob from the DXIL library's bytes.
graphics::dx12::IDxcBlobEncodingComPtr dxc_blob_encoding;
hr = dxc_utils->CreateBlob(dxil_lib_desc_decoder->GetPointer()->DXILLibrary.pShaderBytecode,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be possible to use CreateBlobFromPinned here to avoid a copy to a new allocation,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed CreateBlob to CreateBlobFromPinned.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 287023.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5192 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5192 failed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 289911.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5225 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5225 passed.

@davidd-lunarg davidd-lunarg merged commit 5ef9721 into LunarG:dev Oct 29, 2024
9 checks passed
@davidd-lunarg davidd-lunarg deleted the davidd-dxil-parsing branch October 29, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
d3d12 Issue with D3D 12 support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants