summaryrefslogtreecommitdiff
blob: a40c9a683e46e488a86119268fd72d82086db74b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 42e96f1d02ef6d842db6ba68353558a11d7d66e9 Mon Sep 17 00:00:00 2001
From: Tomas Carnecky <tom@dbservice.com>
Date: Sun, 15 Jun 2008 14:27:16 +0200
Subject: [PATCH] Reorder visuals reported by the intel driver

The root window visual can not be changed. Neither at runtime nor
through the configuration file. The xserver simply selects the first one
that matches the class (usually TrueColor). I need a root window visual
with stencil buffer because my compiz plugin uses the it for some
operations. This patch reorders the visuals that the 3D driver reports
and puts the one with stencil (and depth) bits as first.
(cherry picked from commit 42fb06f3f14fbec070350cf48361be4a0be0af04)

diff --git a/src/i830_dri.c b/src/i830_dri.c
index 4361ad0..6bc4957 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -386,7 +386,7 @@ I830InitVisualConfigs(ScreenPtr pScreen)
 
       i = 0;
       for (accum = 0; accum <= 1; accum++) {
-	 for (depth = 0; depth <= 1; depth++) {	/* and stencil */
+	 for (depth = 1; depth >= 0; depth--) {	/* and stencil */
 	    for (db = 1; db >= 0; db--) {
 	       pConfigs[i].vid = -1;
 	       pConfigs[i].class = -1;
-- 
1.5.6.4