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

3796 Commits

Author SHA1 Message Date
Robin Lange
a58feaa16e [build] Disable shallow cloning in GitHub actions
This fixes the HUD not showing the full DXVK version when using builds from GitHub actions.

Explanation:
By default, the "checkout" step only clones the repository with a depth of 1. This causes `git describe` to fail in Meson, causing it to fall back to the project version number instead.
2021-07-23 14:13:54 +00:00
Robin Kertels
6ba3d2f9d4 [d3d9] Set correct usage flags for large temporary staging buffers 2021-07-23 13:36:21 +00:00
Robin Kertels
fa279eb8ad [d3d9] Ignore NO_DIRTY_UPDATE for POOL_DEFAULT resources
Respecting it breaks Senren Banka because we never upload the texture.
2021-07-23 13:36:21 +00:00
Robin Kertels
584e1515b1 [d3d9] Fix pitch when copying straight from mapping buffer 2021-07-23 13:36:21 +00:00
Robin Kertels
34101dcf26 [d3d9] Fix UpdateTexture extent
Same as 5f1629f2cb
2021-07-23 13:36:21 +00:00
Robin Kertels
5037e49646 [util] Merge GTA IV configs
The app config system can not handle more than one entry
per exe name, so the enableUMA one disabled the NVAPI
workaround.
2021-07-21 15:08:23 +02:00
Philip Rebohle
11bbc07ea1
[dxvk] Support destination pitch in packImageData 2021-07-19 16:54:56 +02:00
Joshua Ashton
d3112c320b [d3d9] Add dirty texture tracking
Reduces overhead from re-binding and unnecessary binding (srgb changes) in L4D2.

I go from about 750 -> 850-900 fps in c1m2_streets with this change.
2021-07-14 20:38:49 +00:00
Robin Kertels
8eeff90e0a [d3d9] Only use staging buffers for uploads once we've stalled on the resource 2021-07-14 19:26:25 +00:00
Robin Kertels
b83261b759 [d3d9] Adjust waiting in LockBuffer to staging buffer upload
Now that we're uploading using a staging buffer,
we don't need to wait for non default buffers.

We should also respect READONLY for WRITEONLY buffers
(yes, it sounds dumb) because Nostale relies on that.
2021-07-14 19:26:25 +00:00
Robin Kertels
ed24c17d53 [d3d9] Validate srcRect and dstPoint in UpdateSurface 2021-07-14 18:33:38 +00:00
Georg Lehmann
b3b2f0921c [d3d9] Never init pSharedHandle.
This parameter has three different meanings if it's non NULL:
- if Pool is D3DPOOL_SYSTEMMEM it's a host pointer for inital data
- if it points to a nullptr it's a output handle
- if it's a pointer to non NULL pointer it's an import handle
2021-07-14 15:29:46 +00:00
Robin Kertels
5f1629f2cb [d3d9] Fix FlushImage extent for smaller mip maps 2021-07-10 16:23:56 +00:00
Robin Kertels
9f0775b1ac [d3d9] Always use cached memory for texture mapping buffers
We read from that memory when uploading the texture.
Fixes performance in Oblivion.
2021-07-08 21:42:12 +00:00
Joshua Ashton
c7f8267f98 [d3d9] Fix NV12 conversion
Froggy is the right color now
2021-07-08 22:36:59 -07:00
Joshua Ashton
ad524a4a52 [tests] Add d3d9_bc_update_surface test 2021-07-08 22:24:44 -07:00
Philip Rebohle
e23792ef91
[d3d11] Fix handling sRGB UAV images 2021-07-07 16:00:12 +02:00
Joshie
f9034007ac [util] Fix indexing of non-float vectors 2021-07-05 18:58:55 +02:00
Connor Abbott
9579132942
[d3d9] Remove extra spaces in def file
wrc is pickier about this than windres and refuses to accept it.
2021-07-03 14:28:28 +02:00
Connor Abbott
aae0e57a46
Don't add def file as an object
This is unnecessary even on mingw, and leads to duplicating the .def
file on the linking command line which winegcc complains about.
2021-07-03 14:28:28 +02:00
Connor Abbott
2988875e93
[dxgi] Call QueryPerformanceCounter directly
dxvk::high_resolution_clock is meant to be a wrapper around the C++ time
library, and getCounter() is (AFAIK) an internal thing so calling it
directly is odd. On winelib this redirects to the host's implementation,
which means this fails to compile. Since this is a Windows API and not
for internal usage just call the Windows API function directly.
2021-07-03 14:28:28 +02:00
Connor Abbott
b9135ca0cd
Do not try to load libraries natively under __WINE__
This was only half-implemented (e.g. OpenXR was still calling
GetModuleHandle), broke compilation with Vulkan due to mismatched ABI,
and wouldn't have worked anyways with winelib builds because we still
need access to wine's implementation of the Vulkan win32 winsys
integration. Perhaps this is still useful for dxvk-native but if so it
should be re-added under a DXVK_NATIVE flag.
2021-07-03 14:28:28 +02:00
Connor Abbott
120585c66d
Don't hardcode windres location
This isn't the meson way to do things. Doing this also prepares us for
using the builtin meson rc support instead of hand-rolling our own once
https://github.com/mesonbuild/meson/pull/8954 lands.
2021-07-03 14:28:25 +02:00
Philip Rebohle
c8a9308c37
[dxvk] Enable disableMsaa option for World of Final Fantasy
Fixes #1216.
Fixes #2136.
2021-07-02 16:11:24 +02:00
Philip Rebohle
3b857d93b5
[d3d11] Add d3d11.disableMsaa option to disable multisampling
Aims to be mostly transparent to the application, although breakage
can still happen if shaders query the sample count and do not handle
a sample count of 1.
2021-07-02 05:52:05 +02:00
Philip Rebohle
e379f472f6
[dxbc] Implement hack to treat multisampled textures as normal textures 2021-07-02 05:52:05 +02:00
Paul Gofman
8b6ac527b4 [d3d11] Initialize buffer flags in D3D11UnorderedAccessView::GetDescFromResource(). 2021-07-01 15:20:07 +02:00
Robin Kertels
309284e7dc [d3d9] Respect 4 byte pitch when reading back texture 2021-07-01 05:47:44 -07:00
Robin Kertels
c43618d19f [d3d9] Fix texture dirty box clearing
- Fix interleaved locks with evictManagedOnUnlock
We need to make sure there are no other subresources of a texture locked
before clearing the dirty box. Otherwise the data for those other subresources
won't get copied into VRAM.

