platform/upstream/mesa.git
22 months agorusticl: fix compiler features_macro
Karol Herbst [Tue, 19 Apr 2022 21:49:34 +0000 (23:49 +0200)]
rusticl: 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>

22 months agorusticl/kernel: cache the nir as well
Karol Herbst [Sun, 17 Apr 2022 17:00:57 +0000 (19:00 +0200)]
rusticl/kernel: cache the nir as well

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>

22 months agorusticl/kernel: prepare for nir caching
Karol Herbst [Sun, 17 Apr 2022 12:52:06 +0000 (14:52 +0200)]
rusticl/kernel: prepare for nir caching

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>

22 months agorusticl: kernel caching
Karol Herbst [Sat, 16 Apr 2022 18:48:07 +0000 (20:48 +0200)]
rusticl: kernel caching

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>

22 months agorusticl: port to Rust 2018
Karol Herbst [Sat, 16 Apr 2022 11:55:50 +0000 (13:55 +0200)]
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>

22 months agorusticl/mem: only write pitch when required
Karol Herbst [Fri, 15 Apr 2022 15:58:46 +0000 (17:58 +0200)]
rusticl/mem: only write pitch when required

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>

22 months agorusticl/mem: fix IMAGE1D_BUFFER
Karol Herbst [Fri, 15 Apr 2022 11:36:00 +0000 (13:36 +0200)]
rusticl/mem: fix IMAGE1D_BUFFER

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>

22 months agorusticl/kernel: implement image_format and image_order
Karol Herbst [Thu, 14 Apr 2022 14:33:21 +0000 (16:33 +0200)]
rusticl/kernel: implement image_format and image_order

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>

22 months agorusticl/mesa: make resource_from_user_memory an optinal feature
Karol Herbst [Wed, 13 Apr 2022 23:21:05 +0000 (01:21 +0200)]
rusticl/mesa: make resource_from_user_memory an optinal feature

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>

22 months agorusticl/mem: add user_ptr fallback shadow buffer
Karol Herbst [Tue, 12 Apr 2022 23:28:43 +0000 (01:28 +0200)]
rusticl/mem: add user_ptr fallback shadow buffer

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>

22 months agorusticl/device: fix compiler features_macro
Karol Herbst [Tue, 12 Apr 2022 15:31:47 +0000 (17:31 +0200)]
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>

22 months agorusticl/queue: implement missing CL 3.0 bits
Karol Herbst [Tue, 12 Apr 2022 12:52:57 +0000 (14:52 +0200)]
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>

22 months agorusticl/device: fix api consistency_device_and_host_timer test
Karol Herbst [Tue, 12 Apr 2022 10:50:37 +0000 (12:50 +0200)]
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>

22 months agorusticl/memory: don't map more than necessary for copy operations
Karol Herbst [Mon, 11 Apr 2022 22:51:29 +0000 (00:51 +0200)]
rusticl/memory: don't map more than necessary for copy operations

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>

22 months agorusticl: get rid of a few clones
Karol Herbst [Sun, 3 Apr 2022 18:02:05 +0000 (20:02 +0200)]
rusticl: get rid of a few clones

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>

22 months agorusticl: Call nir_scale_fdiv
Jason Ekstrand [Fri, 15 Apr 2022 20:13:53 +0000 (15:13 -0500)]
rusticl: Call nir_scale_fdiv

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>

22 months agorusticl/kernel: run some more opt passes
Karol Herbst [Fri, 29 Apr 2022 01:20:36 +0000 (03:20 +0200)]
rusticl/kernel: run some more opt passes

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>

22 months agorusticl/kernel: set CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE
Karol Herbst [Fri, 29 Apr 2022 01:20:25 +0000 (03:20 +0200)]
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>

22 months agorusticl/device: implement cl_khr_3d_image_writes
Karol Herbst [Thu, 31 Mar 2022 14:24:37 +0000 (16:24 +0200)]
rusticl/device: implement cl_khr_3d_image_writes

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>

22 months agorusticl/device: add retain/release callbacks for luxmark v4
Karol Herbst [Thu, 31 Mar 2022 00:38:17 +0000 (02:38 +0200)]
rusticl/device: add retain/release callbacks for luxmark v4

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>

22 months agorusticl/kernel: lower memcpy
Karol Herbst [Wed, 30 Mar 2022 16:09:32 +0000 (18:09 +0200)]
rusticl/kernel: lower memcpy

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>

