Module: Mesa
Branch: master
Commit: 69fbb458cf59fbab5f6675ad256a266b04d54700
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=69fbb458cf59fbab5f6675ad256a266b04d54700

Author: Rob Clark <[email protected]>
Date:   Sun Jan 15 08:43:44 2017 -0500

freedreno/a5xx: fix int vbos

Signed-off-by: Rob Clark <[email protected]>
Cc: "17.0" <[email protected]>

---

 src/gallium/drivers/freedreno/a5xx/fd5_emit.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_emit.c 
b/src/gallium/drivers/freedreno/a5xx/fd5_emit.c
index 0aafc4b..a12b143 100644
--- a/src/gallium/drivers/freedreno/a5xx/fd5_emit.c
+++ b/src/gallium/drivers/freedreno/a5xx/fd5_emit.c
@@ -366,6 +366,7 @@ fd5_emit_vertex_bufs(struct fd_ringbuffer *ring, struct 
fd5_emit *emit)
                        struct fd_resource *rsc = fd_resource(vb->buffer);
                        enum pipe_format pfmt = elem->src_format;
                        enum a5xx_vtx_fmt fmt = fd5_pipe2vtx(pfmt);
+                       bool isint = util_format_is_pure_integer(pfmt);
                        uint32_t off = vb->buffer_offset + elem->src_offset;
                        uint32_t size = fd_bo_size(rsc->bo) - off;
                        debug_assert(fmt != ~0);
@@ -379,7 +380,8 @@ 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) |
-                                       0xc0000000);  // XXX
+                                       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 */
 
                        OUT_PKT4(ring, REG_A5XX_VFD_DEST_CNTL(j), 1);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to