i965/gen7: Remove stencil renderbuffer from gen7_depth_format.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 23 May 2011 18:24:43 +0000 (11:24 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 8 Jun 2011 21:31:04 +0000 (14:31 -0700)
Since Gen7 doesn't support packed depth/stencil, the stencil buffer
can't possibly be relevant for determining the depth format.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/gen7_misc_state.c

index a180b678c117b4b5dc338f2454fee49268074eba..8d5fc70f09883dcc413b72657b8c762ea9d529b7 100644 (file)
@@ -35,13 +35,10 @@ gen7_depth_format(struct brw_context *brw)
    struct gl_context *ctx = &intel->ctx;
    struct gl_framebuffer *fb = ctx->DrawBuffer;
    struct intel_renderbuffer *drb = intel_get_renderbuffer(fb, BUFFER_DEPTH);
-   struct intel_renderbuffer *srb = intel_get_renderbuffer(fb, BUFFER_STENCIL);
    struct intel_region *region = NULL;
 
    if (drb)
       region = drb->region;
-   else if (srb)
-      region = srb->region;
    else
       return BRW_DEPTHFORMAT_D32_FLOAT;