: brw(brw), c(c), prog(prog), fp(fp), dual_source_output(dual_source_output)
{
ctx = &brw->ctx;
+ prog_data = &c->prog_data;
mem_ctx = c;
brw_pop_insn_state(p);
uint32_t surf_index =
- c->prog_data.binding_table.render_target_start + inst->target;
+ prog_data->binding_table.render_target_start + inst->target;
brw_fb_WRITE(p,
dispatch_width,
inst->base_mrf,
eot,
inst->header_present);
- brw_mark_surface_used(&c->prog_data.base, surf_index);
+ brw_mark_surface_used(&prog_data->base, surf_index);
}
void
uint32_t surface_index = ((inst->opcode == SHADER_OPCODE_TG4 ||
inst->opcode == SHADER_OPCODE_TG4_OFFSET)
- ? c->prog_data.base.binding_table.gather_texture_start
- : c->prog_data.base.binding_table.texture_start) + inst->sampler;
+ ? prog_data->base.binding_table.gather_texture_start
+ : prog_data->base.binding_table.texture_start) + inst->sampler;
brw_SAMPLE(p,
retype(dst, BRW_REGISTER_TYPE_UW),
simd_mode,
return_format);
- brw_mark_surface_used(&c->prog_data.base, surface_index);
+ brw_mark_surface_used(&prog_data->base, surface_index);
}
brw_oword_block_read(p, dst, brw_message_reg(inst->base_mrf),
read_offset, surf_index);
- brw_mark_surface_used(&c->prog_data.base, surf_index);
+ brw_mark_surface_used(&prog_data->base, surf_index);
}
void
BRW_SAMPLER_SIMD_MODE_SIMD4X2,
0);
- brw_mark_surface_used(&c->prog_data.base, surf_index);
+ brw_mark_surface_used(&prog_data->base, surf_index);
}
void
simd_mode,
return_format);
- brw_mark_surface_used(&c->prog_data.base, surf_index);
+ brw_mark_surface_used(&prog_data->base, surf_index);
}
void
simd_mode,
0);
- brw_mark_surface_used(&c->prog_data.base, surf_index);
+ brw_mark_surface_used(&prog_data->base, surf_index);
}
/**
brw_MOV(p, payload_offset, offset);
brw_MOV(p, payload_value, value);
brw_shader_time_add(p, payload,
- c->prog_data.base.binding_table.shader_time_start);
+ prog_data->base.binding_table.shader_time_start);
brw_pop_insn_state(p);
- brw_mark_surface_used(&c->prog_data.base,
- c->prog_data.base.binding_table.shader_time_start);
+ brw_mark_surface_used(&prog_data->base,
+ prog_data->base.binding_table.shader_time_start);
}
void
atomic_op.dw1.ud, surf_index.dw1.ud,
inst->mlen, dispatch_width / 8);
- brw_mark_surface_used(&c->prog_data.base, surf_index.dw1.ud);
+ brw_mark_surface_used(&prog_data->base, surf_index.dw1.ud);
}
void
surf_index.dw1.ud,
inst->mlen, dispatch_width / 8);
- brw_mark_surface_used(&c->prog_data.base, surf_index.dw1.ud);
+ brw_mark_surface_used(&prog_data->base, surf_index.dw1.ud);
}
void
}
/* Save off the start of this SIMD16 program */
- c->prog_data.prog_offset_16 = p->nr_insn * sizeof(struct brw_instruction);
+ prog_data->prog_offset_16 = p->nr_insn * sizeof(struct brw_instruction);
brw_set_compression_control(p, BRW_COMPRESSION_COMPRESSED);
: gen8_generator(brw, shader_prog, fp ? &fp->Base : NULL, c), c(c), fp(fp),
dual_source_output(dual_source_output)
{
+ prog_data = &c->prog_data;
}
gen8_fs_generator::~gen8_fs_generator()
msg_control |= (1 << 4); /* Last Render Target Select */
uint32_t surf_index =
- c->prog_data.binding_table.render_target_start + ir->target;
+ prog_data->binding_table.render_target_start + ir->target;
gen8_set_dp_message(brw, inst,
GEN6_SFID_DATAPORT_RENDER_CACHE,
ir->header_present,
ir->eot);
- brw_mark_surface_used(&c->prog_data.base, surf_index);
+ brw_mark_surface_used(&prog_data->base, surf_index);
}
void
}
uint32_t surf_index =
- c->prog_data.base.binding_table.texture_start + ir->sampler;
+ prog_data->base.binding_table.texture_start + ir->sampler;
gen8_instruction *inst = next_inst(BRW_OPCODE_SEND);
gen8_set_dst(brw, inst, dst);
ir->header_present,
simd_mode);
- brw_mark_surface_used(&c->prog_data.base, surf_index);
+ brw_mark_surface_used(&prog_data->base, surf_index);
}
false, /* no header */
BRW_SAMPLER_SIMD_MODE_SIMD4X2);
- brw_mark_surface_used(&c->prog_data.base, surf_index);
+ brw_mark_surface_used(&prog_data->base, surf_index);
}
void
false, /* no header */
simd_mode);
- brw_mark_surface_used(&c->prog_data.base, surf_index);
+ brw_mark_surface_used(&prog_data->base, surf_index);
}
/**
ir->header_present,
false);
- brw_mark_surface_used(&c->prog_data.base, surf_index.dw1.ud);
+ brw_mark_surface_used(&prog_data->base, surf_index.dw1.ud);
}
void
ir->header_present,
false);
- brw_mark_surface_used(&c->prog_data.base, surf_index.dw1.ud);
+ brw_mark_surface_used(&prog_data->base, surf_index.dw1.ud);
}
void
NOP();
/* Save off the start of this SIMD16 program */
- c->prog_data.prog_offset_16 = nr_inst * sizeof(gen8_instruction);
+ prog_data->prog_offset_16 = nr_inst * sizeof(gen8_instruction);
dispatch_width = 16;
generate_code(simd16_instructions);