mesa/src/compiler
Jason Ekstrand bb96b03461 nir/search: Use the correct bit size for integer comparisons
The previous code always compared integers as 64-bit.  Due to variations
in sign-extension in the code generated by nir_opt_algebraic.py, this
meant that nir_search doesn't always do what you want.  Instead, 32-bit
values should be matched as 32-bit and 64-bit values should be matched
as 64-bit.  While we're here we unify the unsigned and signed paths.
Now that we're using the right bit size, they should be the same since
the only difference we had before was sign extension.

This gets the UE4 bitfield_extract optimization working again.  It had
stopped working due to the constant 0xff00ff00 getting sign-extended
when it shouldn't have.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: "17.0 13.0" <mesa-stable@lists.freedesktop.org>
2017-01-21 10:34:21 -08:00
..
glsl glsl: Rename [u]int64_t tokens. 2017-01-20 19:39:20 -08:00
nir nir/search: Use the correct bit size for integer comparisons 2017-01-21 10:34:21 -08:00
spirv spirv: don't assert with location decorations on non i/o variables 2017-01-20 21:39:46 +00:00
.gitignore nir/spirv: Remove a duplicate spirv2nir from .gitignore 2016-10-04 07:43:15 -07:00
Android.glsl.gen.mk Android: glsl: add rules to generate ir_expression*.h header files 2016-09-06 15:58:55 +01:00
Android.glsl.mk Android: glsl: add rules to generate ir_expression*.h header files 2016-09-06 15:58:55 +01:00
Android.mk Android: glsl: add rules to generate ir_expression*.h header files 2016-09-06 15:58:55 +01:00
Android.nir.gen.mk compiler: android: flesh out nir into separate makefile 2016-04-11 19:08:23 +01:00
Android.nir.mk android: add SPIRV_FILES to libmesa_nir 2016-11-11 07:59:29 +02:00
builtin_type_macros.h glsl: Add basic ARB_gpu_shader_int64 types 2017-01-20 15:41:23 -08:00
glsl_types.cpp glsl: Add basic ARB_gpu_shader_int64 types 2017-01-20 15:41:23 -08:00
glsl_types.h glsl: Add basic ARB_gpu_shader_int64 types 2017-01-20 15:41:23 -08:00
Makefile.am compiler: avoid warning about redefinition of PYTHON_GEN 2016-10-26 14:54:26 +01:00
Makefile.glsl.am glsl: Add a lowering pass for 64-bit integer multiplication 2017-01-20 15:41:23 -08:00
Makefile.nir.am compiler: avoid warning about redefinition of PYTHON_GEN 2016-10-26 14:54:26 +01:00
Makefile.sources glsl: Add a lowering pass for 64-bit integer multiplication 2017-01-20 15:41:23 -08:00
nir_types.cpp nir: Add a C wrapper for glsl_type::is_array_of_arrays(). 2016-11-19 12:30:26 -08:00
nir_types.h nir: Add GLSL_TYPE_INT64 and GLSL_TYPE_UINT64 to glsl_get_bit_size 2017-01-20 15:41:23 -08:00
SConscript glsl: Generate ir_expression_operation.h from Python 2016-08-30 16:28:00 -07:00
SConscript.glsl mesa: Remove prog_hash_table.c 2016-09-12 10:48:35 +10:00
SConscript.nir glsl: Generate ir_expression_operation.h from Python 2016-08-30 16:28:00 -07:00
shader_enums.c compiler: add printable values for cull distance varyings. 2016-10-04 10:15:23 +10:00
shader_enums.h mesa: Introduce a compiler enum for tessellation spacing. 2017-01-07 22:22:28 -08:00
shader_info.h compiler: Merge shader_info's tcs and tes structs. 2017-01-10 13:21:21 -08:00