tests: properly select renderer for DRM-backend
The test suite is dealing only with headless-backend tests. In order to make it able to run DRM-backend tests, we have to properly select the renderer that it will use. This patch add the command line option --use-pixman if the test defines the DRM-backend renderer as RENDERER_PIXMAN, and it will add nothing to the command line if it defines RENDERER_GL (the DRM-backend default renderer is already GL). Also, if the user defines the DRM-backend renderer as RENDERER_NOOP, the test will fail (as it should, since DRM-backend does not implement it). Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
committed by
Pekka Paalanen
parent
e8033e3dd1
commit
7b37b4d3d7
@@ -139,12 +139,18 @@ renderer_to_arg(enum weston_compositor_backend b, enum renderer_type r)
|
|||||||
[RENDERER_PIXMAN] = "--use-pixman",
|
[RENDERER_PIXMAN] = "--use-pixman",
|
||||||
[RENDERER_GL] = "--use-gl",
|
[RENDERER_GL] = "--use-gl",
|
||||||
};
|
};
|
||||||
|
static const char * const drm_names[] = {
|
||||||
assert(r >= 0 && r < ARRAY_LENGTH(headless_names));
|
[RENDERER_PIXMAN] = "--use-pixman",
|
||||||
|
[RENDERER_GL] = NULL,
|
||||||
|
};
|
||||||
|
|
||||||
switch (b) {
|
switch (b) {
|
||||||
case WESTON_BACKEND_HEADLESS:
|
case WESTON_BACKEND_HEADLESS:
|
||||||
|
assert(r >= RENDERER_NOOP && r <= RENDERER_GL);
|
||||||
return headless_names[r];
|
return headless_names[r];
|
||||||
|
case WESTON_BACKEND_DRM:
|
||||||
|
assert(r >= RENDERER_PIXMAN && r <= RENDERER_GL);
|
||||||
|
return drm_names[r];
|
||||||
default:
|
default:
|
||||||
assert(0 && "renderer_to_str() does not know the backend");
|
assert(0 && "renderer_to_str() does not know the backend");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user