yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
83bc342a
16.6.0
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 ) { 61std :: string name = info . param . fileName ; 62// A valid test case suffix cannot have '.' and '-' inside. 63std :: replace ( name . begin () , name . end () , '.' , '_' ) ; 64std :: 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 , 107glslang :: 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 , 119glslang :: 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 , 127glslang :: 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 , 293glslang :: 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 , 300glslang :: 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 , 307glslang :: 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 , 314glslang :: 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.150.geom" , 356"spv.150.vert" , 357"spv.16bitstorage.frag" , 358"spv.16bitstorage_Error.frag" , 359"spv.16bitstorage-int.frag" , 360"spv.16bitstorage_Error-int.frag" , 361"spv.16bitstorage-uint.frag" , 362"spv.16bitstorage_Error-uint.frag" , 363"spv.300BuiltIns.vert" , 364"spv.300layout.frag" , 365"spv.300layout.vert" , 366"spv.300layoutp.vert" , 367"spv.310.comp" , 368"spv.310.bitcast.frag" , 369"spv.330.geom" , 370"spv.400.frag" , 371"spv.400.tesc" , 372"spv.400.tese" , 373"spv.420.geom" , 374"spv.430.frag" , 375"spv.430.vert" , 376"spv.450.tesc" , 377"spv.450.geom" , 378"spv.450.noRedecl.tesc" , 379"spv.8bitstorage-int.frag" , 380"spv.8bitstorage_Error-int.frag" , 381"spv.8bitstorage-uint.frag" , 382"spv.8bitstorage_Error-uint.frag" , 383"spv.8bitstorage-ubo.vert" , 384"spv.8bitstorage-ssbo.vert" , 385"spv.8bit-16bit-construction.frag" , 386"spv.accessChain.frag" , 387"spv.aggOps.frag" , 388"spv.always-discard.frag" , 389"spv.always-discard2.frag" , 390"spv.arbPostDepthCoverage.frag" , 391"spv.arbPostDepthCoverage_Error.frag" , 392"spv.atomicCounter.comp" , 393"spv.bitCast.frag" , 394"spv.bool.vert" , 395"spv.boolInBlock.frag" , 396"spv.branch-return.vert" , 397"spv.bufferhandle11.frag" , 398"spv.bufferhandle12.frag" , 399"spv.bufferhandle13.frag" , 400"spv.bufferhandle14.frag" , 401"spv.bufferhandle15.frag" , 402"spv.bufferhandle16.frag" , 403"spv.bufferhandle17_Errors.frag" , 404"spv.bufferhandle18.frag" , 405"spv.bufferhandle19_Errors.frag" , 406"spv.bufferhandle2.frag" , 407"spv.bufferhandle3_Errors.frag" , 408"spv.bufferhandle4.frag" , 409"spv.bufferhandle5.frag" , 410"spv.bufferhandle6.frag" , 411"spv.bufferhandle7.frag" , 412"spv.bufferhandle8.frag" , 413"spv.bufferhandle9.frag" , 414"spv.bufferhandle20.frag" , 415"spv.bufferhandle21.frag" , 416"spv.bufferhandle22.frag" , 417"spv.bufferhandle23.frag" , 418"spv.bufferhandle24.frag" , 419"spv.bufferhandle25.frag" , 420"spv.bufferhandle26.frag" , 421"spv.bufferhandleRuntimeArray.frag" , 422"spv.bufferhandleUvec2.frag" , 423"spv.bufferhandleSwizzle.frag" , 424"spv.bufferhandle_Error.frag" , 425"spv.bufferReferenceForwardDecl.comp" , 426"spv.bufferReferenceNestedStruct.comp" , 427"spv.builtInXFB.vert" , 428"spv.conditionalDemote.frag" , 429"spv.conditionalDiscard.frag" , 430"spv.constructComposite.comp" , 431"spv.constStruct.vert" , 432"spv.constConstruct.vert" , 433"spv.controlFlowAttributes.frag" , 434"spv.conversion.frag" , 435"spv.dataOut.frag" , 436"spv.dataOutIndirect.frag" , 437"spv.dataOutIndirect.vert" , 438"spv.debugPrintf.frag" , 439"spv.debugPrintf_Error.frag" , 440"spv.demoteDisabled.frag" , 441"spv.deepRvalue.frag" , 442"spv.depthOut.frag" , 443"spv.depthUnchanged.frag" , 444"spv.discard-dce.frag" , 445"spv.doWhileLoop.frag" , 446"spv.derivative.float16.frag" , 447"spv.earlyReturnDiscard.frag" , 448"spv.expect_assume.assumeEXT.comp" , 449"spv.expect_assume.expectEXT.comp" , 450"spv.expect_assume.expectEXT.exttypes.comp" , 451"spv.ext.ShaderTileImage.color.frag" , 452"spv.ext.ShaderTileImage.depth_stencil.frag" , 453"spv.ext.ShaderTileImage.subpassinput.frag" , 454"spv.ext.ShaderTileImage.typemismatch.frag" , 455"spv.ext.ShaderTileImage.overlap.frag" , 456"spv.ext.ShaderTileImage.wronglayout.frag" , 457"spv.extPostDepthCoverage.frag" , 458"spv.extPostDepthCoverage_Error.frag" , 459"spv.float16convertonlyarith.comp" , 460"spv.float16convertonlystorage.comp" , 461"spv.flowControl.frag" , 462"spv.forLoop.frag" , 463"spv.forwardFun.frag" , 464"spv.fp8_error.frag" , 465"spv.fragmentDensity.frag" , 466"spv.fragmentDensity.vert" , 467"spv.fragmentDensity-es.frag" , 468"spv.fragmentDensity-neg.frag" , 469"spv.fsi.frag" , 470"spv.fsi_Error.frag" , 471"spv.fullyCovered.frag" , 472"spv.functionCall.frag" , 473"spv.functionControlAttributes.frag" , 474"spv.functionControlAttributes.error.frag" , 475"spv.functionNestedOpaque.vert" , 476"spv.functionSemantics.frag" , 477"spv.functionParameterTypes.frag" , 478"spv.GeometryShaderPassthrough.geom" , 479"spv.funcall.array.frag" , 480"spv.load.bool.array.interface.block.frag" , 481"spv.int_dot.frag" , 482"spv.int_dot_Error.frag" , 483"spv.interpOps.frag" , 484"spv.int64.frag" , 485"spv.intOps.vert" , 486"spv.intrinsicsDebugBreak.frag" , 487"spv.intrinsicsSpirvByReference.vert" , 488"spv.intrinsicsSpirvDecorate.frag" , 489"spv.intrinsicsSpirvDecorateId.comp" , 490"spv.intrinsicsSpirvDecorateString.comp" , 491"spv.intrinsicsSpirvExecutionMode.frag" , 492"spv.intrinsicsSpirvInstruction.vert" , 493"spv.intrinsicsSpirvLiteral.vert" , 494"spv.intrinsicsSpirvStorageClass.rchit" , 495"spv.intrinsicsSpirvType.rgen" , 496"spv.intrinsicsSpirvTypeLocalVar.vert" , 497"spv.intrinsicsSpirvTypeWithTypeSpecifier.vert" , 498"spv.intrinsicsStringConstructorError.vert" , 499"spv.invariantAll.vert" , 500"spv.layer.tese" , 501"spv.layoutNested.vert" , 502"spv.layoutQualifierExpression.error.comp" , 503"spv.length.frag" , 504"spv.localAggregates.frag" , 505"spv.loops.frag" , 506"spv.loopsArtificial.frag" , 507"spv.matFun.vert" , 508"spv.matrix.frag" , 509"spv.matrix.float16.frag" , 510"spv.matrix.float64.frag" , 511"spv.matrix2.frag" , 512"spv.maximalReconvergence.vert" , 513"spv.memoryQualifier.frag" , 514"spv.merge-unreachable.frag" , 515"spv.multiStruct.comp" , 516"spv.multiStructFuncall.frag" , 517"spv.newTexture.frag" , 518"spv.noDeadDecorations.vert" , 519"spv.nonSquare.vert" , 520"spv.nonuniform.frag" , 521"spv.nonuniform2.frag" , 522"spv.nonuniform3.frag" , 523"spv.nonuniform4.frag" , 524"spv.nonuniform5.frag" , 525"spv.noWorkgroup.comp" , 526"spv.nvAtomicFp16Vec.frag" , 527"spv.nv.explicittypecast.frag" , 528"spv.nv.explicittypecast.error.vert" , 529"spv.nullInit.comp" , 530"spv.offsets.frag" , 531"spv.Operations.frag" , 532"spv.paramMemory.frag" , 533"spv.paramMemory.420.frag" , 534"spv.precision.frag" , 535"spv.precisionArgs.frag" , 536"spv.precisionNonESSamp.frag" , 537"spv.precisionTexture.frag" , 538"spv.prepost.frag" , 539"spv.privateVariableTypes.frag" , 540"spv.qualifiers.vert" , 541"spv.sample.frag" , 542"spv.sampleId.frag" , 543"spv.samplePosition.frag" , 544"spv.sampleMaskOverrideCoverage.frag" , 545"spv.scalarlayout.frag" , 546"spv.scalarlayoutfloat16.frag" , 547"spv.shaderBallot.comp" , 548"spv.shaderDrawParams.vert" , 549"spv.shaderGroupVote.comp" , 550"spv.shaderStencilExport.frag" , 551"spv.shiftOps.frag" , 552"spv.simpleFunctionCall.frag" , 553"spv.simpleMat.vert" , 554"spv.sparseTexture.frag" , 555"spv.sparseTextureClamp.frag" , 556"spv.structAssignment.frag" , 557"spv.structCopy.comp" , 558"spv.structDeref.frag" , 559"spv.structure.frag" , 560"spv.switch.frag" , 561"spv.swizzle.frag" , 562"spv.swizzleInversion.frag" , 563"spv.test.frag" , 564"spv.test.vert" , 565"spv.texture.frag" , 566"spv.texture.vert" , 567"spv.textureBuffer.vert" , 568"spv.image.frag" , 569"spv.imageAtomic64.frag" , 570"spv.imageAtomic64.comp" , 571"spv.types.frag" , 572"spv.uint.frag" , 573"spv.uniformArray.frag" , 574"spv.variableArrayIndex.frag" , 575"spv.varyingArray.frag" , 576"spv.varyingArrayIndirect.frag" , 577"spv.vecMatConstruct.frag" , 578"spv.voidFunction.frag" , 579"spv.whileLoop.frag" , 580"spv.AofA.frag" , 581"spv.queryL.frag" , 582"spv.separate.frag" , 583"spv.shortCircuit.frag" , 584"spv.pushConstant.vert" , 585"spv.pushConstantAnon.vert" , 586"spv.subpass.frag" , 587"spv.specConstant.vert" , 588"spv.specConstant.comp" , 589"spv.specConstantComposite.vert" , 590"spv.specConstantOperations.vert" , 591"spv.specConstant.float16.comp" , 592"spv.specConstant.int16.comp" , 593"spv.specConstant.int8.comp" , 594"spv.specConstantOp.int16.comp" , 595"spv.specConstantOp.int8.comp" , 596"spv.specConstantOp.float16.comp" , 597"spv.storageBuffer.vert" , 598"spv.terminate.frag" , 599"spv.subgroupUniformControlFlow.vert" , 600"spv.subgroupSizeARB.frag" , 601"spv.precise.tese" , 602"spv.precise.tesc" , 603"spv.precise.dot.vert" , 604"spv.viewportindex.tese" , 605"spv.volatileAtomic.comp" , 606"spv.vulkan100.subgroupArithmetic.comp" , 607"spv.vulkan100.subgroupPartitioned.comp" , 608"spv.xfb.vert" , 609"spv.xfb2.vert" , 610"spv.xfb3.vert" , 611"spv.samplerlessTextureFunctions.frag" , 612"spv.smBuiltins.vert" , 613"spv.smBuiltins.frag" , 614"spv.ARMCoreBuiltIns.vert" , 615"spv.ARMCoreBuiltIns.frag" , 616"spv.builtin.PrimitiveShadingRateEXT.vert" , 617"spv.builtin.ShadingRateEXT.frag" , 618"spv.fragmentShaderBarycentric3.frag" , 619"spv.fragmentShaderBarycentric4.frag" , 620"spv.ext.textureShadowLod.frag" , 621"spv.ext.textureShadowLod.error.frag" , 622"spv.ext.small_types.comp" , 623"spv.floatFetch.frag" , 624"spv.atomicRvalue.error.vert" , 625"spv.sampledImageBlock.frag" , 626"spv.multiple.var.same.const.frag" , 627"spv.textureoffset_non_const.vert" , 628"spv.sparsetextureoffset_non_const.vert" , 629"spv.sparsetextureoffset_non_const_fail.vert" , 630"spv.tensorARM.access_qualifiers.comp" , 631"spv.tensorARM.all_accesses.comp" , 632"spv.tensorARM.array.comp" , 633"spv.tensorARM.declare.comp" , 634"spv.tensorARM.frag" , 635"spv.tensorARM.invalid_access.comp" , 636"spv.tensorARM.invalid_declare.comp" , 637"spv.tensorARM.invalid_operands.comp" , 638"spv.tensorARM.invalid_params.comp" , 639"spv.tensorARM.invalid_size.comp" , 640"spv.tensorARM.invalid_tensor_type.comp" , 641"spv.tensorARM.params.comp" , 642"spv.tensorARM.read.comp" , 643"spv.tensorARM.size.comp" , 644"spv.tensorARM.unrequested_extension_types.comp" , 645"spv.no_input_attachment_index.frag" , 646"spv.no_input_attachment_index_fail.frag" , 647"spv.no_input_attachment_index_fail_2.frag" , 648"spv.no_input_attachment_index_fail_3.frag" , 649})) , 650FileNameAsCustomTestSuffix 651) ; 652 653INSTANTIATE_TEST_SUITE_P ( 654Glsl , CompileVulkanToSpirvRelaxSetBindingLimitsTest , 655:: testing :: ValuesIn ( std :: vector < std :: string > ({ 656"spv.relaxSetBindingLimits.frag" , 657"spv.relaxSetBindingLimits.negative.error.frag" , 658})) , 659FileNameAsCustomTestSuffix 660) ; 661 662INSTANTIATE_TEST_SUITE_P ( 663Glsl , CompileVulkanToSpirvTestNoLink , 664:: testing :: ValuesIn ( std :: vector < std :: string > ({ 665"spv.exportFunctions.comp" , 666})) , 667FileNameAsCustomTestSuffix 668) ; 669 670INSTANTIATE_TEST_SUITE_P ( 671Glsl , CompileToSpirv14TestNoLink , 672:: testing :: ValuesIn ( std :: vector < std :: string > ({ 673"spv.WorkgroupMemoryExplicitLayout.NoLink.comp" , 674})) , 675FileNameAsCustomTestSuffix 676) ; 677 678// Cases with deliberately unreachable code. 679// By default the compiler will aggressively eliminate 680// unreachable merges and continues. 681INSTANTIATE_TEST_SUITE_P ( 682GlslWithDeadCode , CompileVulkanToSpirvDeadCodeElimTest , 683:: testing :: ValuesIn ( std :: vector < std :: string > ({ 684"spv.dead-after-continue.vert" , 685"spv.dead-after-discard.frag" , 686"spv.dead-after-return.vert" , 687"spv.dead-after-loop-break.vert" , 688"spv.dead-after-switch-break.vert" , 689"spv.dead-complex-continue-after-return.vert" , 690"spv.dead-complex-merge-after-return.vert" , 691})) , 692FileNameAsCustomTestSuffix 693) ; 694 695// clang-format off 696INSTANTIATE_TEST_SUITE_P ( 697Glsl , CompileVulkan1_1ToSpirvTest , 698:: testing :: ValuesIn ( std :: vector < std :: string > ({ 699"spv.1.3.8bitstorage-ubo.vert" , 700"spv.1.3.8bitstorage-ssbo.vert" , 701"spv.1.3.coopmat.comp" , 702"spv.deviceGroup.frag" , 703"spv.drawParams.vert" , 704"spv.int8.frag" , 705"spv.vulkan110.int16.frag" , 706"spv.int32.frag" , 707"spv.bitops.int8int16.frag" , 708"spv.explicittypes.frag" , 709"spv.float16NoRelaxed.vert" , 710"spv.float32.frag" , 711"spv.float64.frag" , 712"spv.memoryScopeSemantics.comp" , 713"spv.memoryScopeSemantics_Error.comp" , 714"spv.memoryScopeSemantics.nonConstArg.comp" , 715"spv.splitBarrierMemoryScopeSemantics.comp" , 716"spv.splitBarrierArriveMemoryScopeSemantics_Error1.comp" , 717"spv.splitBarrierArriveMemoryScopeSemantics_Error2.comp" , 718"spv.splitBarrierArriveMemoryScopeSemantics_Error3.comp" , 719"spv.splitBarrierWaitMemoryScopeSemantics_Error1.comp" , 720"spv.splitBarrierWaitMemoryScopeSemantics_Error2.comp" , 721"spv.splitBarrierWaitMemoryScopeSemantics_Error3.comp" , 722"spv.multiView.frag" , 723"spv.queueFamilyScope.comp" , 724"spv.RayGenShader11.rgen" , 725"spv.subgroup.frag" , 726"spv.subgroup.geom" , 727"spv.subgroup.tesc" , 728"spv.subgroup.tese" , 729"spv.subgroup.vert" , 730"spv.subgroupArithmetic.comp" , 731"spv.subgroupBasic.comp" , 732"spv.subgroupBallot.comp" , 733"spv.subgroupBallotNeg.comp" , 734"spv.subgroupClustered.comp" , 735"spv.subgroupClusteredNeg.comp" , 736"spv.subgroupPartitioned.comp" , 737"spv.subgroupRotate.comp" , 738"spv.subgroupShuffle.comp" , 739"spv.subgroupShuffleRelative.comp" , 740"spv.subgroupQuad.comp" , 741"spv.subgroupVote.comp" , 742"spv.subgroupExtendedTypesArithmetic.comp" , 743"spv.subgroupExtendedTypesArithmeticNeg.comp" , 744"spv.subgroupExtendedTypesBallot.comp" , 745"spv.subgroupExtendedTypesBallotNeg.comp" , 746"spv.subgroupExtendedTypesClustered.comp" , 747"spv.subgroupExtendedTypesClusteredNeg.comp" , 748"spv.subgroupExtendedTypesPartitioned.comp" , 749"spv.subgroupExtendedTypesPartitionedNeg.comp" , 750"spv.subgroupExtendedTypesRotate.comp" , 751"spv.subgroupExtendedTypesRotateNeg.comp" , 752"spv.subgroupExtendedTypesShuffle.comp" , 753"spv.subgroupExtendedTypesShuffleNeg.comp" , 754"spv.subgroupExtendedTypesShuffleRelative.comp" , 755"spv.subgroupExtendedTypesShuffleRelativeNeg.comp" , 756"spv.subgroupExtendedTypesQuad.comp" , 757"spv.subgroupExtendedTypesQuadNeg.comp" , 758"spv.subgroupExtendedTypesVote.comp" , 759"spv.subgroupExtendedTypesVoteNeg.comp" , 760"spv.vulkan110.storageBuffer.vert" , 761"spv.texture_implicit.comp" , 762"spv.es320.texture.comp" , 763 764// These tests use the Vulkan memory model. 765"spv.bfloat16.comp" , 766"spv.bfloat16_error.comp" , 767"spv.bfloat16_error.frag" , 768"spv.bufferhandle1.frag" , 769"spv.bufferhandle10.frag" , 770"spv.coopmat.comp" , 771"spv.coopmat_Error.comp" , 772"spv.coopmatKHR.comp" , 773"spv.coopmat_armlayout.comp" , 774"spv.coopmatKHR_arithmetic.comp" , 775"spv.coopmatKHR_arithmeticError.comp" , 776"spv.coopmatKHR_Error.comp" , 777"spv.coopmatKHR_constructor.comp" , 778"spv.coopmatKHR_constructorError.comp" , 779"spv.coopmatKHR_matmuladd_Error.comp" , 780"spv.coopvec.comp" , 781"spv.coopvec2.comp" , 782"spv.coopvecloadstore.comp" , 783"spv.coopvec_Error.comp" , 784"spv.coopvecloadstore_Error.comp" , 785"spv.coopvecStoreLocal.comp" , 786"spv.coopvecTraining.comp" , 787"spv.coopvecTraining_Error.comp" , 788"spv.intcoopmat.comp" , 789"spv.intrinsicsInteractWithCoopMat.comp" , 790"spv.longVector.comp" , 791"spv.longVectorLiteral234.comp" , 792"spv.longVectorLength.comp" , 793"spv.longVectorArrayLength.comp" , 794"spv.longVectorFixedArrayLength.comp" , 795"spv.longVectorMatMul.comp" , 796"spv.longVectorNotReserved.comp" , 797"spv.longVectorSpecConst.comp" , 798"spv.longVectorOperators.comp" , 799"spv.longVectorBadParams.decls.comp" , 800"spv.longVectorBadParams.constructors.comp" , 801"spv.longVectorBadParams.constructors.as.type.comp" , 802"spv.longVectorBadParams.index.comp" , 803"spv.longVectorBuiltins.comp" , 804"spv.longVectorBuiltinsfp16.comp" , 805"spv.longVectorBuiltinsfp64.comp" , 806"spv.longVectorBuiltinsint8.comp" , 807"spv.longVectorBuiltinsint16.comp" , 808"spv.longVectorBuiltinsint32.comp" , 809"spv.longVectorBuiltinsint64.comp" , 810"spv.longVectorBuiltinsuint8.comp" , 811"spv.longVectorBuiltinsuint16.comp" , 812"spv.longVectorBuiltinsuint32.comp" , 813"spv.longVectorBuiltinsuint64.comp" , 814"spv.longVectorBuiltinsBitcast.comp" , 815"spv.longVectorBuiltinsError.comp" , 816"spv.longVectorBuiltinsSpecConst.comp" , 817"spv.longVectorBuiltinsSpecConstint32.comp" , 818"spv.longVectorBuiltinsSubgroup.comp" , 819"spv.longVectorBuiltins.frag" , 820"spv.longVectorStorage.comp" , 821"spv.replicate.comp" , 822"spv.replicatespec.comp" , 823"spv.atomicAdd.bufferReference.comp" , 824"spv.nontemporalbuffer.frag" , 825"spv.atomicFloat.comp" , 826"spv.qcom.multiple_wait_queues.comp" , 827})) , 828FileNameAsCustomTestSuffix 829) ; 830 831// clang-format off 832INSTANTIATE_TEST_SUITE_P ( 833Glsl , CompileToSpirv14Test , 834:: testing :: ValuesIn ( std :: vector < std :: string > ({ 835"spv.1.4.LoopControl.frag" , 836"spv.1.4.NonWritable.frag" , 837"spv.1.4.OpEntryPoint.frag" , 838"spv.1.4.OpEntryPoint.opaqueParams.vert" , 839"spv.1.4.OpSelect.frag" , 840"spv.1.4.OpCopyLogical.comp" , 841"spv.1.4.OpCopyLogicalBool.comp" , 842"spv.1.4.OpCopyLogical.funcall.frag" , 843"spv.1.4.funcall.array.frag" , 844"spv.1.4.load.bool.array.interface.block.frag" , 845"spv.1.4.image.frag" , 846"spv.1.4.sparseTexture.frag" , 847"spv.1.4.texture.frag" , 848"spv.1.4.constructComposite.comp" , 849"rayQuery-opacityMicromapRayQueryMode.comp" , 850"rayQuery-opacityMicromapRayQueryMode.rgen" , 851"rayQuery-opacityMicromapRayQueryModeDefault.comp" , 852"rayQuery-opacityMicromapRayQueryModeRead.comp" , 853"rayQuery-opacityMicromapRayQueryModeTrue.comp" , 854"rayQuery-opacityMicromapRayQueryModeForce2State.comp" , 855"rayQuery-opacityMicromapRayQueryMode.Error.comp" , 856"rayQuery-opacityMicromapRayQueryModeNonConst.Error.comp" , 857"spv.ext.AnyHitShader.rahit" , 858"spv.ext.AnyHitShader_Errors.rahit" , 859"spv.ext.ClosestHitShader.rchit" , 860"spv.ext.ClosestHitShader_Subgroup.rchit" , 861"spv.ext.ClosestHitShader_Errors.rchit" , 862"spv.ext.IntersectShader.rint" , 863"spv.ext.IntersectShader_Errors.rint" , 864"spv.ext.MissShader.rmiss" , 865"spv.ext.MissShader_Errors.rmiss" , 866"spv.ext.RayPrimCull_Errors.rgen" , 867"spv.ext.RayCallable.rcall" , 868"spv.ext.RayCallable_Errors.rcall" , 869"spv.ext.RayConstants.rgen" , 870"spv.ext.RayGenShader.rgen" , 871"spv.ext.RayGenShader_Errors.rgen" , 872"spv.ext.RayGenShader11.rgen" , 873"spv.ext.RayGenShaderArray.rgen" , 874"spv.ext.RayGenSBTlayout.rgen" , 875"spv.ext.RayGenSBTlayout140.rgen" , 876"spv.ext.RayGenSBTlayout430.rgen" , 877"spv.ext.RayGenSBTlayoutscalar.rgen" , 878"spv.ext.World3x4.rahit" , 879"spv.ext.AccelDecl.frag" , 880"spv.ext.RayQueryDecl.frag" , 881 882// SPV_KHR_workgroup_memory_explicit_layout depends on SPIR-V 1.4. 883"spv.WorkgroupMemoryExplicitLayout.SingleBlock.comp" , 884"spv.WorkgroupMemoryExplicitLayout.MultiBlock.comp" , 885"spv.WorkgroupMemoryExplicitLayout.8BitAccess.comp" , 886"spv.WorkgroupMemoryExplicitLayout.16BitAccess.comp" , 887"spv.WorkgroupMemoryExplicitLayout.NonBlock.comp" , 888"spv.WorkgroupMemoryExplicitLayout.MixBlockNonBlock_Errors.comp" , 889"spv.WorkgroupMemoryExplicitLayout.std140.comp" , 890"spv.WorkgroupMemoryExplicitLayout.std430.comp" , 891"spv.WorkgroupMemoryExplicitLayout.scalar.comp" , 892"spv.khrComputeShaderDerivatives.comp" , 893"spv.khrComputeShaderDerivatives2.comp" , 894"spv.khrComputeShaderDerivativesLayoutOrder.comp" , 895 896// SPV_EXT_mesh_shader 897"spv.ext.meshShaderBuiltins.mesh" , 898"spv.ext.meshShaderBuiltinsShadingRate.mesh" , 899"spv.ext.meshShaderRedeclBuiltins.mesh" , 900"spv.ext.meshShaderTaskMem.mesh" , 901"spv.ext.meshShaderUserDefined.mesh" , 902"spv.ext.meshTaskShader.task" , 903"spv.atomiAddEXT.error.mesh" , 904"spv.atomiAddEXT.task" , 905"spv.460.subgroupEXT.task" , 906"spv.460.subgroupEXT.mesh" , 907"spv.computeShaderDerivatives.mesh" , 908"spv.khrComputeShaderDerivatives.task" , 909"spv.khrComputeShaderDerivatives.mesh" , 910 911// SPV_NV_shader_execution_reorder 912 913"spv.nv.hitobject-errors.rgen" , 914"spv.nv.hitobject-allops.rgen" , 915"spv.nv.hitobject-allops.rchit" , 916"spv.nv.hitobject-allops.rmiss" , 917 918// SPV_EXT_shader_execution_reorder 919 920"spv.ext.hitobject-errors.rgen" , 921"spv.ext.hitobject-allops.rgen" , 922"spv.ext.hitobject-allops.rchit" , 923"spv.ext.hitobject-allops.rmiss" , 924 925// SPV_NV_displacement_micromap 926 927"spv.nv.dmm-allops.rgen" , 928"spv.nv.dmm-allops.rchit" , 929"spv.nv.dmm-allops.rahit" , 930"spv.nv.dmm-allops.mesh" , 931"spv.nv.dmm-allops.comp" , 932 933// SPV_NV_cluster_acceleration_structure 934"spv.nv.cluster-allops.rgen" , 935"spv.nv.cluster-allops.rchit" , 936"spv.nv.cluster-allops.rmiss" , 937"spv.nv.cluster-allops.rahit" , 938"spv.nv.cluster-allops.frag" , 939 940// SPV_NV_linear_swept_spheres 941 942"spv.nv.lss-allops.rgen" , 943"spv.nv.lss-allops.rchit" , 944"spv.nv.lss-allops.rmiss" , 945"spv.nv.lss-allops.frag" , 946"spv.nv.lss-spheregeomcap.rgen" , 947"spv.nv.lss-lssgeomcap.rgen" , 948 949// SPV_EXT_descriptor_heap 950 951"spv.descriptorHeap.AtomicImage.comp" , 952"spv.descriptorHeap.AtomicImage.error.comp" , 953"spv.descriptorHeap.Buffer.comp" , 954"spv.descriptorHeap.BufferStruct.comp" , 955"spv.descriptorHeap.BufferQualifiers.frag" , 956"spv.descriptorHeap.CombinedSampler.error.frag" , 957"spv.descriptorHeap.ImageQualifiers.frag" , 958"spv.descriptorHeap.Stride.comp" , 959"spv.descriptorHeap.DebugPrintf.comp" , 960"spv.descriptorHeap.HeapNotArray.error.comp" , 961"spv.descriptorHeap.HeapStrideNotHeap.error.comp" , 962"spv.descriptorHeap.HeapStrideNotPow2.error.comp" , 963"spv.descriptorHeap.PushConstant.comp" , 964"spv.tensorARM.descriptorHeap.comp" , 965"spv.descriptorHeap.valid.frag" , 966"spv.descriptorHeap.heaps.frag" , 967"spv.descriptorHeap.nonuniform.frag" , 968 969// SPV_EXT_structured_descriptor_heap 970"spv.structuredDescriptorHeap.AccelerationStructure.comp" , 971"spv.structuredDescriptorHeap.Buffer.comp" , 972"spv.structuredDescriptorHeap.BufferReference.comp" , 973"spv.structuredDescriptorHeap.LayoutQualifiers.comp" , 974"spv.structuredDescriptorHeap.MatrixLayout.comp" , 975"spv.structuredDescriptorHeap.Offset.comp" , 976 977// SPV_KHR_abort 978"spv.shader.abort.comp" , 979"spv.shader.abort.matrix_param.comp" , 980"spv.shader.abort.args.none.comp" , 981"spv.shader.abort.args.int.comp" , 982"spv.shader.abort.args.uint.comp" , 983"spv.shader.abort.args.float.comp" , 984"spv.shader.abort.args.int2.comp" , 985"spv.shader.abort.args.mixed3.comp" , 986"spv.shader.abort.args.mixed8.comp" , 987"spv.shader.abort.args.excess.comp" , 988"spv.shader.abort.args.constants.comp" , 989"spv.shader.abort.args.macro.comp" , 990"spv.shader.abort.args.vec2.comp" , 991"spv.shader.abort.args.vec3.comp" , 992"spv.shader.abort.args.vec4.comp" , 993"spv.shader.abort.args.ivec.comp" , 994"spv.shader.abort.args.uvec.comp" , 995"spv.shader.abort.args.vec_mixed.comp" , 996"spv.shader.abort.args.bool.comp" , 997"spv.shader.abort.args.scalar_layout.comp" , 998"spv.shader.abort.type.int8.comp" , 999"spv.shader.abort.type.int16.comp" , 1000"spv.shader.abort.type.int64.comp" , 1001"spv.shader.abort.type.float16.comp" , 1002"spv.shader.abort.type.float64.comp" , 1003"spv.shader.abort.type.matrix.comp" , 1004"spv.shader.abort.type.array.comp" , 1005"spv.shader.abort.type.struct.comp" , 1006"spv.shader.abort.type.buffer_reference.comp" , 1007"spv.shader.abort.format_Error.comp" , 1008"spv.shader.abort.args.type_Error.comp" , 1009})) , 1010FileNameAsCustomTestSuffix 1011) ; 1012 1013// clang-format off 1014INSTANTIATE_TEST_SUITE_P ( 1015Glsl , CompileToSpirv16Test , 1016:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1017"spv.1.6.conditionalDiscard.frag" , 1018"spv.1.6.helperInvocation.frag" , 1019"spv.1.6.helperInvocation.memmodel.frag" , 1020"spv.1.6.specConstant.comp" , 1021"spv.1.6.samplerBuffer.frag" , 1022"spv.1.6.separate.frag" , 1023"spv.1.6.quad.frag" , 1024"spv.64bit_indexing.comp" , 1025"spv.64bit_indexing_error.comp" , 1026"spv.coopmatmaint1.comp" , 1027"spv.coopmatmaint1_error.comp" , 1028"spv.coopmat2_constructor.comp" , 1029"spv.coopmat2_error.comp" , 1030"spv.coopmat2_perelement_error.comp" , 1031"spv.coopmat2_tensor.comp" , 1032"spv.coopmat2_decode_vector.comp" , 1033"spv.coopmat2_decode_vector_b.comp" , 1034"spv.coopmat2_decode_vector_error.comp" , 1035"spv.1.6.nontemporalimage.frag" , 1036"spv.noexplicitlayout.comp" , 1037"spv.floate4m3.comp" , 1038"spv.floate4m3.const.comp" , 1039"spv.floate4m3_error.comp" , 1040"spv.floate5m2.comp" , 1041"spv.floate5m2.const.comp" , 1042"spv.floate5m2_error.comp" , 1043"spv.promote_uint32_indices.comp" , 1044"spv.floate2m1.comp" , 1045"spv.floate2m1.const.comp" , 1046"spv.floate3m2.comp" , 1047"spv.floate3m2.const.comp" , 1048"spv.floate2m3.comp" , 1049"spv.floate2m3.const.comp" , 1050"spv.floatue8m0.comp" , 1051"spv.floatue8m0.const.comp" , 1052"spv.floatmxint8.comp" , 1053"spv.floatmxint8.const.comp" , 1054"spv.floatocperrors.comp" , 1055"spv.floatocperrors.vert" , 1056})) , 1057FileNameAsCustomTestSuffix 1058) ; 1059 1060 1061// clang-format off 1062INSTANTIATE_TEST_SUITE_P ( 1063Hlsl , HlslIoMap , 1064:: testing :: ValuesIn ( std :: vector < IoMapData > { 1065{ "spv.register.autoassign.frag" , "main_ep" , 5 , 10 , 0 , 20 , 30 , true , false , false } , 1066{ "spv.register.noautoassign.frag" , "main_ep" , 5 , 10 , 0 , 15 , 30 , false , false , false } , 1067{ "spv.register.autoassign-2.frag" , "main" , 5 , 10 , 0 , 15 , 30 , true , true , false } , 1068{ "spv.register.subpass.frag" , "main" , 0 , 20 , 0 , 0 , 0 , true , true , false } , 1069{ "spv.buffer.autoassign.frag" , "main" , 5 , 10 , 0 , 15 , 30 , true , true , false } , 1070{ "spv.ssbo.autoassign.frag" , "main" , 5 , 10 , 0 , 15 , 30 , true , true , false } , 1071{ "spv.ssboAlias.frag" , "main" , 0 , 0 , 0 , 0 , 83 , true , false , false } , 1072{ "spv.rw.autoassign.frag" , "main" , 5 , 10 , 20 , 15 , 30 , true , true , false } , 1073{ "spv.register.autoassign.rangetest.frag" , "main" , 1074glslang :: TQualifier :: layoutBindingEnd - 2 , 1075glslang :: TQualifier :: layoutBindingEnd + 5 , 10760 , 20 , 30 , true , false , false } , 1077}) , 1078FileNameAsCustomTestSuffixIoMap 1079) ; 1080 1081// clang-format off 1082INSTANTIATE_TEST_SUITE_P ( 1083Hlsl , GlslIoMap , 1084:: testing :: ValuesIn ( std :: vector < IoMapData > { 1085{ "spv.glsl.register.autoassign.frag" , "main" , 5 , 10 , 0 , 20 , 30 , true , false , false } , 1086{ "spv.glsl.register.noautoassign.frag" , "main" , 5 , 10 , 0 , 15 , 30 , false , false , false } , 1087{ "spv.glsl.register.autoassign.relaxSetBindingLimits.frag" , "main" , 108870000 , 70001 , 0 , 20 , 30 , true , false , true } , 1089}) , 1090FileNameAsCustomTestSuffixIoMap 1091) ; 1092 1093// clang-format off 1094INSTANTIATE_TEST_SUITE_P ( 1095Glsl , CompileOpenGLToSpirvTest , 1096:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1097"spv.460.frag" , 1098"spv.460.vert" , 1099"spv.460.comp" , 1100"spv.atomic.comp" , 1101"spv.atomicFloat_Error.comp" , 1102"spv.glFragColor.frag" , 1103"spv.rankShift.comp" , 1104"spv.specConst.vert" , 1105"spv.specTexture.frag" , 1106"spv.OVR_multiview.vert" , 1107"spv.uniformInitializer.frag" , 1108"spv.uniformInitializerSpecConstant.frag" , 1109"spv.uniformInitializerStruct.frag" , 1110"spv.xfbOffsetOnBlockMembersAssignment.vert" , 1111"spv.xfbOffsetOnStructMembersAssignment.vert" , 1112"spv.xfbOverlapOffsetCheckWithBlockAndMember.vert" , 1113"spv.xfbStrideJustOnce.vert" , 1114})) , 1115FileNameAsCustomTestSuffix 1116) ; 1117 1118INSTANTIATE_TEST_SUITE_P ( 1119Glsl , VulkanSemantics , 1120:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1121"vulkan.frag" , 1122"vulkan.vert" , 1123"vulkan.comp" , 1124"samplerlessTextureFunctions.frag" , 1125"spv.intrinsicsFakeEnable.vert" , 1126"spv.specConstArrayCheck.vert" , 1127"spv.khrComputeShaderDerivativesMissingLayout.comp" , 1128"spv.khrComputeShaderDerivativesNoLayout.comp" , 1129"spv.khrComputeShaderDerivativesBoth.comp" , 1130"spv.khrComputeShaderDerivativesBadSize.comp" , 1131})) , 1132FileNameAsCustomTestSuffix 1133) ; 1134 1135INSTANTIATE_TEST_SUITE_P ( 1136Glsl , OpenGLSemantics , 1137:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1138"glspv.esversion.vert" , 1139"glspv.version.frag" , 1140"glspv.version.vert" , 1141"glspv.frag" , 1142"glspv.vert" , 1143})) , 1144FileNameAsCustomTestSuffix 1145) ; 1146 1147INSTANTIATE_TEST_SUITE_P ( 1148Glsl , VulkanAstSemantics , 1149:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1150"vulkan.ast.vert" , 1151})) , 1152FileNameAsCustomTestSuffix 1153) ; 1154 1155INSTANTIATE_TEST_SUITE_P ( 1156Glsl , CompileVulkanToSpirvTestQCOM , 1157:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1158"spv.qcom.tileShading.0.comp" , 1159"spv.qcom.tileShading.1.comp" , 1160"spv.qcom.es.tileShading.0.comp" , 1161"spv.qcom.es.tileShading.1.comp" , 1162"spv.qcom.es.tileShading.2.comp" , 1163"spv.qcom.tileShading.0.frag" , 1164"spv.qcom.tileShading.1.frag" , 1165"spv.qcom.es.tileShading.0.frag" , 1166"spv.qcom.es.tileShading.1.frag" , 1167})) , 1168FileNameAsCustomTestSuffix 1169) ; 1170 1171INSTANTIATE_TEST_SUITE_P ( 1172Glsl , CompileVulkanToSpirv13TestQCOM , 1173:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1174"spv.qcom.coopmatConversion.1.comp" , 1175"spv.qcom.coopmatConversion.2.comp" , 1176})) , 1177FileNameAsCustomTestSuffix 1178) ; 1179 1180INSTANTIATE_TEST_SUITE_P ( 1181Glsl , CompileVulkanToSpirv14TestQCOM , 1182:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1183"spv.tpipSampleWeighted.frag" , 1184"spv.tpipBoxFilter.frag" , 1185"spv.tpipBlockMatchSSD.frag" , 1186"spv.tpipBlockMatchSAD.frag" , 1187"spv.tpipTextureArrays.frag" , 1188"spv.tpipBlockMatchGatherSAD.frag" , 1189"spv.tpipBlockMatchGatherSSD.frag" , 1190"spv.tpipBlockMatchWindowSAD.frag" , 1191"spv.tpipBlockMatchWindowSSD.frag" , 1192"spv.qcom.textureGather.vert" , 1193"spv.qcom.textureGather.frag" , 1194"spv.qcom.es.textureGather.vert" , 1195"spv.qcom.es.textureGather.frag" , 1196})) , 1197FileNameAsCustomTestSuffix 1198) ; 1199 1200INSTANTIATE_TEST_SUITE_P ( 1201Glsl , CompileVulkanToSpirvTestAMD , 1202:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1203"spv.16bitxfb.vert" , 1204"spv.float16.frag" , 1205"spv.float16Fetch.frag" , 1206"spv.imageLoadStoreLod.frag" , 1207"spv.int16.frag" , 1208"spv.int16.amd.frag" , 1209"spv.shaderBallotAMD.comp" , 1210"spv.shaderFragMaskAMD.frag" , 1211"spv.textureGatherBiasLod.frag" , 1212})) , 1213FileNameAsCustomTestSuffix 1214) ; 1215 1216INSTANTIATE_TEST_SUITE_P ( 1217Glsl , CompileVulkanToSpirvTestNV , 1218:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1219"spv.sampleMaskOverrideCoverage.frag" , 1220"spv.GeometryShaderPassthrough.geom" , 1221"spv.viewportArray2.vert" , 1222"spv.viewportArray2.tesc" , 1223"spv.stereoViewRendering.vert" , 1224"spv.stereoViewRendering.tesc" , 1225"spv.multiviewPerViewAttributes.vert" , 1226"spv.multiviewPerViewAttributes.tesc" , 1227"spv.atomicInt64.comp" , 1228"spv.atomicStoreInt64.comp" , 1229"spv.shadingRate.frag" , 1230"spv.RayGenShader.rgen" , 1231"spv.RayGenShaderArray.rgen" , 1232"spv.RayGenShader_Errors.rgen" , 1233"spv.RayConstants.rgen" , 1234"spv.IntersectShader.rint" , 1235"spv.IntersectShader_Errors.rint" , 1236"spv.AnyHitShader.rahit" , 1237"spv.AnyHitShader_Errors.rahit" , 1238"spv.ClosestHitShader.rchit" , 1239"spv.ClosestHitShader_Errors.rchit" , 1240"spv.MissShader.rmiss" , 1241"spv.MissShader_Errors.rmiss" , 1242"spv.RayCallable.rcall" , 1243"spv.RayCallable_Errors.rcall" , 1244"spv.fragmentShaderBarycentric.frag" , 1245"spv.fragmentShaderBarycentric2.frag" , 1246"spv.computeShaderDerivatives.comp" , 1247"spv.computeShaderDerivatives2.comp" , 1248"spv.computeShaderDerivativesNoLayout.comp" , 1249"spv.computeShaderDerivativesSpec.comp" , 1250"spv.computeShaderDerivativesSpec2.comp" , 1251"spv.shaderImageFootprint.frag" , 1252"spv.meshShaderBuiltins.mesh" , 1253"spv.meshShaderUserDefined.mesh" , 1254"spv.meshShaderPerViewBuiltins.mesh" , 1255"spv.meshShaderPerViewUserDefined.mesh" , 1256"spv.meshShaderPerView_Errors.mesh" , 1257"spv.meshShaderSharedMem.mesh" , 1258"spv.meshShaderTaskMem.mesh" , 1259"spv.320.meshShaderUserDefined.mesh" , 1260"spv.meshShaderRedeclBuiltins.mesh" , 1261"spv.meshShaderRedeclPerViewBuiltins.mesh" , 1262"spv.meshTaskShader.task" , 1263"spv.perprimitiveNV.frag" , 1264"spv.nvgpushader5.frag" , 1265"spv.pushConstantBank.vert" , 1266})) , 1267FileNameAsCustomTestSuffix 1268) ; 1269 1270INSTANTIATE_TEST_SUITE_P ( 1271Glsl , CompileVulkanToSpirv14TestNV , 1272:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1273"spv.RayGenShaderMotion.rgen" , 1274"spv.RayGenShaderMotion_Errors.rgen" , 1275"spv.IntersectShaderMotion.rint" , 1276"spv.AnyHitShaderMotion.rahit" , 1277"spv.ClosestHitShaderMotion.rchit" , 1278"spv.MissShaderMotion.rmiss" , 1279})) , 1280FileNameAsCustomTestSuffix 1281) ; 1282 1283INSTANTIATE_TEST_SUITE_P ( 1284Glsl , CompileUpgradeTextureToSampledTextureAndDropSamplersTest , 1285:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1286"spv.texture.sampler.transform.frag" , 1287})) , 1288FileNameAsCustomTestSuffix 1289) ; 1290 1291INSTANTIATE_TEST_SUITE_P ( 1292Glsl , GlslSpirvDebugInfoTest , 1293:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1294"spv.pp.line.frag" , 1295})) , 1296FileNameAsCustomTestSuffix 1297) ; 1298 1299INSTANTIATE_TEST_SUITE_P ( 1300Glsl , GlslNonSemanticShaderDebugInfoTest , 1301:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1302"spv.debuginfo.glsl.vert" , 1303"spv.debuginfo.glsl.frag" , 1304"spv.debuginfo.glsl.comp" , 1305"spv.debuginfo.glsl.geom" , 1306"spv.debuginfo.glsl.tesc" , 1307"spv.debuginfo.glsl.tese" , 1308"spv.debuginfo.bufferref.glsl.frag" , 1309"spv.debuginfo.const_params.glsl.comp" , 1310"spv.debuginfo.scalar_types.glsl.frag" , 1311"spv.debuginfo.include.glsl.frag" , 1312"spv.debuginfo.macro.include.glsl.frag" , 1313"spv.debuginfo.multiline.glsl.frag" , 1314"spv.debuginfo.implicit_br.glsl.frag" , 1315"spv.debuginfo.non_ascii.glsl.frag" , 1316"spv.debuginfo.continued.glsl.vert" , 1317"spv.debuginfo.interface_bool.glsl.comp" , 1318"spv.debuginfo.sampler_type.glsl.frag" , 1319"spv.debuginfo.const_variables.glsl.frag" , 1320"spv.debuginfo.ubo.glsl.frag" , 1321"spv.debuginfo.declaration.glsl.frag" , 1322})) , 1323FileNameAsCustomTestSuffix 1324) ; 1325 1326INSTANTIATE_TEST_SUITE_P ( 1327Glsl , GlslNonSemanticShaderDebugInfoVulkanLatestTest , 1328:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1329"spv.debuginfo.rt_types.glsl.rgen" , 1330"spv.debuginfo.rt_nv_builtins.glsl.rahit" , 1331"spv.debuginfo.rt_ext_builtins.glsl.rahit" , 1332})) , 1333FileNameAsCustomTestSuffix 1334) ; 1335 1336INSTANTIATE_TEST_SUITE_P ( 1337Glsl , GlslSplitBarrierEXTTest , 1338:: testing :: ValuesIn ( std :: vector < std :: string > ({ 1339"spv.split.barrier.vert" , 1340"spv.split.barrier.comp" 1341})) , 1342FileNameAsCustomTestSuffix 1343) ; 1344// clang-format on 1345 1346 1347} // anonymous namespace 1348} // namespace glslangtest