glsl/builtins: Add missing mix(genType, genType, bvec) built-ins.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 5 Jan 2012 21:28:56 +0000 (13:28 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 7 Jan 2012 02:18:15 +0000 (18:18 -0800)
The IR for mix(float, float, bool) was missing a write mask, causing the
IR reader to die horribly.  Furthermore, I neglected to add any of the
new prototypes to the 1.30 profiles.

Fixes oglconform's glsl-bif-com advanced.mix test cases.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44477
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/builtins/ir/mix.ir
src/glsl/builtins/profiles/130.frag
src/glsl/builtins/profiles/130.vert

index a31f0fa..70ae13c 100644 (file)
@@ -53,7 +53,7 @@
        (declare (in) float v1)
        (declare (in) float v2)
        (declare (in) bool  a))
-     ((assign (var_ref a) (var_ref v1) (var_ref v2))
+     ((assign (var_ref a) (x) (var_ref v1) (var_ref v2))
       (return (var_ref v1))))
 
    (signature vec2
index bc0fede..bb33032 100644 (file)
@@ -270,6 +270,11 @@ vec2  mix(vec2  x, vec2  y, float a);
 vec3  mix(vec3  x, vec3  y, float a);
 vec4  mix(vec4  x, vec4  y, float a);
 
+float mix(float x, float y, bool  a);
+vec2  mix(vec2  x, vec2  y, bvec2 a);
+vec3  mix(vec3  x, vec3  y, bvec3 a);
+vec4  mix(vec4  x, vec4  y, bvec4 a);
+
 float step(float edge, float x);
 vec2  step(vec2  edge, vec2  x);
 vec3  step(vec3  edge, vec3  x);
index 35585d5..618ecf2 100644 (file)
@@ -270,6 +270,11 @@ vec2  mix(vec2  x, vec2  y, float a);
 vec3  mix(vec3  x, vec3  y, float a);
 vec4  mix(vec4  x, vec4  y, float a);
 
+float mix(float x, float y, bool  a);
+vec2  mix(vec2  x, vec2  y, bvec2 a);
+vec3  mix(vec3  x, vec3  y, bvec3 a);
+vec4  mix(vec4  x, vec4  y, bvec4 a);
+
 float step(float edge, float x);
 vec2  step(vec2  edge, vec2  x);
 vec3  step(vec3  edge, vec3  x);