mesa/src/compiler
Emma Anholt 9ffd00bcf1 nir_to_tgsi: Pack our tex coords into vec4 nir_tex_src_backend[12].
For TGSI, we need the coordinate, comparator, bias, and LOD all together
in the first two vec4 args, and by doing it in the backend we were
generating extra MOVs.

softpipe shader-db results:
total instructions in shared programs: 2985416 -> 2953625 (-1.06%)
instructions in affected programs: 499937 -> 468146 (-6.36%)
total temps in shared programs: 544769 -> 565869 (3.87%)
temps in affected programs: 105469 -> 126569 (20.01%)

i915g shader-db:
total instructions in shared programs: 371625 -> 369594 (-0.55%)
instructions in affected programs: 24903 -> 22872 (-8.16%)
total tex_indirect in shared programs: 11381 -> 11365 (-0.14%)
tex_indirect in affected programs: 43 -> 27 (-37.21%)
LOST:   7
GAINED: 16

The temps increase is the pre-existing issue that we never release temps
for NIR regs, which doesn't matter much for softpipe (just memory/cache
footprint) but does for i915g as seen by shaders that no longer compile
(though overall we seem to win).

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11912>
2021-07-29 09:05:05 -07:00
..
glsl glsl/standalone: Lower COMPUTE shader precision 2021-07-29 01:20:46 +00:00
nir nir_to_tgsi: Pack our tex coords into vec4 nir_tex_src_backend[12]. 2021-07-29 09:05:05 -07:00
spirv spirv: set medium precision with RelaxedPrecision decorator 2021-07-29 03:48:43 +00:00
builtin_type_macros.h compiler/types: Add 64-bit image types 2020-11-09 17:17:39 +00:00
glsl_types.cpp glsl: add missing support for explicit components in interface blocks 2021-05-13 08:07:53 +00:00
glsl_types.h glsl: add missing support for explicit components in interface blocks 2021-05-13 08:07:53 +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
shader_enums.c nir: Rename WORK_GROUP (and similar) to WORKGROUP 2021-06-07 22:34:42 +00:00
shader_enums.h shader_enums: change VERT_BIT back to the 32-bit shift 2021-06-16 21:45:57 +00:00
shader_info.h mesa: move gl_program::is_arb_asm to shader_info 2021-07-28 08:49:30 +00:00