diff options
author | Gwan-gyeong Mun <elongbug@gmail.com> | 2016-11-25 23:34:42 +0900 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-12-14 19:03:10 +0000 |
commit | ef08616dcbc66f6b89bdc7123ca00c565df917ed (patch) | |
tree | 54a70b31ed318a56377cb0f65faaf6fc955a1b4c /src/intel/vulkan/anv_private.h | |
parent | 6c1b7600e42030160e3d6e28d63302a390e51a27 (diff) | |
download | external_mesa3d-ef08616dcbc66f6b89bdc7123ca00c565df917ed.zip external_mesa3d-ef08616dcbc66f6b89bdc7123ca00c565df917ed.tar.gz external_mesa3d-ef08616dcbc66f6b89bdc7123ca00c565df917ed.tar.bz2 |
anv: Add missing error-checking to anv_block_pool_init (v2)
When the memfd_create() and u_vector_init() fail on anv_block_pool_init(),
this patch makes to return VK_ERROR_INITIALIZATION_FAILED.
All of initialization success on anv_block_pool_init(), it makes to return
VK_SUCCESS.
CID 1394319
v2: Fixes from Emil's review:
a) Add the return type for propagating the return value to caller.
b) Changed anv_block_pool_init() to return VK_ERROR_INITIALIZATION_FAILED
on failure of initialization.
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit ecc618b0d88e462270ffedf01502ede4c60fdad9)
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r-- | src/intel/vulkan/anv_private.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 06cdc0a..7a7564b 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -416,8 +416,8 @@ anv_state_clflush(struct anv_state state) anv_clflush_range(state.map, state.alloc_size); } -void anv_block_pool_init(struct anv_block_pool *pool, - struct anv_device *device, uint32_t block_size); +VkResult anv_block_pool_init(struct anv_block_pool *pool, + struct anv_device *device, uint32_t block_size); void anv_block_pool_finish(struct anv_block_pool *pool); int32_t anv_block_pool_alloc(struct anv_block_pool *pool); int32_t anv_block_pool_alloc_back(struct anv_block_pool *pool); |