diff options
author | Paul Berry <[email protected]> | 2013-02-15 20:12:13 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-04-11 09:25:25 -0700 |
commit | e9be5a05f70be7cff58b29bff07af71e6d339085 (patch) | |
tree | 61ef54e081bb01b776b91a1aea403ff732cd4409 /src/mesa/drivers | |
parent | 5fff3752c88255ea3f4eb26cddb2c996694b33b1 (diff) |
i965/vs: Make vec4_vs_visitor class derived from vec4_visitor.
This patch just creates the derived class; later patches will migrate
VS-specific functions and data structures from the base class into the
derived class.
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.h | 11 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 11 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp | 15 |
4 files changed, 37 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 279637ec108..5164411cc4a 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -1532,7 +1532,7 @@ brw_vs_emit(struct brw_context *brw, } } - vec4_visitor v(brw, c, prog_data, prog, shader, mem_ctx); + vec4_vs_visitor v(brw, c, prog_data, prog, shader, mem_ctx); if (!v.run()) { prog->LinkStatus = false; ralloc_strcat(&prog->InfoLog, v.fail_msg); diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index cc2b95ff495..73dd8ec6532 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.h +++ b/src/mesa/drivers/dri/i965/brw_vec4.h @@ -486,6 +486,17 @@ public: void dump_instructions(); }; +class vec4_vs_visitor : public vec4_visitor +{ +public: + vec4_vs_visitor(struct brw_context *brw, + struct brw_vs_compile *c, + struct brw_vs_prog_data *prog_data, + struct gl_shader_program *prog, + struct brw_shader *shader, + void *mem_ctx); +}; + /** * The vertex shader code generator. * diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index 12f7f02d8b8..43af033cc9a 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -3033,6 +3033,17 @@ vec4_visitor::~vec4_visitor() } +vec4_vs_visitor::vec4_vs_visitor(struct brw_context *brw, + struct brw_vs_compile *c, + struct brw_vs_prog_data *prog_data, + struct gl_shader_program *prog, + struct brw_shader *shader, + void *mem_ctx) + : vec4_visitor(brw, c, prog_data, prog, shader, mem_ctx) +{ +} + + void vec4_visitor::fail(const char *format, ...) { diff --git a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp index fb55714f73f..418edd22978 100644 --- a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp +++ b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp @@ -42,6 +42,19 @@ public: vec4_visitor *v; }; + +class register_coalesce_vec4_visitor : public vec4_visitor +{ +public: + register_coalesce_vec4_visitor(struct brw_context *brw, + struct brw_vs_compile *c, + struct gl_shader_program *shader_prog) + : vec4_visitor(brw, c, NULL, shader_prog, NULL, NULL) + { + } +}; + + void register_coalesce_test::SetUp() { brw = (struct brw_context *)calloc(1, sizeof(*brw)); @@ -53,7 +66,7 @@ void register_coalesce_test::SetUp() shader_prog = ralloc(NULL, struct gl_shader_program); - v = new vec4_visitor(brw, c, NULL, shader_prog, NULL, NULL); + v = new register_coalesce_vec4_visitor(brw, c, shader_prog); _mesa_init_vertex_program(ctx, &c->vp->program, GL_VERTEX_SHADER, 0); |