diff options
author | Jason Ekstrand <[email protected]> | 2017-03-21 17:16:46 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-03-22 09:44:54 -0700 |
commit | c942faf8f37d14e7934a21c15ad2438dde2d501e (patch) | |
tree | 8a24c9b969e627f9c6b00452c3147e142edc09fd | |
parent | 10d3702a3647842e66433d8b51557cba8b01e7e1 (diff) |
anv/image: Return early when unbinding an image
Found by inspection.
Reviewed-by: Chad Versace <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
Cc: "17.0 13.0" <[email protected]>
-rw-r--r-- | src/intel/vulkan/anv_image.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 7be988ab814..33499abca1a 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -335,14 +335,15 @@ VkResult anv_BindImageMemory( ANV_FROM_HANDLE(anv_device_memory, mem, _memory); ANV_FROM_HANDLE(anv_image, image, _image); - if (mem) { - image->bo = &mem->bo; - image->offset = memoryOffset; - } else { + if (mem == NULL) { image->bo = NULL; image->offset = 0; + return VK_SUCCESS; } + image->bo = &mem->bo; + image->offset = memoryOffset; + if (image->aux_surface.isl.size > 0) { /* The offset and size must be a multiple of 4K or else the |