22 months agorusticl/kernel: inline samplers
Karol Herbst [Wed, 30 Mar 2022 03:01:50 +0000 (05:01 +0200)]
rusticl/kernel: inline samplers

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>

22 months agorusticl/kernel: support for images
Karol Herbst [Fri, 25 Mar 2022 19:31:16 +0000 (20:31 +0100)]
rusticl/kernel: support for images

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>

22 months agorusticl/mem: implement clCreateSamplerWithProperties
Karol Herbst [Fri, 25 Mar 2022 17:57:08 +0000 (18:57 +0100)]
rusticl/mem: implement clCreateSamplerWithProperties

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>

22 months agorusticl/mesa/context: un Arc the PipeContext
Karol Herbst [Mon, 11 Apr 2022 14:49:46 +0000 (16:49 +0200)]
rusticl/mesa/context: un Arc the PipeContext

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>

22 months agorusticl/mem: implement copies between buffers and images
Karol Herbst [Fri, 25 Mar 2022 13:40:26 +0000 (14:40 +0100)]
rusticl/mem: implement copies between buffers and images

v2: Use the pitches from the pipe_transfer_map (Jason)

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>

22 months agorusticl/mem: implement clCreateImage2D and 3D
Karol Herbst [Thu, 24 Mar 2022 19:52:48 +0000 (20:52 +0100)]
rusticl/mem: implement clCreateImage2D and 3D

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>

22 months agorusticl/mem: implement copy image
Karol Herbst [Thu, 24 Mar 2022 17:21:44 +0000 (18:21 +0100)]
rusticl/mem: implement copy image

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>

22 months agorusticl/mem: implement fill image
Karol Herbst [Thu, 24 Mar 2022 01:19:07 +0000 (02:19 +0100)]
rusticl/mem: implement fill image

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>

22 months agorusticl/mem: implement maping images
Karol Herbst [Wed, 23 Mar 2022 22:12:36 +0000 (23:12 +0100)]
rusticl/mem: implement maping images

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>

22 months agorusticl/memory: rework mapping tracking
Karol Herbst [Sat, 30 Apr 2022 10:06:01 +0000 (12:06 +0200)]
rusticl/memory: rework mapping tracking

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>

22 months agorusticl/mem: support read/write/copy ops for images
Karol Herbst [Tue, 22 Mar 2022 17:33:57 +0000 (18:33 +0100)]
rusticl/mem: support read/write/copy ops for images

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>

22 months agorusticl/mesa: support mapping textures
Karol Herbst [Tue, 22 Mar 2022 17:25:22 +0000 (18:25 +0100)]
rusticl/mesa: support mapping textures

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>

22 months agorusticl/spirv: add print method
Karol Herbst [Sun, 20 Mar 2022 23:07:58 +0000 (00:07 +0100)]
rusticl/spirv: add print method

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>

22 months agorusticl: add support for printf
Karol Herbst [Fri, 18 Mar 2022 17:30:14 +0000 (18:30 +0100)]
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>

22 months agorusticl/event: timeout wait on condvar to abort on reaped worker threads
Karol Herbst [Sat, 19 Mar 2022 19:12:00 +0000 (20:12 +0100)]
rusticl/event: timeout wait on condvar to abort on reaped worker threads

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>

22 months agorusticl/kernel: add stub for clGetKernelSubGroupInfo
Karol Herbst [Sun, 20 Mar 2022 21:40:14 +0000 (22:40 +0100)]
rusticl/kernel: add stub for clGetKernelSubGroupInfo

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>

22 months agorusticl/program: add stubs for program ctors and dtors
Karol Herbst [Sun, 20 Mar 2022 21:01:31 +0000 (22:01 +0100)]
rusticl/program: add stubs for program ctors and dtors

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>

22 months agorusticl/pipe: add clGetPipeInfo stub end return CL_INVALID_MEM_OBJECT
Karol Herbst [Sun, 20 Mar 2022 20:47:33 +0000 (21:47 +0100)]
rusticl/pipe: add clGetPipeInfo stub end return CL_INVALID_MEM_OBJECT

spec requires this for devices not supporting pipes

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>

