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

1953 Commits

Author SHA1 Message Date
Philip Rebohle
8d493d9445
[d3d11] Minor map optimization on immediate contexts
We should make the fast path as fast as possible.
2019-02-04 10:24:30 +01:00
Philip Rebohle
01a7e06ad7
[dxvk] Inline DxvkBuffer::allocSlice and DxvkBuffer::freeSlice
Seems to take some load off both the main rendering thread and the
cleanup thread in SotTR.
2019-02-04 10:01:29 +01:00
Philip Rebohle
c451c9a95e
[dxvk] Only merge clears when framebuffer size matches view size
Otherwise, we'll only clear a smaller portion of the view, which is
incorrect. Fixes a rendering issue in Fallout New Vegas with DXUP.
2019-02-04 07:31:17 +01:00
Philip Rebohle
405bd737e0
[util] Disable nvapi hack for Far Cry 4 / Primal
Dunia engine games don't seem to like this either.
2019-02-04 07:09:37 +01:00
Philip Rebohle
e5a06d3f4a
[dxbc] Only load requested components from constant buffers
Results in better performance compared to loading the entire vector
on RADV. Suggested by Samuel Pitoiset.
2019-01-30 16:32:25 +01:00
Philip Rebohle
c360a196fb
[dxvk] Restore dedicated allocation behaviour
Whoops.
2019-01-30 15:49:06 +01:00
Philip Rebohle
412fb9ac57
[dxvk] Use VK_EXT_memory_budget to report memory usage 2019-01-30 15:45:57 +01:00
Philip Rebohle
b76f470c5f
[dxvk] Remove dxvk.allowMemoryOvercommit option
The default behaviour is now to allow overallocation by default,
which makes sense especially when VK_EXT_memory_priority is used.

Does not seem to affect Nvidia drivers.
2019-01-30 13:52:43 +01:00
Philip Rebohle
dfa8524e73
[dxvk] Wire up memory priority to device memory allocations 2019-01-30 13:52:43 +01:00
Philip Rebohle
03b488772d
[dxvk] Store device instead of adapter in memory allocator 2019-01-30 13:52:43 +01:00
Philip Rebohle
b884c56631
[dxvk] Enable VK_EXT_memory_priority and features if available 2019-01-30 13:52:43 +01:00
Philip Rebohle
e7bf1647dd
[dxvk] Use high memory priority for GPU-writable resources 2019-01-30 13:52:43 +01:00
Philip Rebohle
134613375d
[dxvk] Introduce concept of priorities to device-local memory allocations
The priority defines the importance of any given allocation being
resident in device-local memory rather than system memory, with
values between 0 (low) and 1 (high).

Suballocations will only work on chunks with the requested priority.
This ensures that high-priority allocations are reserved solely for
high-priority resources, and that high-priority resources will be
allocated from a high-priority memory chunk.
2019-01-30 13:52:43 +01:00
Philip Rebohle
4171596d14
[meta] Update Vulkan headers to 1.1.98 2019-01-30 13:52:17 +01:00
Philip Rebohle
35c7d687ff
[meta] Release 0.96 2019-01-26 18:41:48 +01:00
Philip Rebohle
af92bc9d9b
[utils] Disable nvapi hack for Mass Effect Andromeda
Fixes #886.
2019-01-26 18:38:58 +01:00
Philip Rebohle
1cc24c223b
[dxbc] Reduce length of tessellation i/o arrays to minimum
This allows us to fix a violation of the Vulkan specification
where using the same location range for per-vertex and per-patch
i/o is illegal.

May also help certain drivers figure out what's actually needed.
2019-01-26 17:12:23 +01:00
Philip Rebohle
b0b7960548
[dxbc] Add method to count required registers for signatures 2019-01-26 17:11:49 +01:00
Philip Rebohle
0b5cffb0bb
[dxbc] Parse patch constant signature 2019-01-26 14:52:29 +01:00
Philip Rebohle
3960355d47
[d3d11] Avoid redundant viewport updates in RSSetState
Rise of the Tomb Raider changes its rasterizer state very frequently
(once every handful of draws), and the viewport package is very large,
so we should avoid sending it to the CS thread redundantly.

We only need to update when the scissor test state has changed.
2019-01-23 05:36:49 +01:00
Philip Rebohle
df7573f332
[dxvk] Implement separate code path for clear-only render passes
Allows more clears to overlap with non-rendering commands
in case the app calls OMSetRenderTargets prior to the clear.
Also fixes a bug where we might accidentally use the wrong
set of color attachments to set up render pass operations.
2019-01-23 01:12:03 +01:00
Philip Rebohle
8cfb7936ed
[dxvk] Use explicit barriers after framebuffer clears
This may allow clears to overlap with subsequent commands unless a
barrier is actually required.
2019-01-23 01:12:03 +01:00
Philip Rebohle
2aeef063c1
[dxvk] Properly support TOP_OF_PIPE and BOTTOM_OF_PIPE for barriers 2019-01-23 01:12:03 +01:00
Philip Rebohle
1631243c64
[dxvk] Don't flush barriers in renderPassBindFramebuffer
Instead, any pending barriers must be flushed manually if necessary.
2019-01-23 01:11:55 +01:00
Philip Rebohle
5b90b6a7ce
[dxvk] Make external subpass dependencies part of DxvkRenderPassOps
This will allow us to use finer-grained synchronization around certain
meta operations involving render targets, such as clears.
2019-01-22 20:13:43 +01:00
Philip Rebohle
a79409ad02
Revert "[dxvk] Don't put rendering stage/access masks into image info"
This reverts commit ce3642edd0.

