mesa/src/compiler/spirv
Jason Ekstrand 6b8fd65e84 spirv: Implement the new ray-tracing storage classes
The SPV_KHR_ray_tracing extension adds 6 new storage classes which is a
bit on the ridiculous side.  In order to avoid adding that many variable
modes to NIR, we make a few simplifying assumptions:

 1. CallableData and RayPayload data actually lives on the stack
    somewhere, presumably in the caller's stack.  We assume that these
    are no different from global variables and use nir_var_shader_temp
    for them.  We still need a separate storage class for the incoming
    variants but only so we can figure out which one the incoming one
    is and lower it to something useful.

 2. There's no difference between incoming CallableData and RayPaolad
    data.  We can use a single storage class for both.

 3. ShaderRecordBuffer data is just a global memory access.  This lets
    us avoid NIR variables entirely and just fetch the pointer via the
    shader_record_ptr system value and it's accessed using a 64-bit
    global memory pointer.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6479>
2020-11-05 23:36:46 +00:00
..
tests spirv: Initialize spirv_test member shader. 2020-09-09 22:24:09 +00:00
gl_spirv.c spirv: Rename vtn_decoration literals to operands 2019-04-23 14:58:01 -07:00
GLSL.ext.AMD.h spirv: import AMD extensions header from glslang 2018-03-07 23:09:58 +01:00
GLSL.std.450.h spirv: bump headers to SPIRV 1.1 2017-01-25 17:22:23 +00:00
meson.build spirv: add and use a generator id enum 2020-10-12 11:07:38 +00:00
nir_load_libclc.c spirv: Add a shared libclc loader 2020-10-07 21:52:04 +00:00
nir_lower_libclc.c spirv: Move nir_lower_libclc to src/compiler/spirv 2020-10-07 21:52:04 +00:00
nir_spirv.h spirv: Move nir_lower_libclc to src/compiler/spirv 2020-10-07 21:52:04 +00:00
OpenCL.std.h spirv: Update the OpenCL.std.h header 2019-06-04 12:12:51 -07:00
spir-v.xml spirv: Update headers and metadata from latest Khronos commit 2020-10-15 21:40:09 +00:00
spirv.core.grammar.json spirv: Update headers and metadata from latest Khronos commit 2020-10-15 21:40:09 +00:00
spirv.h spirv: Update headers and metadata from latest Khronos commit 2020-10-15 21:40:09 +00:00
spirv2nir.c spirv2nir: Rework argument handling 2020-09-07 14:59:40 +00:00
spirv_info.h spirv: vtn_fail with a nice message on unsupported rounding modes 2020-09-25 01:43:28 +00:00
spirv_info_c.py spirv: vtn_fail with a nice message on unsupported rounding modes 2020-09-25 01:43:28 +00:00
spirv_to_nir.c spirv: Implement the new ray-tracing storage classes 2020-11-05 23:36:46 +00:00
vtn_alu.c spirv: Add generic pointer support 2020-11-03 22:18:28 +00:00
vtn_amd.c nir,amd: remove trinary_minmax opcodes 2020-08-24 20:56:11 +00:00
vtn_cfg.c nir/builder: Add a nir_ieq_imm helper 2020-11-03 22:18:28 +00:00
vtn_gather_types_c.py spirv: Handle instruction aliases in vtn_gather_types 2020-04-24 05:56:05 +00:00
vtn_generator_ids_h.py android: fix SPIR-V -> NIR build 2020-10-12 22:26:05 +00:00
vtn_glsl450.c spirv/glsl450: Use vtn_push_ssa_value 2020-07-23 22:43:21 -05:00
vtn_opencl.c spirv: Implement vload[a]_half[n] and vstore[a]_half[n][_r] 2020-10-01 18:36:53 +00:00
vtn_private.h spirv: Implement the new ray-tracing storage classes 2020-11-05 23:36:46 +00:00
vtn_subgroup.c spirv: Implement SpvCapabilitySubgroupShuffleINTEL from SPV_INTEL_subgroups 2020-11-04 20:24:48 +00:00
vtn_variables.c spirv: Implement the new ray-tracing storage classes 2020-11-05 23:36:46 +00:00