SPV 1.4: Move to 1.4 validation, removing all 1.4 validation failures.
authorJohn Kessenich <cepheus@frii.com>
Fri, 10 May 2019 05:50:08 +0000 (23:50 -0600)
committerJohn Kessenich <cepheus@frii.com>
Fri, 10 May 2019 06:02:45 +0000 (00:02 -0600)
SPIRV/SpvTools.cpp
Test/baseResults/spv.1.4.LoopControl.frag.out
Test/baseResults/spv.1.4.NonWritable.frag.out
Test/baseResults/spv.1.4.OpCopyLogical.comp.out
Test/baseResults/spv.1.4.OpCopyLogical.funcall.frag.out
Test/baseResults/spv.1.4.OpCopyLogicalBool.comp.out
Test/baseResults/spv.1.4.OpEntryPoint.frag.out
Test/baseResults/spv.1.4.OpSelect.frag.out
Test/baseResults/spv.1.4.image.frag.out
Test/baseResults/spv.1.4.sparseTexture.frag.out
Test/baseResults/spv.1.4.texture.frag.out

index cce5fa7..db26d59 100644 (file)
@@ -52,8 +52,21 @@ namespace glslang {
 spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLogger* logger)
 {
     switch (spvVersion.vulkan) {
-    case glslang::EShTargetVulkan_1_0: return spv_target_env::SPV_ENV_VULKAN_1_0;
-    case glslang::EShTargetVulkan_1_1: return spv_target_env::SPV_ENV_VULKAN_1_1;
+    case glslang::EShTargetVulkan_1_0:
+        return spv_target_env::SPV_ENV_VULKAN_1_0;
+    case glslang::EShTargetVulkan_1_1:
+        switch (spvVersion.spv) {
+        case EShTargetSpv_1_0:
+        case EShTargetSpv_1_1:
+        case EShTargetSpv_1_2:
+        case EShTargetSpv_1_3:
+            return spv_target_env::SPV_ENV_VULKAN_1_1;
+        case EShTargetSpv_1_4:
+            return spv_target_env::SPV_ENV_VULKAN_1_1_SPIRV_1_4;
+        default:
+            logger->missingFunctionality("Target version for SPIRV-Tools validator");
+            return spv_target_env::SPV_ENV_VULKAN_1_1;
+        }
     default:
         break;
     }
index 608b4bf..c9a605b 100644 (file)
@@ -2,7 +2,6 @@ spv.1.4.LoopControl.frag
 WARNING: 0:15: 'min_iterations' : expected a single integer argument 
 WARNING: 0:15: 'max_iterations' : expected a single integer argument 
 
-Validation failed
 // Module Version 10400
 // Generated by (magic number): 80007
 // Id's are bound by 54
index 4f92426..3f54661 100755 (executable)
@@ -1,5 +1,4 @@
 spv.1.4.NonWritable.frag
-Validation failed
 // Module Version 10400
 // Generated by (magic number): 80007
 // Id's are bound by 38
index c54ba65..d80bfee 100644 (file)
@@ -1,5 +1,4 @@
 spv.1.4.OpCopyLogical.comp
-Validation failed
 // Module Version 10400
 // Generated by (magic number): 80007
 // Id's are bound by 65
index 48094e9..85bfdb2 100644 (file)
@@ -1,5 +1,4 @@
 spv.1.4.OpCopyLogical.funcall.frag
-Validation failed
 // Module Version 10400
 // Generated by (magic number): 80007
 // Id's are bound by 60
index 760fb30..f2f85c1 100644 (file)
@@ -1,5 +1,4 @@
 spv.1.4.OpCopyLogicalBool.comp
-Validation failed
 // Module Version 10400
 // Generated by (magic number): 80007
 // Id's are bound by 135
index 733d537..694cff0 100644 (file)
@@ -1,5 +1,4 @@
 spv.1.4.OpEntryPoint.frag
-Validation failed
 // Module Version 10400
 // Generated by (magic number): 80007
 // Id's are bound by 64
index 657d647..3179717 100755 (executable)
@@ -1,5 +1,4 @@
 spv.1.4.OpSelect.frag
-Validation failed
 // Module Version 10400
 // Generated by (magic number): 80007
 // Id's are bound by 98
index 02e379c..4adfd4b 100755 (executable)
@@ -1,5 +1,4 @@
 spv.1.4.image.frag
-Validation failed
 // Module Version 10400
 // Generated by (magic number): 80007
 // Id's are bound by 104
index a36d802..292335e 100755 (executable)
@@ -1,5 +1,4 @@
 spv.1.4.sparseTexture.frag
-Validation failed
 // Module Version 10400
 // Generated by (magic number): 80007
 // Id's are bound by 213
index 3186db4..7c2de0b 100755 (executable)
@@ -1,5 +1,4 @@
 spv.1.4.texture.frag
-Validation failed
 // Module Version 10400
 // Generated by (magic number): 80007
 // Id's are bound by 79