anv: Call anv_measure_submit() before anv_cmd_buffer_chain_command_buffers()

Otherwise the measurement instructions will be placed after the
MI_BATCH_BUFFER_START calling the next cmd_buffer.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26882>
This commit is contained in:
José Roberto de Souza 2024-01-05 07:42:23 -08:00 committed by Marge Bot
parent d37414d8a4
commit ad158b0bee

View file

@ -372,13 +372,17 @@ setup_execbuf_for_cmd_buffers(struct anv_execbuf *execbuf,
struct anv_device *device = queue->device;
VkResult result;
if (unlikely(device->physical->measure_device.config)) {
for (uint32_t i = 0; i < num_cmd_buffers; i++)
anv_measure_submit(cmd_buffers[i]);
}
/* Edit the tail of the command buffers to chain them all together if they
* can be.
*/
anv_cmd_buffer_chain_command_buffers(cmd_buffers, num_cmd_buffers);
for (uint32_t i = 0; i < num_cmd_buffers; i++) {
anv_measure_submit(cmd_buffers[i]);
result = setup_execbuf_for_cmd_buffer(execbuf, cmd_buffers[i]);
if (result != VK_SUCCESS)
return result;