mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 14:00:16 +01:00
nir: slight correction to cube_face_coord constant folding
ACO does the division with a rcp and then a multiplication. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5547>
This commit is contained in:
parent
c95d258d1b
commit
9a389322c4
1 changed files with 2 additions and 2 deletions
|
|
@ -487,8 +487,8 @@ if (src0.y < 0 && absY >= absX && absY >= absZ) { dst.x = src0.x; dst.y = -src0.
|
|||
if (src0.z >= 0 && absZ >= absX && absZ >= absY) { dst.x = src0.x; dst.y = -src0.y; }
|
||||
if (src0.z < 0 && absZ >= absX && absZ >= absY) { dst.x = -src0.x; dst.y = -src0.y; }
|
||||
|
||||
dst.x = dst.x / ma + 0.5;
|
||||
dst.y = dst.y / ma + 0.5;
|
||||
dst.x = dst.x * (1.0f / ma) + 0.5f;
|
||||
dst.y = dst.y * (1.0f / ma) + 0.5f;
|
||||
""")
|
||||
|
||||
unop_horiz("cube_face_index", 1, tfloat32, 3, tfloat32, """
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue