glsl/types: add new subroutine type (v3.2)
authorDave Airlie <airlied@redhat.com>
Mon, 20 Apr 2015 00:16:55 +0000 (10:16 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 23 Jul 2015 07:25:25 +0000 (17:25 +1000)
commit57f24299b7fe0f7b20c2a3cf1e94c747825b568d
treec2de7c35d3d0eefe644110fa5f106d23010ba12b
parentd16ff8ac783874c8ee74ef796b1c853829ff237d
glsl/types: add new subroutine type (v3.2)

This type will be used to store the name of subroutine types

as in subroutine void myfunc(void);
will store myfunc into a subroutine type.

This is required to the parser can identify a subroutine
type in a uniform decleration as a valid type, and also for
looking up the type later.

Also add contains_subroutine method.

v2: handle subroutine to int comparisons, needed
for lowering pass.
v3: do subroutine to int with it's own IR
operation to avoid hacking on asserts (Kayden)
v3.1: fix warnings in this patch, fix nir,
fix tgsi
v3.2: fixup tests

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Signed-off-by: Dave Airlie <airlied@redhat.com>
tests: fix warnings
13 files changed:
src/glsl/ast_to_hir.cpp
src/glsl/glsl_types.cpp
src/glsl/glsl_types.h
src/glsl/ir.cpp
src/glsl/ir.h
src/glsl/ir_builder.cpp
src/glsl/ir_builder.h
src/glsl/ir_clone.cpp
src/glsl/ir_validate.cpp
src/glsl/link_uniform_initializers.cpp
src/glsl/nir/nir_lower_io.c
src/glsl/tests/uniform_initializer_utils.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp