summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorKristian H. Kristensen <[email protected]>2019-06-03 14:01:14 -0700
committerRob Clark <[email protected]>2019-06-07 07:32:34 -0700
commitcae6b4d741ee3cd7c6640574eea46481e05d13ba (patch)
tree926a314040c5adab0f9a5433577e5906e4950038 /src/gallium/drivers/freedreno
parent0905189a25edabaea8de5482b9d5f531a92aa1cf (diff)
freedreno: Move fd4_size2indextype() helper to freedreno_util.h
In preparation for refactoring fd6_draw.c a bit. Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_draw.h13
-rw-r--r--src/gallium/drivers/freedreno/freedreno_util.h13
2 files changed, 13 insertions, 13 deletions
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_draw.h b/src/gallium/drivers/freedreno/a4xx/fd4_draw.h
index 82f6c538ddb..64ccd5cc9de 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_draw.h
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_draw.h
@@ -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,
diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h
index 51eefc41f52..2d1a473912e 100644
--- a/src/gallium/drivers/freedreno/freedreno_util.h
+++ b/src/gallium/drivers/freedreno/freedreno_util.h
@@ -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_ */