[Mesa-dev] [PATCH 02/24] intel/blorp: Assert on gen7 fast-cleared subresource

Nanley Chery nanleychery at gmail.com
Thu May 11 19:05:09 UTC 2017


Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
 src/intel/blorp/blorp_clear.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c
index a9eb6b95e4..c72d3291c7 100644
--- a/src/intel/blorp/blorp_clear.c
+++ b/src/intel/blorp/blorp_clear.c
@@ -308,6 +308,10 @@ 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)
 {
+   /* Layered and mipmapped fast clear is only available from Gen8 onwards. */
+   assert(ISL_DEV_GEN(batch->blorp->isl_dev) >= 8 ||
+          (level == 0 && start_layer + num_layers == 1));
+
    struct blorp_params params;
    blorp_params_init(&params);
    params.num_layers = num_layers;
-- 
2.12.2



More information about the mesa-dev mailing list