mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 15:50:17 +01:00
zink: ZINK_HEAP_HOST_VISIBLE_CACHED -> ZINK_HEAP_HOST_VISIBLE_COHERENT_CACHED
all host-visible memory in zink is expected to be coherent, and this makes that expectation more explicit Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23728>
This commit is contained in:
parent
7a169254c5
commit
c15b2491ec
4 changed files with 6 additions and 6 deletions
|
|
@ -66,7 +66,7 @@ vk_domain_from_heap(enum zink_heap heap)
|
|||
case ZINK_HEAP_HOST_VISIBLE_COHERENT:
|
||||
domains = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
||||
break;
|
||||
case ZINK_HEAP_HOST_VISIBLE_CACHED:
|
||||
case ZINK_HEAP_HOST_VISIBLE_COHERENT_CACHED:
|
||||
domains = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -88,7 +88,7 @@ zink_heap_from_domain_flags(VkMemoryPropertyFlags domains, enum zink_alloc_flag
|
|||
return ZINK_HEAP_DEVICE_LOCAL;
|
||||
|
||||
if (domains & VK_MEMORY_PROPERTY_HOST_CACHED_BIT)
|
||||
return ZINK_HEAP_HOST_VISIBLE_CACHED;
|
||||
return ZINK_HEAP_HOST_VISIBLE_COHERENT_CACHED;
|
||||
|
||||
return ZINK_HEAP_HOST_VISIBLE_COHERENT;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1224,7 +1224,7 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
|||
case ZINK_HEAP_DEVICE_LOCAL_VISIBLE:
|
||||
heap = ZINK_HEAP_DEVICE_LOCAL;
|
||||
break;
|
||||
case ZINK_HEAP_HOST_VISIBLE_CACHED:
|
||||
case ZINK_HEAP_HOST_VISIBLE_COHERENT_CACHED:
|
||||
heap = ZINK_HEAP_HOST_VISIBLE_COHERENT;
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -3058,9 +3058,9 @@ zink_internal_create_screen(const struct pipe_screen_config *config)
|
|||
/* not found: use compatible heap */
|
||||
if (screen->heap_map[i][0] == UINT8_MAX) {
|
||||
/* only cached mem has a failure case for now */
|
||||
assert(i == ZINK_HEAP_HOST_VISIBLE_CACHED || i == ZINK_HEAP_DEVICE_LOCAL_LAZY ||
|
||||
assert(i == ZINK_HEAP_HOST_VISIBLE_COHERENT_CACHED || i == ZINK_HEAP_DEVICE_LOCAL_LAZY ||
|
||||
i == ZINK_HEAP_DEVICE_LOCAL_VISIBLE);
|
||||
if (i == ZINK_HEAP_HOST_VISIBLE_CACHED) {
|
||||
if (i == ZINK_HEAP_HOST_VISIBLE_COHERENT_CACHED) {
|
||||
memcpy(screen->heap_map[i], screen->heap_map[ZINK_HEAP_HOST_VISIBLE_COHERENT], screen->heap_count[ZINK_HEAP_HOST_VISIBLE_COHERENT]);
|
||||
screen->heap_count[i] = screen->heap_count[ZINK_HEAP_HOST_VISIBLE_COHERENT];
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ enum zink_heap {
|
|||
ZINK_HEAP_DEVICE_LOCAL_LAZY,
|
||||
ZINK_HEAP_DEVICE_LOCAL_VISIBLE,
|
||||
ZINK_HEAP_HOST_VISIBLE_COHERENT,
|
||||
ZINK_HEAP_HOST_VISIBLE_CACHED,
|
||||
ZINK_HEAP_HOST_VISIBLE_COHERENT_CACHED,
|
||||
ZINK_HEAP_MAX,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue