nir: Apply fragment color clamping to gl_FragData[] as well.
authorEric Anholt <eric@anholt.net>
Tue, 3 Jul 2018 22:39:21 +0000 (15:39 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 5 Jul 2018 19:39:36 +0000 (12:39 -0700)
commit4b2ba18ff35774eb97a1931cba5bdef0bf4ccba9
tree163874653658ec77fe8f0739be91cad2d8491e68
parent03f6d26b6284cca8f9874928ed11922055247658
nir: Apply fragment color clamping to gl_FragData[] as well.

From the ARB_color_buffer_float spec:

   35. Should the clamping of fragment shader output gl_FragData[n]
       be controlled by the fragment color clamp.

       RESOLVED: Since the destination of the FragData is a color
       buffer, the fragment color clamp control should apply.

Fixes arb_color_buffer_float-mrt mixed on v3d.

Reviewed-by: Rob Clark <robdclark@gmail.com>
src/compiler/nir/nir_lower_clamp_color_outputs.c