mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-27 02:20:38 +02:00
asahi: fix garbage with query reads
no, I don't know how this worked before.
fixes
KHR-GL45.conditional_render_inverted.functional
KHR-GL46.transform_feedback_overflow_query_ARB.*
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary@mary.zone>
(cherry picked from commit 56b90a70b3)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
This commit is contained in:
parent
1137dc9321
commit
88eb8921d4
2 changed files with 3 additions and 12 deletions
|
|
@ -54,7 +54,7 @@
|
|||
"description": "asahi: fix garbage with query reads",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -397,11 +397,11 @@ agx_get_query_result(struct pipe_context *pctx, struct pipe_query *pquery,
|
|||
|
||||
switch (classify_query_type(query->type)) {
|
||||
case QUERY_COPY_BOOL32:
|
||||
vresult->b = value;
|
||||
vresult->u64 = ((uint32_t)value) != 0;
|
||||
return true;
|
||||
|
||||
case QUERY_COPY_BOOL64:
|
||||
vresult->b = value > 0;
|
||||
vresult->u64 = value != 0;
|
||||
return true;
|
||||
|
||||
case QUERY_COPY_NORMAL:
|
||||
|
|
@ -445,15 +445,6 @@ agx_get_query_result_resource_cpu(struct agx_context *ctx,
|
|||
agx_get_query_result(&ctx->base, (void *)query, true, &result);
|
||||
|
||||
assert(ready);
|
||||
|
||||
switch (classify_query_type(query->type)) {
|
||||
case QUERY_COPY_BOOL32:
|
||||
case QUERY_COPY_BOOL64:
|
||||
result.u64 = result.b;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Clamp to type, arb_query_buffer_object-qbo tests */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue