Commit Graph

3108 Commits

Author SHA1 Message Date
Philip Rebohle 1e426cdb08
[meta] Release 1.5.5 2020-02-29 15:45:57 +01:00
Joshua Ashton 36d3e8e83d [d3d9] Don't InitReturnPtr in CreateQuery
Matches native behaviour

Fixes a Wine test
2020-02-28 21:51:34 +00:00
Joshua Ashton 5548493fad [d3d9] Don't update device state for offset/stride if the buffer is nullptr
May also avoid some redundant rebinds here too...

Fixes a Wine test
2020-02-28 21:40:19 +00:00
Joshua Ashton 722520a9f7 [d3d9] Don't rebind user's vertex buffer/indices in DrawPrimitive[Indexed]UP
D3D9 doesn't do this, it instead sets them to NULL so we can simplify this logic a fair bit.

Found via a Wine test.
2020-02-28 21:37:00 +00:00
Joshua Ashton 3587bcdb9f [d3d9] Disallow creating additional swapchains if we are fullscreen
From Wine tests...
2020-02-28 01:43:07 +00:00
Joshua Ashton 632812b88f [d3d9] Disallow additional fullscreen swapchains
From Wine tests...
2020-02-28 01:39:52 +00:00
Joshua Ashton 0757097fa0 [d3d9] Initialize return ptr in device's GetBackBuffer
The swapchain's function does not do this, but this one does.
2020-02-28 01:37:23 +00:00
Joshua Ashton 528cacca5f [d3d9] Only have a single implicit swapchain
I am naive to think that this API is in any way sane, and that iSwapChains actually does what you would expect.

Swapchains created by CreateAdditionalSwapchain[Ex] are not tracked in that figure... There can only ever be one.

Great API. Very cool.

This also adds and consolidates some missing thread synchronization on the swapchain functions (that should have already had it).

(note: m_implicitSwapchain always exists, so we don't need to lock if that's all we call.)
2020-02-28 01:29:38 +00:00
Joshua Ashton e41640dcde [d3d9] Make nullptr/oob checks in GetBackBuffer unlikely 2020-02-28 01:03:34 +00:00
Joshua Ashton 8cfca32c2a [d3d9] Don't InitReturnPtr in GetBackBuffer
Matches native behaviour.

Found via a Wine test.
2020-02-28 01:02:56 +00:00
Joshua Ashton c07f8c941c [d3d9] Delegate VCACHE check to QuerySupported
Fixes a failing Wine test
2020-02-28 00:59:44 +00:00
Joshua Ashton 3332bb2844 [d3d9] Add some missing synchronization when completely remaking a presenter 2020-02-27 22:55:20 +00:00
Joshua Ashton 33f6add0ff [d3d9] Fix sampler decision at Present time 2020-02-27 22:54:43 +00:00
Joshua Ashton b6e1da916a [d3d9] Fix scissor rect size when presenting 2020-02-27 22:53:14 +00:00
Joshua Ashton 1592e2770b [d3d9] Remove unnecessary dirty checks in Reset 2020-02-26 22:34:17 +00:00
Joshua Ashton fbf76e8420 [d3d9] Don't mark unuploaded textures as uploaded 2020-02-25 04:37:01 +00:00
Joshua Ashton d1dc217d31 [d3d9] Fix readback for evictManagedOnUnlock 2020-02-23 16:59:33 +00:00
Joshua Ashton 0e353895fd [d3d9] Enumerate adapters by display
WPF expects us to return an adapter for every display attached otherwise
it decides to device reset every frame.

Closes #1459
2020-02-21 18:03:57 +00:00
Philip Rebohle d424fb87aa
[tests] Enable d3dcompiler option for unbounded descriptor tables
Makes compiling SM5.1 shaders for D3D12 a bit less painful.
2020-02-21 10:29:10 +01:00
Joshua Ashton f095f6385e [d3d9] Initialize all backbuffers in swapchain creation
Otherwise they are garbage and undefined layout.

Fixes some validation errors in Lumino City #1462
2020-02-21 06:45:02 +00:00
Joshua Ashton 38838f7428 [d3d9] Synchronize present and wait for idle when invalidating a swapchain
Lumino City calls CreateAdditionalSwapchain instead of the regular device reset functions.

We were missing some needed synchronization here to make this work properly for this game.

Impacts #1462
2020-02-21 01:38:58 +00:00
Joshua Ashton 2408b881a2 [dxso] Use SSBOs for vertex constant buffers if we'd be outside of uniform range
Impacts #1375
2020-02-20 08:14:58 +01:00
Joshua Ashton d11a07082c [d3d9] Remove unnecessary dirty flag change in CreateConstantBuffers 2020-02-20 08:14:58 +01:00
Joshua Ashton 512393e469 [d3d9] Refactor constant buffer creation 2020-02-20 08:14:58 +01:00
Joshua Ashton f688889b41 [d3d9] Avoid setting cursor position if we are already at that position
Avoids an infinite loop where we trigger the cursor move window message which calls SetCursorPos and so on and so forth...

