Skip to content
Commit bff2986b authored by Erik Faye-Lund's avatar Erik Faye-Lund Committed by Juan A. Suarez Romero
Browse files

virgl: work around bad assumptions in virglrenderer



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 19a91841 "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: default avatarErik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 19a91841 "st/mesa: Use Array._DrawVAO in st_atom_array.c."
Reviewed-by: default avatarMathias Fröhlich <Mathias.Froehlich@web.de>
Tested-By: default avatarGert Wollny <gert.wollny@collabora.com>
(cherry picked from commit e888f28d)
parent 5efd0c35
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment