summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-06-13 11:37:23 -0400
committerRob Clark <[email protected]>2014-06-13 15:20:34 -0400
commit06e9536e5f5f0cc280385bcf813ecdcf6573401b (patch)
treefbbe53bbfb0d40ee94403c9a4960886206769489 /src/gallium/drivers/freedreno/a3xx/fd3_emit.c
parentba6a490bbc81380fdffcb080752682b7f38b95e6 (diff)
freedreno/a3xx: vtx formats
Add support for more vertex buffer formats. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx/fd3_emit.c')
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_emit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
index 4c6b5c15aaa..878d6ff6325 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
@@ -327,9 +327,12 @@ fd3_emit_vertex_bufs(struct fd_ringbuffer *ring,
if (vp->inputs[i].compmask) {
struct pipe_resource *prsc = vbufs[i].prsc;
struct fd_resource *rsc = fd_resource(prsc);
- enum a3xx_vtx_fmt fmt = fd3_pipe2vtx(vbufs[i].format);
+ enum pipe_format pfmt = vbufs[i].format;
+ enum a3xx_vtx_fmt fmt = fd3_pipe2vtx(pfmt);
bool switchnext = (i != last);
- uint32_t fs = util_format_get_blocksize(vbufs[i].format);
+ uint32_t fs = util_format_get_blocksize(pfmt);
+
+ debug_assert(fmt != ~0);
OUT_PKT0(ring, REG_A3XX_VFD_FETCH(j), 2);
OUT_RING(ring, A3XX_VFD_FETCH_INSTR_0_FETCHSIZE(fs - 1) |
@@ -343,6 +346,7 @@ fd3_emit_vertex_bufs(struct fd_ringbuffer *ring,
OUT_RING(ring, A3XX_VFD_DECODE_INSTR_CONSTFILL |
A3XX_VFD_DECODE_INSTR_WRITEMASK(vp->inputs[i].compmask) |
A3XX_VFD_DECODE_INSTR_FORMAT(fmt) |
+ A3XX_VFD_DECODE_INSTR_SWAP(fd3_pipe2swap(pfmt)) |
A3XX_VFD_DECODE_INSTR_REGID(vp->inputs[i].regid) |
A3XX_VFD_DECODE_INSTR_SHIFTCNT(fs) |
A3XX_VFD_DECODE_INSTR_LASTCOMPVALID |