1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 10:24:10 +01:00
Commit Graph

3128 Commits

Author SHA1 Message Date
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
Philip Rebohle
ae01bd8bd4 [dxgi] Ignore sync interval if PRESENT_TEST is used
Otherwise, the following sequence leads to the Vulkan
swap chain being recreated once per frame:

  swapchain->Present(0, DXGI_PRESENT_TEST);
  swapchain->Present(1, 0);

Found while investigating #1314.
2020-01-04 11:18:51 +01:00
Philip Rebohle
3db00a0f40 [d3d11] Increment transfer command counter when initializing UAV counter
Otherwise, we won't clear the counter before it is being used if there are
no other transfer commands recorded to the initializer command buffer.
2020-01-03 13:44:23 +01:00
Joshua Ashton
0343938c2e [util] Enable d3d9.forceSamplerTypeSpecConstants for Halo [CE]
The game uses incorrect sampler types in the shaders for glass rendering which breaks it on native + us if we don't spec-constantly chose the sampler type automagically.
2020-01-01 20:58:42 +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
Philip Rebohle
694d6c7f77 [util] Improve ticket lock implementation
Atomic fetch-and-add on unlock is not needed since no other thread can
modify the serving counter after the calling thread acquired the lock.
May slightly improve performance in games relying on ID3D10Multithread.
2020-01-01 13:59:46 +01:00
Joshua Ashton
d7f4e44c24 [meta] Happy New Year 🎉💃🎊
It's now 2020!
2020-01-01 01:19:15 +01: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
0993f6f25d [dxso] Negate reflection in TexM3x3VSpec 2019-12-25 18:43:51 +00:00
Joshua Ashton
66fee8ff51 [dxso] Normalize eyeRay and normal before reflection in TexM3x3Spec 2019-12-25 18:36:34 +00:00
Joshua Ashton
e0b83b13b5 [dxso] Only track co-issue parent opcode rather than the full context
Tracking the full instruction ctx is slow and unnecessary
2019-12-25 18:00:46 +00:00
Joshua Ashton
724fe78ba1 [dxso] Don't emit a co-issue for CNDs parented to a CND
Closes #1309
2019-12-25 17:43:35 +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
d39ff9020e [dxso] Perform saturate after bitshift modifier 2019-12-22 18:14:46 +00:00
Joshua Ashton
3ff9c4cc43 [dxso] Track and prioritize co-issued CNDs above their parent ops 2019-12-22 17:46:57 +00:00
Joshua Ashton
4d6fbacd3a [dxso] Keep track of the current instruction index in a decoding context 2019-12-22 17:44:30 +00:00
Joshua Ashton
abf74299e9 [dxso] Parse co-issue instruction modifier 2019-12-22 17:44:04 +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
fae99907da [util] Add get to bitset 2019-12-18 23:18:01 +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
Alessandro Toia
3c8fdc2863 Report gpu vendor as Nvidia for Star Wars Battlefront II 2019-12-18 17:38:24 +01: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
b99b1d153a [util] Add bitset helper 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
Philip Rebohle
a265af74ed
[hud] Respect dxvk.hud configuration option again
This was accidentally dropped during the HUD refactor. Fixes #1279.
2019-12-17 04:40:06 +01:00
Joshua Ashton
e527b963c4 [util] Handle undefined ratios in simplest ratio helper
Fixes division by zero error

Closes #1280
2019-12-17 03:16:56 +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
Philip Rebohle
3cdae3ae1d
[meta] Release 1.5 2019-12-16 14:41:29 +01:00
Philip Rebohle
9be0bf95ca
[util] Defer D3D9 surface creation for Atelier Ryza 2019-12-16 14:41:29 +01:00
Joshua Ashton
bcf8adf437 [meta] Add D3D9 specifics to the README 2019-12-16 12:01:17 +01: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
Philip Rebohle
566fb84abd
[hud] Allocate vertex buffer in host-visible device memory if possible 2019-12-16 00:24:19 +01:00
Philip Rebohle
c6fb8fa5e8
[hud] Clean up HUD rendering
- Avoids rebinding the vertex buffer on every single draw.
- Avoids push constants. We could use MultiDrawIndirect in the future.
- Slightly reduces the vertex buffer size.
2019-12-16 00:03:21 +01:00
Philip Rebohle
13d2479ecf
[hud] Don't create uniform buffer
No longer used.
2019-12-15 23:17:23 +01:00
Philip Rebohle
9c6ff95bb6
[hud] Don't use vertex shader for scaling
Instead, do it on the CPU.
2019-12-15 23:13:59 +01:00
Philip Rebohle
aa40decc23
[d3d11] Don't present if the presenter has no swap chain.
Also fixes DXGI_PRESENT_TEST handling for zero-sized windows.
2019-12-15 11:38:57 +01:00