diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_instancing.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/panfrost/pan_instancing.c b/src/gallium/drivers/panfrost/pan_instancing.c index 30023725b2e..e5a1e7cfae3 100644 --- a/src/gallium/drivers/panfrost/pan_instancing.c +++ b/src/gallium/drivers/panfrost/pan_instancing.c @@ -292,7 +292,7 @@ panfrost_emit_vertex_data(struct panfrost_job *batch) * will be adjusted back when we fixup the src_offset in * mali_attr_meta */ - mali_ptr raw_addr = panfrost_vertex_buffer_address(ctx, vbi); + mali_ptr raw_addr = rsrc->bo->gpu + buf->buffer_offset; mali_ptr addr = raw_addr & ~63; unsigned chopped_addr = raw_addr - addr; @@ -302,7 +302,10 @@ panfrost_emit_vertex_data(struct panfrost_job *batch) /* Set common fields */ attrs[k].elements = addr; attrs[k].stride = buf->stride; - attrs[k].size = rsrc->base.width0; + + /* Since we advanced the base pointer, we shrink the buffer + * size */ + attrs[k].size = rsrc->base.width0 - buf->buffer_offset; /* We need to add the extra size we masked off (for * correctness) so the data doesn't get clamped away */ |