glsl: add uniform and program resource support (v2)
authorDave Airlie <airlied@redhat.com>
Mon, 20 Apr 2015 00:27:36 +0000 (10:27 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 23 Jul 2015 07:25:43 +0000 (17:25 +1000)
commit60266863d80bb2af94fa5c189ccd23ee20607ea9
tree9b7a90ddee9f98523508d95a201463f61ddb3126
parent44ea8b9b8edc5f59da546683fe64129a1c1be449
glsl: add uniform and program resource support (v2)

This adds linker support for subroutine uniforms, they
have some subtle differences from real uniforms, we also hide
them and they are given internal uniform names.

This also adds the subroutine locations and subroutine uniforms
to the program resource tracking for later use.

v1.1: drop is_subroutine_def

v2: handle explicit location properly, ARB_explicit_location
has a lot of language for subroutine shaders.
Calculate a link time the number of compatible subroutines
for a uniform, to make program resource easier later.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/glsl/ir_uniform.h
src/glsl/link_uniforms.cpp
src/glsl/linker.cpp