summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.h11
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp11
-rw-r--r--src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp15
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);