- for (i = 0; i < vs->info.num_outputs; i++) {
- emit.element[i].input_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
- emit.element[i].input_buffer = 0;
- emit.element[i].input_offset = i * 4 * sizeof(float);
- emit.element[i].output_format = key->element[i].out.format;
- emit.element[i].output_offset = key->element[i].out.offset;
+ for (i = 0; i < key->nr_outputs; i++) {
+ if (key->element[i].out.format != EMIT_1F_PSIZE)
+ {
+ emit.element[i].type = TRANSLATE_ELEMENT_NORMAL;
+ emit.element[i].input_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
+ emit.element[i].input_buffer = 0;
+ emit.element[i].input_offset = key->element[i].out.vs_output * 4 * sizeof(float);
+ emit.element[i].instance_divisor = 0;
+ emit.element[i].output_format = draw_translate_vinfo_format(key->element[i].out.format);
+ emit.element[i].output_offset = key->element[i].out.offset;
+ assert(emit.element[i].input_offset <= fetch.output_stride);
+ }
+ else {
+ emit.element[i].type = TRANSLATE_ELEMENT_NORMAL;
+ emit.element[i].input_format = PIPE_FORMAT_R32_FLOAT;
+ emit.element[i].input_buffer = 1;
+ emit.element[i].input_offset = 0;
+ emit.element[i].instance_divisor = 0;
+ emit.element[i].output_format = PIPE_FORMAT_R32_FLOAT;
+ emit.element[i].output_offset = key->element[i].out.offset;
+ }