Closed elishacloud closed 2 months ago
d3d8to9 won't work with a pure device because it requires many
Get
functions that won't work if a game creates a pure device.
Has it been a problem so far? AFAIK a lot of games will request D3DCREATE_PUREDEVICE in order to signal they need HWVP only, so getting rid of it entirely may also come with some performance implications.
Has it been a problem so far? AFAIK a lot of games will request D3DCREATE_PUREDEVICE in order to signal they need HWVP only, so getting rid of it entirely may also come with some performance implications.
You can search for GetDesc
in the code and see the number of functions that would fail. Even simple functions like CopyRects()
and UpdateTexture()
will fail with d3d8to9 in a pure device.
Maybe pure devices are more common in Direct3D9 games than in Direct3D8 or maybe these are the reason for a number of games that already fail or have issues with d3d8to9 that hasn't been investigated yet. I know several.
Either way if a game uses a pure device it is unlikely to work right with d3d8to9.
You can search for
GetDesc
in the code
Not all Get*
functions are actually disabled, rather only the ones affecting state, if docs are to be believed. See here.
Maybe pure devices are more common in Direct3D9 games than in Direct3D8 or maybe these are the reason for a number of games that already fail or have issues with d3d8to9 that hasn't been investigated yet. I know several.
Wonder if this would fix Silent Hill 3's unique DX8 shaders? Right now, all advanced beauty shaders made by SH3 don't render at all when using d3d8to9.
Not all
Get*
functions are actually disabled, rather only the ones affecting state, if docs are to be believed. See here.
Ok, I removed the code that prevents pure device creation.
Ok, good call. I fixed it to release the base texture in each block.
This fixes a resource leak that happens in
GetTexture()
because we query for the interface after getting the texture and never release the extra reference that creates.Also, this prevents the game from creating a pure device. d3d8to9 won't work with a pure device because it requires many
Get
functions that won't work if a game creates a pure device.