zink: don't align device-local buffer memory
this can't be mapped Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11594>
This commit is contained in:
parent
93e8494007
commit
252afe405f
|
@ -493,7 +493,7 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
||||||
VkMemoryType mem_type = screen->info.mem_props.memoryTypes[mai.memoryTypeIndex];
|
VkMemoryType mem_type = screen->info.mem_props.memoryTypes[mai.memoryTypeIndex];
|
||||||
obj->coherent = mem_type.propertyFlags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
obj->coherent = mem_type.propertyFlags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
||||||
obj->host_visible = mem_type.propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
|
obj->host_visible = mem_type.propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
|
||||||
if (templ->target == PIPE_BUFFER && !obj->coherent) {
|
if (templ->target == PIPE_BUFFER && !obj->coherent && obj->host_visible) {
|
||||||
mai.allocationSize = reqs.size = align(reqs.size, screen->info.props.limits.nonCoherentAtomSize);
|
mai.allocationSize = reqs.size = align(reqs.size, screen->info.props.limits.nonCoherentAtomSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue