summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2017-05-11 10:51:25 -0700
committerNanley Chery <[email protected]>2017-06-26 11:09:12 -0700
commit6b23c65f3ac6281576813b8fc9f9dd31833301f9 (patch)
tree4a11d5c502e40846e5d85baadd07a73f4fc882ae /src/intel
parentb46a07175823ec476505cb8a0f8c353e5183d748 (diff)
intel/blorp: Check for layer fast-clear restriction
v2: Update commit title (Jason Ekstrand) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> (v1) Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/blorp/blorp_clear.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c
index 369e18726f2..0e523dfe5b3 100644
--- a/src/intel/blorp/blorp_clear.c
+++ b/src/intel/blorp/blorp_clear.c
@@ -308,6 +308,11 @@ blorp_fast_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)
{
+ /* Ensure that all layers undergoing the clear have an auxiliary buffer. */
+ assert(start_layer + num_layers <=
+ MAX2(surf->aux_surf->logical_level0_px.depth >> level,
+ surf->aux_surf->logical_level0_px.array_len));
+
struct blorp_params params;
blorp_params_init(&params);
params.num_layers = num_layers;