glsl/types: add new subroutine type (v3.2)

Graphics / Mesa 3D Graphics Library / Mesa - Dave Airlie [redhat.com] - 23 July 2015 02:25 UTC

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

57f2429 glsl/types: add new subroutine type (v3.2)
src/glsl/ast_to_hir.cpp | 1 +
src/glsl/glsl_types.cpp | 66 ++++++++++++++++++++++++++
src/glsl/glsl_types.h | 19 ++++++++
src/glsl/ir.cpp | 2 +
src/glsl/ir.h | 1 +
src/glsl/ir_builder.cpp | 6 +++
src/glsl/ir_builder.h | 1 +
src/glsl/ir_clone.cpp | 1 +
src/glsl/ir_validate.cpp | 4 ++
src/glsl/link_uniform_initializers.cpp | 1 +
src/glsl/nir/nir_lower_io.c | 2 +
src/glsl/tests/uniform_initializer_utils.cpp | 3 ++
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 ++
13 files changed, 111 insertions(+)

Upstream: cgit.freedesktop.org


  • Share