Skip to content
Commit efa4aee9 authored by Pierre-Eric Pelloux-Prayer's avatar Pierre-Eric Pelloux-Prayer Committed by Dylan Baker
Browse files

glsl: replace 'x + (-x)' with constant 0

This fixes a hang in shadertoy for radeonsi where a buffer was initialized with:

   value -= value

with value being undefined.
In this case LLVM replace the operation with an assignment to NaN.

Cc: 19.1 19.2 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111241


Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
(cherry picked from commit 47cc660d)
parent ec74c76a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment