CD3DX12FeatureSupport from d3dx12.h does not compile if D3DX12_NO_STATE_OBJECT_HELPERS is defined
TheRealMJP opened this issue · 0 comments
Hello,
I was just trying out the new CD3DX12FeatureSupport helper (which is very useful, so thank you for that!) in our codebase, but I found that if I define D3DX12_NO_STATE_OBJECT_HELPERS before including d3dx12.h I run into compile errors. It looks like <vector>
is only included if D3DX12_NO_STATE_OBJECT_HELPERS is not defined, and CD3DX12FeatureSupport uses std::vector and therefore relies on that include.
On a side note, I was defining D3DX12_NO_STATE_OBJECT_HELPERS because we generally do not include std headers in our codebase in order to reduce compile times. It would be really nice if CD3DX12FeatureSupport didn't rely on std::vector for this reason, that way we could continue to avoid taking that as a dependency. Looking at what the class is using std::vector for, it seems to be for storing per-node entries. I think it would probably be ok to use fixed-size arrays for these things since there is already a max of 32 nodes implied by the 32-bit integers used for node masks in the D3D12 API.
Thanks in advance!