a5xx: include color swap when decoding vertices
authorIlia Mirkin <imirkin@alum.mit.edu>
Tue, 4 Jul 2017 04:24:34 +0000 (00:24 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 4 Jul 2017 22:27:57 +0000 (18:27 -0400)
This fixes support for BGRA vertex formats

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/a5xx/fd5_emit.c

index f5c0bd27c3580100b979492c607f088406a9e6f5..287ec24b18d1ed23c70921d359925811ea1a283a 100644 (file)
@@ -439,6 +439,7 @@ fd5_emit_vertex_bufs(struct fd_ringbuffer *ring, struct fd5_emit *emit)
                        OUT_RING(ring, A5XX_VFD_DECODE_INSTR_IDX(j) |
                                        A5XX_VFD_DECODE_INSTR_FORMAT(fmt) |
                                        COND(elem->instance_divisor, A5XX_VFD_DECODE_INSTR_INSTANCED) |
+                                       A5XX_VFD_DECODE_INSTR_SWAP(fd5_pipe2swap(pfmt)) |
                                        A5XX_VFD_DECODE_INSTR_UNK30 |
                                        COND(!isint, A5XX_VFD_DECODE_INSTR_FLOAT));
                        OUT_RING(ring, MAX2(1, elem->instance_divisor)); /* VFD_DECODE[j].STEP_RATE */