mesa: reference built-in uniforms into gl_uniform_storage
authorMartin Peres <martin.peres@linux.intel.com>
Thu, 21 May 2015 12:51:09 +0000 (15:51 +0300)
committerMartin Peres <martin.peres@linux.intel.com>
Thu, 4 Jun 2015 06:25:00 +0000 (09:25 +0300)
commit87a4bc511811327a00f9bbc1b6870b7fa46675f7
treec96c9d1eb9fe62a2ba0d40b62bbdd26f0614e7fe
parent4fd42a7c2798d03476c84b79cb855984a15c222c
mesa: reference built-in uniforms into gl_uniform_storage

This change introduces a new field in gl_uniform_storage to
explicitely say that a uniform is built-in. In the case where it is,
no storage is defined to make it clear that it is read-only from the
mesa side. I fixed all the places in the code that made use of the
structure that I changed. Any place making a wrong assumption and using
the storage straight away will just crash.

This patch seems to implement the path of least resistance towards
listing built-in uniforms in GL_ACTIVE_UNIFORM (and other APIs).

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
14 files changed:
src/glsl/ir_uniform.h
src/glsl/link_uniform_initializers.cpp
src/glsl/link_uniforms.cpp
src/glsl/linker.cpp
src/glsl/standalone_scaffolding.cpp
src/glsl/tests/set_uniform_initializer_tests.cpp
src/mesa/drivers/dri/i965/brw_fs_nir.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
src/mesa/main/mtypes.h
src/mesa/main/shaderapi.c
src/mesa/main/shaderobj.c
src/mesa/main/uniform_query.cpp
src/mesa/program/ir_to_mesa.cpp
src/mesa/state_tracker/st_draw.c