Philip Rebohle
3d213efe53
[dxbc] Use SSBOs for dynamically indexed constant buffers if needed
...
SSBOs are tightly bound-checked on all Nvidia GPUs, so this allows for
a more accurate workaround for games relying on OOB access behaviour.
2019-10-28 15:42:46 +01:00
Philip Rebohle
6ab074c95b
[dxbc] Only use atomic append/consume optimization in compute shaders
...
- For fragment shaders, this isn't safe since ballots include helper invocations
- For vertex shaders, if drivers don't support subgroup operations in those
stages, we don't want it to affect the performance of compute shadres.
2019-07-26 14:07:39 +02:00
Philip Rebohle
8644d75722
[dxbc] Use OpDemoteToHelperInvocationEXT for discards if supported
2019-07-11 19:33:17 +02:00
Philip Rebohle
06d4e06d8a
[dxbc] Enable early discard on RADV/ACO
...
Still can't enable on LLVM due to GPU hangs. The way we detect it
may have to change in the future, but for now, this should do.
2019-07-08 16:30:56 +02:00
Philip Rebohle
58dcf77c08
[dxbc] Disable atomic counter optimization on old RADV versions
...
Breaks TressFX in Tomb Raider 2013 for some reason, whereas this works
fine on 19.1 with both LLVM 8.0 and 9.0-git.
2019-06-15 12:58:31 +02:00
Philip Rebohle
d5ba36443e
[dxbc] Fix useRawSsbo option
...
Add some break to fix some breakage.
2019-06-11 20:23:47 +02:00
Philip Rebohle
d755b18ccb
[dxbc] Repurpose useRawSsbo option
...
Basically, abuse the minSsboAlignment property to convince the
compiler to always/never emit raw SSBOs for raw and structured
buffers, and use the actual device limit by default.
2019-06-11 20:20:40 +02:00
Philip Rebohle
0f7c23c022
[dxbc] Always use raw storage buffers if alignment requirements are met
2019-06-11 20:20:40 +02:00
Philip Rebohle
d94d89c3ef
[dxbc] Add option to use subgroup ops for atomic counter operations
...
This can greatly reduce the number of atomic operations when using
append/consume buffers.
2019-05-15 18:49:02 +02:00
Philip Rebohle
dc52212873
[dxbc] Disable Constant Buffer Range Check on AMD
...
The hardware already behaves as intended, no need to waste GPÜ cycles.
2019-04-30 16:07:24 +02:00
Philip Rebohle
5819a69302
[d3d11] Add option to enable constant buffer range checks
2019-04-05 20:56:32 +02:00
Philip Rebohle
0326258829
[dxbc] Use SDiv instead of ShiftRightLogical for index calc on Nvidia
...
Reportedly fixes Resident Evil 2 and Devil May Cry 5 on Nvidia.
2019-03-09 19:59:56 +01:00
Philip Rebohle
38c6eeed26
[dxbc] Only emit depth clamp in fragment shader if necessary
...
We don't need this if the depth clip extension is supported
by the driver.
2019-02-19 14:27:21 +01:00
Philip Rebohle
c0b325b483
[dxbc] Add option to enable strict sm4-compliat division
...
SM4 is defined to return the first source operand if the divisor is zero.
Windows drivers don't do this by default, so we shouldn't do it either.
2019-02-05 21:08:13 +01:00
Philip Rebohle
4fe5929799
[dxbc] Add options to enable/disble early discard and raw ssbo use
2019-01-08 20:58:18 +01:00
Philip Rebohle
48548eb894
[dxbc] Add useRawSsbo option
...
ENabled when we can replace texel buffers for raw and structured
buffers with raw SSBOs.
2018-12-14 23:45:37 +01:00
Philip Rebohle
f276bcd0e7
[dxbc] Check for RADV/Nvidia drivers explicitly using the new function
...
This way, only RADV gets locked out of using early discard whereas
AMDVLK and -PRO are able to use it.
2018-12-12 16:27:01 +01:00
Philip Rebohle
7096937c11
[dxbc] Use ballot to determine early-discard condition in fragment shaders
2018-11-27 11:50:01 +01:00
Philip Rebohle
2424cf0289
[dxbc] Disable early discard on AMD cards
...
Causes GPU hangs.
2018-11-24 10:09:33 +01:00
Philip Rebohle
a75c596132
[d3d11] Add config option to enable TGSM initialization
2018-11-23 16:12:02 +01:00
Philip Rebohle
3e686098cc
[dxbc] Disable subgroup early discard on Nvidia GPUs
...
People report performance regressions up to 5% with it enabled.
2018-11-23 12:28:48 +01:00
Philip Rebohle
0418c02ac3
[dxbc] Use clustered subgroup operations on supported hardware
2018-11-21 11:17:09 +01:00
Philip Rebohle
4f76b89941
[dxbc] Use subgroup operations for early discard
...
Can improve performance in some complex fragment shaders.
2018-11-21 11:17:09 +01:00
Philip Rebohle
a574829bb6
[dxbc] Remove DeferKill flag
...
This behaviour is correct, and needs to be enabled by default.
2018-11-21 11:17:09 +01:00
Philip Rebohle
bd03225c14
[dxbc] Refactor DxbcOptions
...
A bit mask isn't good enough going forward, and we also don't
need application-specific options for now.
2018-11-09 08:41:02 +01:00
Philip Rebohle
0ba00b3f59
[dxvk] Add extended device feature structure
...
This allows the client API to query and enable extended
features in the future, should it become necessary, much
like the extende feature queries.
2018-07-31 16:58:25 +02:00
Philip Rebohle
f7587014c7
[dxbc] Fix compiler warning
2018-06-18 15:33:35 +02:00
Philip Rebohle
a607fe107f
[dxbc] Remove workarounds for the old Nvidia shader compiler
2018-06-12 22:13:53 +02:00
Philip Rebohle
af62d423b2
[dxbc] Add per-device option for deferred kills
2018-05-26 17:08:39 +02:00
Philip Rebohle
58e9280891
[dxbc] Remove Tex2D -> Tex2DArray workaround
2018-05-24 11:49:12 +02:00
Philip Rebohle
a5c43b5e59
[dxbc] Enable array texture hack for Dishonored 2
...
Partially fixes shadow rendering issues.
2018-04-23 11:09:48 +02:00
Philip Rebohle
01147492d5
[dxbc] Implemented Texture2D -> Texture2DArray mapping as a knob
...
Doing this for all applications is not necessary and degrades
performance in some cases.
2018-04-23 00:46:27 +02:00
Philip Rebohle
e53cb72e39
[dxbc] Make DxbcOptions a set of flags
...
This allows for game-specific workarounds and driver-specific
workarounds to be applied in an easier fashion.
2018-04-22 23:49:41 +02:00
Philip Rebohle
021ea64103
[dxbc] Remove Nvidia driver version check
...
Apparently this causes a regression in Overwatch for some.
2018-04-11 19:44:45 +02:00
Philip Rebohle
8ea17e7a25
[dxbc] Implemented Nop instruction
...
Required for Metal Gear Solid V.
2018-04-11 01:49:39 +02:00
Philip Rebohle
f3544cc8e1
[dxbc] Fix __GL_NextGenCompiler check...
2018-04-11 01:17:07 +02:00
Philip Rebohle
3ff437ddbe
[dxbc] Re-enable Nvidia workarounds if __GL_NextGenCompiler is '0'
...
Fixes potential regressions when using the old SPIR-V compiler.
2018-04-11 00:26:42 +02:00
Philip Rebohle
1b6442b859
[dxbc] Disable Nvidia-specific workarounds for 396.18 and above
2018-04-11 00:20:24 +02:00
Philip Rebohle
584ee6b6f0
[dxbc] Lift ShaderStorageImageReadWithoutFormat requirement
2018-03-21 12:47:53 +01:00
Philip Rebohle
0e9b7d7ccd
[dxbc] Implemented new workaround for depth-compare ops on Nvidia
2018-03-01 10:11:15 +01:00
Philip Rebohle
8bfd12067a
[dxbc] Remove packDrefValueIntoCoordinates hack
...
Causes more issues than it solves when the coordinate vector
gets too big.
2018-02-28 06:44:55 +01:00
Philip Rebohle
f4cd90d6fa
[dxbc] Implemented vendor-specific workarounds in an attemt to fix Nvidia
2018-01-07 20:05:27 +01:00