mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-16 16:18:06 +02:00
kk: Fix emitting negative infinity
Fixes subgroup max tests, which use -INFINITY as a base when calculating the reference maximum value. Reviewed-by: Aitor Camacho <aitor@lunarg.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41186>
This commit is contained in:
parent
0bc87e47e2
commit
2cd9dd1fd7
1 changed files with 3 additions and 1 deletions
|
|
@ -746,8 +746,10 @@ emit_src_component(struct nir_to_msl_ctx *ctx, nir_src *src, unsigned comp)
|
|||
switch (type) {
|
||||
case TYPE_FLOAT: {
|
||||
double v = nir_src_comp_as_float(*src, comp);
|
||||
if (isinf(v)) {
|
||||
if (v == INFINITY) {
|
||||
P(ctx, "(INFINITY");
|
||||
} else if (v == -INFINITY) {
|
||||
P(ctx, "(-INFINITY");
|
||||
} else if (isnan(v)) {
|
||||
P(ctx, "(NAN");
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue