These are the last users of struct gen7_sampler_state.
v2: Use a local sampler_state_size variable, to help distinguish the
various 16s (suggested by Topi Pohjolainen).
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* exclusively use the offset - we have to use both.
*/
assert(brw->gen >= 8 || brw->is_haswell);
+ const int sampler_state_size = 16; /* 16 bytes */
brw_ADD(p,
get_element_ud(header_reg, 3),
get_element_ud(brw_vec8_grf(0, 0), 3),
- brw_imm_ud(16 * (inst->sampler / 16) *
- sizeof(gen7_sampler_state)));
+ brw_imm_ud(16 * (inst->sampler / 16) * sampler_state_size));
}
brw_pop_insn_state(p);
}
* offset, and each sampler state is only 16-bytes, so we can't
* exclusively use the offset - we have to use both.
*/
+ const int sampler_state_size = 16; /* 16 bytes */
assert(brw->gen >= 8 || brw->is_haswell);
brw_ADD(p,
get_element_ud(header, 3),
get_element_ud(brw_vec8_grf(0, 0), 3),
- brw_imm_ud(16 * (inst->sampler / 16) *
- sizeof(gen7_sampler_state)));
+ brw_imm_ud(16 * (inst->sampler / 16) * sampler_state_size));
}
brw_pop_insn_state(p);
}
* offset, and each sampler state is only 16-bytes, so we can't
* exclusively use the offset - we have to use both.
*/
+ const int sampler_state_size = 16; /* 16 bytes */
gen8_instruction *add =
ADD(get_element_ud(src, 3),
get_element_ud(brw_vec8_grf(0, 0), 3),
- brw_imm_ud(16 * (ir->sampler / 16) *
- sizeof(gen7_sampler_state)));
+ brw_imm_ud(16 * (ir->sampler / 16) * sampler_state_size));
gen8_set_mask_control(add, BRW_MASK_DISABLE);
}
* offset, and each sampler state is only 16-bytes, so we can't
* exclusively use the offset - we have to use both.
*/
+ const int sampler_state_size = 16; /* 16 bytes */
gen8_instruction *add =
ADD(get_element_ud(brw_message_reg(ir->base_mrf), 3),
get_element_ud(brw_vec8_grf(0, 0), 3),
- brw_imm_ud(16 * (ir->sampler / 16) *
- sizeof(gen7_sampler_state)));
+ brw_imm_ud(16 * (ir->sampler / 16) * sampler_state_size));
gen8_set_mask_control(add, BRW_MASK_DISABLE);
}