diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2017-03-28 10:21:26 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2017-03-28 12:33:29 -0700 |
commit | 44e64eec443e36e4e5a0f1c1575e49a702e6e7d4 (patch) | |
tree | 6a6494d821227d39d4b12cf20ee60676dec43cbf | |
parent | 855f6762fafcc34000474ce781c7bcb54c0bf1bb (diff) |
Skip shmblend if SHM pixmaps aren't supported
Some drivers don't support SHM pixmaps, but rendercheck doesn't care
and tries to use them anyway. This causes the test to abort:
Beginning SHM blend test from a8
X Error of failed request: BadImplementation (server does not implement operation)
Major opcode of failed request: 130 (MIT-SHM)
Minor opcode of failed request: 5 (X_ShmCreatePixmap)
Serial number of failed request: 805
Current serial number in output stream: 811
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 139 (RENDER)
Minor opcode of failed request: 4 (RenderCreatePicture)
Resource id in failed request: 0x3200215
Serial number of failed request: 806
Current serial number in output stream: 811
Fix this by skipping the shmblend tests if the extension is missing or
doesn't support pixmaps.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | t_shmblend.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/t_shmblend.c b/t_shmblend.c index 752e17a..c717f91 100644 --- a/t_shmblend.c +++ b/t_shmblend.c @@ -47,9 +47,6 @@ get_x_shm_info(Display *dpy, size_t size) { XShmSegmentInfo *shm_info = calloc(1, sizeof(*shm_info)); - if (!XShmQueryExtension(dpy)) - return NULL; - shm_info->shmid = shmget(IPC_PRIVATE, size, IPC_CREAT|0777); if (shm_info->shmid < 0) { free(shm_info); @@ -225,7 +222,16 @@ static struct rendercheck_test_result test_shmblend(Display *dpy) { struct rendercheck_test_result result = {}; - int i; + int major, minor, i; + Bool pixmaps_supported; + + if (!XShmQueryExtension(dpy) || + !XShmQueryVersion(dpy, &major, &minor, &pixmaps_supported) || + !pixmaps_supported) { + printf("SHM blend test: skipped\n"); + record_result(&result, true); + return result; + } for (i = 0; i < nformats; i++) { struct render_format *format = &formats[i]; |