mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 08:30:10 +01:00
Revert "zink: allow direct memory mapping for any COHERENT+CACHED buffer"
This reverts commita3552048c7. on some drivers this catches qbos, which then hits the below assert. needs more investigation Fixes:a3552048c7("zink: allow direct memory mapping for any COHERENT+CACHED buffer") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20912> (cherry picked from commit07809c4527)
This commit is contained in:
parent
1b444a7574
commit
86a7567ca6
3 changed files with 2 additions and 5 deletions
|
|
@ -544,7 +544,7 @@
|
|||
"description": "Revert \"zink: allow direct memory mapping for any COHERENT+CACHED buffer\"",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "a3552048c7e7b8afebfc99caac6d555439ddf2bc"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include "zink_batch.h"
|
||||
|
||||
#define VK_VIS_VRAM (VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT)
|
||||
#define VK_STAGING_RAM (VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT)
|
||||
#define VK_LAZY_VRAM (VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1876,9 +1876,7 @@ zink_buffer_map(struct pipe_context *pctx,
|
|||
goto success;
|
||||
usage |= PIPE_MAP_UNSYNCHRONIZED;
|
||||
} else if (!(usage & PIPE_MAP_UNSYNCHRONIZED) &&
|
||||
(((usage & PIPE_MAP_READ) && !(usage & PIPE_MAP_PERSISTENT) &&
|
||||
((screen->info.mem_props.memoryTypes[res->obj->bo->base.placement].propertyFlags & VK_STAGING_RAM) != VK_STAGING_RAM)) ||
|
||||
!res->obj->host_visible)) {
|
||||
(((usage & PIPE_MAP_READ) && !(usage & PIPE_MAP_PERSISTENT) && res->base.b.usage != PIPE_USAGE_STAGING) || !res->obj->host_visible)) {
|
||||
assert(!(usage & (TC_TRANSFER_MAP_THREADED_UNSYNC | PIPE_MAP_THREAD_SAFE)));
|
||||
if (!res->obj->host_visible || !(usage & PIPE_MAP_ONCE)) {
|
||||
overwrite:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue