/* Now the main event: Visit the shader IR and generate our FS IR for it.
*/
- fs_visitor v(c, prog, shader, 8);
+ fs_visitor v(c, prog, 8);
if (!v.run()) {
prog->LinkStatus = false;
ralloc_strcat(&prog->InfoLog, v.fail_msg);
}
if (intel->gen >= 5 && c->prog_data.nr_pull_params == 0) {
- fs_visitor v2(c, prog, shader, 16);
+ fs_visitor v2(c, prog, 16);
v2.import_uniforms(&v);
if (!v2.run()) {
perf_debug("16-wide shader failed to compile, falling back to "
public:
fs_visitor(struct brw_wm_compile *c, struct gl_shader_program *prog,
- struct brw_shader *shader, unsigned dispatch_width);
+ unsigned dispatch_width);
~fs_visitor();
fs_reg *variable_storage(ir_variable *var);
}
fs_visitor::fs_visitor(struct brw_wm_compile *c, struct gl_shader_program *prog,
- struct brw_shader *shader, unsigned dispatch_width)
+ unsigned dispatch_width)
: dispatch_width(dispatch_width)
{
this->c = c;
this->intel = &brw->intel;
this->ctx = &intel->ctx;
this->mem_ctx = ralloc_context(NULL);
- this->shader = shader;
+ if (prog)
+ shader = (struct brw_shader *) prog->_LinkedShaders[MESA_SHADER_FRAGMENT];
+ else
+ shader = NULL;
this->failed = false;
this->variable_ht = hash_table_ctor(0,
hash_table_pointer_hash,