Permalink
Browse files

dri2: CreateBuffer format may be 0, use depth in that case

  • Loading branch information...
Christoph Bumiller
Christoph Bumiller committed Jan 9, 2012
1 parent 3d9f6b3 commit b0d7f4ddd94154491d04dcb9698d63d61e9240dc
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/nouveau_dri2.c
View
@@ -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)

0 comments on commit b0d7f4d

Please sign in to comment.