[Mesa-dev] [PATCH 0/3] Sample shading support in gallium

Ilia Mirkin imirkin at alum.mit.edu
Sun Mar 30 17:52:22 PDT 2014


This patch series adds enough support to gallium to make ARB_sample_shading
work. There's also an initial implementation for nv50 although it doesn't
actually to work. I've done some amount of debugging and don't see what's
going wrong yet. However all the TGSI (and nv50) shaders contain the expected
contents, so at least it does what I want :) Probably some subtlety in the
pushbuf method setup that I'm missing.

The only question is whether I'm handling gl_SampleMask reasonably. It doesn't
seem like any current driver supports over 32x MSAA, so treating it like an
array feels like it would just add unnecessary complication. (Also that whole
logic with setting up the mapping... I'm not 100% sure on it, please check
over it carefully.)

Ilia Mirkin (3):
  gallium: add basic support for ARB_sample_shading
  mesa/st: add support for ARB_sample_shading
  nv50: add support for PIPE_CAP_SAMPLE_SHADING

 src/gallium/auxiliary/cso_cache/cso_context.c      | 19 ++++++++
 src/gallium/auxiliary/cso_cache/cso_context.h      |  4 ++
 src/gallium/auxiliary/tgsi/tgsi_strings.c          |  5 +-
 src/gallium/docs/source/context.rst                |  3 ++
 src/gallium/docs/source/screen.rst                 |  3 ++
 src/gallium/docs/source/tgsi.rst                   | 20 ++++++++
 src/gallium/drivers/freedreno/freedreno_screen.c   |  1 +
 src/gallium/drivers/i915/i915_screen.c             |  1 +
 src/gallium/drivers/ilo/ilo_screen.c               |  1 +
 src/gallium/drivers/llvmpipe/lp_screen.c           |  1 +
 src/gallium/drivers/nouveau/codegen/nv50_ir.h      |  1 +
 .../drivers/nouveau/codegen/nv50_ir_driver.h       |  1 +
 .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp  |  8 ++++
 .../nouveau/codegen/nv50_ir_lowering_nv50.cpp      | 12 +++++
 .../drivers/nouveau/codegen/nv50_ir_print.cpp      |  1 +
 .../nouveau/codegen/nv50_ir_target_nv50.cpp        |  2 +
 src/gallium/drivers/nouveau/nv30/nv30_screen.c     |  1 +
 src/gallium/drivers/nouveau/nv50/nv50_context.h    |  7 ++-
 src/gallium/drivers/nouveau/nv50/nv50_program.c    |  5 +-
 src/gallium/drivers/nouveau/nv50/nv50_program.h    |  1 +
 src/gallium/drivers/nouveau/nv50/nv50_screen.c     |  2 +
 .../drivers/nouveau/nv50/nv50_shader_state.c       | 11 +++++
 src/gallium/drivers/nouveau/nv50/nv50_state.c      |  9 ++++
 .../drivers/nouveau/nv50/nv50_state_validate.c     | 53 +++++++++++++++++++++-
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c     |  1 +
 src/gallium/drivers/r300/r300_screen.c             |  1 +
 src/gallium/drivers/r600/r600_pipe.c               |  1 +
 src/gallium/drivers/radeonsi/si_pipe.c             |  1 +
 src/gallium/drivers/softpipe/sp_screen.c           |  1 +
 src/gallium/drivers/svga/svga_screen.c             |  1 +
 src/gallium/include/pipe/p_context.h               |  3 ++
 src/gallium/include/pipe/p_defines.h               |  3 +-
 src/gallium/include/pipe/p_shader_tokens.h         |  5 +-
 src/mesa/program/program.c                         | 39 ++++++++++------
 src/mesa/program/program.h                         |  4 ++
 src/mesa/state_tracker/st_atom.c                   |  1 +
 src/mesa/state_tracker/st_atom.h                   |  1 +
 src/mesa/state_tracker/st_atom_msaa.c              | 24 ++++++++++
 src/mesa/state_tracker/st_extensions.c             |  3 +-
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp         | 16 ++++++-
 src/mesa/state_tracker/st_program.c                | 21 +++++----
 41 files changed, 266 insertions(+), 32 deletions(-)

-- 
1.8.3.2



More information about the mesa-dev mailing list