glsl: Generate compile errors for explicit blend indices < 0 or > 1.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 31 Aug 2012 23:04:19 +0000 (16:04 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 11 Sep 2012 03:56:11 +0000 (20:56 -0700)
commit354f2cb5c7330a7d43cf0b177daf758d2aa31e0a
tree0011efd1f7285747d20dfed7ab22281467393a76
parent87389d4e5c05008b3fcb8a5d5a324cc44aa3b1c4
glsl: Generate compile errors for explicit blend indices < 0 or > 1.

According to the GLSL 4.30 specification, this is a compile time error.
Earlier specifications don't specify a behavior, but since 0 and 1 are
the only valid indices for dual source blending, it makes sense to
generate the error.

Fixes (the fixed version of) piglit's layout-12.frag.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/glsl/ast_to_hir.cpp