Mesa (main): panfrost: Remove pan_emit_fbd thunking
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Feb 23 13:10:16 UTC 2022
Module: Mesa
Branch: main
Commit: 910d4f8245cbe943d658783f63c29d9c07a84ca9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=910d4f8245cbe943d658783f63c29d9c07a84ca9
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Sat Feb 12 10:31:40 2022 -0500
panfrost: Remove pan_emit_fbd thunking
Use a common interface.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15123>
---
src/panfrost/lib/pan_cs.c | 43 +++++++++++++++----------------------------
1 file changed, 15 insertions(+), 28 deletions(-)
diff --git a/src/panfrost/lib/pan_cs.c b/src/panfrost/lib/pan_cs.c
index 0af49dbe823..383438135fb 100644
--- a/src/panfrost/lib/pan_cs.c
+++ b/src/panfrost/lib/pan_cs.c
@@ -608,12 +608,12 @@ pan_force_clean_write(const struct pan_fb_info *fb, unsigned tile_size)
#endif
-static unsigned
-pan_emit_mfbd(const struct panfrost_device *dev,
- const struct pan_fb_info *fb,
- const struct pan_tls_info *tls,
- const struct pan_tiler_context *tiler_ctx,
- void *out)
+unsigned
+GENX(pan_emit_fbd)(const struct panfrost_device *dev,
+ const struct pan_fb_info *fb,
+ const struct pan_tls_info *tls,
+ const struct pan_tiler_context *tiler_ctx,
+ void *out)
{
unsigned tags = MALI_FBD_TAG_IS_MFBD;
void *fbd = out;
@@ -732,13 +732,15 @@ pan_emit_sfbd_tiler(const struct panfrost_device *dev,
pan_section_pack(fbd, FRAMEBUFFER, TILER_WEIGHTS, w);
}
-static void
-pan_emit_sfbd(const struct panfrost_device *dev,
- const struct pan_fb_info *fb,
- const struct pan_tls_info *tls,
- const struct pan_tiler_context *tiler_ctx,
- void *fbd)
+unsigned
+GENX(pan_emit_fbd)(const struct panfrost_device *dev,
+ const struct pan_fb_info *fb,
+ const struct pan_tls_info *tls,
+ const struct pan_tiler_context *tiler_ctx,
+ void *fbd)
{
+ assert(fb->rt_count <= 1);
+
GENX(pan_emit_tls)(tls,
pan_section_ptr(fbd, FRAMEBUFFER,
LOCAL_STORAGE));
@@ -836,24 +838,9 @@ pan_emit_sfbd(const struct panfrost_device *dev,
}
pan_emit_sfbd_tiler(dev, fb, tiler_ctx, fbd);
pan_section_pack(fbd, FRAMEBUFFER, PADDING_2, padding);
-}
-#endif
-
-unsigned
-GENX(pan_emit_fbd)(const struct panfrost_device *dev,
- const struct pan_fb_info *fb,
- const struct pan_tls_info *tls,
- const struct pan_tiler_context *tiler_ctx,
- void *out)
-{
-#if PAN_ARCH == 4
- assert(fb->rt_count <= 1);
- pan_emit_sfbd(dev, fb, tls, tiler_ctx, out);
return 0;
-#else
- return pan_emit_mfbd(dev, fb, tls, tiler_ctx, out);
-#endif
}
+#endif
#if PAN_ARCH >= 6
void
More information about the mesa-commit
mailing list