util_blitter_save_stencil_ref(r300->blitter, &(r300->stencil_ref));
util_blitter_save_rasterizer(r300->blitter, r300->rs_state.state);
util_blitter_save_fragment_shader(r300->blitter, r300->fs);
- util_blitter_save_vertex_shader(r300->blitter, r300->vs);
+ util_blitter_save_vertex_shader(r300->blitter, r300->vs_state.state);
+ util_blitter_save_viewport(r300->blitter, &r300->viewport);
+ util_blitter_save_clip(r300->blitter, &r300->clip);
}
/* Clear currently bound buffers. */
struct r300_viewport_state* viewport = (struct r300_viewport_state*)state;
CS_LOCALS(r300);
- if (r300->tcl_bypass) {
- BEGIN_CS(2); /* XXX tcl_bypass will be removed in gallium anyway */
- OUT_CS_REG(R300_VAP_VTE_CNTL, 0);
- END_CS;
- } else {
- BEGIN_CS(size);
- OUT_CS_REG_SEQ(R300_SE_VPORT_XSCALE, 6);
- OUT_CS_32F(viewport->xscale);
- OUT_CS_32F(viewport->xoffset);
- OUT_CS_32F(viewport->yscale);
- OUT_CS_32F(viewport->yoffset);
- OUT_CS_32F(viewport->zscale);
- OUT_CS_32F(viewport->zoffset);
- OUT_CS_REG(R300_VAP_VTE_CNTL, viewport->vte_control);
- END_CS;
- BEGIN_CS(9);
- OUT_CS_REG_SEQ(R300_SE_VPORT_XSCALE, 6);
- OUT_CS_32F(viewport->xscale);
- OUT_CS_32F(viewport->xoffset);
- OUT_CS_32F(viewport->yscale);
- OUT_CS_32F(viewport->yoffset);
- OUT_CS_32F(viewport->zscale);
- OUT_CS_32F(viewport->zoffset);
- OUT_CS_REG(R300_VAP_VTE_CNTL, viewport->vte_control);
- END_CS;
-}
-
-void r300_emit_texture_count(struct r300_context* r300)
-{
- uint32_t tx_enable = 0;
- int i;
- CS_LOCALS(r300);
-
- /* Notice that texture_count and sampler_count are just sizes
- * of the respective arrays. We still have to check for the individual
- * elements. */
- for (i = 0; i < MIN2(r300->sampler_count, r300->texture_count); i++) {
- if (r300->textures[i]) {
- tx_enable |= 1 << i;
- }
-- }
-
- BEGIN_CS(2);
- OUT_CS_REG(R300_TX_ENABLE, tx_enable);
- END_CS;
-
++ BEGIN_CS(size);
++ OUT_CS_REG_SEQ(R300_SE_VPORT_XSCALE, 6);
++ OUT_CS_32F(viewport->xscale);
++ OUT_CS_32F(viewport->xoffset);
++ OUT_CS_32F(viewport->yscale);
++ OUT_CS_32F(viewport->yoffset);
++ OUT_CS_32F(viewport->zscale);
++ OUT_CS_32F(viewport->zoffset);
++ OUT_CS_REG(R300_VAP_VTE_CNTL, viewport->vte_control);
++ END_CS;
}
-void r300_emit_ztop_state(struct r300_context* r300, void* state)
+void r300_emit_ztop_state(struct r300_context* r300,
+ unsigned size, void* state)
{
struct r300_ztop_state* ztop = (struct r300_ztop_state*)state;
CS_LOCALS(r300);
int identity[16] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
int* stream_tab;
- /* If TCL is bypassed, map vertex streams to equivalent VS output
- * locations. */
- if (r300->tcl_bypass) {
- stream_tab = vs->stream_loc_notcl;
- } else {
- stream_tab = identity;
- }
+ memset(vformat, 0, sizeof(struct r300_vertex_stream_state));
+
+ stream_tab = identity;
/* Vertex shaders have no semantics on their inputs,
* so PSC should just route stuff based on the vertex elements,