Skip to content

Commit 5410046

Browse files
committed
Merge branch 'owright/fix-dxr-omms' into 'main'
Fix for using the DXR implementation of OMMs See merge request nvrhi/NVRHI!82
2 parents 2ac4b58 + 07e1915 commit 5410046

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/d3d12/d3d12-backend.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@
6565
#endif
6666

6767
// Line-Swept Spheres were added in NVAPI SDK 572.18
68-
#if NVRHI_D3D12_WITH_NVAPI && (NVAPI_SDK_VERSION >= 57218)
68+
#if NVRHI_D3D12_WITH_NVAPI && !NVRHI_D3D12_WITH_DXR12_OPACITY_MICROMAP && (NVAPI_SDK_VERSION >= 57218)
6969
#define NVRHI_WITH_NVAPI_LSS (1)
7070
#else
7171
#define NVRHI_WITH_NVAPI_LSS (0)
7272
#endif
7373

74-
#if D3D12_PREVIEW_SDK_VERSION >= 717
74+
#if D3D12_PREVIEW_SDK_VERSION == 717
7575
#define NVRHI_D3D12_WITH_COOPVEC (1)
7676
#else
7777
#define NVRHI_D3D12_WITH_COOPVEC (0)

src/d3d12/d3d12-raytracing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1844,7 +1844,7 @@ namespace nvrhi::d3d12
18441844
}
18451845
}
18461846

1847-
D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC asDesc;
1847+
D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC asDesc = {};
18481848
asDesc.Inputs = ommInputs;
18491849
asDesc.ScratchAccelerationStructureData = scratchGpuVA;
18501850
asDesc.DestAccelerationStructureData = omm->getDeviceAddress();

0 commit comments

Comments
 (0)