Skip to content

Commit 6607f1e

Browse files
WhatAmISupposedToPutHereslp
authored andcommitted
x11bridge: Downgrade DRI3 to 1.3
1.4 introduced syncobj support, and we do not support those yet Signed-off-by: Sasha Finkelstein <[email protected]>
1 parent 7e2250d commit 6607f1e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

crates/muvm/src/x11bridge/bin/muvm-x11bridge.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ const X11_OPCODE_QUERY_EXTENSION: u8 = 98;
5959
const X11_OPCODE_NOP: u8 = 127;
6060
const X11_REPLY: u8 = 1;
6161
const X11_GENERIC_EVENT: u8 = 35;
62+
const DRI3_OPCODE_VERSION: u8 = 0;
6263
const DRI3_OPCODE_OPEN: u8 = 1;
6364
const DRI3_OPCODE_PIXMAP_FROM_BUFFER: u8 = 2;
6465
const DRI3_OPCODE_FENCE_FROM_FD: u8 = 4;
@@ -950,7 +951,9 @@ impl Client {
950951
self.present_qe_resp_seq = Some(self.seq_no);
951952
}
952953
} else if Some(buf[ptr]) == self.dri3_ext_opcode {
953-
if buf[ptr + 1] == DRI3_OPCODE_OPEN {
954+
if buf[ptr + 1] == DRI3_OPCODE_VERSION {
955+
buf[ptr + 8] = buf[ptr + 8].min(3);
956+
} else if buf[ptr + 1] == DRI3_OPCODE_OPEN {
954957
buf[ptr] = X11_OPCODE_NOP;
955958
let mut reply =
956959
vec![1, 1, (self.seq_no & 0xff) as u8, (self.seq_no >> 8) as u8];

0 commit comments

Comments
 (0)