i965: Remove special case for layered drawbuffer attachments.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 25 Jun 2015 17:08:06 +0000 (10:08 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 11 Jul 2015 02:14:41 +0000 (19:14 -0700)
When binding a layered texture, the layer is already 0.  There's no need
to special case this.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/gen6_surface_state.c

index 03e913a0a7682b974184d031f074e88772216ffd..39de62f2304b12d94176d32a93caedd6a6e74884 100644 (file)
@@ -88,7 +88,8 @@ gen6_update_renderbuffer_surface(struct brw_context *brw,
       break;
    }
 
-   const int min_array_element = layered ? 0 : irb->mt_layer;
+   const int min_array_element = irb->mt_layer;
+   assert(!layered || irb->mt_layer == 0);
 
    surf[0] = SET_FIELD(surftype, BRW_SURFACE_TYPE) |
              SET_FIELD(format, BRW_SURFACE_FORMAT);