summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2022-09-14 10:20:47 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-22 00:24:52 +0000
commit74b90ae3c226295a6ff196b71273983da3e1a70e (patch)
treead57a9b3b33a8887b6b996295f30547caf26f9b3
parentc420f450d0a2b1f26d4043334bb8b6524fea4b07 (diff)
tests: Skip trapezoids for unsupported XRender formats
xserver commit 436fd7e8b4966c305ea9c43f3c14c2ca04c35539 removed support for PictStandardA4. x11perf assumes this format always exists, so trying to run the -aa4trap* tests causes a segmentation fault when `XRenderFindStandardFormat (xp->d, PictStandardA4)` returns NULL. Since the server change was intentional, skip the tests if XRenderFindStandardFormat() returns NULL. See also: https://gitlab.freedesktop.org/xorg/xserver/-/commit/436fd7e8b4966c305ea9c43f3c14c2ca04c35539
-rw-r--r--do_traps.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/do_traps.c b/do_traps.c
index 0fd7056..0f5d168 100644
--- a/do_traps.c
+++ b/do_traps.c
@@ -165,6 +165,8 @@ InitFixedTraps(XParms xp, Parms p, int64_t reps)
break;
}
maskFormat = XRenderFindStandardFormat (xp->d, std_fmt);
+ if (!maskFormat)
+ return 0;
maskPixmap = XCreatePixmap (xp->d, xp->w, WIDTH, HEIGHT, depth);