-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix resource leak and prevent pure device creation #175
Conversation
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 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. |
Not all |
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. |
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.