From 128820b88681dbcad156138594ca846c95904ee8 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 5 Mar 2020 19:22:26 +0100 Subject: [PATCH] panfrost: Drop initial mali_attr_meta.src_offset assignment The mali_attr_meta.src_offset is initialized to pipe_vertex_element.src_offset at vertex element creation time, but this field is then adjusted when the descrptors are emitted. Let's use the pipe_vertex_element data we saved earlier and drop this initial assignment. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_context.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 528ae2e6282..0a010b99fc4 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -232,7 +232,7 @@ panfrost_stage_attributes(struct panfrost_context *ctx) * read src_offset from so->hw (which is not GPU visible) * rather than target (which is) due to caching effects */ - unsigned src_offset = so->hw[i].src_offset; + unsigned src_offset = so->pipe[i].src_offset; src_offset += (addr & 63); /* Also, somewhat obscurely per-instance data needs to be @@ -722,9 +722,6 @@ panfrost_create_vertex_elements_state( so->hw[i].swizzle = panfrost_get_default_swizzle(desc->nr_channels); so->hw[i].format = panfrost_find_format(desc); - - /* The field itself should probably be shifted over */ - so->hw[i].src_offset = elements[i].src_offset; } return so;