intel/blorp: Fix rectangle size for level-not-zero resolves
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Tue, 22 Nov 2016 10:15:07 +0000 (12:15 +0200)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Wed, 23 Nov 2016 09:06:52 +0000 (11:06 +0200)
Needed to prevent gpu hangs when mip-mapped compression gets
enabled.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/blorp/blorp_clear.c

index 83ec57e556c38de7ee9e27c96b8fd50db89c5103..d09040872145eefe3714e269f9b2ccc292835ea5 100644 (file)
@@ -581,8 +581,8 @@ blorp_ccs_resolve(struct blorp_batch *batch,
       y_scaledown = aux_fmtl->bh / 2;
    }
    params.x0 = params.y0 = 0;
-   params.x1 = params.dst.aux_surf.logical_level0_px.width;
-   params.y1 = params.dst.aux_surf.logical_level0_px.height;
+   params.x1 = minify(params.dst.aux_surf.logical_level0_px.width, level);
+   params.y1 = minify(params.dst.aux_surf.logical_level0_px.height, level);
    params.x1 = ALIGN(params.x1, x_scaledown) / x_scaledown;
    params.y1 = ALIGN(params.y1, y_scaledown) / y_scaledown;