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

Fix std::vector usage that assumes no reallocation #777

Closed agrewal-nv closed 2 years ago

agrewal-nv commented 2 years ago

(Open to other options as well (delete the enum, resize the vector appropriately at the start and assert its count, etc.)

ghost commented 2 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

:x: agrewal-nv sign now
You have signed the CLA already but the status is still pending? Let us recheck it.

stanard commented 2 years ago

Sorry, but I'm going to reject this PR. I just spent the morning rewriting this code to use CD3DX12_STATE_OBJECT_DESC (from d3dx12.h) to construct the D3D12_STATE_OBJECT instead. It's more concise, and it is recommended to use common utility classes for tedious D3D12 setup.