Daniel Stone
56886459c5
Revert "ci: disable vs2019 windows build"
...
This reverts commit 567a9550d7 .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14513 >
2022-01-12 21:45:11 +00:00
Lionel Landwerlin
567a9550d7
ci: disable vs2019 windows build
...
Failing with :
error during connect: In the default daemon configuration on
Windows, the docker client must be run with elevated privileges to
connect.: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/auth :
open //./pipe/docker_engine: The system cannot find the file
specified.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14509 >
2022-01-12 09:04:29 +00:00
Jesse Natalie
2837e67b9b
microsoft/compiler: Handle more GL memory barriers
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14367 >
2022-01-11 01:36:56 +00:00
Jesse Natalie
fd50ef046b
microsoft/compiler: Move workgroup_size lowering from clc
...
It doesn't depend on the clc data being provided externally, so no
need to tie it there, we can re-use it for GL and Vulkan compute.
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14367 >
2022-01-11 01:36:56 +00:00
Jesse Natalie
156ef05ec7
d3d12: Handle memory barriers
...
This is a bit fragile. The algorithm is essentially:
- Let the driver track state for non-dual-bound resources.
- For resources that are dual-bound as SSBO/image and a second
bind point, assume they're being used as UAVs.
- When a MemoryBarrier is issued, dirty all destination bind points
so they re-assert their state, and if the destination is not UAV,
temporarily suppress UAV state re-assertion.
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14342 >
2022-01-07 03:31:16 +00:00
Jesse Natalie
02fc28625f
microsoft/compiler: Fix handling of fp16-in-32bit-val ops to handle high bits
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14342 >
2022-01-07 03:31:16 +00:00
Jesse Natalie
20e374f4a3
microsoft/compiler: Hook up memory/control barriers
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14342 >
2022-01-07 03:31:16 +00:00
Jesse Natalie
5d33a9fa47
microsoft/compiler: Handle forced early depth
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14342 >
2022-01-07 03:31:16 +00:00
Jesse Natalie
0b88600a64
microsoft/compiler: Implement atomic image ops
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14342 >
2022-01-07 03:31:16 +00:00
Jesse Natalie
1b62c86eb1
microsoft/compiler: Handle images as derefs for GL
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14342 >
2022-01-07 03:31:16 +00:00
Jesse Natalie
a7311ceafe
microsoft/compiler: Fix array-of-array handling for derefs of textures/images
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14342 >
2022-01-07 03:31:16 +00:00
Jesse Natalie
c9719b6d2e
microsoft/compiler: Emit SRVs/UAVs as arrays
...
This is done regardless of size so that "dynamic" indexing with a
uniform can work even on arrays of size 1.
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14342 >
2022-01-07 03:31:16 +00:00
Jesse Natalie
e3c14cf718
microsoft/compiler: Unify handle retrieval between images and UBO/SSBO
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14342 >
2022-01-07 03:31:16 +00:00
Jesse Natalie
61872b5240
microsoft/compiler: Emit GL images in descriptor space 1 with driver_location instead of binding
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14342 >
2022-01-07 03:31:16 +00:00
Jesse Natalie
83ed626b76
microsoft/compiler: Put SSBO and image handles in separate arrays
...
In a future change, the bindings for images and SSBOs will start to
overlap in GL (using a separate space to disambiguate them)
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14342 >
2022-01-07 03:31:16 +00:00
Jesse Natalie
8a4b443c5b
microsoft/compiler: Change vulkan_environment bool to an enum
...
There are currently 3 different "environments" supported by this backend,
and they have slightly different semantics for how resources are accessed,
which is only going to get a little weirder when GL images start getting
supported. To try to make things less confusing, use an explicit enum
with heavy documentation on what's different between them.
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14342 >
2022-01-07 03:31:16 +00:00
Jesse Natalie
8371591dc6
microsoft/compiler: Fix LOD instruction to return 2 values
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14161 >
2021-12-30 09:50:17 -08:00
Jesse Natalie
8926cfc9f7
d3d12: Enable texture gather
...
The CI changes are because WARP fails really hard at gather,
with crashes when doing it on a 1x1 or Nx1 texture, and incorrectly
applying swizzling to the result vector instead of the actual texture
accesses.
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14161 >
2021-12-30 09:50:17 -08:00
Jesse Natalie
9ba4569184
microsoft/compiler: Position should always be no-perspective
...
Debug WARP asserts on this, and sure enough, the spec says it
should be no-perspective.
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14161 >
2021-12-30 08:14:20 -08:00
Jesse Natalie
c375b05bfe
microsoft/compiler: Handle write masks in SSBO lowering pass
...
Previously, the lowering was for 8/16/64-bit values, or 8/16-component
vectors. Now, it also handles write masks on 32-bit 1/2/3/4-component
vectors.
DXIL looks like it supports putting an interesting write mask in the
buffer store intrinsic, but DXC never generates stores with write
masks, and multiple drivers completely ignore the write mask.
Also, set the write mask properly on the output intrinsic.
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294 >
2021-12-27 23:40:24 +00:00
Jesse Natalie
efc47571d4
microsoft/compiler: Hook up uavs-at-every-stage flag
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294 >
2021-12-27 23:40:24 +00:00
Jesse Natalie
72b0d0cda0
microsoft/compiler: Emit SSBOs from 0 -> count for GL (non-kernel, non-Vulkan) shaders
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294 >
2021-12-27 23:40:24 +00:00
Thomas H.P. Andersen
e0ec818cfd
microsoft/compiler: dxil_nir_opt_alu_deref_srcs: return progress
...
dxil_nir_opt_alu_deref_srcs will always return false because
the progress variable is declared both for the function and also
inside the loop.
Spotted by a unused-but-set-variable warning from clang
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14290 >
2021-12-23 01:52:13 +00:00
Jesse Natalie
64991d44a8
microsoft/compiler: Load synthesized sysvals via lowered io
...
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14175 >
2021-12-20 08:20:59 -08:00
Jesse Natalie
8d5b7450a4
microsoft/compiler: Delete non-sysval deref load/store code
...
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14175 >
2021-12-20 08:20:55 -08:00
Jesse Natalie
f30768f1d6
microsoft/compiler: Lower io
...
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14175 >
2021-12-20 08:20:52 -08:00
Jesse Natalie
f4d247c2e3
microsoft/compiler: Support lowered io (nir_intrinsic_load_input/store_output)
...
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14175 >
2021-12-20 08:20:11 -08:00
Caio Oliveira
3415b51b1c
ci/windows: Remove line numbers of SPIR-V errors in spirv2dxil tests
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14245 >
2021-12-17 23:04:55 +00:00
Jesse Natalie
46ef1e8389
ci/windows: Remove line numbers from assertions in spirv2dxil tests
...
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14156 >
2021-12-11 03:43:11 +00:00
Jesse Natalie
11eb03c44e
microsoft/compiler: Remove algebaric pass for inot
...
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14140 >
2021-12-10 23:23:29 +00:00
Jesse Natalie
45354be410
microsoft/compiler: Implement inot
...
Fixes: cb283616 ("nir/algebraic: Small optimizations for SpvOpFOrdNotEqual and SpvOpFUnordEqual")
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14140 >
2021-12-10 23:23:29 +00:00
Lionel Landwerlin
4c703686db
spirv: handle ray query intrinsics
...
v2: Fixup comment (Caio)
Use generated builders (Caio)
v3: Update spirv2dxil CI expectations
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13718 >
2021-12-04 20:46:35 +00:00
Jesse Natalie
7afb4aba3f
CI/windows: Move reference files to relevant ci subdirectories
...
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13902 >
2021-12-01 18:26:15 +00:00
Jesse Natalie
c70e31c4d5
CI/windows: Move SPIRV-to-DXIL test YML to microsoft folder
...
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13902 >
2021-12-01 18:26:15 +00:00
Boris Brezillon
83280b8e23
microsoft/compiler: Fix dxil_nir_create_bare_samplers()
...
_mesa_hash_table_u64_search() returns the data directly, not an
hash_entry object. We also need to take the descriptor set into account
for this pass to work properly on Vulkan shaders.
Fixes: 46bc7cf678 ("microsoft/compiler: Rewrite sampler splitting pass to be smarter and handle derefs")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13912 >
2021-12-01 08:51:05 +01:00
Jesse Natalie
5bfbf4bec9
microsoft/compiler: Handle GLES external textures
...
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13054 >
2021-11-19 22:54:46 +00:00
Jesse Natalie
f0e5bc228c
microsoft/clc: Add a test for arg metadata
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13759 >
2021-11-15 07:47:06 -08:00
Vinson Lee
1ca90f8752
microsoft/spirv_to_dxil: Fix non-Windows build.
...
../src/microsoft/spirv_to_dxil/dxil_validation.cpp: In function ‘bool validate_dxil(dxil_spirv_object*)’:
../src/microsoft/spirv_to_dxil/dxil_validation.cpp:129:12: error: ‘stderr’ was not declared in this scope
129 | fprintf(stderr, "DXIL validation only available in Windows.\n");
| ^~~~~~
Fixes: 37c366e283 ("microsoft/spirv_to_dxil: Add DXIL validation to spirv2dxil")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13736 >
2021-11-11 01:37:16 +00:00
Enrico Galli
37c366e283
microsoft/spirv_to_dxil: Add DXIL validation to spirv2dxil
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13655 >
2021-11-09 01:32:47 +00:00
Jesse Natalie
8d3a3e7a00
microsoft/compiler: Use textures for SRVs
...
After running the (renamed) dxil_nir_split_typed_samplers pass, the
shader will have either:
* Textures, which map to D3D SRVs
* Bare samplers, which map to D3D bare samplers
* Images, which map to D3D UAVs
There shouldn't be any remaining samplers with type information
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13390 >
2021-11-02 11:02:22 -07:00
Michael Tang
7e26ea84da
microsoft/compiler: Use memcpy instead of a union to write dxil_features
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13496 >
2021-10-26 20:27:56 +00:00
Michael Tang
3094524621
microsoft/spirv_to_dxil: turn sysvals into input varyings
...
Fixes: b47090c5b3 ("spirv: Always declare FragCoord as a sysval")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13276 >
2021-10-26 16:18:09 +00:00
Jason Ekstrand
956199e870
nir: s/nir_var_mem_image/nir_var_image/g
...
We typically use nir_var_mem_* for stuff that has an explicit byte-based
memory layout. Images are opaque.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13386 >
2021-10-16 03:47:10 +00:00
Dylan Baker
e73096bd6d
meson: use gtest protocol for gtest based tests when possible
...
With the `gtest` protocol meson will add some extra arguments to the
test to generate better junit results, which may be useful. This
protocol is only available in meson 0.55.0+, so keep using the default
`exitcode` protocol for meson older than that.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8484 >
2021-10-16 03:22:24 +00:00
Enrico Galli
aac47c4b24
microsoft/compiler: Shadow tex instructions always use shadow samplers
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13321 >
2021-10-16 00:12:04 +00:00
Jesse Natalie
9601556079
microsoft/clc: Images use nir_var_mem_image
...
The only big change is that lower_vars_to_explicit no longer assigns
a driver_location for images. That means that the storage for the
format/order loads is no longer implicitly "allocated" in the middle
of the kernel args. Instead, manually add the storage for that to the end
of the input args buffer.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4743 >
2021-10-15 14:58:56 +00:00
Michael Tang
c0e45dd882
microsoft/spirv_to_dxil: use dxil_nir_lower_bool_input pass
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13262 >
2021-10-08 17:21:33 +00:00
Michael Tang
36aa1a2959
gallium/d3d12: move d3d12_lower_bool_input to microsoft/compiler
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13262 >
2021-10-08 17:21:33 +00:00
Enrico Galli
c79ec5ea3c
nir_to_dxil: Add tagging raw SRVs in shader flags
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13157 >
2021-10-05 23:32:18 +00:00
Lionel Landwerlin
3c8c817ae7
clc: add allowed extension for compile parameter
...
The LLVM-SPIRV translator can include a bunch of capabilities into the
generated SPIRV which is not what you always want. That include
internal Intel specific capabilities from the translator.
v2: Rename options
Fixup checks (Jesse)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13113 >
2021-10-03 19:32:54 +00:00