i965/gen8 renderbuffer: Set depth size based on LOD0 for 3D textures
authorJordan Justen <jordan.l.justen@intel.com>
Sat, 10 May 2014 21:48:47 +0000 (14:48 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Tue, 13 May 2014 21:25:58 +0000 (14:25 -0700)
Fixes piglit's
'gl-3.2-layered-rendering-clear-color-all-types 3d mipmapped'

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/gen8_surface_state.c

index 27a1ff090ccd1733fe333b51970523e424a8e92f..d564449a7cf5859de86b451ce7a24dba0d27a196 100644 (file)
@@ -313,7 +313,7 @@ gen8_update_renderbuffer_surface(struct brw_context *brw,
       depth *= 6;
       break;
    case GL_TEXTURE_3D:
-      depth = MAX2(rb->Depth, 1);
+      depth = MAX2(irb->mt->logical_depth0, 1);
       /* fallthrough */
    default:
       surf_type = translate_tex_target(gl_target);