mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 22:20:14 +01:00
nir: All set-on-comparison opcodes can take all float types
Extend4195a9450bso that the next poor fool doesn't come along and say, "sge does the right thing for 16-bit sources, but slt gives a NIR validation failure. What the deuce?" NOTE: This commit is necessary to prevent regressions in GLSLstd450Step tests of 16-bit sources at "spriv: Produce correct result for GLSLstd450Step with NaN". Fixes:4195a9450b("nir: sge operation is defined for floating-point types") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
This commit is contained in:
parent
97ce3a56bd
commit
38800b385c
1 changed files with 3 additions and 3 deletions
|
|
@ -844,10 +844,10 @@ binop_reduce("fany_nequal", 1, tfloat32, tfloat32, "{src0} != {src1}",
|
|||
# These comparisons for integer-less hardware return 1.0 and 0.0 for true
|
||||
# and false respectively
|
||||
|
||||
binop("slt", tfloat32, "", "(src0 < src1) ? 1.0f : 0.0f") # Set on Less Than
|
||||
binop("slt", tfloat, "", "(src0 < src1) ? 1.0f : 0.0f") # Set on Less Than
|
||||
binop("sge", tfloat, "", "(src0 >= src1) ? 1.0f : 0.0f") # Set on Greater or Equal
|
||||
binop("seq", tfloat32, _2src_commutative, "(src0 == src1) ? 1.0f : 0.0f") # Set on Equal
|
||||
binop("sne", tfloat32, _2src_commutative, "(src0 != src1) ? 1.0f : 0.0f") # Set on Not Equal
|
||||
binop("seq", tfloat, _2src_commutative, "(src0 == src1) ? 1.0f : 0.0f") # Set on Equal
|
||||
binop("sne", tfloat, _2src_commutative, "(src0 != src1) ? 1.0f : 0.0f") # Set on Not Equal
|
||||
|
||||
# SPIRV shifts are undefined for shift-operands >= bitsize,
|
||||
# but SM5 shifts are defined to use only the least significant bits.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue