Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Source/D3D12/DeviceD3D12.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1657,6 +1657,11 @@ void DeviceD3D12::GetMicromapPrebuildInfo(const MicromapDesc& micromapDesc, D3D1
opacityMicromapArrayDesc.NumOmmHistogramEntries = micromapDesc.usageNum;
opacityMicromapArrayDesc.pOmmHistogram = usages;

// Not dereferenced, but may be checked for null: dummy non-zero values stand for the build's buffers (DXR spec, "GetRaytracingAccelerationStructurePrebuildInfo")
opacityMicromapArrayDesc.InputBuffer = 256;
opacityMicromapArrayDesc.PerOmmDescs.StartAddress = 256;
opacityMicromapArrayDesc.PerOmmDescs.StrideInBytes = sizeof(MicromapTriangle);

D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS accelerationStructureInputs = {};
accelerationStructureInputs.Type = D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_ARRAY;
accelerationStructureInputs.Flags = GetMicromapFlags(micromapDesc.flags);
Expand Down