On Mon, 2015-05-04 at 05:52 -0700, Jason Ekstrand wrote:
> 
> On May 4, 2015 4:25 AM, "Iago Toral Quiroga" <[email protected]>
> wrote:
> >
> > Return MESA_FORMAT_NONE if no matching type was found. We have an
> > assertion here, but we should return something anyway to avoid
> > confusion with non-debug builds.
> > ---
> >  src/mesa/main/glformats.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
> > index 8ced579..fddd048 100644
> > --- a/src/mesa/main/glformats.c
> > +++ b/src/mesa/main/glformats.c
> > @@ -2752,4 +2752,5 @@ _mesa_format_from_format_and_type(GLenum
> format, GLenum type)
> >      * format in that case.
> >      */
> >     unreachable("Unsupported format");
> > +   return MESA_FORMAT_NONE;
> 
> If we want this to have well-defined results, this should not be an
> unreachable().  The semantics of unreachable allow the compiler to
> generate wrong code for the case where it does get reached.  We could
> switch it to an assert or we could just drop this patch. I'd be a fan
> of the latter.
> --Jason

Ok, let's drop this patch then.

Iago

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to