mesa/src/compiler
Ian Romanick 71961c73a9 nir: Correctly constant fold fsign(NaN) and fsign(-0)
GLSL and SPIR-V GLSL.std.450 don't have any requirements for fsign(NaN),
and both only require that FSign(-0.0) == 0.0.  OpenCL, on the other
hand, requires sign(-0.0) be exactly -0.0.  It also requires that
sign(NaN) be exactly 0.0.

In practice, this change is difficult to test.  Our GLSL frontend
already constant folds sign(NaN) to 0.0 before even getting to NIR.  As
far as I can tell, glslang does the same.  I don't have a good way to
run an OpenCL SPIR-V test.  Maybe SPIR-V GLSL.std.450 assembly?

No shader-db or fossil-db changes on any Intel platform.

Acked-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6358>
2021-01-05 02:07:09 +00:00
..
glsl glsl: default to compat shaders in compat profile 2020-12-30 11:47:49 +11:00
nir nir: Correctly constant fold fsign(NaN) and fsign(-0) 2021-01-05 02:07:09 +00:00
spirv nir/vtn: Implement printf opcode in terms of intrinsic (v9) 2020-12-29 09:07:23 +10:00
Android.glsl.gen.mk android: util: Move xxd.py to util 2020-10-11 23:22:34 +02:00
Android.glsl.mk android: glsl: build shader cache sources 2017-02-20 16:30:37 +00:00
Android.mk
Android.nir.gen.mk android: spirv: fix '::' typo in gen rules 2020-12-08 22:44:23 +01:00
Android.nir.mk android: fix libmesa_nir build 2017-07-21 08:47:56 +03:00
builtin_type_macros.h compiler/types: Add 64-bit image types 2020-11-09 17:17:39 +00:00
glsl_types.cpp glsl: Initialize glsl_type member name. 2020-12-16 19:31:25 -08:00
glsl_types.h glsl: Fix typos in comments. 2020-12-16 02:19:56 +00:00
Makefile.sources nir: fix missing nir_lower_pntc_ytransform.c in the makefile 2021-01-04 15:37:20 +00:00
meson.build spirv: add some tests for volatile/available/visible 2020-09-01 17:15:22 +00:00
nir_types.cpp nir: Add a size_align helper function for aligning elements to 16 bytes. 2020-11-16 13:54:22 -08:00
nir_types.h nir: Add a size_align helper function for aligning elements to 16 bytes. 2020-11-16 13:54:22 -08:00
SConscript spirv: Fix building with SCons 2018-03-30 14:33:03 -06:00
SConscript.glsl util: Move xxd.py to util 2020-10-07 21:52:04 +00:00
SConscript.nir nir: use a single canonical list of intrinsic indices 2020-11-26 17:50:38 +00:00
SConscript.spirv scons: fix SPIR-V -> NIR build 2020-10-13 16:53:10 +01:00
shader_enums.c compiler/nir: introduce a new helper to get varying name 2020-12-01 08:20:38 +00:00
shader_enums.h compiler: update gl_access_qualifier comments 2020-12-09 14:41:38 +00:00
shader_info.h nir/vtn: Implement printf opcode in terms of intrinsic (v9) 2020-12-29 09:07:23 +10:00