aux/indices: include provoking vertex check in prim type conversion
Include provoking vertex checking in u_index_prim_type_convert() to make sure
the right primitive type is returned from the generator function.
Fixes google earth running on VMware svga device on hw version 11.
Fixes: cad2026b72 ("aux/indices: break out primitive type conversion to separate function")
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11367>
This commit is contained in:
@@ -60,9 +60,9 @@ static void translate_byte_to_ushort( const void *in,
|
||||
}
|
||||
|
||||
enum pipe_prim_type
|
||||
u_index_prim_type_convert(unsigned hw_mask, enum pipe_prim_type prim)
|
||||
u_index_prim_type_convert(unsigned hw_mask, enum pipe_prim_type prim, bool pv_matches)
|
||||
{
|
||||
if (hw_mask & (1<<prim))
|
||||
if ((hw_mask & (1<<prim)) && pv_matches)
|
||||
return prim;
|
||||
|
||||
switch (prim) {
|
||||
@@ -159,7 +159,7 @@ u_index_translator(unsigned hw_mask,
|
||||
return U_TRANSLATE_MEMCPY;
|
||||
}
|
||||
*out_translate = translate[in_idx][out_idx][in_pv][out_pv][prim_restart][prim];
|
||||
*out_prim = u_index_prim_type_convert(hw_mask, prim);
|
||||
*out_prim = u_index_prim_type_convert(hw_mask, prim, in_pv == out_pv);
|
||||
*out_nr = u_index_count_converted_indices(hw_mask, in_pv == out_pv, prim, nr);
|
||||
|
||||
return ret;
|
||||
@@ -248,7 +248,7 @@ u_index_generator(unsigned hw_mask,
|
||||
|
||||
*out_index_size = ((start + nr) > 0xfffe) ? 4 : 2;
|
||||
out_idx = out_size_idx(*out_index_size);
|
||||
*out_prim = u_index_prim_type_convert(hw_mask, prim);
|
||||
*out_prim = u_index_prim_type_convert(hw_mask, prim, in_pv == out_pv);
|
||||
*out_nr = u_index_count_converted_indices(hw_mask, in_pv == out_pv, prim, nr);
|
||||
|
||||
if ((hw_mask & (1<<prim)) &&
|
||||
|
||||
@@ -84,7 +84,7 @@ void u_index_init( void );
|
||||
|
||||
/* returns the primitive type resulting from index translation */
|
||||
enum pipe_prim_type
|
||||
u_index_prim_type_convert(unsigned hw_mask, enum pipe_prim_type prim);
|
||||
u_index_prim_type_convert(unsigned hw_mask, enum pipe_prim_type prim, bool pv_matches);
|
||||
|
||||
static inline unsigned
|
||||
u_index_size_convert(unsigned index_size)
|
||||
|
||||
Reference in New Issue
Block a user