microsoft / DirectX-Graphics-Samples

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

Raytracing Procedural Geometry Sample: Fix crash due to resolving query without ending it first #855

Closed jambuttenshaw closed 3 months ago

jambuttenshaw commented 3 months ago

Hi there,

I was having issues with the Raytracing Procedural Geometry sample crashing. It was caused by calling ResolveQueryData for queries in the heap that had not been ended. I implemented a simple fix to only resolve queries that were used in the previous frame - it isn't robust for all possible uses of GPUTimer but it fixes the sample correctly.

Thank you :)

jambuttenshaw commented 3 months ago

@microsoft-github-policy-service agree

stanard commented 3 months ago

Hi,

Thank you for reporting this bug and suggesting a fix. I made a very similar fix along with some other maintenance changes in this PR: https://github.com/microsoft/DirectX-Graphics-Samples/pull/857. We will close your PR.

Cheers, James