asahi: Use the compat version of qsort_r
Not all platforms define qsort_r, util_qsort_r takes care of that.
CC: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25553>
(cherry picked from commit 4f48a140ac
)
This commit is contained in:

committed by
Eric Engestrom

parent
0104e87a08
commit
b4425db9d9
@@ -1234,7 +1234,7 @@
|
|||||||
"description": "asahi: Use the compat version of qsort_r",
|
"description": "asahi: Use the compat version of qsort_r",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 0,
|
"nomination_type": 0,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": null,
|
"because_sha": null,
|
||||||
"notes": null
|
"notes": null
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "util/u_dynarray.h"
|
#include "util/u_dynarray.h"
|
||||||
|
#include "util/u_qsort.h"
|
||||||
#include "agx_builder.h"
|
#include "agx_builder.h"
|
||||||
#include "agx_compiler.h"
|
#include "agx_compiler.h"
|
||||||
#include "agx_debug.h"
|
#include "agx_debug.h"
|
||||||
@@ -564,7 +565,7 @@ insert_copies_for_clobbered_killed(struct ra_ctx *rctx, unsigned reg,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* Sort by descending alignment so they are packed with natural alignment */
|
/* Sort by descending alignment so they are packed with natural alignment */
|
||||||
qsort_r(vars, nr_vars, sizeof(vars[0]), sort_by_size, rctx->sizes);
|
util_qsort_r(vars, nr_vars, sizeof(vars[0]), sort_by_size, rctx->sizes);
|
||||||
|
|
||||||
/* Reassign in the destination region */
|
/* Reassign in the destination region */
|
||||||
unsigned base = reg;
|
unsigned base = reg;
|
||||||
|
Reference in New Issue
Block a user