mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
panfrost: Add panfrost_streamout_offset helper
Calculates the bias required for an xfb record in the src_offset field to account for truncating the address to force alignment. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
This commit is contained in:
parent
24c3b95925
commit
e26ac2e165
1 changed files with 7 additions and 0 deletions
|
|
@ -1615,6 +1615,13 @@ panfrost_emit_varyings(struct panfrost_batch *batch, union mali_attr *slot,
|
|||
return transfer.gpu;
|
||||
}
|
||||
|
||||
static unsigned
|
||||
panfrost_streamout_offset(unsigned stride, unsigned offset,
|
||||
struct pipe_stream_output_target *target)
|
||||
{
|
||||
return (target->buffer_offset + (offset * stride * 4)) & 63;
|
||||
}
|
||||
|
||||
static void
|
||||
panfrost_emit_streamout(struct panfrost_batch *batch, union mali_attr *slot,
|
||||
unsigned stride, unsigned offset, unsigned count,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue