diff options
author | Rob Clark <[email protected]> | 2016-01-24 13:18:39 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-01-30 12:10:13 -0500 |
commit | 9e05e8cb7511d7c575e226176f6e9be1c67268a4 (patch) | |
tree | e1d357b81e858d08a45ed332cfe343912323ac77 | |
parent | 438d421f8bb3f65402701628c3504c0ad04184c0 (diff) |
freedreno: limit string marker to max packet size
Experimentally derived max size.
Signed-off-by: Rob Clark <[email protected]>
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_context.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c index c5ea86f9368..c54bb1091f7 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.c +++ b/src/gallium/drivers/freedreno/freedreno_context.c @@ -152,6 +152,9 @@ fd_emit_string_marker(struct pipe_context *pctx, const char *string, int len) struct fd_ringbuffer *ring = ctx->ring; const uint32_t *buf = (const void *)string; + /* max packet size is 0x3fff dwords: */ + len = MIN2(len, 0x3fff * 4); + OUT_PKT3(ring, CP_NOP, align(len, 4) / 4); while (len >= 4) { OUT_RING(ring, *buf); |