Module: Mesa Branch: staging/20.3 Commit: 8464a6e3d7bf37f496718e375b535eab8ff3eb53 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8464a6e3d7bf37f496718e375b535eab8ff3eb53
Author: Alejandro PiƱeiro <[email protected]> Date: Thu Nov 19 23:45:57 2020 +0100 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: e1c8041cde64 ("v3dv: try harder to skip emission of redundant state") Reviewed-by: Iago Toral Quiroga <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7718> (cherry picked from commit ce5c23eb009b1453347e87099a4dfc72d4c8c793) --- .pick_status.json | 2 +- src/broadcom/vulkan/v3dv_cmd_buffer.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 59096b26c8e..c62c3a1c840 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -103,7 +103,7 @@ "description": "v3dv/cmd_buffer: missing (uint8_t *) casting when calling memcmp", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "e1c8041cde64ff72dab504ee0e31c2b5224145d6" }, diff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c index 1f12c73bab5..aee1fad1328 100644 --- a/src/broadcom/vulkan/v3dv_cmd_buffer.c +++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c @@ -4732,10 +4732,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; } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
