// // Copyright 2015 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // #include "test_utils/ANGLETest.h" #include "test_utils/gl_raii.h" #include "util/shader_utils.h" usingnamespaceangle; namespace { class GLSLTest : public ANGLETest<> { … }; class GLSLTestNoValidation : public GLSLTest { … }; class GLSLTest_ES3 : public GLSLTest { … }; class GLSLTest_ES31 : public GLSLTest { … }; // Tests the "init output variables" ANGLE shader translator option. class GLSLTest_ES31_InitShaderVariables : public GLSLTest { … }; std::string BuildBigInitialStackShader(int length) { … } // Tests a shader from conformance.olges/GL/build/build_017_to_024 // This shader uses chained assign-equals ops with swizzle, often reusing the same variable // as part of a swizzle. TEST_P(GLSLTest, SwizzledChainedAssignIncrement) { … } TEST_P(GLSLTest, NamelessScopedStructs) { … } TEST_P(GLSLTest_ES3, CompareEqualityOfArrayOfVectors) { … } TEST_P(GLSLTest_ES3, CompareEqualityOfArrayOfMatrices) { … } TEST_P(GLSLTest_ES3, CompareEqualityOfArrayOfFloats) { … } TEST_P(GLSLTest_ES3, CompareInequalityOfArrayOfVectors) { … } TEST_P(GLSLTest_ES3, CompareInequalityOfArrayOfMatrices) { … } TEST_P(GLSLTest_ES3, CompareInequalityOfArrayOfFloats) { … } // Test that array of fragment shader outputs is processed properly and draws // E.g. was issue with "out vec4 frag_color[4];" TEST_P(GLSLTest_ES3, FragmentShaderOutputArray) { … } // Test that inactive fragment shader outputs don't cause a crash. TEST_P(GLSLTest_ES3, InactiveFragmentShaderOutput) { … } TEST_P(GLSLTest, ScopedStructsOrderBug) { … } // Test that defining a struct together with an inactive uniform, then using it in a scope that has // another struct with the same name declared works. TEST_P(GLSLTest, ScopedStructsOrderBug2) { … } // Test that inactive uniforms of struct type don't cause any errors. TEST_P(GLSLTest, InactiveStructUniform) { … } // Test that struct with same name can be declared in inner scope. TEST_P(GLSLTest, SameNameStructInInnerScope) { … } // Regression test based on WebGL's conformance/glsl/misc/empty-declaration.html TEST_P(GLSLTest, StructEmptyDeclaratorBug) { … } // Regression test based on WebGL's conformance/ogles/GL/build/build_001_to_008.html TEST_P(GLSLTest, StructConstantFoldingBug) { … } // Test that constant folding doesn't remove struct declaration. TEST_P(GLSLTest, StructConstantFoldingBug2) { … } TEST_P(GLSLTest, ScopedStructsBug) { … } TEST_P(GLSLTest, DxPositionBug) { … } // Draw an array of points with the first vertex offset at 0 using gl_VertexID TEST_P(GLSLTest_ES3, GLVertexIDOffsetZeroDrawArray) { … } GLint GetFirstIntPixelRedValue() { … } TEST_P(GLSLTest_ES3, GLVertexIDIntegerTextureDrawElements) { … } TEST_P(GLSLTest_ES3, GLVertexIDIntegerTextureDrawElementsU8) { … } void GLVertexIDIntegerTextureDrawElementsU8Line_Helper(size_t first, const GLubyte *indices) { … } TEST_P(GLSLTest_ES3, GLVertexIDIntegerTextureDrawElementsU8Line) { … } // Test gl_VertexID works with lines TEST_P(GLSLTest_ES3, GLVertexIDIntegerTextureDrawElementsU8LineIds) { … } // Helper function for the GLVertexIDIntegerTextureDrawArrays test void GLVertexIDIntegerTextureDrawArrays_helper(int first, int count, GLenum err) { … } // Ensure gl_VertexID gets passed to an integer texture properly when drawArrays is called. This // is based off the WebGL test: // https://github.com/KhronosGroup/WebGL/blob/master/sdk/tests/conformance2/rendering/vertex-id.html TEST_P(GLSLTest_ES3, GLVertexIDIntegerTextureDrawArrays) { … } // Draw an array of points with the first vertex offset at 5 using gl_VertexID TEST_P(GLSLTest_ES3, GLVertexIDOffsetFiveDrawArray) { … } TEST_P(GLSLTest, ElseIfRewriting) { … } TEST_P(GLSLTest, TwoElseIfRewriting) { … } TEST_P(GLSLTest, FrontFacingAndVarying) { … } // Test that we can release the shader compiler and still compile things properly. TEST_P(GLSLTest, ReleaseCompilerThenCompile) { … } // Verify that linking shaders declaring different shading language versions fails. TEST_P(GLSLTest_ES3, VersionMismatch) { … } // Verify that declaring varying as invariant only in vertex shader fails in ESSL 1.00. TEST_P(GLSLTest, InvariantVaryingOut) { … } // Verify that declaring varying as invariant only in vertex shader succeeds in ESSL 3.00. TEST_P(GLSLTest_ES3, InvariantVaryingOut) { … } // Verify that declaring varying as invariant only in fragment shader fails in ESSL 1.00. TEST_P(GLSLTest, InvariantVaryingIn) { … } // Verify that declaring varying as invariant only in fragment shader fails in ESSL 3.00. TEST_P(GLSLTest_ES3, InvariantVaryingIn) { … } // Verify that declaring varying as invariant in both shaders succeeds in ESSL 1.00. TEST_P(GLSLTest, InvariantVaryingBoth) { … } // Verify that declaring varying as invariant in both shaders fails in ESSL 3.00. TEST_P(GLSLTest_ES3, InvariantVaryingBoth) { … } // Verify that declaring gl_Position as invariant succeeds in ESSL 1.00. TEST_P(GLSLTest, InvariantGLPosition) { … } // Verify that declaring gl_Position as invariant succeeds in ESSL 3.00. TEST_P(GLSLTest_ES3, InvariantGLPosition) { … } // Verify that using invariant(all) in both shaders fails in ESSL 1.00. TEST_P(GLSLTest, InvariantAllBoth) { … } // Verify that using a struct as both invariant and non-invariant output works. TEST_P(GLSLTest_ES31, StructBothInvariantAndNot) { … } // Verify that functions without return statements still compile TEST_P(GLSLTest, MissingReturnFloat) { … } // Verify that functions without return statements still compile TEST_P(GLSLTest, MissingReturnVec2) { … } // Verify that functions without return statements still compile TEST_P(GLSLTest, MissingReturnVec3) { … } // Verify that functions without return statements still compile TEST_P(GLSLTest, MissingReturnVec4) { … } // Verify that functions without return statements still compile TEST_P(GLSLTest, MissingReturnIVec4) { … } // Verify that functions without return statements still compile TEST_P(GLSLTest, MissingReturnMat4) { … } // Verify that functions without return statements still compile TEST_P(GLSLTest, MissingReturnStruct) { … } // Verify that functions without return statements still compile TEST_P(GLSLTest_ES3, MissingReturnArray) { … } // Verify that functions without return statements still compile TEST_P(GLSLTest_ES3, MissingReturnArrayOfStructs) { … } // Verify that functions without return statements still compile TEST_P(GLSLTest_ES3, MissingReturnStructOfArrays) { … } // Verify that non-const index used on an array returned by a function compiles TEST_P(GLSLTest_ES3, ReturnArrayOfStructsThenNonConstIndex) { … } // Verify that using invariant(all) in both shaders fails in ESSL 3.00. TEST_P(GLSLTest_ES3, InvariantAllBoth) { … } // Verify that using invariant(all) only in fragment shader succeeds in ESSL 1.00. TEST_P(GLSLTest, InvariantAllIn) { … } // Verify that using invariant(all) only in fragment shader fails in ESSL 3.00. TEST_P(GLSLTest_ES3, InvariantAllIn) { … } // Verify that using invariant(all) only in vertex shader fails in ESSL 1.00. TEST_P(GLSLTest, InvariantAllOut) { … } // Verify that using invariant(all) only in vertex shader succeeds in ESSL 3.00. TEST_P(GLSLTest_ES3, InvariantAllOut) { … } TEST_P(GLSLTest, MaxVaryingVec4) { … } // Verify we can pack registers with one builtin varying. TEST_P(GLSLTest, MaxVaryingVec4_OneBuiltin) { … } // Verify we can pack registers with two builtin varyings. TEST_P(GLSLTest, MaxVaryingVec4_TwoBuiltins) { … } // Verify we can pack registers with three builtin varyings. TEST_P(GLSLTest, MaxVaryingVec4_ThreeBuiltins) { … } // This covers a problematic case in D3D9 - we are limited by the number of available semantics, // rather than total register use. TEST_P(GLSLTest, MaxVaryingsSpecialCases) { … } // This covers a problematic case in D3D9 - we are limited by the number of available semantics, // rather than total register use. TEST_P(GLSLTest, MaxMinusTwoVaryingVec2PlusOneSpecialVariable) { … } TEST_P(GLSLTest, MaxVaryingVec3) { … } TEST_P(GLSLTest, MaxVaryingVec3Array) { … } // Only fails on D3D9 because of packing limitations. TEST_P(GLSLTest, MaxVaryingVec3AndOneFloat) { … } // Only fails on D3D9 because of packing limitations. TEST_P(GLSLTest, MaxVaryingVec3ArrayAndOneFloatArray) { … } // Only fails on D3D9 because of packing limitations. TEST_P(GLSLTest, TwiceMaxVaryingVec2) { … } // Disabled because of a failure in D3D9 TEST_P(GLSLTest, MaxVaryingVec2Arrays) { … } // Verify max varying with feedback and gl_line enabled TEST_P(GLSLTest_ES3, MaxVaryingWithFeedbackAndGLline) { … } // Verify shader source with a fixed length that is less than the null-terminated length will // compile. TEST_P(GLSLTest, FixedShaderLength) { … } // Verify that a negative shader source length is treated as a null-terminated length. TEST_P(GLSLTest, NegativeShaderLength) { … } // Check that having an invalid char after the "." doesn't cause an assert. TEST_P(GLSLTest, InvalidFieldFirstChar) { … } // Verify that a length array with mixed positive and negative values compiles. TEST_P(GLSLTest, MixedShaderLengths) { … } // Verify that zero-length shader source does not affect shader compilation. TEST_P(GLSLTest, ZeroShaderLength) { … } // Tests that bad index expressions don't crash ANGLE's translator. // https://code.google.com/p/angleproject/issues/detail?id=857 TEST_P(GLSLTest, BadIndexBug) { … } // Test that structs defined in uniforms are translated correctly. TEST_P(GLSLTest, StructSpecifiersUniforms) { … } // Test that structs declaration followed directly by an initialization is translated correctly. TEST_P(GLSLTest, StructWithInitializer) { … } // Test that structs without initializer, followed by a uniform usage works as expected. TEST_P(GLSLTest, UniformStructWithoutInitializer) { … } // Test that structs declaration followed directly by an initialization in a uniform. TEST_P(GLSLTest, StructWithUniformInitializer) { … } // Test that gl_DepthRange is not stored as a uniform location. Since uniforms // beginning with "gl_" are filtered out by our validation logic, we must // bypass the validation to test the behaviour of the implementation. // (note this test is still Impl-independent) TEST_P(GLSLTestNoValidation, DepthRangeUniforms) { … } std::string GenerateSmallPowShader(double base, double exponent) { … } // Covers the WebGL test 'glsl/bugs/pow-of-small-constant-in-user-defined-function' // See http://anglebug.com/40096900 TEST_P(GLSLTest, PowOfSmallConstant) { … } // Test fragment shaders which contain non-constant loop indexers TEST_P(GLSLTest, LoopIndexingValidation) { … } // Tests that the maximum uniforms count returned from querying GL_MAX_VERTEX_UNIFORM_VECTORS // can actually be used. TEST_P(GLSLTest, VerifyMaxVertexUniformVectors) { … } // Tests that the maximum uniforms count returned from querying GL_MAX_VERTEX_UNIFORM_VECTORS // can actually be used along with the maximum number of texture samplers. TEST_P(GLSLTest, VerifyMaxVertexUniformVectorsWithSamplers) { … } // Tests that the maximum uniforms count + 1 from querying GL_MAX_VERTEX_UNIFORM_VECTORS // fails shader compilation. TEST_P(GLSLTest, VerifyMaxVertexUniformVectorsExceeded) { … } // Tests that the maximum uniforms count returned from querying GL_MAX_FRAGMENT_UNIFORM_VECTORS // can actually be used. TEST_P(GLSLTest, VerifyMaxFragmentUniformVectors) { … } // Tests that the maximum uniforms count returned from querying GL_MAX_FRAGMENT_UNIFORM_VECTORS // can actually be used along with the maximum number of texture samplers. TEST_P(GLSLTest, VerifyMaxFragmentUniformVectorsWithSamplers) { … } // Tests that the maximum uniforms count + 1 from querying GL_MAX_FRAGMENT_UNIFORM_VECTORS // fails shader compilation. TEST_P(GLSLTest, VerifyMaxFragmentUniformVectorsExceeded) { … } // Test compiling shaders using the GL_EXT_shader_texture_lod extension TEST_P(GLSLTest, TextureLOD) { … } // HLSL generates extra lod0 variants of functions. There was a bug that incorrectly reworte // function calls to use them in vertex shaders. http://anglebug.com/42262136 TEST_P(GLSLTest, TextureLODRewriteInVertexShader) { … } // Test to verify the a shader can have a sampler unused in a vertex shader // but used in the fragment shader. TEST_P(GLSLTest, VerifySamplerInBothVertexAndFragmentShaders) { … } // Test that array of structs containing array of samplers work as expected. TEST_P(GLSLTest, ArrayOfStructContainingArrayOfSamplers) { … } // Test that if a non-preprocessor token is seen in a disabled if-block then it does not disallow // extension pragmas later TEST_P(GLSLTest, NonPreprocessorTokensInIfBlocks) { … } // Test that two constructors which have vec4 and mat2 parameters get disambiguated (issue in // HLSL). TEST_P(GLSLTest_ES3, AmbiguousConstructorCall2x2) { … } // Test that two constructors which have mat2x3 and mat3x2 parameters get disambiguated. // This was suspected to be an issue in HLSL, but HLSL seems to be able to natively choose between // the function signatures in this case. TEST_P(GLSLTest_ES3, AmbiguousConstructorCall2x3) { … } // Test that two functions which have vec4 and mat2 parameters get disambiguated (issue in HLSL). TEST_P(GLSLTest_ES3, AmbiguousFunctionCall2x2) { … } // Test that constructing matrices from non-float types works. TEST_P(GLSLTest_ES3, ConstructMatrixFromNonFloat) { … } // Test that constructing vectors from non-float types works. TEST_P(GLSLTest_ES3, ConstructVectorFromNonFloat) { … } // Test that constructing non-float vectors from matrix types works. TEST_P(GLSLTest_ES3, ConstructNonFloatVectorFromMatrix) { … } // Test that == and != for vector and matrix types work. TEST_P(GLSLTest_ES3, NonScalarEqualOperator) { … } // Test that == and != for structs and array types work. TEST_P(GLSLTest_ES31, StructAndArrayEqualOperator) { … } // Test that an user-defined function with a large number of float4 parameters doesn't fail due to // the function name being too long. TEST_P(GLSLTest_ES3, LargeNumberOfFloat4Parameters) { … } // This test was written specifically to stress DeferGlobalInitializers AST transformation. // Test a shader where a global constant array is initialized with an expression containing array // indexing. This initializer is tricky to constant fold, so if it's not constant folded it needs to // be handled in a way that doesn't generate statements in the global scope in HLSL output. // Also includes multiple array initializers in one declaration, where only the second one has // array indexing. This makes sure that the qualifier for the declaration is set correctly if // transformations are applied to the declaration also in the case of ESSL output. TEST_P(GLSLTest_ES3, InitGlobalArrayWithArrayIndexing) { … } // Test that constant global matrix array with an initializer compiles. TEST_P(GLSLTest_ES3, InitConstantMatrixArray) { … } // Test that index-constant sampler array indexing is supported. TEST_P(GLSLTest, IndexConstantSamplerArrayIndexing) { … } // Test that the #pragma directive is supported and doesn't trigger a compilation failure on the // native driver. The only pragma that gets passed to the OpenGL driver is "invariant" but we don't // want to test its behavior, so don't use any varyings. TEST_P(GLSLTest, PragmaDirective) { … } // Sequence operator evaluates operands from left to right (ESSL 3.00 section 5.9). // The function call that returns the array needs to be evaluated after ++j for the expression to // return the correct value (true). TEST_P(GLSLTest_ES3, SequenceOperatorEvaluationOrderArray) { … } // Sequence operator evaluates operands from left to right (ESSL 3.00 section 5.9). // The short-circuiting expression needs to be evaluated after ++j for the expression to return the // correct value (true). TEST_P(GLSLTest_ES3, SequenceOperatorEvaluationOrderShortCircuit) { … } // Sequence operator evaluates operands from left to right (ESSL 3.00 section 5.9). // Indexing the vector needs to be evaluated after func() for the right result. TEST_P(GLSLTest_ES3, SequenceOperatorEvaluationOrderDynamicVectorIndexingInLValue) { … } // Test that using gl_PointCoord with GL_TRIANGLES doesn't produce a link error. // From WebGL test conformance/rendering/point-specific-shader-variables.html // See http://anglebug.com/42260376 TEST_P(GLSLTest, RenderTrisWithPointCoord) { … } // Convers a bug with the integer pow statement workaround. TEST_P(GLSLTest, NestedPowStatements) { … } // This test covers a crash seen in an application during SPIR-V compilation TEST_P(GLSLTest_ES3, NestedPowFromUniform) { … } // Test that -float calculation is correct. TEST_P(GLSLTest_ES3, UnaryMinusOperatorFloat) { … } // Test that atan(vec2, vec2) calculation is correct. TEST_P(GLSLTest_ES3, AtanVec2) { … } // Convers a bug with the unary minus operator on signed integer workaround. TEST_P(GLSLTest_ES3, UnaryMinusOperatorSignedInt) { … } // Convers a bug with the unary minus operator on unsigned integer workaround. TEST_P(GLSLTest_ES3, UnaryMinusOperatorUnsignedInt) { … } // Test a nested sequence operator with a ternary operator inside. The ternary operator is // intended to be such that it gets converted to an if statement on the HLSL backend. TEST_P(GLSLTest, NestedSequenceOperatorWithTernaryInside) { … } // Test that nesting ternary and short-circuitting operators work. TEST_P(GLSLTest, NestedTernaryAndShortCircuit) { … } // Test that uniform bvecN passed to functions work. TEST_P(GLSLTest_ES3, UniformBoolVectorPassedToFunctions) { … } // Test that bvecN in storage buffer passed to functions work. TEST_P(GLSLTest_ES31, StorageBufferBoolVectorPassedToFunctions) { … } // Test that using a sampler2D and samplerExternalOES in the same shader works // (anglebug.com/42260512) TEST_P(GLSLTest, ExternalAnd2DSampler) { … } // Tests that monomorphizing functions does not crash if there is a main prototype. TEST_P(GLSLTest, MonomorphizeMainPrototypeNoCrash) { … } // Test that using a varying matrix array is supported. TEST_P(GLSLTest, VaryingMatrixArray) { … } // Test that using a centroid varying matrix array is supported. TEST_P(GLSLTest_ES3, CentroidVaryingMatrixArray) { … } // Test that using a flat varying matrix array is supported. TEST_P(GLSLTest_ES3, FlatVaryingMatrixArray) { … } // Test that literal infinity can be written out from the shader translator. // A similar test can't be made for NaNs, since ESSL 3.00.6 requirements for NaNs are very loose. TEST_P(GLSLTest_ES3, LiteralInfinityOutput) { … } // Test that literal negative infinity can be written out from the shader translator. // A similar test can't be made for NaNs, since ESSL 3.00.6 requirements for NaNs are very loose. TEST_P(GLSLTest_ES3, LiteralNegativeInfinityOutput) { … } // The following MultipleDeclaration* tests are testing TranslatorHLSL specific simplification // passes. Because the interaction of multiple passes must be tested, it is difficult to write // a unittest for them. Instead we add the tests as end2end so will in particular test // TranslatorHLSL when run on Windows. // Test that passes splitting multiple declarations and comma operators are correctly ordered. TEST_P(GLSLTest_ES3, MultipleDeclarationWithCommaOperator) { … } // Test that passes splitting multiple declarations and comma operators and for loops are // correctly ordered. TEST_P(GLSLTest_ES3, MultipleDeclarationWithCommaOperatorInForLoop) { … } // Test that splitting multiple declaration in for loops works with no loop condition TEST_P(GLSLTest_ES3, MultipleDeclarationInForLoopEmptyCondition) { … } // Test that splitting multiple declaration in for loops works with no loop expression TEST_P(GLSLTest_ES3, MultipleDeclarationInForLoopEmptyExpression) { … } // Test that dynamic indexing of a matrix inside a dynamic indexing of a vector in an l-value works // correctly. TEST_P(GLSLTest_ES3, NestedDynamicIndexingInLValue) { … } class WebGLGLSLTest : public GLSLTest { … }; class WebGL2GLSLTest : public GLSLTest { … }; TEST_P(WebGLGLSLTest, MaxVaryingVec4PlusFragCoord) { … } TEST_P(WebGLGLSLTest, MaxVaryingVec4PlusPointCoord) { … } TEST_P(WebGLGLSLTest, MaxPlusOneVaryingVec3) { … } TEST_P(WebGLGLSLTest, MaxPlusOneVaryingVec3Array) { … } TEST_P(WebGLGLSLTest, MaxVaryingVec3AndOneVec2) { … } TEST_P(WebGLGLSLTest, MaxPlusOneVaryingVec2) { … } TEST_P(WebGLGLSLTest, MaxVaryingVec3ArrayAndMaxPlusOneFloatArray) { … } // Test that FindLSB and FindMSB return correct values in their corner cases. TEST_P(GLSLTest_ES31, FindMSBAndFindLSBCornerCases) { … } // Test that writing into a swizzled vector that is dynamically indexed succeeds. TEST_P(GLSLTest_ES3, WriteIntoDynamicIndexingOfSwizzledVector) { … } // Test including Ternary using a uniform block is correctly // expanded. TEST_P(GLSLTest_ES3, NamelessUniformBlockTernary) { … } // Test that uniform block variables work as comma expression results. TEST_P(GLSLTest_ES3, UniformBlockCommaExpressionResult) { … } // Test that the length() method is correctly translated in Vulkan atomic counter buffer emulation. TEST_P(GLSLTest_ES31, AtomicCounterArrayLength) { … } // Test that inactive images don't cause any errors. TEST_P(GLSLTest_ES31, InactiveImages) { … } // Test that inactive atomic counters don't cause any errors. TEST_P(GLSLTest_ES31, InactiveAtomicCounters) { … } // Test that inactive samplers in structs don't cause any errors. TEST_P(GLSLTest_ES31, InactiveSamplersInStructCS) { … } // Test that array indices for arrays of arrays of basic types work as expected. TEST_P(GLSLTest_ES31, ArraysOfArraysBasicType) { … } // Test that array indices for arrays of arrays of basic types work as expected // inside blocks. TEST_P(GLSLTest_ES31, ArraysOfArraysBlockBasicType) { … } // Test that arrays of arrays of samplers work as expected. TEST_P(GLSLTest_ES31, ArraysOfArraysSampler) { … } // Test that arrays of arrays of images work as expected. TEST_P(GLSLTest_ES31, ArraysOfArraysImage) { … } // Test that multiple arrays of arrays of images work as expected. TEST_P(GLSLTest_ES31, ConsecutiveArraysOfArraysImage) { … } // Test that arrays of arrays of images of r32f format work when passed to functions. TEST_P(GLSLTest_ES31, ArraysOfArraysOfR32fImages) { … } // Check that imageLoad gives the correct color after clearing the texture -- anglebug.com/42265826 TEST_P(GLSLTest_ES31, ImageLoadAfterClear) { … } // Check that writeonly image2D handles can be passed as function args. TEST_P(GLSLTest_ES31, WriteOnlyImage2DAsFunctionArg) { … } // Check that readonly image2D handles can be passed as function args. TEST_P(GLSLTest_ES31, ReadOnlyImage2DAsFunctionArg) { … } // Check that the volatile keyword combined with memoryBarrierImage() allow load/store from // different aliases of the same image -- anglebug.com/42265813 // // ES 3.1 requires most image formats to be either readonly or writeonly. (It appears that this // limitation exists due to atomics, since we still have the volatile keyword and the built-in // memoryBarrierImage(), which ought to allow us to load and store different aliases of the same // image.) To test this, we create two aliases of the same image -- one for reading and one for // writing. TEST_P(GLSLTest_ES31, AliasedLoadStore) { … } // Test that structs containing arrays of samplers work as expected. TEST_P(GLSLTest_ES31, StructArraySampler) { … } // Test that arrays of arrays of samplers inside structs work as expected. TEST_P(GLSLTest_ES31, StructArrayArraySampler) { … } // Test that an array of structs with arrays of arrays of samplers works. TEST_P(GLSLTest_ES31, ArrayStructArrayArraySampler) { … } // Test that a complex chain of structs and arrays of samplers works as expected. TEST_P(GLSLTest_ES31, ComplexStructArraySampler) { … } TEST_P(GLSLTest_ES31, ArraysOfArraysStructDifferentTypesSampler) { … } // Test that arrays of arrays of samplers as parameters works as expected. TEST_P(GLSLTest_ES31, ParameterArraysOfArraysSampler) { … } // Test that structs with arrays of arrays of samplers as parameters works as expected. TEST_P(GLSLTest_ES31, ParameterStructArrayArraySampler) { … } // Test that arrays of arrays of structs with arrays of arrays of samplers // as parameters works as expected. TEST_P(GLSLTest_ES31, ParameterArrayArrayStructArrayArraySampler) { … } // Test that 3D arrays with sub-arrays passed as parameters works as expected. TEST_P(GLSLTest_ES31, ParameterArrayArrayArraySampler) { … } // Test that names do not collide when translating arrays of arrays of samplers. TEST_P(GLSLTest_ES31, ArraysOfArraysNameCollisionSampler) { … } // Test that regular arrays are unmodified. TEST_P(GLSLTest_ES31, BasicTypeArrayAndArrayOfSampler) { … } // This test covers a bug (and associated workaround) with nested sampling operations in the HLSL // compiler DLL. TEST_P(GLSLTest_ES3, NestedSamplingOperation) { … } // Tests that using a constant declaration as the only statement in a for loop without curly braces // doesn't crash. TEST_P(GLSLTest, ConstantStatementInForLoop) { … } // Tests that using a constant declaration as a loop init expression doesn't crash. Note that this // test doesn't work on D3D9 due to looping limitations, so it is only run on ES3. TEST_P(GLSLTest_ES3, ConstantStatementAsLoopInit) { … } // Tests that using a constant condition guarding a discard works // Covers a failing case in the Vulkan backend: http://anglebug.com/42265506 TEST_P(GLSLTest_ES3, ConstantConditionGuardingDiscard) { … } // Tests that nesting a discard in unconditional blocks works // Covers a failing case in the Vulkan backend: http://anglebug.com/42265506 TEST_P(GLSLTest_ES3, NestedUnconditionalDiscards) { … } // Test that uninitialized local variables are initialized to 0. TEST_P(WebGL2GLSLTest, InitUninitializedLocals) { … } // Test that uninitialized structs containing arrays of structs are initialized to 0. This // specifically tests with two different struct variables declared in the same block. TEST_P(WebGL2GLSLTest, InitUninitializedStructContainingArrays) { … } // Verify that two shaders with the same uniform name and members but different structure names will // not link. TEST_P(GLSLTest, StructureNameMatchingTest) { … } // Test that an uninitialized nameless struct inside a for loop init statement works. TEST_P(WebGL2GLSLTest, UninitializedNamelessStructInForInitStatement) { … } // Test that uninitialized global variables are initialized to 0. TEST_P(WebGLGLSLTest, InitUninitializedGlobals) { … } // Test that an uninitialized nameless struct in the global scope works. TEST_P(WebGLGLSLTest, UninitializedNamelessStructInGlobalScope) { … } // Test that uninitialized output arguments are initialized to 0. TEST_P(WebGL2GLSLTest, InitOutputParams) { … } // Tests nameless struct uniforms. TEST_P(GLSLTest, EmbeddedStructUniform) { … } // Tests nameless struct uniform arrays. TEST_P(GLSLTest, EmbeddedStructUniformArray) { … } // Test that samplers in structs can be extracted if the first reference to the struct does not // select an attribute. TEST_P(GLSLTest, SamplerInStructNoMemberIndexing) { … } // Similar test to SamplerInStructNoMemberIndexing, but the struct variable is an array. TEST_P(GLSLTest, SamplerInStructArrayNoMemberIndexing) { … } // Tests that rewriting samplers in structs doesn't mess up indexing. TEST_P(GLSLTest, SamplerInStructMemberIndexing) { … } // Tests that rewriting samplers in structs works when passed as function argument. In this test, // the function references another struct, which is not being modified. Regression test for AST // validation applied to a multipass transformation, where references to declarations were attempted // to be validated without having the entire shader. In this case, the reference to S2 was flagged // as invalid because S2's declaration was not visible. TEST_P(GLSLTest, SamplerInStructAsFunctionArg) { … } // Test that structs with samplers are not allowed in interface blocks. This is forbidden per // GLES3: // // > Types and declarators are the same as for other uniform variable declarations outside blocks, // > with these exceptions: // > * opaque types are not allowed TEST_P(GLSLTest_ES3, StructWithSamplersDisallowedInInterfaceBlock) { … } // Tests two nameless struct uniforms. TEST_P(GLSLTest, TwoEmbeddedStructUniforms) { … } // Test that a loop condition that has an initializer declares a variable. TEST_P(GLSLTest_ES3, ConditionInitializerDeclaresVariable) { … } // Test that a variable hides a user-defined function with the same name after its initializer. // GLSL ES 1.00.17 section 4.2.2: "A variable declaration is visible immediately following the // initializer if present, otherwise immediately following the identifier" TEST_P(GLSLTest, VariableHidesUserDefinedFunctionAfterInitializer) { … } // Test that structs with identical members are not ambiguous as function arguments. TEST_P(GLSLTest, StructsWithSameMembersDisambiguatedByName) { … } // Test that an inactive varying in vertex shader but used in fragment shader can be linked // successfully. TEST_P(GLSLTest, InactiveVaryingInVertexActiveInFragment) { … } // Test that a varying struct that's not statically used in the fragment shader works. // GLSL ES 3.00.6 section 4.3.10. TEST_P(GLSLTest_ES3, VaryingStructNotStaticallyUsedInFragmentShader) { … } // Test that inactive shader IO block varying are ok. TEST_P(GLSLTest_ES31, InactiveVaryingIOBlock) { … } // Test that a shader IO block varying that's not declared in the fragment shader links // successfully. TEST_P(GLSLTest_ES31, VaryingIOBlockNotDeclaredInFragmentShader) { … } // Test that a shader IO block varying that's not declared in the vertex shader links // successfully. TEST_P(GLSLTest_ES31, VaryingIOBlockNotDeclaredInVertexShader) { … } // Test that a shader with sample in / sample out can be linked successfully. TEST_P(GLSLTest_ES31, VaryingTessellationSampleInAndOut) { … } // Test that `smooth sample` and `flat sample` pass the validation. TEST_P(GLSLTest_ES3, AliasedSampleQualifiers) { … } // Test that `noperspective centroid` passes the validation and compiles. TEST_P(GLSLTest_ES3, NoPerspectiveCentroid) { … } // Test that `noperspective sample` passes the validation and compiles. TEST_P(GLSLTest_ES3, NoPerspectiveSample) { … } // Test that a shader with sample in / sample out can be used successfully when the varying // precision is different between VS and FS. TEST_P(GLSLTest_ES31, VaryingSampleInAndOutDifferentPrecision) { … } // Test that a shader IO block varying whose block name is declared multiple(in/out) time links // successfully. TEST_P(GLSLTest_ES31, VaryingIOBlockDeclaredAsInAndOut) { … } void GLSLTest_ES31::testTessellationTextureBufferAccess(const APIExtensionVersion usedExtension) { … } // Test that texture buffers can be accessed in a tessellation stage (using EXT) TEST_P(GLSLTest_ES31, TessellationTextureBufferAccessEXT) { … } // Test that texture buffers can be accessed in a tessellation stage (using OES) TEST_P(GLSLTest_ES31, TessellationTextureBufferAccessOES) { … } // Test that a varying struct that's not declared in the fragment shader links successfully. // GLSL ES 3.00.6 section 4.3.10. TEST_P(GLSLTest_ES3, VaryingStructNotDeclaredInFragmentShader) { … } // Test that a varying struct that's not declared in the vertex shader, and is unused in the // fragment shader links successfully. TEST_P(GLSLTest_ES3, VaryingStructNotDeclaredInVertexShader) { … } // Test that a varying struct that's not initialized in the vertex shader links successfully. TEST_P(WebGL2GLSLTest, VaryingStructNotInitializedInVertexShader) { … } // Test that a varying struct that gets used in the fragment shader works. TEST_P(GLSLTest_ES3, VaryingStructUsedInFragmentShader) { … } // This is a regression test to make sure a red quad is rendered without issues // when a passthrough function with a vec3 input parameter is used in the fragment shader. TEST_P(GLSLTest_ES31, SamplerPassthroughFailedLink) { … } // This is a regression test to make sure a red quad is rendered without issues // when a passthrough function with a vec4 input parameter is used in the fragment shader. TEST_P(GLSLTest_ES31, SamplerPassthroughIncorrectColor) { … } // Test that multiple multi-field varying structs that get used in the fragment shader work. TEST_P(GLSLTest_ES3, ComplexVaryingStructsUsedInFragmentShader) { … } // Test that an inactive varying array that doesn't get used in the fragment shader works. TEST_P(GLSLTest_ES3, InactiveVaryingArrayUnusedInFragmentShader) { … } // Test that an inactive varying struct that doesn't get used in the fragment shader works. TEST_P(GLSLTest_ES3, InactiveVaryingStructUnusedInFragmentShader) { … } // Test that multiple varying matrices that get used in the fragment shader work. TEST_P(GLSLTest_ES3, VaryingMatrices) { … } // This test covers passing a struct containing a sampler as a function argument. TEST_P(GLSLTest, StructsWithSamplersAsFunctionArg) { … } // This test covers passing a struct containing a sampler as a function argument. TEST_P(GLSLTest, StructsWithSamplersAsFunctionArgWithPrototype) { … } // This test covers passing a struct containing a sampler as a function argument, where the function // has non-return branch statements. TEST_P(GLSLTest_ES3, StructsWithSamplersAsFunctionArgWithBranch) { … } // This test covers passing an array of structs containing samplers as a function argument. TEST_P(GLSLTest, ArrayOfStructsWithSamplersAsFunctionArg) { … } // This test covers passing a struct containing an array of samplers as a function argument. TEST_P(GLSLTest, StructWithSamplerArrayAsFunctionArg) { … } // This test covers passing nested structs containing a sampler as a function argument. TEST_P(GLSLTest, NestedStructsWithSamplersAsFunctionArg) { … } // This test covers passing a compound structs containing a sampler as a function argument. TEST_P(GLSLTest, CompoundStructsWithSamplersAsFunctionArg) { … } // This test covers passing nested compound structs containing a sampler as a function argument. TEST_P(GLSLTest, NestedCompoundStructsWithSamplersAsFunctionArg) { … } // Same as the prior test but with reordered struct members. TEST_P(GLSLTest, MoreNestedCompoundStructsWithSamplersAsFunctionArg) { … } // Test that a global variable declared after main() works. This is a regression test for an issue // in global variable initialization. TEST_P(WebGLGLSLTest, GlobalVariableDeclaredAfterMain) { … } // Test calling array length() with a "this" expression having side effects inside a loop condition. // The spec says that sequence operator operands need to run in sequence. TEST_P(GLSLTest_ES3, ArrayLengthOnExpressionWithSideEffectsInLoopCondition) { … } // Test calling array length() with a "this" expression having side effects that interact with side // effects of another operand of the same sequence operator. The spec says that sequence operator // operands need to run in order from left to right (ESSL 3.00.6 section 5.9). TEST_P(GLSLTest_ES3, ArrayLengthOnExpressionWithSideEffectsInSequence) { … } // Test calling array length() with a "this" expression that also contains a call of array length(). // Both "this" expressions also have side effects. TEST_P(GLSLTest_ES3, NestedArrayLengthMethodsWithSideEffects) { … } // Test calling array length() with a "this" expression having side effects inside an if condition. // This is an issue if the the side effect can be short circuited. TEST_P(GLSLTest_ES3, ArrayLengthOnShortCircuitedExpressionWithSideEffectsInIfCondition) { … } // Test calling array length() with a "this" expression having side effects in a statement where the // side effect can be short circuited. TEST_P(GLSLTest_ES3, ArrayLengthOnShortCircuitedExpressionWithSideEffectsInStatement) { … } // Test that array length inside vector constructor works. TEST_P(GLSLTest_ES3, ArrayLengthInVectorConstructor) { … } // Test that array length inside vector constructor works in complex expression. TEST_P(GLSLTest_ES3, ArrayLengthInVectorConstructorComplex) { … } // Test that array length inside matrix constructor works. TEST_P(GLSLTest_ES3, ArrayLengthInMatrixConstructor) { … } // Test that array length inside vector constructor inside matrix constructor works. TEST_P(GLSLTest_ES3, ArrayLengthInVectorInMatrixConstructor) { … } // Test that statements inside switch() get translated to correct HLSL. TEST_P(GLSLTest_ES3, DifferentStatementsInsideSwitch) { … } // Test that switch fall-through works correctly. // This is a regression test for http://anglebug.com/40644631 TEST_P(GLSLTest_ES3, SwitchFallThroughCodeDuplication) { … } // Test switch/case where default is last. TEST_P(GLSLTest_ES3, SwitchWithDefaultAtTheEnd) { … } // Test that a switch statement with an empty block inside as a final statement compiles. TEST_P(GLSLTest_ES3, SwitchFinalCaseHasEmptyBlock) { … } // Test that a switch statement with an empty declaration inside as a final statement compiles. TEST_P(GLSLTest_ES3, SwitchFinalCaseHasEmptyDeclaration) { … } // Test switch/case where break/return statements are within blocks. TEST_P(GLSLTest_ES3, SwitchBreakOrReturnInsideBlocks) { … } // Test switch/case where a variable is declared inside one of the cases and is accessed by a // subsequent case. TEST_P(GLSLTest_ES3, SwitchWithVariableDeclarationInside) { … } // Test nested switch/case where a variable is declared inside one of the cases and is accessed by a // subsequent case. TEST_P(GLSLTest_ES3, NestedSwitchWithVariableDeclarationInside) { … } // Test that an empty switch/case statement is translated in a way that compiles and executes the // init-statement. TEST_P(GLSLTest_ES3, EmptySwitch) { … } // Test that an switch over a constant with mismatching cases works. TEST_P(GLSLTest_ES3, SwitchWithConstantExpr) { … } // Test that basic infinite loops are either rejected or are pruned in WebGL TEST_P(WebGL2GLSLTest, BasicInfiniteLoop) { … } // Test that while(true) loops with break/return are not rejected TEST_P(WebGL2GLSLTest, NotInfiniteLoop) { … } // Test that a constant struct inside an expression is handled correctly. TEST_P(GLSLTest_ES3, ConstStructInsideExpression) { … } // Test that a varying struct that's defined as a part of the declaration is handled correctly. TEST_P(GLSLTest_ES3, VaryingStructWithInlineDefinition) { … } // Test that multi variables struct should not crash in separated struct expressions. TEST_P(GLSLTest_ES3, VaryingStructWithInlineDefinition2) { … } // Test mismatched precision in varying is handled correctly. TEST_P(GLSLTest_ES3, MismatchPrecisionFloat) { … } // Test mismatched precision in varying is handled correctly. TEST_P(GLSLTest_ES3, MismatchPrecisionlowpFloat) { … } // Test mismatched precision in varying is handled correctly. TEST_P(GLSLTest_ES3, MismatchPrecisionVec2UnusedVarying) { … } // Test mismatched precision in varying is handled correctly. TEST_P(GLSLTest_ES3, MismatchPrecisionMedToHigh) { … } // Test vector/scalar arithmetic (in this case multiplication and addition). TEST_P(GLSLTest, VectorScalarMultiplyAndAddInLoop) { … } // Test vector/scalar arithmetic (in this case compound division and addition). TEST_P(GLSLTest, VectorScalarDivideAndAddInLoop) { … } // Test a fuzzer-discovered bug with the VectorizeVectorScalarArithmetic transformation. TEST_P(GLSLTest, VectorScalarArithmeticWithSideEffectInLoop) { … } // Test that packing of excessive 3-column variables does not overflow the count of 3-column // variables in VariablePacker TEST_P(WebGL2GLSLTest, ExcessiveMat3UniformPacking) { … } // Test that a varying with a flat qualifier that is used as an operand of a folded ternary operator // is handled correctly. TEST_P(GLSLTest_ES3, FlatVaryingUsedInFoldedTernary) { … } // Verify that the link error message from last link failure is cleared when the new link is // finished. TEST_P(GLSLTest, ClearLinkErrorLog) { … } // Verify that a valid program still draws correctly after a shader link error TEST_P(GLSLTest, DrawAfterShaderLinkError) { … } // Validate error messages when the link mismatch occurs on the type of a non-struct varying. TEST_P(GLSLTest, ErrorMessageOfVaryingMismatch) { … } // Validate error messages when the link mismatch occurs on the name of a varying field. TEST_P(GLSLTest_ES3, ErrorMessageOfVaryingStructFieldNameMismatch) { … } // Validate error messages when the link mismatch occurs on the type of a varying field. TEST_P(GLSLTest_ES3, ErrorMessageOfVaryingStructFieldMismatch) { … } // Validate error messages when the link mismatch occurs on the name of a struct member of a uniform // field. TEST_P(GLSLTest, ErrorMessageOfLinkUniformStructFieldNameMismatch) { … } // Validate error messages when the link mismatch occurs on the type of a non-struct uniform block // field. TEST_P(GLSLTest_ES3, ErrorMessageOfLinkInterfaceBlockFieldMismatch) { … } // Validate error messages when the link mismatch occurs on the type of a member of a uniform block // struct field. TEST_P(GLSLTest_ES3, ErrorMessageOfLinkInterfaceBlockStructFieldMismatch) { … } // Test a vertex shader that doesn't declare any varyings with a fragment shader that statically // uses a varying, but in a statement that gets trivially optimized out by the compiler. TEST_P(GLSLTest_ES3, FragmentShaderStaticallyUsesVaryingMissingFromVertex) { … } // Test a varying that is statically used but not active in the fragment shader. TEST_P(GLSLTest_ES3, VaryingStaticallyUsedButNotActiveInFragmentShader) { … } // Test that linking varyings by location works. TEST_P(GLSLTest_ES31, LinkVaryingsByLocation) { … } // Test nesting floor() calls with a large multiplier inside. TEST_P(GLSLTest_ES3, NestedFloorWithLargeMultiplierInside) { … } // Verify that a link error is generated when the sum of the number of active image uniforms and // active shader storage blocks in a rendering pipeline exceeds // GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES. TEST_P(GLSLTest_ES31, ExceedCombinedShaderOutputResourcesInVSAndFS) { … } // Test that assigning an assignment expression to a swizzled vector field in a user-defined // function works correctly. TEST_P(GLSLTest_ES3, AssignToSwizzled) { … } // Similar to AssignToSwizzled, but uses other assignment operators than `=`. TEST_P(GLSLTest_ES3, AssignToSwizzled2) { … } // Test a fragment shader that returns inside if (that being the only branch that actually gets // executed). Regression test for http://anglebug.com/42261034 TEST_P(GLSLTest, IfElseIfAndReturn) { … } // Test that if-else blocks whose contents get pruned due to compile-time constant conditions work. TEST_P(GLSLTest, IfElsePrunedBlocks) { … } // Tests that PointCoord behaves the same betweeen a user FBO and the back buffer. TEST_P(GLSLTest, PointCoordConsistency) { … } bool SubrectEquals(const std::vector<GLColor> &bigArray, const std::vector<GLColor> &smallArray, int bigSize, int offset, int smallSize) { … } // Tests that FragCoord behaves the same betweeen a user FBO and the back buffer. TEST_P(GLSLTest, FragCoordConsistency) { … } // Ensure that using defined in a macro works in this simple case. This mirrors a dEQP test. TEST_P(GLSLTest, DefinedInMacroSucceeds) { … } // Validate the defined operator is evaluated when the macro is called, not when defined. TEST_P(GLSLTest, DefinedInMacroWithUndef) { … } // Validate the defined operator is evaluated when the macro is called, not when defined. TEST_P(GLSLTest, DefinedAfterMacroUsage) { … } // Test generating "defined" by concatenation when a macro is called. This is not allowed. TEST_P(GLSLTest, DefinedInMacroConcatenationNotAllowed) { … } // Test using defined in a macro parameter name. This is not allowed. TEST_P(GLSLTest, DefinedAsParameterNameNotAllowed) { … } // Ensure that defined in a macro is no accepted in WebGL. TEST_P(WebGLGLSLTest, DefinedInMacroFails) { … } // Simple test using a define macro in WebGL. TEST_P(WebGLGLSLTest, DefinedGLESSymbol) { … } // Test that inactive output variables compile ok in combination with initOutputVariables // (which is enabled on WebGL). TEST_P(WebGL2GLSLTest, InactiveOutput) { … } // Test that clamp applied on non-literal indices is correct on es 100 shaders. TEST_P(GLSLTest, ValidIndexClampES100) { … } // Test that clamp applied on non-literal indices is correct on es 300 shaders. TEST_P(GLSLTest_ES3, ValidIndexClampES300) { … } // Tests constant folding of non-square 'matrixCompMult'. TEST_P(GLSLTest_ES3, NonSquareMatrixCompMult) { … } // Test initializing an array with the same name of previously declared array TEST_P(GLSLTest_ES3, InitSameNameArray) { … } // Tests using gl_FragData[0] instead of gl_FragColor. TEST_P(GLSLTest, FragData) { … } // Tests using gl_FragData[0] instead of gl_FragColor with GL_SAMPLE_ALPHA_TO_COVERAGE // Regression test for https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5520 TEST_P(GLSLTest, FragData_AlphaToCoverage) { … } // Test angle can handle big initial stack size with dynamic stack allocation. TEST_P(GLSLTest, MemoryExhaustedTest) { … } // Test that inactive samplers in structs don't cause any errors. TEST_P(GLSLTest, InactiveSamplersInStruct) { … } // Helper functions for MixedRowAndColumnMajorMatrices* tests // Round up to alignment, assuming it's a power of 2 uint32_t RoundUpPow2(uint32_t value, uint32_t alignment) { … } void CreateOutputBuffer(GLBuffer *buffer, uint32_t binding) { … } // Fill provided buffer with matrices based on the given dimensions. The buffer should be large // enough to accomodate the data. uint32_t FillBuffer(const std::pair<uint32_t, uint32_t> matrixDims[], const bool matrixIsColMajor[], size_t matrixCount, float data[], bool isStd430, bool isTransposed) { … } // Initialize and bind the buffer. template <typename T> void InitBuffer(GLuint program, const char *name, GLuint buffer, uint32_t bindingIndex, const T data[], uint32_t dataSize, bool isUniform) { … } // Verify that buffer data is written by the shader as expected. template <typename T> bool VerifyBuffer(GLuint buffer, const T data[], uint32_t dataSize) { … } // Verify that the success output of the shader is as expected. bool VerifySuccess(GLuint buffer) { … } // Test reading from UBOs and SSBOs and writing to SSBOs with mixed row- and colum-major layouts in // both std140 and std430 layouts. Tests many combinations of std140 vs std430, struct being used // as row- or column-major in different UBOs, reading from UBOs and SSBOs and writing to SSBOs, // nested structs, matrix arrays, inout parameters etc. // // Some very specific corner cases that are not covered here are tested in the subsequent tests. TEST_P(GLSLTest_ES31, MixedRowAndColumnMajorMatrices) { … } // Test that array UBOs are transformed correctly. TEST_P(GLSLTest_ES3, RowMajorMatrix_ReadMat4Test) { … } // Test that array UBOs are transformed correctly. TEST_P(GLSLTest_ES3, RowMajorMatrix_ReadMat2x3Test) { … } TEST_P(GLSLTest_ES3, RowMajorMatrix_ReadMat3x2Test) { … } TEST_P(GLSLTest_ES3, RowMajorMatrix_NestedExpression) { … } // Test that array UBOs are transformed correctly. TEST_P(GLSLTest_ES3, MixedRowAndColumnMajorMatrices_ArrayBufferDeclaration) { … } // Test that side effects when transforming read operations are preserved. TEST_P(GLSLTest_ES3, MixedRowAndColumnMajorMatrices_ReadSideEffect) { … } // Test that side effects respect the order of logical expression operands. TEST_P(GLSLTest_ES3, MixedRowAndColumnMajorMatrices_ReadSideEffectOrder) { … } TEST_P(GLSLTest_ES3, MixedRowAndColumnMajorMatrices_ReadSideEffectOrderSurroundedByLoop) { … } TEST_P(GLSLTest_ES3, MixedRowAndColumnMajorMatrices_ReadSideEffectOrderInALoop) { … } // Test that side effects respect short-circuit. TEST_P(GLSLTest_ES3, MixedRowAndColumnMajorMatrices_ReadSideEffectShortCircuit) { … } // Test that indexing swizzles out of bounds fails TEST_P(GLSLTest_ES3, OutOfBoundsIndexingOfSwizzle) { … } // Test that indexing l-value swizzles work TEST_P(GLSLTest_ES3, IndexingOfSwizzledLValuesShouldWork) { … } // Test that indexing r-value swizzles work TEST_P(GLSLTest_ES3, IndexingOfSwizzledRValuesShouldWork) { … } // Test that dynamic indexing of swizzled l-values should work. // A simple porting of sdk/tests/conformance2/glsl3/vector-dynamic-indexing-swizzled-lvalue.html TEST_P(GLSLTest_ES3, DynamicIndexingOfSwizzledLValuesShouldWork) { … } // Another test for dynamic indexing of swizzled l-values. TEST_P(GLSLTest_ES3, DynamicIndexingOfSwizzledLValuesShouldWork2) { … } // Test that dead code after discard, return, continue and branch are pruned. TEST_P(GLSLTest_ES3, DeadCodeIsPruned) { … } // Regression test based on fuzzer issue. If a case has statements that are pruned, and those // pruned statements in turn have branches, and another case follows, a prior implementation of // dead-code elimination doubly pruned some statements. TEST_P(GLSLTest_ES3, DeadCodeBranchInPrunedStatementsInCaseBeforeAnotherCase) { … } // Test shader with all resources (default uniform, UBO, SSBO, image, sampler and atomic counter) to // make sure they are all linked ok. The front-end sorts these resources and traverses the list of // "uniforms" to find the range for each resource. A bug there was causing some resource ranges to // be empty in the presence of other resources. TEST_P(GLSLTest_ES31, MixOfAllResources) { … } // Test that sending mixture of resources to functions works. TEST_P(GLSLTest_ES31, MixOfResourcesAsFunctionArgs) { … } // Test that array of array of samplers used as function parameter with an index that has a // side-effect works. TEST_P(GLSLTest_ES31, ArrayOfArrayOfSamplerAsFunctionParameterIndexedWithSideEffect) { … } void GLSLTest_ES31::testArrayOfArrayOfSamplerDynamicIndex(const APIExtensionVersion usedExtension) { … } // Test that array of array of samplers can be indexed correctly with dynamic indices. TEST_P(GLSLTest_ES31, ArrayOfArrayOfSamplerDynamicIndexEXT) { … } // Test that array of array of samplers can be indexed correctly with dynamic indices. TEST_P(GLSLTest_ES31, ArrayOfArrayOfSamplerDynamicIndexOES) { … } // Test that array of array of samplers can be indexed correctly with dynamic indices. Uses // samplers in structs. TEST_P(GLSLTest_ES31, ArrayOfArrayOfSamplerInStructDynamicIndex) { … } // Test that array of array of samplers work when indexed with an expression that's derived from an // array of array of samplers. TEST_P(GLSLTest_ES31, ArrayOfArrayOfSamplerIndexedWithArrayOfArrayOfSamplers) { … } // Test that multiple nested assignments are handled correctly. TEST_P(GLSLTest_ES31, MixedRowAndColumnMajorMatrices_WriteSideEffect) { … } // Test that assignments to array of array of matrices are handled correctly. TEST_P(GLSLTest_ES31, MixedRowAndColumnMajorMatrices_WriteArrayOfArray) { … } // Verify that types used differently (in different block storages, differently qualified etc) work // when copied around. TEST_P(GLSLTest_ES31, TypesUsedInDifferentBlockStorages) { … } // Verify that bool in interface blocks work. TEST_P(GLSLTest_ES31, BoolInInterfaceBlocks) { … } // Verify that ternary operator works when the operands are matrices used in different block // storage. TEST_P(GLSLTest_ES31, TernaryOnMatricesInDifferentBlockStorages) { … } // Verify that ternary operator works when the operands are structs used in different block // storage. TEST_P(GLSLTest_ES31, TernaryOnStructsInDifferentBlockStorages) { … } // Verify that uint in interface block cast to bool works. TEST_P(GLSLTest_ES3, UintCastToBoolFromInterfaceBlocks) { … } // Test that the precise keyword is not reserved before ES3.1. TEST_P(GLSLTest_ES3, PreciseNotReserved) { … } // Test that the precise keyword is reserved on ES3.0 without GL_EXT_gpu_shader5. TEST_P(GLSLTest_ES31, PreciseReservedWithoutExtension) { … } // Test that reusing the same variable name for different uses across stages links fine. The SPIR-V // transformation should ignore all names for non-shader-interface variables and not get confused by // them. TEST_P(GLSLTest_ES31, VariableNameReuseAcrossStages) { … } // Test that reusing the same uniform variable name for different uses across stages links fine. TEST_P(GLSLTest_ES31, UniformVariableNameReuseAcrossStages) { … } // Verify that precision match validation of uniforms is performed only if they are statically used TEST_P(GLSLTest_ES31, UniformPrecisionMatchValidation) { … } // Validate that link fails when two instanceless interface blocks with different block names but // same field names are present. TEST_P(GLSLTest_ES31, AmbiguousInstancelessInterfaceBlockFields) { … } // Verify I/O block array locations TEST_P(GLSLTest_ES31, IOBlockLocations) { … } // Test using builtins that can only be redefined with gl_PerVertex TEST_P(GLSLTest_ES31, PerVertexRedefinition) { … } // Negative test using builtins that can only be used when redefining gl_PerVertex TEST_P(GLSLTest_ES31, PerVertexNegativeTest) { … } // Negative test using builtins that can only be used when redefining gl_PerVertex // but have the builtins in a differently named struct TEST_P(GLSLTest_ES31, PerVertexRenamedNegativeTest) { … } // Test varying packing in presence of multiple I/O blocks TEST_P(GLSLTest_ES31, MultipleIOBlocks) { … } // Test varying packing in presence of I/O block arrays TEST_P(GLSLTest_ES31, IOBlockArray) { … } // Validate that link fails with I/O block member name mismatches. TEST_P(GLSLTest_ES31, NegativeIOBlocksLinkMemberNameMismatch) { … } // Validate that link fails with I/O block member array size mismatches. TEST_P(GLSLTest_ES31, NegativeIOBlocksLinkMemberArraySizeMismatch) { … } // Validate that link fails with I/O block member type mismatches. TEST_P(GLSLTest_ES31, NegativeIOBlocksLinkMemberTypeMismatch) { … } // Validate that link fails with I/O block location mismatches TEST_P(GLSLTest_ES31, NegativeIOBlocksLinkLocationMismatch) { … } // Validate that link fails with I/O block member location mismatches TEST_P(GLSLTest_ES31, NegativeIOBlocksLinkMemberLocationMismatch) { … } // Validate that link fails with I/O block member struct name mismatches. TEST_P(GLSLTest_ES31, NegativeIOBlocksLinkMemberStructNameMismatch) { … } // Validate that link fails with I/O block member struct member name mismatches. TEST_P(GLSLTest_ES31, NegativeIOBlocksLinkMemberStructMemberNameMismatch) { … } // Validate that link fails with I/O block member struct member type mismatches. TEST_P(GLSLTest_ES31, NegativeIOBlocksLinkMemberStructMemberTypeMismatch) { … } // Validate that link fails with I/O block member struct member array size mismatches. TEST_P(GLSLTest_ES31, NegativeIOBlocksLinkMemberStructMemberArraySizeMismatch) { … } // Validate that link fails with I/O block member struct member count mismatches. TEST_P(GLSLTest_ES31, NegativeIOBlocksLinkMemberStructMemberCountMismatch) { … } // Validate that link fails with I/O block member nested struct mismatches. TEST_P(GLSLTest_ES31, NegativeIOBlocksLinkMemberNestedStructMismatch) { … } // Test that separating declarators works with structs that have been separately defined. TEST_P(GLSLTest_ES31, SeparateDeclaratorsOfStructType) { … } // Test that separating declarators works with structs that are simultaneously defined. TEST_P(GLSLTest_ES31, SeparateDeclaratorsOfStructTypeBeingSpecified) { … } // Test that separating declarators works with structs that are simultaneously defined and that are // nameless. TEST_P(GLSLTest_ES31, SeparateDeclaratorsOfNamelessStructType) { … } // Regression test for transformation bug which separates struct declarations from uniform // declarations. The bug was that the uniform variable usage in the initializer of a new // declaration (y below) was not being processed. TEST_P(GLSLTest, UniformStructBug) { … } // Regression test for transformation bug which separates struct declarations from uniform // declarations. The bug was that the arrayness of the declaration was not being applied to the // replaced uniform variable. TEST_P(GLSLTest_ES31, UniformStructBug2) { … } // Regression test based on fuzzer issue resulting in an AST validation failure. Struct definition // was not found in the tree. Tests that struct declaration in function return value is visible to // instantiations later on. TEST_P(GLSLTest, MissingStructDeclarationBug) { … } // Regression test based on fuzzer issue resulting in an AST validation failure. Struct definition // was not found in the tree. Tests that struct declaration in function return value is visible to // other struct declarations. TEST_P(GLSLTest, MissingStructDeclarationBug2) { … } // Regression test for bug in HLSL code generation where the for loop init expression was expected // to always have an initializer. TEST_P(GLSLTest, HandleExcessiveLoopBug) { … } // Regression test for a validation bug in the translator where func(void, int) was accepted even // though it's illegal, and the function was callable as if the void parameter isn't there. TEST_P(GLSLTest, NoParameterAfterVoid) { … } // Similar to NoParameterAfterVoid, but tests func(void, void). TEST_P(GLSLTest, NoParameterAfterVoid2) { … } // Test that providing more components to a matrix constructor than necessary works. Based on a // clusterfuzz test that caught an OOB array write in glslang. TEST_P(GLSLTest, MatrixConstructor) { … } // Test constructors without precision TEST_P(GLSLTest, ConstructFromBoolVector) { … } // Test constructing vector from matrix TEST_P(GLSLTest, VectorConstructorFromMatrix) { … } // Test constructing matrix from vectors TEST_P(GLSLTest, MatrixConstructorFromVectors) { … } // Test that constructing vector and matrix inside multiple declarations preserves the correct order // of operations. TEST_P(GLSLTest, ConstructorinSequenceOperator) { … } // Test that constructing vectors inside multiple declarations preserves the correct order // of operations. TEST_P(GLSLTest, VectorConstructorsInMultiDeclaration) { … } // Test complex constructor usage. TEST_P(GLSLTest_ES3, ComplexConstructor) { … } // Test that scalar(nonScalar) constructors work. TEST_P(GLSLTest_ES3, ScalarConstructor) { … } // Test that initializing global variables with non-constant values work TEST_P(GLSLTest_ES3, InitGlobalNonConstant) { … } // Test that initializing global variables with complex constants work TEST_P(GLSLTest_ES3, InitGlobalComplexConstant) { … } // Test that built-ins with out parameters work TEST_P(GLSLTest_ES31, BuiltInsWithOutParameters) { … } // Test that interpolateAt* work with swizzle. This test is disabled as swizzled interpolants are // only allowed in desktop GLSL. TEST_P(GLSLTest_ES31, InterpolateAtWithSwizzle) { … } class GLSLTestLoops : public GLSLTest { … }; // Test basic for loops TEST_P(GLSLTestLoops, BasicFor) { … } // Test for loop without condition TEST_P(GLSLTestLoops, ForNoCondition) { … } // Test for loop without init and expression TEST_P(GLSLTestLoops, ForNoInitConditionOrExpression) { … } // Test for loop with continue TEST_P(GLSLTestLoops, ForContinue) { … } // Test for loop with continue at the end of block TEST_P(GLSLTestLoops, ForUnconditionalContinue) { … } // Test for loop with break at the end of block TEST_P(GLSLTestLoops, ForUnconditionalBreak) { … } // Test for loop with break and continue TEST_P(GLSLTestLoops, ForBreakContinue) { … } // Test basic while loops TEST_P(GLSLTestLoops, BasicWhile) { … } // Test while loops with continue TEST_P(GLSLTestLoops, WhileContinue) { … } // Test while loops with continue at the end of block TEST_P(GLSLTestLoops, WhileUnconditionalContinue) { … } // Test while loops with break TEST_P(GLSLTestLoops, WhileBreak) { … } // Test while loops with continue at the end of block TEST_P(GLSLTestLoops, WhileUnconditionalBreak) { … } // Test basic do-while loops TEST_P(GLSLTestLoops, BasicDoWhile) { … } // Test do-while loops with continue TEST_P(GLSLTestLoops, DoWhileContinue) { … } // Test do-while loops with continue at the end of block TEST_P(GLSLTestLoops, DoWhileUnconditionalContinue) { … } // Test do-while loops with break TEST_P(GLSLTestLoops, DoWhileBreak) { … } // Test do-while loops with break at the end of block TEST_P(GLSLTestLoops, DoWhileUnconditionalBreak) { … } // Test for loop with continue inside switch. TEST_P(GLSLTestLoops, ForContinueInSwitch) { … } // Test while loop with continue inside switch TEST_P(GLSLTestLoops, WhileContinueInSwitch) { … } // Test do-while loops with continue in switch TEST_P(GLSLTestLoops, DoWhileContinueInSwitch) { … } // Test prune-able loop with side effect in statements. TEST_P(GLSLTestLoops, SideEffectsInPrunableFor) { … } // Test that precision is retained for constants (which are constant folded). Adapted from a WebGL // test. TEST_P(GLSLTest, ConstantFoldedConstantsRetainPrecision) { … } // Test that vector and matrix scalarization does not affect rendering. TEST_P(GLSLTest, VectorAndMatrixScalarizationDoesNotAffectRendering) { … } // Tests initializing a shader IO block using the shader translator option. TEST_P(GLSLTest_ES31_InitShaderVariables, InitIOBlock) { … } // Tests initializing a nameless shader IO block using the shader translator option. TEST_P(GLSLTest_ES31_InitShaderVariables, InitIOBlockNameless) { … } // Tests initializing a shader IO block with an array using the shader translator option. TEST_P(GLSLTest_ES31_InitShaderVariables, InitIOBlockWithArray) { … } // Tests initializing a shader IO block array using the shader translator option. TEST_P(GLSLTest_ES31_InitShaderVariables, InitIOBlockArray) { … } // Tests initializing a shader IO block with a struct using the shader translator option. TEST_P(GLSLTest_ES31_InitShaderVariables, InitIOBlockWithStruct) { … } // Tests initializing an IO block with a complicated set of types, using the shader translator. TEST_P(GLSLTest_ES31_InitShaderVariables, InitIOBlockWithComplexTypes) { … } // Tests an unsuccessful re-link using glBindAttribLocation. TEST_P(GLSLTest_ES3, UnsuccessfulRelinkWithBindAttribLocation) { … } // Tests an unsuccessful re-link using glBindAttribLocation under WebGL. TEST_P(WebGL2GLSLTest, UnsuccessfulRelinkWithBindAttribLocation) { … } // Covers a HLSL compiler bug. TEST_P(GLSLTest_ES3, ComplexCrossExpression) { … } // Regression test for a crash in SPIR-V output when faced with an array of struct constant. TEST_P(GLSLTest_ES3, ArrayOfStructConstantBug) { … } // Regression test for a bug in SPIR-V output where float+matrix was mishandled. TEST_P(GLSLTest_ES3, FloatPlusMatrix) { … } // Regression test for a bug in SPIR-V output where a transformation creates float(constant) without // folding it into a TIntermConstantUnion. This transformation is clamping non-constant indices in // WebGL. The |false ? i : 5| as index caused the transformation to consider this a non-constant // index. TEST_P(WebGL2GLSLTest, IndexClampConstantIndexBug) { … } // Test robustness of out-of-bounds lod in texelFetch TEST_P(WebGL2GLSLTest, TexelFetchLodOutOfBounds) { … } // Test that framebuffer fetch transforms gl_LastFragData in the presence of gl_FragCoord without // failing validation (adapted from a Chromium test, see anglebug.com/42265427) TEST_P(GLSLTest, FramebufferFetchWithLastFragData) { … } // Test that loop body ending in a branch doesn't fail compilation TEST_P(GLSLTest, LoopBodyEndingInBranch1) { … } // Test that loop body ending in a branch doesn't fail compilation TEST_P(GLSLTest, LoopBodyEndingInBranch2) { … } // Test that loop body ending in a branch doesn't fail compilation TEST_P(GLSLTest, LoopBodyEndingInBranch3) { … } // Test that loop body ending in a branch doesn't fail compilation TEST_P(GLSLTest, LoopBodyEndingInBranch4) { … } // Test that loop body ending in a branch doesn't fail compilation TEST_P(GLSLTest, LoopBodyEndingInBranch5) { … } // Test that loop body ending in a branch doesn't fail compilation TEST_P(GLSLTest, LoopBodyEndingInBranch6) { … } // Test that aliasing function out parameters work. The GLSL spec says: // // > Because the function works with local copies of parameters, there are no issues regarding // > aliasing of variables within a function. // // In the test below, while the value of x is unknown after the function call, the result of the // function must deterministically be true. TEST_P(GLSLTest, AliasingFunctionOutParams) { … } // Test that aliasing function out parameters work even when multiple params are aliased. TEST_P(GLSLTest, AliasingFunctionOutParamsMultiple) { … } // Test that aliasing function inout parameters work. TEST_P(GLSLTest, AliasingFunctionInOutParams) { … } // Test coverage of some matrix/scalar ops which Metal translation was missing. TEST_P(GLSLTest, MatrixScalarOps) { … } // Test coverage of some matrix ops which Metal translation was missing. TEST_P(GLSLTest, MatrixNegate) { … } // Test coverage of the mix(float, float, bool) overload which was missing in Metal translation TEST_P(GLSLTest_ES3, MixFloatFloatBool) { … } // Test that aliasing function inout parameters work when more than one param is aliased. TEST_P(GLSLTest, AliasingFunctionInOutParamsMultiple) { … } // Test that aliasing function out parameter with a global works. TEST_P(GLSLTest, AliasingFunctionOutParamAndGlobal) { … } // Make sure const sampler parameters work. TEST_P(GLSLTest, ConstSamplerParameter) { … } // Make sure passing const sampler parameters to another function work. TEST_P(GLSLTest, ConstSamplerParameterAsArgument) { … } // Test for a driver bug with matrix multiplication in the tessellation control shader. TEST_P(GLSLTest_ES31, TessellationControlShaderMatrixMultiplicationBug) { … } // Test for a driver bug with matrix copy in the tessellation control shader. TEST_P(GLSLTest_ES31, TessellationControlShaderMatrixCopyBug) { … } // Tests the generation of HLSL functions with uint/int parameters that may be ambiguous. TEST_P(GLSLTest_ES3, AmbiguousHLSLIntegerFunctionParameters) { … } // Tests adding a struct definition inline in a shader. // Metal backend contains a pass that separates struct definition and declaration. TEST_P(GLSLTest_ES3, StructInShader) { … } // Issue: A while loop's expression, and a branch // condition with EOpContinue were being deep // copied as part of monomorphize functions, // causing a crash, as they were not null-checked. // Tests transforming a function that will be monomorphized. TEST_P(GLSLTest_ES3, MonomorphizeForAndContinue) { … } // Tests inout parameters with array references. TEST_P(GLSLTest_ES3, InoutWithArrayRefs) { … } // Test that sample variables compile. TEST_P(GLSLTest_ES3, SampleVariables) { … } // Test that shader caching maintains uniforms across compute shader compilations. TEST_P(GLSLTest_ES31, ShaderCacheComputeWithUniform) { … } // Test that shader caching maintains uniform blocks across shader compilations. TEST_P(GLSLTest_ES31, ShaderCacheComputeWithUniformBlocks) { … } // Test that shader caching maintains uniforms across vertex shader compilations. TEST_P(GLSLTest_ES31, ShaderCacheVertexWithUniform) { … } // Test that shader caching maintains uniform blocks across vertex shader compilations. TEST_P(GLSLTest_ES31, ShaderCacheVertexWithUniformBlock) { … } // Test that shader caching maintains SSBOs across vertex shader compilations. TEST_P(GLSLTest_ES31, ShaderCacheVertexWithSSBO) { … } // Test that shader caching maintains uniforms across vertex shader compilations. TEST_P(GLSLTest_ES31, ShaderCacheFragmentWithUniform) { … } // Test that shader caching maintains uniform blocks across vertex shader compilations. TEST_P(GLSLTest_ES31, ShaderCacheFragmentWithUniformBlock) { … } // Test that shader caching maintains SSBOs across vertex shader compilations. TEST_P(GLSLTest_ES31, ShaderCacheFragmentWithSSBO) { … } // Test that shader caching maintains whether GL_ARB_sample_shading is enabled across shader // compilations. TEST_P(GLSLTest_ES31, ShaderCacheFragmentWithARBSampleShading) { … } // Test that shader caching maintains which advanced blending equations (provided by // GL_KHR_blend_equation_advanced) are used across shader compilations. TEST_P(GLSLTest_ES31, ShaderCacheFragmentWithKHRAdvancedBlendEquations) { … } // Test that shader caching maintains uniforms in geometry shaders across shader compilations. TEST_P(GLSLTest_ES31, ShaderCacheGeometryWithUniform) { … } // Test that shader caching maintains uniform blocks in geometry shaders across shader compilations. TEST_P(GLSLTest_ES31, ShaderCacheGeometryWithUniformBlock) { … } // Test that shader caching maintains SSBO in geometry shaders across shader compilations. TEST_P(GLSLTest_ES31, ShaderCacheGeometryWithSSBO) { … } // Test that shader caching maintains the number of invocations in geometry shaders across shader // compilations. TEST_P(GLSLTest_ES31, ShaderCacheGeometryWithInvocations) { … } // Test that shader caching maintains uniforms in tessellation control shaders across shader // compilations. TEST_P(GLSLTest_ES31, ShaderCacheTessellationControlWithUniform) { … } // Test that shader caching maintains uniform blocks in tessellation control shaders across shader // compilations. TEST_P(GLSLTest_ES31, ShaderCacheTessellationControlWithUniformBlock) { … } // Test that shader caching maintains SSBOs in tessellation control shaders across shader // compilations. TEST_P(GLSLTest_ES31, ShaderCacheTessellationControlWithSSBO) { … } // Test that shader caching maintains uniforms in tessellation evaluation shaders across shader // compilations. TEST_P(GLSLTest_ES31, ShaderCacheTessellationEvalWithUniform) { … } // Test that shader caching maintains uniform blocks in tessellation evaluation shaders across // shader compilations. TEST_P(GLSLTest_ES31, ShaderCacheTessellationEvalWithUniformBlock) { … } // Test that shader caching maintains SSBOs in tessellation evaluation shaders across shader // compilations. TEST_P(GLSLTest_ES31, ShaderCacheTessellationEvalWithSSBO) { … } // Test that only macros for ESSL 1.0 compatible extensions are defined TEST_P(GLSLTest, ESSL1ExtensionMacros) { … } // Test that only macros for ESSL 3.0 compatible extensions are defined TEST_P(GLSLTest_ES3, ESSL3ExtensionMacros) { … } // Test that only macros for ESSL 3.1 compatible extensions are defined TEST_P(GLSLTest_ES31, ESSL31ExtensionMacros) { … } // Make sure names starting with webgl_ work. TEST_P(GLSLTest_ES3, NameWithWebgl) { … } // Make sure webgl_FragColor works. TEST_P(GLSLTest_ES3, NameWithWebglFragColor) { … } // Test that the ScalarizeVecAndMatConstructorArgs workaround works correctly with constructors that // have no precision. Regression test for a bug where the generated helper has no precision // specified on the parameters and return value. TEST_P(GLSLTest, ScalarizeVectorWorkaroundVsPrecisionlessConstructor) { … } // Test that Metal compiler doesn't inline non-const globals TEST_P(WebGLGLSLTest, InvalidGlobalsNotInlined) { … } // Test that a struct can have lots of fields. Regression test for an inefficient O(n^2) check for // fields having unique names. TEST_P(GLSLTest_ES3, LotsOfFieldsInStruct) { … } // Test that structs with too many fields are rejected. In SPIR-V, the instruction that defines the // struct lists the fields which means the length of the instruction is a function of the field // count. Since SPIR-V instruction sizes are limited to 16 bits, structs with more fields cannot be // represented. TEST_P(GLSLTest_ES3, TooManyFieldsInStruct) { … } // Same as TooManyFieldsInStruct, but with samplers in the struct. TEST_P(GLSLTest_ES3, TooManySamplerFieldsInStruct) { … } // More complex variation of ManySamplerFieldsInStruct. This one compiles fine. TEST_P(GLSLTest_ES3, ManySamplerFieldsInStructComplex) { … } // Make sure a large array of samplers works. TEST_P(GLSLTest, ManySamplers) { … } // Make sure a large array of samplers works when declared in a struct. TEST_P(GLSLTest, ManySamplersInStruct) { … } // Test that passing large arrays to functions are compiled correctly. Regression test for the // SPIR-V generator that made a copy of the array to pass to the function, by decomposing and // reconstructing it (in the absence of OpCopyLogical), but the reconstruction instruction has a // length higher than can fit in SPIR-V. TEST_P(GLSLTest_ES3, LargeInterfaceBlockArrayPassedToFunction) { … } // Make sure the shader in LargeInterfaceBlockArrayPassedToFunction works if the large local is // avoided. TEST_P(GLSLTest_ES3, LargeInterfaceBlockArray) { … } // Similar to LargeInterfaceBlockArrayPassedToFunction, but the array is nested in a struct. TEST_P(GLSLTest_ES3, LargeInterfaceBlockNestedArrayPassedToFunction) { … } // Make sure the shader in LargeInterfaceBlockNestedArrayPassedToFunction works if the large local // is avoided. TEST_P(GLSLTest_ES3, LargeInterfaceBlockNestedArray) { … } // Similar to LargeInterfaceBlockArrayPassedToFunction, but the large array is copied to a local // variable instead. TEST_P(GLSLTest_ES3, LargeInterfaceBlockArrayCopiedToLocal) { … } // Similar to LargeInterfaceBlockArrayCopiedToLocal, but the array is nested in a struct TEST_P(GLSLTest_ES3, LargeInterfaceBlockNestedArrayCopiedToLocal) { … } // Test that too large varyings are rejected. TEST_P(GLSLTest_ES3, LargeArrayVarying) { … } // Regression test for const globals losing const qualifiers during MSL // translation and exceeding available temporary registers on Apple GPUs. TEST_P(GLSLTest_ES3, LargeConstGlobalArraysOfStructs) { … } // Test that framebuffer fetch emulation does not add a user-visible uniform. TEST_P(GLSLTest, FramebufferFetchDoesNotAddUniforms) { … } // Test that framebuffer fetch emulation does not add a user-visible uniform. TEST_P(GLSLTest_ES31, FramebufferFetchDoesNotAddUniforms) { … } // Test that advanced blend emulation does not add a user-visible uniform. TEST_P(GLSLTest_ES31, AdvancedBlendEquationsDoesNotAddUniforms) { … } // Tests struct in function return type. TEST_P(GLSLTest, StructInFunctionDefinition) { … } // Tests struct definition in function return type. TEST_P(GLSLTest, StructDefinitionInFunctionDefinition) { … } // Test struct definition in forward declaration of function return type. TEST_P(GLSLTest, StructDefinitionInFunctionPrototype) { … } // Test that struct declarations are introduced into the correct scope. TEST_P(GLSLTest, StructDefinitionInFunctionPrototypeScope) { … } // Test that struct declarations are introduced into the correct scope. TEST_P(GLSLTest, NestedReturnedStructs) { … } // Test that double underscores user defined name is allowed TEST_P(GLSLTest_ES3, DoubleUnderscoresName) { … } // Test that user defined name starts with "ANGLE" or "ANGLE_" TEST_P(GLSLTest_ES3, VariableNameStartsWithANGLE) { … } // Test that underscores in array names work with out arrays. TEST_P(GLSLTest_ES3, UnderscoresWorkWithOutArrays) { … } } // anonymous namespace ANGLE_INSTANTIATE_TEST_ES2_AND_ES3_AND(…); ANGLE_INSTANTIATE_TEST_ES2_AND_ES3(…); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(…); ANGLE_INSTANTIATE_TEST_ES3_AND(…); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(…); ANGLE_INSTANTIATE_TEST_ES3(…); ANGLE_INSTANTIATE_TEST_ES2(…); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(…); ANGLE_INSTANTIATE_TEST_ES3(…); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(…); ANGLE_INSTANTIATE_TEST_ES31_AND(…); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(…); ANGLE_INSTANTIATE_TEST(…);