nir: sge operation is defined for floating-point types
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Thu, 8 Jun 2017 10:06:48 +0000 (10:06 +0000)
committerJuan A. Suarez Romero <jasuarez@igalia.com>
Tue, 27 Jun 2017 10:01:11 +0000 (12:01 +0200)
According to GLSL.std.450 spec, the operand for step() function must be
a floating-point. It does not restrict the value to 32-bit floats.

Reviewed by: Elie Tournier <elie.tournier@collabora.com>

src/compiler/nir/nir_opcodes.py

index 31b46159a4f9d70b770fad09061766adb319acd0..39c01a702f719bd68ee5daaee75353eb935f202c 100644 (file)
@@ -467,7 +467,7 @@ binop_reduce("fany_nequal", 1, tfloat32, tfloat32, "{src0} != {src1}",
 # and false respectively
 
 binop("slt", tfloat32, "", "(src0 < src1) ? 1.0f : 0.0f") # Set on Less Than
-binop("sge", tfloat32, "", "(src0 >= src1) ? 1.0f : 0.0f") # Set on Greater or Equal
+binop("sge", tfloat, "", "(src0 >= src1) ? 1.0f : 0.0f") # Set on Greater or Equal
 binop("seq", tfloat32, commutative, "(src0 == src1) ? 1.0f : 0.0f") # Set on Equal
 binop("sne", tfloat32, commutative, "(src0 != src1) ? 1.0f : 0.0f") # Set on Not Equal