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 <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* 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
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;