Skip to content

panfrost: Speed up RA, add vec8 support

Icecream95 requested to merge icecream95/mesa:nodearray into main

Makes RA 10x faster for compiling all glmark shaders in shader-db, with a far larger improvement for massive shaders. But the improvement could still be a lot more, especially when spilling is required.

Time for RA is regressed on 30 out of 147 compilations for those glmark shaders, but the speedup for the other shaders is by far enough to make it still worth it.

Also includes support for vec8 in RA, and uses it for texture instruction inputs on Valhall.

Note that this hunk will have to be included in pan/bi: Handle some 64-bit sources when it is merged:

diff --git a/src/panfrost/bifrost/bir.c b/src/panfrost/bifrost/bir.c
index e963db8b316..6a877ddadf2 100644
--- a/src/panfrost/bifrost/bir.c
+++ b/src/panfrost/bifrost/bir.c
@@ -100,10 +100,11 @@ bi_count_read_registers(const bi_instr *ins, unsigned s)
                  * property of the IR directly?
                  */
                 switch (ins->op) {
-                case BI_OPCODE_BLEND:
                 case BI_OPCODE_TEX_FETCH:
                 case BI_OPCODE_TEX_GATHER:
                 case BI_OPCODE_TEX_SINGLE:
+                        return (s == 2) ? 2 : 1;
+                case BI_OPCODE_BLEND:
                 case BI_OPCODE_STORE_I8:
                 case BI_OPCODE_STORE_I16:
                 case BI_OPCODE_STORE_I24:

Merge request reports