- Clear dirty box regardless of texture pool
Otherwise we keep repacking and copying the whole texture
for every single lock. This causes performance problems
in Star Wars: The Old Republic.
2021-07-01 05:47:44 -07:00
Philip Rebohle
2ff8b42fff [d3d9] Enable robustBufferAccess2 feature if available
Tightens some out-of-bound rules around vertex attributes.
2021-06-29 18:35:47 -07:00
Philip Rebohle
96f5641a7e [d3d9] Ensure that the bound UP vertex buffer region is large enough
If the buffer size is less than (vertexCount * stride), the last vertex
may be considered out-of-bounds, even if all attributes are included in
the vertex.

Fixes #2131.
2021-06-29 18:35:47 -07:00
Philip Rebohle
6e4778cc81
[build] Define _WINNT_WIN32 on MinGW
Fixes #2133.
2021-06-29 15:30:34 +02:00
Philip Rebohle
45a6d5fb5b
[dxvk] Fix potential undesired host-visible buffer invalidation
We cannot invalidate mapped buffers in the backend because the frontend
may cache the mapped slice from its own invalidations, which would then
become invalid. Very unlikely to be an issue in practice.
2021-06-29 13:58:52 +02:00
Philip Rebohle
cd8a2bcfcd [dxvk] Use custom sync primitives 2021-06-29 00:51:20 +02:00
Philip Rebohle
7305da6951 [util] Implement custom sync primitives 2021-06-29 00:51:20 +02:00
Tobias Langendorf
ca6d8c6ce9
[util] Use FIFO_RELAXED present mode Earth Defense Force 5 (#2127)
The game constantly switches between SyncInterval 0 and 1, possibly in an attempt to implement adaptive Vsync, which causes performance issues because it forces us to recreate the Vulkan swap chain every couple of frames. Instead, enable the Vulkan equivalent of adaptive Vsync if possible.
2021-06-28 18:30:03 +02:00
Philip Rebohle
1516464c8b
[tests] Update D3D11 triangle test
Essentially implements a microbenchmark for state changes.
2021-06-27 04:51:44 +02:00
Philip Rebohle
08a6b42458
[d3d11] Fix box validation in CopySubresourceRegion1 2021-06-24 21:07:48 +02:00
Philip Rebohle
9f80d9f8b2
[d3d11] Remove functions to update mapped buffers
No longer relevant since staging images will no longer be backed
by actual Vulkan images and dynamic images are not GPU-writable.
2021-06-24 21:07:48 +02:00
Philip Rebohle
7d76262c52
[d3d11] Use D3D11_COMMON_TEXTURE_MAP_MODE_STAGING if possible 2021-06-24 21:07:48 +02:00
Philip Rebohle
450c42444f
[d3d11] Use UpdateImage in D3D11DeferredContext::MapImage 2021-06-24 21:07:48 +02:00
Philip Rebohle
fd66f44561
[d3d11] Use UpdateImage in D3D11ImmediateContext::UnmapImage 2021-06-24 21:07:48 +02:00
Philip Rebohle
6ba1746d46
[d3d11] Introduce UpdateImage 2021-06-24 21:07:48 +02:00
Philip Rebohle
5e4ed2d929
[d3d11] Introduce CopyImage 2021-06-24 21:07:48 +02:00
Philip Rebohle
cd17301236
[d3d11] Introduce CopyBuffer
Generalizes some copy code.
2021-06-24 21:07:48 +02:00
Philip Rebohle
1a6f4456d8
[d3d11] Introduce ComputeMappedOffset for image resources
Modifies GetSubresourceLayout slightly in case only a partial aspect
mask is being passed to the function. This way we can conveniently
compute the offset of a given pixel within the mapped buffer of an
image subresource.
2021-06-24 21:07:48 +02:00
Philip Rebohle
7c0ee272c3
[d3d11] Add texel buffer usage to staging buffer
Needed for staging image updates.
2021-06-24 21:07:48 +02:00
Philip Rebohle
7160b85924
[d3d11] Add texel buffer usage flags to mapped subresource buffers 2021-06-24 21:07:48 +02:00
Philip Rebohle
731e88b196
[d3d11] Handle MAP_MODE_STAGING in initializer
Otherwise, we'll crash if no real image is present.
2021-06-24 21:07:48 +02:00
Philip Rebohle
596f65f75f
[d3d11] Handle MAP_MODE_STAGING when mapping images on the immediate context 2021-06-24 21:07:48 +02:00