mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 03:38:06 +02:00
freedreno: Move fd4_size2indextype() helper to freedreno_util.h
In preparation for refactoring fd6_draw.c a bit. Reviewed-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
0905189a25
commit
cae6b4d741
2 changed files with 13 additions and 13 deletions
|
|
@ -85,19 +85,6 @@ fd4_draw(struct fd_batch *batch, struct fd_ringbuffer *ring,
|
|||
fd_reset_wfi(batch);
|
||||
}
|
||||
|
||||
static inline enum a4xx_index_size
|
||||
fd4_size2indextype(unsigned index_size)
|
||||
{
|
||||
switch (index_size) {
|
||||
case 1: return INDEX4_SIZE_8_BIT;
|
||||
case 2: return INDEX4_SIZE_16_BIT;
|
||||
case 4: return INDEX4_SIZE_32_BIT;
|
||||
}
|
||||
DBG("unsupported index size: %d", index_size);
|
||||
assert(0);
|
||||
return INDEX4_SIZE_32_BIT;
|
||||
}
|
||||
|
||||
static inline void
|
||||
fd4_draw_emit(struct fd_batch *batch, struct fd_ringbuffer *ring,
|
||||
enum pc_di_primtype primtype,
|
||||
|
|
|
|||
|
|
@ -488,4 +488,17 @@ fd4_stage2shadersb(gl_shader_stage type)
|
|||
}
|
||||
}
|
||||
|
||||
static inline enum a4xx_index_size
|
||||
fd4_size2indextype(unsigned index_size)
|
||||
{
|
||||
switch (index_size) {
|
||||
case 1: return INDEX4_SIZE_8_BIT;
|
||||
case 2: return INDEX4_SIZE_16_BIT;
|
||||
case 4: return INDEX4_SIZE_32_BIT;
|
||||
}
|
||||
DBG("unsupported index size: %d", index_size);
|
||||
assert(0);
|
||||
return INDEX4_SIZE_32_BIT;
|
||||
}
|
||||
|
||||
#endif /* FREEDRENO_UTIL_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue