question

Displame-2889 avatar image
0 Votes"
Displame-2889 asked JeanineZhang-MSFT edited

Calling of some directx12 functions always throw "invalid argument" exception.

I ran the code accompanied with Introduction to 3D Game Programming with DirectX 12 on my computer, but it always throw exception like this:
132651-%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE-2021-09-16-135406.png


The Chinese there means something like "Invalid argument".

The return value of mCommandList->close() should be -2147024809 in decimal, it's a HRESULT value. I've encountered similar problem in my own code many times, and I recorded the return value.
But the code runs well months earlier without any modification. I wonder if some upgrade of my win10 may be the cause.
Thanks for your suggestion.

windows-10-generalwindows-apiwindows-10-application-compatibility
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered LimitlessTechnology-2700 published

Hello Displame,

You might need to use newer texture resources.

For example:
D3D_FEATURE_LEVEL_11_1 and D3D11_CREATE_DEVICE_BGRA_SUPPORT

Hope this helps,
Best regards,

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.