svga: fix draw elements with 8-bits indices
With commit2122b902b8
, u_index_translator can return U_TRANSLATE_MEMCPY for 8-bits indices, and in this case we need to call the translation function instead of a simple passthrough to the device. Fixes piglit spec@nv_primitive_restart tests. Fixes:2122b902b8
"gallium/indices: don't expand prim-type for 8-bit indices" Reviewed-by: Neha Bhende <bhenden@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6414>
This commit is contained in:
parent
f41848a9df
commit
fd7e1ed86d
|
@ -254,7 +254,7 @@ svga_hwtnl_draw_range_elements(struct svga_hwtnl *hwtnl,
|
|||
&gen_prim, &gen_size, &gen_nr, &gen_func);
|
||||
}
|
||||
|
||||
if (gen_type == U_TRANSLATE_MEMCPY) {
|
||||
if ((gen_type == U_TRANSLATE_MEMCPY) && (info->index_size == gen_size)) {
|
||||
/* No need for translation, just pass through to hardware:
|
||||
*/
|
||||
unsigned start_offset = info->start * info->index_size;
|
||||
|
|
Loading…
Reference in New Issue