gallium: add PIPE_CAP_PREFER_POT_ALIGNED_VARYINGS
- Nov 15, 2021
-
-
Mali4x0 PP doesn't have a swizzle for load_input, so use POT-aligned varyings to avoid unnecessary movs for vec3 and precision downgrade in case if this vec3 is coordinates for a sampler shader-db: total instructions in shared programs: 15707 -> 15623 (-0.53%) instructions in affected programs: 3906 -> 3822 (-2.15%) helped: 47 HURT: 18 helped stats (abs) min: 1 max: 9 x̄: 3.09 x̃: 2 helped stats (rel) min: 1.49% max: 23.53% x̄: 8.20% x̃: 6.45% HURT stats (abs) min: 1 max: 7 x̄: 3.39 x̃: 3 HURT stats (rel) min: 0.78% max: 20.59% x̄: 10.45% x̃: 10.97% 95% mean confidence interval for instructions value: -2.18 -0.41 95% mean confidence interval for instructions %-change: -5.70% -0.38% Instructions are helped. total spills in shared programs: 146 -> 136 (-6.85%) spills in affected programs: 39 -> 29 (-25.64%) helped: 6 HURT: 0 total fills in shared programs: 617 -> 598 (-3.08%) fills in affected programs: 125 -> 106 (-15.20%) helped: 6 HURT: 0 HURT shaders are vertex shaders where we may need more instructions for non-packed vec3s. It's acceptable trade-off since we don't get precision downgrade if this varying is coordinates for a sampler. Reviewed-by: Erico Nunes <nunes.erico@gmail.com> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Part-of: <!13151>
15013958 -
Driver should enable this cap if it prefers varyings to be aligned to power of two in a slot, i.e. vec4 in .xyzw, vec3 in .xyz, vec2 in .xy or .zw Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Part-of: <!13151>
3bb192a1
-