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
Philip Rebohle
9e15831a2d
[d3d11] Store packed format info in D3D11CommonTexture
2021-06-24 21:07:48 +02:00
Philip Rebohle
f155b8a8b9
[d3d11] Introduce DiscardSlice and GetMappedSlice for image resources
...
These do the same as they do for buffer resources, but for a mapped
image subresource instead.
2021-06-24 21:07:48 +02:00
Philip Rebohle
11aa2a703a
[d3d11] Introduce D3D11_COMMON_TEXTURE_MAP_MODE_STAGING
...
This map mode can be used when no Vulkan image is needed to back a
staging resource, which can save a significant amount of memory.
2021-06-24 21:07:48 +02:00
Philip Rebohle
b384f5372e
[d3d11] Zero-initialize mapped buffers for images correctly
2021-06-24 21:07:48 +02:00
Philip Rebohle
f50c5234dc
[dxvk] Add source offset/extent to copyPackedBufferToDepthStencilImage
2021-06-24 21:07:48 +02:00
Philip Rebohle
a14884c652
[dxvk] Add destination offset/extent to copyDepthStencilImageToPackedBuffer
...
Needed to support partial copies between buffers and depth-stencil images.
2021-06-24 21:07:47 +02:00
Philip Rebohle
ba9d670157
[dxvk] Introduce copyPackedBufferImage
2021-06-24 21:07:47 +02:00
Philip Rebohle
27155539b6
[dxvk] Add meta copy pipeline for packed buffer image copies
2021-06-24 21:07:47 +02:00
Philip Rebohle
9f7a5a077f
[dxvk] Fix broken row/slice alignment in buffer<->image copies
...
If the specified row or slice alignment matches the row size exactly
but is not a power of two, we could accidentally screw up the alignment.
2021-06-24 21:07:47 +02:00
Philip Rebohle
ba4938e201
[dxvk] Add slice alignment to copyImageToBuffer
2021-06-24 21:07:47 +02:00
Philip Rebohle
4840cdaf8c
[dxvk] Add slice alignment to copyBufferToImage
2021-06-24 21:07:45 +02:00
Philip Rebohle
87d32a234d
[dxvk] Handle discard aspects correctly when performing clears
...
Should fix an Nvidia driver crash, see #2118 .
2021-06-24 17:15:52 +02:00
Robin Kertels
8a93bbd8fa
[d3d9] Make sure clear extent does not exceed rt size
2021-06-19 16:11:11 -07:00
Robin Kertels
7dd443802c
[util] Report Nvidia GPU to Far Cry 1
2021-06-19 10:43:31 -07:00
Robin Kertels
d7c4afbeba
[d3d9] Pass correct element size to texture converter
2021-06-19 10:43:31 -07:00
Philip Rebohle
81664fce44
[dxbc] Remove atomic counter workaround for ancient Mesa versions
...
No one should be using Mesa 19.0 at this point.
2021-06-18 15:44:58 +02:00
Philip Rebohle
7beb344f6f
[dxbc] Remove dxvk.useEarlyDiscard option
...
No longer relevant on drivers that support DemoteToHelperInvocation.
Closes #2109 .
2021-06-18 15:44:27 +02:00
Georg Lehmann
6b8ab4fd38
[d3d11] Remove mingw-w64 < 6 workarounds
2021-06-15 20:41:34 +02:00
Philip Rebohle
dca63464b4
[meta] Release 1.9
2021-06-15 15:32:19 +02:00
Georg Lehmann
7a688bd74c
[util] force 60fps for Demon Stone
2021-06-15 02:54:14 -07:00
Samuel Pitoiset
dba539471d
[dxso] Remove old RADV/LLVM workaround for early discard
...
This workaround has been removed for DXBC few weeks ago. Note that
RADV/ACO is no longer a thing with latest Mesa git anyways.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2021-06-15 01:07:35 -07:00
Philip Rebohle
de05728c8c
[dxvk] Check view format as well when deferring clears
...
Otherwise, we may accidentally clear to an incorrect value.
Fixes #2100 .
2021-06-14 16:41:31 +02:00
Philip Rebohle
30a1a29aa6
[util] Add DXVK_FRAME_RATE environment variable to limit frame rate
2021-06-12 13:50:08 +02:00
Philip Rebohle
12c51f1c3d
[util] Enable frame rate limiter for Nier Replicant
...
The game does not run properly at frame rates above 60 and uses the sync
interval in a weird way that sometimes leads to the game being stuck at
31 FPS, and in the menus it displays content at weird refresh rates that
it was clearly not designed to run at.
2021-06-12 13:50:08 +02:00
Philip Rebohle
6044e63eb0
[dxgi] Notify presenter about display mode changes
2021-06-12 13:50:08 +02:00
Philip Rebohle
e281eee795
[dxgi] Add NotifyModeChange method to IDXGIVkSwapChain
2021-06-12 13:50:08 +02:00