glsl: add _mesa_glsl_parse_state object to is_lvalue()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 19 Apr 2017 16:08:28 +0000 (18:08 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 6 May 2017 14:40:19 +0000 (16:40 +0200)
commitfa4ebf6b8d93bdf5c47bdaa5d5b3df060d260c6d
tree595482cb642d9fe6f8d0b04b5b0d2326d9c67db8
parent42a2fe25f4552805c253d96c121f1e4dd436eb4a
glsl: add _mesa_glsl_parse_state object to is_lvalue()

Yes, this is a bit hacky but we don't really have the choice.
Plain GLSL doesn't accept bindless samplers/images as l-values
while it's allowed when ARB_bindless_texture is enabled.

The default NULL parameter is because we can't access the
_mesa_glsl_parse_state object in few places in the compiler.
One is_lvalue(NULL) call is for IR validation but other checks
happen elsewhere, should be safe.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/ast_function.cpp
src/compiler/glsl/ast_to_hir.cpp
src/compiler/glsl/ir.cpp
src/compiler/glsl/ir.h