crosire / d3d8to9

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

Revert the call to ReleaseShaders in Device::Reset. #161

Closed nv-ajaus closed 1 year ago

nv-ajaus commented 1 year ago

Related to #159 , it seems that some D3D8 applications will still make calls to SetVertexShader() after a Present call returns D3DERR_DEVICELOST and the device is lost. The Microsoft documentation mentioned in #155 seems to imply otherwise, but the Microsoft supplied d3d8dll seems to handle this case just fine so applications for DX8 probably just followed this behavior at the time. I am retaining the shader destruction on device release though, since in testing of d3d8.dll, shader objects don't increment the device refcount and this was causing d3d9 devices and shaders to leak under d3d8to9.