i965/fb: Use meta path for stencil up/downsampling
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Mon, 12 May 2014 09:42:28 +0000 (12:42 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 15 May 2014 18:39:33 +0000 (21:39 +0300)
Cc: "10.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index 2ce33992a5f9e7ea286bff312dbcf1da08e0fbb5..7e626dbbfdedf8745d2fc14faa98abf3d7de406a 100644 (file)
@@ -1652,7 +1652,7 @@ intel_miptree_updownsample(struct brw_context *brw,
                            struct intel_mipmap_tree *src,
                            struct intel_mipmap_tree *dst)
 {
-   if (brw->gen < 8 || src->format == MESA_FORMAT_S_UINT8) {
+   if (brw->gen < 8) {
       brw_blorp_blit_miptrees(brw,
                               src, 0 /* level */, 0 /* layer */,
                               dst, 0 /* level */, 0 /* layer */,
@@ -1661,11 +1661,18 @@ intel_miptree_updownsample(struct brw_context *brw,
                               0, 0,
                               dst->logical_width0, dst->logical_height0,
                               GL_NEAREST, false, false /*mirror x, y*/);
+   } else if (src->format == MESA_FORMAT_S_UINT8) {
+      brw_meta_stencil_updownsample(brw, src, dst);
    } else {
       brw_meta_updownsample(brw, src, dst);
    }
 
    if (src->stencil_mt) {
+      if (brw->gen >= 8) {
+         brw_meta_stencil_updownsample(brw, src->stencil_mt, dst);
+         return;
+      }
+
       brw_blorp_blit_miptrees(brw,
                               src->stencil_mt, 0 /* level */, 0 /* layer */,
                               dst->stencil_mt, 0 /* level */, 0 /* layer */,