Mesa (master): 25 new commits
Iago Toral Quiroga
itoral at kemper.freedesktop.org
Thu Mar 16 10:53:36 UTC 2017
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ca34a3125f671a63b390e19a2c170c0380a228d7
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Thu Mar 9 14:37:26 2017 +0100
anv: improve error reporting when creating pipelines
Specifically, report 'out of memory' errors that might have happened while
emitting the pipeline's batch.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1d7468311d99c2da666fa98514592edf923dd195
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Thu Mar 9 11:34:22 2017 +0100
anv: handle errors in emit_binding_table() and emit_samplers()
These can fail to allocate device memory, however, the driver can recover
from this error by allocating a new binding table block and trying again.
v2:
- Instead of tracking the errors in these functions and making callers
reset the batch's status before attempting to allocate a new block
for the binding table, simply make callers responsible for setting
the error status if they fail to allocate memory during the second
attempt (Jason).
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dd8348c8be013c40bf1f1838be2dfa5e654bc372
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Mon Mar 6 12:28:44 2017 +0100
anv: handle errors while allocating new binding table blocks
Also, we had a couple of instances in flush_descriptor_sets() were
we were returning a VkResult directly upon error, but the return
value of this function is not a VkResult but a uint32_t dirty mask,
so simply return 0 in these cases which reduces the amount of
work the driver will do after the error has been raised.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=be52f9693acb6055f62548e838348c584bbd08d7
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Thu Mar 9 11:49:01 2017 +0100
anv/blorp: make anv_cmd_buffer_alloc_blorp_binding_table() return a VkResult
Instead of asserting inside the function, and then use use that information
to return early from its callers upon failure.
v2:
- Make sure that clear_color_attachment() and
clear_depth_stencil_attachment() get the VkResult as well so they
avoid executing the batch if an error happened. (Topi)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a578b06d7bd6d1bb075bc9b8b04af97118bee18f
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Thu Mar 9 10:44:13 2017 +0100
anv/device: assert that commands submitted to a queue are not bogus
Any errors that may have happened during the command buffer recording are
reported by vkEndCommandBuffer() and it is the application's reponsibility
to not submit broken commands to a queue.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a752c4ecdaa2084a4335993947512cd0eaa79046
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Mon Mar 6 12:16:05 2017 +0100
anv/cmd_buffer: skip vkCmdExecuteCommands() on broken command buffers
v2: Assert on secondary commands, applications should've called
vkEndCommandBuffer() and received an error for them before (Jason)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=801493051e8593971ebdea52c78e21e694aa246b
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Mon Mar 6 12:15:06 2017 +0100
anv/cmd_buffer: skip vkCmdDispatch() on broken command buffers
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=18ec3fa2a996de8fcdbe3fbad717d8ba0b2e95f9
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Mon Mar 6 11:12:31 2017 +0100
anv/cmd_buffer: skip vkCmdDraw*() on broken command buffers
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fb9d563fb9b6e63a79dc4b8aa1faee58faec4f5a
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Mon Mar 6 12:04:19 2017 +0100
anv: handle memory allocation errors during queue submissions
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c04dbd6b3e8b13fbf89338c79bccf4c06e6ff5aa
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Fri Mar 3 11:31:14 2017 +0100
anv/cmd_buffer: handle out of memory during vkCmdPushConstants
Fixes:
dEQP-VK.api.out_of_host_memory.cmd_push_constants
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=94a4f0c255b5f12a42928fd9ee49f07e14c1f860
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Wed Mar 8 13:19:57 2017 +0100
anv/cmd_buffer: handle allocation errors during vkCmdBeginRenderPass()
Fixes:
dEQP-VK.api.out_of_host_memory.cmd_begin_render_pass
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d823f381a5bdac721ca7ce142ed8aeb55fc2bc0c
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Wed Mar 8 13:18:52 2017 +0100
anv/cmd_buffer: skip vkCmdEndRenderPass() for broken command buffers
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6743456699224e05fbc95df6748b7ff8dff19ffd
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Wed Mar 8 13:18:12 2017 +0100
anv/cmd_buffer: skip vkCmdNextSubpass() for broken command buffers
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8174e638690fc00caff739655b2d723ed0641472
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Wed Mar 8 13:16:16 2017 +0100
anv/cmd_buffer: report tracked errors in vkEndCommandBuffer()
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=68d88f0237cbd743db83c8ad3e313251ab8fcff8
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Fri Mar 3 10:55:19 2017 +0100
anv: handle failures when growing reloc lists
Growing the reloc list happens through calling anv_reloc_list_add() or
anv_reloc_list_append(). Make sure that we call these through helpers
that check the result and set the batch error status if needed.
v2:
- Handling the crashes is not good enough, we need to keep track of
the error, for that, keep track of the errors in the batch instead (Jason).
- Make reloc list growth go through helpers so we can have a central
place where we can do error tracking (Jason).
v3:
- Callers that need the offset returned by anv_reloc_list_add() can
compute it themselves since it is extracted from the inputs to the
function, so change the function to return a VkResult, make
anv_batch_emit_reloc() also return a VkResult and let their callers
do the error management (Topi)
v4:
- Let anv_batch_emit_reloc() return an uint64_t as it originally did,
there is no real benefit in having it return a VkResult.
- Do not add an is_aux parameter to add_surface_state_reloc(), instead
do error checking for aux in add_image_view_relocs() separately.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d4bdd871dc295610de776d235e58ce8c5eadfded
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Thu Mar 9 14:22:25 2017 +0100
anv: avoid crashes when failing to allocate batches
Most of the time we use macros that handle this situation transparently,
but there are some cases were we need to handle this explicitly.
This patch makes sure we don't crash, notice that error handling takes
place in the function that actually failed the allocation,
anv_batch_emit_dwords(), which will set the status field of the batch
so it can be used at a later moment to report the error to the user.
v2:
- Not crashing is not good enough, we need to keep track of the error
(Topi, Jason). Iago: now that we track errors in the batch, this
is being handled.
- Added guards in a few more places that needed it (Iago)
v3:
- Check result of anv_batch_emitn() for NULL before calling memset()
in emit_vertex_input() (Topi)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=31f5049ff1c851d1b8652c7cb42740a6a7db58de
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Fri Mar 3 10:56:33 2017 +0100
anv: handle allocation failure in anv_batch_emit_dwords()
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e69409fcf16d8af58e2ba732e3cd78240a65317
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Fri Mar 3 11:17:03 2017 +0100
anv: handle allocation failure in anv_batch_emit_batch()
v2:
- Call the error handler (Topi)
Fixes:
dEQP-VK.api.out_of_host_memory.cmd_execute_commands
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a8ce8e35420e57b6921dfce8462a7caa512b797a
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Wed Mar 8 12:59:58 2017 +0100
anv: add anv_batch_set_error() and anv_batch_has_error() helpers
The anv_batch_set_error() helper will track the first error that happened
while recording a command buffer. The helper returns the currently tracked
error to help the job of internal functions that may generate errors that
need to be tracked and return a VkResult to the caller.
We will use the anv_batch_has_error() helper to guard parts of the driver
that are not safe to execute if an error has been generated while recording
a particular command buffer.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0195bd0678b7ebfa740386c781e981ded8d788d
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Wed Mar 8 12:45:37 2017 +0100
anv/cmd_buffer: add a status field to anv_batch
The vkCmd*() functions do not report errors, instead, any errors should be
reported by the time we call vkEndCommandBuffer(). This means that we
need to make the driver robust against incosistent and/or imcomplete
command buffer states through the command recording process, particularly,
avoid crashes due to access to memory that we failed to allocate previously.
The strategy used to do this is to track the first error ocurred while
recording a command buffer in the batch associated with it. We use the
batch to track this information because the command buffer may not be
visible to all parts of the driver that can produce errors we need to be
aware of (such as allocation failures during batch emissions).
Later patches will use this error information to guard parts of the driver
that may not be safe to execute.
v2: Move the field from the command buffer to the batch so we can track
errors from batch emissions (Jason)
v3: Registering errors in the command buffer's batch during
anv_create_cmd_buffer() is unnecessary, since the command buffer
is freed at the end of the function in that case (Topi)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6dd06f54eb98135f46de7c536b5fb6a539dc82fd
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Mon Mar 6 13:27:11 2017 +0100
anv/cmd_buffer: report errors in vkBeginCommandBuffer()
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=88b539c4a03e3d680c297b60cc7a58a9e05fa0d6
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Fri Mar 3 10:57:17 2017 +0100
anv: do not try to ref/unref NULL shaders
This situation can happen if we failed to allocate memory for the shader.
v2:
- We shouldn't see NULL shaders in anv_shader_bin_ref so we should not check
for that (Jason). Make sure that callers don't attempt to call this
function with a NULL shader and assert that this never happens (Iago).
v3:
- All callers to anv_shader_bin_unref seem to check for NULL before calling,
so just assert that it is not NULL (Topi)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bad3a2e91183aeb50d86b3d8929d0a270f094dfb
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Fri Mar 3 10:58:23 2017 +0100
anv/blorp: return early if we failed to create the shader binary
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e2f707ce5b569e40c2a3821149f87659553467f9
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Tue Mar 14 13:12:22 2017 +0100
intel/blorp: make upload_shader() return a bool indicating success or failure
For now we always return true, follow-up patches will handle fail scenarios.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=808503b8f8c0732fccd875ed9183a56672430097
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Thu Mar 9 09:07:39 2017 +0100
anv: remove unnecessary function prototype.
The function is defined right after the prototype declaration. Also, the
protoype for it is included in anv_genX.h which is included via anv_private.h.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
More information about the mesa-commit
mailing list