mesa/src/intel
Yevhenii Kolesnikov 36abb0c691 intel/compiler: don't propagate cmp to add if add is saturated
From the Kaby Lake PRM Vol. 7 "Assigning Conditional Flags":

   * Note that the [post condition signal] bits generated at
     the output of a compute are before the .sat.

Paragraph about post_zero does not mention saturation, but
testing it on actual GPUs shows that conditional modifiers
are applied after saturation.

   * post_zero bit: This bit reflects whether the final
     result is zero after all the clamping, normalizing,
     or format conversion logic.

For signed types we don't care about saturation: it won't
change the result of conditional modifier.

For floating and unsigned types there two special cases,
when we can remove inst even if scan_inst is saturated: G
and LE. Since conditional modifiers are just comparations
against zero, saturating positive values to the upper
limit never changes the result of comparation.

For negative values:
(sat(x) >  0) == (x >  0) --- false
(sat(x) <= 0) == (x <= 0) --- true

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2610

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4167>
2020-07-11 00:25:48 +00:00
..
blorp intel: Add ISL_AUX_USAGE_GEN12_CCS_E 2020-06-19 22:41:40 +00:00
common intel/l3: Return the URB size from devinfo for DG1 2020-06-22 11:42:00 -07:00
compiler intel/compiler: don't propagate cmp to add if add is saturated 2020-07-11 00:25:48 +00:00
dev intel: Disable loading drivers on DG1 devices for now 2020-06-24 02:48:04 +00:00
genxml intel/genxml: replace gen_sort_tags.py MIT licence with SPDX equivalent 2020-06-13 01:16:17 +00:00
isl intel/isl: Update mocs for DG1 2020-06-22 11:42:00 -07:00
perf intel/perf: move query_mask and location out of gen_perf_query_counter 2020-07-06 21:43:59 +00:00
tools intel/tools: Add assembler tests for the cr0 register 2020-06-19 02:10:40 +00:00
vulkan anv: fix uninitialized variable access 2020-07-10 17:54:35 +00:00
Android.blorp.mk intel: android: remove libdrm_intel requirement 2017-03-30 19:07:23 +01:00
Android.common.mk android: static link with libexpat with Android O+ 2019-03-25 10:11:57 +02:00
Android.compiler.mk android: fix build issues with brw_nir_trig_workarounds.c 2017-10-04 07:39:05 +03:00
Android.dev.mk intel: add identifier for debug purposes 2020-05-20 15:58:22 +00:00
Android.genxml.mk intel/genxml: generate pack files for gen12 on android builds 2019-08-28 13:38:33 -07:00
Android.isl.mk isl: Fix the android build. 2020-02-05 21:31:40 -08:00
Android.mk i965: extract performance query metrics 2019-04-17 14:10:42 +01:00
Android.perf.mk i965: extract performance query metrics 2019-04-17 14:10:42 +01:00
Android.vulkan.mk anv/android: setup gralloc1 usage from gralloc0 usage manually 2020-01-28 14:46:25 +02:00
Makefile.perf.am i965: extract performance query metrics 2019-04-17 14:10:42 +01:00
Makefile.sources intel/compiler: fix Android build 2020-06-06 18:42:03 +00:00
meson.build meson: only build imgui when needed 2019-11-25 07:51:56 +00:00