asahi: Add size field to slices
Needed to size attachments for the kernel... for some reason. We already compute this; just save it. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482>
This commit is contained in:
parent
f5ae88d36f
commit
2c23bb49ef
|
@ -186,7 +186,9 @@ agx_resource_create(struct pipe_screen *screen,
|
|||
}
|
||||
|
||||
nresource->slices[l].offset = offset;
|
||||
offset += ALIGN_POT(nresource->slices[l].line_stride * height, 0x80);
|
||||
nresource->slices[l].size = ALIGN_POT(nresource->slices[l].line_stride * height, 0x80);
|
||||
|
||||
offset += nresource->slices[l].size;
|
||||
}
|
||||
|
||||
/* Arrays and cubemaps have the entire miptree duplicated and page aligned (16K) */
|
||||
|
|
|
@ -251,6 +251,7 @@ struct agx_resource {
|
|||
struct {
|
||||
unsigned offset;
|
||||
unsigned line_stride;
|
||||
unsigned size;
|
||||
} slices[PIPE_MAX_TEXTURE_LEVELS];
|
||||
|
||||
/* Bytes from one miptree to the next */
|
||||
|
|
Loading…
Reference in New Issue