diff options
author | Rob Clark <[email protected]> | 2018-06-14 09:34:11 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-06-19 13:02:28 -0400 |
commit | 0c8d9e923aa9239e20f9bc969faf9caa0b85237f (patch) | |
tree | 8eec5e49f829f654d9cdac9f367148e90bbfd9ec /src/gallium/drivers/freedreno/a4xx/fd4_emit.c | |
parent | 4a41b02d466a72e380e9b81a9ab4b003590623f0 (diff) |
freedreno/a5xx: fix crash in dEQP-GLES31.stress.vertex_attribute_binding.buffer_bounds.bind_vertex_buffer_offset_near_wrap_10
This is kind of a hack, but really the only problem is the
debug_assert() in OUT_RELOC(). But the debug_assert() is
useful to catch real issues. So just add some #ifdef DEBUG
code to filter things out before we hit the assert.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a4xx/fd4_emit.c')
-rw-r--r-- | src/gallium/drivers/freedreno/a4xx/fd4_emit.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c index 42268ceea71..8470fa95783 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c @@ -418,6 +418,13 @@ fd4_emit_vertex_bufs(struct fd_ringbuffer *ring, struct fd4_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_PKT0(ring, REG_A4XX_VFD_FETCH(j), 4); OUT_RING(ring, A4XX_VFD_FETCH_INSTR_0_FETCHSIZE(fs - 1) | A4XX_VFD_FETCH_INSTR_0_BUFSTRIDE(vb->stride) | |