From 767695b2c431cc217f0404bc764cfec03482ba0b Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Mon, 16 Sep 2024 13:26:13 +0200 Subject: [PATCH] asahi: implement get_cl_cts_version Reviewed-by: Alyssa Rosenzweig Part-of: --- docs/features.txt | 2 +- src/gallium/drivers/asahi/agx_pipe.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/features.txt b/docs/features.txt index f074230ae21..9bf7f90786e 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -935,7 +935,7 @@ Rusticl OpenCL 2.2 -- all DONE: Support SPIR-V 1.1 and 1.2 DONE -Rusticl OpenCL 3.0 -- all DONE: iris/gen12 +Rusticl OpenCL 3.0 -- all DONE: asahi, iris/gen12 Optional device capabilities queries DONE cl_khr_extended_versioning DONE diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index 987dc5856dc..41312c0f361 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -2636,6 +2636,18 @@ agx_screen_get_driver_uuid(struct pipe_screen *pscreen, char *uuid) agx_get_driver_uuid(uuid); } +static const char * +agx_get_cl_cts_version(struct pipe_screen *pscreen) +{ + struct agx_device *dev = agx_device(pscreen); + + /* https://www.khronos.org/conformance/adopters/conformant-products/opencl#submission_433 */ + if (dev->params.gpu_generation < 15) + return "v2024-08-08-00"; + + return NULL; +} + struct pipe_screen * agx_screen_create(int fd, struct renderonly *ro, const struct pipe_screen_config *config) @@ -2706,6 +2718,7 @@ agx_screen_create(int fd, struct renderonly *ro, screen->fence_get_fd = agx_fence_get_fd; screen->get_compiler_options = agx_get_compiler_options; screen->get_disk_shader_cache = agx_get_disk_shader_cache; + screen->get_cl_cts_version = agx_get_cl_cts_version; screen->resource_create = u_transfer_helper_resource_create; screen->resource_destroy = u_transfer_helper_resource_destroy;