Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChip Davis <cdavis@codeweavers.com>2019-12-17 07:58:16 +0300
committerChip Davis <cdavis@codeweavers.com>2020-01-25 03:51:24 +0300
commitfedbc3531562e79ac897fabb481149992a9adc9e (patch)
treed886c9edbf8744cd82978fe6d2eb1e7574defba6 /test_shaders.py
parentf9376058ce5b335373fd7d9719daf05949affa66 (diff)
MSL: Support inline uniform blocks in argument buffers.
Here, the inline uniform block is explicit: we instantiate the buffer block itself in the argument buffer, instead of a pointer to the buffer. I just hope this will work with the `MTLArgumentDescriptor` API... Note that Metal recursively assigns individual members of embedded structs IDs. This means for automatic assignment that we have to calculate the binding stride for a given buffer block. For MoltenVK, we'll simply increment the ID by the size of the inline uniform block. Then the later IDs will never conflict with the inline uniform block. We can get away with this because Metal doesn't require that IDs be contiguous, only monotonically increasing.
Diffstat (limited to 'test_shaders.py')
-rwxr-xr-xtest_shaders.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test_shaders.py b/test_shaders.py
index 10f4ed9c..9f0fdc53 100755
--- a/test_shaders.py
+++ b/test_shaders.py
@@ -244,6 +244,11 @@ def cross_compile_msl(shader, spirv, opt, iterations, paths):
msl_args.append('--msl-dynamic-buffer')
msl_args.append('1')
msl_args.append('2')
+ if '.inline-block.' in shader:
+ # Arbitrary for testing purposes.
+ msl_args.append('--msl-inline-uniform-block')
+ msl_args.append('0')
+ msl_args.append('0')
if '.device-argument-buffer.' in shader:
msl_args.append('--msl-device-argument-buffer')
msl_args.append('0')