diff options
Diffstat (limited to 'src/intel/blorp/blorp_clear.c')
-rw-r--r-- | src/intel/blorp/blorp_clear.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c index 6999101c58e..e95f30b747d 100644 --- a/src/intel/blorp/blorp_clear.c +++ b/src/intel/blorp/blorp_clear.c @@ -334,7 +334,8 @@ get_fast_clear_rect(const struct isl_device *dev, void blorp_fast_clear(struct blorp_batch *batch, - const struct blorp_surf *surf, enum isl_format format, + const struct blorp_surf *surf, + enum isl_format format, struct isl_swizzle swizzle, uint32_t level, uint32_t start_layer, uint32_t num_layers, uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1) { @@ -360,6 +361,12 @@ blorp_fast_clear(struct blorp_batch *batch, start_layer, format, true); params.num_samples = params.dst.surf.samples; + /* If a swizzle was provided, we need to swizzle the clear color so that + * the hardware color format conversion will work properly. + */ + params.dst.clear_color = swizzle_color_value(params.dst.clear_color, + swizzle); + batch->blorp->exec(batch, ¶ms); } |