diff options
Diffstat (limited to 'recipes-graphics/piglit')
3 files changed, 92 insertions, 3 deletions
diff --git a/recipes-graphics/piglit/piglit/0001-tests-Fix-cl-test-Include-Directories-error-Error-0-.patch b/recipes-graphics/piglit/piglit/0001-tests-Fix-cl-test-Include-Directories-error-Error-0-.patch new file mode 100644 index 000000000..3e673a497 --- /dev/null +++ b/recipes-graphics/piglit/piglit/0001-tests-Fix-cl-test-Include-Directories-error-Error-0-.patch | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | From c14b65106687b1097f5d50a993707d8a2f99005b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: jiajia Qian <jiajia.qian@nxp.com> | ||
| 3 | Date: Tue, 19 Dec 2023 13:23:33 +0800 | ||
| 4 | Subject: [PATCH] tests: Fix cl test Include Directories: error : Error(0,8) : | ||
| 5 | Cannot find the header file include_test.h. | ||
| 6 | |||
| 7 | Modified CMakeLists.txt to install include_test.h file in piglit/tests/cl/program/build/ folder. | ||
| 8 | |||
| 9 | Modified the relative path in include-directories.cl from "tests/cl/program/build" to "../lib/piglit/tests/cl/program/build". | ||
| 10 | |||
| 11 | Upstream-Status: Pending [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/853] | ||
| 12 | Signed-off-by: jiajia Qian <jiajia.qian@nxp.com> | ||
| 13 | --- | ||
| 14 | CMakeLists.txt | 1 + | ||
| 15 | tests/cl/program/build/include-directories.cl | 2 +- | ||
| 16 | 2 files changed, 2 insertions(+), 1 deletion(-) | ||
| 17 | |||
| 18 | Index: git/tests/cl/program/build/include-directories.cl | ||
| 19 | =================================================================== | ||
| 20 | --- git.orig/tests/cl/program/build/include-directories.cl | ||
| 21 | +++ git/tests/cl/program/build/include-directories.cl | ||
| 22 | @@ -2,7 +2,7 @@ | ||
| 23 | [config] | ||
| 24 | name: Include Directories | ||
| 25 | clc_version_min: 10 | ||
| 26 | -build_options: -I . -I tests/cl/program/build | ||
| 27 | +build_options: -I . -I ../lib/piglit/tests/cl/program/build | ||
| 28 | !*/ | ||
| 29 | |||
| 30 | #include "include_test.h" | ||
diff --git a/recipes-graphics/piglit/piglit/0002-cl-Add-mutually-exclusive-memory-flags-for-CL_MEM_KE.patch b/recipes-graphics/piglit/piglit/0002-cl-Add-mutually-exclusive-memory-flags-for-CL_MEM_KE.patch new file mode 100644 index 000000000..a4935b169 --- /dev/null +++ b/recipes-graphics/piglit/piglit/0002-cl-Add-mutually-exclusive-memory-flags-for-CL_MEM_KE.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | From 2673c2adc81a408a4238f786cb2d795a65308ce6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Eric Guo <eric.guo@nxp.com> | ||
| 3 | Date: Fri, 11 Apr 2025 17:15:40 +0800 | ||
| 4 | Subject: [PATCH] cl: Add mutually exclusive memory flags for | ||
| 5 | CL_MEM_KERNEL_READ_AND_WRITE | ||
| 6 | |||
| 7 | Fix cl-api-create-buffer on mali DDK. | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/1004] | ||
| 10 | Signed-off-by: Eric Guo <eric.guo@nxp.com> | ||
| 11 | --- | ||
| 12 | tests/util/piglit-util-cl-enum.c | 7 ++++++- | ||
| 13 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
| 14 | |||
| 15 | diff --git a/tests/util/piglit-util-cl-enum.c b/tests/util/piglit-util-cl-enum.c | ||
| 16 | index 5d43bc102..f2c185c9c 100644 | ||
| 17 | --- a/tests/util/piglit-util-cl-enum.c | ||
| 18 | +++ b/tests/util/piglit-util-cl-enum.c | ||
| 19 | @@ -979,7 +979,7 @@ PIGLIT_CL_DEFINE_ENUM_2(cl_command_queue_properties, 2, 2, 2, 4, 4 /* really? */ | ||
| 20 | PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_command_queue_properties); | ||
| 21 | |||
| 22 | |||
| 23 | -PIGLIT_CL_DEFINE_ENUM(cl_mem_flags, cl_mem_flags_mutexes, 5, 5, 8, 8, 8) = { | ||
| 24 | +PIGLIT_CL_DEFINE_ENUM(cl_mem_flags, cl_mem_flags_mutexes, 5, 5, 8, 11, 11) = { | ||
| 25 | CL_MEM_READ_WRITE | CL_MEM_READ_ONLY, | ||
| 26 | CL_MEM_READ_WRITE | CL_MEM_WRITE_ONLY, | ||
| 27 | CL_MEM_READ_ONLY | CL_MEM_WRITE_ONLY, | ||
| 28 | @@ -990,6 +990,11 @@ PIGLIT_CL_DEFINE_ENUM(cl_mem_flags, cl_mem_flags_mutexes, 5, 5, 8, 8, 8) = { | ||
| 29 | CL_MEM_HOST_WRITE_ONLY | CL_MEM_HOST_NO_ACCESS, | ||
| 30 | CL_MEM_HOST_READ_ONLY | CL_MEM_HOST_NO_ACCESS, | ||
| 31 | #endif //CL_VERSION_1_2 | ||
| 32 | +#if defined(CL_VERSION_2_0) | ||
| 33 | + CL_MEM_KERNEL_READ_AND_WRITE | CL_MEM_READ_ONLY, | ||
| 34 | + CL_MEM_KERNEL_READ_AND_WRITE | CL_MEM_WRITE_ONLY, | ||
| 35 | + CL_MEM_KERNEL_READ_AND_WRITE | CL_MEM_READ_WRITE, | ||
| 36 | +#endif //CL_VERSION_2_0 | ||
| 37 | }; | ||
| 38 | PIGLIT_CL_DEFINE_ENUM_PTR(cl_mem_flags, cl_mem_flags_mutexes); | ||
| 39 | |||
| 40 | -- | ||
| 41 | 2.34.1 | ||
| 42 | |||
diff --git a/recipes-graphics/piglit/piglit_%.bbappend b/recipes-graphics/piglit/piglit_%.bbappend index fe2a0bc2f..3caf8aa15 100644 --- a/recipes-graphics/piglit/piglit_%.bbappend +++ b/recipes-graphics/piglit/piglit_%.bbappend | |||
| @@ -1,6 +1,23 @@ | |||
| 1 | PACKAGECONFIG:remove:imxgpu = "glx" | 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" |
| 2 | 2 | ||
| 3 | PACKAGECONFIG:append:mx8-nxp-bsp = " opencl" | 3 | SRC_URI += "file://0001-tests-Fix-cl-test-Include-Directories-error-Error-0-.patch \ |
| 4 | PACKAGECONFIG:append:mx9-nxp-bsp = " opencl" | 4 | file://0002-cl-Add-mutually-exclusive-memory-flags-for-CL_MEM_KE.patch" |
| 5 | |||
| 6 | PACKAGECONFIG:append = " ${PACKAGECONFIG_APPEND}" | ||
| 7 | PACKAGECONFIG:remove = " ${PACKAGECONFIG_REMOVE}" | ||
| 8 | |||
| 9 | PACKAGECONFIG_APPEND ?= " \ | ||
| 10 | gbm \ | ||
| 11 | opencl \ | ||
| 12 | ${@bb.utils.filter('DISTRO_FEATURES', 'vulkan', d)}" | ||
| 13 | PACKAGECONFIG_APPEND:imxgpu:mx6-nxp-bsp = "" | ||
| 14 | PACKAGECONFIG_APPEND:imxgpu:mx7-nxp-bsp = "" | ||
| 15 | |||
| 16 | PACKAGECONFIG_REMOVE ?= "" | ||
| 17 | PACKAGECONFIG_REMOVE:imxgpu = "glx" | ||
| 18 | PACKAGECONFIG_REMOVE:imxgpu:mx6-nxp-bsp = "glx x11" | ||
| 19 | PACKAGECONFIG_REMOVE:imxgpu:mx7-nxp-bsp = "glx x11" | ||
| 20 | |||
| 21 | PACKAGECONFIG[gbm] = "-DPIGLIT_USE_GBM=1,-DPIGLIT_USE_GBM=0,virtual/libgbm" | ||
| 5 | 22 | ||
| 6 | CFLAGS:append:imxgpu:toolchain-clang = " -Wno-error=int-conversion" | 23 | CFLAGS:append:imxgpu:toolchain-clang = " -Wno-error=int-conversion" |
