From 186e66c1a3fcf4eb0a5a1c68d22bfbf31c2a3e86 Mon Sep 17 00:00:00 2001 From: Greg Fischer Date: Wed, 7 Apr 2021 15:20:16 -0600 Subject: [PATCH] Revert "Update minimum SPIR-V requirement for GL_EXT_buffer_reference" --- Test/baseResults/spv.bufferhandle1.frag.out | 3 +- Test/baseResults/spv.bufferhandle10.frag.out | 3 +- Test/baseResults/spv.bufferhandle11.frag.out | 3 +- Test/baseResults/spv.bufferhandle12.frag.out | 4 +- Test/baseResults/spv.bufferhandle13.frag.out | 3 +- Test/baseResults/spv.bufferhandle14.frag.out | 2 +- Test/baseResults/spv.bufferhandle15.frag.out | 3 +- Test/baseResults/spv.bufferhandle16.frag.out | 2 +- Test/baseResults/spv.bufferhandle18.frag.out | 2 +- Test/baseResults/spv.bufferhandle2.frag.out | 3 +- Test/baseResults/spv.bufferhandle3.frag.out | 3 +- Test/baseResults/spv.bufferhandle4.frag.out | 3 +- Test/baseResults/spv.bufferhandle5.frag.out | 2 +- Test/baseResults/spv.bufferhandle6.frag.out | 3 +- Test/baseResults/spv.bufferhandle7.frag.out | 3 +- Test/baseResults/spv.bufferhandle8.frag.out | 3 +- Test/baseResults/spv.bufferhandle9.frag.out | 3 +- .../spv.bufferhandleUvec2.frag.out | 3 +- Test/baseResults/spv.coopmat.comp.out | 4 +- Test/baseResults/spv.intcoopmat.comp.out | 3 +- glslang/MachineIndependent/Versions.cpp | 7 ++- gtests/Spv.FromFile.cpp | 46 +++++++++---------- 22 files changed, 64 insertions(+), 47 deletions(-) diff --git a/Test/baseResults/spv.bufferhandle1.frag.out b/Test/baseResults/spv.bufferhandle1.frag.out index 68dd4833..b49c1296 100644 --- a/Test/baseResults/spv.bufferhandle1.frag.out +++ b/Test/baseResults/spv.bufferhandle1.frag.out @@ -1,5 +1,5 @@ spv.bufferhandle1.frag -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 52 @@ -7,6 +7,7 @@ spv.bufferhandle1.frag Capability VulkanMemoryModelKHR Capability PhysicalStorageBufferAddressesEXT Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" Extension "SPV_KHR_vulkan_memory_model" 1: ExtInstImport "GLSL.std.450" MemoryModel PhysicalStorageBuffer64EXT VulkanKHR diff --git a/Test/baseResults/spv.bufferhandle10.frag.out b/Test/baseResults/spv.bufferhandle10.frag.out index a376aefb..f9ab60d2 100644 --- a/Test/baseResults/spv.bufferhandle10.frag.out +++ b/Test/baseResults/spv.bufferhandle10.frag.out @@ -1,5 +1,5 @@ spv.bufferhandle10.frag -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 40 @@ -7,6 +7,7 @@ spv.bufferhandle10.frag Capability VulkanMemoryModelKHR Capability PhysicalStorageBufferAddressesEXT Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" Extension "SPV_KHR_vulkan_memory_model" 1: ExtInstImport "GLSL.std.450" MemoryModel PhysicalStorageBuffer64EXT VulkanKHR diff --git a/Test/baseResults/spv.bufferhandle11.frag.out b/Test/baseResults/spv.bufferhandle11.frag.out index 5d0e3a06..9dd1c7b8 100644 --- a/Test/baseResults/spv.bufferhandle11.frag.out +++ b/Test/baseResults/spv.bufferhandle11.frag.out @@ -2,7 +2,7 @@ spv.bufferhandle11.frag WARNING: 0:6: '' : all default precisions are highp; use precision statements to quiet warning, e.g.: "precision mediump int; precision highp float;" -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 61 @@ -11,6 +11,7 @@ WARNING: 0:6: '' : all default precisions are highp; use precision statements to Capability PhysicalStorageBufferAddressesEXT Extension "SPV_KHR_8bit_storage" Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" 1: ExtInstImport "GLSL.std.450" MemoryModel PhysicalStorageBuffer64EXT GLSL450 EntryPoint Fragment 4 "main" diff --git a/Test/baseResults/spv.bufferhandle12.frag.out b/Test/baseResults/spv.bufferhandle12.frag.out index b5473488..7cd5cb5e 100644 --- a/Test/baseResults/spv.bufferhandle12.frag.out +++ b/Test/baseResults/spv.bufferhandle12.frag.out @@ -2,14 +2,16 @@ spv.bufferhandle12.frag WARNING: 0:6: '' : all default precisions are highp; use precision statements to quiet warning, e.g.: "precision mediump int; precision highp float;" -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 183 Capability Shader Capability StorageUniformBufferBlock16 Capability PhysicalStorageBufferAddressesEXT + Extension "SPV_KHR_16bit_storage" Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" 1: ExtInstImport "GLSL.std.450" MemoryModel PhysicalStorageBuffer64EXT GLSL450 EntryPoint Fragment 4 "main" diff --git a/Test/baseResults/spv.bufferhandle13.frag.out b/Test/baseResults/spv.bufferhandle13.frag.out index 491141ac..5ce24acd 100644 --- a/Test/baseResults/spv.bufferhandle13.frag.out +++ b/Test/baseResults/spv.bufferhandle13.frag.out @@ -1,11 +1,12 @@ spv.bufferhandle13.frag -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 58 Capability Shader Capability PhysicalStorageBufferAddressesEXT Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" 1: ExtInstImport "GLSL.std.450" MemoryModel PhysicalStorageBuffer64EXT GLSL450 EntryPoint Fragment 4 "main" diff --git a/Test/baseResults/spv.bufferhandle14.frag.out b/Test/baseResults/spv.bufferhandle14.frag.out index 5fef7ba0..34df7538 100644 --- a/Test/baseResults/spv.bufferhandle14.frag.out +++ b/Test/baseResults/spv.bufferhandle14.frag.out @@ -1,5 +1,5 @@ spv.bufferhandle14.frag -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 46 diff --git a/Test/baseResults/spv.bufferhandle15.frag.out b/Test/baseResults/spv.bufferhandle15.frag.out index 5d619e2d..ab1b4dba 100644 --- a/Test/baseResults/spv.bufferhandle15.frag.out +++ b/Test/baseResults/spv.bufferhandle15.frag.out @@ -2,13 +2,14 @@ spv.bufferhandle15.frag WARNING: 0:16: '' : all default precisions are highp; use precision statements to quiet warning, e.g.: "precision mediump int; precision highp float;" -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 60 Capability Shader Capability PhysicalStorageBufferAddressesEXT Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" 1: ExtInstImport "GLSL.std.450" MemoryModel PhysicalStorageBuffer64EXT GLSL450 EntryPoint Fragment 4 "main" 37 diff --git a/Test/baseResults/spv.bufferhandle16.frag.out b/Test/baseResults/spv.bufferhandle16.frag.out index 14f96099..a9d9dcf2 100644 --- a/Test/baseResults/spv.bufferhandle16.frag.out +++ b/Test/baseResults/spv.bufferhandle16.frag.out @@ -1,5 +1,5 @@ spv.bufferhandle16.frag -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 48 diff --git a/Test/baseResults/spv.bufferhandle18.frag.out b/Test/baseResults/spv.bufferhandle18.frag.out index ea4061d6..59ad6d02 100644 --- a/Test/baseResults/spv.bufferhandle18.frag.out +++ b/Test/baseResults/spv.bufferhandle18.frag.out @@ -1,5 +1,5 @@ spv.bufferhandle18.frag -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 196 diff --git a/Test/baseResults/spv.bufferhandle2.frag.out b/Test/baseResults/spv.bufferhandle2.frag.out index 32c8e18a..e20f3b7f 100644 --- a/Test/baseResults/spv.bufferhandle2.frag.out +++ b/Test/baseResults/spv.bufferhandle2.frag.out @@ -1,11 +1,12 @@ spv.bufferhandle2.frag -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 45 Capability Shader Capability PhysicalStorageBufferAddressesEXT Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" 1: ExtInstImport "GLSL.std.450" MemoryModel PhysicalStorageBuffer64EXT GLSL450 EntryPoint Fragment 4 "main" diff --git a/Test/baseResults/spv.bufferhandle3.frag.out b/Test/baseResults/spv.bufferhandle3.frag.out index 429a857e..65ad1ca6 100644 --- a/Test/baseResults/spv.bufferhandle3.frag.out +++ b/Test/baseResults/spv.bufferhandle3.frag.out @@ -1,11 +1,12 @@ spv.bufferhandle3.frag -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 50 Capability Shader Capability PhysicalStorageBufferAddressesEXT Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" 1: ExtInstImport "GLSL.std.450" MemoryModel PhysicalStorageBuffer64EXT GLSL450 EntryPoint Fragment 4 "main" 42 diff --git a/Test/baseResults/spv.bufferhandle4.frag.out b/Test/baseResults/spv.bufferhandle4.frag.out index a441f7bf..e06bca4e 100644 --- a/Test/baseResults/spv.bufferhandle4.frag.out +++ b/Test/baseResults/spv.bufferhandle4.frag.out @@ -1,11 +1,12 @@ spv.bufferhandle4.frag -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 61 Capability Shader Capability PhysicalStorageBufferAddressesEXT Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" 1: ExtInstImport "GLSL.std.450" MemoryModel PhysicalStorageBuffer64EXT GLSL450 EntryPoint Fragment 4 "main" diff --git a/Test/baseResults/spv.bufferhandle5.frag.out b/Test/baseResults/spv.bufferhandle5.frag.out index ebd922c6..bf4d3a2a 100644 --- a/Test/baseResults/spv.bufferhandle5.frag.out +++ b/Test/baseResults/spv.bufferhandle5.frag.out @@ -1,5 +1,5 @@ spv.bufferhandle5.frag -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 22 diff --git a/Test/baseResults/spv.bufferhandle6.frag.out b/Test/baseResults/spv.bufferhandle6.frag.out index 9367d909..abc9187c 100644 --- a/Test/baseResults/spv.bufferhandle6.frag.out +++ b/Test/baseResults/spv.bufferhandle6.frag.out @@ -1,11 +1,12 @@ spv.bufferhandle6.frag -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 165 Capability Shader Capability PhysicalStorageBufferAddressesEXT Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" 1: ExtInstImport "GLSL.std.450" MemoryModel PhysicalStorageBuffer64EXT GLSL450 EntryPoint Fragment 4 "main" 154 diff --git a/Test/baseResults/spv.bufferhandle7.frag.out b/Test/baseResults/spv.bufferhandle7.frag.out index 65903c2d..4282a362 100644 --- a/Test/baseResults/spv.bufferhandle7.frag.out +++ b/Test/baseResults/spv.bufferhandle7.frag.out @@ -1,11 +1,12 @@ spv.bufferhandle7.frag -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 24 Capability Shader Capability PhysicalStorageBufferAddressesEXT Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" 1: ExtInstImport "GLSL.std.450" MemoryModel PhysicalStorageBuffer64EXT GLSL450 EntryPoint Fragment 4 "main" diff --git a/Test/baseResults/spv.bufferhandle8.frag.out b/Test/baseResults/spv.bufferhandle8.frag.out index d3725d4e..65d46653 100644 --- a/Test/baseResults/spv.bufferhandle8.frag.out +++ b/Test/baseResults/spv.bufferhandle8.frag.out @@ -1,11 +1,12 @@ spv.bufferhandle8.frag -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 27 Capability Shader Capability PhysicalStorageBufferAddressesEXT Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" 1: ExtInstImport "GLSL.std.450" MemoryModel PhysicalStorageBuffer64EXT GLSL450 EntryPoint Fragment 4 "main" diff --git a/Test/baseResults/spv.bufferhandle9.frag.out b/Test/baseResults/spv.bufferhandle9.frag.out index 24dcc4ad..1e5091c2 100644 --- a/Test/baseResults/spv.bufferhandle9.frag.out +++ b/Test/baseResults/spv.bufferhandle9.frag.out @@ -1,5 +1,5 @@ spv.bufferhandle9.frag -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 56 @@ -7,6 +7,7 @@ spv.bufferhandle9.frag Capability Int64 Capability PhysicalStorageBufferAddressesEXT Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" 1: ExtInstImport "GLSL.std.450" MemoryModel PhysicalStorageBuffer64EXT GLSL450 EntryPoint Fragment 4 "main" 16 19 diff --git a/Test/baseResults/spv.bufferhandleUvec2.frag.out b/Test/baseResults/spv.bufferhandleUvec2.frag.out index 2d4d279e..fbdbb6aa 100644 --- a/Test/baseResults/spv.bufferhandleUvec2.frag.out +++ b/Test/baseResults/spv.bufferhandleUvec2.frag.out @@ -1,11 +1,12 @@ spv.bufferhandleUvec2.frag -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 71 Capability Shader Capability PhysicalStorageBufferAddressesEXT Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" 1: ExtInstImport "GLSL.std.450" MemoryModel PhysicalStorageBuffer64EXT GLSL450 EntryPoint Fragment 4 "main" 16 19 diff --git a/Test/baseResults/spv.coopmat.comp.out b/Test/baseResults/spv.coopmat.comp.out index 16e0c764..0a609df1 100644 --- a/Test/baseResults/spv.coopmat.comp.out +++ b/Test/baseResults/spv.coopmat.comp.out @@ -1,5 +1,5 @@ spv.coopmat.comp -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 228 @@ -9,7 +9,9 @@ spv.coopmat.comp Capability VulkanMemoryModelKHR Capability PhysicalStorageBufferAddressesEXT Capability CooperativeMatrixNV + Extension "SPV_KHR_16bit_storage" Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" Extension "SPV_KHR_vulkan_memory_model" Extension "SPV_NV_cooperative_matrix" 1: ExtInstImport "GLSL.std.450" diff --git a/Test/baseResults/spv.intcoopmat.comp.out b/Test/baseResults/spv.intcoopmat.comp.out index 6ea71271..6a697432 100644 --- a/Test/baseResults/spv.intcoopmat.comp.out +++ b/Test/baseResults/spv.intcoopmat.comp.out @@ -1,5 +1,5 @@ spv.intcoopmat.comp -// Module Version 10300 +// Module Version 10000 // Generated by (magic number): 8000a // Id's are bound by 262 @@ -12,6 +12,7 @@ spv.intcoopmat.comp Capability CooperativeMatrixNV Extension "SPV_KHR_8bit_storage" Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" Extension "SPV_KHR_vulkan_memory_model" Extension "SPV_NV_cooperative_matrix" 1: ExtInstImport "GLSL.std.450" diff --git a/glslang/MachineIndependent/Versions.cpp b/glslang/MachineIndependent/Versions.cpp index 804cf2fb..7554bfd7 100644 --- a/glslang/MachineIndependent/Versions.cpp +++ b/glslang/MachineIndependent/Versions.cpp @@ -165,13 +165,12 @@ void TParseVersions::initializeExtensionBehavior() EShTargetLanguageVersion minSpvVersion; } extensionData; - const extensionData exts[] = { {E_GL_EXT_ray_tracing, EShTargetSpv_1_4}, - {E_GL_EXT_buffer_reference, EShTargetSpv_1_3} }; + const extensionData exts[] = { {E_GL_EXT_ray_tracing, EShTargetSpv_1_4} }; for (size_t ii = 0; ii < sizeof(exts) / sizeof(exts[0]); ii++) { // Add only extensions which require > spv1.0 to save space in map if (exts[ii].minSpvVersion > EShTargetSpv_1_0) { - extensionMinSpv[exts[ii].extensionName] = exts[ii].minSpvVersion; + extensionMinSpv[E_GL_EXT_ray_tracing] = exts[ii].minSpvVersion; } } @@ -876,7 +875,7 @@ void TParseVersions::updateExtensionBehavior(int line, const char* extension, co checkExtensionStage(getCurrentLoc(), extension); // check if extension has additional requirements - extensionRequires(getCurrentLoc(), extension, behaviorString); + extensionRequires(getCurrentLoc(), extension ,behaviorString); // update the requested extension updateExtensionBehavior(extension, behavior); diff --git a/gtests/Spv.FromFile.cpp b/gtests/Spv.FromFile.cpp index af301ad7..5456fb89 100644 --- a/gtests/Spv.FromFile.cpp +++ b/gtests/Spv.FromFile.cpp @@ -289,6 +289,27 @@ INSTANTIATE_TEST_SUITE_P( "spv.bool.vert", "spv.boolInBlock.frag", "spv.branch-return.vert", + "spv.bufferhandle1.frag", + "spv.bufferhandle10.frag", + "spv.bufferhandle11.frag", + "spv.bufferhandle12.frag", + "spv.bufferhandle13.frag", + "spv.bufferhandle14.frag", + "spv.bufferhandle15.frag", + "spv.bufferhandle16.frag", + "spv.bufferhandle17_Errors.frag", + "spv.bufferhandle18.frag", + "spv.bufferhandle19_Errors.frag", + "spv.bufferhandle2.frag", + "spv.bufferhandle3.frag", + "spv.bufferhandle4.frag", + "spv.bufferhandle5.frag", + "spv.bufferhandle6.frag", + "spv.bufferhandle7.frag", + "spv.bufferhandle8.frag", + "spv.bufferhandle9.frag", + "spv.bufferhandleUvec2.frag", + "spv.bufferhandle_Error.frag", "spv.builtInXFB.vert", "spv.conditionalDemote.frag", "spv.conditionalDiscard.frag", @@ -297,6 +318,7 @@ INSTANTIATE_TEST_SUITE_P( "spv.constConstruct.vert", "spv.controlFlowAttributes.frag", "spv.conversion.frag", + "spv.coopmat.comp", "spv.coopmat_Error.comp", "spv.dataOut.frag", "spv.dataOutIndirect.frag", @@ -331,6 +353,7 @@ INSTANTIATE_TEST_SUITE_P( "spv.GeometryShaderPassthrough.geom", "spv.interpOps.frag", "spv.int64.frag", + "spv.intcoopmat.comp", "spv.intOps.vert", "spv.layer.tese", "spv.layoutNested.vert", @@ -470,28 +493,6 @@ INSTANTIATE_TEST_SUITE_P( "spv.1.3.8bitstorage-ubo.vert", "spv.1.3.8bitstorage-ssbo.vert", "spv.1.3.coopmat.comp", - "spv.bufferhandle1.frag", - "spv.bufferhandle10.frag", - "spv.bufferhandle11.frag", - "spv.bufferhandle12.frag", - "spv.bufferhandle13.frag", - "spv.bufferhandle14.frag", - "spv.bufferhandle15.frag", - "spv.bufferhandle16.frag", - "spv.bufferhandle17_Errors.frag", - "spv.bufferhandle18.frag", - "spv.bufferhandle19_Errors.frag", - "spv.bufferhandle2.frag", - "spv.bufferhandle3.frag", - "spv.bufferhandle4.frag", - "spv.bufferhandle5.frag", - "spv.bufferhandle6.frag", - "spv.bufferhandle7.frag", - "spv.bufferhandle8.frag", - "spv.bufferhandle9.frag", - "spv.bufferhandleUvec2.frag", - "spv.bufferhandle_Error.frag", - "spv.coopmat.comp", "spv.deviceGroup.frag", "spv.drawParams.vert", "spv.int8.frag", @@ -500,7 +501,6 @@ INSTANTIATE_TEST_SUITE_P( "spv.explicittypes.frag", "spv.float32.frag", "spv.float64.frag", - "spv.intcoopmat.comp", "spv.memoryScopeSemantics.comp", "spv.memoryScopeSemantics_Error.comp", "spv.multiView.frag",