nir: allow 16-bit fsin_amd/fcos_amd
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 13 May 2021 14:31:56 +0000 (15:31 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 7 Jul 2022 22:18:08 +0000 (22:18 +0000)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10587>

src/compiler/nir/nir_opcodes.py

index 0afb86f..dded4a6 100644 (file)
@@ -1264,8 +1264,8 @@ unop_horiz("cube_r600", 4, tfloat32, 3, tfloat32, """
 # r600/gcn specific sin and cos
 # these trigeometric functions need some lowering because the supported
 # input values are expected to be normalized by dividing by (2 * pi)
-unop("fsin_amd", tfloat32, "sinf(6.2831853 * src0)")
-unop("fcos_amd", tfloat32, "cosf(6.2831853 * src0)")
+unop("fsin_amd", tfloat, "sinf(6.2831853 * src0)")
+unop("fcos_amd", tfloat, "cosf(6.2831853 * src0)")
 
 # AGX specific sin with input expressed in quadrants. Used in the lowering for
 # fsin/fcos. This corresponds to a sequence of 3 ALU ops in the backend (where