Venus: Adjust VN_CMD_ENQUEUE to set VN_COMMAND_BUFFER_STATE_INVALID

This improves the issue of a return inside the macro.

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15344>
This commit is contained in:
Igor Torrente 2022-03-14 07:55:20 -03:00 committed by Marge Bot
parent 6cdbc0299a
commit a65d2ef1c1

View file

@ -23,10 +23,10 @@
vn_command_buffer_from_handle(commandBuffer); \
size_t _cmd_size = vn_sizeof_##cmd_name(commandBuffer, ##__VA_ARGS__); \
\
if (!vn_cs_encoder_reserve(&_cmd->cs, _cmd_size)) \
return; \
\
vn_encode_##cmd_name(&_cmd->cs, 0, commandBuffer, ##__VA_ARGS__); \
if (vn_cs_encoder_reserve(&_cmd->cs, _cmd_size)) \
vn_encode_##cmd_name(&_cmd->cs, 0, commandBuffer, ##__VA_ARGS__); \
else \
_cmd->state = VN_COMMAND_BUFFER_STATE_INVALID; \
} while (0)
static bool