summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2013-08-08 13:10:24 +0800
committerChia-I Wu <[email protected]>2013-08-08 13:10:36 +0800
commit02496cd2b63cb53cd4dba8aa25b35dffc3c5aaa0 (patch)
tree443fc129b2b86e9aef56c9c27fa0f51ae0735993 /src/gallium/drivers/ilo
parent1c19d0bb81b7be833759f5a7822499709aea566d (diff)
ilo: fold gen6_translate_index_size into the caller
There is only one caller so fold it.
Diffstat (limited to 'src/gallium/drivers/ilo')
-rw-r--r--src/gallium/drivers/ilo/ilo_gpe_gen6.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/src/gallium/drivers/ilo/ilo_gpe_gen6.h b/src/gallium/drivers/ilo/ilo_gpe_gen6.h
index 893cc2f6160..2897885cc63 100644
--- a/src/gallium/drivers/ilo/ilo_gpe_gen6.h
+++ b/src/gallium/drivers/ilo/ilo_gpe_gen6.h
@@ -930,22 +930,6 @@ gen6_emit_3DSTATE_VERTEX_ELEMENTS(const struct ilo_dev_info *dev,
ilo_cp_end(cp);
}
-/**
- * Translate an index size to the matching hardware index format.
- */
-static inline int
-gen6_translate_index_size(int size)
-{
- switch (size) {
- case 4: return BRW_INDEX_DWORD;
- case 2: return BRW_INDEX_WORD;
- case 1: return BRW_INDEX_BYTE;
- default:
- assert(!"unknown index size");
- return BRW_INDEX_BYTE;
- }
-}
-
static inline void
gen6_emit_3DSTATE_INDEX_BUFFER(const struct ilo_dev_info *dev,
const struct ilo_ib_state *ib,
@@ -963,7 +947,21 @@ gen6_emit_3DSTATE_INDEX_BUFFER(const struct ilo_dev_info *dev,
if (!buf)
return;
- format = gen6_translate_index_size(ib->hw_index_size);
+ switch (ib->hw_index_size) {
+ case 4:
+ format = BRW_INDEX_DWORD;
+ break;
+ case 2:
+ format = BRW_INDEX_WORD;
+ break;
+ case 1:
+ format = BRW_INDEX_BYTE;
+ break;
+ default:
+ assert(!"unknown index size");
+ format = BRW_INDEX_BYTE;
+ break;
+ }
/*
* set start_offset to 0 here and adjust pipe_draw_info::start with