mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 10:00:22 +01:00
v3d: Add V3D_TFU_READAHEAD padding for renderonly resources
Fixes: 4e033ffb27 ("v3d: Add V3D_TFU_READAHEAD padding for allocated resources")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13508
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36407>
This commit is contained in:
parent
abcd02a07d
commit
20b61dcde2
1 changed files with 3 additions and 1 deletions
|
|
@ -847,11 +847,13 @@ v3d_resource_create_with_modifiers(struct pipe_screen *pscreen,
|
|||
if (screen->ro && (tmpl->bind & PIPE_BIND_SCANOUT)) {
|
||||
assert(!rsc->tiled);
|
||||
struct winsys_handle handle;
|
||||
uint32_t scanout_height =
|
||||
align(rsc->size + V3D_TFU_READAHEAD_SIZE, 4096) / 4096;
|
||||
struct pipe_resource scanout_tmpl = {
|
||||
.target = prsc->target,
|
||||
.format = PIPE_FORMAT_RGBA8888_UNORM,
|
||||
.width0 = 1024, /* one page */
|
||||
.height0 = align(rsc->size, 4096) / 4096,
|
||||
.height0 = scanout_height,
|
||||
.depth0 = 1,
|
||||
.array_size = 1,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue