lavapipe: fix some void ptr arithmetic
msvc disagrees with it, and they are trivial to fix. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120>
This commit is contained in:
@@ -1096,7 +1096,7 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_MapMemory(
|
||||
|
||||
map = device->pscreen->map_memory(device->pscreen, mem->pmem);
|
||||
|
||||
*ppData = map + offset;
|
||||
*ppData = (char *)map + offset;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -174,7 +174,7 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateRenderPass(
|
||||
VK_OBJECT_TYPE_RENDER_PASS);
|
||||
pass->attachment_count = pCreateInfo->attachmentCount;
|
||||
pass->subpass_count = pCreateInfo->subpassCount;
|
||||
pass->attachments = (void *) pass + attachments_offset;
|
||||
pass->attachments = (struct lvp_render_pass_attachment *)((char *)pass + attachments_offset);
|
||||
|
||||
for (uint32_t i = 0; i < pCreateInfo->attachmentCount; i++) {
|
||||
struct lvp_render_pass_attachment *att = &pass->attachments[i];
|
||||
|
@@ -467,9 +467,9 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline,
|
||||
for (uint32_t i = 0; i < num_spec_entries; i++) {
|
||||
VkSpecializationMapEntry entry = spec_info->pMapEntries[i];
|
||||
const void *data =
|
||||
spec_info->pData + entry.offset;
|
||||
assert((const void *)(data + entry.size) <=
|
||||
spec_info->pData + spec_info->dataSize);
|
||||
(char *)spec_info->pData + entry.offset;
|
||||
assert((const char *)((char *)data + entry.size) <=
|
||||
(char *)spec_info->pData + spec_info->dataSize);
|
||||
|
||||
spec_entries[i].id = entry.constantID;
|
||||
switch (entry.size) {
|
||||
|
Reference in New Issue
Block a user