[TGSI_OPCODE_EX2] = { TOY_OPCODE_EXP, 1, 1 },
[TGSI_OPCODE_LG2] = { TOY_OPCODE_LOG, 1, 1 },
[TGSI_OPCODE_POW] = { TOY_OPCODE_POW, 1, 2 },
- [TGSI_OPCODE_ABS] = { GEN6_OPCODE_MOV, 1, 1 },
[TGSI_OPCODE_DPH] = { GEN6_OPCODE_DPH, 1, 2 },
[TGSI_OPCODE_COS] = { TOY_OPCODE_COS, 1, 1 },
[TGSI_OPCODE_KILL] = { TOY_OPCODE_KIL, 0, 0 },
case TGSI_OPCODE_SUB:
src[1] = tsrc_negate(src[1]);
break;
- case TGSI_OPCODE_ABS:
case TGSI_OPCODE_IABS:
src[0] = tsrc_absolute(src[0]);
break;
inst->dst = dst[0];
}
- assert(num_src <= Elements(inst->src));
+ assert(num_src <= ARRAY_SIZE(inst->src));
for (i = 0; i < num_src; i++)
inst->src[i] = src[i];
}
inst->opcode = opcode;
inst->tex.target = tgsi_inst->Texture.Texture;
- assert(tgsi_inst->Instruction.NumSrcRegs <= Elements(inst->src));
+ assert(tgsi_inst->Instruction.NumSrcRegs <= ARRAY_SIZE(inst->src));
assert(tgsi_inst->Instruction.NumDstRegs == 1);
inst->dst = dst[0];
inst = tc_add(tc);
inst->opcode = opcode;
- assert(tgsi_inst->Instruction.NumSrcRegs <= Elements(inst->src));
+ assert(tgsi_inst->Instruction.NumSrcRegs <= ARRAY_SIZE(inst->src));
assert(tgsi_inst->Instruction.NumDstRegs == 1);
inst->dst = dst[0];
[TGSI_OPCODE_LG2] = aos_simple,
[TGSI_OPCODE_POW] = aos_simple,
[TGSI_OPCODE_XPD] = aos_XPD,
- [TGSI_OPCODE_ABS] = aos_simple,
[TGSI_OPCODE_DPH] = aos_simple,
[TGSI_OPCODE_COS] = aos_simple,
[TGSI_OPCODE_DDX] = aos_unsupported,
[TGSI_OPCODE_LG2] = soa_scalar_replicate,
[TGSI_OPCODE_POW] = soa_scalar_replicate,
[TGSI_OPCODE_XPD] = soa_XPD,
- [TGSI_OPCODE_ABS] = soa_per_channel,
[TGSI_OPCODE_DPH] = soa_dot_product,
[TGSI_OPCODE_COS] = soa_scalar_replicate,
[TGSI_OPCODE_DDX] = soa_partial_derivative,
(decl->Declaration.Interpolate) ? &decl->Interp: &default_interp;
int index;
- if (decl->Range.Last >= Elements(tgsi->inputs)) {
+ if (decl->Range.Last >= ARRAY_SIZE(tgsi->inputs)) {
assert(!"invalid IN");
return;
}
{
int index;
- if (decl->Range.Last >= Elements(tgsi->outputs)) {
+ if (decl->Range.Last >= ARRAY_SIZE(tgsi->outputs)) {
assert(!"invalid OUT");
return;
}
{
int index;
- if (decl->Range.Last >= Elements(tgsi->system_values)) {
+ if (decl->Range.Last >= ARRAY_SIZE(tgsi->system_values)) {
assert(!"invalid SV");
return;
}