yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
5cf91e73
main
1// 2// Copyright (C) 2016 Google, Inc. 3// Copyright (C) 2019, 2022-2024 Arm Limited. 4// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. 5// 6// All rights reserved. 7// 8// Redistribution and use in source and binary forms, with or without 9// modification, are permitted provided that the following conditions 10// are met: 11// 12// Redistributions of source code must retain the above copyright 13// notice, this list of conditions and the following disclaimer. 14// 15// Redistributions in binary form must reproduce the above 16// copyright notice, this list of conditions and the following 17// disclaimer in the documentation and/or other materials provided 18// with the distribution. 19// 20// Neither the name of Google Inc. nor the names of its 21// contributors may be used to endorse or promote products derived 22// from this software without specific prior written permission. 23// 24// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 25// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 26// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 27// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 28// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 29// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 30// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 31// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 32// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 34// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35// POSSIBILITY OF SUCH DAMAGE. 36 37#include <algorithm> 38 39#include <gtest/gtest.h> 40 41#include "TestFixture.h" 42 43namespace glslangtest { 44namespace { 45 46struct IoMapData { 47const char * fileName ; 48const char * entryPoint ; 49int baseSamplerBinding ; 50int baseTextureBinding ; 51int baseImageBinding ; 52int baseUboBinding ; 53int baseSsboBinding ; 54bool autoMapBindings ; 55bool flattenUniforms ; 56bool relaxSetBindingLimits ; 57}; 58 59std::string FileNameAsCustomTestSuffixIoMap ( 60const ::testing::TestParamInfo < IoMapData >& info ) { 61 std::string name = info .param .fileName ; 62// A valid test case suffix cannot have '.' and '-' inside. 63 std::replace (name .begin (),name .end (),'.' ,'_' ); 64 std::replace (name .begin (),name .end (),'-' ,'_' ); 65return name ; 66} 67 68using CompileVulkanToSpirvTest = GlslangTest < ::testing::TestWithParam < std::string >> ; 69using CompileVulkanToSpirvRelaxSetBindingLimitsTest = GlslangTest < ::testing::TestWithParam < std::string >> ; 70using CompileVulkanToSpirvTestNoLink = GlslangTest < ::testing::TestWithParam < std::string >> ; 71using CompileToSpirv14TestNoLink = GlslangTest < ::testing::TestWithParam < std::string >> ; 72using CompileVulkanToSpirvDeadCodeElimTest = GlslangTest < ::testing::TestWithParam < std::string >> ; 73using CompileVulkan1_1ToSpirvTest = GlslangTest < ::testing::TestWithParam < std::string >> ; 74using CompileToSpirv14Test = GlslangTest < ::testing::TestWithParam < std::string >> ; 75using CompileToSpirv16Test = GlslangTest < ::testing::TestWithParam < std::string >> ; 76using CompileOpenGLToSpirvTest = GlslangTest < ::testing::TestWithParam < std::string >> ; 77using VulkanSemantics = GlslangTest < ::testing::TestWithParam < std::string >> ; 78using OpenGLSemantics = GlslangTest < ::testing::TestWithParam < std::string >> ; 79using VulkanAstSemantics = GlslangTest < ::testing::TestWithParam < std::string >> ; 80using HlslIoMap = GlslangTest < ::testing::TestWithParam < IoMapData >> ; 81using GlslIoMap = GlslangTest < ::testing::TestWithParam < IoMapData >> ; 82using CompileVulkanToSpirvTestQCOM = GlslangTest < ::testing::TestWithParam < std::string >> ; 83using CompileVulkanToSpirv13TestQCOM = GlslangTest < ::testing::TestWithParam < std::string >> ; 84using CompileVulkanToSpirv14TestQCOM = GlslangTest < ::testing::TestWithParam < std::string >> ; 85using CompileVulkanToSpirvTestAMD = GlslangTest < ::testing::TestWithParam < std::string >> ; 86using CompileVulkanToSpirvTestNV = GlslangTest < ::testing::TestWithParam < std::string >> ; 87using CompileVulkanToSpirv14TestNV = GlslangTest < ::testing::TestWithParam < std::string >> ; 88using CompileUpgradeTextureToSampledTextureAndDropSamplersTest = GlslangTest < ::testing::TestWithParam < std::string >> ; 89using GlslSpirvDebugInfoTest = GlslangTest < ::testing::TestWithParam < std::string >> ; 90using GlslNonSemanticShaderDebugInfoTest = GlslangTest < ::testing::TestWithParam < std::string >> ; 91using GlslNonSemanticShaderDebugInfoVulkanLatestTest = GlslangTest < ::testing::TestWithParam < std::string >> ; 92using GlslSplitBarrierEXTTest = GlslangTest < ::testing::TestWithParam < std::string >> ; 93 94// Compiling GLSL to SPIR-V under Vulkan semantics. Expected to successfully 95// generate SPIR-V. 96TEST_P (CompileVulkanToSpirvTest ,FromFile ) 97{ 98loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 99Source ::GLSL ,Semantics ::Vulkan , glslang::EShTargetVulkan_1_0 , glslang::EShTargetSpv_1_0 , 100Target ::Spv ); 101} 102 103TEST_P (CompileVulkanToSpirvRelaxSetBindingLimitsTest ,FromFile ) 104{ 105loadFileCompileAndCheckWithOptions (GlobalTestSettings .testRoot ,GetParam (), 106Source ::GLSL ,Semantics ::Vulkan , 107 glslang::EShTargetVulkan_1_0 , glslang::EShTargetSpv_1_0 , 108Target ::Spv , true,"" ,"/baseResults/" , 109EShMsgRelaxSetBindingLimits ); 110} 111 112// Compiling GLSL to SPIR-V under Vulkan semantics without linking. Expected to successfully generate SPIR-V. 113TEST_P (CompileVulkanToSpirvTestNoLink ,FromFile ) 114{ 115options ().compileOnly = true; 116// NOTE: Vulkan 1.3 is currently required to use the linkage capability 117// TODO(ncesario) make sure this is actually necessary 118loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (),Source ::GLSL ,Semantics ::Vulkan , 119 glslang::EShTargetVulkan_1_3 , glslang::EShTargetSpv_1_0 ,Target ::Spv ); 120} 121 122// Compiling GLSL to SPIR-V 1.4 without linking, for features that require SPIR-V 1.4. 123TEST_P (CompileToSpirv14TestNoLink ,FromFile ) 124{ 125options ().compileOnly = true; 126loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (),Source ::GLSL ,Semantics ::Vulkan , 127 glslang::EShTargetVulkan_1_3 , glslang::EShTargetSpv_1_4 ,Target ::Spv ); 128} 129 130TEST_P (CompileVulkanToSpirvDeadCodeElimTest ,FromFile ) 131{ 132loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 133Source ::GLSL ,Semantics ::Vulkan , glslang::EShTargetVulkan_1_0 , glslang::EShTargetSpv_1_0 , 134Target ::Spv ); 135} 136 137 138TEST_P (CompileVulkan1_1ToSpirvTest ,FromFile ) 139{ 140loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 141Source ::GLSL ,Semantics ::Vulkan , glslang::EShTargetVulkan_1_1 , glslang::EShTargetSpv_1_3 , 142Target ::Spv ); 143} 144 145TEST_P (CompileToSpirv14Test ,FromFile ) 146{ 147loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 148Source ::GLSL ,Semantics ::Vulkan , glslang::EShTargetVulkan_1_1 , glslang::EShTargetSpv_1_4 , 149Target ::Spv ); 150} 151 152TEST_P (CompileToSpirv16Test ,FromFileTargetVulkan1_3 ) 153{ 154loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 155Source ::GLSL ,Semantics ::Vulkan , glslang::EShTargetVulkan_1_3 , glslang::EShTargetSpv_1_6 , 156Target ::Spv ); 157} 158 159TEST_P (CompileToSpirv16Test ,FromFileTargetVulkan1_4 ) 160{ 161loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 162Source ::GLSL ,Semantics ::Vulkan , glslang::EShTargetVulkan_1_4 , glslang::EShTargetSpv_1_6 , 163Target ::Spv ); 164} 165 166// Compiling GLSL to SPIR-V under OpenGL semantics. Expected to successfully 167// generate SPIR-V. 168TEST_P (CompileOpenGLToSpirvTest ,FromFile ) 169{ 170loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 171Source ::GLSL ,Semantics ::OpenGL , glslang::EShTargetVulkan_1_0 , glslang::EShTargetSpv_1_0 , 172Target ::Spv ); 173} 174 175// GLSL-level Vulkan semantics test. Expected to error out before generating 176// SPIR-V. 177TEST_P (VulkanSemantics ,FromFile ) 178{ 179loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 180Source ::GLSL ,Semantics ::Vulkan , glslang::EShTargetVulkan_1_0 , glslang::EShTargetSpv_1_0 , 181Target ::Spv , false); 182} 183 184// GLSL-level Vulkan semantics test. Expected to error out before generating 185// SPIR-V. 186TEST_P (OpenGLSemantics ,FromFile ) 187{ 188loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 189Source ::GLSL ,Semantics ::OpenGL , glslang::EShTargetVulkan_1_0 , glslang::EShTargetSpv_1_0 , 190Target ::Spv , false); 191} 192 193// GLSL-level Vulkan semantics test that need to see the AST for validation. 194TEST_P (VulkanAstSemantics ,FromFile ) 195{ 196loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 197Source ::GLSL ,Semantics ::Vulkan , glslang::EShTargetVulkan_1_0 , glslang::EShTargetSpv_1_0 , 198Target ::AST ); 199} 200 201// HLSL-level Vulkan semantics tests. 202TEST_P (HlslIoMap ,FromFile ) 203{ 204loadFileCompileIoMapAndCheck (GlobalTestSettings .testRoot ,GetParam ().fileName , 205Source ::HLSL ,Semantics ::Vulkan , 206Target ::Spv ,GetParam ().entryPoint , 207GetParam ().baseSamplerBinding , 208GetParam ().baseTextureBinding , 209GetParam ().baseImageBinding , 210GetParam ().baseUboBinding , 211GetParam ().baseSsboBinding , 212GetParam ().autoMapBindings , 213GetParam ().flattenUniforms , 214GetParam ().relaxSetBindingLimits ); 215} 216 217// GLSL-level Vulkan semantics tests. 218TEST_P (GlslIoMap ,FromFile ) 219{ 220loadFileCompileIoMapAndCheck (GlobalTestSettings .testRoot ,GetParam ().fileName , 221Source ::GLSL ,Semantics ::Vulkan , 222Target ::Spv ,GetParam ().entryPoint , 223GetParam ().baseSamplerBinding , 224GetParam ().baseTextureBinding , 225GetParam ().baseImageBinding , 226GetParam ().baseUboBinding , 227GetParam ().baseSsboBinding , 228GetParam ().autoMapBindings , 229GetParam ().flattenUniforms , 230GetParam ().relaxSetBindingLimits ); 231} 232 233// Compiling GLSL to SPIR-V under Vulkan semantics (QCOM extensions enabled). 234// Expected to successfully generate SPIR-V. 235TEST_P (CompileVulkanToSpirvTestQCOM ,FromFile ) 236{ 237loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 238Source ::GLSL ,Semantics ::Vulkan , glslang::EShTargetVulkan_1_0 , glslang::EShTargetSpv_1_0 , 239Target ::Spv ); 240} 241 242TEST_P (CompileVulkanToSpirv13TestQCOM ,FromFile ) 243{ 244loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 245Source ::GLSL ,Semantics ::Vulkan , glslang::EShTargetVulkan_1_1 , glslang::EShTargetSpv_1_3 , 246Target ::Spv ); 247} 248 249TEST_P (CompileVulkanToSpirv14TestQCOM ,FromFile ) 250{ 251loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 252Source ::GLSL ,Semantics ::Vulkan , glslang::EShTargetVulkan_1_1 , glslang::EShTargetSpv_1_4 , 253Target ::Spv ); 254} 255 256// Compiling GLSL to SPIR-V under Vulkan semantics (AMD extensions enabled). 257// Expected to successfully generate SPIR-V. 258TEST_P (CompileVulkanToSpirvTestAMD ,FromFile ) 259{ 260loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 261Source ::GLSL ,Semantics ::Vulkan , glslang::EShTargetVulkan_1_0 , glslang::EShTargetSpv_1_0 , 262Target ::Spv ); 263} 264 265// Compiling GLSL to SPIR-V under Vulkan semantics (NV extensions enabled). 266// Expected to successfully generate SPIR-V. 267TEST_P (CompileVulkanToSpirvTestNV ,FromFile ) 268{ 269loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 270Source ::GLSL ,Semantics ::Vulkan , glslang::EShTargetVulkan_1_0 , glslang::EShTargetSpv_1_0 , 271Target ::Spv ); 272} 273 274TEST_P (CompileVulkanToSpirv14TestNV ,FromFile ) 275{ 276loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (), 277Source ::GLSL ,Semantics ::Vulkan , glslang::EShTargetVulkan_1_1 , glslang::EShTargetSpv_1_4 , 278Target ::Spv ); 279} 280 281TEST_P (CompileUpgradeTextureToSampledTextureAndDropSamplersTest ,FromFile ) 282{ 283loadCompileUpgradeTextureToSampledTextureAndDropSamplersAndCheck (GlobalTestSettings .testRoot , 284GetParam (), 285Source ::GLSL , 286Semantics ::Vulkan , 287Target ::Spv ); 288} 289 290TEST_P (GlslSpirvDebugInfoTest ,FromFile ) 291{ 292loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (),Source ::GLSL ,Semantics ::Vulkan , 293 glslang::EShTargetVulkan_1_0 , glslang::EShTargetSpv_1_0 ,Target ::Spv , true,"" , 294"/baseResults/" , false, true, false); 295} 296 297TEST_P (GlslNonSemanticShaderDebugInfoTest ,FromFile ) 298{ 299loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (),Source ::GLSL ,Semantics ::Vulkan , 300 glslang::EShTargetVulkan_1_0 , glslang::EShTargetSpv_1_0 ,Target ::Spv , true,"" , 301"/baseResults/" , false, true, true); 302} 303 304TEST_P (GlslNonSemanticShaderDebugInfoVulkanLatestTest ,FromFile ) 305{ 306loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (),Source ::GLSL ,Semantics ::Vulkan , 307 glslang::EShTargetVulkan_1_4 , glslang::EShTargetSpv_1_6 ,Target ::Spv , true,"" , 308"/baseResults/" , false, true, true); 309} 310 311TEST_P (GlslSplitBarrierEXTTest ,FromFile ) 312{ 313loadFileCompileAndCheck (GlobalTestSettings .testRoot ,GetParam (),Source ::GLSL ,Semantics ::Vulkan , 314 glslang::EShTargetVulkan_1_4 , glslang::EShTargetSpv_1_6 ,Target ::Spv , true,"" , 315"/baseResults/" , false, true, true); 316} 317 318// clang-format off 319INSTANTIATE_TEST_SUITE_P ( 320Glsl ,CompileVulkanToSpirvTest , 321 ::testing::ValuesIn (std::vector < std::string > ({ 322// Test looping constructs. 323// No tests yet for making sure break and continue from a nested loop 324// goes to the innermost target. 325"spv.barrier.vert" , 326"spv.do-simple.vert" , 327"spv.do-while-continue-break.vert" , 328"spv.for-complex-condition.vert" , 329"spv.for-continue-break.vert" , 330"spv.for-simple.vert" , 331"spv.for-notest.vert" , 332"spv.for-nobody.vert" , 333"spv.while-continue-break.vert" , 334"spv.while-simple.vert" , 335"spv.pragma.stdgl.oob.vert" , 336// vulkan-specific tests 337"rayQuery.rgen" , 338"rayQuery-no-cse.rgen" , 339"rayQuery-initialize.rgen" , 340"rayQuery-allOps.rgen" , 341"rayQuery-allOps.Error.rgen" , 342"rayQuery-committed.Error.rgen" , 343"rayQuery-allOps.comp" , 344"rayQuery-allOps.frag" , 345"rayQuery-initialization.Error.comp" , 346"rayQuery-global.rgen" , 347"rayQuery-types.comp" , 348"rayQuery-OpConvertUToAccelerationStructureKHR.comp" , 349"rayQuery-opacityMicromap.comp" , 350"spv.set.vert" , 351"spv.double.comp" , 352"spv.100ops.frag" , 353"spv.130.frag" , 354"spv.140.frag" , 355"spv.140.location.frag" , 356"spv.140.location.vert" , 357"spv.150.geom" , 358"spv.150.vert" , 359"spv.16bitstorage.frag" , 360"spv.16bitstorage_Error.frag" , 361"spv.16bitstorage-int.frag" , 362"spv.16bitstorage_Error-int.frag" , 363"spv.16bitstorage-uint.frag" , 364"spv.16bitstorage_Error-uint.frag" , 365"spv.300BuiltIns.vert" , 366"spv.300layout.frag" , 367"spv.300layout.vert" , 368"spv.300layoutp.vert" , 369"spv.310.comp" , 370"spv.310.bitcast.frag" , 371"spv.320.clipCullDistance.vert" , 372"spv.320.clipCullDistance.frag" , 373"spv.320.clipCullDistanceWarn.vert" , 374"spv.330.geom" , 375"spv.330.location.frag" , 376"spv.330.location.vert" , 377"spv.400.frag" , 378"spv.400.tesc" , 379"spv.400.tese" , 380"spv.420.geom" , 381"spv.430.frag" , 382"spv.430.vert" , 383"spv.440.cullDistance.vert" , 384"spv.450.tesc" , 385"spv.450.geom" , 386"spv.450.noRedecl.tesc" , 387"spv.8bitstorage-int.frag" , 388"spv.8bitstorage_Error-int.frag" , 389"spv.8bitstorage-uint.frag" , 390"spv.8bitstorage_Error-uint.frag" , 391"spv.8bitstorage-ubo.vert" , 392"spv.8bitstorage-ssbo.vert" , 393"spv.8bit-16bit-construction.frag" , 394"spv.accessChain.frag" , 395"spv.aggOps.frag" , 396"spv.always-discard.frag" , 397"spv.always-discard2.frag" , 398"spv.arbPostDepthCoverage.frag" , 399"spv.arbPostDepthCoverage_Error.frag" , 400"spv.atomicCounter.comp" , 401"spv.bitCast.frag" , 402"spv.bool.vert" , 403"spv.boolInBlock.frag" , 404"spv.branch-return.vert" , 405"spv.bufferhandle11.frag" , 406"spv.bufferhandle12.frag" , 407"spv.bufferhandle13.frag" , 408"spv.bufferhandle14.frag" , 409"spv.bufferhandle15.frag" , 410"spv.bufferhandle16.frag" , 411"spv.bufferhandle17_Errors.frag" , 412"spv.bufferhandle18.frag" , 413"spv.bufferhandle19_Errors.frag" , 414"spv.bufferhandle2.frag" , 415"spv.bufferhandle3_Errors.frag" , 416"spv.bufferhandle4.frag" , 417"spv.bufferhandle5.frag" , 418"spv.bufferhandle6.frag" , 419"spv.bufferhandle7.frag" , 420"spv.bufferhandle8.frag" , 421"spv.bufferhandle9.frag" , 422"spv.bufferhandle20.frag" , 423"spv.bufferhandle21.frag" , 424"spv.bufferhandle22.frag" , 425"spv.bufferhandle23.frag" , 426"spv.bufferhandle24.frag" , 427"spv.bufferhandle25.frag" , 428"spv.bufferhandle26.frag" , 429"spv.bufferhandle27.frag" , 430"spv.bufferhandle28_Errors.frag" , 431"spv.bufferhandleRuntimeArray.frag" , 432"spv.bufferhandleUvec2.frag" , 433"spv.bufferhandleSwizzle.frag" , 434"spv.bufferhandle_Error.frag" , 435"spv.bufferReferenceForwardDecl.comp" , 436"spv.bufferReferenceNestedStruct.comp" , 437"spv.bufferReferenceWriteonlyRvalue.frag" , 438"spv.builtInXFB.vert" , 439"spv.conditionalDemote.frag" , 440"spv.conditionalDiscard.frag" , 441"spv.constructComposite.comp" , 442"spv.constStruct.vert" , 443"spv.constConstruct.vert" , 444"spv.controlFlowAttributes.frag" , 445"spv.conversion.frag" , 446"spv.dataOut.frag" , 447"spv.dataOutIndirect.frag" , 448"spv.dataOutIndirect.vert" , 449"spv.debugPrintf.frag" , 450"spv.debugPrintf_Error.frag" , 451"spv.demoteDisabled.frag" , 452"spv.deepRvalue.frag" , 453"spv.depthOut.frag" , 454"spv.depthUnchanged.frag" , 455"spv.discard-dce.frag" , 456"spv.doWhileLoop.frag" , 457"spv.derivative.float16.frag" , 458"spv.earlyReturnDiscard.frag" , 459"spv.expect_assume.assumeEXT.comp" , 460"spv.expect_assume.expectEXT.comp" , 461"spv.expect_assume.expectEXT.exttypes.comp" , 462"spv.ext.ShaderTileImage.color.frag" , 463"spv.ext.ShaderTileImage.depth_stencil.frag" , 464"spv.ext.ShaderTileImage.subpassinput.frag" , 465"spv.ext.ShaderTileImage.typemismatch.frag" , 466"spv.ext.ShaderTileImage.overlap.frag" , 467"spv.ext.ShaderTileImage.wronglayout.frag" , 468"spv.extPostDepthCoverage.frag" , 469"spv.extPostDepthCoverage_Error.frag" , 470"spv.float16convertonlyarith.comp" , 471"spv.float16convertonlystorage.comp" , 472"spv.flowControl.frag" , 473"spv.forLoop.frag" , 474"spv.forwardFun.frag" , 475"spv.fp8_error.frag" , 476"spv.fragmentDensity.frag" , 477"spv.fragmentDensity.vert" , 478"spv.fragmentDensity-es.frag" , 479"spv.fragmentDensity-neg.frag" , 480"spv.fsi.frag" , 481"spv.fsi_Error.frag" , 482"spv.fullyCovered.frag" , 483"spv.functionCall.frag" , 484"spv.functionControlAttributes.frag" , 485"spv.functionControlAttributes.error.frag" , 486"spv.functionNestedOpaque.vert" , 487"spv.functionSemantics.frag" , 488"spv.functionParameterTypes.frag" , 489"spv.GeometryShaderPassthrough.geom" , 490"spv.funcall.array.frag" , 491"spv.load.bool.array.interface.block.frag" , 492"spv.int_dot.frag" , 493"spv.int_dot_Error.frag" , 494"spv.interpOps.frag" , 495"spv.int64.frag" , 496"spv.intOps.vert" , 497"spv.intrinsicsDebugBreak.frag" , 498"spv.intrinsicsSpirvByReference.vert" , 499"spv.intrinsicsSpirvDecorate.frag" , 500"spv.intrinsicsSpirvDecorateId.comp" , 501"spv.intrinsicsSpirvDecorateString.comp" , 502"spv.intrinsicsSpirvExecutionMode.frag" , 503"spv.intrinsicsSpirvInstruction.vert" , 504"spv.intrinsicsSpirvInstructionSetLiteral.comp" , 505"spv.intrinsicsSpirvLiteral.vert" , 506"spv.intrinsicsSpirvRequirement.error.frag" , 507"spv.intrinsicsSpirvStorageClass.rchit" , 508"spv.intrinsicsSpirvType.rgen" , 509"spv.intrinsicsSpirvTypeLocalVar.vert" , 510"spv.intrinsicsSpirvTypeSpecConstant.error.comp" , 511"spv.intrinsicsSpirvTypeWithTypeSpecifier.vert" , 512"spv.intrinsicsStringConstructorError.vert" , 513"spv.invariantAll.vert" , 514"spv.layer.tese" , 515"spv.layoutNested.vert" , 516"spv.layoutQualifierExpression.error.comp" , 517"spv.length.frag" , 518"spv.localAggregates.frag" , 519"spv.loops.frag" , 520"spv.loopsArtificial.frag" , 521"spv.matFun.vert" , 522"spv.matrix.frag" , 523"spv.matrix.float16.frag" , 524"spv.matrix.float64.frag" , 525"spv.matrix2.frag" , 526"spv.maximalReconvergence.vert" , 527"spv.memoryQualifier.frag" , 528"spv.merge-unreachable.frag" , 529"spv.multiStruct.comp" , 530"spv.multiStructFuncall.frag" , 531"spv.newTexture.frag" , 532"spv.noDeadDecorations.vert" , 533"spv.nonSquare.vert" , 534"spv.nonuniform.frag" , 535"spv.nonuniform2.frag" , 536"spv.nonuniform3.frag" , 537"spv.nonuniform4.frag" , 538"spv.nonuniform5.frag" , 539"spv.noWorkgroup.comp" , 540"spv.nvAtomicFp16Vec.frag" , 541"spv.nv.explicittypecast.frag" , 542"spv.nv.explicittypecast.error.vert" , 543"spv.nullInit.comp" , 544"spv.offsets.frag" , 545"spv.Operations.frag" , 546"spv.paramMemory.frag" , 547"spv.paramMemory.420.frag" , 548"spv.precision.frag" , 549"spv.precisionArgs.frag" , 550"spv.precisionNonESSamp.frag" , 551"spv.precisionTexture.frag" , 552"spv.prepost.frag" , 553"spv.privateVariableTypes.frag" , 554"spv.qualifiers.vert" , 555"spv.sample.frag" , 556"spv.sampleId.frag" , 557"spv.samplePosition.frag" , 558"spv.sampleMaskOverrideCoverage.frag" , 559"spv.scalarlayout.frag" , 560"spv.scalarlayoutfloat16.frag" , 561"spv.shaderBallot.comp" , 562"spv.shaderDrawParams.vert" , 563"spv.shaderGroupVote.comp" , 564"spv.shaderStencilExport.frag" , 565"spv.shiftOps.frag" , 566"spv.simpleFunctionCall.frag" , 567"spv.simpleMat.vert" , 568"spv.sparseTexture.frag" , 569"spv.sparseTextureClamp.frag" , 570"spv.structAssignment.frag" , 571"spv.structCopy.comp" , 572"spv.structDeref.frag" , 573"spv.structure.frag" , 574"spv.switch.frag" , 575"spv.swizzle.frag" , 576"spv.swizzleInversion.frag" , 577"spv.test.frag" , 578"spv.test.vert" , 579"spv.texture.frag" , 580"spv.texture.vert" , 581"spv.textureBuffer.vert" , 582"spv.image.frag" , 583"spv.imageAtomic64.frag" , 584"spv.imageAtomic64.comp" , 585"spv.types.frag" , 586"spv.uint.frag" , 587"spv.uniformArray.frag" , 588"spv.variableArrayIndex.frag" , 589"spv.varyingArray.frag" , 590"spv.varyingArrayIndirect.frag" , 591"spv.vecMatConstruct.frag" , 592"spv.voidFunction.frag" , 593"spv.whileLoop.frag" , 594"spv.AofA.frag" , 595"spv.queryL.frag" , 596"spv.separate.frag" , 597"spv.shortCircuit.frag" , 598"spv.pushConstant.vert" , 599"spv.pushConstantAnon.vert" , 600"spv.subpass.frag" , 601"spv.specConstant.vert" , 602"spv.specConstant.comp" , 603"spv.specConstantComposite.vert" , 604"spv.specConstantOperations.vert" , 605"spv.specConstant.float16.comp" , 606"spv.specConstant.int16.comp" , 607"spv.specConstant.int8.comp" , 608"spv.specConstantOp.int16.comp" , 609"spv.specConstantOp.int8.comp" , 610"spv.specConstantOp.float16.comp" , 611"spv.specConstantOp.logical.comp" , 612"spv.specConstantOp.uconvert.comp" , 613"spv.storageBuffer.vert" , 614"spv.terminate.frag" , 615"spv.subgroupUniformControlFlow.vert" , 616"spv.subgroupSizeARB.frag" , 617"spv.precise.tese" , 618"spv.precise.tesc" , 619"spv.precise.dot.vert" , 620"spv.viewportindex.tese" , 621"spv.volatileAtomic.comp" , 622"spv.vulkan100.subgroupArithmetic.comp" , 623"spv.vulkan100.subgroupPartitioned.comp" , 624"spv.xfb.vert" , 625"spv.xfb2.vert" , 626"spv.xfb3.vert" , 627"spv.xfbArrayStrideImplicit.vert" , 628"spv.samplerlessTextureFunctions.frag" , 629"spv.smBuiltins.vert" , 630"spv.smBuiltins.frag" , 631"spv.ARMCoreBuiltIns.vert" , 632"spv.ARMCoreBuiltIns.frag" , 633"spv.builtin.PrimitiveShadingRateEXT.vert" , 634"spv.builtin.ShadingRateEXT.frag" , 635"spv.fragmentShaderBarycentric3.frag" , 636"spv.fragmentShaderBarycentric4.frag" , 637"spv.ext.textureShadowLod.frag" , 638"spv.ext.textureShadowLod.error.frag" , 639"spv.ext.small_types.comp" , 640"spv.floatFetch.frag" , 641"spv.atomicRvalue.error.vert" , 642"spv.sampledImageBlock.frag" , 643"spv.multiple.var.same.const.frag" , 644"spv.textureoffset_non_const.vert" , 645"spv.sparsetextureoffset_non_const.vert" , 646"spv.sparsetextureoffset_non_const_fail.vert" , 647"spv.tensorARM.access_qualifiers.comp" , 648"spv.tensorARM.all_accesses.comp" , 649"spv.tensorARM.array.comp" , 650"spv.tensorARM.declare.comp" , 651"spv.tensorARM.frag" , 652"spv.tensorARM.invalid_access.comp" , 653"spv.tensorARM.invalid_declare.comp" , 654"spv.tensorARM.invalid_operands.comp" , 655"spv.tensorARM.invalid_params.comp" , 656"spv.tensorARM.invalid_size.comp" , 657"spv.tensorARM.invalid_tensor_type.comp" , 658"spv.tensorARM.params.comp" , 659"spv.tensorARM.read.comp" , 660"spv.tensorARM.size.comp" , 661"spv.tensorARM.unrequested_extension_types.comp" , 662"spv.no_input_attachment_index.frag" , 663"spv.no_input_attachment_index_fail.frag" , 664"spv.no_input_attachment_index_fail_2.frag" , 665"spv.no_input_attachment_index_fail_3.frag" , 666 })), 667FileNameAsCustomTestSuffix 668); 669 670INSTANTIATE_TEST_SUITE_P ( 671Glsl ,CompileVulkanToSpirvRelaxSetBindingLimitsTest , 672 ::testing::ValuesIn (std::vector < std::string > ({ 673"spv.relaxSetBindingLimits.frag" , 674"spv.relaxSetBindingLimits.negative.error.frag" , 675 })), 676FileNameAsCustomTestSuffix 677); 678 679INSTANTIATE_TEST_SUITE_P ( 680Glsl ,CompileVulkanToSpirvTestNoLink , 681 ::testing::ValuesIn (std::vector < std::string > ({ 682"spv.exportFunctions.comp" , 683 })), 684FileNameAsCustomTestSuffix 685); 686 687INSTANTIATE_TEST_SUITE_P ( 688Glsl ,CompileToSpirv14TestNoLink , 689 ::testing::ValuesIn (std::vector < std::string > ({ 690"spv.WorkgroupMemoryExplicitLayout.NoLink.comp" , 691 })), 692FileNameAsCustomTestSuffix 693); 694 695// Cases with deliberately unreachable code. 696// By default the compiler will aggressively eliminate 697// unreachable merges and continues. 698INSTANTIATE_TEST_SUITE_P ( 699GlslWithDeadCode ,CompileVulkanToSpirvDeadCodeElimTest , 700 ::testing::ValuesIn (std::vector < std::string > ({ 701"spv.dead-after-continue.vert" , 702"spv.dead-after-discard.frag" , 703"spv.dead-after-return.vert" , 704"spv.dead-after-loop-break.vert" , 705"spv.dead-after-switch-break.vert" , 706"spv.dead-complex-continue-after-return.vert" , 707"spv.dead-complex-merge-after-return.vert" , 708 })), 709FileNameAsCustomTestSuffix 710); 711 712// clang-format off 713INSTANTIATE_TEST_SUITE_P ( 714Glsl ,CompileVulkan1_1ToSpirvTest , 715 ::testing::ValuesIn (std::vector < std::string > ({ 716"spv.1.3.8bitstorage-ubo.vert" , 717"spv.1.3.8bitstorage-ssbo.vert" , 718"spv.1.3.coopmat.comp" , 719"spv.deviceGroup.frag" , 720"spv.drawParams.vert" , 721"spv.int8.frag" , 722"spv.vulkan110.int16.frag" , 723"spv.int32.frag" , 724"spv.bitops.int8int16.frag" , 725"spv.explicittypes.frag" , 726"spv.halfBitsToInt16.frag" , 727"spv.float16NoRelaxed.vert" , 728"spv.float32.frag" , 729"spv.float64.frag" , 730"spv.bufferReference.memoryModel.block.comp" , 731"spv.bufferReference.memoryModel.unqualified.comp" , 732"spv.bufferReference.memoryModel.volatile.comp" , 733"spv.memoryQualifier.incdec.comp" , 734"spv.memoryQualifier.swizzleOut.comp" , 735"spv.memoryQualifier.swizzleReference.comp" , 736"spv.memoryScopeSemantics.comp" , 737"spv.memoryScopeSemantics_Error.comp" , 738"spv.memoryScopeSemantics.nonConstArg.comp" , 739"spv.splitBarrierMemoryScopeSemantics.comp" , 740"spv.splitBarrierArriveMemoryScopeSemantics_Error1.comp" , 741"spv.splitBarrierArriveMemoryScopeSemantics_Error2.comp" , 742"spv.splitBarrierArriveMemoryScopeSemantics_Error3.comp" , 743"spv.splitBarrierWaitMemoryScopeSemantics_Error1.comp" , 744"spv.splitBarrierWaitMemoryScopeSemantics_Error2.comp" , 745"spv.splitBarrierWaitMemoryScopeSemantics_Error3.comp" , 746"spv.multiView.frag" , 747"spv.queueFamilyScope.comp" , 748"spv.RayGenShader11.rgen" , 749"spv.subgroup.frag" , 750"spv.subgroup.geom" , 751"spv.subgroup.tesc" , 752"spv.subgroup.tese" , 753"spv.subgroup.vert" , 754"spv.subgroupArithmetic.comp" , 755"spv.subgroupBasic.comp" , 756"spv.subgroupBallot.comp" , 757"spv.subgroupBallotNeg.comp" , 758"spv.subgroupClustered.comp" , 759"spv.subgroupClusteredNeg.comp" , 760"spv.subgroupPartitioned.comp" , 761"spv.subgroupRotate.comp" , 762"spv.subgroupShuffle.comp" , 763"spv.subgroupShuffleRelative.comp" , 764"spv.subgroupQuad.comp" , 765"spv.subgroupVote.comp" , 766"spv.subgroupExtendedTypesArithmetic.comp" , 767"spv.subgroupExtendedTypesArithmeticNeg.comp" , 768"spv.subgroupExtendedTypesBallot.comp" , 769"spv.subgroupExtendedTypesBallotNeg.comp" , 770"spv.subgroupExtendedTypesClustered.comp" , 771"spv.subgroupExtendedTypesClusteredNeg.comp" , 772"spv.subgroupExtendedTypesPartitioned.comp" , 773"spv.subgroupExtendedTypesPartitionedNeg.comp" , 774"spv.subgroupExtendedTypesRotate.comp" , 775"spv.subgroupExtendedTypesRotateNeg.comp" , 776"spv.subgroupExtendedTypesShuffle.comp" , 777"spv.subgroupExtendedTypesShuffleNeg.comp" , 778"spv.subgroupExtendedTypesShuffleRelative.comp" , 779"spv.subgroupExtendedTypesShuffleRelativeNeg.comp" , 780"spv.subgroupExtendedTypesQuad.comp" , 781"spv.subgroupExtendedTypesQuadNeg.comp" , 782"spv.subgroupExtendedTypesVote.comp" , 783"spv.subgroupExtendedTypesVoteNeg.comp" , 784"spv.vulkan110.storageBuffer.vert" , 785"spv.texture_implicit.comp" , 786"spv.es320.texture.comp" , 787 788// These tests use the Vulkan memory model. 789"spv.bfloat16.comp" , 790"spv.bfloat16_error.comp" , 791"spv.bfloat16_error.frag" , 792"spv.bufferhandle1.frag" , 793"spv.bufferhandle10.frag" , 794"spv.coopmat.comp" , 795"spv.coopmat_Error.comp" , 796"spv.coopmatKHR.comp" , 797"spv.coopmat_armlayout.comp" , 798"spv.coopmatKHR_arithmetic.comp" , 799"spv.coopmatKHR_arithmeticError.comp" , 800"spv.coopmatKHR_Error.comp" , 801"spv.coopmatKHR_constructor.comp" , 802"spv.coopmatKHR_constructorError.comp" , 803"spv.coopmatKHR_matmuladd_Error.comp" , 804"spv.coopvec.comp" , 805"spv.coopvec2.comp" , 806"spv.coopvecloadstore.comp" , 807"spv.coopvec_Error.comp" , 808"spv.coopvecloadstore_Error.comp" , 809"spv.coopvecStoreLocal.comp" , 810"spv.coopvecTraining.comp" , 811"spv.coopvecTraining_Error.comp" , 812"spv.intcoopmat.comp" , 813"spv.intrinsicsInteractWithCoopMat.comp" , 814"spv.longVector.comp" , 815"spv.longVectorLiteral234.comp" , 816"spv.longVectorLength.comp" , 817"spv.longVectorArrayLength.comp" , 818"spv.longVectorFixedArrayLength.comp" , 819"spv.longVectorMatMul.comp" , 820"spv.longVectorNotReserved.comp" , 821"spv.longVectorSpecConst.comp" , 822"spv.longVectorOperators.comp" , 823"spv.longVectorBadParams.decls.comp" , 824"spv.longVectorBadParams.constructors.comp" , 825"spv.longVectorBadParams.constructors.as.type.comp" , 826"spv.longVectorBadParams.index.comp" , 827"spv.longVectorBuiltins.comp" , 828"spv.longVectorBuiltinsfp16.comp" , 829"spv.longVectorBuiltinsfp64.comp" , 830"spv.longVectorBuiltinsint8.comp" , 831"spv.longVectorBuiltinsint16.comp" , 832"spv.longVectorBuiltinsint32.comp" , 833"spv.longVectorBuiltinsint64.comp" , 834"spv.longVectorBuiltinsuint8.comp" , 835"spv.longVectorBuiltinsuint16.comp" , 836"spv.longVectorBuiltinsuint32.comp" , 837"spv.longVectorBuiltinsuint64.comp" , 838"spv.longVectorBuiltinsBitcast.comp" , 839"spv.longVectorBuiltinsError.comp" , 840"spv.longVectorBuiltinsSpecConst.comp" , 841"spv.longVectorBuiltinsSpecConstint32.comp" , 842"spv.longVectorBuiltinsSubgroup.comp" , 843"spv.longVectorBuiltins.frag" , 844"spv.longVectorStorage.comp" , 845"spv.replicate.comp" , 846"spv.replicatespec.comp" , 847"spv.atomicAdd.bufferReference.comp" , 848"spv.nontemporalbuffer.frag" , 849"spv.nontemporalswizzle.frag" , 850"spv.atomicFloat.comp" , 851"spv.qcom.multiple_wait_queues.comp" , 852 })), 853FileNameAsCustomTestSuffix 854); 855 856// clang-format off 857INSTANTIATE_TEST_SUITE_P ( 858Glsl ,CompileToSpirv14Test , 859 ::testing::ValuesIn (std::vector < std::string > ({ 860"spv.bufferReference.memoryModel.shadercall.rgen" , 861"spv.1.4.LoopControl.frag" , 862"spv.1.4.NonWritable.frag" , 863"spv.1.4.OpEntryPoint.frag" , 864"spv.1.4.OpEntryPoint.opaqueParams.vert" , 865"spv.1.4.OpSelect.frag" , 866"spv.1.4.OpCopyLogical.comp" , 867"spv.1.4.OpCopyLogicalBool.comp" , 868"spv.1.4.OpCopyLogical.funcall.frag" , 869"spv.1.4.funcall.array.frag" , 870"spv.1.4.load.bool.array.interface.block.frag" , 871"spv.1.4.image.frag" , 872"spv.1.4.sparseTexture.frag" , 873"spv.1.4.texture.frag" , 874"spv.1.4.constructComposite.comp" , 875"rayQuery-opacityMicromapRayQueryMode.comp" , 876"rayQuery-opacityMicromapRayQueryMode.rgen" , 877"rayQuery-opacityMicromapRayQueryModeDefault.comp" , 878"rayQuery-opacityMicromapRayQueryModeRead.comp" , 879"rayQuery-opacityMicromapRayQueryModeTrue.comp" , 880"rayQuery-opacityMicromapRayQueryModeForce2State.comp" , 881"rayQuery-opacityMicromapRayQueryMode.Error.comp" , 882"rayQuery-opacityMicromapRayQueryModeNonConst.Error.comp" , 883"spv.ext.AnyHitShader.rahit" , 884"spv.ext.AnyHitShader_Errors.rahit" , 885"spv.ext.ClosestHitShader.rchit" , 886"spv.ext.ClosestHitShader_Subgroup.rchit" , 887"spv.ext.ClosestHitShader_Errors.rchit" , 888"spv.ext.IntersectShader.rint" , 889"spv.ext.IntersectShader_Errors.rint" , 890"spv.ext.MissShader.rmiss" , 891"spv.ext.MissShader_Errors.rmiss" , 892"spv.ext.RayPrimCull_Errors.rgen" , 893"spv.ext.RayCallable.rcall" , 894"spv.ext.RayCallable_Errors.rcall" , 895"spv.ext.RayConstants.rgen" , 896"spv.ext.RayGenShader.rgen" , 897"spv.ext.RayGenShader_Errors.rgen" , 898"spv.ext.RayGenShader11.rgen" , 899"spv.ext.RayGenShaderArray.rgen" , 900"spv.ext.RayGenSBTlayout.rgen" , 901"spv.ext.RayGenSBTlayout140.rgen" , 902"spv.ext.RayGenSBTlayout430.rgen" , 903"spv.ext.RayGenSBTlayoutscalar.rgen" , 904"spv.ext.World3x4.rahit" , 905"spv.ext.AccelDecl.frag" , 906"spv.ext.RayQueryDecl.frag" , 907 908// SPV_KHR_workgroup_memory_explicit_layout depends on SPIR-V 1.4. 909"spv.WorkgroupMemoryExplicitLayout.SingleBlock.comp" , 910"spv.WorkgroupMemoryExplicitLayout.MultiBlock.comp" , 911"spv.WorkgroupMemoryExplicitLayout.8BitAccess.comp" , 912"spv.WorkgroupMemoryExplicitLayout.16BitAccess.comp" , 913"spv.WorkgroupMemoryExplicitLayout.NonBlock.comp" , 914"spv.WorkgroupMemoryExplicitLayout.MixBlockNonBlock_Errors.comp" , 915"spv.WorkgroupMemoryExplicitLayout.std140.comp" , 916"spv.WorkgroupMemoryExplicitLayout.std430.comp" , 917"spv.WorkgroupMemoryExplicitLayout.scalar.comp" , 918"spv.khrComputeShaderDerivatives.comp" , 919"spv.khrComputeShaderDerivatives2.comp" , 920"spv.khrComputeShaderDerivativesLayoutOrder.comp" , 921 922// SPV_EXT_mesh_shader 923"spv.ext.meshShaderBuiltins.mesh" , 924"spv.ext.meshShaderBuiltinsShadingRate.mesh" , 925"spv.ext.meshShaderOutputRead.error.mesh" , 926"spv.ext.meshShaderRedeclBuiltins.mesh" , 927"spv.ext.meshShaderTaskMem.mesh" , 928"spv.ext.meshShaderUserDefined.mesh" , 929"spv.ext.meshTaskShader.task" , 930"spv.atomiAddEXT.error.mesh" , 931"spv.ext.meshTaskPayloadNoVariable.error.task" , 932"spv.atomiAddEXT.task" , 933"spv.460.subgroupEXT.task" , 934"spv.460.subgroupEXT.mesh" , 935"spv.computeShaderDerivatives.mesh" , 936"spv.khrComputeShaderDerivatives.task" , 937"spv.khrComputeShaderDerivatives.mesh" , 938 939// SPV_NV_shader_execution_reorder 940 941"spv.nv.hitobject-errors.rgen" , 942"spv.nv.hitobject-allops.rgen" , 943"spv.nv.hitobject-allops.rchit" , 944"spv.nv.hitobject-allops.rmiss" , 945 946// SPV_EXT_shader_execution_reorder 947 948"spv.ext.hitobject-errors.rgen" , 949"spv.ext.hitobject-allops.rgen" , 950"spv.ext.hitobject-allops.rchit" , 951"spv.ext.hitobject-allops.rmiss" , 952 953// SPV_NV_displacement_micromap 954 955"spv.nv.dmm-allops.rgen" , 956"spv.nv.dmm-allops.rchit" , 957"spv.nv.dmm-allops.rahit" , 958"spv.nv.dmm-allops.mesh" , 959"spv.nv.dmm-allops.comp" , 960 961// SPV_NV_cluster_acceleration_structure 962"spv.nv.cluster-allops.rgen" , 963"spv.nv.cluster-allops.rchit" , 964"spv.nv.cluster-allops.rmiss" , 965"spv.nv.cluster-allops.rahit" , 966"spv.nv.cluster-allops.frag" , 967 968// SPV_NV_linear_swept_spheres 969 970"spv.nv.lss-allops.rgen" , 971"spv.nv.lss-allops.rchit" , 972"spv.nv.lss-allops.rmiss" , 973"spv.nv.lss-allops.frag" , 974"spv.nv.lss-spheregeomcap.rgen" , 975"spv.nv.lss-lssgeomcap.rgen" , 976 977// SPV_EXT_descriptor_heap 978 979"spv.descriptorHeap.AtomicImage.comp" , 980"spv.descriptorHeap.AtomicImage.error.comp" , 981"spv.descriptorHeap.Buffer.comp" , 982"spv.descriptorHeap.BufferStruct.comp" , 983"spv.descriptorHeap.BufferQualifiers.frag" , 984"spv.descriptorHeap.CombinedSampler.error.frag" , 985"spv.descriptorHeap.ImageQualifiers.frag" , 986"spv.descriptorHeap.Stride.comp" , 987"spv.descriptorHeap.DebugPrintf.comp" , 988"spv.descriptorHeap.HeapNotArray.error.comp" , 989"spv.descriptorHeap.HeapStrideNotHeap.error.comp" , 990"spv.descriptorHeap.HeapStrideNotPow2.error.comp" , 991"spv.descriptorHeap.PushConstant.comp" , 992"spv.tensorARM.descriptorHeap.comp" , 993"spv.descriptorHeap.valid.frag" , 994"spv.descriptorHeap.heaps.frag" , 995"spv.descriptorHeap.nonuniform.frag" , 996"spv.descriptorHeap.es.frag" , 997"spv.descriptorHeap.UnsizedES.error.frag" , 998 999// SPV_EXT_structured_descriptor_heap 1000"spv.structuredDescriptorHeap.AccelerationStructure.comp" , 1001"spv.structuredDescriptorHeap.Buffer.comp" , 1002"spv.structuredDescriptorHeap.Uniform.comp" , 1003"spv.structuredDescriptorHeap.BufferReference.comp" , 1004"spv.structuredDescriptorHeap.LayoutQualifiers.comp" , 1005"spv.structuredDescriptorHeap.ReadOnly.comp" , 1006"spv.structuredDescriptorHeap.ReadOnly.error.comp" , 1007"spv.structuredDescriptorHeap.es.frag" , 1008"spv.structuredDescriptorHeap.UnsizedES.error.frag" , 1009"spv.structuredDescriptorHeap.MatrixLayout.comp" , 1010"spv.structuredDescriptorHeap.Offset.comp" , 1011 1012// SPV_KHR_abort 1013"spv.shader.abort.comp" , 1014"spv.shader.abort.matrix_param.comp" , 1015"spv.shader.abort.args.none.comp" , 1016"spv.shader.abort.args.int.comp" , 1017"spv.shader.abort.args.uint.comp" , 1018"spv.shader.abort.args.float.comp" , 1019"spv.shader.abort.args.int2.comp" , 1020"spv.shader.abort.args.mixed3.comp" , 1021"spv.shader.abort.args.mixed8.comp" , 1022"spv.shader.abort.args.excess.comp" , 1023"spv.shader.abort.args.constants.comp" , 1024"spv.shader.abort.args.macro.comp" , 1025"spv.shader.abort.args.vec2.comp" , 1026"spv.shader.abort.args.vec3.comp" , 1027"spv.shader.abort.args.vec4.comp" , 1028"spv.shader.abort.args.ivec.comp" , 1029"spv.shader.abort.args.uvec.comp" , 1030"spv.shader.abort.args.vec_mixed.comp" , 1031"spv.shader.abort.args.bool.comp" , 1032"spv.shader.abort.args.scalar_layout.comp" , 1033"spv.shader.abort.type.int8.comp" , 1034"spv.shader.abort.type.int16.comp" , 1035"spv.shader.abort.type.int64.comp" , 1036"spv.shader.abort.type.float16.comp" , 1037"spv.shader.abort.type.float64.comp" , 1038"spv.shader.abort.type.matrix.comp" , 1039"spv.shader.abort.type.array.comp" , 1040"spv.shader.abort.type.struct.comp" , 1041"spv.shader.abort.type.buffer_reference.comp" , 1042"spv.shader.abort.format_Error.comp" , 1043"spv.shader.abort.args.type_Error.comp" , 1044 })), 1045FileNameAsCustomTestSuffix 1046); 1047 1048// clang-format off 1049INSTANTIATE_TEST_SUITE_P ( 1050Glsl ,CompileToSpirv16Test , 1051 ::testing::ValuesIn (std::vector < std::string > ({ 1052"spv.1.6.conditionalDiscard.frag" , 1053"spv.1.6.helperInvocation.frag" , 1054"spv.1.6.helperInvocation.memmodel.frag" , 1055"spv.1.6.specConstant.comp" , 1056"spv.1.6.samplerBuffer.frag" , 1057"spv.1.6.separate.frag" , 1058"spv.1.6.quad.frag" , 1059"spv.64bit_indexing.comp" , 1060"spv.64bit_indexing_error.comp" , 1061"spv.coopmatmaint1.comp" , 1062"spv.coopmatmaint1_error.comp" , 1063"spv.coopmat2_constructor.comp" , 1064"spv.coopmat2_error.comp" , 1065"spv.coopmat2_perelement_error.comp" , 1066"spv.coopmat2_tensor.comp" , 1067"spv.coopmat2_tensor_error.comp" , 1068"spv.coopmat2_decode_vector.comp" , 1069"spv.coopmat2_decode_vector_b.comp" , 1070"spv.coopmat2_decode_vector_error.comp" , 1071"spv.1.6.nontemporalimage.frag" , 1072"spv.noexplicitlayout.comp" , 1073"spv.floate4m3.comp" , 1074"spv.floate4m3.const.comp" , 1075"spv.floate4m3_error.comp" , 1076"spv.floate4m3.saturatedConvert.error.comp" , 1077"spv.floate5m2.comp" , 1078"spv.floate5m2.const.comp" , 1079"spv.floate5m2_error.comp" , 1080"spv.promote_uint32_indices.comp" , 1081"spv.floate2m1.comp" , 1082"spv.floate2m1.const.comp" , 1083"spv.floate3m2.comp" , 1084"spv.floate3m2.const.comp" , 1085"spv.floate2m3.comp" , 1086"spv.floate2m3.const.comp" , 1087"spv.floatue8m0.comp" , 1088"spv.floatue8m0.const.comp" , 1089"spv.floatmxint8.comp" , 1090"spv.floatmxint8.const.comp" , 1091"spv.floatocperrors.comp" , 1092"spv.floatocperrors.vert" , 1093 })), 1094FileNameAsCustomTestSuffix 1095); 1096 1097 1098// clang-format off 1099INSTANTIATE_TEST_SUITE_P ( 1100Hlsl ,HlslIoMap , 1101 ::testing::ValuesIn (std::vector < IoMapData > { 1102 {"spv.register.autoassign.frag" ,"main_ep" ,5 ,10 ,0 ,20 ,30 , true, false, false }, 1103 {"spv.register.noautoassign.frag" ,"main_ep" ,5 ,10 ,0 ,15 ,30 , false, false, false }, 1104 {"spv.register.autoassign-2.frag" ,"main" ,5 ,10 ,0 ,15 ,30 , true, true, false }, 1105 {"spv.register.subpass.frag" ,"main" ,0 ,20 ,0 ,0 ,0 , true, true, false }, 1106 {"spv.buffer.autoassign.frag" ,"main" ,5 ,10 ,0 ,15 ,30 , true, true, false }, 1107 {"spv.ssbo.autoassign.frag" ,"main" ,5 ,10 ,0 ,15 ,30 , true, true, false }, 1108 {"spv.ssboAlias.frag" ,"main" ,0 ,0 ,0 ,0 ,83 , true, false, false }, 1109 {"spv.rw.autoassign.frag" ,"main" ,5 ,10 ,20 ,15 ,30 , true, true, false }, 1110 {"spv.register.autoassign.rangetest.frag" ,"main" , 1111 glslang::TQualifier ::layoutBindingEnd - 2 , 1112 glslang::TQualifier ::layoutBindingEnd + 5 , 11130 ,20 ,30 , true, false, false }, 1114 }), 1115FileNameAsCustomTestSuffixIoMap 1116); 1117 1118// clang-format off 1119INSTANTIATE_TEST_SUITE_P ( 1120Hlsl ,GlslIoMap , 1121 ::testing::ValuesIn (std::vector < IoMapData > { 1122 {"spv.glsl.register.autoassign.frag" ,"main" ,5 ,10 ,0 ,20 ,30 , true, false, false }, 1123 {"spv.glsl.register.noautoassign.frag" ,"main" ,5 ,10 ,0 ,15 ,30 , false, false, false }, 1124 {"spv.glsl.register.autoassign.relaxSetBindingLimits.frag" ,"main" , 112570000 ,70001 ,0 ,20 ,30 , true, false, true }, 1126 }), 1127FileNameAsCustomTestSuffixIoMap 1128); 1129 1130// clang-format off 1131INSTANTIATE_TEST_SUITE_P ( 1132Glsl ,CompileOpenGLToSpirvTest , 1133 ::testing::ValuesIn (std::vector < std::string > ({ 1134"spv.330.location.opengl.frag" , 1135"spv.460.frag" , 1136"spv.460.vert" , 1137"spv.460.comp" , 1138"spv.atomic.comp" , 1139"spv.atomicFloat_Error.comp" , 1140"spv.glFragColor.frag" , 1141"spv.rankShift.comp" , 1142"spv.specConst.vert" , 1143"spv.specTexture.frag" , 1144"spv.OVR_multiview.vert" , 1145"spv.uniformInitializer.frag" , 1146"spv.uniformInitializerSpecConstant.frag" , 1147"spv.uniformInitializerStruct.frag" , 1148"spv.viewportArray2.perVertex.tesc" , 1149"spv.viewportArray2.perVertex.noext.tesc" , 1150"spv.viewportArray2.perVertex.notRequested.tesc" , 1151"spv.xfbOffsetOnBlockMembersAssignment.vert" , 1152"spv.xfbOffsetOnStructMembersAssignment.vert" , 1153"spv.xfbOverlapOffsetCheckWithBlockAndMember.vert" , 1154"spv.xfbStrideJustOnce.vert" , 1155 })), 1156FileNameAsCustomTestSuffix 1157); 1158 1159INSTANTIATE_TEST_SUITE_P ( 1160Glsl ,VulkanSemantics , 1161 ::testing::ValuesIn (std::vector < std::string > ({ 1162"vulkan.frag" , 1163"vulkan.vert" , 1164"vulkan.comp" , 1165"samplerlessTextureFunctions.frag" , 1166"spv.intrinsicsFakeEnable.vert" , 1167"spv.specConstArrayCheck.vert" , 1168"spv.khrComputeShaderDerivativesMissingLayout.comp" , 1169"spv.khrComputeShaderDerivativesNoLayout.comp" , 1170"spv.khrComputeShaderDerivativesBoth.comp" , 1171"spv.khrComputeShaderDerivativesBadSize.comp" , 1172"spv.viewportArray2.perVertex.vulkan.tesc" , 1173 })), 1174FileNameAsCustomTestSuffix 1175); 1176 1177INSTANTIATE_TEST_SUITE_P ( 1178Glsl ,OpenGLSemantics , 1179 ::testing::ValuesIn (std::vector < std::string > ({ 1180"glspv.esversion.vert" , 1181"glspv.version.frag" , 1182"glspv.version.vert" , 1183"glspv.frag" , 1184"glspv.vert" , 1185 })), 1186FileNameAsCustomTestSuffix 1187); 1188 1189INSTANTIATE_TEST_SUITE_P ( 1190Glsl ,VulkanAstSemantics , 1191 ::testing::ValuesIn (std::vector < std::string > ({ 1192"vulkan.ast.vert" , 1193 })), 1194FileNameAsCustomTestSuffix 1195); 1196 1197INSTANTIATE_TEST_SUITE_P ( 1198Glsl ,CompileVulkanToSpirvTestQCOM , 1199 ::testing::ValuesIn (std::vector < std::string > ({ 1200"spv.qcom.tileShading.0.comp" , 1201"spv.qcom.tileShading.1.comp" , 1202"spv.qcom.es.tileShading.0.comp" , 1203"spv.qcom.es.tileShading.1.comp" , 1204"spv.qcom.es.tileShading.2.comp" , 1205"spv.qcom.tileShading.0.frag" , 1206"spv.qcom.tileShading.1.frag" , 1207"spv.qcom.es.tileShading.0.frag" , 1208"spv.qcom.es.tileShading.1.frag" , 1209 })), 1210FileNameAsCustomTestSuffix 1211); 1212 1213INSTANTIATE_TEST_SUITE_P ( 1214Glsl ,CompileVulkanToSpirv13TestQCOM , 1215 ::testing::ValuesIn (std::vector < std::string > ({ 1216"spv.qcom.coopmatConversion.1.comp" , 1217"spv.qcom.coopmatConversion.2.comp" , 1218 })), 1219FileNameAsCustomTestSuffix 1220); 1221 1222INSTANTIATE_TEST_SUITE_P ( 1223Glsl ,CompileVulkanToSpirv14TestQCOM , 1224 ::testing::ValuesIn (std::vector < std::string > ({ 1225"spv.tpipSampleWeighted.frag" , 1226"spv.tpipBoxFilter.frag" , 1227"spv.tpipBlockMatchSSD.frag" , 1228"spv.tpipBlockMatchSAD.frag" , 1229"spv.tpipTextureArrays.frag" , 1230"spv.tpipBlockMatchGatherSAD.frag" , 1231"spv.tpipBlockMatchGatherSSD.frag" , 1232"spv.tpipBlockMatchWindowSAD.frag" , 1233"spv.tpipBlockMatchWindowSSD.frag" , 1234"spv.qcom.textureGather.vert" , 1235"spv.qcom.textureGather.frag" , 1236"spv.qcom.es.textureGather.vert" , 1237"spv.qcom.es.textureGather.frag" , 1238})), 1239FileNameAsCustomTestSuffix 1240); 1241 1242INSTANTIATE_TEST_SUITE_P ( 1243Glsl ,CompileVulkanToSpirvTestAMD , 1244 ::testing::ValuesIn (std::vector < std::string > ({ 1245"spv.16bitxfb.vert" , 1246"spv.float16.frag" , 1247"spv.float16Fetch.frag" , 1248"spv.gcnShaderBallotAMD.comp" , 1249"spv.imageLoadStoreLod.frag" , 1250"spv.int16.frag" , 1251"spv.int16.amd.frag" , 1252"spv.shaderBallotAMD.comp" , 1253"spv.shaderFragMaskAMD.frag" , 1254"spv.textureGatherBiasLod.frag" , 1255 })), 1256FileNameAsCustomTestSuffix 1257); 1258 1259INSTANTIATE_TEST_SUITE_P ( 1260Glsl ,CompileVulkanToSpirvTestNV , 1261 ::testing::ValuesIn (std::vector < std::string > ({ 1262"spv.sampleMaskOverrideCoverage.frag" , 1263"spv.GeometryShaderPassthrough.geom" , 1264"spv.viewportArray2.vert" , 1265"spv.viewportArray2.tesc" , 1266"spv.stereoViewRendering.vert" , 1267"spv.stereoViewRendering.tesc" , 1268"spv.multiviewPerViewAttributes.vert" , 1269"spv.multiviewPerViewAttributes.tesc" , 1270"spv.atomicInt64.comp" , 1271"spv.atomicStoreInt64.comp" , 1272"spv.shadingRate.frag" , 1273"spv.RayGenShader.rgen" , 1274"spv.RayGenShaderArray.rgen" , 1275"spv.RayGenShader_Errors.rgen" , 1276"spv.RayConstants.rgen" , 1277"spv.IntersectShader.rint" , 1278"spv.IntersectShader_Errors.rint" , 1279"spv.AnyHitShader.rahit" , 1280"spv.AnyHitShader_Errors.rahit" , 1281"spv.ClosestHitShader.rchit" , 1282"spv.ClosestHitShader_Errors.rchit" , 1283"spv.MissShader.rmiss" , 1284"spv.MissShader_Errors.rmiss" , 1285"spv.RayCallable.rcall" , 1286"spv.RayCallable_Errors.rcall" , 1287"spv.fragmentShaderBarycentric.frag" , 1288"spv.fragmentShaderBarycentric2.frag" , 1289"spv.computeShaderDerivatives.comp" , 1290"spv.computeShaderDerivatives2.comp" , 1291"spv.computeShaderDerivativesNoLayout.comp" , 1292"spv.computeShaderDerivativesSpec.comp" , 1293"spv.computeShaderDerivativesSpec2.comp" , 1294"spv.shaderImageFootprint.frag" , 1295"spv.shaderImageFootprintIntSamplers.frag" , 1296"spv.meshShaderBuiltins.mesh" , 1297"spv.meshShaderUserDefined.mesh" , 1298"spv.meshShaderPerViewBuiltins.mesh" , 1299"spv.meshShaderPerViewUserDefined.mesh" , 1300"spv.meshShaderPerView_Errors.mesh" , 1301"spv.meshShaderSharedMem.mesh" , 1302"spv.meshShaderTaskMem.mesh" , 1303"spv.320.meshShaderUserDefined.mesh" , 1304"spv.meshShaderRedeclBuiltins.mesh" , 1305"spv.meshShaderRedeclPerViewBuiltins.mesh" , 1306"spv.meshTaskShader.task" , 1307"spv.perprimitiveNV.frag" , 1308"spv.nvgpushader5.frag" , 1309"spv.pushConstantBank.vert" , 1310})), 1311FileNameAsCustomTestSuffix 1312); 1313 1314INSTANTIATE_TEST_SUITE_P ( 1315Glsl ,CompileVulkanToSpirv14TestNV , 1316 ::testing::ValuesIn (std::vector < std::string > ({ 1317"spv.RayGenShaderMotion.rgen" , 1318"spv.RayGenShaderMotion_Errors.rgen" , 1319"spv.IntersectShaderMotion.rint" , 1320"spv.AnyHitShaderMotion.rahit" , 1321"spv.ClosestHitShaderMotion.rchit" , 1322"spv.MissShaderMotion.rmiss" , 1323})), 1324FileNameAsCustomTestSuffix 1325); 1326 1327INSTANTIATE_TEST_SUITE_P ( 1328Glsl ,CompileUpgradeTextureToSampledTextureAndDropSamplersTest , 1329 ::testing::ValuesIn (std::vector < std::string > ({ 1330"spv.texture.sampler.transform.frag" , 1331 })), 1332FileNameAsCustomTestSuffix 1333); 1334 1335INSTANTIATE_TEST_SUITE_P ( 1336Glsl ,GlslSpirvDebugInfoTest , 1337 ::testing::ValuesIn (std::vector < std::string > ({ 1338"spv.pp.line.frag" , 1339 })), 1340FileNameAsCustomTestSuffix 1341); 1342 1343INSTANTIATE_TEST_SUITE_P ( 1344Glsl ,GlslNonSemanticShaderDebugInfoTest , 1345 ::testing::ValuesIn (std::vector < std::string > ({ 1346"spv.debuginfo.glsl.vert" , 1347"spv.debuginfo.glsl.frag" , 1348"spv.debuginfo.glsl.comp" , 1349"spv.debuginfo.glsl.geom" , 1350"spv.debuginfo.glsl.tesc" , 1351"spv.debuginfo.glsl.tese" , 1352"spv.debuginfo.bufferref.glsl.frag" , 1353"spv.debuginfo.const_params.glsl.comp" , 1354"spv.debuginfo.scalar_types.glsl.frag" , 1355"spv.debuginfo.include.glsl.frag" , 1356"spv.debuginfo.macro.include.glsl.frag" , 1357"spv.debuginfo.multiline.glsl.frag" , 1358"spv.debuginfo.implicit_br.glsl.frag" , 1359"spv.debuginfo.non_ascii.glsl.frag" , 1360"spv.debuginfo.continued.glsl.vert" , 1361"spv.debuginfo.interface_bool.glsl.comp" , 1362"spv.debuginfo.sampler_type.glsl.frag" , 1363"spv.debuginfo.const_variables.glsl.frag" , 1364"spv.debuginfo.ubo.glsl.frag" , 1365"spv.debuginfo.declaration.glsl.frag" , 1366 })), 1367FileNameAsCustomTestSuffix 1368); 1369 1370INSTANTIATE_TEST_SUITE_P ( 1371Glsl ,GlslNonSemanticShaderDebugInfoVulkanLatestTest , 1372 ::testing::ValuesIn (std::vector < std::string > ({ 1373"spv.debuginfo.rt_types.glsl.rgen" , 1374"spv.debuginfo.rt_nv_builtins.glsl.rahit" , 1375"spv.debuginfo.rt_ext_builtins.glsl.rahit" , 1376 })), 1377FileNameAsCustomTestSuffix 1378); 1379 1380INSTANTIATE_TEST_SUITE_P ( 1381Glsl ,GlslSplitBarrierEXTTest , 1382 ::testing::ValuesIn (std::vector < std::string > ({ 1383"spv.split.barrier.vert" , 1384"spv.split.barrier.comp" 1385 })), 1386FileNameAsCustomTestSuffix 1387); 1388// clang-format on 1389 1390 1391}// anonymous namespace 1392}// namespace glslangtest