[Mesa-dev] [PATCH 08/10] gallium: introduce get_shader_param (ALL DRIVERS CHANGED)

Luca Barbieri luca at luca-barbieri.com
Sun Sep 5 18:46:57 PDT 2010


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     |   96 +++++++++++----------
 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/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     |   63 +++++++++-----
 24 files changed, 602 insertions(+), 346 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-gallium-introduce-get_shader_param-ALL-DRIVERS-CHANG.patch.gz
Type: application/x-gzip
Size: 10542 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100906/c39180f6/attachment-0001.bin>


More information about the mesa-dev mailing list