[Mesa-dev] [PATCH] nir: special hack for TGSI vs indirect inputs

Marek Olšák maraeo at gmail.com
Mon Jan 11 11:55:08 PST 2016


On Mon, Jan 11, 2016 at 8:00 PM, Rob Clark <robdclark at gmail.com> wrote:
> On Mon, Jan 11, 2016 at 1:52 PM, Marek Olšák <maraeo at gmail.com> wrote:
>> On Mon, Jan 11, 2016 at 6:07 PM, Rob Clark <robdclark at gmail.com> wrote:
>>> Quite possibly I am..  although wouldn't I still have the same issue
>>> with other state trackers?  So in that case I'd have to detect
>>> indirect access, but without ArrayID's, and still set this flag.
>>
>> Yes, PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE adds array support for
>> TGSI inputs and outputs. If ArrayID > 0, there is an array
>> declaration. If ArrayID == 0, the entire file is an array. This
>> applies to all files.(input, output, temp)
>
> The question is whether there would be any ArrayID==0 case that we
> actually care about.  I suppose wine/nine-st isn't worth caring about
> on arm (vc4/freedreno).  Unsure about other state trackers (or ARB
> shader or other cases coming from mesa-st)?

I don't think so. ARB asm programs don't support indirect addressing
on temps, inputs, and outputs. Regarding inputs and outputs,
glsl_to_tgsi automatically declares an array for anything that is an
array in GLSL even if indirect addressing is not used, so proper array
declarations are always present. I'm not sure about temporaries, but I
think glsl_to_tgsi has correctly generated temp arrays for many years
now.

You should be fine from the OpenGL side.

Marek


More information about the mesa-dev mailing list