Merge branch 'gallium-no-rhw-position'
authorMichal Krol <michal@vmware.com>
Tue, 2 Mar 2010 12:35:30 +0000 (13:35 +0100)
committerMichal Krol <michal@vmware.com>
Tue, 2 Mar 2010 12:35:30 +0000 (13:35 +0100)
Conflicts:
src/gallium/drivers/r300/r300_blit.c
src/gallium/drivers/r300/r300_emit.c
src/gallium/drivers/r300/r300_state_derived.c

1  2 
src/gallium/drivers/r300/r300_blit.c
src/gallium/drivers/r300/r300_context.h
src/gallium/drivers/r300/r300_emit.c
src/gallium/drivers/r300/r300_state.c
src/gallium/drivers/r300/r300_state_derived.c
src/gallium/drivers/softpipe/sp_video_context.c

index 32d05749bdbd53d2565b2c65d94fb89ac75a3c78,ec7414dc3693d88f3187d0cfa574e02442d24e74..8acb1098b9629b208d500b390fa4783cfdd2c437
@@@ -33,7 -33,9 +33,9 @@@ static void r300_blitter_save_states(st
      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. */
index b98fe347b8838d10125179920d26b393ead1d375,97100c08ccb4307cc65b2dcf6150066467dfc8c8..0d1518a05bc32985c7e187a6912c8c022dc841a4
@@@ -351,11 -331,12 +351,15 @@@ struct r300_context 
      struct pipe_vertex_element vertex_element[PIPE_MAX_ATTRIBS];
      int vertex_element_count;
  
 +    /* Vertex info for Draw. */
 +    struct vertex_info vertex_info;
 +
      struct pipe_stencil_ref stencil_ref;
  
+     struct pipe_clip_state clip;
+     struct pipe_viewport_state viewport;
      /* Bitmask of dirty state objects. */
      uint32_t dirty_state;
      /* Flag indicating whether or not the HW is dirty. */
index 17d55ba3b435554d207624e5397dcf8d56b094e6,37ebe6c49df3913229cc318428fc95638d72d8ff..addb28bded3baa93b4d8b57423b80eafcb00b24d
@@@ -946,26 -928,40 +938,20 @@@ void r300_emit_viewport_state(struct r3
      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);
index 12bf083871133ef2afc4961eadc288ab220ae6d8,ebb859138fa652fa23e3ff43b6fef5f46c2458d7..b732380a14533e11046a1d1f31f291bdcce3486f
@@@ -811,11 -825,8 +812,9 @@@ static void r300_bind_rs_state(struct p
      }
  
      if (rs) {
-         r300->tcl_bypass = rs->rs.bypass_vs_clip_and_viewport;
          r300->polygon_offset_enabled = rs->rs.offset_cw || rs->rs.offset_ccw;
 +        r300->rs_state.dirty = TRUE;
      } else {
-         r300->tcl_bypass = FALSE;
          r300->polygon_offset_enabled = FALSE;
      }
  
index 6eb7f2bfd19907499efaae7283f3b33ecc6172e5,778eaaacd99942b7b3278ae64a308c4e999592d6..9c8e907fdf72bc79054952749b22726fc22b896d
@@@ -117,15 -114,7 +117,9 @@@ static void r300_vertex_psc(struct 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,