radv: consider allocated command buffers in the initial state.
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 3 Nov 2022 16:16:38 +0000 (17:16 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 7 Nov 2022 11:02:36 +0000 (12:02 +0100)
commit0bf06400beab88d4659b87f5ec6c3a9dc4d4db58
treeb2a2e1a42e05d77728132024d3a5f3600de2d6f2
parent9b55f1c12bf0c77ca370b7517a4e4cd316b34e47
radv: consider allocated command buffers in the initial state.

The Vulkan spec says:
    "When a command buffer is allocated, it is in the initial state.
     Some commands are able to reset a command buffer (or a set of
     command buffers) back to this state from any of the executable,
     recording or invalid state. Command buffers in the initial state
     can only be moved to the recording state, or freed."

Because the status wasn't initialized, it was implicitly set to
RADV_CMD_BUFFER_STATUS_INVALID and that triggered a reset for newly
allocated command buffers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19506>
src/amd/vulkan/radv_cmd_buffer.c