diff options
author | Jason Ekstrand <[email protected]> | 2016-08-30 16:55:35 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-09-12 19:42:57 -0700 |
commit | ea1399aba07bfef728f43857643377c5842c1978 (patch) | |
tree | 15056bd8d95d8640a7fe3ccd5b86d7f1d6c6539a /src | |
parent | 9286f62f11ccd3ffd8f7d3d93b516b79d5ab36fd (diff) |
intel/blorp: Make color_write_disable const and optional
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/blorp/blorp.h | 2 | ||||
-rw-r--r-- | src/intel/blorp/blorp_clear.c | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/intel/blorp/blorp.h b/src/intel/blorp/blorp.h index 0848d45c80a..72cac202162 100644 --- a/src/intel/blorp/blorp.h +++ b/src/intel/blorp/blorp.h @@ -130,7 +130,7 @@ blorp_clear(struct blorp_batch *batch, 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, - bool color_write_disable[4]); + const bool color_write_disable[4]); void blorp_ccs_resolve(struct blorp_batch *batch, diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c index 384a4cf9877..d16933cc6fc 100644 --- a/src/intel/blorp/blorp_clear.c +++ b/src/intel/blorp/blorp_clear.c @@ -245,7 +245,7 @@ blorp_clear(struct blorp_batch *batch, 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, - bool color_write_disable[4]) + const bool color_write_disable[4]) { struct blorp_params params; blorp_params_init(¶ms); @@ -276,10 +276,12 @@ blorp_clear(struct blorp_batch *batch, /* Constant color writes ignore everyting in blend and color calculator * state. This is not documented. */ - for (unsigned i = 0; i < 4; i++) { - params.color_write_disable[i] = color_write_disable[i]; - if (color_write_disable[i]) - use_simd16_replicated_data = false; + if (color_write_disable) { + for (unsigned i = 0; i < 4; i++) { + params.color_write_disable[i] = color_write_disable[i]; + if (color_write_disable[i]) + use_simd16_replicated_data = false; + } } blorp_params_get_clear_kernel(batch->blorp, ¶ms, |