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

3909 Commits

Author SHA1 Message Date
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
Philip Rebohle
8b67ef724e [d3d11] Add frame rate limiter and dxgi.maxFrameRate option 2021-06-12 13:50:08 +02:00
Philip Rebohle
4f5f85925b [d3d9] Add frame rate limiter and d3d9.maxFrameRate option 2021-06-12 13:50:08 +02:00
Philip Rebohle
b537f19a3c [vulkan] Add frame rate limiter to Vulkan presenter 2021-06-12 13:50:08 +02:00
Philip Rebohle
a16c861358 [util] Implement frame rate limiter
This tries to be sophisticated and disables itself when it notices
that the frame rate is going to be limited by presentation anyway.
2021-06-12 13:50:08 +02:00
Robin Kertels
6f468ec5e0 [d3d9] Fix texture converter 2021-06-12 03:48:01 -07:00
Philip Rebohle
9eeaedeeb7
[util] Remove FFXIV workaround
Looks like whatever caused this in Mesa got fixed quite a while ago.
2021-06-11 01:59:56 +02:00
Thomas Crider
63fd2b9d32 [util] Enable d3d9.deferSurfaceCreation for Ninja Gaiden Sigma/Sigma 2
Co-authored-by: Georg Lehmann <49841484+DadSchoorse@users.noreply.github.com>
2021-06-10 01:35:48 -07:00
Joshua Ashton
01033af9a4 [build] Avoid Wine Mono and Gecko installs in the setup script
Co-authored-by: Alexis Peypelut <iroalexis@outlook.fr>
2021-06-06 09:31:01 -07:00
Joshua Ashton
f1a9d72d38 [d3d9] Don't scale z to [0, 1] for POSITIONT
I originally thought the depth clipping region was always [0, 1] when I first implemented this nearly 2 years ago.

The depth clipping region is already in the viewport's depth range, so just don't do anything here if we are z-testing.

( We still need to keep the flattening around for when ztest is disabled though :( )

Fixes: #2056
2021-06-06 09:31:01 -07:00
Philip Rebohle
fe00919d5f [util] Handle upper-case file extensions correctly 2021-06-06 03:57:15 -07:00
Joshua Ashton
f4cbc9ae9d [util] Enable emulateUMA for GTA IV
This game thinks we are on Intel, so report memory like they do.
2021-06-01 19:26:41 +02:00