glsl: teach lower_ubo_reference about samplers inside structures
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 1 May 2017 13:53:56 +0000 (15:53 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 6 May 2017 14:40:19 +0000 (16:40 +0200)
commitd04b0f31d328af95cebec816adfe683a6095bca8
treee0f62302142c2cdd9522ab0866dc1b6ad171cfe9
parentd550024a7ee2775b282acb761d81f1983ea15bcf
glsl: teach lower_ubo_reference about samplers inside structures

In a situation like:

(tex vec4 (record_ref (var_ref f)  tex)  (constant vec2 (0.000000 0.000000))  0 1 () )

The sampler needs to be lowered, otherwise this ends up with
"ir_dereference_variable @ 0x229a100 specifies undeclared variable
`ubo_load_temp' @ 0x2290440"

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/lower_ubo_reference.cpp