Commit Graph

406 Commits

Author SHA1 Message Date
Philip Rebohle f06c646315 [dxbc] Remove broken atomic counter subgroup optimization
This is not a legal optimization inside non-uniform control flow due
to Vulkan's extremely permissive convergence rules, and apparently
breaks on Nvidia as a result.

Mesa drivers already do the same thing internally anyway.
2024-04-03 14:55:43 +02:00
Philip Rebohle 69a52b3da0 [dxbc] Do not emit depth compare for unsupported image types
Fixes invalid SPIR-V.
2024-03-07 16:11:23 +01:00
Philip Rebohle 3a6992ea97 [dxbc] Enable depth compare types for 1D images
Used by Renderdoc internal shaders.
2024-03-07 16:11:23 +01:00
Philip Rebohle c9cea93b7b [dxbc] Use raw access chains for buffer loads and stores
Maps more or less perfectly to D3D raw and structured buffers.
2024-03-05 14:41:18 +01:00
Philip Rebohle 69d74a46a0 [dxbc] Remove emitRawBuffer{Load,Store}
And factor these into the callers. We need to preserve the raw
index and offset parameters to use raw access chains.
2024-03-05 14:41:18 +01:00
Philip Rebohle 94098aa97d [dxbc] Enable SPV_NV_raw_access_chains 2024-03-05 14:41:18 +01:00
Philip Rebohle 9004c132ed [dxbc] Declare dynamically indexed UBOs with the maximum possible size
Fixes #3861.
2024-02-23 13:39:29 +01:00
Philip Rebohle b4d87eaac0 [dxbc] Fix constant texture offsets with 1D textures
Fixes #3572.
2023-07-22 17:37:37 +02:00
Philip Rebohle a67c99943a [dxbc] Set output topology for GS and TES correctly 2023-07-20 23:43:03 +02:00
Philip Rebohle 4a30933359 [dxvk] Add UBO set property to descriptor info
Used to explicitly propagate storage buffer bindings
to the respective UBO set.
2023-01-15 15:36:05 +01:00
Philip Rebohle b916dc04e5 [dxbc] Fill in patch vertex count info 2023-01-11 11:48:16 +01:00
Philip Rebohle 8011a40843 Revert "[dxbc] Handle dead code in shader binaries"
Apparently this regressed something, but the reporter who asked
for this fix in the first place did not specify what, so let's
just revert this and break the whole thing again until we get
something to actually work with.

This reverts commit 5115d80d51.
2023-01-10 20:37:22 +01:00
Philip Rebohle e426ec09a1 [d3d11,dxbc] Add d3d11.forceSampleRateShading option 2023-01-09 18:35:02 +01:00
Philip Rebohle 5115d80d51 [dxbc] Handle dead code in shader binaries
We should not emit any code when not inside a function.

Fixes #3154.
2023-01-06 20:49:13 +01:00
Philip Rebohle ab622760a0 [dxbc] Emit new block only after emitting switch instruction
Otherwise emitting the OpSwitch will reset the block ID, which
is not desireable. Fixes #2975.
2022-10-04 21:00:50 +02:00
Philip Rebohle 35a84053b5 [dxbc] Implement rasterizer ordered views 2022-09-19 15:44:23 +02:00
Philip Rebohle 2a7706ba53 [dxbc] Do not enable SPV_KHR_shader_float_controls
This is core in Vulkan 1.2 and SPIR-V 1.5.
2022-09-18 02:27:03 +02:00
Philip Rebohle 5b6b9923ab [dxbc] Write point size in vertex shaders
Silences some validation errors when point rendering is enabled.
2022-09-17 01:52:19 +02:00
Philip Rebohle d93568f1a9 [dxbc] Don't emit built-in position as a block variable
This is no longer needed for interface matching.
2022-09-17 01:52:19 +02:00
Rhys Perry 63ca34bb29 [dxbc] Fix forceVolatileTgsmAccess for stores
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
2022-09-13 21:41:59 +02:00
Philip Rebohle af208ceb9e [dxbc] Optimize write pattern for TGSM initialization
Reduces bank conflicts.
2022-09-12 22:33:40 +02:00
Philip Rebohle 05f36fd97b [dxbc] Only use workgroup scope in compute shaders
Turns out that global barriers can be used in graphics shaders.
2022-09-12 22:05:39 +02:00
Philip Rebohle 0502a0464f [dxbc] Fix broken barrier around TGSM init code 2022-09-12 22:05:39 +02:00
Philip Rebohle eda366662c [dxbc] Handle workgroup-coherent UAVs more efficiently
Some drivers don't handle the workgroup scope on stores and loads properly,
so let's just do the availability and visibility operation on barriers.
2022-09-12 18:19:02 +02:00
Joshua Ashton 64d88c684d [dxbc] Explicitly cast down to VkAccessFlags when assinging binding.access
Otherwise both halves of the terniary are differing types causing a warning.
2022-09-10 21:27:04 +00:00
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