From 552fdc7ea43c74e046767f4e3909fbd5c0eaf1b6 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 3 Jun 2021 15:09:06 -0400 Subject: [PATCH] panfrost: Fix src_offset data type We treat it as signed but had it marked as unsigned. It can be negative in obscure cases. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_cmdstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index dac6e3fa421..b5562e226db 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -1821,7 +1821,7 @@ panfrost_emit_vertex_data(struct panfrost_batch *batch, struct pipe_vertex_buffer *buf = &ctx->vertex_buffers[vbi]; /* BOs are aligned; just fixup for buffer_offset */ - unsigned src_offset = so->pipe[i].src_offset; + signed src_offset = so->pipe[i].src_offset; src_offset += (buf->buffer_offset & 63); /* Base instance offset */