mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
zink: fall back from cached to non-cached memory
This fixes basic rendering on top of V3DV, which doesn't seem to expose
the cached memory we expect and love.
Fixes: 598dc3dca4 ("zink: use cached memory for all resources when possible")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10230>
This commit is contained in:
parent
75cd43741a
commit
1cf6b8d461
1 changed files with 8 additions and 0 deletions
|
|
@ -187,6 +187,14 @@ get_memory_type_index(struct zink_screen *screen,
|
|||
if (idx >= 0)
|
||||
return idx;
|
||||
|
||||
if (props & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) {
|
||||
/* if no suitable cached memory can be found, fall back
|
||||
* to non-cached memory instead.
|
||||
*/
|
||||
return get_memory_type_index(screen, reqs,
|
||||
props & ~VK_MEMORY_PROPERTY_HOST_CACHED_BIT);
|
||||
}
|
||||
|
||||
unreachable("Unsupported memory-type");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue