diff --git a/.pick_status.json b/.pick_status.json index 24d97ec0db6..39e3b024ada 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -76,7 +76,7 @@ "description": "tgsi_exec: Fix NaN behavior of saturate", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "56c30bf17b9f57efdb93ae5d1b801677535a9651" }, diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index 008d8c0f4bb..b4c6f60f888 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -1938,7 +1938,7 @@ store_dest(struct tgsi_exec_machine *mach, else { for (i = 0; i < TGSI_QUAD_SIZE; i++) if (execmask & (1 << i)) { - if (chan->f[i] < 0.0f) + if (chan->f[i] < 0.0f || isnan(chan->f[i])) dst->f[i] = 0.0f; else if (chan->f[i] > 1.0f) dst->f[i] = 1.0f; @@ -3621,7 +3621,7 @@ store_double_channel(struct tgsi_exec_machine *mach, else { for (i = 0; i < TGSI_QUAD_SIZE; i++) if (execmask & (1 << i)) { - if (chan->d[i] < 0.0) + if (chan->d[i] < 0.0 || isnan(chan->d[i])) temp.d[i] = 0.0; else if (chan->d[i] > 1.0) temp.d[i] = 1.0;