SPIRV-Cross/shaders-msl/asm/comp
Chip Davis 3bfb2f94d4 MSL: Support SPV_KHR_variable_pointers.
This allows shaders to declare and use pointer-type variables. Pointers
may be loaded and stored, be the result of an `OpSelect`, be passed to
and returned from functions, and even be passed as inputs to the `OpPhi`
instruction. All types of pointers may be used as variable pointers.
Variable pointers to storage buffers and workgroup memory may even be
loaded from and stored to, as though they were ordinary variables. In
addition, this enables using an interior pointer to an array as though
it were an array pointer itself using the `OpPtrAccessChain`
instruction.

This is a rather large and involved change, mostly because this is
somewhat complicated with a lot of moving parts. It's a wonder
SPIRV-Cross's output is largely unchanged. Indeed, many of these changes
are to accomplish exactly that! Perhaps the largest source of changes
was the violation of the assumption that, when emitting types, the
pointer type didn't matter.

One of the test cases added by the change doesn't optimize very well;
the output of `spirv-opt` here is invalid SPIR-V. I need to file a bug
with SPIRV-Tools about this.

I wanted to test that variable pointers to images worked too, but I
couldn't figure out how to propagate the access qualifier properly--in
MSL, it's part of the type, so getting this right is important. I've
punted on that for now.
2019-01-07 11:19:10 -06:00
..
atomic-decrement.asm.comp MSL: Fix OpAtomicIIncrement and OpAtomicIDecrement. 2018-09-11 17:29:54 -05:00
atomic-increment.asm.comp MSL: Fix OpAtomicIIncrement and OpAtomicIDecrement. 2018-09-11 17:29:54 -05:00
bitcast_iadd.asm.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
bitcast_sar.asm.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
bitcast_sdiv.asm.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
bitcast_slr.asm.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
block-name-alias-global.asm.comp Use correct block-name / other-name aliasing rules. 2019-01-04 15:02:54 +01:00
buffer-write-relative-addr.asm.comp MSL: Correct number of words to skip in OpImageWrite. 2018-09-05 10:02:25 -05:00
buffer-write.asm.comp MSL: Emit spvTexelBufferCoord() on ImageWrite to a Buffer as well. 2018-09-04 12:14:34 -05:00
global-parameter-name-alias.asm.comp MSL: Fix naming issue of aliased global variables. 2018-08-27 09:59:55 +02:00
multiple-entry.asm.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
quantize.asm.comp Enhancements to MSL compute and entry point naming. 2017-11-05 21:34:42 -05:00
relaxed-block-layout.asm.comp Test loading from and storing to packed vectors. 2018-11-14 10:47:20 -06:00
specialization-constant-workgroup.asm.comp Add SPVASM testing support for HLSL/MSL. 2017-09-29 11:07:11 +02:00
storage-buffer-basic.invalid.asm.comp Add test shader for subgroup. 2018-04-11 10:29:47 +02:00
variable-pointers-2.asm.comp MSL: Support SPV_KHR_variable_pointers. 2019-01-07 11:19:10 -06:00
vector-builtin-type-cast-func.asm.comp MSL: Cast uses of builtin vectors to their declared SPIR-V type. 2018-09-08 21:17:54 -05:00
vector-builtin-type-cast.asm.comp MSL: Cast uses of builtin vectors to their declared SPIR-V type. 2018-09-08 21:17:54 -05:00