Lionel Landwerlin
3384f029be
intel/compiler: rework input parameters
...
Use a struct for various common parameters rather than per stage
structure or arguments to stage specific entrypoints.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23942 >
2023-07-20 09:08:08 +00:00
Yonggang Luo
48a25ef700
treewide: Remove all usage of nir_builder_init with nir_builder_create and nir_builder_at
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24038 >
2023-07-10 19:20:17 +00:00
Yonggang Luo
68b8aa788d
intel/compiler: Switch to use nir_foreach_function_impl
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23920 >
2023-06-29 11:29:54 +00:00
Alyssa Rosenzweig
815efcdf7e
nir: Use nir_builder_create
...
perl -p0e 's/nir_builder ([^;]*);\s*nir_builder_init\(&\1, /nir_builder \1 = nir_builder_create(/g' -i $(git grep -l nir_builder_init)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23860 >
2023-06-27 18:13:02 +00:00
Karol Herbst
570c263ea3
nir/load_libclc: run some opt passes for everybody
...
Cuts down serialized size from 2850288 to 1377780 bytes.
Reduces clinfo with Rusticl time by 40% for debug builds.
(Old data, but the point stands)
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15996 >
2023-06-22 21:02:57 +00:00
Caio Oliveira
cb588d5d6e
compiler/clc: Move related NIR passes to the common mesa clc
...
These were historically in the spirv+nir combo, but the common mesa clc
is a better home for them.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Nora Allen <blackcatgames@protonmail.com >
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23667 >
2023-06-20 03:43:41 +00:00
Alyssa Rosenzweig
c7861fe1f2
nir: Drop unused argument from nir_ssa_dest_init_for_type
...
Similar to nir_ssa_dest_init, but with fewer call sites to churn through.
This was done with the help of Coccinelle:
@@
expression A, B, C, D;
@@
-nir_ssa_dest_init_for_type(A, B, C, D);
+nir_ssa_dest_init_for_type(A, B, C);
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23078 >
2023-05-17 23:46:16 +00:00
Alyssa Rosenzweig
01e9ee79f7
nir: Drop unused name from nir_ssa_dest_init
...
Since 624e799cc3
("nir: Drop nir_ssa_def::name and nir_register::name"), SSA
defs don't have names, making the name argument unused. Drop it from the
signature and fix the call sites. This was done with the help of the following
Coccinelle semantic patch:
@@
expression A, B, C, D, E;
@@
-nir_ssa_dest_init(A, B, C, D, E);
+nir_ssa_dest_init(A, B, C, D);
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23078 >
2023-05-17 23:46:16 +00:00
Alyssa Rosenzweig
e7bb53467b
intel: Produce unified atomics
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23036 >
2023-05-16 22:36:21 +00:00
Emma Anholt
f1ea6c1b40
intel: Always call nir_lower_frexp.
...
We have NIR lowering for Vulkan, and rely on GLSL's lowering in the
frontend, but this will let us drop the GLSL lowering.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22083 >
2023-04-06 02:32:01 +00:00
Lionel Landwerlin
94bb4a13fa
intel/fs: make Wa_1806565034 conditional to non robust access
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20280 >
2022-12-13 18:05:19 +00:00
Jason Ekstrand
d9a24632d3
nir/builder: Drop nir_i2i and nir_u2u in favor of nir_x2xN
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20067 >
2022-12-01 01:10:12 +00:00
Lionel Landwerlin
2da7ec0db9
intel/clc: assert when libclc shader is not found
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7483
Reviewed-by: Luis Felipe Strano Moraes <luis.strano@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19091 >
2022-10-27 08:53:55 +00:00
Jason Ekstrand
530de844ef
intel,anv,iris,crocus: Drop subgroup size from the shader key
...
Use nir->info.subgroup_size instead.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17337 >
2022-07-08 22:47:22 +00:00
Karol Herbst
9c5fd100cc
nir: add a nir_remove_non_entrypoints helper
...
This code just got duplicated a lot. There is still more, but the
remaining instances do a bit more than just removing other functions.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16348 >
2022-05-10 03:37:44 +00:00
Alexey Bozhenko
2d7d907ad1
intel/compiler: fix singleton pointer coverity warning
...
fix brw_kernel::stats member that was declared as a variable
but used as a pointer to array of 3 elements
CID: 1503279
Signed-off-by: Bozhenko Alexey <oleksii.bozhenko@globallogic.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15975 >
2022-04-19 12:36:10 +03:00
Lionel Landwerlin
684a4ea30c
intel/clc: fix missing pointer write
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 346a7f14fb
("intel/compiler: Add code for compiling CL-style SPIR-V kernels")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15611 >
2022-03-30 07:56:25 +00:00
Lionel Landwerlin
21aa1d3de1
intel/clc: fixup shared memory offsets
...
We're running the io lowering twice so need to reset some fields so
the offset don't go over what is really needed.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15486 >
2022-03-23 10:24:31 +00:00
Lionel Landwerlin
451f907d16
intel/kernel: enable linkage cap
...
Linkage should have happened before this in intel_clc. This just
silence a parser warning.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15486 >
2022-03-23 10:24:31 +00:00
Lionel Landwerlin
bb4ff3e6e2
intel/kernel: enable groups caps
...
This is roughly the same as SpvCapabilityGroupNonUniform
(subgroup_basic).
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15486 >
2022-03-23 10:24:31 +00:00
Jason Ekstrand
4d8e788663
intel/kernel: Implement some Intel built-in functions
...
v2: Document mangled function names (Marcin)
Fixup progress & metadata (Marcin)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171 >
2022-03-21 11:26:44 +00:00
Jason Ekstrand
346a7f14fb
intel/compiler: Add code for compiling CL-style SPIR-V kernels
...
v2: simplify INTEL_DEBUG expressions (Marcin)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171 >
2022-03-21 11:26:44 +00:00