mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
mesa: Fix stack corruption for PIPE_QUERY_TIMESTAMP
get_query_result expects a pointer to a union pipe_query_result, which is larger than GLuint64EXT, causing the memset it does to overwrite the stack. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19055>
This commit is contained in:
parent
a0c52ee827
commit
6f598fe4e3
1 changed files with 2 additions and 3 deletions
|
|
@ -321,10 +321,9 @@ get_query_result(struct pipe_context *pipe,
|
|||
if (q->Target == GL_TIME_ELAPSED &&
|
||||
q->type == PIPE_QUERY_TIMESTAMP) {
|
||||
/* Calculate the elapsed time from the two timestamp queries */
|
||||
GLuint64EXT Result0 = 0;
|
||||
assert(q->pq_begin);
|
||||
pipe->get_query_result(pipe, q->pq_begin, TRUE, (void *)&Result0);
|
||||
q->Result -= Result0;
|
||||
pipe->get_query_result(pipe, q->pq_begin, TRUE, &data);
|
||||
q->Result -= data.u64;
|
||||
} else {
|
||||
assert(!q->pq_begin);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue