summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-11-21 12:57:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-05 12:37:02 +0000
commitf3cfd39ac6d4e19665f930a4e023d248ed5f9226 (patch)
tree494d2d0d8fd2678129d59cf78525e5a5d4dbe3be /meta/recipes-graphics
parent16ddae1172bb92bd1d8e06574e2fff6070265d78 (diff)
downloadpoky-f3cfd39ac6d4e19665f930a4e023d248ed5f9226.tar.gz
piglit: upgrade to current HEAD
(From OE-Core rev: 1785be8220d8790ffdabfbc30e58244aae6400cc) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch83
-rw-r--r--meta/recipes-graphics/piglit/piglit/format-fix.patch69
-rw-r--r--meta/recipes-graphics/piglit/piglit_git.bb5
3 files changed, 124 insertions, 33 deletions
diff --git a/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch b/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch
index f851a92ceb..57eda2e207 100644
--- a/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch
+++ b/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch
@@ -1,54 +1,75 @@
1From 0fc2c2932699cfd68be96c820fddfdd79b48b788 Mon Sep 17 00:00:00 2001 1Upstream-Status: Submitted [mailing list]
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From 0e0a2a69261031d55d52b6045990e8982ea12912 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 5From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 9 Jul 2016 07:52:19 +0000 6Date: Sat, 9 Jul 2016 07:52:19 +0000
4Subject: [PATCH] tests: Use FE_UPWARD only if its defined in fenv.h 7Subject: [PATCH] tests: only run rounding tests if FE_UPWARD is present
5
6On ARM, musl does not define FE_* when arch does not have
7VFP, (which is right interpretation), therefore check if
8its defined before using it
9 8
10Fixes errors like 9On ARM, musl does not define FE_* when the architecture does not have VFP (which
10is the right interpretation).
11 11
12tests/general/roundmode-pixelstore.c:82:19: error: 'FE_UPWARD' undeclared (first use in this function) 12As these tests depend on calling fesetround(), skip the test if FE_UPWARD isn't
13 ret = fesetround(FE_UPWARD); 13available.
14 ^~~~~~~~~
15 14
16Signed-off-by: Khem Raj <raj.khem@gmail.com> 15Signed-off-by: Ross Burton <ross.burton@intel.com>
17--- 16---
18Upstream-Status: Pending 17 tests/general/roundmode-getintegerv.c | 12 ++++++++----
19 18 tests/general/roundmode-pixelstore.c | 12 ++++++++----
20 tests/general/roundmode-getintegerv.c | 2 ++ 19 2 files changed, 16 insertions(+), 8 deletions(-)
21 tests/general/roundmode-pixelstore.c | 2 ++
22 2 files changed, 4 insertions(+)
23 20
24diff --git a/tests/general/roundmode-getintegerv.c b/tests/general/roundmode-getintegerv.c 21diff --git a/tests/general/roundmode-getintegerv.c b/tests/general/roundmode-getintegerv.c
25index 28ecfaf..5c27579 100644 22index 28ecfaf55..aa99044a1 100644
26--- a/tests/general/roundmode-getintegerv.c 23--- a/tests/general/roundmode-getintegerv.c
27+++ b/tests/general/roundmode-getintegerv.c 24+++ b/tests/general/roundmode-getintegerv.c
28@@ -81,7 +81,9 @@ piglit_init(int argc, char **argv) 25@@ -79,13 +79,17 @@ test(float val, int expect)
26 void
27 piglit_init(int argc, char **argv)
29 { 28 {
30 int ret; 29- int ret;
31 bool pass = true; 30 bool pass = true;
31- ret = fesetround(FE_UPWARD);
32- if (ret != 0) {
33- printf("Couldn't set rounding mode\n");
34+
32+#ifdef FE_UPWARD 35+#ifdef FE_UPWARD
33 ret = fesetround(FE_UPWARD); 36+ if (fesetround(FE_UPWARD) != 0) {
34+#endif 37+ printf("Setting rounding mode failed\n");
35 if (ret != 0) {
36 printf("Couldn't set rounding mode\n");
37 piglit_report_result(PIGLIT_SKIP); 38 piglit_report_result(PIGLIT_SKIP);
39 }
40+#else
41+ printf("Cannot set rounding mode\n");
42+ piglit_report_result(PIGLIT_SKIP);
43+#endif
44
45 pass = test(2.2, 2) && pass;
46 pass = test(2.8, 3) && pass;
38diff --git a/tests/general/roundmode-pixelstore.c b/tests/general/roundmode-pixelstore.c 47diff --git a/tests/general/roundmode-pixelstore.c b/tests/general/roundmode-pixelstore.c
39index 9284f43..3fcb396 100644 48index 8a029b257..57ec11c09 100644
40--- a/tests/general/roundmode-pixelstore.c 49--- a/tests/general/roundmode-pixelstore.c
41+++ b/tests/general/roundmode-pixelstore.c 50+++ b/tests/general/roundmode-pixelstore.c
42@@ -79,7 +79,9 @@ piglit_init(int argc, char **argv) 51@@ -79,13 +79,17 @@ test(float val, int expect)
52 void
53 piglit_init(int argc, char **argv)
43 { 54 {
44 int ret; 55- int ret;
45 bool pass = true; 56 bool pass = true;
57- ret = fesetround(FE_UPWARD);
58- if (ret != 0) {
59- printf("Couldn't set rounding mode\n");
60+
46+#ifdef FE_UPWARD 61+#ifdef FE_UPWARD
47 ret = fesetround(FE_UPWARD); 62+ if (fesetround(FE_UPWARD) != 0) {
48+#endif 63+ printf("Setting rounding mode failed\n");
49 if (ret != 0) {
50 printf("Couldn't set rounding mode\n");
51 piglit_report_result(PIGLIT_SKIP); 64 piglit_report_result(PIGLIT_SKIP);
65 }
66+#else
67+ printf("Cannot set rounding mode\n");
68+ piglit_report_result(PIGLIT_SKIP);
69+#endif
70
71 pass = test(2.2, 2) && pass;
72 pass = test(2.8, 3) && pass;
52-- 73--
531.8.3.1 742.11.0
54 75
diff --git a/meta/recipes-graphics/piglit/piglit/format-fix.patch b/meta/recipes-graphics/piglit/piglit/format-fix.patch
new file mode 100644
index 0000000000..73d539fef2
--- /dev/null
+++ b/meta/recipes-graphics/piglit/piglit/format-fix.patch
@@ -0,0 +1,69 @@
1Upstream-Status: Submitted [mailing list]
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From f0c6981322807e179e39ce67aeebd42cf7a54d36 Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@intel.com>
6Date: Wed, 21 Nov 2018 12:44:36 +0000
7Subject: [PATCH] arb_texture_view: fix security format warnings
8
9If built with -Werror=format-security then Piglit fails to build:
10
11/tests/spec/arb_texture_view/rendering-layers-image.c:150:8:
12error: format not a string literal and no format arguments [-Werror=format-security]
13 (desc)); \
14 ^~~~~~
15
16In this case test->uniform_type is being turned into a string using snprintf()
17and then passed to piglit_report_subtest_result() which takes a format string,
18but GCC can't verify the format.
19
20As _subtest_report() takes a format string, we can just remove the snprintf()
21and let it construct the label.
22
23Also as X is used once and doesn't make the code clearer, just inline it.
24
25Signed-off-by: Ross Burton <ross.burton@intel.com>
26---
27 tests/spec/arb_texture_view/rendering-layers-image.c | 19 ++++++-------------
28 1 file changed, 6 insertions(+), 13 deletions(-)
29
30diff --git a/tests/spec/arb_texture_view/rendering-layers-image.c b/tests/spec/arb_texture_view/rendering-layers-image.c
31index 415b01657..86148075b 100644
32--- a/tests/spec/arb_texture_view/rendering-layers-image.c
33+++ b/tests/spec/arb_texture_view/rendering-layers-image.c
34@@ -142,26 +142,19 @@ test_render_layers(const struct test_info *test)
35 return pass;
36 }
37
38-#define X(f, desc) \
39- do { \
40- const bool subtest_pass = (f); \
41- piglit_report_subtest_result(subtest_pass \
42- ? PIGLIT_PASS : PIGLIT_FAIL, \
43- (desc)); \
44- pass = pass && subtest_pass; \
45- } while (0)
46-
47 enum piglit_result
48 piglit_display(void)
49 {
50 bool pass = true;
51 for (int test_idx = 0; test_idx < ARRAY_SIZE(tests); test_idx++) {
52 const struct test_info *test = &tests[test_idx];
53- char test_name[128];
54- snprintf(test_name, sizeof(test_name), "layers rendering of %s", test->uniform_type);
55- X(test_render_layers(test), test_name);
56+
57+ const bool subtest_pass = test_render_layers(test);
58+
59+ piglit_report_subtest_result(subtest_pass ? PIGLIT_PASS : PIGLIT_FAIL,
60+ "layers rendering of %s", test->uniform_type);
61+ pass = pass && subtest_pass;
62 }
63-#undef X
64 pass = piglit_check_gl_error(GL_NO_ERROR) && pass;
65 return pass ? PIGLIT_PASS : PIGLIT_FAIL;
66 }
67--
682.11.0
69
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb
index 1f7c6f9606..622e0462b3 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -6,11 +6,12 @@ SRC_URI = "git://anongit.freedesktop.org/piglit \
6 file://0001-cmake-install-bash-completions-in-the-right-place.patch \ 6 file://0001-cmake-install-bash-completions-in-the-right-place.patch \
7 file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \ 7 file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \
8 file://0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \ 8 file://0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \
9 file://format-fix.patch \
9 " 10 "
10UPSTREAM_CHECK_COMMITS = "1" 11UPSTREAM_CHECK_COMMITS = "1"
11 12
12# From 2018-08-13 13# From 2018-10-26
13SRCREV = "57859e15dc8ba4034348b04d0b72f213b74d6347" 14SRCREV = "b9066c7717af1d169a616c9e61706b99ff8515b5"
14# (when PV goes above 1.0 remove the trailing r) 15# (when PV goes above 1.0 remove the trailing r)
15PV = "1.0+gitr${SRCPV}" 16PV = "1.0+gitr${SRCPV}"
16 17