diff options
author | Chad Versace <[email protected]> | 2011-07-27 13:00:02 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2011-07-30 07:27:30 -0700 |
commit | a5ab9398e34287ed8cbb010d0758790e6692530c (patch) | |
tree | 051a045d1b0178149296816242f52a8d38e919d8 /src/gallium/drivers | |
parent | 6efe1a849586e46028c1eb763175904166ec7076 (diff) |
glsl: Fix conversions in array constructors
Array constructors obey narrower conversion rules than other constructors
[1] --- they use the implicit conversion rules [2] instead of the scalar
constructor conversions [3]. But process_array_constructor() was
incorrectly applying the broader rules.
[1] GLSL 1.50 spec, Section 5.4.4 Array Constructors, page 52 (58 of pdf)
[2] GLSL 1.50 spec, Section 4.1.10 Implicit Conversions, page 25 (31 of pdf)
[3] GLSL 1.50 spec, Section 5.4.1 Conversion, page 48 (54 of pdf)
To fix this, first check (with glsl_type::can_be_implicitly_converted_to)
if an implicit conversion is legal before performing the conversion.
Fixes:
piglit:spec/glsl-1.20/compiler/structure-and-array-operations/array-ctor-implicit-conversion-bool-float.vert
piglit:spec/glsl-1.20/compiler/structure-and-array-operations/array-ctor-implicit-conversion-bvec*-vec*.vert
Note: This is a candidate for the 7.10 and 7.11 branches.
Reviewed-by: Kenneth Graunke <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
0 files changed, 0 insertions, 0 deletions