i965: Use {} to initialize GENX_* structs.
[mesa.git] / src / mesa / drivers / dri / i965 / gen7_misc_state.c
index c0cb7470bf3890aa69e84ddbe664ddb94f218a2d..1a9e645084c5a8c924cc41980939c7d8ca26c0e2 100644 (file)
@@ -83,8 +83,7 @@ gen7_emit_depth_stencil_hiz(struct brw_context *brw,
       break;
    case GL_TEXTURE_3D:
       assert(mt);
-      depth = mt->surf.size > 0 ? mt->surf.logical_level0_px.depth :
-                                  MAX2(mt->logical_depth0, 1);
+      depth = mt->surf.logical_level0_px.depth;
       /* fallthrough */
    default:
       surftype = translate_tex_target(gl_target);
@@ -95,12 +94,9 @@ gen7_emit_depth_stencil_hiz(struct brw_context *brw,
 
    lod = irb ? irb->mt_level - irb->mt->first_level : 0;
 
-   if (mt && mt->surf.size > 0) {
+   if (mt) {
       width = mt->surf.logical_level0_px.width;
       height = mt->surf.logical_level0_px.height;
-   } else if (mt) {
-      width = mt->logical_width0;
-      height = mt->logical_height0;
    }
 
    /* _NEW_DEPTH, _NEW_STENCIL, _NEW_BUFFERS */