zink: force threadsafe mapping for query results when necessary
this would otherwise use the ctx-based slab allocator, which races and crashes Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12015>
This commit is contained in:
parent
d972326c45
commit
7d0fe5863f
|
@ -432,6 +432,9 @@ get_query_result(struct pipe_context *pctx,
|
|||
|
||||
if (!wait)
|
||||
flags |= PIPE_MAP_DONTBLOCK;
|
||||
if (query->base.flushed)
|
||||
/* this is not a context-safe operation; ensure map doesn't use slab alloc */
|
||||
flags |= PIPE_MAP_THREAD_SAFE | PIPE_MAP_UNSYNCHRONIZED;
|
||||
|
||||
util_query_clear_result(result, query->type);
|
||||
|
||||
|
|
Loading…
Reference in New Issue