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;
* 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 &&
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();
{
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).
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)
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;
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;
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));
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();
* 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 &&
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);
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)
{
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;