[Mesa-dev] [PATCH] nir/validate: Allow subroutine types for the tails of derefs

Jason Ekstrand jason at jlekstrand.net
Thu Nov 12 22:04:25 PST 2015


On Thu, Nov 12, 2015 at 9:57 PM, Connor Abbott <cwabbott0 at gmail.com> wrote:
> On Thu, Nov 12, 2015 at 9:36 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
>> bump!  Where are we at on this?
>
> Go ahead and push it with my r-b. I still think
> glsl_type::is_vector_or_scalar() should return true for subroutine
> types, but that might require some more fixing and testing.

Yeah, I'll push it so we can get rid of the bug.  I think what we
really want to do is to make the subroutine lowering pass change it to
a sane type for us.
--Jason

>>
>> On Tue, Nov 10, 2015 at 6:16 PM, Dave Airlie <airlied at gmail.com> wrote:
>>>>>
>>>>> Well, it's not just a NIR thing  --  GLSL IR also effectively treats
>>>>> subroutines as integers. Actually, I wonder why the
>>>>> glsl_type::is_vector_or_scalar() doesn't return true for subroutine
>>>>> types in the first place.
>>>>
>>>> For that matter, why do we have a special subroutine type at all?  Why
>>>> doesn't the GLSL lowering pass create regular uint uniforms?  I don't
>>>> know.
>>>
>>> I'm not sure what reasoning I had at the time.
>>>
>>> It is probably something to do with how Mesa and GLSL IR are tied togetther for
>>> uniforms and requiring an extra type for it to make sense at the API level.
>>>
>>> Dave.


More information about the mesa-dev mailing list