i965/meta: Remove unused brw_get_rb_for_slice()
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 22 Dec 2016 08:09:55 +0000 (10:09 +0200)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 27 Jan 2017 06:57:25 +0000 (08:57 +0200)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Iglesias Gons<C3><A1>lvez <siglesias@igalia.com>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_meta_util.c
src/mesa/drivers/dri/i965/brw_meta_util.h

index 6d6b6923f141ffea7b3ac1aa385c575175b76ece..07a160fc4037ba5ba1181a6e16b9996ea0fe55f8 100644 (file)
@@ -266,50 +266,6 @@ brw_meta_mirror_clip_and_scissor(const struct gl_context *ctx,
    return false;
 }
 
-/**
- * Creates a new named renderbuffer that wraps the first slice
- * of an existing miptree.
- *
- * Clobbers the current renderbuffer binding (ctx->CurrentRenderbuffer).
- */
-struct gl_renderbuffer *
-brw_get_rb_for_slice(struct brw_context *brw,
-                     struct intel_mipmap_tree *mt,
-                     unsigned level, unsigned layer, bool flat)
-{
-   struct gl_context *ctx = &brw->ctx;
-   struct gl_renderbuffer *rb = ctx->Driver.NewRenderbuffer(ctx, 0xDEADBEEF);
-   struct intel_renderbuffer *irb = intel_renderbuffer(rb);
-
-   rb->RefCount = 1;
-   rb->Format = mt->format;
-   rb->_BaseFormat = _mesa_get_format_base_format(mt->format);
-
-   /* Program takes care of msaa and mip-level access manually for stencil.
-    * The surface is also treated as Y-tiled instead of as W-tiled calling for
-    * twice the width and half the height in dimensions.
-    */
-   if (flat) {
-      const unsigned halign_stencil = 8;
-
-      rb->NumSamples = 0;
-      rb->Width = ALIGN(mt->total_width, halign_stencil) * 2;
-      rb->Height = (mt->total_height / mt->physical_depth0) / 2;
-      irb->mt_level = 0;
-   } else {
-      rb->NumSamples = mt->num_samples;
-      rb->Width = mt->logical_width0;
-      rb->Height = mt->logical_height0;
-      irb->mt_level = level;
-   }
-
-   irb->mt_layer = layer;
-
-   intel_miptree_reference(&irb->mt, mt);
-
-   return rb;
-}
-
 /**
  * Determine if fast color clear supports the given clear color.
  *
index 93bc72cf258226a6766a2a71372909dad649f840..207a54b382bddede416fc99332c8b063b9857a27 100644 (file)
@@ -57,11 +57,6 @@ brw_is_color_fast_clear_compatible(struct brw_context *brw,
                                    const struct intel_mipmap_tree *mt,
                                    const union gl_color_union *color);
 
-struct gl_renderbuffer *brw_get_rb_for_slice(struct brw_context *brw,
-                                             struct intel_mipmap_tree *mt,
-                                             unsigned level, unsigned layer,
-                                             bool flat);
-
 #ifdef __cplusplus
 }
 #endif