diff options
author | Marek Olšák <[email protected]> | 2010-05-02 06:24:55 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-05-02 12:56:34 +0200 |
commit | 68e720e12d51cf6d5237467a74af8c56b021acb7 (patch) | |
tree | 804718853b5add078944e5e1feeda6a16b4f5567 /src/gallium/drivers/r300/r300_emit.c | |
parent | 35232172db40fc756f3a0d1c17ed19e696a8878d (diff) |
r300g: merge VS output mapping state (VAP) to rasterizer block state (RS)
These two should be tied together because what's set in VAP or stuffed in GA
should be rasterized in RS. Not doing so causes a hardlock.
The reason for the merge is that if stuffed texture coordinates (e.g. point
sprite texgen) happen to occupy the texcoord slot dedicated to fog or wpos,
the two must be relocated to other free slots, which needs remapping the vertex
shader outputs.
The rasterizer code is now literally a sequence read-rasterize-write.
Diffstat (limited to 'src/gallium/drivers/r300/r300_emit.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_emit.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index 92b7517b8d6..23bbc6a99c8 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -717,6 +717,13 @@ void r300_emit_rs_block_state(struct r300_context* r300, DBG(r300, DBG_DRAW, "r300: RS emit:\n"); BEGIN_CS(size); + OUT_CS_REG_SEQ(R300_VAP_VTX_STATE_CNTL, 2); + OUT_CS(rs->vap_vtx_state_cntl); + OUT_CS(rs->vap_vsm_vtx_assm); + OUT_CS_REG_SEQ(R300_VAP_OUTPUT_VTX_FMT_0, 2); + OUT_CS(rs->vap_out_vtx_fmt[0]); + OUT_CS(rs->vap_out_vtx_fmt[1]); + if (r300->screen->caps.is_r500) { OUT_CS_REG_SEQ(R500_RS_IP_0, count); } else { @@ -901,25 +908,6 @@ void r300_emit_vertex_stream_state(struct r300_context* r300, END_CS; } -void r300_emit_vap_output_state(struct r300_context* r300, - unsigned size, void* state) -{ - struct r300_vap_output_state *vap_out_state = - (struct r300_vap_output_state*)state; - CS_LOCALS(r300); - - DBG(r300, DBG_DRAW, "r300: VAP emit:\n"); - - BEGIN_CS(size); - OUT_CS_REG_SEQ(R300_VAP_VTX_STATE_CNTL, 2); - OUT_CS(vap_out_state->vap_vtx_state_cntl); - OUT_CS(vap_out_state->vap_vsm_vtx_assm); - OUT_CS_REG_SEQ(R300_VAP_OUTPUT_VTX_FMT_0, 2); - OUT_CS(vap_out_state->vap_out_vtx_fmt[0]); - OUT_CS(vap_out_state->vap_out_vtx_fmt[1]); - END_CS; -} - void r300_emit_pvs_flush(struct r300_context* r300, unsigned size, void* state) { CS_LOCALS(r300); |