struct gl_shader_program *shader_prog,
struct gl_program *prog,
unsigned dispatch_width)
- : backend_shader(brw, shader_prog, prog, prog_data, stage),
+ : backend_shader(brw, mem_ctx, shader_prog, prog, prog_data, stage),
key(key), prog_data(prog_data),
dispatch_width(dispatch_width), promoted_constants(0),
bld(fs_builder(this, dispatch_width).at_end())
{
- this->mem_ctx = mem_ctx;
-
switch (stage) {
case MESA_SHADER_FRAGMENT:
key_tex = &((const brw_wm_prog_key *) key)->tex;
}
backend_shader::backend_shader(struct brw_context *brw,
+ void *mem_ctx,
struct gl_shader_program *shader_prog,
struct gl_program *prog,
struct brw_stage_prog_data *stage_prog_data,
shader_prog(shader_prog),
prog(prog),
stage_prog_data(stage_prog_data),
+ mem_ctx(mem_ctx),
cfg(NULL),
stage(stage)
{
protected:
backend_shader(struct brw_context *brw,
+ void *mem_ctx,
struct gl_shader_program *shader_prog,
struct gl_program *prog,
struct brw_stage_prog_data *stage_prog_data,
shader_time_shader_type st_base,
shader_time_shader_type st_written,
shader_time_shader_type st_reset)
- : backend_shader(brw, shader_prog, prog, &prog_data->base, stage),
+ : backend_shader(brw, mem_ctx, shader_prog, prog, &prog_data->base, stage),
c(c),
key(key),
prog_data(prog_data),
st_written(st_written),
st_reset(st_reset)
{
- this->mem_ctx = mem_ctx;
this->failed = false;
this->base_ir = NULL;