mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
dri3: update version check to include 1.1 check
Signed-off-by: Joseph Crowell <joseph.w.crowell@gmail.com>
This commit is contained in:
committed by
Enrico Weigelt
parent
126eb37529
commit
2394c7c1cc
@@ -48,6 +48,18 @@ dri3_screen_can_one_point_four(ScreenPtr screen)
|
||||
dri3->info->import_syncobj;
|
||||
}
|
||||
|
||||
static Bool
|
||||
dri3_screen_can_one_point_one(ScreenPtr screen)
|
||||
{
|
||||
dri3_screen_priv_ptr dri3 = dri3_screen_priv(screen);
|
||||
|
||||
if (dri3 && dri3->info && dri3->info->version >= 1 &&
|
||||
dri3->info->fd_from_pixmap)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
dri3_screen_can_one_point_two(ScreenPtr screen)
|
||||
{
|
||||
@@ -75,10 +87,14 @@ proc_dri3_query_version(ClientPtr client)
|
||||
};
|
||||
|
||||
DIX_FOR_EACH_SCREEN({
|
||||
if (!dri3_screen_can_one_point_two(walkScreen)) {
|
||||
if (!dri3_screen_can_one_point_one(walkScreen)) {
|
||||
reply.minorVersion = 0;
|
||||
break;
|
||||
}
|
||||
if (!dri3_screen_can_one_point_two(walkScreen)) {
|
||||
reply.minorVersion = 1;
|
||||
break;
|
||||
}
|
||||
if (!dri3_screen_can_one_point_four(walkScreen)) {
|
||||
reply.minorVersion = 2;
|
||||
break;
|
||||
@@ -86,10 +102,14 @@ proc_dri3_query_version(ClientPtr client)
|
||||
});
|
||||
|
||||
DIX_FOR_EACH_GPU_SCREEN({
|
||||
if (!dri3_screen_can_one_point_two(walkScreen)) {
|
||||
if (!dri3_screen_can_one_point_one(walkScreen)) {
|
||||
reply.minorVersion = 0;
|
||||
break;
|
||||
}
|
||||
if (!dri3_screen_can_one_point_two(walkScreen)) {
|
||||
reply.minorVersion = 1;
|
||||
break;
|
||||
}
|
||||
if (!dri3_screen_can_one_point_four(walkScreen)) {
|
||||
reply.minorVersion = 2;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user