summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-07-21 17:18:07 -0700
committerJason Ekstrand <[email protected]>2017-07-22 08:21:27 -0700
commit20533e0da7e0423865e557d2454a63d92dfafb7b (patch)
treec58378e184b3c75f41f7579e449e3b5499c77f88
parentcf39fb06e34019c382af86160b1732e6de702358 (diff)
anv/blorp: Assert isl_surf_init success in do_buffer_copy
Reviewed-by: Topi Pohjolainen <[email protected]>
-rw-r--r--src/intel/vulkan/anv_blorp.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index 14928029d33..eca7a7e9dbc 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -554,20 +554,22 @@ do_buffer_copy(struct blorp_batch *batch,
*/
enum isl_format format = isl_format_for_size(block_size);
+ UNUSED bool ok;
struct isl_surf surf;
- isl_surf_init(&device->isl_dev, &surf,
- .dim = ISL_SURF_DIM_2D,
- .format = format,
- .width = width,
- .height = height,
- .depth = 1,
- .levels = 1,
- .array_len = 1,
- .samples = 1,
- .row_pitch = width * block_size,
- .usage = ISL_SURF_USAGE_TEXTURE_BIT |
- ISL_SURF_USAGE_RENDER_TARGET_BIT,
- .tiling_flags = ISL_TILING_LINEAR_BIT);
+ ok = isl_surf_init(&device->isl_dev, &surf,
+ .dim = ISL_SURF_DIM_2D,
+ .format = format,
+ .width = width,
+ .height = height,
+ .depth = 1,
+ .levels = 1,
+ .array_len = 1,
+ .samples = 1,
+ .row_pitch = width * block_size,
+ .usage = ISL_SURF_USAGE_TEXTURE_BIT |
+ ISL_SURF_USAGE_RENDER_TARGET_BIT,
+ .tiling_flags = ISL_TILING_LINEAR_BIT);
+ assert(ok);
struct blorp_surf src_blorp_surf = {
.surf = &surf,