22 months agorusticl/mem implement the memory *WithProperties API
Karol Herbst [Sun, 20 Mar 2022 15:41:24 +0000 (16:41 +0100)]
rusticl/mem implement the memory *WithProperties API

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>

22 months agorusticl/device: expose cles_khr_int64 for compatible embedded devices
Karol Herbst [Sun, 20 Mar 2022 16:25:18 +0000 (17:25 +0100)]
rusticl/device: expose cles_khr_int64 for compatible embedded devices

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>

22 months agorusticl/kernel: sweep nir to reduce peak memory usage
Karol Herbst [Fri, 18 Mar 2022 15:24:30 +0000 (16:24 +0100)]
rusticl/kernel: sweep nir to reduce peak memory usage

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>

22 months agorusticl/kernel: report SIMD width as work group sizes
Karol Herbst [Fri, 18 Mar 2022 02:16:05 +0000 (03:16 +0100)]
rusticl/kernel: report SIMD width as work group sizes

for the prefered multiple it should be fine. For CL_KERNEL_WORK_GROUP_SIZE
we have to query the driver once we compile to the hardware earlier.
But using the SIMD width is better than reporting 1.

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>

22 months agorusticl/icd: add more func pointers
Karol Herbst [Fri, 18 Mar 2022 01:40:14 +0000 (02:40 +0100)]
rusticl/icd: add more func pointers

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>

22 months agorusticl: add svm func stubs
Karol Herbst [Fri, 18 Mar 2022 01:20:56 +0000 (02:20 +0100)]
rusticl: add svm func stubs

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>

22 months agorusticl/program: add il stubs
Karol Herbst [Fri, 18 Mar 2022 00:49:08 +0000 (01:49 +0100)]
rusticl/program: add il stubs

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>

22 months agorusticl: claim support for generic pointers
Karol Herbst [Fri, 18 Mar 2022 00:29:28 +0000 (01:29 +0100)]
rusticl: claim support for generic pointers

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>

22 months agorusticl/device: advertize atomic caps
Karol Herbst [Fri, 18 Mar 2022 00:29:16 +0000 (01:29 +0100)]
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>

22 months agorusticl/device: set required double fp config values
Karol Herbst [Fri, 18 Mar 2022 00:21:48 +0000 (01:21 +0100)]
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>

22 months agorusticl/kernel: implement clCloneKernel
Karol Herbst [Fri, 18 Mar 2022 00:06:20 +0000 (01:06 +0100)]
rusticl/kernel: implement clCloneKernel

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>

22 months agorusticl/context: implement clSetContextDestructorCallback
Karol Herbst [Thu, 17 Mar 2022 23:41:38 +0000 (00:41 +0100)]
rusticl/context: implement clSetContextDestructorCallback

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>

22 months agorusticl: advertize CL 1.1 and CL 1.2 extensions
Karol Herbst [Thu, 17 Mar 2022 22:48:47 +0000 (23:48 +0100)]
rusticl: advertize CL 1.1 and CL 1.2 extensions

That leads us stright to CL 3.0

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>

22 months agorusticl/kernel: add missing preprocessor definitions
Karol Herbst [Thu, 17 Mar 2022 16:55:34 +0000 (17:55 +0100)]
rusticl/kernel: add missing preprocessor definitions

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>

22 months agorusticl/kernel: add support for offsets
Karol Herbst [Fri, 29 Apr 2022 12:02:57 +0000 (14:02 +0200)]
rusticl/kernel: add support for offsets

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>

22 months agorusticl/kernel: run driver requested lowering passes
Karol Herbst [Thu, 17 Mar 2022 19:18:16 +0000 (20:18 +0100)]
rusticl/kernel: run driver requested lowering passes

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>

22 months agorusticl/mem: finish clEnqueueMigrateMemObjects
Karol Herbst [Thu, 17 Mar 2022 18:29:01 +0000 (19:29 +0100)]
rusticl/mem: finish clEnqueueMigrateMemObjects

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>

22 months agorusticl/kernel: implement CL_KERNEL_COMPILE_WORK_GROUP_SIZE
Karol Herbst [Thu, 17 Mar 2022 16:38:41 +0000 (17:38 +0100)]
rusticl/kernel: implement CL_KERNEL_COMPILE_WORK_GROUP_SIZE

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>

