aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-08-10 10:44:15 -0700
committerJason Ekstrand <[email protected]>2017-09-20 17:21:06 -0700
commit64f2aabcec0358d62521f2348afa4525066d82fd (patch)
tree8483765011b62dd4cc4ba8291e50cd988f687689 /src/intel
parentf395d0abc835c16e4fcea97086183660910af000 (diff)
intel/blorp: Handle clearing compressed surfaces
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/blorp/blorp_clear.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c
index 94eba7ba783..cd83fa13caf 100644
--- a/src/intel/blorp/blorp_clear.c
+++ b/src/intel/blorp/blorp_clear.c
@@ -446,14 +446,24 @@ blorp_clear(struct blorp_batch *batch,
if (batch->blorp->isl_dev->info->gen == 4 &&
(params.dst.surf.usage & ISL_SURF_USAGE_CUBE_BIT)) {
blorp_surf_convert_to_single_slice(batch->blorp->isl_dev, &params.dst);
+ }
+
+ if (isl_format_is_compressed(params.dst.surf.format)) {
+ blorp_surf_convert_to_uncompressed(batch->blorp->isl_dev, &params.dst,
+ NULL, NULL, NULL, NULL);
+ //&dst_x, &dst_y, &dst_w, &dst_h);
+ }
- if (params.dst.tile_x_sa || params.dst.tile_y_sa) {
- /* This is gen4 so there is no multisampling and sa == px. */
- params.x0 += params.dst.tile_x_sa;
- params.y0 += params.dst.tile_y_sa;
- params.x1 += params.dst.tile_x_sa;
- params.y1 += params.dst.tile_y_sa;
- }
+ if (params.dst.tile_x_sa || params.dst.tile_y_sa) {
+ /* Either we're on gen4 where there is no multisampling or the
+ * surface is compressed which also implies no multisampling.
+ * Therefore, sa == px and we don't need to do a conversion.
+ */
+ assert(params.dst.surf.samples == 1);
+ params.x0 += params.dst.tile_x_sa;
+ params.y0 += params.dst.tile_y_sa;
+ params.x1 += params.dst.tile_x_sa;
+ params.y1 += params.dst.tile_y_sa;
}
params.num_samples = params.dst.surf.samples;