subroutines: handle explicit indexes properly
authorDave Airlie <airlied@redhat.com>
Tue, 17 May 2016 04:44:47 +0000 (14:44 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 23 May 2016 06:19:57 +0000 (16:19 +1000)
commit6f2dc0d04498a1d03f02a4b72480e8b409981432
tree339b4212c25e8e523318fecb423af168056b38ff
parent5fe912831cac6722f2cf8add010c553a43e178b4
subroutines: handle explicit indexes properly

The code didn't deal with explicit function indexes properly.
It also handed out the indexes at link time, when we really
need them in the lowering pass to create the correct if ladder.

So this patch moves assigning the non-explicit indexes earlier,
fixes the lowering pass and the lookups to get the correct values.

This fixes a few of:
GL45-CTS.explicit_uniform_location.subroutine-index-*

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/compiler/glsl/glsl_parser_extras.cpp
src/compiler/glsl/linker.cpp
src/compiler/glsl/lower_subroutine.cpp
src/mesa/main/mtypes.h
src/mesa/main/shaderapi.c