Commit Graph

381 Commits

Author SHA1 Message Date
Philip Rebohle ccfb986e72 [dxbc] Rework TGSM workaround 2022-09-10 14:27:13 +02:00
Philip Rebohle 8176101228 [dxbc] Enable Vulkan memory model 2022-09-10 14:27:13 +02:00
Philip Rebohle 3401964ee2 [dxbc] Implement support for SV_InnerCoverage 2022-09-05 07:21:47 +02:00
Philip Rebohle eaa5d16616 [dxbc] Use texel buffers for raw/structured buffers with sparse feedback 2022-08-26 05:53:03 +02:00
Philip Rebohle 336aafcdf7 [dxbc] Explicitly store whether a resource is a raw SSBO 2022-08-26 05:53:03 +02:00
Philip Rebohle d6613f50c5 [dxbc] Implement ld for buffers with sparse feedback 2022-08-26 05:53:03 +02:00
Philip Rebohle e58f9a5e99 [dxbc] Implement ld for images with sparse feedback 2022-08-26 05:53:03 +02:00
Philip Rebohle db3b2e23fb [dxbc] Implement ld_uav_typed with sparse feedback 2022-08-26 05:53:03 +02:00
Philip Rebohle 0faba649da [dxbc] Implement sample operations with sparse feedback 2022-08-26 05:53:03 +02:00
Philip Rebohle d5b68b3642 [dxbc] Implement gather operations with sparse feedback 2022-08-26 05:53:03 +02:00
Philip Rebohle 614024873d [dxbc] Implement CheckAccessFullyMapped instruction 2022-08-26 05:53:03 +02:00
Philip Rebohle 3d6b687e41 [dxbc] Remove useless lambda 2022-08-22 05:21:49 +02:00
Philip Rebohle 165648017e [dxbc] Remove fallback path for discards 2022-08-19 13:36:54 +00:00
Philip Rebohle 3717922381
[d3d11,dxbc] Rework check for TypedUAVLoadAdditionalFormats 2022-08-17 15:26:03 +02:00
Philip Rebohle 08da6d8ca4
[dxbc] Bound-check mip level for resinfo instruction 2022-07-25 15:58:55 +02:00
Philip Rebohle ec813e036c
[dxbc] Fix UAV write test
We broke this during the null descriptor refactor. Also make it so that
we don't generate conditionals when there's nothing to test.
2022-07-20 22:56:32 +02:00
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 1dd3f24b43
[dxbc] Drop workarounds for unsupported drivers 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
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 cf4ff820be
[dxbc] Handle shaders without refactoringAllowed flag 2021-03-18 17:46:45 +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 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