lima: support indexed draw with bias
authorIcenowy Zheng <icenowy@aosc.io>
Tue, 22 Oct 2019 14:14:56 +0000 (22:14 +0800)
committerVasily Khoruzhick <anarsoul@gmail.com>
Thu, 31 Oct 2019 21:56:45 +0000 (21:56 +0000)
commit8fa13db25163d36460d779dd4ea0ede19227cdbf
tree43157b693cf08279680072779bcc7afb25c72799
parentf60ef0fff4b99c0caf9ae4f0f17637372cf9cd7a
lima: support indexed draw with bias

When doing an indexed draw with index_bias set to a non-zero value (e.g.
by glDrawElementsBaseVertex), the vertex buffer should be offseted by
index_bias vertices.

Add this offset when setting the vertex buffer address.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
src/gallium/drivers/lima/lima_draw.c