a->conditional_mod == b->conditional_mod &&
a->dst.type == b->dst.type &&
a->sources == b->sources &&
- (a->is_tex() ? (a->texture_offset == b->texture_offset &&
+ (a->is_tex() ? (a->offset == b->offset &&
a->mlen == b->mlen &&
a->regs_written == b->regs_written &&
a->base_mrf == b->base_mrf &&
* Otherwise, we can use an implied move from g0 to the first message reg.
*/
if (inst->header_present) {
- if (brw->gen < 6 && !inst->texture_offset) {
+ if (brw->gen < 6 && !inst->offset) {
/* Set up an implied move from g0 to the MRF. */
src = retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW);
} else {
/* Explicitly set up the message header by copying g0 to the MRF. */
brw_MOV(p, header_reg, brw_vec8_grf(0, 0));
- if (inst->texture_offset) {
+ if (inst->offset) {
/* Set the offset bits in DWord 2. */
brw_MOV(p, get_element_ud(header_reg, 2),
- brw_imm_ud(inst->texture_offset));
+ brw_imm_ud(inst->offset));
}
brw_adjust_sampler_state_pointer(p, header_reg, sampler_index, dst);
inst->shadow_compare = true;
if (offset_value.file == IMM)
- inst->texture_offset = offset_value.fixed_hw_reg.dw1.ud;
+ inst->offset = offset_value.fixed_hw_reg.dw1.ud;
if (op == ir_tg4) {
- inst->texture_offset |=
+ inst->offset |=
gather_channel(gather_component, sampler) << 16; /* M0.2:16-17 */
if (brw->gen == 6)
const char *annotation;
/** @} */
- uint32_t texture_offset; /**< Texture offset bitfield */
- uint32_t offset; /**< spill/unspill offset */
+ uint32_t offset; /**< spill/unspill offset or texture offset bitfield */
uint8_t mlen; /**< SEND message length */
int8_t base_mrf; /**< First MRF in the SEND message, if mlen is nonzero. */
uint8_t target; /**< MRT target. */
* use an implied move from g0 to the first message register.
*/
if (inst->header_present) {
- if (brw->gen < 6 && !inst->texture_offset) {
+ if (brw->gen < 6 && !inst->offset) {
/* Set up an implied move from g0 to the MRF. */
src = brw_vec8_grf(0, 0);
} else {
brw_set_default_access_mode(p, BRW_ALIGN_1);
- if (inst->texture_offset) {
+ if (inst->offset) {
/* Set the texel offset bits in DWord 2. */
brw_MOV(p, get_element_ud(header, 2),
- brw_imm_ud(inst->texture_offset));
+ brw_imm_ud(inst->offset));
}
brw_adjust_sampler_state_pointer(p, header, sampler_index, dst);
this->no_dd_check = false;
this->writes_accumulator = false;
this->conditional_mod = BRW_CONDITIONAL_NONE;
- this->texture_offset = 0;
this->target = 0;
this->shadow_compare = false;
this->ir = v->base_ir;
vec4_instruction *inst = new(mem_ctx) vec4_instruction(this, opcode);
if (ir->offset != NULL && !has_nonconstant_offset) {
- inst->texture_offset =
+ inst->offset =
brw_texture_offset(ctx, ir->offset->as_constant()->value.i,
ir->offset->type->vector_elements);
}
/* Stuff the channel select bits in the top of the texture offset */
if (ir->op == ir_tg4)
- inst->texture_offset |= gather_channel(ir, sampler) << 16;
+ inst->offset |= gather_channel(ir, sampler) << 16;
/* The message header is necessary for:
* - Gen4 (always)
* - Sampler indices too large to fit in a 4-bit value.
*/
inst->header_present =
- brw->gen < 5 || inst->texture_offset != 0 || ir->op == ir_tg4 ||
+ brw->gen < 5 || inst->offset != 0 || ir->op == ir_tg4 ||
is_high_sampler(brw, sampler_reg);
inst->base_mrf = 2;
inst->mlen = inst->header_present + 1; /* always at least one */