v3dv/cmd_buffer: missing (uint8_t *) casting when calling memcmp

Caused to return early wrongly on CmdPushConstants with some tests
using several calls to that method. As we are here we are also
replacing the (void *) casting at the memcpy below.

Fixes: e1c8041cde ("v3dv: try harder to skip emission of redundant state")

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7718>
This commit is contained in:
Alejandro Piñeiro
2020-11-19 23:45:57 +01:00
parent 14ec91b131
commit ce5c23eb00
+2 -2
View File
@@ -4536,10 +4536,10 @@ v3dv_CmdPushConstants(VkCommandBuffer commandBuffer,
{
V3DV_FROM_HANDLE(v3dv_cmd_buffer, cmd_buffer, commandBuffer);
if (!memcmp(cmd_buffer->push_constants_data + offset, pValues, size))
if (!memcmp((uint8_t *) cmd_buffer->push_constants_data + offset, pValues, size))
return;
memcpy((void*) cmd_buffer->push_constants_data + offset, pValues, size);
memcpy((uint8_t *) cmd_buffer->push_constants_data + offset, pValues, size);
cmd_buffer->state.dirty |= V3DV_CMD_DIRTY_PUSH_CONSTANTS;
}