Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x11bridge: Downgrade DRI3 to 1.3 #103

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading