diff options
author | Cooper Yuan <[email protected]> | 2009-08-24 13:56:23 +0800 |
---|---|---|
committer | Cooper Yuan <[email protected]> | 2009-08-24 13:56:23 +0800 |
commit | 7ee4f32dcdd4cc935ed48ffb46ecc6678047958e (patch) | |
tree | 982b89804b8518db6dabfb4f98b84dd36affa87a /src/gallium/drivers/r300 | |
parent | 2b29d210188f760a6a90d3a3a35dd185e4b28d8b (diff) |
r300g: Set the vector address in the input memory for bypass_vs_clip_and_viewport case
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r-- | src/gallium/drivers/r300/r300_state_derived.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c index ea670f41fb5..c01e61a9b19 100644 --- a/src/gallium/drivers/r300/r300_state_derived.c +++ b/src/gallium/drivers/r300/r300_state_derived.c @@ -49,59 +49,63 @@ static void r300_vs_tab_routes(struct r300_context* r300, assert(info->num_inputs <= 16); - if (r300screen->caps->has_tcl) { - /* Just copy vert attribs over as-is. */ + if (!r300screen->caps->has_tcl || !r300->rs_state->enable_vte) + { for (i = 0; i < info->num_inputs; i++) { - tab[i] = i; - } - for (i = 0; i < info->num_outputs; i++) { - switch (info->output_semantic_name[i]) { + switch (info->input_semantic_name[i]) { case TGSI_SEMANTIC_POSITION: pos = TRUE; + tab[i] = 0; break; case TGSI_SEMANTIC_COLOR: + tab[i] = 2 + cols; cols++; break; case TGSI_SEMANTIC_PSIZE: psize = TRUE; + tab[i] = 15; break; case TGSI_SEMANTIC_FOG: fog = TRUE; /* Fall through */ case TGSI_SEMANTIC_GENERIC: + tab[i] = 6 + texs; texs++; break; default: - debug_printf("r300: Unknown vertex output %d\n", - info->output_semantic_name[i]); + debug_printf("r300: Unknown vertex input %d\n", + info->input_semantic_name[i]); break; } } - } else { + } + else + { + /* Just copy vert attribs over as-is. */ for (i = 0; i < info->num_inputs; i++) { - switch (info->input_semantic_name[i]) { + tab[i] = i; + } + + for (i = 0; i < info->num_outputs; i++) { + switch (info->output_semantic_name[i]) { case TGSI_SEMANTIC_POSITION: pos = TRUE; - tab[i] = 0; break; case TGSI_SEMANTIC_COLOR: - tab[i] = 2 + cols; cols++; break; case TGSI_SEMANTIC_PSIZE: psize = TRUE; - tab[i] = 15; break; case TGSI_SEMANTIC_FOG: fog = TRUE; /* Fall through */ case TGSI_SEMANTIC_GENERIC: - tab[i] = 6 + texs; texs++; break; default: - debug_printf("r300: Unknown vertex input %d\n", - info->input_semantic_name[i]); + debug_printf("r300: Unknown vertex output %d\n", + info->output_semantic_name[i]); break; } } |