mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
zink: skip readback of qbos with no results
this is a no-op and also crashes Fixes:93190be1b9("zink: rewrite query internals") Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14397> (cherry picked from commitb7a4faea9b)
This commit is contained in:
parent
f36373e072
commit
48174fea16
2 changed files with 3 additions and 1 deletions
|
|
@ -5206,7 +5206,7 @@
|
|||
"description": "zink: skip readback of qbos with no results",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "93190be1b990d61df329ca0cbce9bd0fb31c7607"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -459,6 +459,8 @@ get_query_result(struct pipe_context *pctx,
|
|||
uint64_t *xfb_results = NULL;
|
||||
uint64_t *results;
|
||||
bool is_timestamp = query->type == PIPE_QUERY_TIMESTAMP || query->type == PIPE_QUERY_TIMESTAMP_DISJOINT;
|
||||
if (!qbo->num_results)
|
||||
continue;
|
||||
results = pipe_buffer_map_range(pctx, qbo->buffer, 0,
|
||||
(is_timestamp ? 1 : qbo->num_results) * result_size, flags, &xfer);
|
||||
if (!results) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue