brw_set_default_compression_control(struct brw_codegen *p,
enum brw_compression compression_control)
{
- p->compressed = (compression_control == BRW_COMPRESSION_COMPRESSED);
-
if (p->devinfo->gen >= 6) {
/* Since we don't use the SIMD32 support in gen6, we translate
* the pre-gen6 compression control here.
{
assert(p->current != &p->stack[BRW_EU_MAX_INSN_STACK-1]);
memcpy(p->current + 1, p->current, sizeof(brw_inst));
- p->compressed_stack[p->current - p->stack] = p->compressed;
p->current++;
}
{
assert(p->current != p->stack);
p->current--;
- p->compressed = p->compressed_stack[p->current - p->stack];
}
p->store = rzalloc_array(mem_ctx, brw_inst, p->store_size);
p->nr_insn = 0;
p->current = p->stack;
- p->compressed = false;
memset(p->current, 0, sizeof(p->current[0]));
p->mem_ctx = mem_ctx;
* type and regioning so the instruction is considered compressed
* or not accordingly.
*/
- p->compressed = inst->dst.component_size(inst->exec_size) > REG_SIZE;
- brw_set_default_compression(p, p->compressed);
+ const bool compressed =
+ inst->dst.component_size(inst->exec_size) > REG_SIZE;
+ brw_set_default_compression(p, compressed);
brw_set_default_group(p, inst->force_sechalf ? 8 : 0);
for (unsigned int i = 0; i < inst->sources; i++) {
src[i] = brw_reg_from_fs_reg(inst, &inst->src[i], devinfo->gen,
- p->compressed);
+ compressed);
/* The accumulator result appears to get used for the
* conditional modifier generation. When negating a UD
inst->src[i].type != BRW_REGISTER_TYPE_UD ||
!inst->src[i].negate);
}
- dst = brw_reg_from_fs_reg(inst, &inst->dst, devinfo->gen,
- p->compressed);
+ dst = brw_reg_from_fs_reg(inst, &inst->dst, devinfo->gen, compressed);
brw_set_default_access_mode(p, BRW_ALIGN_1);
brw_set_default_predicate_control(p, inst->predicate);