22 months agorusticl/event: add fake impl of clGetEventProfilingInfo
Karol Herbst [Thu, 17 Mar 2022 15:08:39 +0000 (16:08 +0100)]
rusticl/event: add fake impl of clGetEventProfilingInfo

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>

22 months agorusticl/program: implement clCreateProgramWithBinary
Karol Herbst [Thu, 17 Mar 2022 10:44:22 +0000 (11:44 +0100)]
rusticl/program: implement clCreateProgramWithBinary

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>

22 months agorusticl/api: add param to query which contains application provided values
Karol Herbst [Thu, 17 Mar 2022 11:18:39 +0000 (12:18 +0100)]
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>

22 months agorusticl: implement clUnloadPlatformCompiler
Karol Herbst [Wed, 16 Mar 2022 23:06:16 +0000 (00:06 +0100)]
rusticl: implement clUnloadPlatformCompiler

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>

22 months agorusticl/program: support compiling libraries
Karol Herbst [Wed, 16 Mar 2022 21:37:42 +0000 (22:37 +0100)]
rusticl/program: support compiling libraries

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>

22 months agorusticl/mem: add clEnqueueMigrateMemObjects stub
Karol Herbst [Sat, 30 Apr 2022 13:31:36 +0000 (15:31 +0200)]
rusticl/mem: add clEnqueueMigrateMemObjects stub

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>

22 months agorusticl/event: implement marker and barrier
Karol Herbst [Sat, 30 Apr 2022 20:34:10 +0000 (22:34 +0200)]
rusticl/event: implement marker and barrier

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>

22 months agorusticl/mem: implement clFillBuffer
Karol Herbst [Sat, 30 Apr 2022 20:34:02 +0000 (22:34 +0200)]
rusticl/mem: implement clFillBuffer

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>

22 months agorusticl/mem: implement clCopyBuffer
Karol Herbst [Wed, 16 Mar 2022 16:26:28 +0000 (17:26 +0100)]
rusticl/mem: implement clCopyBuffer

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>

22 months agorusticl/queue: fix clReleaseCommandQueue
Karol Herbst [Wed, 16 Mar 2022 15:19:48 +0000 (16:19 +0100)]
rusticl/queue: fix clReleaseCommandQueue

we have to flush the queue on every call

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>

22 months agorusticl/program: undefine __IMAGE_SUPPORT__ if images are unsupported
Karol Herbst [Wed, 16 Mar 2022 14:39:14 +0000 (15:39 +0100)]
rusticl/program: undefine __IMAGE_SUPPORT__ if images are unsupported

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>

22 months agorusticl/kernel: implement clEnqueueTask
Karol Herbst [Sat, 30 Apr 2022 20:33:48 +0000 (22:33 +0200)]
rusticl/kernel: implement clEnqueueTask

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>

22 months agorusticl/kernel: implement clCreateKernelsInProgram
Karol Herbst [Wed, 16 Mar 2022 14:17:05 +0000 (15:17 +0100)]
rusticl/kernel: implement clCreateKernelsInProgram

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>

22 months agorusticl/event: proper eventing support
Karol Herbst [Wed, 16 Mar 2022 10:14:53 +0000 (11:14 +0100)]
rusticl/event: proper eventing 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>

22 months agorusticl/mesa: add fencing support
Karol Herbst [Wed, 16 Mar 2022 10:02:29 +0000 (11:02 +0100)]
rusticl/mesa: add fencing 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>

22 months agorusticl: hack for CL 3.0
Karol Herbst [Mon, 14 Mar 2022 19:18:37 +0000 (20:18 +0100)]
rusticl: hack for CL 3.0

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>

22 months agorusticl/event: wrong but non crashing impl of clWaitForEvents
Karol Herbst [Sat, 12 Mar 2022 21:23:23 +0000 (22:23 +0100)]
rusticl/event: wrong but non crashing impl of clWaitForEvents

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>

22 months agorusticl/mem: use helper context for COPY_HOST_PTR buffers
Karol Herbst [Mon, 14 Mar 2022 18:17:31 +0000 (19:17 +0100)]
rusticl/mem: use helper context for COPY_HOST_PTR buffers

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>

22 months agorusticl/kernel: clGetKernelWorkGroupInfo allows a NULL device
Karol Herbst [Sun, 24 Apr 2022 13:24:49 +0000 (15:24 +0200)]
rusticl/kernel: clGetKernelWorkGroupInfo allows a NULL device

