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

2766 Commits

Author SHA1 Message Date
Philip Rebohle
7751541662
[dxvk] Don't lock swap lock if not necessary
The swap lock only protects the 'next' free list, which
is not accessed at all when creating a new buffer.
2019-10-26 15:24:54 +02:00
Philip Rebohle
e868f829b5
[dxvk] Pad buffers more tightly
This will allow for smaller buffers to be laid out more efficiently.
2019-10-26 15:24:54 +02:00
Philip Rebohle
83fc15c594
[dxvk] Force-update draw buffer for graphics pipeline barrier checks 2019-10-26 12:41:40 +02:00
Philip Rebohle
c44d30d78b
[dxvk] Consider indirect draw buffer in graphics pipeline barriers 2019-10-26 04:13:05 +02:00
Philip Rebohle
f60d1db1f1
[dxvk] Consider vertex/index buffers in graphics pipeline barriers
Leaving these out was an oversight.
2019-10-26 04:12:32 +02:00
Philip Rebohle
e918104ef3
[dxvk] Introduce checkGfxImageBarrier 2019-10-26 03:56:57 +02:00
Philip Rebohle
7a78852776
[dxvk] Introduce checkGfxBufferBarrier 2019-10-26 03:56:52 +02:00
Philip Rebohle
2b812f07c1
[dxvk] Move finalizeDraw into commitGraphicsState
There is no readon to perform this after the draw anymore.
2019-10-26 03:55:03 +02:00
Philip Rebohle
4e3da45fde
[d3d11] Recycle command lists from deferred contexts
Can save a few memory allocations and deallocations at runtime.
2019-10-25 23:09:21 +02:00
Philip Rebohle
7f66373a69
[util] Add virtual destructor to NoWrapper 2019-10-25 22:08:00 +02:00
Philip Rebohle
55bae45915
[d3d11] Fix ref counting for D3D11CommandList 2019-10-25 21:37:18 +02:00
Philip Rebohle
41f04ffb61
[d3d11] Fix incorrect AddRef return value 2019-10-25 21:36:21 +02:00
Philip Rebohle
f9c2e43ffc
[d3d11] Don't set HOST pipeline stage and access flags for resources
The backend does not and will not use that information at all.
2019-10-24 16:57:06 +02:00
Philip Rebohle
2d6a3396dd
[dxbc] Declare length of shader input array late
Otherwise, we generate out-of-bounds array reads and writes
in broken ENB shaders.
2019-10-23 16:36:52 +02:00
Philip Rebohle
df61a479a2
[spirv] Add 'late' constants
Late constants can be used to reserve a placeholder ID for a constant
before the constant's value is known. The value can be changed later.
Only scalar 32-bit integer and floating point types are supported
as of right now.
2019-10-23 16:09:28 +02:00
Philip Rebohle
59d4556641
[dxbc] Extend scalar constants to vectors if required
Needed for ENB. Fixes #865.
2019-10-23 15:26:22 +02:00
Philip Rebohle
ec8ca8a403
[dxbc] Assume vec4 type for i/o vars not declared in signature
Works around an ENB bug.
2019-10-23 15:26:22 +02:00
Philip Rebohle
3e12a116bb
[dxbc] Declare temp registers on demand
And ignore dcl_temps. Needed to successfully compile some broken
ENB shaders (this does work on Windows too). See #865.
2019-10-23 13:55:04 +02:00
Philip Rebohle
ee77afb6af
[d3d11] Validate shader module capabilities
Only create a shader module if the device actually supports
the required features. Apparently this is needed for some
Unity Engine games.
2019-10-21 12:10:05 +02:00
Philip Rebohle
ddf010479d
[d3d11] Refactor shader module creation 2019-10-21 12:09:53 +02:00
Philip Rebohle
9444162ca6
[util] Enable constant buffer range check for Titan Quest
Reportedly flickers on Nvidia GPUs otherwise.
2019-10-20 13:27:12 +02:00
Philip Rebohle
7a0360d7c2
[dxgi] Remove useless d3d10.enable option 2019-10-19 00:34:51 +02:00
Philip Rebohle
ad3542f4fc
[meta] Release 1.4.3 2019-10-18 17:50:38 +02:00
Philip Rebohle
8211225ad4
[dxbc] Swap OpSelect arguments for Ne/Dne, don't use OpLogicalNot
Saves one instruction.
2019-10-18 03:22:20 +02:00
Philip Rebohle
b756c229a9
[dxvk] Implement more compact state cache data format (v8)
Omits a lot of unnecessary data and considerably reduces
the state cache file size, often by over 80%.
2019-10-18 00:33:50 +02:00
Philip Rebohle
0ac89ccd9e
[util] Add missing != operator to Sha1Hash 2019-10-18 00:33:40 +02:00
Philip Rebohle
4b0a5dffb2
[dxvk] Support component mappings in blitter 2019-10-16 20:00:38 +02:00
Philip Rebohle
d998aaad12
[dxvk] Add some component mapping helpers 2019-10-16 20:00:38 +02:00
Philip Rebohle
0d7f658f96
[dxvk] Implement framebuffer-based blit 2019-10-16 20:00:38 +02:00
Philip Rebohle
6290cfdb48
[dxvk] Add class for framebuffer-based blits 2019-10-16 17:31:40 +02:00
Philip Rebohle
6234a1a6b0
[dxvk] Support arbitrary source texture coordinates in blitter 2019-10-16 02:45:44 +02:00
Philip Rebohle
859ac59e6c
[dxvk] Support multisampled destinations in blitter
Apparently this is required for some D3D9 content.
2019-10-16 02:17:55 +02:00
Philip Rebohle
e747315ba6
[dxvk] Support both linear and nearest samplers in blitter 2019-10-16 02:08:04 +02:00
Philip Rebohle
6ea21d57fe
[dxvk] Factor out mip gen classes and rename them to DxvkMetaBlit*
Since mip map generation is a blit operation, we can make a more
general-purpose blitter and implement mip map generation on top
of that.
2019-10-16 01:52:14 +02:00
Philip Rebohle
d899bd2d76
[d3d11] Remove obsolete DefaultDesc methods from state classes 2019-10-14 05:28:46 +02:00
Philip Rebohle
68c257fc0d
[d3d11] Fix ref counting for state objects bound to a context
Using raw pointers is safe here since the objects never get destroyed
during the lifetime of the context.
2019-10-14 02:06:33 +02:00
Philip Rebohle
1282c2b99e
[d3d11] Fix immediate context reference counting
Fixes various wine test failures.
2019-10-14 01:56:34 +02:00
Philip Rebohle
4d0cc3e24e
[d3d11] Don't subclass state objects from ComObject
These override reference counting, so we shouldn't use ComObject.
2019-10-14 01:44:37 +02:00
Philip Rebohle
c5c43fb2a4
[d3d11] Allow choosing type wrapper for D3D11DeviceChild base class
Allows subclasses to replace ComObject with something else.
2019-10-14 01:44:27 +02:00
Philip Rebohle
dd9a55ecc0
[util] Don't allow multiple inheritance for COM objects
This never made any sense whatsoever in the first place.
2019-10-14 01:42:24 +02:00
Philip Rebohle
c281e76bac
[d3d11] Don't get private references for state objects
Otherwise we will end up deleting the objects even though they
aren't explicitly heap-allocated. Whoops...
2019-10-14 01:39:54 +02:00
Philip Rebohle
9c6209fbf5
[d3d11] Fix reference counting for state objects
Fixes various wine test failures. Also, state objects are now
allocated in the hash map itself rather than a wrapped COM object.
2019-10-14 01:27:59 +02:00
Philip Rebohle
accbc8828c
[d3d11] Return error if no desc is provided for Create*State methods
Fixes wine test failures.
2019-10-14 01:08:31 +02:00
Philip Rebohle
bd58f1a913
[d3d11] Don't sync CS thread if resource to map is already in use
SynchronizeCsThread can only update the in-use state from available
to in-use, so doing this on a resource that is already in-use is not
necessary. May improve performance in combination with DO_NOT_WAIT.
2019-10-14 00:14:00 +02:00
Philip Rebohle
12f0f8b13f
[d3d11] Don't use a state object for default blend state 2019-10-13 23:15:23 +02:00
Philip Rebohle
c30fd8fb97
[d3d11] Don't use a state object for default depth-stencil state 2019-10-13 23:15:23 +02:00
Philip Rebohle
b0231403fe
[d3d11] Don't use a state object for default rasterizer state 2019-10-13 23:15:23 +02:00
Philip Rebohle
a89c662984
[d3d11] Introduce ResetState and use it for ClearState
ClearState gets used a lot in games that use deferred
contexts, so we should make sure it's fast. Since we
apply default state everywhere, there is no need to
perform any expensive RestoreState operations.

Reduces the amount of time spent on ClearState on the
CS thread by ~40%, and by ~90% on the calling thread.
2019-10-13 23:15:23 +02:00
Philip Rebohle
dbe8b09b05
[dxvk] Don't store sampler description in sampler objects
We aren't using this anywhere in the backend or client APIs.
2019-10-13 04:36:33 +02:00
Philip Rebohle
b67e5809ba
[dxvk] Fix buffer usage flags in commitGraphicsBarriers
Only checking for one single usage flag is incorrect since
buffers can have both the storage buffer and storage texel
buffer usage bits set.
2019-10-13 03:18:08 +02:00