summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-11-08 12:30:21 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-11-08 12:30:21 +0000
commitea4f99c333b181eb21012b5bee60251695e93c8b (patch)
tree462e12f3f7389d9fd49ff466a6f9efcc00c8236e /tools
parent84d667b94a97ad5fde68d730d57a19e1f4241ed5 (diff)
intel-virtual-output: Add some DBG for bad_visual()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/virtual.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/tools/virtual.c b/tools/virtual.c
index 160d6a1d..226f86d4 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -1456,15 +1456,23 @@ static int record_mouse(struct context *ctx)
static int bad_visual(Visual *visual, int depth)
{
+ DBG(("%s? depth=%d, visual: bits_per_rgb=%d, red_mask=%08x, green_mask=%08x, blue_mask=%08\n",
+ __func__, depth,
+ visual->bits_per_rgb,
+ visual->red_mask,
+ visual->green_mask,
+ visual->blue_mask));
switch (depth) {
- case 16: return (visual->bits_per_rgb != 6 ||
- visual->red_mask != 0x1f << 11 ||
- visual->green_mask != 0x3f << 5 ||
- visual->blue_mask != 0x1f << 0);
- case 24: return (visual->bits_per_rgb != 8 ||
- visual->red_mask != 0xff << 16 ||
- visual->green_mask != 0xff << 8 ||
- visual->blue_mask != 0xff << 0);
+ case 16: return (visual->bits_per_rgb != 6 ||
+ visual->red_mask != 0x1f << 11 ||
+ visual->green_mask != 0x3f << 5 ||
+ visual->blue_mask != 0x1f << 0);
+
+ case 24: return (visual->bits_per_rgb != 8 ||
+ visual->red_mask != 0xff << 16 ||
+ visual->green_mask != 0xff << 8 ||
+ visual->blue_mask != 0xff << 0);
+
default: return 0;
}
}