microsoft / DirectX-Graphics-Samples

This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.
MIT License
6k stars 2.02k forks source link

Fallback layer avoid calling SetComputeRoot32BitConstants with no data #800

Closed HaydnTrigg closed 1 year ago

HaydnTrigg commented 1 year ago

If AccelerationStructuresEntries is empty, don't call SetComputeRoot32BitConstants

Fixes a crash on Intel Iris Xe graphics when using the Fallback Layer without using any bound acceleration structures due to the call SetComputeRoot32BitConstants crashing due to not checking if pSrcData was null. Spec indicates this parameter is required, so a branch is added to avoid the call.

stanard commented 1 year ago

Thank you for the fix!