panfrost: Enable packed uniforms.

Since we can handle arbitrary offsets in the load_ubo paths, we can let
the GLSL compiler pack UBO 0 tighter, saving uniform uploads.  This may
cause some straddling loads that could reduce performance for vec3s, but
those are rare in shader-db and we expect this to be outweighed by the
wins for normal float/vec2 packing.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10151>
This commit is contained in:
Eric Anholt
2021-04-09 16:32:48 -07:00
committed by Marge Bot
parent ff007afce2
commit 24d7c413fe
3 changed files with 3 additions and 2 deletions

View File

@@ -170,7 +170,7 @@ traces:
- path: glmark2/terrain.rdc
expectations:
- device: gl-panfrost-t860
checksum: 2264a06895a84154bd2f54abffcc48d8
checksum: 3f2856f8c77c4e583b11c71d666f8724
- path: glmark2/texture-texture-filter=linear.rdc
expectations:
- device: gl-panfrost-t860

View File

@@ -166,6 +166,7 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_CS_DERIVED_SYSTEM_VALUES_SUPPORTED:
case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
case PIPE_CAP_TEXTURE_BUFFER_SAMPLER:
case PIPE_CAP_PACKED_UNIFORMS:
return 1;
/* We need this for OES_copy_image, but currently there are some awful

View File

@@ -338,7 +338,7 @@ optimise_nir(nir_shader *nir, unsigned quirks, bool is_blend)
* to UBO ordinarily, but it isn't as aggressive as we need. */
NIR_PASS(progress, nir, nir_opt_peephole_select, 64, false, true);
NIR_PASS_V(nir, nir_lower_uniforms_to_ubo, false, false);
NIR_PASS_V(nir, nir_lower_uniforms_to_ubo, true, false);
do {
progress = false;