Skip to content

Support dx12 raytracing opacity micromap trimming#2934

Open
zongdu-arm wants to merge 1 commit into
LunarG:devfrom
zongdu-arm:dx12_raytracing_opacity_micromap
Open

Support dx12 raytracing opacity micromap trimming#2934
zongdu-arm wants to merge 1 commit into
LunarG:devfrom
zongdu-arm:dx12_raytracing_opacity_micromap

Conversation

@zongdu-arm
Copy link
Copy Markdown
Contributor

@zongdu-arm zongdu-arm commented May 7, 2026

Support dx12 raytracing opacity micromap trimming, track in #2868

DX12 AS trim metadata payloads now include serialized D3D12 build-input
structs to preserve OMM and OMM-array behavior:

  • Add a new meta id kInitDx12AccelerationStructureCommand2.
  • Encode and write full AS build inputs from state tracking and writer paths.
  • Decode and route structured build inputs through DX12 consumers.
  • Update DX12 utility and builder logic for OMM triangles and OMM-array
    input buffer entry handling.

@zongdu-arm zongdu-arm requested a review from a team as a code owner May 7, 2026 10:50
@zongdu-arm zongdu-arm force-pushed the dx12_raytracing_opacity_micromap branch 2 times, most recently from 8050690 to 95c2356 Compare May 8, 2026 02:56
@zongdu-arm
Copy link
Copy Markdown
Contributor Author

Hi @locke-lunarg, @bradgrantham-lunarg ,
Could you review this PR?

@locke-lunarg locke-lunarg self-requested a review May 11, 2026 14:04
@locke-lunarg locke-lunarg added the approved-to-run-ci Can run CI check on internal LunarG machines label May 13, 2026
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 13, 2026

CLA assistant check
All committers have signed the CLA.

@locke-lunarg
Copy link
Copy Markdown
Contributor

locke-lunarg commented May 13, 2026

The CI failed during the replay and gfxrecon-info tests for D3D12RaytracingHelloWorld-priority-capture-1225-1235. They got a error [gfxrecon] ERROR - Failed to read init DX12 acceleration structure meta-data block header (frame 0 block 69).

I suspect the cause is the change to the trimming encoder, which would require generating new capture files for the tests to pass. Since we'd prefer not to update test assets, can we avoid modifying the encoder? or is this change necessary for the fix?

@locke-lunarg
Copy link
Copy Markdown
Contributor

locke-lunarg commented May 13, 2026

ParsedBlock& BlockParser::ParseMetaData(BlockBuffer& block_buffer)
{
    ...
    else if (meta_data_type == format::MetaDataType::kInitDx12AccelerationStructureCommand)
    ...

Here is where the decoder is changed. The new InitDx12AccelerationStructureCommandHeader doesn't match the old capture files. The value of header.inputs_size is bad, like 188978561025, to cause failure.

Not only new InitDx12AccelerationStructureCommandHeader, I feel that the new parameter of Dx12DecoderBase::DispatchInitDx12AccelerationStructureCommand might also cause failure for the old capture files.

@locke-lunarg
Copy link
Copy Markdown
Contributor

I feel that we might need a new meta data for this new solution, but keep the original meta data and original solution to be compatible with the old capture files. @bradgrantham What do you think?

@zongdu-arm
Copy link
Copy Markdown
Contributor Author

I feel that we might need a new meta data for this new solution, but keep the original meta data and original solution to be compatible with the old capture files. @bradgrantham What do you think?

The structure data has been changed, so the old gfxr replay failed and the new FF gfxr must be re-captured.
Whether to add a new meta block ID is up to you, I can modify it at any time.

@bradgrantham-lunarg
Copy link
Copy Markdown
Contributor

bradgrantham-lunarg commented May 14, 2026 via email

@locke-lunarg
Copy link
Copy Markdown
Contributor

locke-lunarg commented May 14, 2026

I agree with @bradgrantham-lunarg . @zongdu-arm please also adds a warning for the old meta data to recommend the user to generate a new capture file. Thanks!

@zongdu-arm zongdu-arm force-pushed the dx12_raytracing_opacity_micromap branch 3 times, most recently from 3811fbe to 2359155 Compare May 15, 2026 08:23
DX12 AS trim metadata payloads now include serialized D3D12 build-input
structs to preserve OMM and OMM-array behavior:
  - Add a new meta id kInitDx12AccelerationStructureCommand2.
  - Encode and write full AS build inputs from state tracking and writer paths.
  - Decode and route structured build inputs through DX12 consumers.
  - Update DX12 utility and builder logic for OMM triangles and OMM-array
      input buffer entry handling.
@zongdu-arm zongdu-arm force-pushed the dx12_raytracing_opacity_micromap branch from 2359155 to 68d2aca Compare May 15, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-to-run-ci Can run CI check on internal LunarG machines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants