Karol Herbst
29b4c1a09f
rusticl: experimental support for cl_khr_fp16
...
Hidden behind `RUSTICL_ENABLE=fp16` for now as the OpenCL CTS doesn't have
enough fp16 tests at the moment. There has been a lot of work on it though,
so hopefully we can enable and verify it soon.
Additionally libclc also misses a bunch of fp16 functionality, so most of
the tests would also just crash.
However this flag is useful for development as it already wires up most of
the code needed.
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23788 >
2023-06-22 10:45:48 +00:00
Karol Herbst
6ae801c4d8
rusticl/device: rename doubles to fp64 and long to int64
...
They are obviously the better names.
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23788 >
2023-06-22 10:45:48 +00:00
Karol Herbst
a9ddee677b
rusticl: advertize cl_khr_extended_versioning
...
We already implemented the OpenCL 3.0 core bits, but the extension also
has a `CL_DEVICE_OPENCL_C_NUMERIC_VERSION_KHR` query.
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23707 >
2023-06-17 22:20:06 +00:00
Karol Herbst
f969e9a137
rusticl/version: use cl_version instead of cl_uint and provide a From impl
...
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23707 >
2023-06-17 22:20:05 +00:00
Karol Herbst
dce0665705
rusticl/device: sort cl_device_info queries
...
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23707 >
2023-06-17 22:20:05 +00:00
Karol Herbst
c7751c7f7d
rusticl/device: add intel usm queries DPCPP cares about
...
We don't implement them and we don't advertise the extension, but DPCPP
queries them regardless. We ultimately plan to implement the intel USM
extension. However until we do, just return 0 for those queries.
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23705 >
2023-06-17 20:19:12 +00:00
LingMan
0535948535
rusticl: fix UB in CLProp machinery
...
Viewing structs as a collection of u8 is not generally sound. Any padding bytes might be
uninitialized and creating an integer from uninitialized memory constitutes producing an invalid
value, which is instant UB.
Since we only copy these bytes around, the fix is to simply work with MaybeUninit<u8>, which can handle uninitialized memory just fine, instead.
See: https://doc.rust-lang.org/reference/behavior-considered-undefined.html
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23652 >
2023-06-15 02:31:19 +00:00
LingMan
cf43a74c79
rusticl: drop CLProp implementation for String
...
Route the data to the implementation for &str instead. It works just as fine.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23652 >
2023-06-15 02:31:19 +00:00
Karol Herbst
948970c1eb
rusticl/icd: use new proc macros
...
This drops quite a lot of boilerplate code as this is now all generated
via our proc macros.
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed by Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23413 >
2023-06-09 10:35:24 +00:00
Karol Herbst
3a5a7203af
rusticl/device: set preferred vector size of doubles if fp64 is enabled
...
Fixes: 400847a990 ("rusticl/device: improve advertisement of fp64 support")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23391 >
2023-06-02 15:00:01 +00:00
norablackcat
c07b8a54c5
rusticl/device: implement cl_khr_device_uuid
...
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Tested-by: Andrey Alekseenko <al42and@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23147 >
2023-05-23 13:40:53 +00:00
norablackcat
40f1f25f56
rusticl/api: add integer_dot_product api
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23011 >
2023-05-18 23:59:53 +00:00
norablackcat
1404c180e9
rusticl: implement cl_khr_pci_bus_info
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23022 >
2023-05-15 18:34:41 +00:00
Karol Herbst
400847a990
rusticl/device: improve advertisement of fp64 support
...
Enabling fp64 support makes rarely sense, but in case we do claim it, we
should also tell if it's a pure software implementation.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22649 >
2023-04-25 04:27:57 +00:00
Karol Herbst
bfee3a8563
rusticl: add support for fine-grained system SVM
...
At the moment it's an all or nothing. A driver supporting fine-grained
system SVM can enable it in order to get full SVM support.
Lower levels could be emulated by userptrs and placing the bo at the same
locations in the GPU's VM as well, but that would require reworking quite
a bit on the drivers side.
For now supporting mmu_notifiers on the kernel side is the only way of
getting SVM support with Rusticl.
The only driver having the gallium bits wired up atm is Nouveau, but I
suspect it shouldn't be all to hard for iris and radeonsi as well.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19712 >
2023-04-14 07:41:54 +00:00
Karol Herbst
22808d542b
rusticl/platform: move device initialization to the platform
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22280 >
2023-04-13 02:54:21 +00:00
Karol Herbst
53025688bb
rusticl/platform: move getter into the type
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22280 >
2023-04-13 02:54:21 +00:00
Karol Herbst
11250d7a9e
rusticl: split platform into core and api parts
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22280 >
2023-04-13 02:54:20 +00:00
Antonio Gomes
06daa03c5c
rusticl: Implement spec for cl_khr_image2d_from_buffer
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378 >
2023-03-07 18:24:56 +00:00
Karol Herbst
ced9d5d635
rusticl/device: limit CL_DEVICE_MAX_CONSTANT_ARGS
...
At the moment we implement constant memory as normal global memory, but
we still should limit to the actual constant buffer cap once we properly
use UBOs for that.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20161 >
2023-02-22 14:20:21 +00:00
Karol Herbst
13a4c49cb1
rusticl/program: enable spirv
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19008 >
2023-02-13 12:45:07 +00:00
Karol Herbst
fa99fc3491
rusticl: advertise conformance on 12th Intel iGPUs
...
Submission can be found here:
https://www.khronos.org/conformance/adopters/conformant-products/opencl#submission_405
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Hard-reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19699 >
2022-11-22 04:42:19 +00:00
Karol Herbst
b51eb98cf6
rusticl/device: put space at the end of CL_DEVICE_VERSION
...
Apparently some software relies on that and the spec kind of says it's
there.
Fixes: 20c90fed5a ("rusticl: added")
Reported-by: sobkas
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19872 >
2022-11-22 03:10:33 +00:00
Karol Herbst
7a5817bf8c
rusticl: call glsl_type_singleton_init_or_ref
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439 >
2022-09-12 05:58:13 +00:00
Karol Herbst
cad2b6c4bc
rusticl/device: report mesas version for CL_DRIVER_VERSION
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439 >
2022-09-12 05:58:13 +00:00
Karol Herbst
f2ce79f8af
rusticl/memory: kernel read_write images prep work
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439 >
2022-09-12 05:58:13 +00:00
Karol Herbst
734352ddfb
rusticl/program: some boilerplate code for SPIR-V support
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439 >
2022-09-12 05:58:13 +00:00
Karol Herbst
87bacf58ec
rusticl: the CTS is a piece of shit
...
seriously, this fixes some image test, becaues ... rounding modes on CPU
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439 >
2022-09-12 05:58:13 +00:00
Karol Herbst
7f80350d55
rusticl: port to Rust 2018
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439 >
2022-09-12 05:58:13 +00:00
Karol Herbst
0f302cae63
rusticl/device: fix compiler features_macro
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439 >
2022-09-12 05:58:13 +00:00
Karol Herbst
9caf753ab7
rusticl/queue: implement missing CL 3.0 bits
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439 >
2022-09-12 05:58:13 +00:00
Karol Herbst
469329aa39
rusticl/device: fix api consistency_device_and_host_timer test
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439 >
2022-09-12 05:58:13 +00:00
Karol Herbst
2522fbf32d
rusticl/kernel: set CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439 >
2022-09-12 05:58:13 +00:00
Karol Herbst
ea1250d0bf
rusticl: add support for printf
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439 >
2022-09-12 05:58:12 +00:00
Karol Herbst
113632ce3c
rusticl/device: advertize atomic caps
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439 >
2022-09-12 05:58:12 +00:00
Karol Herbst
5c18f39b09
rusticl/device: set required double fp config values
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439 >
2022-09-12 05:58:12 +00:00
Karol Herbst
84d16045d0
rusticl/api: add param to query which contains application provided values
...
this is required for e.g. CL_PROGRAM_BINARIES
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439 >
2022-09-12 05:58:12 +00:00
Karol Herbst
20c90fed5a
rusticl: added
...
Initial code drop for Rusticl :)
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439 >
2022-09-12 05:58:12 +00:00