dst->f[3] = 1.0f / sqrtf(fabsf(src->f[3]));
}
+static void
+micro_sqrt(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->f[0] = sqrtf(fabsf(src->f[0]));
+ dst->f[1] = sqrtf(fabsf(src->f[1]));
+ dst->f[2] = sqrtf(fabsf(src->f[2]));
+ dst->f[3] = sqrtf(fabsf(src->f[3]));
+}
+
static void
micro_seq(union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src0,
exec_vector_trinary(mach, inst, micro_cnd, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
break;
+ case TGSI_OPCODE_SQRT:
+ exec_vector_unary(mach, inst, micro_sqrt, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
+ break;
+
case TGSI_OPCODE_DP2A:
exec_dp2a(mach, inst);
break;
{ 1, 2, 0, 0, 0, 0, COMP, "SUB", TGSI_OPCODE_SUB },
{ 1, 3, 0, 0, 0, 0, COMP, "LRP", TGSI_OPCODE_LRP },
{ 1, 3, 0, 0, 0, 0, COMP, "CND", TGSI_OPCODE_CND },
- { 0, 0, 0, 0, 0, 0, NONE, "", 20 }, /* removed */
+ { 1, 1, 0, 0, 0, 0, REPL, "SQRT", TGSI_OPCODE_SQRT },
{ 1, 3, 0, 0, 0, 0, REPL, "DP2A", TGSI_OPCODE_DP2A },
{ 0, 0, 0, 0, 0, 0, NONE, "", 22 }, /* removed */
{ 0, 0, 0, 0, 0, 0, NONE, "", 23 }, /* removed */