[Mesa-dev] [PATCH 01/24] intel/blorp: Assert on subresource in surface_info_init
Nanley Chery
nanleychery at gmail.com
Thu May 11 19:05:08 UTC 2017
Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
src/intel/blorp/blorp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/intel/blorp/blorp.c b/src/intel/blorp/blorp.c
index 9834275529..e972f721d0 100644
--- a/src/intel/blorp/blorp.c
+++ b/src/intel/blorp/blorp.c
@@ -66,6 +66,8 @@ brw_blorp_surface_info_init(struct blorp_context *blorp,
unsigned int level, unsigned int layer,
enum isl_format format, bool is_render_target)
{
+ assert(level < surf->surf->levels);
+
info->enabled = true;
if (format == ISL_FORMAT_UNSUPPORTED)
@@ -111,6 +113,8 @@ brw_blorp_surface_info_init(struct blorp_context *blorp,
info->view.array_len = MAX2(info->surf.logical_level0_px.depth,
info->surf.logical_level0_px.array_len);
+ assert(layer < info->view.array_len);
+
if (!is_render_target &&
(info->surf.dim == ISL_SURF_DIM_3D ||
info->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY)) {
--
2.12.2
More information about the mesa-dev
mailing list