mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 19:30:11 +01:00
i965: Initialize backend_shader::mem_ctx in its constructor.
We were initializing it in each subclasses' constructors for some reason. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
parent
d8eeb4917c
commit
ae097580ac
4 changed files with 5 additions and 5 deletions
|
|
@ -1984,13 +1984,11 @@ fs_visitor::fs_visitor(struct brw_context *brw,
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -757,6 +757,7 @@ brw_abs_immediate(enum brw_reg_type type, struct brw_reg *reg)
|
|||
}
|
||||
|
||||
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,
|
||||
|
|
@ -769,6 +770,7 @@ backend_shader::backend_shader(struct brw_context *brw,
|
|||
shader_prog(shader_prog),
|
||||
prog(prog),
|
||||
stage_prog_data(stage_prog_data),
|
||||
mem_ctx(mem_ctx),
|
||||
cfg(NULL),
|
||||
stage(stage)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -215,6 +215,7 @@ class backend_shader {
|
|||
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,
|
||||
|
|
|
|||
|
|
@ -3691,7 +3691,7 @@ vec4_visitor::vec4_visitor(struct brw_context *brw,
|
|||
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),
|
||||
|
|
@ -3704,7 +3704,6 @@ vec4_visitor::vec4_visitor(struct brw_context *brw,
|
|||
st_written(st_written),
|
||||
st_reset(st_reset)
|
||||
{
|
||||
this->mem_ctx = mem_ctx;
|
||||
this->failed = false;
|
||||
|
||||
this->base_ir = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue