1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-13 16:08:50 +01:00
Commit Graph

438 Commits

Author SHA1 Message Date
Philip Rebohle
0f16a8f70d
[dxbc] Remove output mapping code 2022-07-17 17:06:42 +02:00
Philip Rebohle
c3af42356f
[dxbc] Enable SPIR-V 1.6 2022-07-15 16:10:16 +02:00
Philip Rebohle
e5c45d4ce0
[dxbc] Use StorageBuffer storage class instead of BufferBlock 2022-07-15 16:10:16 +02:00
Philip Rebohle
320534cb34
[spirv] Automatically track interface variables 2022-07-15 16:10:16 +02:00
Philip Rebohle
f60bdcbcbf
[dxvk] Replace VK_EXT_shader_demote_to_helper_invocation with core feature 2022-07-14 21:21:34 +02:00
Philip Rebohle
1dd3f24b43
[dxbc] Drop workarounds for unsupported drivers 2022-07-14 21:21:34 +02:00
Philip Rebohle
131af0d677
[dxvk] Replace VK_KHR_driver_properties with core feature 2022-07-14 21:21:34 +02:00
Philip Rebohle
78c5ef88bc
[dxvk] Replace VK_KHR_shader_float_controls with core feature 2022-07-14 21:21:34 +02:00
Philip Rebohle
2774a04195
[dxvk] Use VkPhysicalDeviceVulkan11{Features,Properties} where appropriate 2022-07-14 21:21:34 +02:00
Philip Rebohle
f99a833f51
[d3d11] Remove d3d11.constantBufferRangeCheck option 2022-07-12 02:11:39 +02:00
Philip Rebohle
a637134c56
[d3d11,dxbc] Use push constant instead of spec constant for rasterizer sample count 2022-07-03 13:41:06 +02:00
Philip Rebohle
87e2d70448
[dxbc] Remove bound spec constants from shader code 2022-07-03 13:41:06 +02:00
Philip Rebohle
db07861518
[dxvk] Remove old pipeline layout implementation 2022-06-28 14:35:58 +02:00
Philip Rebohle
79ecd4e94a
[dxbc] Pass new binding info struct to shaders 2022-06-28 14:32:31 +02:00
Philip Rebohle
304d0549d5
[dxbc] Implement range check for private array reads
We already do this for stores.
2022-04-21 18:06:41 +02:00
Philip Rebohle
8993560cde [dxbc] Use new DxvkShader constructor 2022-04-18 13:20:16 +02:00
Philip Rebohle
0db26a0456
[dxbc] Actually do the skip range check thing properly
Turns out the first attempt only worked because my test case didn't
do any dynamically indexed stores at all, but broke everything else.
Oops.
2022-03-24 12:53:29 +01:00
Philip Rebohle
3ecd13cec2
[dxbc] Only emit temp array range check for dynamically indexed stores
Generates less code and makes things slightly more readable.
2022-03-24 12:47:40 +01:00
Philip Rebohle
c590736fec
[dxbc] Generate smallest possible vectors for local arrays
FXC is buggy and always emits vec4 in the array declaration,
so we'll have to analyze the used components ourselves.
2022-03-24 12:47:40 +01:00
Philip Rebohle
e440fa26ab
[dxbc] Handle fallthrough around default properly 2022-03-23 15:32:45 +01:00
Philip Rebohle
b015cf0bb2
[dxbc] Support switch-case fallthrough
Apparently this is a thing in Shader Model 4, although FXC cannot emit it.
2022-03-22 17:32:43 +01:00
Georg Lehmann
2550cff149 [build] Cleanup build system.
No changes except dropping support for msvc before 15.3.
2022-03-17 01:38:58 +00:00
Joshua Ashton
b96f65be31 [dxbc] Use new [[fallthrough]] attribute 2022-03-10 00:47:38 +01:00
Philip Rebohle
2f01df82d2
[dxbc] Fix invalid NonReadable/NonWritable decorations 2021-09-09 19:35:51 +02:00
Philip Rebohle
5db76784bd
[dxbc] Accurately determine access flags for UAVs 2021-09-09 15:53:02 +02:00
Georg Lehmann
789e19d2ac [dxbc] Use BitMask helper 2021-08-16 08:49:46 -07:00
Philip Rebohle
546bd6f462
[dxbc] Fix swizzles in lod instruction
Fixes #1764.
2021-08-05 22:57:58 +02:00
Philip Rebohle
e379f472f6
[dxbc] Implement hack to treat multisampled textures as normal textures 2021-07-02 05:52:05 +02: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
Philip Rebohle
a1f3f6c971
[dxbc] Remove old RADV/LLVM workaround for early discard
We have Demote now, and ACO is the default.
2021-05-27 00:40:59 +02:00
Philip Rebohle
cf4ff820be
[dxbc] Handle shaders without refactoringAllowed flag 2021-03-18 17:46:45 +01:00
Philip Rebohle
96e1079526
[dxbc] Set usesDerivatives for gather and LOD query operations as well
Because these do implicitly use derivatives.
2021-02-21 14:24:54 +01:00
Philip Rebohle
0ba3e693c9
[dxbc] Clean up some texture handling code 2021-02-20 23:39:15 +01:00
Philip Rebohle
2d670ec3db
[dxbc] Enable capabilities for float control modes
Fixes some validation errors (but seriously, why does everything
have to be a capability in SPIR-V?)
2021-01-29 16:29:39 +01:00
Philip Rebohle
3a993d0c5c
[dxvk] Use only one spec constant for fragment shader output component mapping
Let's trust the driver to be able to constant-fold bitfieldExtract operations.
2021-01-29 16:17:07 +01:00
Philip Rebohle
307f43ff1e [d3d11] Introduce option to disable float controls
And disable for SotTR since it introduces rendering issues.
2021-01-28 20:32:38 +01:00
Philip Rebohle
1478011822
[dxbc] Enable NaN fixup by default on older RADV versions
And get rid of a whole bunch of game-specific workarounds.
2021-01-28 19:37:10 +01:00
Philip Rebohle
f5fa7a9099
[dxbc] Set float control bits as necessary 2021-01-28 19:37:10 +01:00
Philip Rebohle
538b55921e
[dxbc] Conditionally return zeroes for unbound textures in shader
May allow the driver to optimize away texture operations.
2020-11-24 18:39:20 +01:00
Philip Rebohle
45461ee54e
[dxbc] Use opSelect for unbound texel fetch instructions
Generates less annoying code compared to control flow instructions,
and drivers should be able to optimize away the texture instruction
anyway since the bound state is a specialization constant.
2020-11-24 18:36:40 +01:00
Philip Rebohle
61a07fc9b9
[dxbc] Fix up incorrect infinity returned by f32tof16
Completely insane fix for #1826.
2020-11-21 01:25:03 +01:00
Philip Rebohle
f81395c742
[dxbc] Fix operand modifiers on 64-bit types 2020-10-22 12:43:04 +02:00
Rhys Perry
73cb711f32 [dxbc] Bounds-check temporary array stores
Fixes flickering terrain in Just Cause 3 on RADV and possibly ANV.
2020-09-14 16:56:06 +02:00
Philip Rebohle
5750a7d85c
[dxbc] Fix the udiv crap again 2020-03-26 17:17:01 +01:00
Joshua Ashton
62c2c9cd15 [dxbc] Handle 0 divisors in UDiv
UDiv is defined as having 0xffffffff as both the quotient and remainder value when the divisor is 0

This fixes vertex corruption on the water bottles in Half-Life: Alyx
https://github.com/ValveSoftware/Proton/issues/3681

https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/udiv--sm4---asm-
2020-03-26 10:49:42 +01:00
Philip Rebohle
313d46984d
[dxbc] Fix memory semantics for atomic operations 2020-02-13 01:15:44 +01:00
Philip Rebohle
f12ddfa4d3
[dxbc] Fix line tessellation factor ordering 2020-02-12 12:00:46 +01:00
Philip Rebohle
76a6f6eab9
[dxbc] Add option to force memory barriers after shared memory stores 2020-02-08 00:48:42 +01:00
Philip Rebohle
9721938e57
[d3d11] Introduce d3d11.invariantPosition option
Apparently it's better to make app profiles than risk tanking
performance for all applications. Invariance rules in D3D11 are
undocumented so it's not clear what the correct solution is.
2020-01-23 01:28:19 +01:00