[Mesa-dev] [PATCH 7/9] compiler: move the glsl_types C wrapper

Jason Ekstrand jason at jlekstrand.net
Fri Nov 27 10:33:11 PST 2015


On Nov 27, 2015 10:21 AM, "Emil Velikov" <emil.l.velikov at gmail.com> wrote:
>
> On 27 November 2015 at 18:00, Jason Ekstrand <jason at jlekstrand.net> wrote:
> >
> > On Nov 25, 2015 1:27 PM, "Emil Velikov" <emil.l.velikov at gmail.com>
wrote:
> >>
> >> From: Emil Velikov <emil.velikov at collabora.com>
> >>
> >> ... alongside its C++ brethren. On the flip side the files are called
> >> nir_types.{cpp,h} just because...
> >
> > It does do one NIR-specific thing: if you call glsl_get_length on a
matrix,
> > it gives you the number of columns.  This probably isn't a huge deal
though.
> >
> By "NIR-specific" I believe you mean "used solely by NIR" or am I
> missing something ?

I mean that GLSL IR and NIR treat matrices differently. NIR has no concept
of a matrix but rather treats them as an array of vectors.  GLSL IR treats
matrices and vectors more-or-less the same; matrices just have more than
one column. However, almost all C code that works with glsl_type is working
with NIR so this shouldn't be a problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151127/e4cdb568/attachment.html>


More information about the mesa-dev mailing list