v3d: use devinfo->page_size for state uploader default size

The state uploader was hardcoded to 4096 bytes, which doesn't fill the
full page on systems with 16KB pages. Use devinfo->page_size instead so
the uploader default matches the actual allocation granularity.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40496>
This commit is contained in:
Maíra Canal 2026-03-18 17:57:03 -03:00 committed by Marge Bot
parent 4db32305ec
commit 691cfe40fa

View file

@ -476,7 +476,7 @@ v3d_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
v3d->base.stream_uploader = v3d->uploader;
v3d->base.const_uploader = v3d->uploader;
v3d->state_uploader = u_upload_create(&v3d->base,
4096,
devinfo->page_size,
PIPE_BIND_CONSTANT_BUFFER,
PIPE_USAGE_STREAM, 0);