Caio Oliveira
9fd1d47aa0
intel/compiler: Fix dynarray usage in intel_clc
...
The code builds up the dynamic array of objects (spirv_objs) and
collect pointers to each of them into another dynamic
array (spirv_ptr_objs).
If the growth of the first array cause a reallocation, it is
possible that the previous pointers end up invalid.
Fixes: 77e929a527
("intel/clc: allow multiple CL files to be compiled together")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19730 >
2022-11-14 19:15:05 +00:00
Luis Felipe Strano Moraes
eff1517cd7
anv: added proper handling for input argument in intel_clc
...
That was previously listed on the getopt_long struct but not actually
being used. This makes intel_clc argument processing easier as now
all of its arguments are handled with getopt and anything after the
special argument '--' is passed along to clang to form the final build
command.
Thanks to Dylan Baker for help with changes to the meson file.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19153 >
2022-10-20 02:24:39 +00:00
Luis Felipe Strano Moraes
8de02ff980
anv: fixing typo on description of output flag for intel_clc
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19153 >
2022-10-20 02:24:39 +00:00
Luis Felipe Strano Moraes
056d72c897
anv: add missing separator to help for intel_clc
...
intel_clc relies on the special argument '--' for getopt to be given so
it knows when to start expecting purely input files or clang arguments.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19153 >
2022-10-20 02:24:39 +00:00
Luis Felipe Strano Moraes
8e1f03ada0
anv: reword info flag in intel_clc's getopt to avoid clash
...
The info keyword was using the same short description that
was listed for input files on the struct for long_options.
Rewording it to 'v' and 'verbose' to be more in line with
expectations.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19153 >
2022-10-20 02:24:39 +00:00
Kenneth Graunke
72e9843991
intel/compiler: Introduce a new brw_isa_info structure
...
This structure will contain the opcode mapping tables in the next
commit. For now, this is the mechanical change to plumb it into all
the necessary places, and it continues simply holding devinfo.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17309 >
2022-06-30 23:46:35 +00:00
Lionel Landwerlin
9d7d1c0637
intel/clc: enable fp16 & subgroups for GRL
...
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/17253 >
2022-06-27 15:31:49 +00:00
Lionel Landwerlin
df059c6781
intel/clc: deal with SPIRV-Tools linker new behavior
...
We're now required to provide all modules to link at the same SPIRV
version.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-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
de9c2312ea
intel/clc: compile fix
...
Fixes: c15bf88f01
("intel: Add a little OpenCL C compiler binary")
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
a7f264f33a
intel/clc: add option to printout kernel prog_data
...
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
9ca29c687b
intel/clc: disable tool prior to Gfx12.5 platforms
...
This tool is currently only aimed at Gfx version 12.5+ with
COMPUTE_WALKER. We could make it work on earlier platforms but they
require pushing gl_SubgroupInvocation and the CLC code is missing the
back-end compiler set-up bits for that.
v2: Commit description by Jason
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/13171 >
2022-03-21 11:26:44 +00:00
Lionel Landwerlin
c735c4ca85
intel/clc: specify supported extensions
...
Having everything ever known to man is confusing our SPIRV parser.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171 >
2022-03-21 11:26:44 +00:00
Lionel Landwerlin
a29b1d5716
intel/clc: allow producing SPIRV files
...
Useful to debug the parser.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171 >
2022-03-21 11:26:44 +00:00
Lionel Landwerlin
77e929a527
intel/clc: allow multiple CL files to be compiled together
...
v2: use util_dynarray_append() (Jason)
identation fixes (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171 >
2022-03-21 11:26:44 +00:00
Jason Ekstrand
c15bf88f01
intel: Add a little OpenCL C compiler binary
...
v2: Fix up indentation (Marcin)
s/gen/gfx/ (Marcin)
Deal with fd closing in success/fail cases (Marin)
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