mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 11:40:10 +01:00
aux/indices: break out index size conversion to separate function
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10965>
This commit is contained in:
parent
cad2026b72
commit
4ece3931bc
2 changed files with 7 additions and 1 deletions
|
|
@ -140,7 +140,7 @@ u_index_translator(unsigned hw_mask,
|
|||
u_index_init();
|
||||
|
||||
in_idx = in_size_idx(in_index_size);
|
||||
*out_index_size = (in_index_size == 4) ? 4 : 2;
|
||||
*out_index_size = u_index_size_convert(in_index_size);
|
||||
out_idx = out_size_idx(*out_index_size);
|
||||
|
||||
if ((hw_mask & (1<<prim)) &&
|
||||
|
|
|
|||
|
|
@ -86,6 +86,12 @@ void u_index_init( void );
|
|||
enum pipe_prim_type
|
||||
u_index_prim_type_convert(unsigned hw_mask, enum pipe_prim_type prim);
|
||||
|
||||
static inline unsigned
|
||||
u_index_size_convert(unsigned index_size)
|
||||
{
|
||||
return (index_size == 4) ? 4 : 2;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* For indexed drawing, this function determines what kind of primitive
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue