mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-24 01:40:28 -05:00
render/vulkan: vkMapMemory stage spans up front
We always need these mapped for CPU access, so map it up front instead of duplicating lazy mapping at each site of use.
This commit is contained in:
parent
bf0246e50c
commit
bf67eb342b
3 changed files with 6 additions and 18 deletions
|
|
@ -822,13 +822,6 @@ static bool create_3d_lut_image(struct wlr_vk_renderer *renderer,
|
|||
goto fail_imageview;
|
||||
}
|
||||
|
||||
if (!span.buffer->cpu_mapping) {
|
||||
res = vkMapMemory(dev, span.buffer->memory, 0, VK_WHOLE_SIZE, 0, &span.buffer->cpu_mapping);
|
||||
if (res != VK_SUCCESS) {
|
||||
wlr_vk_error("vkMapMemory", res);
|
||||
goto fail_imageview;
|
||||
}
|
||||
}
|
||||
char *map = (char*)span.buffer->cpu_mapping + span.alloc.start;
|
||||
float *dst = (float*)map;
|
||||
size_t dim_len = lut_3d->dim_len;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue