Tajuddin Khandaker
Tajuddin Khandaker

Reputation: 722

DirectX 11 errors equivalent to DirectX 9

I need a reference for finding equivalent error codes for DirectX 11 that was used in DirectX 9 implementations like following:

D3DERR_INVALIDDEVICE
D3DERR_DRIVERINVALIDCALL
D3DERR_TOOMANYOPERATIONS
D3DERR_DEVICELOST
D3DERR_DEVICENOTRESET
D3DERR_NOTAVAILABLE

I have found that winerror.h contains all the DXGI error codes but could not find equivalent code for the above mentioned errors in DiretcX 9. Please help me finding a reference or wiki to find an equivalent error code.

Upvotes: 1

Views: 291

Answers (1)

Chuck Walbourn
Chuck Walbourn

Reputation: 41057

DXGI-based versions of Direct3D do not have 'lost device' scenarios, only TDR and device removed, so the D3DERR_DEVICELOST, D3DERR_DEVICENOTRESET, D3DERR_DRIVERINTERNALERROR, and D3DERR_NOTAVAILABLE cases never happen with Direct3D 10 or later.

As documented on Microsoft Docs, you will never get D3DERR_DRIVERINVALIDCALL.

D3DERR_TOOMANYOPERATIONS, D3DERR_CONFLICTINGRENDERSTATE, D3DERR_CONFLICTINGTEXTUREFILTER, etc. applies to the legacy fixed-function pipeline which doesn't exist for Direct3D 10 or later.

A number of these older errors like D3DERR_UNSUPPORTEDALPHAARG, D3DERR_UNSUPPORTEDALPHAOPERATION, etc. were related to the old legacy "caps bits" which is not how things are managed for Direct3D 10 or later. Instead, it uses Direct3D hardware feature levels.

In cases where Direct3D9 would return D3DERR_INVALIDDEVICE you probably get E_INVALIDARG now.

You may want to look at this blog post

Upvotes: 2

Related Questions