summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-12-17 23:12:45 +0100
committerMarek Olšák <[email protected]>2012-01-15 07:28:35 +0100
commit2449695e822421fdcaf1c66dffc12d7d705ea69d (patch)
treee1866c15d7fc3749ea6240fe0f519970448c5b0b /src/gallium/drivers/nvc0
parentfaa90abfe0b6f55ab69768eb930b4ab5ef21cb06 (diff)
gallium: improve the pipe_stream_output_info struct (v2)
There are 3 changes: 1) stride is specified for each buffer, not just one, so that drivers don't have to derive it from the outputs 2) new per-output property dst_offset, which specifies the offset into the buffer in dwords where the output should be stored, so that drivers don't have to compute the offsets manually; this will also be useful for gl_SkipComponents from ARB_transform_feedback3 3) register_mask is removed, instead, there is start_component and num_components; register_mask with non-consecutive 1s doesn't make much sense (some hardware cannot do packing of components) Christoph Bumiller: fixed nvc0. v2: resolve merge conflicts in Draw and clean it up
Diffstat (limited to 'src/gallium/drivers/nvc0')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_program.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_program.c b/src/gallium/drivers/nvc0/nvc0_program.c
index cff76fe67f3..60abc224398 100644
--- a/src/gallium/drivers/nvc0/nvc0_program.c
+++ b/src/gallium/drivers/nvc0/nvc0_program.c
@@ -503,20 +503,17 @@ nvc0_program_create_tfb_state(const struct nv50_ir_prog_info *info,
tfb->varying_count[b] = 0;
for (i = 0; i < pso->num_outputs; ++i) {
+ unsigned startc = pso->output[i].start_component;
if (pso->output[i].output_buffer != b)
continue;
- for (c = 0; c < 4; ++c) {
- if (!(pso->output[i].register_mask & (1 << c)))
- continue;
+ for (c = 0; c < pso->output[i].num_components; ++c) {
tfb->varying_count[b]++;
tfb->varying_index[n++] =
- info->out[pso->output[i].register_index].slot[c];
+ info->out[pso->output[i].register_index].slot[startc + c];
}
}
- tfb->stride[b] = tfb->varying_count[b] * 4;
+ tfb->stride[b] = pso->stride[b] * 4;
}
- if (pso->stride)
- tfb->stride[0] = pso->stride;
return tfb;
}