Skip to content
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

Latest update crashes Silent Hill 2 in SetVertexShader() #159

Closed
elishacloud opened this issue Jun 16, 2023 · 4 comments
Closed

Latest update crashes Silent Hill 2 in SetVertexShader() #159

elishacloud opened this issue Jun 16, 2023 · 4 comments

Comments

@elishacloud
Copy link
Contributor

The latest check-in from PR #158 crashes Silent Hill 2 in SetVertexShader() after changing resolutions.

As far as I can tell Silent Hill 2 does not recreate Vertex or Pixel shaders after a Reset(). It seems that Silent Hill 2 assumes that the shaders are still available even after the Reset().

Sometimes Microsoft's documentation is wrong. It seems like this may be the case here because Silent Hill 2 reuses shaders created before the Reset().

@HerMajestyDrMona
Copy link
Contributor

HerMajestyDrMona commented Jun 16, 2023

For me Empire Earth 2 crashes after using the ALT+ENTER hotkey (switching between the windowed / full screen mode). It only happens in the started game (not in the menu). I assume the reason is the same, even though changing screen resolution seem to work.
EDIT:
Yeah, disabling function Direct3DDevice8::ReleaseShaders() fixes it.

@nv-ajaus
Copy link
Contributor

Addressed this in #161 , I was wondering if this was related to D3D8 mixing FVF calls and programmable shader creation together in CreateVertexShader(), or something to do with the Vertex Declaration objects created in d3d8to9 but it seems some d3d8 applications just use shaders across a D3DERR_DEVICELOST return from Present() and Reset().

@elishacloud
Copy link
Contributor Author

Yeah, Microsoft's documentation is not always correct with these older DirectX APIs. I run into this from time-to-time.

@CookiePLMonster
Copy link
Contributor

Yeah, Microsoft's documentation is not always correct with these older DirectX APIs. I run into this from time-to-time.

FWIW MS folks who own DirectX-related pages are one of the most responsive out of all docs maintainers so if you submit a doc fix they will certainly take a look.

elishacloud added a commit to elishacloud/d3d8to9 that referenced this issue Sep 25, 2024
This will revert PR crosire#159 so shaders and state blocks are not released but also fixes the device reference count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants