From 7d0f45563d5426f0ad633bed1561c7455804b807 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 17 Nov 2010 00:29:02 +0100 Subject: 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. --- src/gallium/drivers/r600/eg_state_inlines.h | 34 ----------------------------- 1 file changed, 34 deletions(-) (limited to 'src/gallium/drivers/r600/eg_state_inlines.h') 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 -- cgit v1.2.3