We ended up applying the offset twice. Quite embarrassing.
This fixes a bunch of vertex shader related issues like the gnome desktop
is less broken and probably a lot of other applications.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5061
Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12054>
if (!info->has_user_indices)
data = nouveau_resource_map_offset(&nv30->base,
nv04_resource(info->index.resource),
- start * index_size, NOUVEAU_BO_RD);
+ 0, NOUVEAU_BO_RD);
else
- data = (char*)info->index.user + start * index_size;
+ data = info->index.user;
if (!data)
return;