Mesa (master): st/nir: Call nir_lower_clip_cull_distance_arrays().

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 5 22:00:15 UTC 2019


Module: Mesa
Branch: master
Commit: cf731564e6d335c987c47d41817b75df8a637dde
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf731564e6d335c987c47d41817b75df8a637dde

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Jan 23 02:44:28 2019 -0800

st/nir: Call nir_lower_clip_cull_distance_arrays().

Today, st always sets LowerCombinedClipCullDistance, causing the GLSL IR
lowering to run, giving us vec4[2] arrays.  I would like to disable this
and instead run the NIR lowering so that we get compact float[] arrays
instead.

Calling the new pass is a noop if the GLSL IR pass has already run, so
it's safe to call the pass unconditionally.

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

---

 src/mesa/state_tracker/st_glsl_to_nir.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index d87444aa70..5fc8735462 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -742,6 +742,7 @@ st_link_nir(struct gl_context *ctx,
                  st->pipe->screen);
 
       NIR_PASS_V(nir, nir_lower_system_values);
+      NIR_PASS_V(nir, nir_lower_clip_cull_distance_arrays);
 
       nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
       shader->Program->info = nir->info;




More information about the mesa-commit mailing list