summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/piglit
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/piglit')
-rw-r--r--recipes-graphics/piglit/piglit/0001-tests-Fix-cl-test-Include-Directories-error-Error-0-.patch30
-rw-r--r--recipes-graphics/piglit/piglit/0002-cl-Add-mutually-exclusive-memory-flags-for-CL_MEM_KE.patch42
-rw-r--r--recipes-graphics/piglit/piglit_%.bbappend23
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 @@
1From c14b65106687b1097f5d50a993707d8a2f99005b Mon Sep 17 00:00:00 2001
2From: jiajia Qian <jiajia.qian@nxp.com>
3Date: Tue, 19 Dec 2023 13:23:33 +0800
4Subject: [PATCH] tests: Fix cl test Include Directories: error : Error(0,8) :
5 Cannot find the header file include_test.h.
6
7Modified CMakeLists.txt to install include_test.h file in piglit/tests/cl/program/build/ folder.
8
9Modified the relative path in include-directories.cl from "tests/cl/program/build" to "../lib/piglit/tests/cl/program/build".
10
11Upstream-Status: Pending [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/853]
12Signed-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
18Index: 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 @@
1From 2673c2adc81a408a4238f786cb2d795a65308ce6 Mon Sep 17 00:00:00 2001
2From: Eric Guo <eric.guo@nxp.com>
3Date: Fri, 11 Apr 2025 17:15:40 +0800
4Subject: [PATCH] cl: Add mutually exclusive memory flags for
5 CL_MEM_KERNEL_READ_AND_WRITE
6
7Fix cl-api-create-buffer on mali DDK.
8
9Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/1004]
10Signed-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
15diff --git a/tests/util/piglit-util-cl-enum.c b/tests/util/piglit-util-cl-enum.c
16index 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--
412.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 @@
1PACKAGECONFIG:remove:imxgpu = "glx" 1FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
2 2
3PACKAGECONFIG:append:mx8-nxp-bsp = " opencl" 3SRC_URI += "file://0001-tests-Fix-cl-test-Include-Directories-error-Error-0-.patch \
4PACKAGECONFIG:append:mx9-nxp-bsp = " opencl" 4 file://0002-cl-Add-mutually-exclusive-memory-flags-for-CL_MEM_KE.patch"
5
6PACKAGECONFIG:append = " ${PACKAGECONFIG_APPEND}"
7PACKAGECONFIG:remove = " ${PACKAGECONFIG_REMOVE}"
8
9PACKAGECONFIG_APPEND ?= " \
10 gbm \
11 opencl \
12 ${@bb.utils.filter('DISTRO_FEATURES', 'vulkan', d)}"
13PACKAGECONFIG_APPEND:imxgpu:mx6-nxp-bsp = ""
14PACKAGECONFIG_APPEND:imxgpu:mx7-nxp-bsp = ""
15
16PACKAGECONFIG_REMOVE ?= ""
17PACKAGECONFIG_REMOVE:imxgpu = "glx"
18PACKAGECONFIG_REMOVE:imxgpu:mx6-nxp-bsp = "glx x11"
19PACKAGECONFIG_REMOVE:imxgpu:mx7-nxp-bsp = "glx x11"
20
21PACKAGECONFIG[gbm] = "-DPIGLIT_USE_GBM=1,-DPIGLIT_USE_GBM=0,virtual/libgbm"
5 22
6CFLAGS:append:imxgpu:toolchain-clang = " -Wno-error=int-conversion" 23CFLAGS:append:imxgpu:toolchain-clang = " -Wno-error=int-conversion"