diff options
author | Jason Ekstrand <[email protected]> | 2016-08-30 18:01:27 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-09-12 19:42:57 -0700 |
commit | c70be1ead52b7a51819dc37220111bb0505610a7 (patch) | |
tree | b4bbb06cc1d558cffe9caad48a8fe3ef959a6ede | |
parent | ea1399aba07bfef728f43857643377c5842c1978 (diff) |
intel/blorp: Add a swizzle parameter to blorp_clear
While we're here, we also re-arrange the parameters to better match the
parameter order of blorp_blit.
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Topi Pohjolainen <[email protected]>
-rw-r--r-- | src/intel/blorp/blorp.h | 3 | ||||
-rw-r--r-- | src/intel/blorp/blorp_clear.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp.c | 6 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/intel/blorp/blorp.h b/src/intel/blorp/blorp.h index 72cac202162..480f1bb104f 100644 --- a/src/intel/blorp/blorp.h +++ b/src/intel/blorp/blorp.h @@ -127,9 +127,10 @@ blorp_fast_clear(struct blorp_batch *batch, void blorp_clear(struct blorp_batch *batch, 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, - enum isl_format format, union isl_color_value clear_color, + union isl_color_value clear_color, const bool color_write_disable[4]); void diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c index d16933cc6fc..a8f29fd382f 100644 --- a/src/intel/blorp/blorp_clear.c +++ b/src/intel/blorp/blorp_clear.c @@ -242,9 +242,10 @@ blorp_fast_clear(struct blorp_batch *batch, void blorp_clear(struct blorp_batch *batch, 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, - enum isl_format format, union isl_color_value clear_color, + union isl_color_value clear_color, const bool color_write_disable[4]) { struct blorp_params params; @@ -290,6 +291,7 @@ blorp_clear(struct blorp_batch *batch, while (num_layers > 0) { brw_blorp_surface_info_init(batch->blorp, ¶ms.dst, surf, level, start_layer, format, true); + params.dst.view.swizzle = swizzle; /* We may be restricted on the number of layers we can bind at any one * time. In particular, Sandy Bridge has a maximum number of layers of diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c index cc17c98d498..38938d47cc6 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.c +++ b/src/mesa/drivers/dri/i965/brw_blorp.c @@ -781,9 +781,11 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb, struct blorp_batch batch; blorp_batch_init(&brw->blorp, &batch, brw); - blorp_clear(&batch, &surf, level, irb->mt_layer, num_layers, - x0, y0, x1, y1, + blorp_clear(&batch, &surf, (enum isl_format)brw->render_target_format[format], + ISL_SWIZZLE_IDENTITY, + level, irb->mt_layer, num_layers, + x0, y0, x1, y1, clear_color, color_write_disable); blorp_batch_finish(&batch); |