[Mesa-dev] [PATCH 10/17] i965/vs: move ARB_vertex_program functions to vec4_vs_visitor.
Paul Berry
stereotype441 at gmail.com
Sun Apr 7 15:54:03 PDT 2013
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
---
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 fc12cb9..54109e4 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 98a74be..5332285 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 = p->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;
--
1.8.2
More information about the mesa-dev
mailing list