[Mesa-dev] [PATCH 5/5] i965: stop passing stage as a function parameter

Jason Ekstrand jason at jlekstrand.net
Sun Sep 25 15:07:41 UTC 2016


r-b

On Sun, Sep 25, 2016 at 5:50 AM, Timothy Arceri <
timothy.arceri at collabora.com> wrote:

> We already pass the shader so we can just get the stage from this.
> ---
>  src/mesa/drivers/dri/i965/brw_link.cpp | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp
> b/src/mesa/drivers/dri/i965/brw_link.cpp
> index fc2e539..a0097ef 100644
> --- a/src/mesa/drivers/dri/i965/brw_link.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_link.cpp
> @@ -86,8 +86,7 @@ brw_lower_packing_builtins(struct brw_context *brw,
>  }
>
>  static void
> -process_glsl_ir(gl_shader_stage stage,
> -                struct brw_context *brw,
> +process_glsl_ir(struct brw_context *brw,
>                  struct gl_shader_program *shader_prog,
>                  struct gl_linked_shader *shader)
>  {
> @@ -140,8 +139,7 @@ process_glsl_ir(gl_shader_stage stage,
>     do_copy_propagation(shader->ir);
>
>     bool lowered_variable_indexing =
> -      lower_variable_index_to_cond_assign((gl_shader_stage)stage,
> -                                          shader->ir,
> +      lower_variable_index_to_cond_assign(shader->Stage, shader->ir,
>                                            options->EmitNoIndirectInput,
>                                            options->EmitNoIndirectOutput,
>                                            options->EmitNoIndirectTemp,
> @@ -227,7 +225,7 @@ brw_link_shader(struct gl_context *ctx, struct
> gl_shader_program *shProg)
>
>        _mesa_copy_linked_program_data((gl_shader_stage) stage, shProg,
> prog);
>
> -      process_glsl_ir((gl_shader_stage) stage, brw, shProg, shader);
> +      process_glsl_ir(brw, shProg, shader);
>
>        /* Make a pass over the IR to add state references for any built-in
>         * uniforms that are used.  This has to be done now (during
> linking).
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160925/9776a3df/attachment-0001.html>


More information about the mesa-dev mailing list