[Mesa-dev] [PATCH] intel/compiler: Use nir's info when checking uses_streams.

Iago Toral itoral at igalia.com
Wed Nov 28 07:47:51 UTC 2018


Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>

On Tue, 2018-11-27 at 15:34 -0800, Kenneth Graunke wrote:
> Vulkan and Gallium don't use Mesa's gl_program data structure, so
> they
> can't poke at 'prog'.  But we can simply use the copy of the shader
> info
> stored with the NIR shader, which is guaranteed to exist.
> 
> Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
> ---
>  src/intel/compiler/brw_vec4_gs_visitor.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/intel/compiler/brw_vec4_gs_visitor.cpp
> b/src/intel/compiler/brw_vec4_gs_visitor.cpp
> index 63ff27e5e08..a6e38b0f379 100644
> --- a/src/intel/compiler/brw_vec4_gs_visitor.cpp
> +++ b/src/intel/compiler/brw_vec4_gs_visitor.cpp
> @@ -667,7 +667,7 @@ brw_compile_gs(const struct brw_compiler
> *compiler, void *log_data,
>           prog_data->control_data_format =
> GEN7_GS_CONTROL_DATA_FORMAT_GSCTL_SID;
>  
>           /* We only have to emit control bits if we are using
> streams */
> -         if (prog && prog->info.gs.uses_streams)
> +         if (shader->info.gs.uses_streams)
>              c.control_data_bits_per_vertex = 2;
>           else
>              c.control_data_bits_per_vertex = 0;



More information about the mesa-dev mailing list