[Mesa-dev] [PATCH 6/9] i965/vec4: Use NIR remapping for VS attributes
Kenneth Graunke
kenneth at whitecape.org
Sat May 6 21:31:14 UTC 2017
On Saturday, May 6, 2017 11:13:37 AM PDT Jason Ekstrand wrote:
> On May 5, 2017 4:30:31 PM Kenneth Graunke <kenneth at whitecape.org> wrote:
>
> > On Friday, May 5, 2017 12:31:40 PM PDT Jason Ekstrand wrote:
> >> On Fri, May 5, 2017 at 12:38 AM, Alejandro PiƱeiro <apinheiro at igalia.com>
> >> wrote:
> >>
> >> > On 05/05/17 04:11, Jason Ekstrand wrote:
> >> > > We have to pass inputs_read through from prog_data because we may add an
> >> > > edge flag on old platforms.
> >> >
> >> > Well, the previous code was using nir->info->inputs_read. So perhaps
> >> > this explanation should explicitly point that prog_data->inputs_read and
> >> > nir->info->inputs_read they are not the same at that point (perhaps2,
> >> > and why?)
> >> >
> >>
> >> Sure. How about:
> >>
> >> We also change nir_lower_vs_inputs to take an explicit inputs_read bitmask
> >> and pass in the inputs_read from prog_data instead from pulling it out of
> >> NIR. This is because the version in prog_data may get EDGEFLAG added to it
> >> on some old platforms.
> >
> > Why don't you just make them the same? We're operating on a clone of
> > the nir_shader anyway, so we can whack nir->info.inputs_read however we
> > want. Then we can just copy it to the prog_data structure, and you
> > won't accidentally read the wrong one and screw up.
>
> Because we don't clone the shader_info in nir_clone. :-( I've been
> meaning to make nir_shader::info not a pointer. I guess i should just go
> do that.
Ouch. I hadn't realized that. It used to be. We definitely stomp
fields in the TCS/TES code based on what SSO-matches happen to occur,
so that's likely been broken for a while. :/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170506/14dc5e24/attachment.sig>
More information about the mesa-dev
mailing list