Joshua Ashton
b954ab886f
[d3d9] Implement GetFrontBufferData (currently with first backbuffer)
...
Fixes screenshots in ATi ToyShop demo
2020-01-17 06:01:48 +00:00
Joshua Ashton
e5df573292
[d3d9] Add AreFormatsSimilar helper
2020-01-17 05:55:47 +00:00
Joshua Ashton
9fce945b62
[d3d9] Don't create views if we are a null resource
2020-01-17 04:20:05 +00:00
Philip Rebohle
eb37dfa8d2
[d3d9] Create multiple back buffers for GetBackBuffer API
...
Needed by Atelier Sophie.
2020-01-16 18:50:23 +01:00
Philip Rebohle
c911784bb8
[d3d9] Synchronize with presentation in D3D9SwapChainEx::Reset
...
Otherwise, the subsequent patches would break if Reset is called
while there's still a frame in flight.
2020-01-16 18:50:23 +01:00
Joshua Ashton
9e5e4c1cfc
[d3d9] Don't mark for hazards if we aren't rendering to mip 0
2020-01-16 03:04:58 +00:00
Joshua Ashton
7c53a997ef
[d3d9] Keep subresource views in subresources, defer creation until needed
...
Avoid creating a bunch of views that we probably don't need whenever a texture is created
2020-01-16 03:00:31 +00:00
Joshua Ashton
64ece36349
[d3d9] Implement d3d9.forceSwapchainMSAA
...
Works good enough for some titles like Vampire The Masquerade: Bloodlines.
2020-01-11 02:34:37 +00:00
Joshua Ashton
3ebd4b28a3
[d3d9] Defer dialog mode swapchain recreation decision to Present
...
Avoids unnecessary swapchain recreations if the game calls SetDialogBoxMode multiple times per frame
2020-01-10 04:30:55 +00:00
Joshua Ashton
9647e449d2
[d3d9] Remove redundant logging from SetDialogBoxMode
...
This path doesn't error anyway...
2020-01-10 04:30:02 +00:00
Philip Rebohle
79fcaa9fba
[d3d9] Remove unused variable from D3D9DeviceEx::Clear
...
Fixes a compiler warning.
2020-01-09 18:06:58 +00:00
Joshua Ashton
47555f1dda
[d3d9] Add GetSurfaceExtent helper
2020-01-09 03:29:58 +00:00
Joshua Ashton
cd58b147a1
[d3d9] Respect mip != 0 for Clear fastpath
2020-01-09 03:24:50 +00:00
Joshua Ashton
ebcab68822
[d3d9] Respect specific mip size for implicit viewport in SetRenderTarget
...
Closes #1295
2020-01-09 03:19:37 +00:00
Joshua Ashton
b738c4220b
[d3d9] Scale depth bias value based on current format's r
value
2020-01-08 19:38:18 +00:00
Joshua Ashton
2d7f4b1a2c
[d3d9] Set depth bias values separately, optimize redundant rasterizer state changes
2020-01-08 19:38:18 +00:00
Joshua Ashton
9541aef0b8
[d3d9] Ensure D3DDISPLAYMODEEX we use to call the Ex funcs has its size set correctly
2020-01-06 04:14:02 +00:00
Joshua Ashton
61b6f8f297
[d3d9] Hook up GetAdapterDisplayMode to resp. adapter func
...
Fixes fullscreen at < native res in Vampire: The Masquerade Bloodlines 1/2
2020-01-06 04:07:02 +00:00
Joshua Ashton
91574993df
[d3d9] Return current display mode in GetAdapterDisplayModeEx rather than last mode
...
Fixes fullscreen at < native res in Vampire: The Masquerade Bloodlines 1/2
2020-01-06 04:06:45 +00:00
Joshua Ashton
845ab2b5af
[d3d9] Don't re-set dialogbox mode on swapchain Reset
...
There's no reason to do this now that we have no error path in SetDialogBoxMode...
2020-01-04 21:12:53 +00:00
Joshua Ashton
d53b3adaea
[d3d9] Remove incorrect error returns SetDialogBoxMode
...
The Microsoft docs for this are incorrect based on my tests of all the described edge-cases.
https://docs.microsoft.com/en-us/windows/win32/api/d3d9/nf-d3d9-idirect3ddevice9-setdialogboxmode
2020-01-04 21:10:26 +00:00
Joshua Ashton
c024b89171
[dxso] Implement d3d9.forceSamplerTypeSpecConstants
...
This option makes us always use a spec constant to determine sampler type (instead of just in PS 1.x)
which works around a game bug in Halo CE where it gives cube textures to 2d/volume samplers
2020-01-01 20:56:05 +00:00
Joshua Ashton
ff129abaf0
[d3d9] Fix crash when trying to present with a currently invalid presenter
...
Closes #1304
2019-12-28 01:27:18 +00:00
Joshua Ashton
b4f2094c02
[d3d9] Enable bounds testing for D3DPOOL_SYSTEMMEM buffers
...
Improves performance in Halo CE.
2019-12-22 19:05:22 +00:00
Joshua Ashton
fb4d794412
[d3d9] Use VK_FORMAT_D24_UNORM_S8_UINT for D3DFMT_DF24
...
May improve performance in some instances
2019-12-22 01:46:50 +00:00
Joshua Ashton
05de0b20a0
[d3d9] Use VK_FORMAT_D24_UNORM_S8_UINT for D3DFMT_D24X8
...
May improve performance in some instances
2019-12-22 01:43:36 +00:00
Joshua Ashton
90ce37c8c9
[d3d9] Make ChangeReportedMemory actually atomic
...
Massive edge case that will never happen, but better to be safe than sorry.
Reduces the atomic ops too.
2019-12-20 18:07:35 +00:00
Joshua Ashton
5cc0fd5c25
[d3d9] Simplify SetViewport
...
pViewport == nullptr is illegal
2019-12-18 23:18:01 +00:00
Joshua Ashton
bab56433cb
[d3d9] Avoid rebinding scissor rects if the same one is re-set
2019-12-18 23:18:01 +00:00
Joshua Ashton
288a9dd547
[d3d9] Avoid rebinding viewports if the same one is re-set
2019-12-18 23:18:01 +00:00
Joshua Ashton
9ec0541b93
[d3d9] Still rebind viewport/scissor when setting the same RT
...
Closes #1290
2019-12-18 23:18:01 +00:00
Joshua Ashton
7b0723520a
[d3d9] Add operator overloads for RECT
2019-12-18 23:18:01 +00:00
Joshua Ashton
777cd4cd64
[d3d9] Add operator overloads for D3DVIEWPORT9
2019-12-18 23:01:16 +00:00
Philip Rebohle
31948cae8c
[spirv] Allow specifying the SPIR-V version explicitly
...
We're going to use some SPIR-V 1.4 features for D3D11 if supported,
but 1.4 is not supported by all implementations.
2019-12-18 17:36:46 +01:00
Joshua Ashton
78e4816fc0
[d3d9] Avoid unnecessary state block constant bits when not SWVPing
2019-12-18 14:48:01 +01:00
Joshua Ashton
312905e8a3
[d3d9] Use new bitset helper + tzcnt for stateblocks
2019-12-18 14:48:01 +01:00
Joshua Ashton
784abe5cf4
[d3d9] Move auto depth stencil creation to after swapchain creation
...
If the app specifies w == 0 and/or h == 0 then this will be filled in by then in the presentation params.
Impacts #1278
2019-12-18 00:09:55 +00:00
Joshua Ashton
009e772fe8
[d3d9] Remove initial device reset outside of constructor
...
Allows us to funnel hresults from that to the response of CreateDevice
2019-12-17 23:59:37 +00:00
Joshua Ashton
3b119c0be6
[d3d9] Log unavailable backbuffer format if encountered when resetting swapchain
2019-12-17 22:36:27 +00:00
Joshua Ashton
3abd30bb96
[d3d9] Fix return value for invalid backbuffer formats
...
This got changed when I saw that the auto depth stencil when set to an unavailable returns D3DERR_NOTAVAILABLE.
Turns out if the backbuffer is unavailable it returns D3DERR_INVALIDCALL...
Consistent...
Closes #1278
2019-12-17 22:36:27 +00:00
Joshua Ashton
91b5105db5
[d3d9] Move capture struct and enum to stateblock header
...
Makes more sense for it to be here.
2019-12-17 03:16:50 +00:00
Joshie
54ed8f0bb0
[d3d9] Implement Direct3D9 Frontend ( #1275 )
...
Co-authored-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Co-authored-by: Robin Kertels <robin.kertels@gmail.com>
Co-authored-by: pchome <pchome@users.noreply.github.com>
Co-authored-by: Christopher Egert <cme3000@gmail.com>
Co-authored-by: Derek Lesho <dereklesho52@Gmail.com>
Co-authored-by: Luis Cáceres <lacaceres97@gmail.com>
Co-authored-by: Nelson Chen <crazysim@gmail.com>
Co-authored-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
Co-authored-by: Riesi <riesi@opentrash.com>
Co-authored-by: gbMichelle <gbmichelle.dev@gmail.com>
2019-12-16 04:28:01 +01:00