anv/cmd_buffer: Add an assert on emit_binding_table failure
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 22 Nov 2016 16:11:45 +0000 (08:11 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 22 Nov 2016 16:50:27 +0000 (08:50 -0800)
The != VK_SUCCESS case is really only capable of handling the one error.
This assert makes things a bit safer if something else goes wrong.

Suggested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/genX_cmd_buffer.c

index 6e957b7..138ce70 100644 (file)
@@ -1514,6 +1514,7 @@ flush_compute_descriptor_set(struct anv_cmd_buffer *cmd_buffer)
 
    result = emit_binding_table(cmd_buffer, MESA_SHADER_COMPUTE, &surfaces);
    if (result != VK_SUCCESS) {
+      assert(result == VK_ERROR_OUT_OF_DEVICE_MEMORY);
       result = anv_cmd_buffer_new_binding_table_block(cmd_buffer);
       assert(result == VK_SUCCESS);