VEC4_OPCODE_MOV_BYTES,
VEC4_OPCODE_PACK_BYTES,
VEC4_OPCODE_UNPACK_UNIFORM,
- VEC4_OPCODE_DOUBLE_TO_FLOAT,
- VEC4_OPCODE_FLOAT_TO_DOUBLE,
+ VEC4_OPCODE_FROM_DOUBLE,
+ VEC4_OPCODE_TO_DOUBLE,
VEC4_OPCODE_PICK_LOW_32BIT,
VEC4_OPCODE_PICK_HIGH_32BIT,
VEC4_OPCODE_SET_LOW_32BIT,
return "pack_bytes";
case VEC4_OPCODE_UNPACK_UNIFORM:
return "unpack_uniform";
- case VEC4_OPCODE_DOUBLE_TO_FLOAT:
- return "double_to_float";
- case VEC4_OPCODE_FLOAT_TO_DOUBLE:
- return "float_to_double";
+ case VEC4_OPCODE_FROM_DOUBLE:
+ return "double_to_single";
+ case VEC4_OPCODE_TO_DOUBLE:
+ return "single_to_double";
case VEC4_OPCODE_PICK_LOW_32BIT:
return "pick_low_32bit";
case VEC4_OPCODE_PICK_HIGH_32BIT:
{
switch (opcode) {
case SHADER_OPCODE_GEN4_SCRATCH_READ:
- case VEC4_OPCODE_DOUBLE_TO_FLOAT:
- case VEC4_OPCODE_FLOAT_TO_DOUBLE:
+ case VEC4_OPCODE_FROM_DOUBLE:
+ case VEC4_OPCODE_TO_DOUBLE:
case VEC4_OPCODE_PICK_LOW_32BIT:
case VEC4_OPCODE_PICK_HIGH_32BIT:
case VEC4_OPCODE_SET_LOW_32BIT:
swizzle = brw_swizzle_for_size(2);
break;
- case VEC4_OPCODE_FLOAT_TO_DOUBLE:
- case VEC4_OPCODE_DOUBLE_TO_FLOAT:
+ case VEC4_OPCODE_TO_DOUBLE:
+ case VEC4_OPCODE_FROM_DOUBLE:
case VEC4_OPCODE_PICK_LOW_32BIT:
case VEC4_OPCODE_PICK_HIGH_32BIT:
case VEC4_OPCODE_SET_LOW_32BIT:
is_align1_opcode(unsigned opcode)
{
switch (opcode) {
- case VEC4_OPCODE_DOUBLE_TO_FLOAT:
- case VEC4_OPCODE_FLOAT_TO_DOUBLE:
+ case VEC4_OPCODE_FROM_DOUBLE:
+ case VEC4_OPCODE_TO_DOUBLE:
case VEC4_OPCODE_PICK_LOW_32BIT:
case VEC4_OPCODE_PICK_HIGH_32BIT:
case VEC4_OPCODE_SET_LOW_32BIT:
break;
}
- case VEC4_OPCODE_DOUBLE_TO_FLOAT: {
- assert(src[0].type == BRW_REGISTER_TYPE_DF);
- assert(dst.type == BRW_REGISTER_TYPE_F);
+ case VEC4_OPCODE_FROM_DOUBLE: {
+ assert(type_sz(src[0].type) == 8);
+ assert(type_sz(dst.type) == 4);
brw_set_default_access_mode(p, BRW_ALIGN_1);
break;
}
- case VEC4_OPCODE_FLOAT_TO_DOUBLE: {
- assert(src[0].type == BRW_REGISTER_TYPE_F);
- assert(dst.type == BRW_REGISTER_TYPE_DF);
+ case VEC4_OPCODE_TO_DOUBLE: {
+ assert(type_sz(src[0].type) == 4);
+ assert(type_sz(dst.type) == 8);
brw_set_default_access_mode(p, BRW_ALIGN_1);
dst_reg temp2 = dst_reg(this, glsl_type::dvec4_type);
temp2 = retype(temp2, BRW_REGISTER_TYPE_F);
- emit(VEC4_OPCODE_DOUBLE_TO_FLOAT, temp2, src_reg(temp))
+ emit(VEC4_OPCODE_FROM_DOUBLE, temp2, src_reg(temp))
->size_written = 2 * REG_SIZE;
vec4_instruction *inst = emit(MOV(dst, src_reg(temp2)));
dst_reg tmp_dst = dst_reg(src_reg(this, glsl_type::dvec4_type));
src_reg tmp_src = src_reg(this, glsl_type::vec4_type);
emit(MOV(dst_reg(tmp_src), retype(op[0], BRW_REGISTER_TYPE_F)));
- emit(VEC4_OPCODE_FLOAT_TO_DOUBLE, tmp_dst, tmp_src);
+ emit(VEC4_OPCODE_TO_DOUBLE, tmp_dst, tmp_src);
vec4_instruction *inst = emit(MOV(dst, src_reg(tmp_dst)));
inst->saturate = instr->dest.saturate;
break;