/* Get the referenced image variable and type. */
const nir_variable *var = instr->variables[0]->var;
const glsl_type *type = var->type->without_array();
- const brw_reg_type base_type = get_image_base_type(type);
/* Get the size of the image. */
const fs_reg image = get_nir_image_deref(instr->variables[0]);
bld.MOV(offset(retype(dest, BRW_REGISTER_TYPE_D), bld, c),
fs_reg(1));
} else if (c == 1 && is_1d_array_image) {
- bld.MOV(offset(retype(dest, base_type), bld, c),
+ bld.MOV(offset(retype(dest, BRW_REGISTER_TYPE_D), bld, c),
offset(size, bld, 2));
} else if (c == 2 && is_cube_array_image) {
bld.emit(SHADER_OPCODE_INT_QUOTIENT,
- offset(retype(dest, base_type), bld, c),
+ offset(retype(dest, BRW_REGISTER_TYPE_D), bld, c),
offset(size, bld, c), fs_reg(6));
} else {
- bld.MOV(offset(retype(dest, base_type), bld, c),
+ bld.MOV(offset(retype(dest, BRW_REGISTER_TYPE_D), bld, c),
offset(size, bld, c));
}
}