diff options
Diffstat (limited to 'src/gallium/drivers/r300/r300_swtcl_emit.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_swtcl_emit.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/src/gallium/drivers/r300/r300_swtcl_emit.c b/src/gallium/drivers/r300/r300_swtcl_emit.c index 327d4ac2e1..3ce1837ed1 100644 --- a/src/gallium/drivers/r300/r300_swtcl_emit.c +++ b/src/gallium/drivers/r300/r300_swtcl_emit.c @@ -177,6 +177,7 @@ static boolean r300_swtcl_render_set_primitive(struct vbuf_render* render, static void prepare_render(struct r300_swtcl_render* render) { struct r300_context* r300 = render->r300; + int i; CS_LOCALS(r300); @@ -185,27 +186,38 @@ static void prepare_render(struct r300_swtcl_render* render) r300_emit_dirty_state(r300); /* Take care of vertex formats and routes. */ - BEGIN_CS(3); + BEGIN_CS(6); + OUT_CS_REG_SEQ(R300_VAP_VTX_STATE_CNTL, 2); + OUT_CS(r300->vertex_info.vinfo.hwfmt[0]); + OUT_CS(r300->vertex_info.vinfo.hwfmt[1]); OUT_CS_REG_SEQ(R300_VAP_OUTPUT_VTX_FMT_0, 2); - OUT_CS(r300->vertex_info.hwfmt[0]); - OUT_CS(r300->vertex_info.hwfmt[1]); + OUT_CS(r300->vertex_info.vinfo.hwfmt[2]); + OUT_CS(r300->vertex_info.vinfo.hwfmt[3]); END_CS; - /* Draw stuff! */ - BEGIN_CS(6); + BEGIN_CS(18); + OUT_CS_REG_SEQ(R300_VAP_PROG_STREAM_CNTL_0, 8); + for (i = 0; i < 8; i++) { + OUT_CS(r300->vertex_info.vap_prog_stream_cntl[i]); + } + OUT_CS_REG_SEQ(R300_VAP_PROG_STREAM_CNTL_EXT_0, 8); + for (i = 0; i < 8; i++) { + OUT_CS(r300->vertex_info.vap_prog_stream_cntl_ext[i]); + } + END_CS; /* Set the pointer to our vertex buffer. The emitted values are this: * PACKET3 [3D_LOAD_VBPNTR] * COUNT [1] * FORMAT [size | stride << 8] * VBPNTR [relocated BO] - * - * And of course that extra dword is space for the relocation. */ + */ + BEGIN_CS(5); OUT_CS(CP_PACKET3(R300_PACKET3_3D_LOAD_VBPNTR, 3)); OUT_CS(1); - OUT_CS(r300->vertex_info.size | (r300->vertex_info.size << 8)); - OUT_CS(0); + OUT_CS(r300->vertex_info.vinfo.size | (r300->vertex_info.vinfo.size << 8)); OUT_CS_RELOC(render->vbo, 0, RADEON_GEM_DOMAIN_GTT, 0, 0); + END_CS; } static void r300_swtcl_render_draw_arrays(struct vbuf_render* render, |