Replace D3DFORMAT by CXBXFORMAT in a few more places (including in disabled code in Direct3D9.cpp.unused-patches, just to conform it to most current X_ prefixed type declarations, similar to other types.
Ignore BeginScene and EndScene calls under D3D11
For D3D11, move a Present call to SwapChain
Replace a D3D9 SetRenderTarget call by CxbxSetRenderTarget
Also removed related code that's no longer required either :
host D3DDevice calls to SetTransform and SetLightEnable,
and the EmuXB2PC_D3DTS tooling function.
For this, introduced and used CxbxCreateVertexShader, and
refactored CxbxUpdateHostVertexShader, to perform local state tracking and switch active host vertex shader only when required
Removed ResetD3DDevice method
And yeah, this commit doesn't really belong in the D3D11 port, but I figured it might as well be slipped in here, as having a few additional defines won't cause any harm and it's still nice to have this set as complete as we can.
Copied over example CreateDevice initialization (probably won't compile)
Leave out g_pDirect3D and g_D3DCaps globals (no longer required in D3D11)
Call CheckFormatSupport from g_pD3DDevice (not g_pDirect3D)
Ported CreateQuery (using a D3D11_QUERY_DESC argument)
Moved test-case mentions towards XboxVertexDeclarationConverter::VshConvertToken_STREAMDATA_REG() (as they would otherwide be removed along with the D3D9-only format conversions in CxbxVertexBufferConverter::ConvertStream())
Moved test-case mentions towards XboxVertexDeclarationConverter::VshConvertToken_STREAMDATA_REG() (as they would otherwide be removed along with the D3D9-only format conversions in CxbxVertexBufferConverter::ConvertStream())
Temporary alias CXBXFORMAT, mapped to D3D9 D3DFORMAT or D3D11 DXGI_FORMAT
Mapped D3D9 D3DFORMAT's to D3D11 DXGI_FORMAT's (for as far as possible - needs more work)
Ported D3D9 CheckDeviceFormat to D3D11 CheckFormatSupport
Make sure all code uses aliasses, so nothing but the aliasses refer to D3D 9 types (making it easier to spot all places where we have to convert to 11)
Remove unused symbol dwBytesRead
Fixed hint on missing argument to XB_InitializeObjectAttributes macro
Adjusted a few assignments that can now no longer rely on the copy operator.
Added D3DDevice_SetBackMaterial implementation (and trampoline)
Trampolined D3DDevice_SetMaterial and unpatched D3DDevice_GetMaterial
No longer call SetLight on host (fixed function won't be possible under DxD11 anyway)