crosire / d3d8to9

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

Fix Multisample support #68

Closed elishacloud closed 6 years ago

elishacloud commented 6 years ago

This fixes #66 and #67.

Overview:

There are three updates in this fix:

  1. Updated CreateDevice, CreateAdditionalSwapChain, CreateRenderTarget, CreateDepthStencilSurface and Reset functions to support MultiSampleQuality by querying CheckDeviceMultiSampleType. If MultiSampleType == D3DMULTISAMPLE_NONE then set MultiSampleQuality to 0. Note: this is all the functions that use MultiSampling as seen here.
  2. Remove D3DPRESENTFLAG_LOCKABLE_BACKBUFFER flag when MultiSampleType != D3DMULTISAMPLE_NONE is detected.
  3. Update unsupported D3DPRESENT_RATE_UNLIMITED flag to use D3DPRESENT_INTERVAL_IMMEDIATE rather than D3DPRESENT_INTERVAL_ONE to replicate more closely the d3d8 functionality.

Testing:

Tested the following games:

crosire commented 6 years ago

Great work!