aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-02-17 11:25:37 -0800
committerPaul Berry <[email protected]>2013-04-11 09:25:25 -0700
commit9bb6840b28a9a77377d437198c62d705cade5370 (patch)
treeaac8cfa8fddb7871d298dcde5887f087ead65c84 /src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
parent4d773603d33f5628a7e7f407371187a650c3e6e5 (diff)
i965/vs: Generalize data structures pointed to by vec4_generator.
This patch removes the following field from vec4_generator, since it is not used: - struct brw_vs_compile *c And changes the following field: - struct gl_vertex_program *vp => struct gl_program *prog With these changes, vec4_generator no longer refers to any VS-specific data structures. This will pave the way for re-using it for geometry shaders. Reviewed-by: Jordan Justen <[email protected]> v2: Use the name "prog" rather than "p". Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4_emit.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_emit.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
index 9f985b0b8ad..4fec4e49bf6 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
@@ -133,13 +133,12 @@ vec4_instruction::get_src(int i)
}
vec4_generator::vec4_generator(struct brw_context *brw,
- struct brw_vs_compile *c,
struct gl_shader_program *shader_prog,
+ struct gl_program *prog,
void *mem_ctx)
- : brw(brw), c(c), shader_prog(shader_prog), mem_ctx(mem_ctx)
+ : brw(brw), shader_prog(shader_prog), prog(prog), mem_ctx(mem_ctx)
{
intel = &brw->intel;
- vp = &c->vp->program;
shader = shader_prog ? shader_prog->_LinkedShaders[MESA_SHADER_VERTEX] : NULL;
@@ -710,7 +709,7 @@ vec4_generator::generate_code(exec_list *instructions)
if (shader) {
printf("Native code for vertex shader %d:\n", shader_prog->Name);
} else {
- printf("Native code for vertex program %d:\n", c->vp->program.Base.Id);
+ printf("Native code for vertex program %d:\n", prog->Id);
}
}
@@ -728,7 +727,7 @@ vec4_generator::generate_code(exec_list *instructions)
} else {
const prog_instruction *vpi;
vpi = (const prog_instruction *) inst->ir;
- printf("%d: ", (int)(vpi - vp->Base.Instructions));
+ printf("%d: ", (int)(vpi - prog->Instructions));
_mesa_fprint_instruction_opt(stdout, vpi, 0,
PROG_PRINT_DEBUG, NULL);
}