Skip to content

Commit

Permalink
x11bridge: Downgrade DRI3 to 1.3
Browse files Browse the repository at this point in the history
1.4 introduced syncobj support, and we do not support those yet

Signed-off-by: Sasha Finkelstein <[email protected]>
  • Loading branch information
WhatAmISupposedToPutHere committed Nov 5, 2024
1 parent 7e2250d commit 37e0868
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/muvm/src/x11bridge/bin/muvm-x11bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const X11_OPCODE_QUERY_EXTENSION: u8 = 98;
const X11_OPCODE_NOP: u8 = 127;
const X11_REPLY: u8 = 1;
const X11_GENERIC_EVENT: u8 = 35;
const DRI3_OPCODE_VERSION: u8 = 0;
const DRI3_OPCODE_OPEN: u8 = 1;
const DRI3_OPCODE_PIXMAP_FROM_BUFFER: u8 = 2;
const DRI3_OPCODE_FENCE_FROM_FD: u8 = 4;
Expand Down Expand Up @@ -950,7 +951,9 @@ impl Client {
self.present_qe_resp_seq = Some(self.seq_no);
}
} else if Some(buf[ptr]) == self.dri3_ext_opcode {
if buf[ptr + 1] == DRI3_OPCODE_OPEN {
if buf[ptr + 1] == DRI3_OPCODE_VERSION {
buf[ptr + 8] = buf[ptr + 8].min(3);
} else if buf[ptr + 1] == DRI3_OPCODE_OPEN {
buf[ptr] = X11_OPCODE_NOP;
let mut reply =
vec![1, 1, (self.seq_no & 0xff) as u8, (self.seq_no >> 8) as u8];
Expand Down

0 comments on commit 37e0868

Please sign in to comment.