else
assert(index < VARYING_SLOT_MAX);
- assert(t->outputMapping[index] < Elements(t->outputs));
+ assert(t->outputMapping[index] < ARRAY_SIZE(t->outputs));
return t->outputs[t->outputMapping[index]];
case PROGRAM_TEMPORARY:
assert(index >= 0);
- assert(index < Elements(t->temps));
+ assert(index < ARRAY_SIZE(t->temps));
if (ureg_dst_is_undef(t->temps[index]))
t->temps[index] = ureg_DECL_temporary( t->ureg );
return ureg_src(t->temps[index]);
return t->constants[index];
case PROGRAM_INPUT:
- assert(t->inputMapping[index] < Elements(t->inputs));
+ assert(t->inputMapping[index] < ARRAY_SIZE(t->inputs));
return t->inputs[t->inputMapping[index]];
case PROGRAM_OUTPUT:
- assert(t->outputMapping[index] < Elements(t->outputs));
+ assert(t->outputMapping[index] < ARRAY_SIZE(t->outputs));
return ureg_src(t->outputs[t->outputMapping[index]]); /* not needed? */
case PROGRAM_ADDRESS:
return ureg_src(t->address[index]);
case PROGRAM_SYSTEM_VALUE:
- assert(index < Elements(t->systemValues));
+ assert(index < ARRAY_SIZE(t->systemValues));
return t->systemValues[index];
default:
if (num_dst)
dst[0] = translate_dst( t,
&inst->DstReg,
- inst->SaturateMode,
+ inst->Saturate,
clamp_dst_color_output);
for (i = 0; i < num_src; i++)
unsigned i;
enum pipe_error ret = PIPE_OK;
- assert(numInputs <= Elements(t->inputs));
- assert(numOutputs <= Elements(t->outputs));
+ assert(numInputs <= ARRAY_SIZE(t->inputs));
+ assert(numOutputs <= ARRAY_SIZE(t->outputs));
t = &translate;
memset(t, 0, sizeof *t);
}
else if (procType == TGSI_PROCESSOR_GEOMETRY) {
for (i = 0; i < numInputs; i++) {
- t->inputs[i] = ureg_DECL_gs_input(ureg,
- i,
- inputSemanticName[i],
- inputSemanticIndex[i]);
+ t->inputs[i] = ureg_DECL_input(ureg,
+ inputSemanticName[i],
+ inputSemanticIndex[i], 0, 1);
}
for (i = 0; i < numOutputs; i++) {
free(t->constants);
if (t->error) {
- debug_printf("%s: translate error flag set\n", __FUNCTION__);
+ debug_printf("%s: translate error flag set\n", __func__);
}
return ret;