Mesa (master): gallium: Implement draw_vbo and set_index_buffer for all drivers.

Chia-I Wu olv at kemper.freedesktop.org
Thu Jul 29 05:45:45 UTC 2010


Module: Mesa
Branch: master
Commit: 6d28bf917fb1d741d90fd3f05c22769376021fca
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6d28bf917fb1d741d90fd3f05c22769376021fca

Author: Chia-I Wu <olv at lunarg.com>
Date:   Fri Jul 16 04:35:58 2010 +0800

gallium: Implement draw_vbo and set_index_buffer for all drivers.

Some drivers define a generic function that is called by all drawing
functions.  To implement draw_vbo for such drivers, either draw_vbo
calls the generic function or the prototype of the generic function is
changed to match draw_vbo.

Other drivers have no such generic function.  draw_vbo is implemented by
calling either draw_arrays and draw_elements.

For most drivers, set_index_buffer does not mark the state dirty for
tracking.  Instead, the index buffer state is emitted whenever draw_vbo
is called, just like the case with draw_elements.  It surely can be
improved.

---

 src/gallium/auxiliary/util/u_draw_quad.h          |   30 +++++
 src/gallium/drivers/cell/ppu/cell_context.h       |    1 +
 src/gallium/drivers/cell/ppu/cell_draw_arrays.c   |   69 ++++++++---
 src/gallium/drivers/cell/ppu/cell_state_vertex.c  |   16 +++
 src/gallium/drivers/failover/fo_context.c         |   61 ++++++---
 src/gallium/drivers/failover/fo_context.h         |    2 +
 src/gallium/drivers/failover/fo_state.c           |   18 +++
 src/gallium/drivers/failover/fo_state_emit.c      |    5 +
 src/gallium/drivers/galahad/glhd_context.c        |   47 +++++++
 src/gallium/drivers/i915/i915_context.c           |   70 ++++++++---
 src/gallium/drivers/i915/i915_context.h           |    1 +
 src/gallium/drivers/i915/i915_state.c             |   14 ++
 src/gallium/drivers/i965/brw_context.h            |    1 +
 src/gallium/drivers/i965/brw_draw.c               |   87 ++++++++-----
 src/gallium/drivers/i965/brw_draw_upload.c        |    7 +-
 src/gallium/drivers/i965/brw_pipe_vertex.c        |   31 +++++
 src/gallium/drivers/identity/id_context.c         |   30 +++++
 src/gallium/drivers/llvmpipe/lp_context.h         |    1 +
 src/gallium/drivers/llvmpipe/lp_draw_arrays.c     |   90 +++++++++----
 src/gallium/drivers/llvmpipe/lp_state_vertex.c    |   14 ++
 src/gallium/drivers/nv50/nv50_context.c           |    1 +
 src/gallium/drivers/nv50/nv50_context.h           |    3 +
 src/gallium/drivers/nv50/nv50_state.c             |   15 ++
 src/gallium/drivers/nv50/nv50_vbo.c               |   31 +++++
 src/gallium/drivers/nvfx/nvfx_context.c           |    1 +
 src/gallium/drivers/nvfx/nvfx_context.h           |    5 +-
 src/gallium/drivers/nvfx/nvfx_state.c             |   15 ++
 src/gallium/drivers/nvfx/nvfx_vbo.c               |   39 +++++-
 src/gallium/drivers/r300/r300_context.h           |    2 +
 src/gallium/drivers/r300/r300_render.c            |  142 +++++++++++++--------
 src/gallium/drivers/r300/r300_render_stencilref.c |   22 +++
 src/gallium/drivers/r300/r300_state.c             |   18 +++
 src/gallium/drivers/r600/r600_context.c           |    1 +
 src/gallium/drivers/r600/r600_context.h           |    3 +
 src/gallium/drivers/r600/r600_draw.c              |   27 ++++
 src/gallium/drivers/r600/r600_state.c             |   18 +++
 src/gallium/drivers/rbug/rbug_context.c           |   34 +++++
 src/gallium/drivers/softpipe/sp_context.c         |    2 +
 src/gallium/drivers/softpipe/sp_context.h         |    1 +
 src/gallium/drivers/softpipe/sp_draw_arrays.c     |   92 +++++++++-----
 src/gallium/drivers/softpipe/sp_state.h           |    7 +
 src/gallium/drivers/softpipe/sp_state_vertex.c    |   14 ++
 src/gallium/drivers/svga/svga_context.h           |    1 +
 src/gallium/drivers/svga/svga_pipe_draw.c         |   24 ++++
 src/gallium/drivers/svga/svga_pipe_vertex.c       |   19 +++
 src/gallium/drivers/trace/tr_context.c            |   52 ++++++++
 src/gallium/drivers/trace/tr_dump_state.c         |   20 +++
 src/gallium/drivers/trace/tr_dump_state.h         |    2 +
 48 files changed, 1004 insertions(+), 202 deletions(-)

Diff:   http://cgit.freedesktop.org/mesa/mesa/diff/?id=6d28bf917fb1d741d90fd3f05c22769376021fca



More information about the mesa-commit mailing list