mesa/src/compiler
Jason Ekstrand 812b341578 nir/algebraic: Optimize comparisons and up-casts
These seem like obvious enough optimizations in the world of multiple
integer bit sizes.  The only known thing which hits these at the moment
is some Vulkan CTS tests for 16-bit SSBO values which like to up-cast
and check for equality.  However, it's something that's bound to come up
as we start seeing more integers in shaders.

The optimizations of comparisons of casted values with constants are
something which we would ideally do with range analysis.  However,
lacking that, we can do it in opt_algebraic as long as one side is a
constant.

In dEQP-VK.ssbo.phys.layout.random.16bit.scalar.13, this commit, along
with the previous commit, reduce the number of instructions emitted on
Skylake from 55328 to 44546, a reduction of 20%.

Acked-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2019-07-17 18:44:35 +00:00
..
glsl glsl/shader_cache: handle SPIR-V shaders 2019-07-12 23:42:41 +02:00
nir nir/algebraic: Optimize comparisons and up-casts 2019-07-17 18:44:35 +00:00
spirv spirv: Bail when we see CounterBuffer decoration 2019-07-16 20:31:12 -07:00
Android.glsl.gen.mk mesa: android: Remove unnecessary dependency tracking rules 2019-05-06 11:29:25 +00:00
Android.glsl.mk android: glsl: build shader cache sources 2017-02-20 16:30:37 +00:00
Android.mk
Android.nir.gen.mk mesa: android: Remove unnecessary dependency tracking rules 2019-05-06 11:29:25 +00:00
Android.nir.mk android: fix libmesa_nir build 2017-07-21 08:47:56 +03:00
blob.c compiler/blob: Add blob_skip_bytes 2018-07-09 23:02:33 -07:00
blob.h compiler/blob: Add blob_skip_bytes 2018-07-09 23:02:33 -07:00
builtin_type_macros.h glsl_types: vec8/vec16 support 2018-03-25 10:42:54 -04:00
glsl_types.cpp glsl/nir: add glsl_types::explicit_size plus nir C wrapper 2019-06-30 16:58:26 -05:00
glsl_types.h glsl: Add a constructor for glsl_struct_field to specify the precision 2019-07-11 08:04:54 +02:00
Makefile.sources anv,nir: Move lower_input_attachments pass from ANV to NIR. 2019-07-08 14:02:50 +02:00
meson.build meson: Build with Python 3 2018-08-10 15:15:09 -07:00
nir_types.cpp nir/types: Add glsl_type_is_unsized_array helper 2019-07-12 23:42:41 +02:00
nir_types.h nir/types: Add glsl_type_is_unsized_array helper 2019-07-12 23:42:41 +02:00
SConscript spirv: Fix building with SCons 2018-03-30 14:33:03 -06:00
SConscript.glsl scons: Generate float64_glsl.h for glsl_to_nir fp64 lowering 2019-03-02 14:33:44 -08:00
SConscript.nir nir: mako all the intrinsics 2018-03-27 08:36:37 -04:00
SConscript.spirv spirv: Fix building with SCons 2018-03-30 14:33:03 -06:00
shader_enums.c compiler: Add color system value 2019-07-08 14:18:34 +02:00
shader_enums.h compiler: Add color system value 2019-07-08 14:18:34 +02:00
shader_info.h spirv: Implement SPV_EXT_demote_to_helper_invocation 2019-07-08 08:57:25 -07:00