We're actually going to need these when optimizing render pass barriers.
2019-01-22 14:52:35 +01:00
Philip Rebohle
3109ab476a
[dxvk] Add support for general memory barriers
Affects all resources with compatible stage and access flags.
2019-01-22 14:31:10 +01:00
Philip Rebohle
b1540a16e8
[dxvk] Fix render pass ops in clearImageViewFb 2019-01-22 13:41:10 +01:00
Andrew Eikum
9ad24a2216 [d3d11] In D3D11CreateDevice, create DXGI factory with IDXGIFactory1 support (#878) 2019-01-22 10:57:05 +01:00
Philip Rebohle
cfc3f686bb
[util] Update per-app config overrides 2019-01-19 17:45:26 +01:00
Philip Rebohle
c3ae180c1a
[d3d11] Remove d3d11.fakeStreamOutput option
Only relevant on old drivers which do not support the extension.
Assumed to be enabled by default if Transform Feedback is not supported.
2019-01-19 17:39:59 +01:00
Philip Rebohle
4d4bd182c1
[d3d11] Allow arbitrary back buffer formats for swap chains
Doesn't match D3D11 behaviour, but shouldn't really break anything
since D3D11 has a fixed set of swap chain-compatible formats.

Might help DXUP in avoiding unnecessary framebuffer blits.
2019-01-19 02:28:25 +01:00
Philip Rebohle
4dac8e7233
[dxvk] Update buffer view in clearBufferView
Otherwise we might accidentally clear the wrong buffer region.
2019-01-18 21:29:05 +01:00
Philip Rebohle
9dbe352c51
[dxvk] Fix incorrect buffer view range for views with non-zero offset 2019-01-18 21:26:48 +01:00
Philip Rebohle
7e975bbdfc
[dxvk] Move blend constants and stencil ref state to DxvkDynamicState
For consistency with how depth bias is being stored.
2019-01-17 22:26:27 +01:00
Philip Rebohle
95815a075b
[dxvk] Move depth bias out of rasterizer state
While the previous model corresponded to D3D11, it does
not reflect that the backend treats it the same way as
e.g. blend constants.
2019-01-17 22:25:21 +01:00
Philip Rebohle
8cc4497f11
[dxvk] Only update index buffer for indexed draws
This is somewhat uncommon, but we sometimes bind an index
buffer in a render pass that doesn't get used at all.
2019-01-17 03:15:21 +01:00
Philip Rebohle
321feed728
[dxvk] Bump state cache version to v3
We're still going to try and fix up v2 entries. This may
cause unnecessary pipelines to be created for games that
actually use depth bias.
2019-01-17 02:32:09 +01:00
Philip Rebohle
0d84ebd4c9
[dxvk] DepthClampEnable -> DepthClipEnable
There are subtle differences between the two that we
should deal with in the backend at some point.
2019-01-17 01:59:10 +01:00
Philip Rebohle
4819287029
[d3d11] Do not enable depth bias if the parameters are zero 2019-01-17 00:53:54 +01:00
Philip Rebohle
422198952a
[dxvk] Use minimal set of dynamic state
We don't need to enable blend constants for pipelines that don't
have blending enabled, etc. This helps reduce the number of API
calls slightly and may help the driver work more efficiently.
2019-01-16 20:55:41 +01:00
Philip Rebohle
190f114449
[dxvk] Add methods to check which dynamic states a pipeline uses 2019-01-16 20:01:20 +01:00
Philip Rebohle
59462f3231
[dxvk] Don't re-emit dynamic state every time we bind a pipeline
This used to be necessary on some drivers that would lose dynamic
state upon pipeline bindings, but that no longer seems to be the
case.
2019-01-16 17:47:31 +01:00
Michal Srb
cc38412d04 [d3d11] Fix bad check in DrawInstancedIndirect (#863) 2019-01-15 11:12:03 +01:00
Philip Rebohle
109300d541
[d3d11] Remove unused syncMode option 2019-01-14 19:21:10 +01:00
Philip Rebohle
2bae3a5c8b
[d3d11] Reintroduce support for dxgi.maxFrameLatency
This option was previously ignored for some reason.
2019-01-14 18:29:25 +01:00
Esdras Tarsis
d50fb7f311 [meta] It's 2019!
Fix year in zlib/libpng license
2019-01-13 22:43:22 +01:00
Entryhazard
7306c3153c [util] Change getEnvVar to use getenv (#859) 2019-01-13 21:27:59 +01:00
Philip Rebohle
ddce33692c
[meta] Release v0.95 2019-01-12 21:42:49 +01:00
Philip Rebohle
79eded9ae2
[d3d11] Only apply viewport and scissor rect if they have changed
Resident Evil 2 calls these functions before every single draw
call, so we should avoid emitting redundant viewport updates.
2019-01-12 20:22:08 +01:00