diff options
author | Henri Verbeet <hverbeet@gmail.com> | 2010-11-17 00:29:02 +0100 |
---|---|---|
committer | Henri Verbeet <hverbeet@gmail.com> | 2010-11-17 00:41:42 +0100 |
commit | 7d0f45563d5426f0ad633bed1561c7455804b807 (patch) | |
tree | 9e5db57c489828ffc572a49469a559f00e7baa99 /src/gallium/drivers/r600/eg_state_inlines.h | |
parent | b6e2c32626551791a33433913dfb4401f8c67cf4 (diff) |
r600g: Swizzle vertex data only once.
Vertex data swizzles are already done in the vertex shader. Doing them twice
breaks BGRA vertex arrays for example.
Diffstat (limited to 'src/gallium/drivers/r600/eg_state_inlines.h')
-rw-r--r-- | src/gallium/drivers/r600/eg_state_inlines.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/gallium/drivers/r600/eg_state_inlines.h b/src/gallium/drivers/r600/eg_state_inlines.h index 94a208442b..031182aa4e 100644 --- a/src/gallium/drivers/r600/eg_state_inlines.h +++ b/src/gallium/drivers/r600/eg_state_inlines.h @@ -636,38 +636,4 @@ out_unknown: return ~0; } -static INLINE uint32_t r600_translate_vertex_data_swizzle(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - unsigned i; - uint32_t word3; - - assert(format); - - if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) { - fprintf(stderr, "r600: Bad format %s in %s:%d\n", - util_format_short_name(format), __FUNCTION__, __LINE__); - return 0; - } - - word3 = 0; - for (i = 0; i < desc->nr_channels; i++) { - switch (i) { - case 0: - word3 |= S_03000C_DST_SEL_X(desc->swizzle[0]); - break; - case 1: - word3 |= S_03000C_DST_SEL_Y(desc->swizzle[1]); - break; - case 2: - word3 |= S_03000C_DST_SEL_Z(desc->swizzle[2]); - break; - case 3: - word3 |= S_03000C_DST_SEL_W(desc->swizzle[3]); - break; - } - } - return word3; -} - #endif |