summaryrefslogtreecommitdiff
path: root/src/nouveau_dri2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nouveau_dri2.c')
-rw-r--r--src/nouveau_dri2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index 979216d..3aa5ec5 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -49,8 +49,8 @@ nouveau_dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment,
int bpp;
unsigned int usage_hint = NOUVEAU_CREATE_PIXMAP_TILED;
- /* 'format' is just depth */
- bpp = round_up_pow2(format);
+ /* 'format' is just depth (or 0, or maybe it depends on the caller) */
+ bpp = round_up_pow2(format ? format : pDraw->depth);
if (attachment == DRI2BufferDepth ||
attachment == DRI2BufferDepthStencil)