diff options
author | Paul Berry <[email protected]> | 2013-04-08 17:17:44 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-04-11 09:25:24 -0700 |
commit | fe97f26c86d65b1b0e026c725c7da348a91093d9 (patch) | |
tree | b937a82e4ad524e391cb6ec0f8eac7430adb8652 | |
parent | 5b0bd8ece855bf4e2171bb5e81968b858fc4792e (diff) |
i965: Rename backend_visitor::prog to shader_prog.
The next patch is going to change the type of vec4_visitor::vp from
struct gl_vertex_program * to struct gl_program *, and rename it. The
sensible name to change it to is vec4_visitor::prog. However, prog is
already used in backend_visitor (which vec4_visitor derives from).
Since backend_visitor::prog is of type struct gl_shader_program *, it
makes sense to rename it to shader_prog.
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 12 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 11 |
7 files changed, 22 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index c12ba4571a9..4338ae6db0e 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -616,8 +616,8 @@ void fs_visitor::emit_shader_time_write(enum shader_time_shader_type type, fs_reg value) { - int shader_time_index = brw_get_shader_time_index(brw, prog, &fp->Base, - type); + int shader_time_index = + brw_get_shader_time_index(brw, shader_prog, &fp->Base, type); fs_reg offset = fs_reg(shader_time_index * SHADER_TIME_STRIDE); fs_reg payload; @@ -852,8 +852,8 @@ fs_visitor::setup_uniform_values(ir_variable *ir) * with our name, or the prefix of a component that starts with our name. */ unsigned params_before = c->prog_data.nr_params; - for (unsigned u = 0; u < prog->NumUserUniformStorage; u++) { - struct gl_uniform_storage *storage = &prog->UniformStorage[u]; + for (unsigned u = 0; u < shader_prog->NumUserUniformStorage; u++) { + struct gl_uniform_storage *storage = &shader_prog->UniformStorage[u]; if (strncmp(ir->name, storage->name, namelen) != 0 || (storage->name[namelen] != 0 && diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 60e3e0a9c5b..115a878d99a 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -223,7 +223,7 @@ public: fs_visitor(struct brw_context *brw, struct brw_wm_compile *c, - struct gl_shader_program *prog, + struct gl_shader_program *shader_prog, struct gl_fragment_program *fp, unsigned dispatch_width); ~fs_visitor(); diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index d54d13410ae..422816d5abd 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -1361,7 +1361,8 @@ fs_visitor::visit(ir_texture *ir) { fs_inst *inst = NULL; - int sampler = _mesa_get_sampler_uniform_value(ir->sampler, prog, &fp->Base); + int sampler = + _mesa_get_sampler_uniform_value(ir->sampler, shader_prog, &fp->Base); /* FINISHME: We're failing to recompile our programs when the sampler is * updated. This only matters for the texture rectangle scale parameters * (pre-gen6, or gen6+ with GL_CLAMP). @@ -2371,7 +2372,7 @@ fs_visitor::resolve_bool_comparison(ir_rvalue *rvalue, fs_reg *reg) fs_visitor::fs_visitor(struct brw_context *brw, struct brw_wm_compile *c, - struct gl_shader_program *prog, + struct gl_shader_program *shader_prog, struct gl_fragment_program *fp, unsigned dispatch_width) : dispatch_width(dispatch_width) @@ -2379,12 +2380,13 @@ fs_visitor::fs_visitor(struct brw_context *brw, this->c = c; this->brw = brw; this->fp = fp; - this->prog = prog; + this->shader_prog = shader_prog; this->intel = &brw->intel; this->ctx = &intel->ctx; this->mem_ctx = ralloc_context(NULL); - if (prog) - shader = (struct brw_shader *) prog->_LinkedShaders[MESA_SHADER_FRAGMENT]; + if (shader_prog) + shader = (struct brw_shader *) + shader_prog->_LinkedShaders[MESA_SHADER_FRAGMENT]; else shader = NULL; this->failed = false; diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h index 9d21d8f5eb8..a29618f7343 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.h +++ b/src/mesa/drivers/dri/i965/brw_shader.h @@ -42,7 +42,7 @@ public: struct intel_context *intel; struct gl_context *ctx; struct brw_shader *shader; - struct gl_shader_program *prog; + struct gl_shader_program *shader_prog; /** ralloc context for temporary data used during compile */ void *mem_ctx; diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 67dd17a45e3..672beb78a05 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -1376,8 +1376,8 @@ void vec4_visitor::emit_shader_time_write(enum shader_time_shader_type type, src_reg value) { - int shader_time_index = brw_get_shader_time_index(brw, prog, &vp->Base, - type); + int shader_time_index = + brw_get_shader_time_index(brw, shader_prog, &vp->Base, type); dst_reg dst = dst_reg(this, glsl_type::get_array_instance(glsl_type::vec4_type, 2)); diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index e286925a0ea..10f0c9d7abc 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.h +++ b/src/mesa/drivers/dri/i965/brw_vec4.h @@ -211,7 +211,7 @@ class vec4_visitor : public backend_visitor public: vec4_visitor(struct brw_context *brw, struct brw_vs_compile *c, - struct gl_shader_program *prog, + struct gl_shader_program *shader_prog, struct brw_shader *shader, void *mem_ctx); ~vec4_visitor(); diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index ed8e65deb33..20b5330de43 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -586,8 +586,8 @@ vec4_visitor::setup_uniform_values(ir_variable *ir) * order we'd walk the type, so walk the list of storage and find anything * with our name, or the prefix of a component that starts with our name. */ - for (unsigned u = 0; u < prog->NumUserUniformStorage; u++) { - struct gl_uniform_storage *storage = &prog->UniformStorage[u]; + for (unsigned u = 0; u < shader_prog->NumUserUniformStorage; u++) { + struct gl_uniform_storage *storage = &shader_prog->UniformStorage[u]; if (strncmp(ir->name, storage->name, namelen) != 0 || (storage->name[namelen] != 0 && @@ -2077,7 +2077,8 @@ vec4_visitor::visit(ir_call *ir) void vec4_visitor::visit(ir_texture *ir) { - int sampler = _mesa_get_sampler_uniform_value(ir->sampler, prog, &vp->Base); + int sampler = + _mesa_get_sampler_uniform_value(ir->sampler, shader_prog, &vp->Base); /* Should be lowered by do_lower_texture_projection */ assert(!ir->projector); @@ -2984,7 +2985,7 @@ vec4_visitor::resolve_ud_negate(src_reg *reg) vec4_visitor::vec4_visitor(struct brw_context *brw, struct brw_vs_compile *c, - struct gl_shader_program *prog, + struct gl_shader_program *shader_prog, struct brw_shader *shader, void *mem_ctx) { @@ -2992,7 +2993,7 @@ vec4_visitor::vec4_visitor(struct brw_context *brw, this->brw = brw; this->intel = &brw->intel; this->ctx = &intel->ctx; - this->prog = prog; + this->shader_prog = shader_prog; this->shader = shader; this->mem_ctx = mem_ctx; |