OSDN Git Service

glsl: Move all of the var decls to the front of the IR list in reverse order.
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 8 Jun 2013 20:05:13 +0000 (13:05 -0700)
committerChad Versace <chad.versace@linux.intel.com>
Thu, 13 Jun 2013 15:18:48 +0000 (08:18 -0700)
commit1aa54e3ac22e7dd63a4b79603fc613ed290fa61f
tree04cd4566f778f74a58e211593a8965e67c610a52
parentea2e80e1d024f88dcd20d618855a2daf20893a0c
glsl: Move all of the var decls to the front of the IR list in reverse order.

This has the (intended!) side effect that vertex shader inputs and
fragment shader outputs will appear in the IR in the same order that
they appeared in the shader code.  This results in the locations being
assigned in the declared order.  Many (arguably buggy) applications
depend on this behavior, and it matches what nearly all other drivers
do.

Fixes the (new) piglit test attrib-assignments.

NOTE: This is a candidate for stable release branches.

Change-Id: I9ee61278dd975eb02f04d5227ea60c0dda0c76e9
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Chad Versace <chad.versace@linux.intel.com>
Issue: AXIA-2742
src/glsl/ast_to_hir.cpp