diff options
author | Erik Faye-Lund <[email protected]> | 2018-12-11 14:02:53 +0000 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2018-12-13 16:12:10 +0100 |
commit | e888f28d1fd9f125fc70b2f5d1b3c42d8f25ae53 (patch) | |
tree | 03f16adb9d0699f9f2ddbe3aa46a623c847a7768 /src/compiler | |
parent | 8447b64238773db0e365802315772d1819c1923f (diff) |
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 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 <[email protected]>
Fixes: 19a91841c34 "st/mesa: Use Array._DrawVAO in st_atom_array.c."
Reviewed-by: Mathias Fröhlich <[email protected]>
Tested-By: Gert Wollny <[email protected]>
Diffstat (limited to 'src/compiler')
0 files changed, 0 insertions, 0 deletions