On Wed, Jun 14, 2017 at 11:45:17AM +0100, Emil Velikov wrote:
> Hi Ville
> 
> On 5 June 2017 at 15:52,  <ville.syrj...@linux.intel.com> wrote:
> > From: Ville Syrjälä <ville.syrj...@linux.intel.com>
> >
> > wpos_tex used to be a GLuint so assinging -1 to it and
> > later comparing with -1 worked correctly, but commit
> > c349031c27b7 ("i915: Fix texcoord vs. varying collision in
> > fragment programs") changed wpos_tex to uint8_t and hence
> > broke the comparison. To fix this define a more explicit
> > invalid value for wpos_tex.
> >
> s/assinging/assigning/

Fixed.

> 
> > gcc warns us:
> > i915_fragprog.c:1255:57: warning: comparison is always true due to limited 
> > range of data type [-Wtype-limits]
> >     if (inputsRead & VARYING_BITS_TEX_ANY || p->wpos_tex != -1) {
> >                                                          ^
> >
> > And clang says:
> > i915_fragprog.c:1255:57: warning: comparison of constant -1 with expression 
> > of type 'uint8_t' (aka 'unsigned char') is always true 
> > [-Wtautological-constant-out-of-range-compare]
> >    if (inputsRead & VARYING_BITS_TEX_ANY || p->wpos_tex != -1) {
> >                                             ~~~~~~~~~~~ ^  ~~
> >
> > Cc: Chih-Wei Huang <cwhu...@android-x86.org>
> > Cc: Eric Anholt <e...@anholt.net>
> > Cc: Ian Romanick <ian.d.roman...@intel.com>
> > Cc: mesa-sta...@lists.freedesktop.org
> > Fixes: c349031c27b7 ("i915: Fix texcoord vs. varying collision in fragment 
> > programs")
> > Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com>
> Reviewed-by: Emil Velikov <emil.veli...@collabora.com>

Thanks. Pushed to master.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to