Mesa (master): gallium: introduce get_shader_param (ALL DRIVERS CHANGED) ( v3)

Luca Barbieri lb at kemper.freedesktop.org
Tue Sep 14 04:08:48 UTC 2010


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

Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Sun Sep  5 20:50:50 2010 +0200

gallium: introduce get_shader_param (ALL DRIVERS CHANGED) (v3)

Changes in v3:
- Also change trace, which I forgot about

Changes in v2:
- No longer adds tessellation shaders

Currently each shader cap has FS and VS versions.

However, we want a version of them for geometry, tessellation control,
and tessellation evaluation shaders, and want to be able to easily
query a given cap type for a given shader stage.

Since having 5 duplicates of each shader cap is unmanageable, add
a new get_shader_param function that takes both a shader cap from a
new enum and a shader stage.

Drivers with non-unified shaders will first switch on the shader
and, within each case, switch on the cap.

Drivers with unified shaders instead first check whether the shader
is supported, and then switch on the cap.

MAX_CONST_BUFFERS is now per-stage.
The geometry shader cap is removed in favor of checking whether the
limit of geometry shader instructions is greater than 0, which is also
used for tessellation shaders.

WARNING: all drivers changed and compiled but only nvfx tested

---

 src/gallium/auxiliary/draw/draw_context.h  |   13 +++
 src/gallium/auxiliary/tgsi/tgsi_exec.h     |   30 +++++++
 src/gallium/auxiliary/util/u_caps.c        |   29 ++++---
 src/gallium/auxiliary/util/u_caps.h        |    4 +
 src/gallium/auxiliary/util/u_inlines.h     |    1 -
 src/gallium/drivers/cell/ppu/cell_screen.c |   17 ++++-
 src/gallium/drivers/failover/fo_context.c  |    1 +
 src/gallium/drivers/galahad/glhd_context.c |    4 +-
 src/gallium/drivers/galahad/glhd_screen.c  |   12 +++
 src/gallium/drivers/i915/i915_screen.c     |   44 ++++++++++
 src/gallium/drivers/i965/brw_screen.c      |   44 ++++++++++
 src/gallium/drivers/identity/id_screen.c   |   14 +++-
 src/gallium/drivers/llvmpipe/lp_screen.c   |   50 ++++--------
 src/gallium/drivers/nv50/nv50_screen.c     |   64 ++++++++------
 src/gallium/drivers/nvfx/nvfx_screen.c     |  119 ++++++++++++++++----------
 src/gallium/drivers/r300/r300_screen.c     |   96 +++++++++++++--------
 src/gallium/drivers/r600/r600_screen.c     |   93 +++++++++++----------
 src/gallium/drivers/rbug/rbug_screen.c     |   12 +++
 src/gallium/drivers/softpipe/sp_screen.c   |   55 ++++---------
 src/gallium/drivers/svga/svga_screen.c     |  127 +++++++++++++++++-----------
 src/gallium/drivers/trace/tr_screen.c      |   25 ++++++
 src/gallium/include/pipe/p_compiler.h      |    1 +
 src/gallium/include/pipe/p_defines.h       |   46 ++++-------
 src/gallium/include/pipe/p_screen.h        |    6 ++
 src/mesa/state_tracker/st_extensions.c     |   52 ++++++-----
 25 files changed, 613 insertions(+), 346 deletions(-)

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



More information about the mesa-commit mailing list