zink: use internal map flag for qbos
DONTBLOCK is sort of almost good enough except that the api frontend can also use this and it can't use the full power of Trust Me Buddy™ that qbo maps require this causes unnecessary ioctl syncs, which annihilates perf in games that constantly check query results Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31823>
This commit is contained in:

committed by
Marge Bot

parent
17ca1bfbf7
commit
fafa71b6ad
@@ -662,7 +662,7 @@ get_query_result(struct pipe_context *pctx,
|
||||
unsigned flags = PIPE_MAP_READ;
|
||||
|
||||
if (!wait)
|
||||
flags |= PIPE_MAP_DONTBLOCK;
|
||||
flags |= ZINK_MAP_QBO;
|
||||
if (query->base.flushed)
|
||||
/* this is not a context-safe operation; ensure map doesn't use slab alloc */
|
||||
flags |= PIPE_MAP_THREAD_SAFE;
|
||||
|
@@ -2362,6 +2362,8 @@ zink_buffer_map(struct pipe_context *pctx,
|
||||
/* At this point, the buffer is always idle (we checked it above). */
|
||||
usage |= PIPE_MAP_UNSYNCHRONIZED;
|
||||
}
|
||||
} else if (usage & ZINK_MAP_QBO) {
|
||||
usage |= PIPE_MAP_UNSYNCHRONIZED;
|
||||
} else if (usage & PIPE_MAP_DONTBLOCK) {
|
||||
/* sparse/device-local will always need to wait since it has to copy */
|
||||
if (!res->obj->host_visible)
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include "zink_types.h"
|
||||
|
||||
#define ZINK_MAP_TEMPORARY (PIPE_MAP_DRV_PRV << 0)
|
||||
#define ZINK_MAP_QBO (PIPE_MAP_DRV_PRV << 1)
|
||||
#define ZINK_BIND_DESCRIPTOR (1u << 27)
|
||||
#define ZINK_BIND_MUTABLE (1u << 28)
|
||||
#define ZINK_BIND_DMABUF (1u << 29)
|
||||
|
Reference in New Issue
Block a user