Commit Graph

2735 Commits

Author SHA1 Message Date
Philip Rebohle 7db98a1aa4
[meta] Release 1.4.4 2019-10-27 17:56:31 +01:00
Alexandr dacf1ab4d6 [util] Enable constant buffer range check for Saints Row games
Fixes character flickering on Nvidia.
2019-10-27 11:55:48 +01:00
Philip Rebohle a2b629415e
Revert "[d3d11] Fix ref counting for D3D11CommandList"
This reverts commit 55bae45915.
2019-10-27 11:10:49 +01:00
Philip Rebohle fc0ede0657
Revert "[d3d11] Recycle command lists from deferred contexts"
This reverts commit 4e3da45fde.

For some reason this caused crashes.
2019-10-27 11:00:59 +01:00
Philip Rebohle 8c34f4ff8a
[dxvk] Validate image layouts in render pass formats read from cache
This will discard invalid cache entries generated by DXVK 1.4.3.
2019-10-27 00:04:57 +02:00
Philip Rebohle 03dc59ef39
[dxvk] Write correct depth-stencil attachment layout to state cache
Fixes a dumb issue where we'd compress layouts with high enum values
to a single byte and incorrectly interpret the result as PREINITIALIZED.
2019-10-26 23:59:11 +02:00
Philip Rebohle 9361f19da6
[dxvk] Fix uninitialized depth attachment reference
Also don't redundantly null color attachment refs for cosmetic reasons.
2019-10-26 23:37:46 +02:00
Philip Rebohle 6888a98c89
[dxbc] Always set geometry shader invocation count
Fixes validation errors when the DXBC shader does not specify
the invocation count itself.
2019-10-26 23:19:59 +02:00
Philip Rebohle 144f4badef
[dxbc] Always allocate at least one input array element
Turns out that shaders with no inputs can still have an input signature,
in which case we were generating a zero-length array which is illegal.
2019-10-26 23:13:59 +02:00
Philip Rebohle 20f79a754b
[d3d11] Adjust buffer memory flags if apitrace is attached
Using cached memory speeds up apitrace significantly as it
reads back mapped memory regions.
2019-10-26 22:56:47 +02:00
Philip Rebohle 44c0f96fc1
[dxvk] Pause transform feedback on buffer updates
Otherwise, we might override a currently bound transform
feedback buffer or counter buffer. Fixes Unity Engine.
2019-10-26 19:57:39 +02:00
Philip Rebohle 3c4a57acc6
[dxvk] Fix bogus xfb buffer update check 2019-10-26 19:40:32 +02:00
Philip Rebohle 0683f4f2c0
[d3d11] Remove D3D11 counter buffer class 2019-10-26 17:44:29 +02:00
Philip Rebohle e967c52ff7
[d3d11] Allocate predicate buffer per query
Allows us to get rid of the D3D11 counter buffer class.
2019-10-26 17:44:29 +02:00
Philip Rebohle 09f507c284
[d3d11] Allocate xfb counter buffer per buffer
Same idea as with UAV counters, allows for more efficient updates.
2019-10-26 17:44:29 +02:00
Philip Rebohle 191c9644af
[d3d11] Allocate counter buffer per UAV
Might slightly increase memory overhead, however this allows
the backend to execute UAV counter updates more efficiently.
2019-10-26 17:44:29 +02:00
Philip Rebohle 320e0de4a0
[dxvk] Handle xfb barriers in commitGraphicsBarriers
Avoids spilling the render pass when switching xfb buffers.
2019-10-26 17:44:29 +02:00
Philip Rebohle 5b66f1ec0b
[dxvk] Replace buffer in updateBuffer even outside of render passes
Needed to avoid barriers arount D3D11 UAV counter buffer updates.
2019-10-26 17:44:29 +02:00
Philip Rebohle d1e9e1392d
[dxvk] Lazily allocate slices of small buffers
Reduces memory overhead in case games create small static
buffers. This is somewhat common for index buffers used
to render fullscreen quads or triangles.
2019-10-26 15:24:55 +02:00
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