Mesa (master): intel/blorp: Check for layer fast-clear restriction

Nanley Chery nchery at kemper.freedesktop.org
Mon Jun 26 18:22:49 UTC 2017


Module: Mesa
Branch: master
Commit: 6b23c65f3ac6281576813b8fc9f9dd31833301f9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6b23c65f3ac6281576813b8fc9f9dd31833301f9

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Thu May 11 10:51:25 2017 -0700

intel/blorp: Check for layer fast-clear restriction

v2: Update commit title (Jason Ekstrand)

Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com> (v1)
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/intel/blorp/blorp_clear.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c
index 369e18726f..0e523dfe5b 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;




More information about the mesa-commit mailing list