Closes #1400
2020-02-20 01:44:50 +00:00
Joshua Ashton 17166a8aeb [d3d9] Add equality operator overloads for POINT 2020-02-20 01:39:13 +00:00
Joshua Ashton 261a242486 [d3d9] Disallow GetFrontBufferData for anything but D3DPOOL_SYSTEMMEM
Fixes #1464
2020-02-19 18:05:50 +00:00
Joshua Ashton 74d23c22de [build] Use __CRT_UUID_DECL for uuid definitions
Closes #1463
2020-02-18 20:25:05 +01:00
Joshua Ashton 760a163fc5 [util] Disable discard for D&D Temple of Elemental Evil
This game uses D3DLOCK_DISCARD incorrectly
2020-02-18 17:01:41 +00:00
Joshua Ashton 8fabc25a38 [d3d9] Implement d3d9.allowDiscard 2020-02-18 16:53:51 +00:00
Joshua Ashton 6b85e6d3f1 Revert "[d3d9] Ignore D3DLOCK_DISCARD when partially locking buffers"
This reverts commit 50cf3a465b.
2020-02-18 16:50:39 +00:00
Joshua Ashton 378bdbdfb0 [d3d9] Remove repeated wrap state setting in Reset 2020-02-17 18:05:45 +00:00
Philip Rebohle 4cf3ef538c [d3d9] Fix A4R4G4B4 swizzle 2020-02-17 15:32:28 +00:00
Joshua Ashton 4405b51bf3 [dxso] Respect src modifiers in Texcrd for PS 1.4
`texcrd r4.xy, t4_dw.xyww`

Cross Racing Championship Extreme 2005 uses a writemask in texcrd as well as the _dw modifier on the src which we weren't respecting previously.

Closes #1450
2020-02-16 23:24:33 +00:00
Joshua Ashton a6d554615e [d3d9] Avoid needless swizzle for A4R4G4B4
Should fix this d3d9 format working on Intel ANV

Impacts #1455
2020-02-16 22:54:28 +00:00
Joshua Ashton 50cf3a465b [d3d9] Ignore D3DLOCK_DISCARD when partially locking buffers
Fixes #1444
2020-02-15 03:10:00 +00:00
Joshua Ashton 7d3ec74b40 [d3d9] Don't perform clipping in FF if disabled
Avoids unnecessary matrix multiplications in the shader, given this isn't as cheap as it is for programmable.
2020-02-14 19:19:22 +00:00
Joshua Ashton 0c16cc7749 [d3d9] Perform FF vertex clipping in world space
Previously we were doing this in object space which is incorrect.

Closes #1446
2020-02-14 19:09:02 +00:00
Joshua Ashton cad3b69e82 [d3d9] Fix likeliness in GetStreamSource 2020-02-14 17:21:52 +00:00
Joshua Ashton 2096a95262 [d3d9] Fix ColorFill using sampler views for partial extents
Closes #1434
2020-02-14 06:49:15 +01:00
Joshua Ashton 02c79d892c [d3d9] Try to create offscreen surfaces with render target usage 2020-02-14 06:49:15 +01:00
Joshua Ashton 1f5ddde411 [d3d9] Remove unused D3D9ViewSet structure 2020-02-14 06:49:15 +01:00
ryester27 dff2a4ea24 [util] Force 16:9 aspect ratio for Hyperdimension Neptunia U: Action Unleashed 2020-02-14 02:50:15 +00:00
Joshua Ashton 582fe899f8 [dxso] Implement TexBemL 2020-02-14 01:15:34 +00:00
Joshua Ashton c7d5ce1c50 [d3d9] Fix incorrect type for luminance scale and offset in D3DTOP_BUMPENVMAPLUMINANCE 2020-02-14 01:10:26 +00:00
Joshua Ashton ae68e3a5bc [d3d9] Defer managed texture uploads until PrepareDraw and when needed
This also caches shader masks used for hazard tracking.
2020-02-14 00:51:58 +00:00
Joshua Ashton 0ea510eb9b [util] Add clearAll helper to bitset 2020-02-14 00:51:58 +00:00
Joshua Ashton 6e9725a124 [d3d9] Use bitsets for bool subresource arrays
Also remove lockflag tracking and consolidate that to a bitset
2020-02-14 00:51:58 +00:00
Joshua Ashton 960d2bd158 [util] Add exchange helper to bitset 2020-02-14 00:51:58 +00:00
Joshua Ashton cf6142e782 [d3d9] Don't expose formats with alpha as adapter formats
Impacts #1440
2020-02-14 00:46:14 +00:00