projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6db7467
)
cube_face_index: Use fabsf instead of fabs since we know it's floats
author
Albert Astals Cid
<aacid@kde.org>
Wed, 26 Feb 2020 18:33:47 +0000
(19:33 +0100)
committer
Marge Bot
<eric+marge@anholt.net>
Wed, 26 Feb 2020 21:47:01 +0000
(21:47 +0000)
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3933>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3933>
src/compiler/nir/nir_opcodes.py
patch
|
blob
|
history
diff --git
a/src/compiler/nir/nir_opcodes.py
b/src/compiler/nir/nir_opcodes.py
index 9e335445a3142f9b2ddb4077b6ffdb0ebb2d46f8..d116578d1c0563dba9cc03d23f8532e9cf236a03 100644
(file)
--- a/
src/compiler/nir/nir_opcodes.py
+++ b/
src/compiler/nir/nir_opcodes.py
@@
-488,9
+488,9
@@
dst.y = dst.y / ma + 0.5;
""")
unop_horiz("cube_face_index", 1, tfloat32, 3, tfloat32, """
-float absX = fabs(src0.x);
-float absY = fabs(src0.y);
-float absZ = fabs(src0.z);
+float absX = fabs
f
(src0.x);
+float absY = fabs
f
(src0.y);
+float absZ = fabs
f
(src0.z);
if (src0.x >= 0 && absX >= absY && absX >= absZ) dst.x = 0;
if (src0.x < 0 && absX >= absY && absX >= absZ) dst.x = 1;
if (src0.y >= 0 && absY >= absX && absY >= absZ) dst.x = 2;