r600g: add support for primitive id without geom shader (v2)

Graphics / Mesa 3D Graphics Library / Mesa - Dave Airlie [redhat.com] - 27 January 2015 17:51 UTC

GLSL 1.50 specifies a fragment shader may have a primitive id input without a geometry shader present.

On r600 hw there is a special GS scenario for this, you have to enable GS_SCENARIO_A and pass the primitive id through the vertex shader which operates in GS_A mode.

This is a first pass attempt at this, and passes the piglit tests that test for this.

v1.1: clean up debug print + no need to assign key value to setup output.
v2: add r600 support

349df23 r600g: add support for primitive id without geom shader (v2)
src/gallium/drivers/r600/evergreen_state.c | 5 +++++
src/gallium/drivers/r600/r600_hw_context.c | 2 +-
src/gallium/drivers/r600/r600_shader.c | 31 ++++++++++++++++++++++++++
src/gallium/drivers/r600/r600_shader.h | 4 ++++
src/gallium/drivers/r600/r600_state.c | 5 +++++
src/gallium/drivers/r600/r600_state_common.c | 5 +++++
6 files changed, 51 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share