[Mesa-dev] [PATCH 0/5] gallium: kill PIPE_CAP_SM3

Erik Faye-Lund erik.faye-lund at collabora.com
Fri Jul 5 15:16:08 UTC 2019


Every time I stumble over PIPE_CAP_SM3, I get a bit depressed. This cap
is different than most caps in Gallium, as it's much broader, and I
need to read up a lot to try to figure out anything specific about what
it does. Shader Model 3.0 is a *big* feature-set.

It seems I'm not the only one who feels this way, because of the
comment in screen.rst, saying "XXX oh god this is horrible".

But there's some more direct issues lurking as well: Some mobile GPUs
can support some, but not all of the SM3 features. For instance, Mali-
400 supports OES_standard_derivatives but not FP32 precision (which is
a SM3 requirement). So when it's time for the Lima driver to implement
OES_standard_derivatives, something needs to be done anyway.

So, here's patches that turns PIPE_CAP_SM3 into
PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD,
PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES and
PIPE_CAP_VERTEX_SHADER_SATURATE, which is what we care about anyway.

As I don't know much about the hardware capabilities of the various
drivers, I've just kept functionality as it is for now. I can imagine
some drivers might want to benefit from this already. For instance,
some drivers might be able to enable PIPE_CAP_VERTEX_SHADER_SATURATE
without enabling the rest. But for now, I leave that up to follow-up
patches.

I'm intentionally sending just the cover-letter here. You can see the
merge request on gitlab here:
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1266

Erik Faye-Lund (5):
  mesa/st: drop needless has_shader_model3 boolean
  gallium: give fragment-shader texture-lod its own cap
  gallium: give fragment-shader derivatives its own cap
  gallium: give vertex-shader saturate its own cap
  gallium: get rid of PIPE_CAP_SM3

 src/gallium/auxiliary/util/u_screen.c            |  4 +++-
 src/gallium/docs/source/screen.rst               |  8 ++++++--
 src/gallium/drivers/etnaviv/etnaviv_screen.c     |  4 +++-
 src/gallium/drivers/freedreno/freedreno_screen.c |  4 +++-
 src/gallium/drivers/i915/i915_screen.c           |  4 +++-
 src/gallium/drivers/iris/iris_screen.c           |  4 +++-
 src/gallium/drivers/llvmpipe/lp_screen.c         |  4 +++-
 src/gallium/drivers/nouveau/nv30/nv30_screen.c   |  4 +++-
 src/gallium/drivers/nouveau/nv50/nv50_screen.c   |  4 +++-
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   |  4 +++-
 src/gallium/drivers/panfrost/pan_screen.c        |  4 +++-
 src/gallium/drivers/r300/r300_screen.c           |  4 +++-
 src/gallium/drivers/r600/r600_pipe.c             |  4 +++-
 src/gallium/drivers/radeonsi/si_get.c            |  4 +++-
 src/gallium/drivers/softpipe/sp_screen.c         |  4 +++-
 src/gallium/drivers/svga/svga_screen.c           |  4 +++-
 src/gallium/drivers/swr/swr_screen.cpp           |  5 +++--
 src/gallium/drivers/v3d/v3d_screen.c             |  4 +++-
 src/gallium/drivers/virgl/virgl_screen.c         |  4 +++-
 src/gallium/include/pipe/p_defines.h             |  4 +++-
 src/gallium/state_trackers/nine/adapter9.c       | 10 +++++++++-
 src/mesa/state_tracker/st_context.c              |  3 +--
 src/mesa/state_tracker/st_context.h              |  1 -
 src/mesa/state_tracker/st_extensions.c           |  4 ++--
 24 files changed, 75 insertions(+), 28 deletions(-)

-- 
2.20.1



More information about the mesa-dev mailing list