summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_state.c
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2011-11-04 18:33:31 -0400
committerAlex Deucher <[email protected]>2011-11-04 18:33:31 -0400
commitdf121b868a13e7ca76f19d1488b625c02d632a47 (patch)
treea17bcccfa62933d10926e28045ffa30ddecbe7f4 /src/gallium/drivers/r600/r600_state.c
parent9212637f34c6600daaf162f95ca49e3c42abbc40 (diff)
Revert "r600g: precalculate semantic indices for SPI setup"
This reverts commit c15f8569fddac5f8aee77863922fd5bb992cfe8a. This breaks r6xx.
Diffstat (limited to 'src/gallium/drivers/r600/r600_state.c')
-rw-r--r--src/gallium/drivers/r600/r600_state.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index ce65da668df..bf3da791c81 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -2142,19 +2142,22 @@ void r600_pipe_shader_vs(struct pipe_context *ctx, struct r600_pipe_shader *shad
struct r600_pipe_state *rstate = &shader->rstate;
struct r600_shader *rshader = &shader->shader;
unsigned spi_vs_out_id[10];
- unsigned i, tmp, nparams = 0;
+ unsigned i, tmp, nparams;
/* clear previous register */
rstate->nregs = 0;
- for (i = 0; i < rshader->noutput; i++) {
- if (rshader->output[i].spi_sid) {
- tmp = rshader->output[i].spi_sid << ((nparams & 3) * 8);
- spi_vs_out_id[nparams / 4] |= tmp;
- nparams++;
- }
+ /* so far never got proper semantic id from tgsi */
+ /* FIXME better to move this in config things so they get emited
+ * only one time per cs
+ */
+ for (i = 0; i < 10; i++) {
+ spi_vs_out_id[i] = 0;
+ }
+ for (i = 0; i < 32; i++) {
+ tmp = i << ((i & 3) * 8);
+ spi_vs_out_id[i / 4] |= tmp;
}
-
for (i = 0; i < 10; i++) {
r600_pipe_state_add_reg(rstate,
R_028614_SPI_VS_OUT_ID_0 + i * 4,
@@ -2165,6 +2168,7 @@ void r600_pipe_shader_vs(struct pipe_context *ctx, struct r600_pipe_shader *shad
* VS is required to export at least one param and r600_shader_from_tgsi()
* takes care of adding a dummy export.
*/
+ nparams = rshader->noutput - rshader->npos;
if (nparams < 1)
nparams = 1;