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

d3dx12Residency.h : EnqueueMakeResident called multiple times on the same resource #784

Closed bdumesnil closed 2 years ago

bdumesnil commented 2 years ago

Hi,

I think there may be an error in the residency lib generating EnqueueMakeResident() being called twice on a resource in some cases. https://github.com/microsoft/DirectX-Graphics-Samples/blob/164b072185a5360c43c5f0b64e2f672b7f423f95/Libraries/D3DX12Residency/d3dx12Residency.h#L1296-L1311

Here EnqueueMakeResident does not use the same parameters than it's MakeResident counterpart, instead it uses the same parameters as the other EnqueueMakeResident higher in the code ( it looks like a copy/paste error ).

jenatali commented 2 years ago

I agree, that looks like a bug to me. Would you like to create a pull request with the fix?

bdumesnil commented 2 years ago

Yes, here is the pull request : https://github.com/microsoft/DirectX-Graphics-Samples/pull/785