summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_dri2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index 5fd4d54b..f2f2c1d3 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -605,7 +605,7 @@ sna_dri2_create_buffer(DrawablePtr draw,
struct sna_dri2_private *private;
PixmapPtr pixmap;
struct kgem_bo *bo;
- unsigned bpp = format ?: draw->bitsPerPixel;
+ unsigned bpp = format ? BitsPerPixel(format) : draw->bitsPerPixel;
unsigned flags = CREATE_EXACT;
uint32_t size;