glsl: Add all system variables to the input resource list.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 29 Mar 2016 19:07:37 +0000 (12:07 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 2 Apr 2016 05:05:18 +0000 (22:05 -0700)
commit98c22c04036da4f0a7fcc396dc6c5e0bfe5890e5
tree7117669a26b80ab2d42e2306f484c0a20a635997
parent6e8b9d5bdd200a8e65cdefe1d2f97bacc5a2c63d
glsl: Add all system variables to the input resource list.

System values are just built-in input variables that we've opted to
special-case out of convenience.  We need to consider all inputs,
regardless of how we've classified them.

Unfortunately, there's one exception: we shouldn't add gl_BaseVertex
unless ARB_shader_draw_parameters is enabled, because it doesn't
actually exist in the language, and shouldn't be counted in the
GL_ACTIVE_RESOURCES query.

Fixes dEQP-GLES31.functional.program_interface_query.program_input.
resource_list.compute.empty, which expects gl_NumWorkGroups to appear
in the resource list.

v2: Delete more code

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/compiler/glsl/linker.cpp
src/mesa/main/shader_query.cpp