[Mesa-dev] [PATCH 4/4] virgl: work around bad assumptions in virglrenderer

Juan A. Suarez Romero jasuarez at igalia.com
Fri Dec 14 11:33:46 UTC 2018


On Tue, 2018-12-11 at 15:29 +0100, Erik Faye-Lund wrote:
> On Tue, 2018-12-11 at 15:26 +0100, Erik Faye-Lund wrote:
> > Virglrenderer does the wrong thing when given an instance divisor;
> > it tries to use the element-index rather than the binding-index as
> > the argument to glVertexBindingDivisor(). This worked fine as long
> > as there was a 1:1 relationship between elements and bindings,
> > which was the case util 19a91841c34 "st/mesa: Use Array._DrawVAO in
> > st_atom_array.c.".
> > 
> > So let's detect instance divisors, and restore a 1:1 relationship in
> > that case. This will make old versions of virglrenderer behave
> > correctly. For newer versions, we can consider making a better
> > interface, where the instance divisor isn't specified per element,
> > but rather per binding. But let's save that for another day.
> > 
> > Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
> 
> I suppose this should have had:
> 
> Fixes: 19a91841c34 "st/mesa: Use Array._DrawVAO in st_atom_array.c."
> 

As 19a91841c34 "st/mesa: Use Array._DrawVAO in st_atom_array.c." is included in
18.2 stable branch, this patch 4/4 is also a candidate to be included.

Nevertheless, in order to apply it cleanly, I also need to apply patch 3/4,
8447b642387 ("virgl: wrap vertex element state in a struct").


I've applied both of them. If you prefer not apply any of them, just let me
know.

Thanks.

	J.A.
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list