diff options
author | Kenneth Graunke <[email protected]> | 2018-04-24 23:38:10 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:06 -0800 |
commit | eb12cc70f02710268433e75d264f37bde6b48fd3 (patch) | |
tree | e9c5a0e9fff6ec9c565c6202e6fd83db9acae743 /src | |
parent | a4a426008b7431a6003d60c7dfc6c1262888736a (diff) |
iris: assert surf init
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/iris/iris_resource.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 2268f5e3b8c..172ebbcaeb8 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -242,19 +242,21 @@ iris_resource_create_with_modifiers(struct pipe_screen *pscreen, if (templ->target == PIPE_TEXTURE_CUBE) usage |= ISL_SURF_USAGE_CUBE_BIT; - isl_surf_init(&screen->isl_dev, &res->surf, - .dim = target_to_isl_surf_dim(templ->target), - .format = iris_isl_format_for_pipe_format(templ->format), - .width = templ->width0, - .height = templ->height0, - .depth = templ->depth0, - .levels = templ->last_level + 1, - .array_len = templ->array_size, - .samples = MAX2(templ->nr_samples, 1), - .min_alignment_B = 0, - .row_pitch_B = 0, - .usage = usage, - .tiling_flags = 1 << mod_info->tiling); + UNUSED const bool isl_surf_created_successfully = + isl_surf_init(&screen->isl_dev, &res->surf, + .dim = target_to_isl_surf_dim(templ->target), + .format = iris_isl_format_for_pipe_format(templ->format), + .width = templ->width0, + .height = templ->height0, + .depth = templ->depth0, + .levels = templ->last_level + 1, + .array_len = templ->array_size, + .samples = MAX2(templ->nr_samples, 1), + .min_alignment_B = 0, + .row_pitch_B = 0, + .usage = usage, + .tiling_flags = 1 << mod_info->tiling); + assert(isl_surf_created_successfully); enum iris_memory_zone memzone = IRIS_MEMZONE_OTHER; const char *name = templ->target == PIPE_BUFFER ? "buffer" : "miptree"; |