[Mesa-dev] [PATCH 03/45] mesa/st: Handle 16-bit types at st_glsl_attrib_type_size

Jason Ekstrand jason at jlekstrand.net
Tue Aug 15 20:57:59 UTC 2017


On Fri, Jul 14, 2017 at 10:27 AM, Marek Olšák <maraeo at gmail.com> wrote:

> Can you move these cases to the end where the assertion is?
>

Agreed.  In general, I think it's best to let 16-bit types hit assertions
in any code paths that won't be exercised by 16bit_storage.  Assertion
failures are much easier to find than subtle bugs when someone comes
through and hooks it up for GL.

--Jason


> Thanks,
> Marek
>
> On Thu, Jul 13, 2017 at 4:35 PM, Alejandro Piñeiro <apinheiro at igalia.com>
> wrote:
> > From: Eduardo Lima Mitev <elima at igalia.com>
> >
> > Note that this doesn't mean full support on st for those types. This
> > change was done to avoid a "not handle in switch" warning.
> > ---
> >  src/mesa/state_tracker/st_glsl_types.cpp | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/src/mesa/state_tracker/st_glsl_types.cpp
> b/src/mesa/state_tracker/st_glsl_types.cpp
> > index 37c3164..02cd63d 100644
> > --- a/src/mesa/state_tracker/st_glsl_types.cpp
> > +++ b/src/mesa/state_tracker/st_glsl_types.cpp
> > @@ -38,7 +38,10 @@ st_glsl_attrib_type_size(const struct glsl_type
> *type, bool is_vs_input)
> >     switch (type->base_type) {
> >     case GLSL_TYPE_UINT:
> >     case GLSL_TYPE_INT:
> > +   case GLSL_TYPE_UINT16:
> > +   case GLSL_TYPE_INT16:
> >     case GLSL_TYPE_FLOAT:
> > +   case GLSL_TYPE_HALF_FLOAT:
> >     case GLSL_TYPE_BOOL:
> >        if (type->is_matrix()) {
> >           return type->matrix_columns;
> > --
> > 2.9.3
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170815/d677c71d/attachment.html>


More information about the mesa-dev mailing list