In which case we have to get the only device associated with the kernel.

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>

22 months agorusticl/kernel: more clGetKernelWorkGroupInfo props
Karol Herbst [Wed, 16 Mar 2022 14:52:40 +0000 (15:52 +0100)]
rusticl/kernel: more clGetKernelWorkGroupInfo props

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>

22 months agorusticl: translate spirv to nir and first steps to kernel arg handling
Karol Herbst [Thu, 28 Apr 2022 20:07:49 +0000 (22:07 +0200)]
rusticl: translate spirv to nir and first steps to kernel arg handling

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>

22 months agorusticl: nir bindings
Karol Herbst [Thu, 10 Mar 2022 22:42:44 +0000 (23:42 +0100)]
rusticl: nir bindings

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>

22 months agorusticl/kernel: basic implementation
Karol Herbst [Thu, 10 Mar 2022 18:32:35 +0000 (19:32 +0100)]
rusticl/kernel: basic implementation

still not able to run kernels, but most of the boilerplate code is there now

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>

22 months agorusticl/mem: support ops on subbuffers
Karol Herbst [Sat, 12 Mar 2022 20:31:09 +0000 (21:31 +0100)]
rusticl/mem: support ops on subbuffers

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>

22 months agorusticl: implement clEnqueueReadBuffer
Karol Herbst [Sat, 12 Mar 2022 19:02:04 +0000 (20:02 +0100)]
rusticl: implement clEnqueueReadBuffer

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>

22 months agorusticl: implement clFinish and clFlush
Karol Herbst [Sat, 12 Mar 2022 17:59:31 +0000 (18:59 +0100)]
rusticl: implement clFinish and clFlush

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>

22 months agorusticl/util: add static_assert macro
Karol Herbst [Tue, 15 Mar 2022 20:30:53 +0000 (21:30 +0100)]
rusticl/util: add static_assert 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>

22 months agorusticl: finish implementing clBuildProgram
Karol Herbst [Wed, 9 Mar 2022 17:02:03 +0000 (18:02 +0100)]
rusticl: finish implementing clBuildProgram

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>

22 months agorusticl: added
Karol Herbst [Sun, 8 Nov 2020 19:28:21 +0000 (20:28 +0100)]
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>

22 months agoci/lava: collapse printing env
David Heidelberg [Sat, 10 Sep 2022 11:43:08 +0000 (13:43 +0200)]
ci/lava: collapse printing env

Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18529>

22 months agoci/test: collapse printing env
David Heidelberg [Sat, 10 Sep 2022 11:38:37 +0000 (13:38 +0200)]
ci/test: collapse printing env

Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18529>

22 months agoci/traces: do not keep a cache, which will be wiped a few steps later
David Heidelberg [Sat, 10 Sep 2022 15:27:04 +0000 (17:27 +0200)]
ci/traces: do not keep a cache, which will be wiped a few steps later

The desired state is to revert this patch at that moment,
when we'll be able to verify traces by checksums,
but for now, let's disable caching.

10s for restoring cache: https://gitlab.freedesktop.org/mesa/mesa/-/jobs/28137099#L17
?s for removing cache: https://gitlab.freedesktop.org/mesa/mesa/-/jobs/28137099#L813
1s for saving cache: https://gitlab.freedesktop.org/mesa/mesa/-/jobs/28137099#L1047

Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18531>

22 months agospirv: avoid allocating memory twice
Thomas H.P. Andersen [Tue, 6 Sep 2022 21:25:43 +0000 (23:25 +0200)]
spirv: avoid allocating memory twice

ptr_type was allocated twice. This drops the second allocation.

It has been like this since the introduction of the code in
b778e7bd6c1d82ce739d7e278de00ee600532cd5

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18450>

22 months agoci: Add support for Jetson TK1.
Emma Anholt [Tue, 17 May 2022 14:05:36 +0000 (07:05 -0700)]
ci: Add support for Jetson TK1.

This is a farm of 5 (6, but one fails) TK1 boards for nouveau testing,
hosted and maintained by me.  Currently it runs GLES dEQP.

I've been using ./.gitlab-ci/bin/ci_run_n_monitor.py --stress --target
gk20a to test it and am pretty confident of the skips/flakes list.  Last
night it ran 318 jobs without fail, and prior to that there were two sets
of runs in the 100-200 range where only the one failing runner failed any
jobs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18497>

