summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/r600_state_common.c
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2012-05-11 11:52:16 +0200
committerMichel Dänzer <[email protected]>2012-05-11 11:54:58 +0200
commitc2f1fbf912c0b95e09cb64db10dfbe8abff9f5d6 (patch)
tree94647a21c1771f501a60f176244cd7f62529ac27 /src/gallium/drivers/radeonsi/r600_state_common.c
parent03d9c24c0468ae992a704c6a2f72bc349557b671 (diff)
radeonsi: Properly translate vertex format swizzle.
egltri_screen works correctly!
Diffstat (limited to 'src/gallium/drivers/radeonsi/r600_state_common.c')
-rw-r--r--src/gallium/drivers/radeonsi/r600_state_common.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/r600_state_common.c b/src/gallium/drivers/radeonsi/r600_state_common.c
index ebed5b36730..416c89048e6 100644
--- a/src/gallium/drivers/radeonsi/r600_state_common.c
+++ b/src/gallium/drivers/radeonsi/r600_state_common.c
@@ -630,11 +630,10 @@ static void r600_vertex_buffer_update(struct r600_context *rctx)
vertex_buffer->stride);
else
ptr[2] = vertex_buffer->buffer->width0 - offset;
- /* XXX: Hardcoding RGBA */
- ptr[3] = (S_008F0C_DST_SEL_X(V_008F0C_SQ_SEL_X) |
- S_008F0C_DST_SEL_Y(V_008F0C_SQ_SEL_Y) |
- S_008F0C_DST_SEL_Z(V_008F0C_SQ_SEL_Z) |
- S_008F0C_DST_SEL_W(V_008F0C_SQ_SEL_W) |
+ ptr[3] = (S_008F0C_DST_SEL_X(si_map_swizzle(desc->swizzle[0])) |
+ S_008F0C_DST_SEL_Y(si_map_swizzle(desc->swizzle[1])) |
+ S_008F0C_DST_SEL_Z(si_map_swizzle(desc->swizzle[2])) |
+ S_008F0C_DST_SEL_W(si_map_swizzle(desc->swizzle[3])) |
S_008F0C_NUM_FORMAT(num_format) |
S_008F0C_DATA_FORMAT(data_format));