mesa/src/amd/vulkan
Jason Ekstrand c11833ab24 nir,spirv: Rework function calls
This commit completely reworks function calls in NIR.  Instead of having
a set of variables for the parameters and return value, nir_call_instr
now has simply has a number of sources which get mapped to load_param
intrinsics inside the functions.  It's up to the client API to build an
ABI on top of that.  In SPIR-V, out parameters are handled by passing
the result of a deref through as an SSA value and storing to it.

This virtue of this approach can be seen by how much it allows us to
delete from core NIR.  In particular, nir_inline_functions gets halved
and goes from a fairly difficult pass to understand in detail to almost
trivial.  It also simplifies spirv_to_nir somewhat because NIR functions
never were a good fit for SPIR-V.

Unfortunately, there is no good way to do this without a mega-commit.
Core NIR and SPIR-V have to be changed at the same time.  This also
requires changes to anv and radv because nir_inline_functions couldn't
handle deref instructions before this change and can't work without them
after this change.

Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2018-06-22 20:15:58 -07:00
..
winsys/amdgpu amd,radeonsi: rename radeon_winsys_cs -> radeon_cmdbuf 2018-06-19 13:08:50 -04: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
Makefile.am vulkan: EXT_acquire_xlib_display requires libXrandr headers to build 2018-06-20 10:42:05 -07:00
Makefile.sources radv: Add KHR_display extension to radv [v5] 2018-06-19 14:17:46 -07:00
meson.build vulkan: EXT_acquire_xlib_display requires libXrandr headers to build 2018-06-20 10:42:05 -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 radv: use EOP_DATA_SEL_* instead of magic numbers 2018-06-21 10:31:02 +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 amd,radeonsi: rename radeon_winsys_cs -> radeon_cmdbuf 2018-06-19 13:08:50 -04:00
radv_descriptor_set.c radv: Add option to print errors even in optimized builds. 2018-05-31 11:51:23 +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: always check the return error when submitting a CS 2018-06-22 17:47:10 +02:00
radv_entrypoints_gen.py radv: Add EXT_acquire_xlib_display to radv driver [v2] 2018-06-19 14:17:46 -07:00
radv_extensions.py radv: Add VK_EXT_display_surface_counter to radv driver 2018-06-20 08:16:45 -07:00
radv_formats.c radv: fix Coverity no effect control flow issue 2018-06-07 10:10:57 +10:00
radv_icd.py radv: Generate icd files. 2018-03-09 07:53:39 +01:00
radv_image.c radv: Add option to print errors even in optimized builds. 2018-05-31 11:51:23 +02:00
radv_meta.c radv: use separate bindings for graphics and compute descriptors 2018-02-01 09:37:09 +01:00
radv_meta.h radv: Cleanup unused prime blit path. 2018-05-21 10:33:41 +02:00
radv_meta_blit.c radv: Make color meta operations layout aware. 2017-12-29 12:21:44 +01:00
radv_meta_blit2d.c radv: fix multisample image copies 2018-05-02 19:32:00 +02:00
radv_meta_buffer.c radv: only emit cache flushes when the pool size is large enough 2018-03-01 09:53:40 +01:00
radv_meta_bufimage.c nir: Rename image intrinsics to image_var 2018-03-23 13:48:11 +11:00
radv_meta_clear.c radv: always initialize the clear depth/stencil values to 0 2018-06-20 13:21:42 +02:00
radv_meta_copy.c radv: Cleanup unused prime blit path. 2018-05-21 10:33:41 +02:00
radv_meta_decompress.c radv: add radv_image_has_{cmask,fmask,dcc,htile}() helpers 2018-04-09 11:21:10 +02:00
radv_meta_fast_clear.c radv: disable prediction only if it has been enabled 2018-04-16 14:20:39 +02:00
radv_meta_resolve.c radv: use compute path for multi-layer images. 2018-05-14 08:57:54 +10:00
radv_meta_resolve_cs.c radv: resolve all layers in compute resolve path. 2018-05-14 08:57:27 +10:00
radv_meta_resolve_fs.c radv: decompress DCC for multisampled source images before resolving 2018-04-19 09:10:52 +02:00
radv_nir_to_llvm.c radv: do not use an user SGPR for the sample position offset 2018-06-20 13:21:42 +02:00
radv_pass.c radv: Add option to print errors even in optimized builds. 2018-05-31 11:51:23 +02:00
radv_pipeline.c radv: do not use an user SGPR for the sample position offset 2018-06-20 13:21:42 +02:00
radv_pipeline_cache.c radv: Add option to print errors even in optimized builds. 2018-05-31 11:51:23 +02:00
radv_private.h radv: always initialize the clear depth/stencil values to 0 2018-06-20 13:21:42 +02:00
radv_query.c radv: use EOP_DATA_SEL_* instead of magic numbers 2018-06-21 10:31:02 +02:00
radv_radeon_winsys.h amd,radeonsi: rename radeon_winsys_cs -> radeon_cmdbuf 2018-06-19 13:08:50 -04:00
radv_shader.c nir,spirv: Rework function calls 2018-06-22 20:15:58 -07:00
radv_shader.h radv: do not use an user SGPR for the sample position offset 2018-06-20 13:21:42 +02:00
radv_shader_info.c radv: scan the geometry shader output usage mask 2018-05-14 21:38:21 +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 radv: Add VK_EXT_display_surface_counter to radv driver 2018-06-20 08:16:45 -07:00
radv_wsi_display.c radv: Add EXT_acquire_xlib_display to radv driver [v2] 2018-06-19 14:17:46 -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: set EVENT_WRITE_EOP.INT_SEL = wait for write confirmation 2018-06-21 10:31:03 +02:00
vk_format.h radv: Fix SRGB compute copies. 2018-05-21 10:33:41 +02:00
vk_format_layout.csv radv: add initial non-conformant radv vulkan driver 2016-10-07 09:16:09 +10:00
vk_format_parse.py amd: remove shebang from python scripts 2017-03-10 14:12:46 +00:00
vk_format_table.py radv: make vk_format_description structures static 2018-03-17 18:53:21 +02:00