crosire / d3d8to9

A D3D8 pseudo-driver which converts API calls and bytecode shaders to equivalent D3D9 ones.
BSD 2-Clause "Simplified" License
880 stars 78 forks source link

Enabling MSAA/FSAA crashes d3d8to9 (Star Wars Republic Commando) #67

Closed metallicafan212 closed 6 years ago

metallicafan212 commented 6 years ago

In my modified version of d3d8to9, this is what happens when FSAA in Republic Commando is turned on. I've put debug prints as I was trying to figure out why it was crashing. This is as far as I got.

Redirecting 'IDirect3DDevice8::Reset(053CC2E8, 24BF0FD8)' ... Multi-Sampling is: D3DMULTISAMPLE_8_SAMPLES Swap effect is: D3DSWAPEFFECT_FLIP Redirecting 'IDirect3D8::CreateDevice(09012A30, 0, 1, 00230BDA, 70, 24BF0FD8, 24BF0FD4)' ... Multi-Sampling is: D3DMULTISAMPLE_8_SAMPLES Swap effect is: D3DSWAPEFFECT_FLIP Create Device past ConvertPresentParameters Create Device failed! Reason: D3DERR_INVALIDCALL

It seems to be something to do with Directx 8 vs Directx 9 as it fails when the ProxyInterface tries to create the device.

No matter the setting, if it's above 0 then it will crash. This issue also applies to the current and past versions of d3d8to9.

Here is where it crashes: https://github.com/crosire/d3d8to9/blob/acd25ce3aa29a8d7c58e46c6711b2ff6632830a9/source/d3d8to9_base.cpp#L204