intel: Use consistent pattern in intelCreateBuffer
authorChad Versace <chad.versace@linux.intel.com>
Tue, 10 Jul 2012 00:01:29 +0000 (17:01 -0700)
committerChad Versace <chad.versace@linux.intel.com>
Wed, 1 Aug 2012 17:33:40 +0000 (10:33 -0700)
The 16-bit depth case did not follow the function's prevalent pattern.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/intel/intel_screen.c

index 31497bc5b152cec39b71241ea2eeb50993996319..90f177834f7eef05668498224846e60596e65958 100644 (file)
@@ -602,10 +602,8 @@ intelCreateBuffer(__DRIscreen * driScrnPriv,
    }
    else if (mesaVis->depthBits == 16) {
       assert(mesaVis->stencilBits == 0);
-      /* just 16-bit depth buffer, no hw stencil */
-      struct intel_renderbuffer *depthRb
-         = intel_create_private_renderbuffer(MESA_FORMAT_Z16);
-      _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base.Base);
+      rb = intel_create_private_renderbuffer(MESA_FORMAT_Z16);
+      _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &rb->Base.Base);
    }
    else {
       assert(mesaVis->depthBits == 0);