crosire / d3d8to9

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

Check SetViewport region and fix issue with Depth Stencil Textures #80

Closed elishacloud closed 6 years ago

elishacloud commented 6 years ago

Overview:

This pull fixes #76 and this pull fixes #79.

There are two changes here:

  1. This will return D3DERR_INVALIDCALL if the pViewport describes a region that cannot exist within the render target surface. See comments here for details on how this fixes the issue with Hydorah.
  2. This takes the update from here. This fixes an issue where D3DUSAGE_DYNAMIC was breaking Depth Stencil Textures.

Testing:

I tested this with the following games: