[Mesa-dev] [PATCH 01/20] st/glsl_to_nir: disable io type lowering for stages other than vs and fs

Nicolai Hähnle nhaehnle at gmail.com
Wed Nov 15 10:39:59 UTC 2017


On 10.11.2017 04:13, Timothy Arceri wrote:
> This is too simple and breaks gs and I'm not sure its required there
> anyway.

Can you add an example for what breaks?

Thanks,
Nicolai


> ---
>   src/mesa/state_tracker/st_glsl_to_nir.cpp | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
> index 6c474cb718..d478725fbe 100644
> --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
> @@ -359,21 +359,24 @@ sort_varyings(struct exec_list *var_list)
>    * variant lowering.
>    */
>   void
>   st_finalize_nir(struct st_context *st, struct gl_program *prog,
>                   struct gl_shader_program *shader_program, nir_shader *nir)
>   {
>      struct pipe_screen *screen = st->pipe->screen;
>   
>      NIR_PASS_V(nir, nir_split_var_copies);
>      NIR_PASS_V(nir, nir_lower_var_copies);
> -   NIR_PASS_V(nir, nir_lower_io_types);
> +
> +   if (nir->info.stage == MESA_SHADER_VERTEX ||
> +       nir->info.stage == MESA_SHADER_FRAGMENT)
> +      NIR_PASS_V(nir, nir_lower_io_types);
>   
>      if (nir->info.stage == MESA_SHADER_VERTEX) {
>         /* Needs special handling so drvloc matches the vbo state: */
>         st_nir_assign_vs_in_locations(prog, nir);
>         /* Re-lower global vars, to deal with any dead VS inputs. */
>         NIR_PASS_V(nir, nir_lower_global_vars_to_local);
>   
>         sort_varyings(&nir->outputs);
>         nir_assign_var_locations(&nir->outputs,
>                                  &nir->num_outputs,
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list