mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
glsl: Reimplement the "cross" built-in without ir_binop_cross.
We are not aware of any GPU that actually implements the cross product as a single instruction. Hence, there's no need for it to be an opcode. Future commits will remove it entirely.
This commit is contained in:
parent
302fe4049c
commit
671ccf593e
1 changed files with 5 additions and 3 deletions
|
|
@ -1,7 +1,9 @@
|
|||
((function cross
|
||||
(signature vec3
|
||||
(parameters
|
||||
(declare (in) vec3 arg0)
|
||||
(declare (in) vec3 arg1))
|
||||
((return (expression vec3 cross (var_ref arg0) (var_ref arg1)))))
|
||||
(declare (in) vec3 a)
|
||||
(declare (in) vec3 b))
|
||||
((return (expression vec3 -
|
||||
(expression vec3 * (swiz yzx (var_ref a)) (swiz zxy (var_ref b)))
|
||||
(expression vec3 * (swiz zxy (var_ref a)) (swiz yzx (var_ref b)))))))
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue