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>2020-04-10 09:13:33 +0300
committerChip Davis <cdavis@codeweavers.com>2020-04-13 23:29:11 +0300
commitb29f83c3834667445054ff6b986a7c8ff3e89537 (patch)
treeb6812cd6ada9eaf4f580b06ae720672475be992a /test_shaders.py
parentfcbc590937f5903cd44cad580cb4e8bf51bfd773 (diff)
MSL: Add options to control emission of fragment outputs.
Like with `point_size` when not rendering points, Metal complains when writing to a variable using the `[[depth]]` qualifier when no depth buffer be attached. In that case, we must avoid emitting `FragDepth`, just like with `PointSize`. I assume it will also complain if there be no stencil attachment and the shader write to `[[stencil]]`, or it write to `[[color(n)]]` but there be no color attachment at n.
Diffstat (limited to 'test_shaders.py')
-rwxr-xr-xtest_shaders.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test_shaders.py b/test_shaders.py
index 7b68766d..621df273 100755
--- a/test_shaders.py
+++ b/test_shaders.py
@@ -258,6 +258,12 @@ def cross_compile_msl(shader, spirv, opt, iterations, paths):
msl_args.append('--msl-force-native-arrays')
if '.zero-initialize.' in shader:
msl_args.append('--force-zero-initialized-variables')
+ if '.frag-output.' in shader:
+ # Arbitrary for testing purposes.
+ msl_args.append('--msl-disable-frag-depth-builtin')
+ msl_args.append('--msl-disable-frag-stencil-ref-builtin')
+ msl_args.append('--msl-enable-frag-output-mask')
+ msl_args.append('0x000000ca')
subprocess.check_call(msl_args)