[Mesa-dev] [PATCH 0/7] gallium: catch up with mesa's system values

Ilia Mirkin imirkin at alum.mit.edu
Wed Apr 23 20:48:48 PDT 2014


This adds support for gl_SampleMaskIn and gl_InvocationID system values to
gallium, mesa/st, and nvc0. The relevant piglit tests pass, except 2
gl_InvocationID-related ones that fail due to the linking being delayed by
mesa/st (I think). I wrote a lame one for gl_SampleMaskIn that just makes sure
that it's == 1 in a non-ms scenario, as nothing better seemed to be available.

None of this functionality is actually available yet since it's all behind
ARB_gpu_shader5. However you can test it out by adding
MESA_EXTENSION_OVERRIDE=GL_ARB_gpu_shader5

Note that this patchset applies on top of my ARB_sample_shading patch because
that one adds the earlier system values.

Ilia Mirkin (7):
  gallium: add INVOCATIONID semantic
  gallium: add GS_INVOCATIONS property
  mesa/st: translate gl_SampleMaskIn to SAMPLEMASK semantic
  mesa/st: translate gl_InvocationID to INVOCATIONID semantic
  nvc0/ir: add support for SAMPLEMASK sysval
  nvc0/ir: add support for INVOCATIONID system value
  nvc0/ir: set instance count based on the GS_INSTANCES property

 src/gallium/auxiliary/tgsi/tgsi_strings.c                     | 3 ++-
 src/gallium/auxiliary/tgsi/tgsi_ureg.c                        | 9 +++++++++
 src/gallium/docs/source/tgsi.rst                              | 6 ++++++
 src/gallium/drivers/nouveau/codegen/nv50_ir.h                 | 1 +
 src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp     | 6 +++---
 src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 4 ++++
 src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp         | 1 +
 src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp   | 1 +
 src/gallium/drivers/nouveau/nvc0/nvc0_program.c               | 1 -
 src/gallium/include/pipe/p_shader_tokens.h                    | 6 ++++--
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp                    | 2 ++
 11 files changed, 33 insertions(+), 7 deletions(-)

-- 
1.8.3.2



More information about the mesa-dev mailing list