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