[Mesa-dev] [PATCH] nir: Apply fragment color clamping to gl_FragData[] as well.

Eric Anholt eric at anholt.net
Thu Jul 5 19:45:19 UTC 2018

Rob Clark <robdclark at gmail.com> writes:

> On Thu, Jul 5, 2018 at 12:49 PM, Eric Anholt <eric at anholt.net> wrote:
>> 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 at gmail.com>
> *possibly* over thinking this, the comment in the gl_frag_result enum
> implies that FRAG_RESULT_DATAn come at the end of the enum (ie. if
> there was somehow ever a new value added it should come before
> FRAG_RESULT_DATA0).. maybe that comment should be less subtle to avoid
> accidentally breaking the logic below?

I think that's overthinking it.  We do these kinds of comparisons with
VARYING_SLOT_VAR too and I don't recall anyone messing it up.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180705/793e0ed6/attachment.sig>

More information about the mesa-dev mailing list