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:
authorHans-Kristian Arntzen <post@arntzen-software.no>2022-03-03 13:04:45 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2022-03-03 16:50:56 +0300
commit31be74a853b92d98893e2c35d2319cb227afc9b0 (patch)
treec776cf480601d240a6d655a83f67cb98cc5c2170 /test_shaders.py
parentb91ecf607784af2afc336d09ada9d7ad83165e3a (diff)
Add relax_nan_checks options.
Makes codegen from typical D3D emulation SPIR-V more readable. Also makes cross compilation with NotEqual more sensible. It's very rare to actually need the strict NaN-checks in practice. Also, glslang now emits UnordNotEqual by default it seems, so give up trying to assume OrdNotEqual. Harmonize for UnordNotEqual as the sane default.
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 640baa23..49038939 100755
--- a/test_shaders.py
+++ b/test_shaders.py
@@ -350,6 +350,8 @@ def cross_compile_msl(shader, spirv, opt, iterations, paths):
if '.mask-clip-distance.' in shader:
msl_args.append('--mask-stage-output-builtin')
msl_args.append('ClipDistance')
+ if '.relax-nan.' in shader:
+ msl_args.append('--relax-nan-checks')
subprocess.check_call(msl_args)
@@ -474,6 +476,8 @@ def cross_compile_hlsl(shader, spirv, opt, force_no_external_validation, iterati
hlsl_args.append('--hlsl-enable-16bit-types')
if '.flatten-matrix-vertex-input.' in shader:
hlsl_args.append('--hlsl-flatten-matrix-vertex-input-semantics')
+ if '.relax-nan.' in shader:
+ hlsl_args.append('--relax-nan-checks')
subprocess.check_call(hlsl_args)
@@ -576,6 +580,8 @@ def cross_compile(shader, vulkan, spirv, invalid_spirv, eliminate, is_legacy, fl
extra_args += ['--force-zero-initialized-variables']
if '.force-flattened-io.' in shader:
extra_args += ['--glsl-force-flattened-io-blocks']
+ if '.relax-nan.' in shader:
+ extra_args.append('--relax-nan-checks')
spirv_cross_path = paths.spirv_cross