mesa/src/amd/vulkan
Timothy Arceri 72e4287e8f radv: make use of nir_lower_load_const_to_scalar()
This allows NIR to CSE more operations. LLVM does this also so the
impact is limited, however doing this in NIR allows other opts to
make progress. For example in radeonsi more loops are unrolled in
Civilization Beyond Earth.

The actual pipeline-db stats are not overwhelming but even in the
negatively affected shaders the NIR is clearly better. It just
happens that the code shuffling and in some cases calls to max
rather than a flt result in the final output from LLVM not
giving as good numbers.

However this is an incremental opt that further passes build off
so the change should be made IMO.

Totals from affected shaders:
SGPRS: 20192 -> 20184 (-0.04 %)
VGPRS: 19516 -> 19524 (0.04 %)
Spilled SGPRs: 437 -> 444 (1.60 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 1527444 -> 1522276 (-0.34 %) bytes
LDS: 6 -> 6 (0.00 %) blocks
Max Waves: 1018 -> 1016 (-0.20 %)
Wait states: 0 -> 0 (0.00 %)

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-09-25 09:31:22 +10:00
..
winsys/amdgpu radv/winsys: fix creating the BO list for virtual buffers 2018-08-17 15:00:21 +02:00
.editorconfig amd: add .editorconfig 2017-08-29 01:08:58 +03:00
.gitignore radv: add generated files to .gitignore(s) 2018-05-15 22:53:55 +02:00
Android.mk radv: Fix missing Android platform define. 2018-08-14 22:11:04 +02:00
Makefile.am Revert "configure: allow building with python3" 2018-08-24 11:14:15 +01:00
Makefile.sources radv: move vk_format_table.c to generated sources 2018-07-28 12:39:49 +02:00
meson.build meson: Build with Python 3 2018-08-10 15:15:09 -07:00
radv_android.c radv: Add option to print errors even in optimized builds. 2018-05-31 11:51:23 +02:00
radv_cmd_buffer.c Revert "radv: Optimize rebinding the same descriptor set." 2018-09-17 11:20:57 +02:00
radv_cs.h amd,radeonsi: rename radeon_winsys_cs -> radeon_cmdbuf 2018-06-19 13:08:50 -04:00
radv_debug.c amd,radeonsi: rename radeon_winsys_cs -> radeon_cmdbuf 2018-06-19 13:08:50 -04:00
radv_debug.h radv: using tls to store llvm related info and speed up compiles (v10) 2018-07-10 07:58:03 +10:00
radv_descriptor_set.c radv: use a 64-bit unsigned integer when allocating a descriptor pool 2018-09-19 13:36:12 +02:00
radv_descriptor_set.h Revert "radv: Don't store buffer references in the descriptor set." 2018-04-20 16:18:13 +02:00
radv_device.c radv: only enable shaderInt16 on GFX9+ and LLVM7+ 2018-09-21 10:56:17 +02:00
radv_entrypoints_gen.py radv: generate entrypoints for VK_ANDROID_native_buffer 2018-07-28 12:39:57 +02:00
radv_extensions.py radv: implement VK_EXT_conservative_rasterization 2018-09-18 13:28:01 +02:00
radv_formats.c radv: do not support blitting surfaces with depth and stencil 2018-09-19 13:36:07 +02:00
radv_icd.py python: Specify the JSON separators 2018-07-05 12:52:38 +01:00
radv_image.c radv: Fix CMASK dimensions. 2018-09-03 09:24:30 +02:00
radv_llvm_helper.cpp radv: using tls to store llvm related info and speed up compiles (v10) 2018-07-10 07:58:03 +10:00
radv_meta.c radv: use different builtin shader cache for 32bit 2018-08-23 00:34:32 +03:00
radv_meta.h radv: Add on-demand compilation of built-in shaders. 2018-08-14 10:26:24 +02:00
radv_meta_blit.c radv: do not re-create the sampler for every blits in CmdBlitImage() 2018-09-18 13:27:59 +02:00
radv_meta_blit2d.c radv: Add on-demand compilation of built-in shaders. 2018-08-14 10:26:24 +02:00
radv_meta_buffer.c radv: add support for VK_EXT_conditional_rendering 2018-07-18 13:44:09 +02:00
radv_meta_bufimage.c radv/meta: Set num_components on image_store intrinsics 2018-08-30 08:26:14 -05:00
radv_meta_clear.c radv: Add on-demand compilation of built-in shaders. 2018-08-14 10:26:24 +02:00
radv_meta_copy.c radv: add support for VK_EXT_conditional_rendering 2018-07-18 13:44:09 +02:00
radv_meta_decompress.c radv/meta_decompress: fix pointer to integer conversion 2018-08-15 14:34:50 +02:00
radv_meta_fast_clear.c radv/meta: Set num_components on image_store intrinsics 2018-08-30 08:26:14 -05:00
radv_meta_resolve.c radv: use the resolve compute path if dest uses multiple layers 2018-09-21 16:35:59 +02:00
radv_meta_resolve_cs.c radv/meta: Set num_components on image_store intrinsics 2018-08-30 08:26:14 -05:00
radv_meta_resolve_fs.c radv: Possible on-demand compilation fix. 2018-08-16 11:13:19 +02:00
radv_nir_to_llvm.c radv: Only allow 16 user SGPRs for compute on GFX9+. 2018-09-16 12:50:58 +02:00
radv_pass.c radv: remove unused variable in radv_CreateRenderPass2KHR() 2018-07-18 10:54:42 +02:00
radv_pipeline.c radv: implement VK_EXT_conservative_rasterization 2018-09-18 13:28:01 +02:00
radv_pipeline_cache.c radv: Add on-demand compilation of built-in shaders. 2018-08-14 10:26:24 +02:00
radv_private.h radv: allow to force anisotropy via RADV_TEX_ANISO 2018-09-18 13:27:58 +02:00
radv_query.c radv: Add on-demand compilation of built-in shaders. 2018-08-14 10:26:24 +02:00
radv_radeon_winsys.h radv: get rid of buffer object priorities 2018-07-12 11:08:40 +02:00
radv_shader.c radv: make use of nir_lower_load_const_to_scalar() 2018-09-25 09:31:22 +10:00
radv_shader.h radv: handle loc->indirect correctly for the first descriptor 2018-09-14 10:59:52 +02:00
radv_shader_helper.h radv: using tls to store llvm related info and speed up compiles (v10) 2018-07-10 07:58:03 +10:00
radv_shader_info.c radv: gather the output usage mask for clip/cull distances correctly 2018-08-31 17:34:41 +02:00
radv_util.c radv: Add startup debug option. 2018-05-31 11:51:23 +02:00
radv_util.h radv: Use proper header guards over 'pragma once' directives 2016-10-10 16:10:56 +11:00
radv_wsi.c anv,radv: Implement vkAcquireNextImage2 2018-09-21 07:02:35 -05:00
radv_wsi_display.c anv,radv: Add support for VK_KHR_get_display_properties2 2018-07-09 17:09:41 -07:00
radv_wsi_wayland.c radv/wsi: Don't include wayland headers 2017-03-13 11:16:30 +00:00
radv_wsi_x11.c vulkan/wsi/radv: add initial prime support (v1.1) 2017-02-27 05:42:16 +10:00
si_cmd_buffer.c radv: emit the initial config only once in the preambles 2018-09-14 10:59:52 +02:00
vk_format.h radv: Fix SRGB compute copies. 2018-05-21 10:33:41 +02:00
vk_format_layout.csv radv: Add support for ETC2 textures. 2018-07-27 01:31:32 +02:00
vk_format_parse.py python: Fix inequality comparisons 2018-08-10 08:45:59 -07:00
vk_format_table.py python: Use the print function 2018-07-06 10:04:22 -07:00