[Mesa-dev] [PATCH v2 6/6] glsl/linker: check for xfb_offset aliasing
Ilia Mirkin
imirkin at alum.mit.edu
Wed Apr 10 12:48:02 UTC 2019
On Wed, Apr 10, 2019 at 7:31 AM Andres Gomez <agomez at igalia.com> wrote:
> On Wed, 2019-04-10 at 10:40 +1000, Timothy Arceri wrote:
> > On 13/2/19 8:57 am, Andres Gomez wrote:
> > > @@ -1764,6 +1765,8 @@ struct gl_transform_feedback_buffer
> > >
> > > uint32_t NumVaryings;
> > >
> > > + BITSET_WORD *UsedComponents;
> >
> > Please don't add new members here that are used only for compile time
> > validation. Can be try to come up with a different solution to this please?
>
> v1 was trying to do this through a nested loop to avoid adding extra
> data structures. IMO, the nested loop had a near O(N^2) behavior but
> given the possible real max amount of loops, it shouldn't have been too
> bad.
>
> However, Ilia didn't like it and suggested an array-based solution. I'm
> using here a bitmask and the max amount of components would make this
> to not use a lot of memory.
>
> I think both solutions are fine but, if I have to come up with
> something else, I'm running out of ideas ...
>
> Suggestions are welcome!
I believe the comment is that this shouldn't live in "struct
gl_transform_feedback_buffer" but rather in tfeedback_decl somewhere.
That should be easy to do, no? (I haven't gone back and looked at the
code, so perhaps not?)
-ilia
More information about the mesa-dev
mailing list