[PATCH i-g-t v2 18/18] lib/intel_aux_pgtable: Pick a more optimal aux format for 10bpc

Ville Syrjala ville.syrjala at linux.intel.com
Wed Sep 18 12:05:18 UTC 2024


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Pick the (presumably) more optimal 0x18 aux format for
10bpc formats. This matches what Mesa uses as well.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 lib/intel_aux_pgtable.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/intel_aux_pgtable.c b/lib/intel_aux_pgtable.c
index 8ff48641619e..de0740e950f8 100644
--- a/lib/intel_aux_pgtable.c
+++ b/lib/intel_aux_pgtable.c
@@ -23,6 +23,7 @@
 #define AUX_FORMAT_ARGB_8B	0x0A
 #define AUX_FORMAT_NV12_21	0x0F
 #define AUX_FORMAT_RGBA16_FLOAT	0x10
+#define AUX_FORMAT_ARGB_10B	0x18
 
 struct pgtable_level_desc {
 	int idx_shift;
@@ -304,7 +305,10 @@ static uint64_t pgt_get_l1_flags(const struct intel_buf *buf, int surface_idx)
 	} else {
 		switch (buf->bpp) {
 		case 32:
-			entry.e.format = AUX_FORMAT_ARGB_8B;
+			if (buf->depth == 30)
+				entry.e.format = AUX_FORMAT_ARGB_10B;
+			else
+				entry.e.format = AUX_FORMAT_ARGB_8B;
 			entry.e.depth = bpp_to_depth_val(32);
 			break;
 		case 64:
-- 
2.44.2



More information about the igt-dev mailing list