diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-06-10 19:28:28 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-12 14:45:50 +0000 |
commit | e26ac2e165c0c313df74266763b3dd0755354a98 (patch) | |
tree | 88619f736f54ab5b8a4af36fd18630747f03cfc2 /src/gallium | |
parent | 24c3b95925389ed355213fcb12acc9baa088aa87 (diff) |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_cmdstream.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 5c0d7f4d0e9..af2cffcd2ce 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -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, |