22 months agozink: implement async nir creation
Mike Blumenkrantz [Mon, 15 Aug 2022 16:23:09 +0000 (12:23 -0400)]
zink: implement async nir creation

this just punts to the compile threads directly

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18198>

22 months agomesa/st: add MESA_COMPUTE_PBO env var
Mike Blumenkrantz [Thu, 5 Aug 2021 19:22:06 +0000 (15:22 -0400)]
mesa/st: add MESA_COMPUTE_PBO env var

this adds a variable which, when set, overrides the return of the
pipe_screen::is_compute_copy_faster hook to force using compute shader
downloads even on drivers that don't export the cap/hook, enabling easier
testing

it also adds MESA_COMPUTE_PBO=spec to force always using specialized pbo variants

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18198>

22 months agomesa/st: add specialized pbo download shaders
Mike Blumenkrantz [Wed, 17 Aug 2022 14:04:43 +0000 (10:04 -0400)]
mesa/st: add specialized pbo download shaders

the goal of the pbo ubershaders was to have a very small number of
shaders that could handle lots of different readback operations

this is great for cases where an app is doing lots of different types
of readback, but it's not as optimal for apps which do only 1-2 types
of readback over and over

to handle this, track the usage for every readback which reaches compute pbo
and after the same readback is used N times, inline the constant data and
create a specialized version of the shader which will be more optimal

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18198>

22 months agost_pbo/compute: use new shader interface to perform async shader creation
Mike Blumenkrantz [Fri, 12 Aug 2022 18:32:52 +0000 (14:32 -0400)]
st_pbo/compute: use new shader interface to perform async shader creation

this enables compatible drivers to initiate threaded creation of huge
compute shaders fully in a thread while falling back to software in
order to avoid blocking for several seconds, as slower progress is better
than no progress at all--especially in cases where the huge pbo shader
may only be used a single time

the mechanics are straightforward for thread-enabled drivers:
* check hash table for existing shader data
* if no shader exists, perform creation of nir shader fully in driver thread
  and return immediately, enabling software fallback without blocking
* once fence for nir shader is signalled, pass the nir back to the driver
  thread again to run common nir passes and execute normal shader creation
* continue to use software fallback until the shader is fully ready

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18198>

22 months agogallium: add pipe_screen::driver_thread_add_job
Mike Blumenkrantz [Fri, 12 Aug 2022 18:30:58 +0000 (14:30 -0400)]
gallium: add pipe_screen::driver_thread_add_job

this allows a frontend to punt creation of a nir shader down to the
driver's compilation thread, which is useful in the event that the
shader being created is so big that it will cause immediate blocking
from running common nir passes

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18198>

22 months agomesa/st: move compute pbo shutdown to compute pbo file
Mike Blumenkrantz [Fri, 12 Aug 2022 16:25:15 +0000 (12:25 -0400)]
mesa/st: move compute pbo shutdown to compute pbo file

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18198>

22 months agost_pbo/compute: use split shader finish funcs
Mike Blumenkrantz [Fri, 12 Aug 2022 16:21:49 +0000 (12:21 -0400)]
st_pbo/compute: use split shader finish funcs

no functional changes

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18198>

22 months agomesa/st: split out builtin shader finish
Mike Blumenkrantz [Fri, 12 Aug 2022 16:21:08 +0000 (12:21 -0400)]
mesa/st: split out builtin shader finish

it's useful to be able to run the nir passes separately

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18198>

22 months agovirgl: Report CONSTANT_BUFFER_SIZE according to GL_MAX_UNIFORM_BLOCK_SIZE
Gert Wollny [Fri, 9 Sep 2022 07:22:18 +0000 (09:22 +0200)]
virgl: Report CONSTANT_BUFFER_SIZE according to GL_MAX_UNIFORM_BLOCK_SIZE

GL_MAX_FRAGMENT_UNIFORM_COMPONENTS may not report a size that
is useful to calculate the supported UBO size. Use the value
GL_MAX_UNIFORM_BLOCK_SIZE instead when the host supports this.

Related: https://gitlab.freedesktop.org/virgl/virglrenderer/-/issues/286
Fixes: 5b683ba19ac77d6c7dfd8de478678d0b90ba764f
  virgl: Only progagate the uniform numbers if the numbers are actually right

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18512>