diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index 5bcae80659e..bbd575b35b8 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -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; } diff --git a/src/gallium/frontends/lavapipe/lvp_pass.c b/src/gallium/frontends/lavapipe/lvp_pass.c index 8c0606a7477..e887e6721db 100644 --- a/src/gallium/frontends/lavapipe/lvp_pass.c +++ b/src/gallium/frontends/lavapipe/lvp_pass.c @@ -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]; diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c index ed9df2f3edd..3388348df1d 100644 --- a/src/gallium/frontends/lavapipe/lvp_pipeline.c +++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c @@ -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) {