Mesa (main): panfrost: Pack pan_blit_surface fields

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 7 16:11:28 UTC 2021


Module: Mesa
Branch: main
Commit: 45c615fd05739ce39aec4194ec81cebc34eff106
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=45c615fd05739ce39aec4194ec81cebc34eff106

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Wed Apr 28 12:37:06 2021 +0200

panfrost: Pack pan_blit_surface fields

It should speed up a bit hash calculation and allow us to add extra
info without changing the structure size.

Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10548>

---

 src/panfrost/lib/pan_blitter.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/panfrost/lib/pan_blitter.c b/src/panfrost/lib/pan_blitter.c
index 69d442c7103..0f9ef149168 100644
--- a/src/panfrost/lib/pan_blitter.c
+++ b/src/panfrost/lib/pan_blitter.c
@@ -63,9 +63,9 @@ blit_type_to_reg_fmt(nir_alu_type in)
 }
 
 struct pan_blit_surface {
-        gl_frag_result loc;
-        nir_alu_type type;
-        bool ms;
+        gl_frag_result loc : 4;
+        nir_alu_type type : 8;
+        bool ms : 1;
 };
 
 struct pan_blit_shader_key {



More information about the mesa-commit mailing list