[Mesa-dev] [PATCH 3/3] i965: Remove shader_prog from vec4_gs_visitor.
Jason Ekstrand
jason at jlekstrand.net
Fri Oct 2 21:34:26 PDT 2015
On Fri, Oct 2, 2015 at 5:57 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Unfortunately it has to stay in gen6_gs_visitor.
Why do we still need it in gen6_gs_visitor?
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
> src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp | 6 ++----
> src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.h | 3 ---
> src/mesa/drivers/dri/i965/gen6_gs_visitor.h | 9 +++++++--
> 3 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
> index 74ef728..f6967a7 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
> @@ -37,7 +37,6 @@ namespace brw {
> vec4_gs_visitor::vec4_gs_visitor(const struct brw_compiler *compiler,
> void *log_data,
> struct brw_gs_compile *c,
> - struct gl_shader_program *prog,
> nir_shader *shader,
> void *mem_ctx,
> bool no_spills,
> @@ -45,7 +44,6 @@ vec4_gs_visitor::vec4_gs_visitor(const struct brw_compiler *compiler,
> : vec4_visitor(compiler, log_data, &c->key.tex,
> &c->prog_data.base, shader, mem_ctx,
> no_spills, shader_time_index),
> - shader_prog(prog),
> c(c)
> {
> }
> @@ -641,7 +639,7 @@ brw_gs_emit(struct brw_context *brw,
> c->prog_data.base.dispatch_mode = DISPATCH_MODE_4X2_DUAL_OBJECT;
>
> vec4_gs_visitor v(brw->intelScreen->compiler, brw,
> - c, prog, shader->Program->nir,
> + c, shader->Program->nir,
> mem_ctx, true /* no_spills */, st_index);
> if (v.run()) {
> return generate_assembly(brw, prog, &c->gp->program.Base,
> @@ -684,7 +682,7 @@ brw_gs_emit(struct brw_context *brw,
>
> if (brw->gen >= 7)
> gs = new vec4_gs_visitor(brw->intelScreen->compiler, brw,
> - c, prog, shader->Program->nir,
> + c, shader->Program->nir,
> mem_ctx, false /* no_spills */,
> st_index);
> else
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.h b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.h
> index 85d80b8..da93f0d 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.h
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.h
> @@ -70,7 +70,6 @@ public:
> vec4_gs_visitor(const struct brw_compiler *compiler,
> void *log_data,
> struct brw_gs_compile *c,
> - struct gl_shader_program *prog,
> nir_shader *shader,
> void *mem_ctx,
> bool no_spills,
> @@ -97,8 +96,6 @@ protected:
> void emit_control_data_bits();
> void set_stream_control_data_bits(unsigned stream_id);
>
> - struct gl_shader_program *shader_prog;
> -
> src_reg vertex_count;
> src_reg control_data_bits;
> const struct brw_gs_compile * const c;
> diff --git a/src/mesa/drivers/dri/i965/gen6_gs_visitor.h b/src/mesa/drivers/dri/i965/gen6_gs_visitor.h
> index 41c6d18..e75d6aa 100644
> --- a/src/mesa/drivers/dri/i965/gen6_gs_visitor.h
> +++ b/src/mesa/drivers/dri/i965/gen6_gs_visitor.h
> @@ -43,8 +43,11 @@ public:
> void *mem_ctx,
> bool no_spills,
> int shader_time_index) :
> - vec4_gs_visitor(comp, log_data, c, prog, shader, mem_ctx, no_spills,
> - shader_time_index) {}
> + vec4_gs_visitor(comp, log_data, c, shader, mem_ctx, no_spills,
> + shader_time_index),
> + shader_prog(prog)
> + {
> + }
>
> protected:
> virtual void emit_prolog();
> @@ -64,6 +67,8 @@ private:
> void xfb_setup();
> int get_vertex_output_offset_for_varying(int vertex, int varying);
>
> + const struct gl_shader_program *shader_prog;
> +
> src_reg vertex_output;
> src_reg vertex_output_offset;
> src_reg temp;
> --
> 2.5.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list