Mesa (master): v3dv/cmd_buffer: missing (uint8_t *) casting when calling memcmp
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Nov 23 09:22:58 UTC 2020
Module: Mesa
Branch: master
Commit: ce5c23eb009b1453347e87099a4dfc72d4c8c793
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce5c23eb009b1453347e87099a4dfc72d4c8c793
Author: Alejandro Piñeiro <apinheiro at igalia.com>
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 <itoral at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7718>
---
src/broadcom/vulkan/v3dv_cmd_buffer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c
index e6343a01cfe..8a8727bf6da 100644
--- a/src/broadcom/vulkan/v3dv_cmd_buffer.c
+++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c
@@ -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;
}
More information about the mesa-commit
mailing list