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

Author: Rob Clark <[email protected]>
Date:   Mon Aug 20 10:55:37 2018 -0400

freedreno/a6xx: fix debug build crash

Porting 0c8d9e923aa9239e20f9bc969faf9caa0b85237f to a6xx.

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

---

 src/gallium/drivers/freedreno/a6xx/fd6_emit.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c 
b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c
index 1be407670a..3d39a3e0f5 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c
@@ -522,6 +522,13 @@ fd6_emit_vertex_bufs(struct fd_ringbuffer *ring, struct 
fd6_emit *emit)
                        uint32_t size = fd_bo_size(rsc->bo) - off;
                        debug_assert(fmt != ~0);
 
+#ifdef DEBUG
+                       /* see 
dEQP-GLES31.stress.vertex_attribute_binding.buffer_bounds.bind_vertex_buffer_offset_near_wrap_10
+                        */
+                       if (off > fd_bo_size(rsc->bo))
+                               continue;
+#endif
+
                        OUT_PKT4(ring, REG_A6XX_VFD_FETCH(j), 4);
                        OUT_RELOC(ring, rsc->bo, off, 0, 0);
                        OUT_RING(ring, size);           /* VFD_FETCH[j].SIZE */

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

Reply via email to