From 0ce95222aff64a316b95c67ef427901ffbe3e061 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Fri, 15 Feb 2013 20:27:03 -0800 Subject: [PATCH] i965/vs: move ARB_vertex_program functions to vec4_vs_visitor. This patch moves functions from vec4_visitor to vec4_vs_visitor that deal with ARB (assembly) vertex programs. There's no point in having these functions in the base class since we don't intend to support assembly programs for the GS stage. The following functions are moved: - setup_vp_regs - get_vp_dst_reg - get_vp_src_reg Reviewed-by: Jordan Justen Reviewed-by: Eric Anholt Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_vec4.h | 8 +++++--- src/mesa/drivers/dri/i965/brw_vec4_vp.cpp | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index 6bc0d304f12..144d29f9d7f 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.h +++ b/src/mesa/drivers/dri/i965/brw_vec4.h @@ -401,11 +401,8 @@ public: /** Walks an exec_list of ir_instruction and sends it through this visitor. */ void visit_instructions(const exec_list *list); - void setup_vp_regs(); void emit_vp_sop(uint32_t condmod, dst_reg dst, src_reg src0, src_reg src1, src_reg one); - dst_reg get_vp_dst_reg(const prog_dst_register &dst); - src_reg get_vp_src_reg(const prog_src_register &src); void emit_bool_to_cond_code(ir_rvalue *ir, uint32_t *predicate); void emit_bool_comparison(unsigned int op, dst_reg dst, src_reg src0, src_reg src1); @@ -505,6 +502,11 @@ protected: virtual void emit_prolog(); virtual void emit_program_code(); virtual void emit_thread_end(); + +private: + void setup_vp_regs(); + dst_reg get_vp_dst_reg(const prog_dst_register &dst); + src_reg get_vp_src_reg(const prog_src_register &src); }; /** diff --git a/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp b/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp index abb64ed4938..3f1d3a7b34f 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp @@ -420,7 +420,7 @@ vec4_vs_visitor::emit_program_code() } void -vec4_visitor::setup_vp_regs() +vec4_vs_visitor::setup_vp_regs() { /* PROGRAM_TEMPORARY */ int num_temp = prog->NumTemporaries; @@ -464,7 +464,7 @@ vec4_visitor::setup_vp_regs() } dst_reg -vec4_visitor::get_vp_dst_reg(const prog_dst_register &dst) +vec4_vs_visitor::get_vp_dst_reg(const prog_dst_register &dst) { dst_reg result; @@ -498,7 +498,7 @@ vec4_visitor::get_vp_dst_reg(const prog_dst_register &dst) } src_reg -vec4_visitor::get_vp_src_reg(const prog_src_register &src) +vec4_vs_visitor::get_vp_src_reg(const prog_src_register &src) { struct gl_program_parameter_list *plist = c->vp->program.Base.Parameters; -- 2.30.2