dEQP-VK: Add SPV_KHR_16bit_storage at shaders using 16bit
authorJose Maria Casanova Crespo <jmcasanova@igalia.com>
Wed, 31 May 2017 11:10:31 +0000 (13:10 +0200)
committerPyry Haulos <phaulos@google.com>
Fri, 2 Jun 2017 18:40:53 +0000 (14:40 -0400)
All shaders stages that use VK_KHR_16bit_storage capabilities
need to enable the SPV_KHR_16bit_storage extension at the SPIR-V
assembly.

A recent update of the SPIRV-Tools checks for this error in the
SPIR-V code. This has raised several link error in the execution
of the VK_KHR_16bit_storage tests.

This patch enables the extension at the assembly code of the compute
shaders tests and the pass-through stages of the input-output
graphics tests.

Also includes newline at OpExtension "SPV_KHR_16bit_storage" uses.

Components: Vulkan
VK-GL-CTS issue: 454

Affects:
* dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output.*
* dEQP-VK.spirv_assembly.instruction.compute.16bit_storage.*

Change-Id: I29b7e8706eba54b5f931f33442c85613d99cd113

external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsm16bitStorageTests.cpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp

index 7f266f9..71aa57a 100644 (file)
@@ -453,6 +453,7 @@ void addCompute16bitStorageUniform16To32Group (tcu::TestCaseGroup* group)
        const StringTemplate                    shaderTemplate  (
                "OpCapability Shader\n"
                "OpCapability ${capability}\n"
+               "OpExtension \"SPV_KHR_16bit_storage\"\n"
                "OpMemoryModel Logical GLSL450\n"
                "OpEntryPoint GLCompute %main \"main\" %id\n"
                "OpExecutionMode %main LocalSize 1 1 1\n"
@@ -722,6 +723,7 @@ void addCompute16bitStoragePushConstant16To32Group (tcu::TestCaseGroup* group)
        const StringTemplate                    shaderTemplate  (
                "OpCapability Shader\n"
                "OpCapability StoragePushConstant16\n"
+               "OpExtension \"SPV_KHR_16bit_storage\"\n"
                "OpMemoryModel Logical GLSL450\n"
                "OpEntryPoint GLCompute %main \"main\" %id\n"
                "OpExecutionMode %main LocalSize 1 1 1\n"
@@ -1172,6 +1174,7 @@ void addCompute16bitStorageUniform32To16Group (tcu::TestCaseGroup* group)
        const StringTemplate                    shaderTemplate  (
                "OpCapability Shader\n"
                "OpCapability ${capability}\n"
+               "OpExtension \"SPV_KHR_16bit_storage\"\n"
                "OpMemoryModel Logical GLSL450\n"
                "OpEntryPoint GLCompute %main \"main\" %id\n"
                "OpExecutionMode %main LocalSize 1 1 1\n"
@@ -1762,7 +1765,7 @@ void addGraphics16BitStorageInputOutputFloat32To16Group (tcu::TestCaseGroup* tes
        extensions.push_back("VK_KHR_16bit_storage");
 
        fragments["capability"]                         = "OpCapability StorageInputOutput16\n";
-       fragments["extension"]                          = "OpExtension \"SPV_KHR_16bit_storage\"";
+       fragments["extension"]                          = "OpExtension \"SPV_KHR_16bit_storage\"\n";
 
        getDefaultColors(defaultColors);
 
@@ -1897,7 +1900,7 @@ void addGraphics16BitStorageInputOutputFloat16To32Group (tcu::TestCaseGroup* tes
        extensions.push_back("VK_KHR_16bit_storage");
 
        fragments["capability"]                         = "OpCapability StorageInputOutput16\n";
-       fragments["extension"]                          = "OpExtension \"SPV_KHR_16bit_storage\"";
+       fragments["extension"]                          = "OpExtension \"SPV_KHR_16bit_storage\"\n";
 
        getDefaultColors(defaultColors);
 
@@ -2016,7 +2019,7 @@ void addGraphics16BitStorageInputOutputInt32To16Group (tcu::TestCaseGroup* testG
        extensions.push_back("VK_KHR_16bit_storage");
 
        fragments["capability"]                         = "OpCapability StorageInputOutput16\n";
-       fragments["extension"]                          = "OpExtension \"SPV_KHR_16bit_storage\"";
+       fragments["extension"]                          = "OpExtension \"SPV_KHR_16bit_storage\"\n";
 
        getDefaultColors(defaultColors);
 
@@ -2156,7 +2159,7 @@ void addGraphics16BitStorageInputOutputInt16To32Group (tcu::TestCaseGroup* testG
        extensions.push_back("VK_KHR_16bit_storage");
 
        fragments["capability"]                         = "OpCapability StorageInputOutput16\n";
-       fragments["extension"]                          = "OpExtension \"SPV_KHR_16bit_storage\"";
+       fragments["extension"]                          = "OpExtension \"SPV_KHR_16bit_storage\"\n";
 
        getDefaultColors(defaultColors);
 
index 7ab186c..a1092fb 100644 (file)
@@ -1023,6 +1023,7 @@ map<string, string> passthruInterface(const IFDataType& data_type)
                }
 
                fragments["capability"]         = "OpCapability StorageInputOutput16\n";
+               fragments["extension"]          = "OpExtension \"SPV_KHR_16bit_storage\"\n";
 
                if (data_type.isVector())
                {