mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 05:50:11 +01:00
asahi: fix UB in qbo's
upper bits may be uninitialized. fixes KHR-GL46.transform_feedback_overflow_query_ARB when built with gcc (passed by chance with clang). Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
This commit is contained in:
parent
a06b51559b
commit
62001e175f
1 changed files with 1 additions and 3 deletions
|
|
@ -276,11 +276,9 @@ agx_get_query_result_resource(struct pipe_context *pipe, struct pipe_query *q,
|
|||
switch (query->type) {
|
||||
case PIPE_QUERY_OCCLUSION_PREDICATE:
|
||||
case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE:
|
||||
result.u32 = result.b;
|
||||
break;
|
||||
case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
|
||||
case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
|
||||
result.u32 = (bool)(result.u32 > 0);
|
||||
result.u64 = result.b;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue