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