GitLab will be down for maintenance this Sunday 13th June, from approx 7-11am UTC. This is for a PostgreSQL migration. See the tracker issue for more informations.

Commit 19d006ee authored by Adam Jackson's avatar Adam Jackson 🎧
Browse files

dri3: Clamp to 1.0 if not all screens support 1.2


Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
parent 352a5ac8
......@@ -32,6 +32,17 @@
#include <protocol-versions.h>
#include <drm_fourcc.h>
static Bool
dri3_screen_can_one_point_two(ScreenPtr screen)
{
dri3_screen_priv_ptr dri3 = dri3_screen_priv(screen);
if (dri3 && dri3->info && dri3->info->version >= 2)
return TRUE;
return FALSE;
}
static int
proc_dri3_query_version(ClientPtr client)
{
......@@ -45,6 +56,21 @@ proc_dri3_query_version(ClientPtr client)
};
REQUEST_SIZE_MATCH(xDRI3QueryVersionReq);
for (int i = 0; i < screenInfo.numScreens; i++) {
if (!dri3_screen_can_one_point_two(screenInfo.screens[i])) {
rep.minorVersion = 0;
break;
}
}
for (int i = 0; i < screenInfo.numGPUScreens; i++) {
if (!dri3_screen_can_one_point_two(screenInfo.gpuscreens[i])) {
rep.minorVersion = 0;
break;
}
}
/* From DRI3 proto:
*
* The client sends the highest supported version to the server
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment