From 4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 11 Jul 2018 18:11:13 +0200 Subject: Roll back to ANGLE/2845 --- gfx/angle/BUILD.gn | 98 +- gfx/angle/CONTRIBUTORS | 6 - gfx/angle/DEPS | 43 +- gfx/angle/include/EGL/eglext.h | 22 +- gfx/angle/include/GLES2/gl2ext.h | 147 - gfx/angle/include/GLSLANG/ShaderLang.h | 584 +- gfx/angle/include/GLSLANG/ShaderVars.h | 20 +- gfx/angle/include/export.h | 6 +- gfx/angle/moz.build | 17 +- gfx/angle/src/angle.gyp | 13 +- gfx/angle/src/commit.h | 6 +- gfx/angle/src/common/BitSetIterator.h | 1 + gfx/angle/src/common/angleutils.h | 8 - gfx/angle/src/common/debug.cpp | 5 - gfx/angle/src/common/debug.h | 90 +- gfx/angle/src/common/mathutil.cpp | 18 +- gfx/angle/src/common/mathutil.h | 43 - .../src/common/third_party/numerics/base/logging.h | 4 +- .../numerics/base/numerics/safe_conversions_impl.h | 2 +- gfx/angle/src/common/utilities.cpp | 37 +- gfx/angle/src/common/utilities.h | 70 - gfx/angle/src/compiler.gypi | 106 +- gfx/angle/src/compiler/fuzz/translator_fuzzer.cpp | 161 - .../preprocessor/64bit-tokenizer-safety.patch | 104 +- .../src/compiler/preprocessor/DiagnosticsBase.cpp | 12 +- .../src/compiler/preprocessor/DiagnosticsBase.h | 1 - .../compiler/preprocessor/DirectiveHandlerBase.cpp | 2 +- .../src/compiler/preprocessor/DirectiveParser.cpp | 65 +- .../src/compiler/preprocessor/DirectiveParser.h | 8 +- .../src/compiler/preprocessor/ExpressionParser.cpp | 69 +- .../src/compiler/preprocessor/ExpressionParser.h | 8 +- .../src/compiler/preprocessor/ExpressionParser.y | 54 +- gfx/angle/src/compiler/preprocessor/Input.cpp | 7 +- gfx/angle/src/compiler/preprocessor/Input.h | 2 +- gfx/angle/src/compiler/preprocessor/Lexer.cpp | 2 +- gfx/angle/src/compiler/preprocessor/Lexer.h | 4 +- gfx/angle/src/compiler/preprocessor/Macro.cpp | 12 +- gfx/angle/src/compiler/preprocessor/Macro.h | 8 +- .../src/compiler/preprocessor/MacroExpander.cpp | 151 +- .../src/compiler/preprocessor/MacroExpander.h | 38 +- .../src/compiler/preprocessor/Preprocessor.cpp | 21 +- gfx/angle/src/compiler/preprocessor/Preprocessor.h | 8 +- gfx/angle/src/compiler/preprocessor/Token.cpp | 13 +- gfx/angle/src/compiler/preprocessor/Token.h | 4 +- gfx/angle/src/compiler/preprocessor/Tokenizer.cpp | 690 +- gfx/angle/src/compiler/preprocessor/Tokenizer.h | 7 +- gfx/angle/src/compiler/preprocessor/Tokenizer.l | 16 +- gfx/angle/src/compiler/preprocessor/numeric_lex.h | 3 +- gfx/angle/src/compiler/preprocessor/pp_utils.h | 18 + .../compiler/translator/64bit-lexer-safety.patch | 118 +- .../src/compiler/translator/ASTMetadataHLSL.cpp | 33 +- .../src/compiler/translator/ASTMetadataHLSL.h | 11 +- .../translator/AddAndTrueToLoopCondition.cpp | 59 - .../translator/AddAndTrueToLoopCondition.h | 20 - .../translator/AddDefaultReturnStatements.cpp | 56 +- .../translator/ArrayReturnValueToOutParameter.cpp | 92 +- .../translator/ArrayReturnValueToOutParameter.h | 3 - gfx/angle/src/compiler/translator/BaseTypes.h | 299 +- .../BreakVariableAliasingInInnerLoops.cpp | 106 - .../translator/BreakVariableAliasingInInnerLoops.h | 23 - .../translator/BuiltInFunctionEmulator.cpp | 5 - .../compiler/translator/BuiltInFunctionEmulator.h | 5 - .../translator/BuiltInFunctionEmulatorGLSL.cpp | 80 +- .../translator/BuiltInFunctionEmulatorGLSL.h | 14 +- .../translator/BuiltInFunctionEmulatorHLSL.cpp | 58 - .../translator/BuiltInFunctionEmulatorHLSL.h | 11 - gfx/angle/src/compiler/translator/Cache.cpp | 6 +- gfx/angle/src/compiler/translator/Cache.h | 5 - gfx/angle/src/compiler/translator/CallDAG.cpp | 185 +- gfx/angle/src/compiler/translator/CallDAG.h | 8 +- gfx/angle/src/compiler/translator/CodeGen.cpp | 90 +- gfx/angle/src/compiler/translator/Common.h | 5 - gfx/angle/src/compiler/translator/Compiler.cpp | 504 +- gfx/angle/src/compiler/translator/Compiler.h | 76 +- .../src/compiler/translator/ConstantUnion.cpp | 642 -- gfx/angle/src/compiler/translator/ConstantUnion.h | 373 +- .../translator/DeferGlobalInitializers.cpp | 74 +- .../compiler/translator/DeferGlobalInitializers.h | 7 +- gfx/angle/src/compiler/translator/Diagnostics.cpp | 5 - gfx/angle/src/compiler/translator/Diagnostics.h | 5 - .../src/compiler/translator/DirectiveHandler.cpp | 5 - .../src/compiler/translator/DirectiveHandler.h | 4 - .../translator/EmulateGLFragColorBroadcast.cpp | 103 +- .../translator/EmulateGLFragColorBroadcast.h | 5 +- .../src/compiler/translator/EmulatePrecision.cpp | 71 +- .../src/compiler/translator/EmulatePrecision.h | 8 - .../translator/ExpandIntegerPowExpressions.cpp | 11 +- .../src/compiler/translator/ExtensionGLSL.cpp | 5 - gfx/angle/src/compiler/translator/ExtensionGLSL.h | 5 - .../src/compiler/translator/ForLoopUnroll.cpp | 7 +- gfx/angle/src/compiler/translator/ForLoopUnroll.h | 5 - gfx/angle/src/compiler/translator/InfoSink.cpp | 5 - gfx/angle/src/compiler/translator/InfoSink.h | 5 - gfx/angle/src/compiler/translator/Initialize.cpp | 187 +- gfx/angle/src/compiler/translator/Initialize.h | 5 - .../src/compiler/translator/InitializeDll.cpp | 5 - gfx/angle/src/compiler/translator/InitializeDll.h | 3 - .../compiler/translator/InitializeParseContext.cpp | 4 - .../compiler/translator/InitializeParseContext.h | 4 - .../compiler/translator/InitializeVariables.cpp | 183 +- .../src/compiler/translator/InitializeVariables.h | 15 +- gfx/angle/src/compiler/translator/IntermNode.cpp | 2108 ++-- gfx/angle/src/compiler/translator/IntermNode.h | 403 +- .../translator/IntermNodePatternMatcher.cpp | 23 +- .../compiler/translator/IntermNodePatternMatcher.h | 9 +- .../src/compiler/translator/IntermTraverse.cpp | 271 +- gfx/angle/src/compiler/translator/Intermediate.cpp | 222 +- gfx/angle/src/compiler/translator/Intermediate.h | 52 +- gfx/angle/src/compiler/translator/LoopInfo.cpp | 7 +- gfx/angle/src/compiler/translator/LoopInfo.h | 5 - gfx/angle/src/compiler/translator/Operator.cpp | 2 + gfx/angle/src/compiler/translator/Operator.h | 5 + gfx/angle/src/compiler/translator/OutputESSL.cpp | 13 +- gfx/angle/src/compiler/translator/OutputESSL.h | 23 +- gfx/angle/src/compiler/translator/OutputGLSL.cpp | 27 +- gfx/angle/src/compiler/translator/OutputGLSL.h | 15 +- .../src/compiler/translator/OutputGLSLBase.cpp | 891 +- gfx/angle/src/compiler/translator/OutputGLSLBase.h | 31 +- gfx/angle/src/compiler/translator/OutputHLSL.cpp | 854 +- gfx/angle/src/compiler/translator/OutputHLSL.h | 25 +- gfx/angle/src/compiler/translator/ParseContext.cpp | 1779 ++- gfx/angle/src/compiler/translator/ParseContext.h | 292 +- gfx/angle/src/compiler/translator/PoolAlloc.cpp | 94 +- gfx/angle/src/compiler/translator/PoolAlloc.h | 18 +- .../compiler/translator/PruneEmptyDeclarations.cpp | 105 +- .../compiler/translator/PruneEmptyDeclarations.h | 3 - .../src/compiler/translator/QualifierTypes.cpp | 727 -- gfx/angle/src/compiler/translator/QualifierTypes.h | 191 - .../translator/RecordConstantPrecision.cpp | 10 - .../compiler/translator/RecordConstantPrecision.h | 3 - .../compiler/translator/RegenerateStructNames.cpp | 30 +- .../compiler/translator/RegenerateStructNames.h | 7 +- .../compiler/translator/RemoveDynamicIndexing.cpp | 73 +- .../compiler/translator/RemoveDynamicIndexing.h | 5 - .../translator/RemoveInvariantDeclaration.cpp | 47 - .../translator/RemoveInvariantDeclaration.h | 18 - gfx/angle/src/compiler/translator/RemovePow.cpp | 13 +- gfx/angle/src/compiler/translator/RemovePow.h | 3 - .../translator/RemoveSwitchFallThrough.cpp | 31 +- .../compiler/translator/RemoveSwitchFallThrough.h | 21 +- gfx/angle/src/compiler/translator/RenameFunction.h | 36 + .../src/compiler/translator/RewriteDoWhile.cpp | 44 +- gfx/angle/src/compiler/translator/RewriteDoWhile.h | 3 - .../src/compiler/translator/RewriteElseBlocks.cpp | 87 +- .../translator/RewriteTexelFetchOffset.cpp | 54 +- .../compiler/translator/RewriteTexelFetchOffset.h | 1 + .../translator/RewriteUnaryMinusOperatorInt.cpp | 112 - .../translator/RewriteUnaryMinusOperatorInt.h | 20 - .../ScalarizeVecAndMatConstructorArgs.cpp | 187 +- .../translator/ScalarizeVecAndMatConstructorArgs.h | 46 +- .../translator/SeparateArrayInitialization.cpp | 59 +- .../translator/SeparateArrayInitialization.h | 3 - .../compiler/translator/SeparateDeclarations.cpp | 43 +- .../src/compiler/translator/SeparateDeclarations.h | 3 - .../SeparateExpressionsReturningArrays.cpp | 14 +- .../SeparateExpressionsReturningArrays.h | 3 - gfx/angle/src/compiler/translator/ShaderLang.cpp | 173 +- .../compiler/translator/SimplifyLoopConditions.cpp | 32 +- .../compiler/translator/SimplifyLoopConditions.h | 3 - .../compiler/translator/SplitSequenceOperator.cpp | 34 +- .../compiler/translator/SplitSequenceOperator.h | 5 - gfx/angle/src/compiler/translator/SymbolTable.cpp | 72 +- gfx/angle/src/compiler/translator/SymbolTable.h | 33 +- .../compiler/translator/TextureFunctionHLSL.cpp | 55 +- .../src/compiler/translator/TranslatorESSL.cpp | 19 +- gfx/angle/src/compiler/translator/TranslatorESSL.h | 9 +- .../src/compiler/translator/TranslatorGLSL.cpp | 43 +- gfx/angle/src/compiler/translator/TranslatorGLSL.h | 11 +- .../src/compiler/translator/TranslatorHLSL.cpp | 24 +- gfx/angle/src/compiler/translator/TranslatorHLSL.h | 9 +- gfx/angle/src/compiler/translator/Types.cpp | 157 +- gfx/angle/src/compiler/translator/Types.h | 232 +- .../compiler/translator/UnfoldShortCircuitAST.cpp | 17 +- .../compiler/translator/UnfoldShortCircuitAST.h | 5 - .../compiler/translator/UnfoldShortCircuitToIf.cpp | 40 +- .../compiler/translator/UnfoldShortCircuitToIf.h | 3 - .../translator/UseInterfaceBlockFields.cpp | 163 - .../compiler/translator/UseInterfaceBlockFields.h | 30 - gfx/angle/src/compiler/translator/UtilsHLSL.cpp | 2 - .../translator/ValidateGlobalInitializer.cpp | 4 - .../translator/ValidateGlobalInitializer.h | 5 - .../compiler/translator/ValidateLimitations.cpp | 11 +- .../src/compiler/translator/ValidateLimitations.h | 5 - .../compiler/translator/ValidateMaxParameters.cpp | 5 - .../compiler/translator/ValidateMaxParameters.h | 5 - .../src/compiler/translator/ValidateOutputs.cpp | 5 - .../src/compiler/translator/ValidateOutputs.h | 5 - .../src/compiler/translator/ValidateSwitch.cpp | 21 +- gfx/angle/src/compiler/translator/ValidateSwitch.h | 13 +- gfx/angle/src/compiler/translator/VariableInfo.cpp | 71 +- gfx/angle/src/compiler/translator/VariableInfo.h | 2 +- gfx/angle/src/compiler/translator/VersionGLSL.cpp | 27 +- gfx/angle/src/compiler/translator/VersionGLSL.h | 6 - gfx/angle/src/compiler/translator/blocklayout.h | 6 +- .../src/compiler/translator/blocklayoutHLSL.h | 7 +- .../translator/depgraph/DependencyGraph.cpp | 95 + .../compiler/translator/depgraph/DependencyGraph.h | 199 + .../translator/depgraph/DependencyGraphBuilder.cpp | 255 + .../translator/depgraph/DependencyGraphBuilder.h | 199 + .../translator/depgraph/DependencyGraphOutput.cpp | 64 + .../translator/depgraph/DependencyGraphOutput.h | 31 + .../depgraph/DependencyGraphTraverse.cpp | 69 + gfx/angle/src/compiler/translator/glslang.h | 14 +- gfx/angle/src/compiler/translator/glslang.l | 75 +- gfx/angle/src/compiler/translator/glslang.y | 544 +- gfx/angle/src/compiler/translator/glslang_lex.cpp | 195 +- gfx/angle/src/compiler/translator/glslang_tab.cpp | 2477 ++-- gfx/angle/src/compiler/translator/glslang_tab.h | 294 +- gfx/angle/src/compiler/translator/intermOut.cpp | 426 +- gfx/angle/src/compiler/translator/length_limits.h | 5 - .../timing/RestrictFragmentShaderTiming.cpp | 130 + .../timing/RestrictFragmentShaderTiming.h | 39 + .../timing/RestrictVertexShaderTiming.cpp | 17 + .../translator/timing/RestrictVertexShaderTiming.h | 32 + gfx/angle/src/compiler/translator/util.cpp | 84 +- gfx/angle/src/compiler/translator/util.h | 13 +- gfx/angle/src/image_util/loadimage_etc.cpp | 4 +- gfx/angle/src/libANGLE/Buffer.cpp | 116 +- gfx/angle/src/libANGLE/Buffer.h | 72 +- gfx/angle/src/libANGLE/Caps.cpp | 254 +- gfx/angle/src/libANGLE/Caps.h | 47 - gfx/angle/src/libANGLE/Compiler.cpp | 30 +- gfx/angle/src/libANGLE/Context.cpp | 470 +- gfx/angle/src/libANGLE/Context.h | 61 +- gfx/angle/src/libANGLE/ContextState.cpp | 94 +- gfx/angle/src/libANGLE/ContextState.h | 57 +- gfx/angle/src/libANGLE/Display.cpp | 43 +- gfx/angle/src/libANGLE/Display.h | 14 +- gfx/angle/src/libANGLE/HandleAllocator.cpp | 21 +- gfx/angle/src/libANGLE/HandleAllocator.h | 1 - .../src/libANGLE/HandleAllocator_unittest.cpp | 16 +- gfx/angle/src/libANGLE/HandleRangeAllocator.cpp | 1 + gfx/angle/src/libANGLE/ImageIndex.cpp | 27 +- gfx/angle/src/libANGLE/ImageIndex.h | 1 - .../src/libANGLE/ImageIndexIterator_unittest.cpp | 8 - gfx/angle/src/libANGLE/Path.h | 4 +- gfx/angle/src/libANGLE/Program.cpp | 236 +- gfx/angle/src/libANGLE/Program.h | 20 +- gfx/angle/src/libANGLE/Renderbuffer.cpp | 7 +- gfx/angle/src/libANGLE/Renderbuffer.h | 3 +- gfx/angle/src/libANGLE/ResourceManager.cpp | 19 +- gfx/angle/src/libANGLE/ResourceManager.h | 7 +- .../src/libANGLE/ResourceManager_unittest.cpp | 2 +- gfx/angle/src/libANGLE/Sampler.cpp | 16 +- gfx/angle/src/libANGLE/Sampler.h | 6 +- gfx/angle/src/libANGLE/Shader.cpp | 36 +- gfx/angle/src/libANGLE/Shader.h | 5 +- gfx/angle/src/libANGLE/State.cpp | 47 +- gfx/angle/src/libANGLE/State.h | 19 +- gfx/angle/src/libANGLE/Surface.cpp | 18 +- gfx/angle/src/libANGLE/Surface.h | 4 +- gfx/angle/src/libANGLE/Surface_unittest.cpp | 1 - gfx/angle/src/libANGLE/Texture.cpp | 67 +- gfx/angle/src/libANGLE/Texture.h | 42 +- gfx/angle/src/libANGLE/Thread.cpp | 88 - gfx/angle/src/libANGLE/Thread.h | 57 - .../src/libANGLE/TransformFeedback_unittest.cpp | 9 +- gfx/angle/src/libANGLE/Uniform.cpp | 5 - gfx/angle/src/libANGLE/Uniform.h | 1 - gfx/angle/src/libANGLE/Version.h | 7 +- gfx/angle/src/libANGLE/Version.inl | 32 +- gfx/angle/src/libANGLE/VertexArray.h | 3 +- gfx/angle/src/libANGLE/VertexAttribute.h | 3 + gfx/angle/src/libANGLE/VertexAttribute.inl | 27 + gfx/angle/src/libANGLE/Workarounds.h | 25 - gfx/angle/src/libANGLE/angletypes.cpp | 3 +- gfx/angle/src/libANGLE/angletypes.h | 91 +- .../src/libANGLE/es3_copy_conversion_formats.json | 44 - .../libANGLE/es3_copy_conversion_table_autogen.cpp | 171 - .../src/libANGLE/es3_format_type_combinations.json | 171 - gfx/angle/src/libANGLE/format_map_autogen.cpp | 1530 --- gfx/angle/src/libANGLE/format_map_data.json | 130 - gfx/angle/src/libANGLE/formatutils.cpp | 508 +- gfx/angle/src/libANGLE/formatutils.h | 58 +- .../src/libANGLE/gen_copy_conversion_table.py | 91 - gfx/angle/src/libANGLE/gen_format_map.py | 187 - gfx/angle/src/libANGLE/moz.build | 56 +- gfx/angle/src/libANGLE/queryconversions.cpp | 11 + gfx/angle/src/libANGLE/queryconversions.h | 28 +- gfx/angle/src/libANGLE/queryutils.cpp | 772 -- gfx/angle/src/libANGLE/queryutils.h | 79 - gfx/angle/src/libANGLE/renderer/BufferImpl.h | 13 +- gfx/angle/src/libANGLE/renderer/BufferImpl_mock.h | 8 +- gfx/angle/src/libANGLE/renderer/DisplayImpl.cpp | 9 - gfx/angle/src/libANGLE/renderer/DisplayImpl.h | 4 - gfx/angle/src/libANGLE/renderer/EGLImplFactory.h | 3 +- gfx/angle/src/libANGLE/renderer/Format.cpp | 60 + gfx/angle/src/libANGLE/renderer/Format.h | 58 +- gfx/angle/src/libANGLE/renderer/Format_autogen.cpp | 1126 ++ .../src/libANGLE/renderer/Format_table_autogen.cpp | 157 - .../renderer/FramebufferAttachmentObjectImpl.h | 6 +- gfx/angle/src/libANGLE/renderer/GLImplFactory.h | 2 +- gfx/angle/src/libANGLE/renderer/ProgramImpl.h | 9 +- gfx/angle/src/libANGLE/renderer/ShaderImpl.h | 6 +- gfx/angle/src/libANGLE/renderer/SurfaceImpl.cpp | 6 - gfx/angle/src/libANGLE/renderer/SurfaceImpl.h | 1 - gfx/angle/src/libANGLE/renderer/TextureImpl.cpp | 7 - gfx/angle/src/libANGLE/renderer/TextureImpl.h | 5 - gfx/angle/src/libANGLE/renderer/TextureImpl_mock.h | 8 +- gfx/angle/src/libANGLE/renderer/d3d/BufferD3D.cpp | 10 +- gfx/angle/src/libANGLE/renderer/d3d/BufferD3D.h | 2 +- gfx/angle/src/libANGLE/renderer/d3d/DisplayD3D.cpp | 32 +- gfx/angle/src/libANGLE/renderer/d3d/DisplayD3D.h | 7 +- .../src/libANGLE/renderer/d3d/DynamicHLSL.cpp | 12 +- .../src/libANGLE/renderer/d3d/FramebufferD3D.cpp | 18 +- .../src/libANGLE/renderer/d3d/HLSLCompiler.cpp | 5 +- gfx/angle/src/libANGLE/renderer/d3d/ImageD3D.cpp | 10 - gfx/angle/src/libANGLE/renderer/d3d/ImageD3D.h | 2 - gfx/angle/src/libANGLE/renderer/d3d/ProgramD3D.cpp | 93 +- gfx/angle/src/libANGLE/renderer/d3d/RendererD3D.h | 12 - gfx/angle/src/libANGLE/renderer/d3d/ShaderD3D.cpp | 19 +- gfx/angle/src/libANGLE/renderer/d3d/ShaderD3D.h | 6 +- gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp | 44 +- gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h | 7 +- .../src/libANGLE/renderer/d3d/SwapChainD3D.cpp | 34 - gfx/angle/src/libANGLE/renderer/d3d/SwapChainD3D.h | 16 +- gfx/angle/src/libANGLE/renderer/d3d/TextureD3D.cpp | 668 +- gfx/angle/src/libANGLE/renderer/d3d/TextureD3D.h | 3 - .../src/libANGLE/renderer/d3d/VaryingPacking.cpp | 36 +- .../libANGLE/renderer/d3d/VertexDataManager.cpp | 1 + .../src/libANGLE/renderer/d3d/WorkaroundsD3D.h | 31 +- .../src/libANGLE/renderer/d3d/d3d11/Blit11.cpp | 143 +- .../src/libANGLE/renderer/d3d/d3d11/Buffer11.cpp | 360 +- .../src/libANGLE/renderer/d3d/d3d11/Buffer11.h | 39 +- .../src/libANGLE/renderer/d3d/d3d11/Clear11.cpp | 537 +- .../src/libANGLE/renderer/d3d/d3d11/Context11.cpp | 10 +- .../src/libANGLE/renderer/d3d/d3d11/Context11.h | 2 +- .../src/libANGLE/renderer/d3d/d3d11/Fence11.cpp | 54 +- .../libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp | 23 +- .../libANGLE/renderer/d3d/d3d11/Framebuffer11.h | 2 +- .../src/libANGLE/renderer/d3d/d3d11/Image11.cpp | 304 +- .../src/libANGLE/renderer/d3d/d3d11/Query11.cpp | 66 +- .../renderer/d3d/d3d11/RenderStateCache.cpp | 3 +- .../libANGLE/renderer/d3d/d3d11/RenderTarget11.cpp | 4 +- .../src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp | 1246 +- .../src/libANGLE/renderer/d3d/d3d11/Renderer11.h | 15 +- .../renderer/d3d/d3d11/ShaderExecutable11.cpp | 1 + .../libANGLE/renderer/d3d/d3d11/StateManager11.cpp | 71 +- .../libANGLE/renderer/d3d/d3d11/SwapChain11.cpp | 49 +- .../src/libANGLE/renderer/d3d/d3d11/SwapChain11.h | 1 - .../renderer/d3d/d3d11/TextureStorage11.cpp | 733 +- .../libANGLE/renderer/d3d/d3d11/TextureStorage11.h | 55 +- .../libANGLE/renderer/d3d/d3d11/VertexArray11.cpp | 8 +- .../libANGLE/renderer/d3d/d3d11/VertexBuffer11.cpp | 47 +- .../renderer/d3d/d3d11/dxgi_format_data.json | 118 - .../renderer/d3d/d3d11/dxgi_format_map_autogen.cpp | 516 - .../renderer/d3d/d3d11/dxgi_support_data.json | 617 +- .../renderer/d3d/d3d11/dxgi_support_table.cpp | 1305 +-- .../libANGLE/renderer/d3d/d3d11/formatutils11.cpp | 871 +- .../libANGLE/renderer/d3d/d3d11/formatutils11.h | 45 +- .../renderer/d3d/d3d11/gen_dxgi_format_table.py | 134 - .../renderer/d3d/d3d11/gen_dxgi_support_tables.py | 70 +- .../renderer/d3d/d3d11/gen_texture_format_table.py | 49 +- .../renderer/d3d/d3d11/renderer11_utils.cpp | 1606 +-- .../libANGLE/renderer/d3d/d3d11/renderer11_utils.h | 1 - .../renderer/d3d/d3d11/texture_format_table.cpp | 39 +- .../renderer/d3d/d3d11/texture_format_table.h | 65 +- .../d3d/d3d11/texture_format_table_autogen.cpp | 2540 ++-- gfx/angle/src/libANGLE/renderer/d3d/d3d9/Blit9.cpp | 73 +- .../src/libANGLE/renderer/d3d/d3d9/Buffer9.cpp | 9 +- gfx/angle/src/libANGLE/renderer/d3d/d3d9/Buffer9.h | 19 +- .../src/libANGLE/renderer/d3d/d3d9/Context9.cpp | 10 +- .../src/libANGLE/renderer/d3d/d3d9/Context9.h | 2 +- .../libANGLE/renderer/d3d/d3d9/Framebuffer9.cpp | 4 +- .../src/libANGLE/renderer/d3d/d3d9/Image9.cpp | 21 +- .../src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp | 143 +- .../src/libANGLE/renderer/d3d/d3d9/Renderer9.h | 13 - .../libANGLE/renderer/d3d/d3d9/StateManager9.cpp | 2 +- .../src/libANGLE/renderer/d3d/d3d9/SwapChain9.cpp | 46 +- .../src/libANGLE/renderer/d3d/d3d9/SwapChain9.h | 1 - .../libANGLE/renderer/d3d/d3d9/TextureStorage9.cpp | 4 + .../renderer/d3d/d3d9/VertexDeclarationCache.cpp | 2 +- .../libANGLE/renderer/d3d/d3d9/formatutils9.cpp | 251 +- .../src/libANGLE/renderer/d3d/d3d9/formatutils9.h | 17 +- .../libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp | 11 +- gfx/angle/src/libANGLE/renderer/driver_utils.cpp | 81 - gfx/angle/src/libANGLE/renderer/driver_utils.h | 57 - .../libANGLE/renderer/gen_angle_format_table.py | 97 +- gfx/angle/src/libANGLE/renderer/gl/BlitGL.cpp | 274 +- gfx/angle/src/libANGLE/renderer/gl/BlitGL.h | 12 - gfx/angle/src/libANGLE/renderer/gl/BufferGL.cpp | 10 +- gfx/angle/src/libANGLE/renderer/gl/BufferGL.h | 8 +- gfx/angle/src/libANGLE/renderer/gl/ContextGL.cpp | 7 +- gfx/angle/src/libANGLE/renderer/gl/ContextGL.h | 2 +- gfx/angle/src/libANGLE/renderer/gl/DisplayGL.cpp | 15 +- gfx/angle/src/libANGLE/renderer/gl/DisplayGL.h | 7 - .../src/libANGLE/renderer/gl/FramebufferGL.cpp | 199 +- gfx/angle/src/libANGLE/renderer/gl/FramebufferGL.h | 19 +- gfx/angle/src/libANGLE/renderer/gl/FunctionsGL.cpp | 10 - gfx/angle/src/libANGLE/renderer/gl/FunctionsGL.h | 2 - gfx/angle/src/libANGLE/renderer/gl/ProgramGL.cpp | 12 +- .../src/libANGLE/renderer/gl/RenderbufferGL.h | 6 + gfx/angle/src/libANGLE/renderer/gl/RendererGL.cpp | 12 - gfx/angle/src/libANGLE/renderer/gl/SamplerGL.cpp | 1 - gfx/angle/src/libANGLE/renderer/gl/ShaderGL.cpp | 36 +- gfx/angle/src/libANGLE/renderer/gl/ShaderGL.h | 4 +- .../src/libANGLE/renderer/gl/StateManagerGL.cpp | 62 +- .../src/libANGLE/renderer/gl/StateManagerGL.h | 5 - gfx/angle/src/libANGLE/renderer/gl/SurfaceGL.cpp | 7 +- gfx/angle/src/libANGLE/renderer/gl/SurfaceGL.h | 7 +- gfx/angle/src/libANGLE/renderer/gl/TextureGL.cpp | 472 +- gfx/angle/src/libANGLE/renderer/gl/TextureGL.h | 23 +- gfx/angle/src/libANGLE/renderer/gl/WorkaroundsGL.h | 55 +- .../src/libANGLE/renderer/gl/cgl/DisplayCGL.h | 3 +- .../src/libANGLE/renderer/gl/cgl/DisplayCGL.mm | 3 +- .../libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.h | 2 +- .../libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.mm | 5 +- .../libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h | 1 - .../libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm | 8 +- .../src/libANGLE/renderer/gl/egl/SurfaceEGL.cpp | 4 + .../renderer/gl/egl/android/DisplayAndroid.cpp | 7 +- .../renderer/gl/egl/android/DisplayAndroid.h | 3 +- .../renderer/gl/egl/ozone/DisplayOzone.cpp | 9 +- .../libANGLE/renderer/gl/egl/ozone/DisplayOzone.h | 3 +- .../src/libANGLE/renderer/gl/formatutilsgl.cpp | 36 - gfx/angle/src/libANGLE/renderer/gl/formatutilsgl.h | 10 - .../src/libANGLE/renderer/gl/glx/DisplayGLX.cpp | 5 +- .../src/libANGLE/renderer/gl/glx/DisplayGLX.h | 3 +- .../src/libANGLE/renderer/gl/renderergl_utils.cpp | 105 +- .../src/libANGLE/renderer/gl/renderergl_utils.h | 9 - .../renderer/gl/wgl/D3DTextureSurfaceWGL.cpp | 384 - .../renderer/gl/wgl/D3DTextureSurfaceWGL.h | 86 - .../gl/wgl/DXGISwapChainWindowSurfaceWGL.cpp | 4 +- .../gl/wgl/DXGISwapChainWindowSurfaceWGL.h | 1 - .../src/libANGLE/renderer/gl/wgl/DisplayWGL.cpp | 50 +- .../src/libANGLE/renderer/gl/wgl/DisplayWGL.h | 9 +- .../src/libANGLE/renderer/null/BufferNULL.cpp | 74 - gfx/angle/src/libANGLE/renderer/null/BufferNULL.h | 43 - .../src/libANGLE/renderer/null/CompilerNULL.cpp | 37 - .../src/libANGLE/renderer/null/CompilerNULL.h | 32 - .../src/libANGLE/renderer/null/ContextNULL.cpp | 175 - gfx/angle/src/libANGLE/renderer/null/ContextNULL.h | 95 - .../src/libANGLE/renderer/null/DeviceNULL.cpp | 48 - gfx/angle/src/libANGLE/renderer/null/DeviceNULL.h | 32 - .../src/libANGLE/renderer/null/DisplayNULL.cpp | 168 - gfx/angle/src/libANGLE/renderer/null/DisplayNULL.h | 82 - .../src/libANGLE/renderer/null/FenceNVNULL.cpp | 43 - gfx/angle/src/libANGLE/renderer/null/FenceNVNULL.h | 31 - .../src/libANGLE/renderer/null/FenceSyncNULL.cpp | 49 - .../src/libANGLE/renderer/null/FenceSyncNULL.h | 32 - .../src/libANGLE/renderer/null/FramebufferNULL.cpp | 131 - .../src/libANGLE/renderer/null/FramebufferNULL.h | 70 - gfx/angle/src/libANGLE/renderer/null/ImageNULL.cpp | 37 - gfx/angle/src/libANGLE/renderer/null/ImageNULL.h | 30 - gfx/angle/src/libANGLE/renderer/null/PathNULL.cpp | 40 - gfx/angle/src/libANGLE/renderer/null/PathNULL.h | 35 - .../src/libANGLE/renderer/null/ProgramNULL.cpp | 212 - gfx/angle/src/libANGLE/renderer/null/ProgramNULL.h | 101 - gfx/angle/src/libANGLE/renderer/null/QueryNULL.cpp | 73 - gfx/angle/src/libANGLE/renderer/null/QueryNULL.h | 36 - .../libANGLE/renderer/null/RenderbufferNULL.cpp | 46 - .../src/libANGLE/renderer/null/RenderbufferNULL.h | 34 - .../src/libANGLE/renderer/null/SamplerNULL.cpp | 25 - gfx/angle/src/libANGLE/renderer/null/SamplerNULL.h | 27 - .../src/libANGLE/renderer/null/ShaderNULL.cpp | 44 - gfx/angle/src/libANGLE/renderer/null/ShaderNULL.h | 35 - .../src/libANGLE/renderer/null/SurfaceNULL.cpp | 103 - gfx/angle/src/libANGLE/renderer/null/SurfaceNULL.h | 46 - .../src/libANGLE/renderer/null/TextureNULL.cpp | 143 - gfx/angle/src/libANGLE/renderer/null/TextureNULL.h | 89 - .../renderer/null/TransformFeedbackNULL.cpp | 57 - .../libANGLE/renderer/null/TransformFeedbackNULL.h | 35 - .../src/libANGLE/renderer/null/VertexArrayNULL.cpp | 25 - .../src/libANGLE/renderer/null/VertexArrayNULL.h | 27 - gfx/angle/src/libANGLE/renderer/renderer_utils.cpp | 21 +- gfx/angle/src/libANGLE/renderer/renderer_utils.h | 22 +- .../src/libANGLE/renderer/vulkan/BufferVk.cpp | 6 +- gfx/angle/src/libANGLE/renderer/vulkan/BufferVk.h | 6 +- .../src/libANGLE/renderer/vulkan/ContextVk.cpp | 4 +- gfx/angle/src/libANGLE/renderer/vulkan/ContextVk.h | 2 +- .../src/libANGLE/renderer/vulkan/DisplayVk.cpp | 3 +- gfx/angle/src/libANGLE/renderer/vulkan/DisplayVk.h | 3 +- .../src/libANGLE/renderer/vulkan/ProgramVk.cpp | 4 +- .../src/libANGLE/renderer/vulkan/ShaderVk.cpp | 4 +- gfx/angle/src/libANGLE/renderer/vulkan/ShaderVk.h | 6 +- .../src/libANGLE/renderer/vulkan/TextureVk.cpp | 5 - gfx/angle/src/libANGLE/renderer/vulkan/TextureVk.h | 2 - gfx/angle/src/libANGLE/validationEGL.cpp | 97 +- gfx/angle/src/libANGLE/validationEGL.h | 9 +- gfx/angle/src/libANGLE/validationES.cpp | 6123 ++++------ gfx/angle/src/libANGLE/validationES.h | 312 +- gfx/angle/src/libANGLE/validationES2.cpp | 686 +- gfx/angle/src/libANGLE/validationES2.h | 73 +- gfx/angle/src/libANGLE/validationES3.cpp | 1124 +- gfx/angle/src/libANGLE/validationES3.h | 67 +- gfx/angle/src/libANGLE/validationES31.cpp | 38 +- gfx/angle/src/libANGLE/validationES31.h | 6 - gfx/angle/src/libANGLE/validationES_unittest.cpp | 20 +- gfx/angle/src/libEGL.gypi | 2 +- gfx/angle/src/libEGL/libEGL.cpp | 8 - gfx/angle/src/libEGL/libEGL.def | 1 - gfx/angle/src/libEGL/moz.build | 8 + gfx/angle/src/libGLESv2.gypi | 74 +- gfx/angle/src/libGLESv2/entry_points_egl.cpp | 467 +- gfx/angle/src/libGLESv2/entry_points_egl_ext.cpp | 260 +- gfx/angle/src/libGLESv2/entry_points_egl_ext.h | 7 - gfx/angle/src/libGLESv2/entry_points_gles_2_0.cpp | 1376 ++- .../src/libGLESv2/entry_points_gles_2_0_ext.cpp | 1494 +-- .../src/libGLESv2/entry_points_gles_2_0_ext.h | 332 - gfx/angle/src/libGLESv2/entry_points_gles_3_0.cpp | 342 +- gfx/angle/src/libGLESv2/global_state.cpp | 250 +- gfx/angle/src/libGLESv2/global_state.h | 28 +- gfx/angle/src/libGLESv2/moz.build | 8 + gfx/angle/src/tests/BUILD.gn | 7 +- gfx/angle/src/tests/angle_end2end_tests.gypi | 6 - gfx/angle/src/tests/angle_perftests.gypi | 1 - gfx/angle/src/tests/angle_unittests.gypi | 6 +- gfx/angle/src/tests/angle_unittests_main.cpp | 8 +- gfx/angle/src/tests/angle_unittests_utils.h | 7 +- gfx/angle/src/tests/compiler_tests/API_test.cpp | 4 +- .../BuiltInFunctionEmulator_test.cpp | 43 + .../tests/compiler_tests/CollectVariables_test.cpp | 106 +- .../tests/compiler_tests/ConstantFolding_test.cpp | 272 +- .../compiler_tests/DebugShaderPrecision_test.cpp | 22 - .../EXT_blend_func_extended_test.cpp | 12 +- .../EmulateGLFragColorBroadcast_test.cpp | 2 - .../tests/compiler_tests/ExpressionLimit_test.cpp | 55 +- .../src/tests/compiler_tests/FragDepth_test.cpp | 12 +- .../GLSLCompatibilityOutput_test.cpp | 2 - .../src/tests/compiler_tests/IntermNode_test.cpp | 23 +- .../tests/compiler_tests/MalformedShader_test.cpp | 749 +- .../tests/compiler_tests/NV_draw_buffers_test.cpp | 2 - .../src/tests/compiler_tests/Pack_Unpack_test.cpp | 2 - .../compiler_tests/PruneEmptyDeclarations_test.cpp | 2 - .../compiler_tests/PruneUnusedFunctions_test.cpp | 2 - .../QualificationOrderESSL31_test.cpp | 184 - .../compiler_tests/QualificationOrder_test.cpp | 571 - .../RecordConstantPrecision_test.cpp | 10 +- .../src/tests/compiler_tests/RemovePow_test.cpp | 9 +- .../src/tests/compiler_tests/ShCompile_test.cpp | 18 +- .../tests/compiler_tests/ShaderExtension_test.cpp | 12 +- .../src/tests/compiler_tests/ShaderImage_test.cpp | 259 - .../tests/compiler_tests/ShaderVariable_test.cpp | 66 +- .../src/tests/compiler_tests/TypeTracking_test.cpp | 30 +- .../tests/compiler_tests/UnrollFlatten_test.cpp | 2 - .../tests/compiler_tests/WorkGroupSize_test.cpp | 10 +- gfx/angle/src/tests/deqp.gypi | 14 +- .../src/tests/deqp_support/angle_deqp_gtest.cpp | 157 +- .../tests/deqp_support/angle_deqp_gtest_main.cpp | 9 +- .../src/tests/deqp_support/angle_deqp_libtester.h | 1 - .../deqp_support/angle_deqp_libtester_main.cpp | 32 +- .../deqp_support/deqp_egl_test_expectations.txt | 128 +- .../deqp_support/deqp_gles2_test_expectations.txt | 70 +- .../deqp_support/deqp_gles31_test_expectations.txt | 11505 +------------------ .../deqp_support/deqp_gles3_test_expectations.txt | 18 + .../tests/gl_tests/BindGeneratesResourceTest.cpp | 123 - gfx/angle/src/tests/gl_tests/BlendMinMaxTest.cpp | 79 +- gfx/angle/src/tests/gl_tests/BufferDataTest.cpp | 56 +- .../tests/gl_tests/CopyCompressedTextureTest.cpp | 369 - .../gl_tests/D3D11EmulatedIndexedBufferTest.cpp | 9 +- .../src/tests/gl_tests/D3D11FormatTablesTest.cpp | 14 +- gfx/angle/src/tests/gl_tests/D3DTextureTest.cpp | 326 - gfx/angle/src/tests/gl_tests/DrawBuffersTest.cpp | 21 - gfx/angle/src/tests/gl_tests/ETCTextureTest.cpp | 8 +- gfx/angle/src/tests/gl_tests/GLSLTest.cpp | 188 - gfx/angle/src/tests/gl_tests/MipmapTest.cpp | 10 +- .../gl_tests/MultisampleCompatibilityTest.cpp | 140 +- gfx/angle/src/tests/gl_tests/ReadPixelsTest.cpp | 145 +- .../src/tests/gl_tests/RobustClientMemoryTest.cpp | 385 - .../src/tests/gl_tests/SRGBFramebufferTest.cpp | 141 - gfx/angle/src/tests/gl_tests/SRGBTextureTest.cpp | 122 +- gfx/angle/src/tests/gl_tests/SwizzleTest.cpp | 31 - gfx/angle/src/tests/gl_tests/TextureTest.cpp | 248 +- gfx/angle/src/tests/gl_tests/TimerQueriesTest.cpp | 7 - .../src/tests/gl_tests/TransformFeedbackTest.cpp | 77 +- gfx/angle/src/tests/gl_tests/UniformBufferTest.cpp | 242 +- gfx/angle/src/tests/gl_tests/UniformTest.cpp | 52 +- .../src/tests/gl_tests/VertexAttributeTest.cpp | 2 +- .../src/tests/gl_tests/WebGLCompatibilityTest.cpp | 154 - .../src/tests/perf_tests/IndexDataManagerTest.cpp | 57 +- gfx/angle/src/tests/perf_tests/TexturesPerf.cpp | 293 - .../src/tests/preprocessor_tests/define_test.cpp | 49 +- gfx/angle/src/tests/preprocessor_tests/if_test.cpp | 94 - gfx/angle/src/tests/test_utils/ANGLETest.cpp | 71 +- gfx/angle/src/tests/test_utils/ANGLETest.h | 45 +- gfx/angle/src/tests/test_utils/compiler_test.cpp | 98 +- gfx/angle/src/tests/test_utils/compiler_test.h | 29 +- gfx/angle/src/tests/test_utils/gl_raii.h | 1 - gfx/angle/src/tests/tests.gyp | 40 +- .../gpu_test_expectations/HowToMakeChanges.md | 2 +- .../gpu_test_expectations/angle-mods.patch | 83 +- .../gpu_test_expectations/gpu_test_config.cc | 54 +- .../third_party/compiler/ArrayBoundsClamper.cpp | 8 +- .../src/third_party/compiler/ArrayBoundsClamper.h | 10 +- 584 files changed, 22781 insertions(+), 56816 deletions(-) delete mode 100644 gfx/angle/src/compiler/fuzz/translator_fuzzer.cpp create mode 100644 gfx/angle/src/compiler/preprocessor/pp_utils.h delete mode 100644 gfx/angle/src/compiler/translator/AddAndTrueToLoopCondition.cpp delete mode 100644 gfx/angle/src/compiler/translator/AddAndTrueToLoopCondition.h delete mode 100644 gfx/angle/src/compiler/translator/BreakVariableAliasingInInnerLoops.cpp delete mode 100644 gfx/angle/src/compiler/translator/BreakVariableAliasingInInnerLoops.h delete mode 100644 gfx/angle/src/compiler/translator/ConstantUnion.cpp delete mode 100644 gfx/angle/src/compiler/translator/QualifierTypes.cpp delete mode 100644 gfx/angle/src/compiler/translator/QualifierTypes.h delete mode 100644 gfx/angle/src/compiler/translator/RemoveInvariantDeclaration.cpp delete mode 100644 gfx/angle/src/compiler/translator/RemoveInvariantDeclaration.h create mode 100644 gfx/angle/src/compiler/translator/RenameFunction.h delete mode 100644 gfx/angle/src/compiler/translator/RewriteUnaryMinusOperatorInt.cpp delete mode 100644 gfx/angle/src/compiler/translator/RewriteUnaryMinusOperatorInt.h delete mode 100644 gfx/angle/src/compiler/translator/UseInterfaceBlockFields.cpp delete mode 100644 gfx/angle/src/compiler/translator/UseInterfaceBlockFields.h create mode 100644 gfx/angle/src/compiler/translator/depgraph/DependencyGraph.cpp create mode 100644 gfx/angle/src/compiler/translator/depgraph/DependencyGraph.h create mode 100644 gfx/angle/src/compiler/translator/depgraph/DependencyGraphBuilder.cpp create mode 100644 gfx/angle/src/compiler/translator/depgraph/DependencyGraphBuilder.h create mode 100644 gfx/angle/src/compiler/translator/depgraph/DependencyGraphOutput.cpp create mode 100644 gfx/angle/src/compiler/translator/depgraph/DependencyGraphOutput.h create mode 100644 gfx/angle/src/compiler/translator/depgraph/DependencyGraphTraverse.cpp create mode 100644 gfx/angle/src/compiler/translator/timing/RestrictFragmentShaderTiming.cpp create mode 100644 gfx/angle/src/compiler/translator/timing/RestrictFragmentShaderTiming.h create mode 100644 gfx/angle/src/compiler/translator/timing/RestrictVertexShaderTiming.cpp create mode 100644 gfx/angle/src/compiler/translator/timing/RestrictVertexShaderTiming.h delete mode 100644 gfx/angle/src/libANGLE/Thread.cpp delete mode 100644 gfx/angle/src/libANGLE/Thread.h delete mode 100644 gfx/angle/src/libANGLE/Workarounds.h delete mode 100644 gfx/angle/src/libANGLE/es3_copy_conversion_formats.json delete mode 100644 gfx/angle/src/libANGLE/es3_copy_conversion_table_autogen.cpp delete mode 100644 gfx/angle/src/libANGLE/es3_format_type_combinations.json delete mode 100644 gfx/angle/src/libANGLE/format_map_autogen.cpp delete mode 100644 gfx/angle/src/libANGLE/format_map_data.json delete mode 100644 gfx/angle/src/libANGLE/gen_copy_conversion_table.py delete mode 100644 gfx/angle/src/libANGLE/gen_format_map.py delete mode 100644 gfx/angle/src/libANGLE/queryutils.cpp delete mode 100644 gfx/angle/src/libANGLE/queryutils.h create mode 100644 gfx/angle/src/libANGLE/renderer/Format.cpp create mode 100644 gfx/angle/src/libANGLE/renderer/Format_autogen.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/Format_table_autogen.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/d3d/SwapChainD3D.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_format_data.json delete mode 100644 gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_format_map_autogen.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/d3d/d3d11/gen_dxgi_format_table.py delete mode 100644 gfx/angle/src/libANGLE/renderer/driver_utils.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/driver_utils.h delete mode 100644 gfx/angle/src/libANGLE/renderer/gl/wgl/D3DTextureSurfaceWGL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/gl/wgl/D3DTextureSurfaceWGL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/BufferNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/BufferNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/CompilerNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/CompilerNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/ContextNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/ContextNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/DeviceNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/DeviceNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/DisplayNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/DisplayNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/FenceNVNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/FenceNVNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/FenceSyncNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/FenceSyncNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/FramebufferNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/FramebufferNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/ImageNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/ImageNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/PathNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/PathNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/ProgramNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/ProgramNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/QueryNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/QueryNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/RenderbufferNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/RenderbufferNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/SamplerNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/SamplerNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/ShaderNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/ShaderNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/SurfaceNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/SurfaceNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/TextureNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/TextureNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/TransformFeedbackNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/TransformFeedbackNULL.h delete mode 100644 gfx/angle/src/libANGLE/renderer/null/VertexArrayNULL.cpp delete mode 100644 gfx/angle/src/libANGLE/renderer/null/VertexArrayNULL.h create mode 100644 gfx/angle/src/tests/compiler_tests/BuiltInFunctionEmulator_test.cpp delete mode 100644 gfx/angle/src/tests/compiler_tests/QualificationOrderESSL31_test.cpp delete mode 100644 gfx/angle/src/tests/compiler_tests/QualificationOrder_test.cpp delete mode 100644 gfx/angle/src/tests/compiler_tests/ShaderImage_test.cpp delete mode 100644 gfx/angle/src/tests/gl_tests/BindGeneratesResourceTest.cpp delete mode 100644 gfx/angle/src/tests/gl_tests/CopyCompressedTextureTest.cpp delete mode 100644 gfx/angle/src/tests/gl_tests/D3DTextureTest.cpp delete mode 100644 gfx/angle/src/tests/gl_tests/RobustClientMemoryTest.cpp delete mode 100644 gfx/angle/src/tests/gl_tests/SRGBFramebufferTest.cpp delete mode 100644 gfx/angle/src/tests/gl_tests/WebGLCompatibilityTest.cpp delete mode 100644 gfx/angle/src/tests/perf_tests/TexturesPerf.cpp (limited to 'gfx') diff --git a/gfx/angle/BUILD.gn b/gfx/angle/BUILD.gn index 4232008bc..5c0b1fc32 100755 --- a/gfx/angle/BUILD.gn +++ b/gfx/angle/BUILD.gn @@ -6,8 +6,7 @@ import("//build/config/dcheck_always_on.gni") import("//build/config/linux/pkg_config.gni") import("//build/config/ui.gni") -import("//testing/libfuzzer/fuzzer_test.gni") -import("//third_party/angle/gni/angle.gni") +import("//third_party/angle/build/angle_common.gni") import("//ui/ozone/ozone.gni") if (ozone_platform_gbm) { @@ -55,7 +54,6 @@ config("extra_warnings") { cflags = [ "/we4244", # Conversion: possible loss of data. "/we4456", # Variable shadowing. - "/we4458", # declaration hides class member. ] } } @@ -73,6 +71,22 @@ if (is_win) { angle_undefine_configs = [ "//build/config/compiler:default_include_dirs" ] +component("translator") { + sources = [ + "src/compiler/translator/ShaderLang.cpp", + "src/compiler/translator/ShaderVars.cpp", + ] + + defines = [ "ANGLE_TRANSLATOR_IMPLEMENTATION" ] + + configs -= angle_undefine_configs + configs += [ ":internal_config" ] + + public_deps = [ + ":translator_lib", + ] +} + # Holds the shared includes so we only need to list them once. source_set("includes") { sources = [ @@ -96,14 +110,10 @@ static_library("preprocessor") { configs -= angle_undefine_configs configs += [ ":internal_config" ] - - public_deps = [ - ":angle_common", - ] } -config("translator_disable_pool_alloc") { - defines = [ "ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC" ] +config("translator_static_config") { + defines = [ "ANGLE_TRANSLATOR_STATIC" ] } config("debug_annotations_config") { @@ -162,33 +172,33 @@ static_library("angle_image_util") { ] } -static_library("translator") { - sources = rebase_path(compiler_gypi.angle_translator_sources, ".", "src") +static_library("translator_lib") { + sources = rebase_path(compiler_gypi.angle_translator_lib_sources, ".", "src") defines = [] - if (angle_enable_essl || use_libfuzzer) { + if (angle_enable_essl) { sources += - rebase_path(compiler_gypi.angle_translator_essl_sources, ".", "src") + rebase_path(compiler_gypi.angle_translator_lib_essl_sources, ".", "src") defines += [ "ANGLE_ENABLE_ESSL" ] } - if (angle_enable_glsl || use_libfuzzer) { + if (angle_enable_glsl) { sources += - rebase_path(compiler_gypi.angle_translator_glsl_sources, ".", "src") + rebase_path(compiler_gypi.angle_translator_lib_glsl_sources, ".", "src") defines += [ "ANGLE_ENABLE_GLSL" ] } - if (angle_enable_hlsl || use_libfuzzer) { + if (angle_enable_hlsl) { sources += - rebase_path(compiler_gypi.angle_translator_hlsl_sources, ".", "src") + rebase_path(compiler_gypi.angle_translator_lib_hlsl_sources, ".", "src") defines += [ "ANGLE_ENABLE_HLSL" ] } configs -= angle_undefine_configs - configs += [ ":internal_config" ] + configs += [ + ":internal_config", + ":translator_static_config", + ] public_configs = [ ":external_config" ] - if (use_libfuzzer) { - all_dependent_configs = [ ":translator_disable_pool_alloc" ] - } deps = [ ":includes", @@ -206,18 +216,22 @@ static_library("translator") { } } -source_set("translator_fuzzer") { +static_library("translator_static") { sources = [ - "src/compiler/fuzz/translator_fuzzer.cpp", + "src/compiler/translator/ShaderLang.cpp", + "src/compiler/translator/ShaderVars.cpp", ] - include_dirs = [ - "include", - "src", - ] + if (angle_enable_hlsl) { + defines = [ "ANGLE_ENABLE_HLSL" ] + } - deps = [ - ":translator", + configs -= angle_undefine_configs + configs += [ ":internal_config" ] + public_configs = [ ":translator_static_config" ] + + public_deps = [ + ":translator_lib", ] } @@ -271,13 +285,9 @@ config("libANGLE_config") { if (angle_enable_vulkan) { defines += [ "ANGLE_ENABLE_VULKAN" ] } - if (angle_enable_null) { - defines += [ "ANGLE_ENABLE_NULL" ] - } defines += [ "GL_GLEXT_PROTOTYPES", "EGL_EGLEXT_PROTOTYPES", - "LIBANGLE_IMPLEMENTATION", ] if (is_win) { @@ -301,7 +311,7 @@ static_library("libANGLE") { include_dirs = [] libs = [] - defines = [] + defines = [ "LIBANGLE_IMPLEMENTATION" ] public_deps = [ ":angle_common", ] @@ -309,7 +319,7 @@ static_library("libANGLE") { ":angle_image_util", ":commit_id", ":includes", - ":translator", + ":translator_static", ] # Shared D3D sources. @@ -379,10 +389,6 @@ static_library("libANGLE") { sources += rebase_path(gles_gypi.libangle_vulkan_sources, ".", "src") } - if (angle_enable_null) { - sources += rebase_path(gles_gypi.libangle_null_sources, ".", "src") - } - if (is_debug) { defines += [ "ANGLE_GENERATE_SHADER_DEBUG_INFO" ] } @@ -491,7 +497,7 @@ config("angle_util_config") { } } -shared_library("angle_util") { +static_library("angle_util") { sources = rebase_path(util_gypi.util_sources, ".", "util") if (is_win) { @@ -508,10 +514,6 @@ shared_library("angle_util") { if (is_mac) { sources += rebase_path(util_gypi.util_osx_sources, ".", "util") - libs = [ - "AppKit.framework", - "QuartzCore.framework", - ] } if (use_x11) { @@ -536,7 +538,6 @@ shared_library("angle_util") { defines = [ "GL_GLEXT_PROTOTYPES", "EGL_EGLEXT_PROTOTYPES", - "LIBANGLE_UTIL_IMPLEMENTATION", ] configs += [ @@ -548,13 +549,6 @@ shared_library("angle_util") { ":angle_util_config", ":internal_config", ] - if (is_mac && !is_component_build) { - ldflags = [ - "-install_name", - "@rpath/lib${target_name}.dylib", - ] - public_configs += [ ":shared_library_public_config" ] - } deps = [ ":angle_common", diff --git a/gfx/angle/CONTRIBUTORS b/gfx/angle/CONTRIBUTORS index 9e1a81f4f..fbc478f71 100755 --- a/gfx/angle/CONTRIBUTORS +++ b/gfx/angle/CONTRIBUTORS @@ -64,18 +64,12 @@ Intel Corporation Andy Chen Josh Triplett Sudarsana Nagineni - Jiajia Qin - Jiawei Shao - Jie Chen - Qiankun Miao - Bryan Bernhart Klarälvdalens Datakonsult AB Milian Wolff Mozilla Corp. Ehsan Akhgari - Edwin Flores Jeff Gilbert Mike Hommey Benoit Jacob diff --git a/gfx/angle/DEPS b/gfx/angle/DEPS index 7c39e0093..b5951d6d9 100755 --- a/gfx/angle/DEPS +++ b/gfx/angle/DEPS @@ -3,30 +3,32 @@ vars = { } deps = { - 'third_party/gyp': - Var('chromium_git') + '/external/gyp' + '@' + '81c2e5ff92af29bab61c982808076ddce3d200a2', + "third_party/gyp": + Var('chromium_git') + "/external/gyp@81c2e5ff92af29bab61c982808076ddce3d200a2", - 'testing/gtest': - Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + '6f8a66431cb592dad629028a50b3dd418a408c87', + # TODO(kbr): figure out how to better stay in sync with Chromium's + # versions of googletest and googlemock. + "src/tests/third_party/googletest": + Var('chromium_git') + "/external/googletest.git@9855a87157778d39b95eccfb201a9dc90f6d61c6", - 'testing/gmock': - Var('chromium_git') + '/external/googlemock.git' + '@' + '0421b6f358139f02e102c9c332ce19a33faf75be', # from svn revision 566 + "src/tests/third_party/googlemock": + Var('chromium_git') + "/external/googlemock.git@b2cb211e49d872101d991201362d7b97d7d69910", # Cherry is a dEQP management GUI written in Go. We use it for viewing test results. - 'third_party/cherry': - 'https://android.googlesource.com/platform/external/cherry' + '@' + 'd2e26b4d864ec2a6757e7f1174e464949ca5bf73', + "third_party/cherry": + "https://android.googlesource.com/platform/external/cherry@d2e26b4d864ec2a6757e7f1174e464949ca5bf73", - 'third_party/deqp/src': - 'https://android.googlesource.com/platform/external/deqp' + '@' + 'f4f3d8079e7a37d7675ab93583e6438d0bca0e58', + "third_party/deqp/src": + "https://android.googlesource.com/platform/external/deqp@f4f3d8079e7a37d7675ab93583e6438d0bca0e58", - 'third_party/libpng': - 'https://android.googlesource.com/platform/external/libpng' + '@' + '094e181e79a3d6c23fd005679025058b7df1ad6c', + "third_party/libpng": + "https://android.googlesource.com/platform/external/libpng@094e181e79a3d6c23fd005679025058b7df1ad6c", - 'third_party/zlib': - Var('chromium_git') + '/chromium/src/third_party/zlib' + '@' + 'afd8c4593c010c045902f6c0501718f1823064a3', + "third_party/zlib": + Var('chromium_git') + "/chromium/src/third_party/zlib@afd8c4593c010c045902f6c0501718f1823064a3", - 'buildtools': - Var('chromium_git') + '/chromium/buildtools.git' + '@' + '39b1db2ab4aa4b2ccaa263c29bdf63e7c1ee28aa', + "buildtools": + Var('chromium_git') + '/chromium/buildtools.git@06e80a0e17319868d4a9b13f9bb6a248dc8d8b20', } hooks = [ @@ -100,12 +102,7 @@ hooks = [ }, { # A change to a .gyp, .gypi, or to GYP itself should run the generator. - 'pattern': '.', - 'action': ['python', 'gyp/gyp_angle'], + "pattern": ".", + "action": ["python", "build/gyp_angle"], }, ] - -recursedeps = [ - # buildtools provides clang_format. - 'buildtools', -] diff --git a/gfx/angle/include/EGL/eglext.h b/gfx/angle/include/EGL/eglext.h index 17e8f73cb..fc0a3779b 100755 --- a/gfx/angle/include/EGL/eglext.h +++ b/gfx/angle/include/EGL/eglext.h @@ -472,11 +472,6 @@ EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR #define EGL_DXGI_KEYED_MUTEX_ANGLE 0x33A2 #endif /* EGL_ANGLE_keyed_mutex */ -#ifndef EGL_ANGLE_d3d_texture_client_buffer -#define EGL_ANGLE_d3d_texture_client_buffer 1 -#define EGL_D3D_TEXTURE_ANGLE 0x33A3 -#endif /* EGL_ANGLE_d3d_texture_client_buffer */ - #ifndef EGL_ANGLE_query_surface_pointer #define EGL_ANGLE_query_surface_pointer 1 typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); @@ -531,11 +526,6 @@ EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSu #define EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE 0x320E #endif /* EGL_ANGLE_platform_angle_opengl */ -#ifndef EGL_ANGLE_platform_angle_null -#define EGL_ANGLE_platform_angle_null 1 -#define EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE 0x33AE -#endif /* EGL_ANGLE_platform_angle_null */ - #ifndef EGL_ANGLE_window_fixed_size #define EGL_ANGLE_window_fixed_size 1 #define EGL_FIXED_SIZE_ANGLE 0x3201 @@ -568,7 +558,7 @@ EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSu #ifndef EGL_ANGLE_stream_producer_d3d_texture_nv12 #define EGL_ANGLE_stream_producer_d3d_texture_nv12 -#define EGL_D3D_TEXTURE_SUBRESOURCE_ID_ANGLE 0x33AB +#define EGL_D3D_TEXTURE_SUBRESOURCE_ID_ANGLE 0x3AAB typedef EGLBoolean(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERD3DTEXTURENV12ANGLEPROC)(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMPOSTD3DTEXTURENV12ANGLEPROC)(EGLDisplay dpy, EGLStreamKHR stream, void *texture, const EGLAttrib *attrib_list); #ifdef EGL_EGLEXT_PROTOTYPES @@ -577,16 +567,6 @@ EGLAPI EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureNV12ANGLE(EGLDisplay dpy, E #endif #endif /* EGL_ANGLE_stream_producer_d3d_texture_nv12 */ -#ifndef EGL_ANGLE_create_context_webgl_compatibility -#define EGL_ANGLE_create_context_webgl_compatibility 1 -#define EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE 0x3AAC -#endif /* EGL_ANGLE_create_context_webgl_compatibility */ - -#ifndef EGL_CHROMIUM_create_context_bind_generates_resource -#define EGL_CHROMIUM_create_context_bind_generates_resource 1 -#define EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM 0x3AAD -#endif /* EGL_CHROMIUM_create_context_bind_generates_resource */ - #ifndef EGL_ARM_pixmap_multisample_discard #define EGL_ARM_pixmap_multisample_discard 1 #define EGL_DISCARD_SAMPLES_ARM 0x3286 diff --git a/gfx/angle/include/GLES2/gl2ext.h b/gfx/angle/include/GLES2/gl2ext.h index eba6dcc77..9e92a03a4 100755 --- a/gfx/angle/include/GLES2/gl2ext.h +++ b/gfx/angle/include/GLES2/gl2ext.h @@ -821,14 +821,6 @@ GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GL #endif #endif /* GL_ANGLE_framebuffer_blit */ -#ifndef GL_ANGLE_webgl_compatibility -#define GL_ANGLE_webgl_compatibility 1 -typedef GLboolean(GL_APIENTRYP PFNGLENABLEEXTENSIONANGLEPROC) (const GLchar *name); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL GLboolean GL_APIENTRY glEnableExtensionANGLE (const GLchar *name); -#endif -#endif /* GL_ANGLE_webgl_compatibility */ - #ifndef GL_CHROMIUM_framebuffer_mixed_samples #define GL_CHROMIUM_frambuffer_mixed_samples 1 #define GL_COVERAGE_MODULATION_CHROMIUM 0x9332 @@ -838,11 +830,6 @@ GL_APICALL void GL_APIENTRY glCoverageModulationCHROMIUM(GLenum components); #endif #endif /* GL_CHROMIUM_framebuffer_mixed_samples */ -#ifndef GL_CHROMIUM_bind_generates_resource -#define GL_CHROMIUM_bind_generates_resource 1 -#define GL_BIND_GENERATES_RESOURCE_CHROMIUM 0x9244 -#endif /* GL_CHROMIUM_bind_generates_resource */ - // needed by NV_path_rendering (and thus CHROMIUM_path_rendering) // but CHROMIUM_path_rendering only needs MatrixLoadfEXT, MatrixLoadIdentityEXT #ifndef GL_EXT_direct_state_access @@ -1316,14 +1303,6 @@ GL_APICALL void GL_APIENTRY glCopySubTextureCHROMIUM(GLuint sourceId, #endif #endif /* GL_CHROMIUM_copy_texture */ -#ifndef GL_CHROMIUM_compressed_copy_texture -#define GL_CHROMIUM_compressed_copy_texture 1 -typedef void(GL_APIENTRYP PFNGLCOMPRESSEDCOPYTEXTURECHROMIUMPROC)(GLuint sourceId, GLuint destId); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCompressedCopyTextureCHROMIUM(GLuint sourceId, GLuint destId); -#endif -#endif /* GL_CHROMIUM_compressed_copy_texture */ - #ifndef GL_CHROMIUM_sync_query #define GL_CHROMIUM_sync_query 1 #define GL_COMMANDS_COMPLETED_CHROMIUM 0x84F7 @@ -3255,132 +3234,6 @@ GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); #define GL_COMPRESSED_SRGB8_ALPHA8_LOSSY_DECODE_ETC2_EAC_ANGLE 0x969A #endif /* GL_ANGLE_lossy_etc_decode */ -#ifndef GL_ANGLE_robust_client_memory -#define GL_ANGLE_robust_client_memory 1 -typedef void (GL_APIENTRYP PFNGLGETBOOLEANVROBUSTANGLE) (GLenum pname, GLsizei bufSize, GLsizei *length, GLboolean *data); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVROBUSTANGLE) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETFLOATVROBUSTANGLE) (GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *data); -typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVROBUSTANGLE) (GLenum target, GLenum attachment, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETINTEGERVROBUSTANGLE) (GLenum pname, GLsizei bufSize, GLsizei *length, GLint *data); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVROBUSTANGLE) (GLuint program, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVROBUSTANGLE) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSHADERIVROBUSTANGLE) (GLuint shader, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVROBUSTANGLE) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVROBUSTANGLE) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVROBUSTANGLE) (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVROBUSTANGLE) (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVROBUSTANGLE) (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVROBUSTANGLE) (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVROBUSTANGLE) (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, void **pointer); -typedef void (GL_APIENTRYP PFNGLREADPIXELSROBUSTANGLE) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLsizei *length, void *pixels); -typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DROBUSTANGLE) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLsizei bufSize, const void *pixels); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVROBUSTANGLE) (GLenum target, GLenum pname, GLsizei bufSize, const GLfloat *params); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVROBUSTANGLE) (GLenum target, GLenum pname, GLsizei bufSize, const GLint *params); -typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DROBUSTANGLE) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, const void *pixels); -typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DROBUSTANGLE) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLsizei bufSize, const void *pixels); -typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DROBUSTANGLE) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, const void *pixels); -typedef void (GL_APIENTRYP PFNGLGETQUERYIVROBUSTANGLE) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVROBUSTANGLE) (GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVROBUSTANGLE) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, void **params); -typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VROBUSTANGLE) (GLenum target, GLuint index, GLsizei bufSize, GLsizei *length, GLint *data); -typedef void (GL_APIENTRYP PFNGETINTERNALFORMATIVROBUSTANGLE) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIIVROBUSTANGLE) (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIUIVROBUSTANGLE) (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMUIVROBUSTANGLE) (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLuint *params); -typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVROBUSTANGLE) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETINTEGER64VROBUSTANGLE) (GLenum pname, GLsizei bufSize, GLsizei *length, GLint64 *data); -typedef void (GL_APIENTRYP PFNGLGETINTEGER64I_VROBUSTANGLE) (GLenum target, GLuint index, GLsizei bufSize, GLsizei *length, GLint64 *data); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERI64VROBUSTANGLE) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint64 *params); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIVROBUSTANGLE) (GLuint sampler, GLenum pname, GLsizei bufSize, const GLint *param); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFVROBUSTANGLE) (GLuint sampler, GLenum pname, GLsizei bufSize, const GLfloat *param); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIVROBUSTANGLE) (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERFVROBUSTANGLE) (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVROBUSTANGLE) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMINTERFACEIVROBUSTANGLE) (GLuint program, GLenum programInterface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETBOOLEANI_VROBUSTANGLE) (GLenum target, GLuint index, GLsizei bufSize, GLsizei *length, GLboolean *data); -typedef void (GL_APIENTRYP PFNGLGETMULTISAMPLEFVROBUSTANGLE) (GLenum pname, GLuint index, GLsizei bufSize, GLsizei *length, GLfloat *val); -typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERIVROBUSTANGLE) (GLenum target, GLint level, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERFVROBUSTANGLE) (GLenum target, GLint level, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETPOINTERVROBUSTANGLEROBUSTANGLE) (GLenum pname, GLsizei bufSize, GLsizei *length, void **params); -typedef void (GL_APIENTRYP PFNGLREADNPIXELSROBUSTANGLE) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLsizei *length, void *data); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVROBUSTANGLE) (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVROBUSTANGLE) (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMUIVROBUSTANGLE) (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLuint *params); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVROBUSTANGLE) (GLenum target, GLenum pname, GLsizei bufSize, const GLint *params); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVROBUSTANGLE) (GLenum target, GLenum pname, GLsizei bufSize, const GLuint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVROBUSTANGLE) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVROBUSTANGLE) (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVROBUSTANGLE) (GLuint sampler, GLenum pname, GLsizei bufSize, const GLint *param); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVROBUSTANGLE) (GLuint sampler, GLenum pname, GLsizei bufSize, const GLuint *param); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVROBUSTANGLE) (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVROBUSTANGLE) (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVROBUSTANGLE)(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VROBUSTANGLE)(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLint64 *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VROBUSTANGLE)(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint64 *params); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetBooleanvRobustANGLE (GLenum pname, GLsizei bufSize, GLsizei *length, GLboolean *data); -GL_APICALL void GL_APIENTRY glGetBufferParameterivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetFloatvRobustANGLE (GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *data); -GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameterivRobustANGLE (GLenum target, GLenum attachment, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetIntegervRobustANGLE (GLenum pname, GLsizei bufSize, GLsizei *length, GLint *data); -GL_APICALL void GL_APIENTRY glGetProgramivRobustANGLE (GLuint program, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetRenderbufferParameterivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetShaderivRobustANGLE (GLuint shader, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetTexParameterfvRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetTexParameterivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetUniformfvRobustANGLE (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetUniformivRobustANGLE (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribfvRobustANGLE (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribivRobustANGLE (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribPointervRobustANGLE (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, void **pointer); -GL_APICALL void GL_APIENTRY glReadPixelsRobustANGLE (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLsizei *length, void *pixels); -GL_APICALL void GL_APIENTRY glTexImage2DRobustANGLE (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLsizei bufSize, const void *pixels); -GL_APICALL void GL_APIENTRY glTexParameterfvRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, const GLfloat *params); -GL_APICALL void GL_APIENTRY glTexParameterivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, const GLint *params); -GL_APICALL void GL_APIENTRY glTexSubImage2DRobustANGLE (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, const void *pixels); -GL_APICALL void GL_APIENTRY glTexImage3DRobustANGLE (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLsizei bufSize, const void *pixels); -GL_APICALL void GL_APIENTRY glTexSubImage3DRobustANGLE (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, const void *pixels); -GL_APICALL void GL_APIENTRY glGetQueryivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectuivRobustANGLE (GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params); -GL_APICALL void GL_APIENTRY glGetBufferPointervRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, void **params); -GL_APICALL void GL_APIENTRY glGetIntegeri_vRobustANGLE (GLenum target, GLuint index, GLsizei bufSize, GLsizei *length, GLint *data); -GL_APICALL void GL_APIENTRY glGetInternalformativRobustANGLE (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribIivRobustANGLE (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribIuivRobustANGLE (GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params); -GL_APICALL void GL_APIENTRY glGetUniformuivRobustANGLE (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLuint *params); -GL_APICALL void GL_APIENTRY glGetActiveUniformBlockivRobustANGLE (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetInteger64vRobustANGLE (GLenum pname, GLsizei bufSize, GLsizei *length, GLint64 *data); -GL_APICALL void GL_APIENTRY glGetInteger64i_vRobustANGLE (GLenum target, GLuint index, GLsizei bufSize, GLsizei *length, GLint64 *data); -GL_APICALL void GL_APIENTRY glGetBufferParameteri64vRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint64 *params); -GL_APICALL void GL_APIENTRY glSamplerParameterivRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, const GLint *param); -GL_APICALL void GL_APIENTRY glSamplerParameterfvRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, const GLfloat *param); -GL_APICALL void GL_APIENTRY glGetSamplerParameterivRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetSamplerParameterfvRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetFramebufferParameterivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetProgramInterfaceivRobustANGLE (GLuint program, GLenum programInterface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetBooleani_vRobustANGLE (GLenum target, GLuint index, GLsizei bufSize, GLsizei *length, GLboolean *data); -GL_APICALL void GL_APIENTRY glGetMultisamplefvRobustANGLE (GLenum pname, GLuint index, GLsizei bufSize, GLsizei *length, GLfloat *val); -GL_APICALL void GL_APIENTRY glGetTexLevelParameterivRobustANGLE (GLenum target, GLint level, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetTexLevelParameterfvRobustANGLE (GLenum target, GLint level, GLenum pname, GLsizei bufSize, GLsizei *length, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetPointervRobustANGLERobustANGLE (GLenum pname, GLsizei bufSize, GLsizei *length, void **params); -GL_APICALL void GL_APIENTRY glReadnPixelsRobustANGLE (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLsizei *length, void *data); -GL_APICALL void GL_APIENTRY glGetnUniformfvRobustANGLE (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetnUniformivRobustANGLE (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetnUniformuivRobustANGLE (GLuint program, GLint location, GLsizei bufSize, GLsizei *length, GLuint *params); -GL_APICALL void GL_APIENTRY glTexParameterIivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, const GLint *params); -GL_APICALL void GL_APIENTRY glTexParameterIuivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, const GLuint *params); -GL_APICALL void GL_APIENTRY glGetTexParameterIivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetTexParameterIuivRobustANGLE (GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params); -GL_APICALL void GL_APIENTRY glSamplerParameterIivRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, const GLint *param); -GL_APICALL void GL_APIENTRY glSamplerParameterIuivRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, const GLuint *param); -GL_APICALL void GL_APIENTRY glGetSamplerParameterIivRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivRobustANGLE (GLuint sampler, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectivRobustANGLE(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjecti64vRobustANGLE(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLint64 *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectui64vRobustANGLE(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, GLuint64 *params); -#endif -#endif /* GL_ANGLE_robust_client_memory */ - #ifdef __cplusplus } #endif diff --git a/gfx/angle/include/GLSLANG/ShaderLang.h b/gfx/angle/include/GLSLANG/ShaderLang.h index deead5e43..47c7533e0 100755 --- a/gfx/angle/include/GLSLANG/ShaderLang.h +++ b/gfx/angle/include/GLSLANG/ShaderLang.h @@ -6,6 +6,23 @@ #ifndef GLSLANG_SHADERLANG_H_ #define GLSLANG_SHADERLANG_H_ +#if defined(COMPONENT_BUILD) && !defined(ANGLE_TRANSLATOR_STATIC) +#if defined(_WIN32) || defined(_WIN64) + +#if defined(ANGLE_TRANSLATOR_IMPLEMENTATION) +#define COMPILER_EXPORT __declspec(dllexport) +#else +#define COMPILER_EXPORT __declspec(dllimport) +#endif // defined(ANGLE_TRANSLATOR_IMPLEMENTATION) + +#else // defined(_WIN32) || defined(_WIN64) +#define COMPILER_EXPORT __attribute__((visibility("default"))) +#endif + +#else // defined(COMPONENT_BUILD) && !defined(ANGLE_TRANSLATOR_STATIC) +#define COMPILER_EXPORT +#endif + #include #include "KHR/khrplatform.h" @@ -32,10 +49,9 @@ typedef unsigned int GLenum; // Version number for shader translation API. // It is incremented every time the API changes. -#define ANGLE_SH_VERSION 167 +#define ANGLE_SH_VERSION 155 -enum ShShaderSpec -{ +typedef enum { SH_GLES2_SPEC, SH_WEBGL_SPEC, @@ -44,9 +60,31 @@ enum ShShaderSpec SH_GLES3_1_SPEC, SH_WEBGL3_SPEC, -}; -enum ShShaderOutput + // The CSS Shaders spec is a subset of the WebGL spec. + // + // In both CSS vertex and fragment shaders, ANGLE: + // (1) Reserves the "css_" prefix. + // (2) Renames the main function to css_main. + // (3) Disables the gl_MaxDrawBuffers built-in. + // + // In CSS fragment shaders, ANGLE: + // (1) Disables the gl_FragColor built-in. + // (2) Disables the gl_FragData built-in. + // (3) Enables the css_MixColor built-in. + // (4) Enables the css_ColorMatrix built-in. + // + // After passing a CSS shader through ANGLE, the browser is expected to append + // a new main function to it. + // This new main function will call the css_main function. + // It may also perform additional operations like varying assignment, texture + // access, and gl_FragColor assignment in order to implement the CSS Shaders + // blend modes. + // + SH_CSS_SHADERS_SPEC +} ShShaderSpec; + +typedef enum { // ESSL output only supported in some configurations. SH_ESSL_OUTPUT = 0x8B45, @@ -65,171 +103,166 @@ enum ShShaderOutput SH_GLSL_440_CORE_OUTPUT = 0x8B87, SH_GLSL_450_CORE_OUTPUT = 0x8B88, + // HLSL output only supported in some configurations. + // Deprecated: + SH_HLSL_OUTPUT = 0x8B48, + SH_HLSL9_OUTPUT = 0x8B48, + SH_HLSL11_OUTPUT = 0x8B49, + // Prefer using these to specify HLSL output type: SH_HLSL_3_0_OUTPUT = 0x8B48, // D3D 9 SH_HLSL_4_1_OUTPUT = 0x8B49, // D3D 11 SH_HLSL_4_0_FL9_3_OUTPUT = 0x8B4A // D3D 11 feature level 9_3 -}; +} ShShaderOutput; // Compile options. - -using ShCompileOptions = uint64_t; - -const ShCompileOptions SH_VALIDATE = 0; -const ShCompileOptions SH_VALIDATE_LOOP_INDEXING = UINT64_C(1) << 0; -const ShCompileOptions SH_INTERMEDIATE_TREE = UINT64_C(1) << 1; -const ShCompileOptions SH_OBJECT_CODE = UINT64_C(1) << 2; -const ShCompileOptions SH_VARIABLES = UINT64_C(1) << 3; -const ShCompileOptions SH_LINE_DIRECTIVES = UINT64_C(1) << 4; -const ShCompileOptions SH_SOURCE_PATH = UINT64_C(1) << 5; -const ShCompileOptions SH_UNROLL_FOR_LOOP_WITH_INTEGER_INDEX = UINT64_C(1) << 6; -// If a sampler array index happens to be a loop index, -// 1) if its type is integer, unroll the loop. -// 2) if its type is float, fail the shader compile. -// This is to work around a mac driver bug. -const ShCompileOptions SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX = UINT64_C(1) << 7; - -// This flag works around bug in Intel Mac drivers related to abs(i) where -// i is an integer. -const ShCompileOptions SH_EMULATE_ABS_INT_FUNCTION = UINT64_C(1) << 8; - -// Enforce the GLSL 1.017 Appendix A section 7 packing restrictions. -// This flag only enforces (and can only enforce) the packing -// restrictions for uniform variables in both vertex and fragment -// shaders. ShCheckVariablesWithinPackingLimits() lets embedders -// enforce the packing restrictions for varying variables during -// program link time. -const ShCompileOptions SH_ENFORCE_PACKING_RESTRICTIONS = UINT64_C(1) << 9; - -// This flag ensures all indirect (expression-based) array indexing -// is clamped to the bounds of the array. This ensures, for example, -// that you cannot read off the end of a uniform, whether an array -// vec234, or mat234 type. The ShArrayIndexClampingStrategy enum, -// specified in the ShBuiltInResources when constructing the -// compiler, selects the strategy for the clamping implementation. -const ShCompileOptions SH_CLAMP_INDIRECT_ARRAY_BOUNDS = UINT64_C(1) << 10; - -// This flag limits the complexity of an expression. -const ShCompileOptions SH_LIMIT_EXPRESSION_COMPLEXITY = UINT64_C(1) << 11; - -// This flag limits the depth of the call stack. -const ShCompileOptions SH_LIMIT_CALL_STACK_DEPTH = UINT64_C(1) << 12; - -// This flag initializes gl_Position to vec4(0,0,0,0) at the -// beginning of the vertex shader's main(), and has no effect in the -// fragment shader. It is intended as a workaround for drivers which -// incorrectly fail to link programs if gl_Position is not written. -const ShCompileOptions SH_INIT_GL_POSITION = UINT64_C(1) << 13; - -// This flag replaces -// "a && b" with "a ? b : false", -// "a || b" with "a ? true : b". -// This is to work around a MacOSX driver bug that |b| is executed -// independent of |a|'s value. -const ShCompileOptions SH_UNFOLD_SHORT_CIRCUIT = UINT64_C(1) << 14; - -// This flag initializes output variables to 0 at the beginning of main(). -// It is to avoid undefined behaviors. -const ShCompileOptions SH_INIT_OUTPUT_VARIABLES = UINT64_C(1) << 15; - -// This flag scalarizes vec/ivec/bvec/mat constructor args. -// It is intended as a workaround for Linux/Mac driver bugs. -const ShCompileOptions SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS = UINT64_C(1) << 16; - -// This flag overwrites a struct name with a unique prefix. -// It is intended as a workaround for drivers that do not handle -// struct scopes correctly, including all Mac drivers and Linux AMD. -const ShCompileOptions SH_REGENERATE_STRUCT_NAMES = UINT64_C(1) << 17; - -// This flag makes the compiler not prune unused function early in the -// compilation process. Pruning coupled with SH_LIMIT_CALL_STACK_DEPTH -// helps avoid bad shaders causing stack overflows. -const ShCompileOptions SH_DONT_PRUNE_UNUSED_FUNCTIONS = UINT64_C(1) << 18; - -// This flag works around a bug in NVIDIA 331 series drivers related -// to pow(x, y) where y is a constant vector. -const ShCompileOptions SH_REMOVE_POW_WITH_CONSTANT_EXPONENT = UINT64_C(1) << 19; - -// This flag works around bugs in Mac drivers related to do-while by -// transforming them into an other construct. -const ShCompileOptions SH_REWRITE_DO_WHILE_LOOPS = UINT64_C(1) << 20; - -// This flag works around a bug in the HLSL compiler optimizer that folds certain -// constant pow expressions incorrectly. Only applies to the HLSL back-end. It works -// by expanding the integer pow expressions into a series of multiplies. -const ShCompileOptions SH_EXPAND_SELECT_HLSL_INTEGER_POW_EXPRESSIONS = UINT64_C(1) << 21; - -// Flatten "#pragma STDGL invariant(all)" into the declarations of -// varying variables and built-in GLSL variables. This compiler -// option is enabled automatically when needed. -const ShCompileOptions SH_FLATTEN_PRAGMA_STDGL_INVARIANT_ALL = UINT64_C(1) << 22; - -// Some drivers do not take into account the base level of the texture in the results of the -// HLSL GetDimensions builtin. This flag instructs the compiler to manually add the base level -// offsetting. -const ShCompileOptions SH_HLSL_GET_DIMENSIONS_IGNORES_BASE_LEVEL = UINT64_C(1) << 23; - -// This flag works around an issue in translating GLSL function texelFetchOffset on -// INTEL drivers. It works by translating texelFetchOffset into texelFetch. -const ShCompileOptions SH_REWRITE_TEXELFETCHOFFSET_TO_TEXELFETCH = UINT64_C(1) << 24; - -// This flag works around condition bug of for and while loops in Intel Mac OSX drivers. -// Condition calculation is not correct. Rewrite it from "CONDITION" to "CONDITION && true". -const ShCompileOptions SH_ADD_AND_TRUE_TO_LOOP_CONDITION = UINT64_C(1) << 25; - -// This flag works around a bug in evaluating unary minus operator on integer on some INTEL -// drivers. It works by translating -(int) into ~(int) + 1. -const ShCompileOptions SH_REWRITE_INTEGER_UNARY_MINUS_OPERATOR = UINT64_C(1) << 26; - -// This flag works around a bug in evaluating isnan() on some INTEL D3D and Mac OSX drivers. -// It works by using an expression to emulate this function. -const ShCompileOptions SH_EMULATE_ISNAN_FLOAT_FUNCTION = UINT64_C(1) << 27; - -// This flag will use all uniforms of unused std140 and shared uniform blocks at the -// beginning of the vertex/fragment shader's main(). It is intended as a workaround for Mac -// drivers with shader version 4.10. In those drivers, they will treat unused -// std140 and shared uniform blocks' members as inactive. However, WebGL2.0 based on -// OpenGL ES3.0.4 requires all members of a named uniform block declared with a shared or std140 -// layout qualifier to be considered active. The uniform block itself is also considered active. -const ShCompileOptions SH_USE_UNUSED_STANDARD_SHARED_BLOCKS = UINT64_C(1) << 28; - -// This flag will keep invariant declaration for input in fragment shader for GLSL >=4.20 on AMD. -// From GLSL >= 4.20, it's optional to add invariant for fragment input, but GPU vendors have -// different implementations about this. Some drivers forbid invariant in fragment for GLSL>= 4.20, -// e.g. Linux Mesa, some drivers treat that as optional, e.g. NVIDIA, some drivers require invariant -// must match between vertex and fragment shader, e.g. AMD. The behavior on AMD is obviously wrong. -// Remove invariant for input in fragment shader to workaround the restriction on Intel Mesa. -// But don't remove on AMD Linux to avoid triggering the bug on AMD. -const ShCompileOptions SH_DONT_REMOVE_INVARIANT_FOR_FRAGMENT_INPUT = UINT64_C(1) << 29; - -// Due to spec difference between GLSL 4.1 or lower and ESSL3, some platforms (for example, Mac OSX -// core profile) require a variable's "invariant"/"centroid" qualifiers to match between vertex and -// fragment shader. A simple solution to allow such shaders to link is to omit the two qualifiers. -// Note that the two flags only take effect on ESSL3 input shaders translated to GLSL 4.1 or lower. -// TODO(zmo): This is not a good long-term solution. Simply dropping these qualifiers may break some -// developers' content. A more complex workaround of dynamically generating, compiling, and -// re-linking shaders that use these qualifiers should be implemented. -const ShCompileOptions SH_REMOVE_INVARIANT_AND_CENTROID_FOR_ESSL3 = UINT64_C(1) << 30; +typedef enum { + SH_VALIDATE = 0, + SH_VALIDATE_LOOP_INDEXING = 0x0001, + SH_INTERMEDIATE_TREE = 0x0002, + SH_OBJECT_CODE = 0x0004, + SH_VARIABLES = 0x0008, + SH_LINE_DIRECTIVES = 0x0010, + SH_SOURCE_PATH = 0x0020, + SH_UNROLL_FOR_LOOP_WITH_INTEGER_INDEX = 0x0040, + // If a sampler array index happens to be a loop index, + // 1) if its type is integer, unroll the loop. + // 2) if its type is float, fail the shader compile. + // This is to work around a mac driver bug. + SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX = 0x0080, + + // This is needed only as a workaround for certain OpenGL driver bugs. + SH_EMULATE_BUILT_IN_FUNCTIONS = 0x0100, + + // This is an experimental flag to enforce restrictions that aim to prevent + // timing attacks. + // It generates compilation errors for shaders that could expose sensitive + // texture information via the timing channel. + // To use this flag, you must compile the shader under the WebGL spec + // (using the SH_WEBGL_SPEC flag). + SH_TIMING_RESTRICTIONS = 0x0200, + + // This flag prints the dependency graph that is used to enforce timing + // restrictions on fragment shaders. + // This flag only has an effect if all of the following are true: + // - The shader spec is SH_WEBGL_SPEC. + // - The compile options contain the SH_TIMING_RESTRICTIONS flag. + // - The shader type is GL_FRAGMENT_SHADER. + SH_DEPENDENCY_GRAPH = 0x0400, + + // Enforce the GLSL 1.017 Appendix A section 7 packing restrictions. + // This flag only enforces (and can only enforce) the packing + // restrictions for uniform variables in both vertex and fragment + // shaders. ShCheckVariablesWithinPackingLimits() lets embedders + // enforce the packing restrictions for varying variables during + // program link time. + SH_ENFORCE_PACKING_RESTRICTIONS = 0x0800, + + // This flag ensures all indirect (expression-based) array indexing + // is clamped to the bounds of the array. This ensures, for example, + // that you cannot read off the end of a uniform, whether an array + // vec234, or mat234 type. The ShArrayIndexClampingStrategy enum, + // specified in the ShBuiltInResources when constructing the + // compiler, selects the strategy for the clamping implementation. + SH_CLAMP_INDIRECT_ARRAY_BOUNDS = 0x1000, + + // This flag limits the complexity of an expression. + SH_LIMIT_EXPRESSION_COMPLEXITY = 0x2000, + + // This flag limits the depth of the call stack. + SH_LIMIT_CALL_STACK_DEPTH = 0x4000, + + // This flag initializes gl_Position to vec4(0,0,0,0) at the + // beginning of the vertex shader's main(), and has no effect in the + // fragment shader. It is intended as a workaround for drivers which + // incorrectly fail to link programs if gl_Position is not written. + SH_INIT_GL_POSITION = 0x8000, + + // This flag replaces + // "a && b" with "a ? b : false", + // "a || b" with "a ? true : b". + // This is to work around a MacOSX driver bug that |b| is executed + // independent of |a|'s value. + SH_UNFOLD_SHORT_CIRCUIT = 0x10000, + + // This flag initializes output variables to 0 at the beginning of main(). + // It is to avoid undefined behaviors. + SH_INIT_OUTPUT_VARIABLES = 0x20000, + // TODO(zmo): obsolete, remove after ANGLE roll into Chromium. + SH_INIT_VARYINGS_WITHOUT_STATIC_USE = 0x20000, + + // This flag scalarizes vec/ivec/bvec/mat constructor args. + // It is intended as a workaround for Linux/Mac driver bugs. + SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS = 0x40000, + + // This flag overwrites a struct name with a unique prefix. + // It is intended as a workaround for drivers that do not handle + // struct scopes correctly, including all Mac drivers and Linux AMD. + SH_REGENERATE_STRUCT_NAMES = 0x80000, + + // This flag makes the compiler not prune unused function early in the + // compilation process. Pruning coupled with SH_LIMIT_CALL_STACK_DEPTH + // helps avoid bad shaders causing stack overflows. + SH_DONT_PRUNE_UNUSED_FUNCTIONS = 0x100000, + + // This flag works around a bug in NVIDIA 331 series drivers related + // to pow(x, y) where y is a constant vector. + SH_REMOVE_POW_WITH_CONSTANT_EXPONENT = 0x200000, + + // This flag works around bugs in Mac drivers related to do-while by + // transforming them into an other construct. + SH_REWRITE_DO_WHILE_LOOPS = 0x400000, + + // This flag works around a bug in the HLSL compiler optimizer that folds certain + // constant pow expressions incorrectly. Only applies to the HLSL back-end. It works + // by expanding the integer pow expressions into a series of multiplies. + SH_EXPAND_SELECT_HLSL_INTEGER_POW_EXPRESSIONS = 0x800000, + + // Flatten "#pragma STDGL invariant(all)" into the declarations of + // varying variables and built-in GLSL variables. This compiler + // option is enabled automatically when needed. + SH_FLATTEN_PRAGMA_STDGL_INVARIANT_ALL = 0x1000000, + + // Some drivers do not take into account the base level of the texture in the results of the + // HLSL GetDimensions builtin. This flag instructs the compiler to manually add the base level + // offsetting. + SH_HLSL_GET_DIMENSIONS_IGNORES_BASE_LEVEL = 0x2000000, + + // This flag works around an issue in translating GLSL function texelFetchOffset on + // INTEL drivers. It works by translating texelFetchOffset into texelFetch. + SH_REWRITE_TEXELFETCHOFFSET_TO_TEXELFETCH = 0x4000000, +} ShCompileOptions; // Defines alternate strategies for implementing array index clamping. -enum ShArrayIndexClampingStrategy -{ - // Use the clamp intrinsic for array index clamping. - SH_CLAMP_WITH_CLAMP_INTRINSIC = 1, +typedef enum { + // Use the clamp intrinsic for array index clamping. + SH_CLAMP_WITH_CLAMP_INTRINSIC = 1, + + // Use a user-defined function for array index clamping. + SH_CLAMP_WITH_USER_DEFINED_INT_CLAMP_FUNCTION +} ShArrayIndexClampingStrategy; - // Use a user-defined function for array index clamping. - SH_CLAMP_WITH_USER_DEFINED_INT_CLAMP_FUNCTION -}; +// +// Driver must call this first, once, before doing any other +// compiler operations. +// If the function succeeds, the return value is true, else false. +// +COMPILER_EXPORT bool ShInitialize(); +// +// Driver should call this at shutdown. +// If the function succeeds, the return value is true, else false. +// +COMPILER_EXPORT bool ShFinalize(); // The 64 bits hash function. The first parameter is the input string; the // second parameter is the string length. -using ShHashFunction64 = khronos_uint64_t (*)(const char *, size_t); +typedef khronos_uint64_t (*ShHashFunction64)(const char*, size_t); // // Implementation dependent built-in resources (constants and extensions). // The names for these resources has been obtained by stripping gl_/GL_. // -struct ShBuiltInResources +typedef struct { // Constants. int MaxVertexAttribs; @@ -361,7 +394,15 @@ struct ShBuiltInResources // maximum number of buffer object storage in machine units int MaxAtomicCounterBufferSize; -}; + +} ShBuiltInResources; + +// +// Initialize built-in resources with minimum expected values. +// Parameters: +// resources: The object to initialize. Will be comparable with memcmp. +// +COMPILER_EXPORT void ShInitBuiltInResources(ShBuiltInResources *resources); // // ShHandle held by but opaque to the driver. It is allocated, @@ -370,26 +411,7 @@ struct ShBuiltInResources // // If handle creation fails, 0 will be returned. // -using ShHandle = void *; - -// -// Driver must call this first, once, before doing any other -// compiler operations. -// If the function succeeds, the return value is true, else false. -// -bool ShInitialize(); -// -// Driver should call this at shutdown. -// If the function succeeds, the return value is true, else false. -// -bool ShFinalize(); - -// -// Initialize built-in resources with minimum expected values. -// Parameters: -// resources: The object to initialize. Will be comparable with memcmp. -// -void ShInitBuiltInResources(ShBuiltInResources *resources); +typedef void *ShHandle; // // Returns the a concatenated list of the items in ShBuiltInResources as a @@ -397,7 +419,7 @@ void ShInitBuiltInResources(ShBuiltInResources *resources); // This function must be updated whenever ShBuiltInResources is changed. // Parameters: // handle: Specifies the handle of the compiler to be used. -const std::string &ShGetBuiltInResourcesString(const ShHandle handle); +COMPILER_EXPORT const std::string &ShGetBuiltInResourcesString(const ShHandle handle); // // Driver calls these to create and destroy compiler objects. @@ -412,11 +434,12 @@ const std::string &ShGetBuiltInResourcesString(const ShHandle handle); // SH_HLSL_3_0_OUTPUT or SH_HLSL_4_1_OUTPUT. Note: Each output type may only // be supported in some configurations. // resources: Specifies the built-in resources. -ShHandle ShConstructCompiler(sh::GLenum type, - ShShaderSpec spec, - ShShaderOutput output, - const ShBuiltInResources *resources); -void ShDestruct(ShHandle handle); +COMPILER_EXPORT ShHandle ShConstructCompiler( + sh::GLenum type, + ShShaderSpec spec, + ShShaderOutput output, + const ShBuiltInResources *resources); +COMPILER_EXPORT void ShDestruct(ShHandle handle); // // Compiles the given shader source. @@ -436,42 +459,45 @@ void ShDestruct(ShHandle handle); // There is no need to specify this parameter when // compiling for WebGL - it is implied. // SH_INTERMEDIATE_TREE: Writes intermediate tree to info log. -// Can be queried by calling sh::GetInfoLog(). +// Can be queried by calling ShGetInfoLog(). // SH_OBJECT_CODE: Translates intermediate tree to glsl or hlsl shader. -// Can be queried by calling sh::GetObjectCode(). +// Can be queried by calling ShGetObjectCode(). // SH_VARIABLES: Extracts attributes, uniforms, and varyings. // Can be queried by calling ShGetVariableInfo(). // -bool ShCompile(const ShHandle handle, - const char *const shaderStrings[], - size_t numStrings, - ShCompileOptions compileOptions); +COMPILER_EXPORT bool ShCompile( + const ShHandle handle, + const char * const shaderStrings[], + size_t numStrings, + int compileOptions); // Clears the results from the previous compilation. -void ShClearResults(const ShHandle handle); +COMPILER_EXPORT void ShClearResults(const ShHandle handle); // Return the version of the shader language. -int ShGetShaderVersion(const ShHandle handle); +COMPILER_EXPORT int ShGetShaderVersion(const ShHandle handle); // Return the currently set language output type. -ShShaderOutput ShGetShaderOutputType(const ShHandle handle); +COMPILER_EXPORT ShShaderOutput ShGetShaderOutputType( + const ShHandle handle); // Returns null-terminated information log for a compiled shader. // Parameters: // handle: Specifies the compiler -const std::string &ShGetInfoLog(const ShHandle handle); +COMPILER_EXPORT const std::string &ShGetInfoLog(const ShHandle handle); // Returns null-terminated object code for a compiled shader. // Parameters: // handle: Specifies the compiler -const std::string &ShGetObjectCode(const ShHandle handle); +COMPILER_EXPORT const std::string &ShGetObjectCode(const ShHandle handle); // Returns a (original_name, hash) map containing all the user defined // names in the shader, including variable names, function names, struct // names, and struct field names. // Parameters: // handle: Specifies the compiler -const std::map *ShGetNameHashingMap(const ShHandle handle); +COMPILER_EXPORT const std::map *ShGetNameHashingMap( + const ShHandle handle); // Shader variable inspection. // Returns a pointer to a list of variables of the designated type. @@ -479,12 +505,18 @@ const std::map *ShGetNameHashingMap(const ShHandle han // Returns NULL on failure. // Parameters: // handle: Specifies the compiler -const std::vector *ShGetUniforms(const ShHandle handle); -const std::vector *ShGetVaryings(const ShHandle handle); -const std::vector *ShGetAttributes(const ShHandle handle); -const std::vector *ShGetOutputVariables(const ShHandle handle); -const std::vector *ShGetInterfaceBlocks(const ShHandle handle); -sh::WorkGroupSize ShGetComputeShaderLocalGroupSize(const ShHandle handle); +COMPILER_EXPORT const std::vector *ShGetUniforms(const ShHandle handle); +COMPILER_EXPORT const std::vector *ShGetVaryings(const ShHandle handle); +COMPILER_EXPORT const std::vector *ShGetAttributes(const ShHandle handle); +COMPILER_EXPORT const std::vector *ShGetOutputVariables(const ShHandle handle); +COMPILER_EXPORT const std::vector *ShGetInterfaceBlocks(const ShHandle handle); +COMPILER_EXPORT sh::WorkGroupSize ShGetComputeShaderLocalGroupSize(const ShHandle handle); + +typedef struct +{ + sh::GLenum type; + int size; +} ShVariableInfo; // Returns true if the passed in variables pack in maxVectors following // the packing rules from the GLSL 1.017 spec, Appendix A, section 7. @@ -493,8 +525,9 @@ sh::WorkGroupSize ShGetComputeShaderLocalGroupSize(const ShHandle handle); // Parameters: // maxVectors: the available rows of registers. // variables: an array of variables. -bool ShCheckVariablesWithinPackingLimits(int maxVectors, - const std::vector &variables); +COMPILER_EXPORT bool ShCheckVariablesWithinPackingLimits( + int maxVectors, + const std::vector &variables); // Gives the compiler-assigned register for an interface block. // The method writes the value to the output variable "indexOut". @@ -503,155 +536,14 @@ bool ShCheckVariablesWithinPackingLimits(int maxVectors, // handle: Specifies the compiler // interfaceBlockName: Specifies the interface block // indexOut: output variable that stores the assigned register -bool ShGetInterfaceBlockRegister(const ShHandle handle, - const std::string &interfaceBlockName, - unsigned int *indexOut); +COMPILER_EXPORT bool ShGetInterfaceBlockRegister(const ShHandle handle, + const std::string &interfaceBlockName, + unsigned int *indexOut); // Gives a map from uniform names to compiler-assigned registers in the default // interface block. Note that the map contains also registers of samplers that // have been extracted from structs. -const std::map *ShGetUniformRegisterMap(const ShHandle handle); - -// Temporary duplicate of the scoped APIs, to be removed when we roll ANGLE and fix Chromium. -// TODO(jmadill): Consolidate with these APIs once we roll ANGLE. - -namespace sh -{ - -// -// Driver must call this first, once, before doing any other compiler operations. -// If the function succeeds, the return value is true, else false. -// -bool Initialize(); -// -// Driver should call this at shutdown. -// If the function succeeds, the return value is true, else false. -// -bool Finalize(); - -// -// Initialize built-in resources with minimum expected values. -// Parameters: -// resources: The object to initialize. Will be comparable with memcmp. -// -void InitBuiltInResources(ShBuiltInResources *resources); - -// -// Returns the a concatenated list of the items in ShBuiltInResources as a null-terminated string. -// This function must be updated whenever ShBuiltInResources is changed. -// Parameters: -// handle: Specifies the handle of the compiler to be used. -const std::string &GetBuiltInResourcesString(const ShHandle handle); - -// -// Driver calls these to create and destroy compiler objects. -// -// Returns the handle of constructed compiler, null if the requested compiler is not supported. -// Parameters: -// type: Specifies the type of shader - GL_FRAGMENT_SHADER or GL_VERTEX_SHADER. -// spec: Specifies the language spec the compiler must conform to - SH_GLES2_SPEC or SH_WEBGL_SPEC. -// output: Specifies the output code type - for example SH_ESSL_OUTPUT, SH_GLSL_OUTPUT, -// SH_HLSL_3_0_OUTPUT or SH_HLSL_4_1_OUTPUT. Note: Each output type may only -// be supported in some configurations. -// resources: Specifies the built-in resources. -ShHandle ConstructCompiler(sh::GLenum type, - ShShaderSpec spec, - ShShaderOutput output, - const ShBuiltInResources *resources); -void Destruct(ShHandle handle); - -// -// Compiles the given shader source. -// If the function succeeds, the return value is true, else false. -// Parameters: -// handle: Specifies the handle of compiler to be used. -// shaderStrings: Specifies an array of pointers to null-terminated strings containing the shader -// source code. -// numStrings: Specifies the number of elements in shaderStrings array. -// compileOptions: A mask containing the following parameters: -// SH_VALIDATE: Validates shader to ensure that it conforms to the spec -// specified during compiler construction. -// SH_VALIDATE_LOOP_INDEXING: Validates loop and indexing in the shader to -// ensure that they do not exceed the minimum -// functionality mandated in GLSL 1.0 spec, -// Appendix A, Section 4 and 5. -// There is no need to specify this parameter when -// compiling for WebGL - it is implied. -// SH_INTERMEDIATE_TREE: Writes intermediate tree to info log. -// Can be queried by calling sh::GetInfoLog(). -// SH_OBJECT_CODE: Translates intermediate tree to glsl or hlsl shader. -// Can be queried by calling sh::GetObjectCode(). -// SH_VARIABLES: Extracts attributes, uniforms, and varyings. -// Can be queried by calling ShGetVariableInfo(). -// -bool Compile(const ShHandle handle, - const char *const shaderStrings[], - size_t numStrings, - ShCompileOptions compileOptions); - -// Clears the results from the previous compilation. -void ClearResults(const ShHandle handle); - -// Return the version of the shader language. -int GetShaderVersion(const ShHandle handle); - -// Return the currently set language output type. -ShShaderOutput GetShaderOutputType(const ShHandle handle); - -// Returns null-terminated information log for a compiled shader. -// Parameters: -// handle: Specifies the compiler -const std::string &GetInfoLog(const ShHandle handle); - -// Returns null-terminated object code for a compiled shader. -// Parameters: -// handle: Specifies the compiler -const std::string &GetObjectCode(const ShHandle handle); - -// Returns a (original_name, hash) map containing all the user defined names in the shader, -// including variable names, function names, struct names, and struct field names. -// Parameters: -// handle: Specifies the compiler -const std::map *GetNameHashingMap(const ShHandle handle); - -// Shader variable inspection. -// Returns a pointer to a list of variables of the designated type. -// (See ShaderVars.h for type definitions, included above) -// Returns NULL on failure. -// Parameters: -// handle: Specifies the compiler -const std::vector *GetUniforms(const ShHandle handle); -const std::vector *GetVaryings(const ShHandle handle); -const std::vector *GetAttributes(const ShHandle handle); -const std::vector *GetOutputVariables(const ShHandle handle); -const std::vector *GetInterfaceBlocks(const ShHandle handle); -sh::WorkGroupSize GetComputeShaderLocalGroupSize(const ShHandle handle); - -// Returns true if the passed in variables pack in maxVectors followingthe packing rules from the -// GLSL 1.017 spec, Appendix A, section 7. -// Returns false otherwise. Also look at the SH_ENFORCE_PACKING_RESTRICTIONS -// flag above. -// Parameters: -// maxVectors: the available rows of registers. -// variables: an array of variables. -bool CheckVariablesWithinPackingLimits(int maxVectors, - const std::vector &variables); - -// Gives the compiler-assigned register for an interface block. -// The method writes the value to the output variable "indexOut". -// Returns true if it found a valid interface block, false otherwise. -// Parameters: -// handle: Specifies the compiler -// interfaceBlockName: Specifies the interface block -// indexOut: output variable that stores the assigned register -bool GetInterfaceBlockRegister(const ShHandle handle, - const std::string &interfaceBlockName, - unsigned int *indexOut); - -// Gives a map from uniform names to compiler-assigned registers in the default interface block. -// Note that the map contains also registers of samplers that have been extracted from structs. -const std::map *GetUniformRegisterMap(const ShHandle handle); - -} // namespace sh +COMPILER_EXPORT const std::map *ShGetUniformRegisterMap( + const ShHandle handle); #endif // GLSLANG_SHADERLANG_H_ diff --git a/gfx/angle/include/GLSLANG/ShaderVars.h b/gfx/angle/include/GLSLANG/ShaderVars.h index 2683eb464..e1c140f92 100755 --- a/gfx/angle/include/GLSLANG/ShaderVars.h +++ b/gfx/angle/include/GLSLANG/ShaderVars.h @@ -29,7 +29,7 @@ enum InterpolationType }; // Validate link & SSO consistency of interpolation qualifiers -bool InterpolationTypesMatch(InterpolationType a, InterpolationType b); +COMPILER_EXPORT bool InterpolationTypesMatch(InterpolationType a, InterpolationType b); // Uniform block layout qualifier, see section 4.3.8.3 of the ESSL 3.00.4 spec enum BlockLayoutType @@ -43,7 +43,7 @@ enum BlockLayoutType // Note: we must override the copy constructor and assignment operator so we can // work around excessive GCC binary bloating: // See https://code.google.com/p/angleproject/issues/detail?id=697 -struct ShaderVariable +struct COMPILER_EXPORT ShaderVariable { ShaderVariable(); ShaderVariable(GLenum typeIn, unsigned int arraySizeIn); @@ -92,7 +92,7 @@ struct ShaderVariable } }; -struct Uniform : public ShaderVariable +struct COMPILER_EXPORT Uniform : public ShaderVariable { Uniform(); ~Uniform(); @@ -113,7 +113,7 @@ struct Uniform : public ShaderVariable // An interface variable is a variable which passes data between the GL data structures and the // shader execution: either vertex shader inputs or fragment shader outputs. These variables can // have integer locations to pass back to the GL API. -struct InterfaceVariable : public ShaderVariable +struct COMPILER_EXPORT InterfaceVariable : public ShaderVariable { InterfaceVariable(); ~InterfaceVariable(); @@ -125,7 +125,7 @@ struct InterfaceVariable : public ShaderVariable int location; }; -struct Attribute : public InterfaceVariable +struct COMPILER_EXPORT Attribute : public InterfaceVariable { Attribute(); ~Attribute(); @@ -135,7 +135,7 @@ struct Attribute : public InterfaceVariable bool operator!=(const Attribute &other) const { return !operator==(other); } }; -struct OutputVariable : public InterfaceVariable +struct COMPILER_EXPORT OutputVariable : public InterfaceVariable { OutputVariable(); ~OutputVariable(); @@ -145,7 +145,7 @@ struct OutputVariable : public InterfaceVariable bool operator!=(const OutputVariable &other) const { return !operator==(other); } }; -struct InterfaceBlockField : public ShaderVariable +struct COMPILER_EXPORT InterfaceBlockField : public ShaderVariable { InterfaceBlockField(); ~InterfaceBlockField(); @@ -167,7 +167,7 @@ struct InterfaceBlockField : public ShaderVariable bool isRowMajorLayout; }; -struct Varying : public ShaderVariable +struct COMPILER_EXPORT Varying : public ShaderVariable { Varying(); ~Varying(); @@ -193,7 +193,7 @@ struct Varying : public ShaderVariable bool isInvariant; }; -struct InterfaceBlock +struct COMPILER_EXPORT InterfaceBlock { InterfaceBlock(); ~InterfaceBlock(); @@ -216,7 +216,7 @@ struct InterfaceBlock std::vector fields; }; -struct WorkGroupSize +struct COMPILER_EXPORT WorkGroupSize { void fill(int fillValue); void setLocalSize(int localSizeX, int localSizeY, int localSizeZ); diff --git a/gfx/angle/include/export.h b/gfx/angle/include/export.h index 809265c1a..cdf6245d6 100755 --- a/gfx/angle/include/export.h +++ b/gfx/angle/include/export.h @@ -10,15 +10,13 @@ #define LIBGLESV2_EXPORT_H_ #if defined(_WIN32) -#if defined(LIBGLESV2_IMPLEMENTATION) || defined(LIBANGLE_IMPLEMENTATION) || \ - defined(LIBANGLE_UTIL_IMPLEMENTATION) +# if defined(LIBGLESV2_IMPLEMENTATION) || defined(LIBANGLE_IMPLEMENTATION) # define ANGLE_EXPORT __declspec(dllexport) # else # define ANGLE_EXPORT __declspec(dllimport) # endif #elif defined(__GNUC__) -#if defined(LIBGLESV2_IMPLEMENTATION) || defined(LIBANGLE_IMPLEMENTATION) || \ - defined(LIBANGLE_UTIL_IMPLEMENTATION) +# if defined(LIBGLESV2_IMPLEMENTATION) || defined(LIBANGLE_IMPLEMENTATION) # define ANGLE_EXPORT __attribute__((visibility ("default"))) # else # define ANGLE_EXPORT diff --git a/gfx/angle/moz.build b/gfx/angle/moz.build index 2a40e0ac6..1dbfaf2ce 100755 --- a/gfx/angle/moz.build +++ b/gfx/angle/moz.build @@ -28,13 +28,11 @@ UNIFIED_SOURCES += [ 'src/compiler/preprocessor/Preprocessor.cpp', 'src/compiler/preprocessor/Token.cpp', 'src/compiler/preprocessor/Tokenizer.cpp', - 'src/compiler/translator/AddAndTrueToLoopCondition.cpp', 'src/compiler/translator/AddDefaultReturnStatements.cpp', 'src/compiler/translator/ArrayReturnValueToOutParameter.cpp', 'src/compiler/translator/ASTMetadataHLSL.cpp', 'src/compiler/translator/blocklayout.cpp', 'src/compiler/translator/blocklayoutHLSL.cpp', - 'src/compiler/translator/BreakVariableAliasingInInnerLoops.cpp', 'src/compiler/translator/BuiltInFunctionEmulator.cpp', 'src/compiler/translator/BuiltInFunctionEmulatorGLSL.cpp', 'src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp', @@ -42,8 +40,11 @@ UNIFIED_SOURCES += [ 'src/compiler/translator/CallDAG.cpp', 'src/compiler/translator/CodeGen.cpp', 'src/compiler/translator/Compiler.cpp', - 'src/compiler/translator/ConstantUnion.cpp', 'src/compiler/translator/DeferGlobalInitializers.cpp', + 'src/compiler/translator/depgraph/DependencyGraph.cpp', + 'src/compiler/translator/depgraph/DependencyGraphBuilder.cpp', + 'src/compiler/translator/depgraph/DependencyGraphOutput.cpp', + 'src/compiler/translator/depgraph/DependencyGraphTraverse.cpp', 'src/compiler/translator/Diagnostics.cpp', 'src/compiler/translator/DirectiveHandler.cpp', 'src/compiler/translator/EmulatePrecision.cpp', @@ -70,27 +71,28 @@ UNIFIED_SOURCES += [ 'src/compiler/translator/ParseContext.cpp', 'src/compiler/translator/PoolAlloc.cpp', 'src/compiler/translator/PruneEmptyDeclarations.cpp', - 'src/compiler/translator/QualifierTypes.cpp', 'src/compiler/translator/RecordConstantPrecision.cpp', 'src/compiler/translator/RegenerateStructNames.cpp', 'src/compiler/translator/RemoveDynamicIndexing.cpp', - 'src/compiler/translator/RemoveInvariantDeclaration.cpp', 'src/compiler/translator/RemovePow.cpp', 'src/compiler/translator/RemoveSwitchFallThrough.cpp', 'src/compiler/translator/RewriteDoWhile.cpp', 'src/compiler/translator/RewriteElseBlocks.cpp', - 'src/compiler/translator/RewriteUnaryMinusOperatorInt.cpp', + 'src/compiler/translator/RewriteTexelFetchOffset.cpp', 'src/compiler/translator/ScalarizeVecAndMatConstructorArgs.cpp', 'src/compiler/translator/SearchSymbol.cpp', 'src/compiler/translator/SeparateArrayInitialization.cpp', 'src/compiler/translator/SeparateDeclarations.cpp', 'src/compiler/translator/SeparateExpressionsReturningArrays.cpp', + 'src/compiler/translator/ShaderLang.cpp', 'src/compiler/translator/ShaderVars.cpp', 'src/compiler/translator/SimplifyLoopConditions.cpp', 'src/compiler/translator/SplitSequenceOperator.cpp', 'src/compiler/translator/StructureHLSL.cpp', 'src/compiler/translator/SymbolTable.cpp', 'src/compiler/translator/TextureFunctionHLSL.cpp', + 'src/compiler/translator/timing/RestrictFragmentShaderTiming.cpp', + 'src/compiler/translator/timing/RestrictVertexShaderTiming.cpp', 'src/compiler/translator/TranslatorESSL.cpp', 'src/compiler/translator/TranslatorGLSL.cpp', 'src/compiler/translator/TranslatorHLSL.cpp', @@ -98,7 +100,6 @@ UNIFIED_SOURCES += [ 'src/compiler/translator/UnfoldShortCircuitAST.cpp', 'src/compiler/translator/UnfoldShortCircuitToIf.cpp', 'src/compiler/translator/UniformHLSL.cpp', - 'src/compiler/translator/UseInterfaceBlockFields.cpp', 'src/compiler/translator/util.cpp', 'src/compiler/translator/UtilsHLSL.cpp', 'src/compiler/translator/ValidateGlobalInitializer.cpp', @@ -115,8 +116,6 @@ SOURCES += [ 'src/compiler/translator/EmulateGLFragColorBroadcast.cpp', 'src/compiler/translator/glslang_lex.cpp', 'src/compiler/translator/glslang_tab.cpp', - 'src/compiler/translator/RewriteTexelFetchOffset.cpp', - 'src/compiler/translator/ShaderLang.cpp', ] diff --git a/gfx/angle/src/angle.gyp b/gfx/angle/src/angle.gyp index e4e8ba979..f84436d75 100755 --- a/gfx/angle/src/angle.gyp +++ b/gfx/angle/src/angle.gyp @@ -45,7 +45,6 @@ 'angle_enable_gl%': 1, }], ], - 'angle_enable_null%': 1, # Available on all platforms }, 'includes': [ @@ -59,7 +58,7 @@ { 'target_name': 'angle_common', 'type': 'static_library', - 'includes': [ '../gyp/common_defines.gypi', ], + 'includes': [ '../build/common_defines.gypi', ], 'sources': [ '<@(libangle_common_sources)', @@ -146,7 +145,7 @@ { 'target_name': 'angle_image_util', 'type': 'static_library', - 'includes': [ '../gyp/common_defines.gypi', ], + 'includes': [ '../build/common_defines.gypi', ], 'sources': [ '<@(libangle_image_util_sources)', @@ -173,7 +172,7 @@ { 'target_name': 'copy_scripts', 'type': 'none', - 'includes': [ '../gyp/common_defines.gypi', ], + 'includes': [ '../build/common_defines.gypi', ], 'hard_dependency': 1, 'copies': [ @@ -200,7 +199,7 @@ { 'target_name': 'commit_id', 'type': 'none', - 'includes': [ '../gyp/common_defines.gypi', ], + 'includes': [ '../build/common_defines.gypi', ], 'dependencies': [ 'copy_scripts', ], 'hard_dependency': 1, 'actions': @@ -242,7 +241,7 @@ 'target_name': 'commit_id', 'type': 'none', 'hard_dependency': 1, - 'includes': [ '../gyp/common_defines.gypi', ], + 'includes': [ '../build/common_defines.gypi', ], 'copies': [ { @@ -275,7 +274,7 @@ 'target_name': 'copy_compiler_dll', 'type': 'none', 'dependencies': [ 'copy_scripts', ], - 'includes': [ '../gyp/common_defines.gypi', ], + 'includes': [ '../build/common_defines.gypi', ], 'conditions': [ ['angle_build_winrt==0', diff --git a/gfx/angle/src/commit.h b/gfx/angle/src/commit.h index c9ec95b0a..825dd2be6 100755 --- a/gfx/angle/src/commit.h +++ b/gfx/angle/src/commit.h @@ -1,3 +1,3 @@ -#define ANGLE_COMMIT_HASH "2a250c8a0e15" -#define ANGLE_COMMIT_HASH_SIZE 12 -#define ANGLE_COMMIT_DATE "2016-11-23 17:58:16 +0800" +#define ANGLE_COMMIT_HASH "" +#define ANGLE_COMMIT_HASH_SIZE 12 +#define ANGLE_COMMIT_DATE "" diff --git a/gfx/angle/src/common/BitSetIterator.h b/gfx/angle/src/common/BitSetIterator.h index 7fecd3769..3248ce44c 100755 --- a/gfx/angle/src/common/BitSetIterator.h +++ b/gfx/angle/src/common/BitSetIterator.h @@ -104,6 +104,7 @@ inline unsigned long ScanForward(unsigned long bits) unsigned long firstBitIndex = 0ul; unsigned char ret = _BitScanForward(&firstBitIndex, bits); ASSERT(ret != 0); + UNUSED_ASSERTION_VARIABLE(ret); return firstBitIndex; #elif defined(ANGLE_PLATFORM_POSIX) return static_cast(__builtin_ctzl(bits)); diff --git a/gfx/angle/src/common/angleutils.h b/gfx/angle/src/common/angleutils.h index f5ef7bdc1..ea1a0cae3 100755 --- a/gfx/angle/src/common/angleutils.h +++ b/gfx/angle/src/common/angleutils.h @@ -156,14 +156,6 @@ size_t FormatStringIntoVector(const char *fmt, va_list vararg, std::vector std::string FormatString(const char *fmt, va_list vararg); std::string FormatString(const char *fmt, ...); -template -std::string ToString(const T &value) -{ - std::ostringstream o; - o << value; - return o.str(); -} - // snprintf is not defined with MSVC prior to to msvc14 #if defined(_MSC_VER) && _MSC_VER < 1900 #define snprintf _snprintf diff --git a/gfx/angle/src/common/debug.cpp b/gfx/angle/src/common/debug.cpp index f64d9322f..746da5e0d 100755 --- a/gfx/angle/src/common/debug.cpp +++ b/gfx/angle/src/common/debug.cpp @@ -171,9 +171,4 @@ ScopedPerfEventHelper::~ScopedPerfEventHelper() } } -std::ostream &DummyStream() -{ - return std::cout; } - -} // namespace gl diff --git a/gfx/angle/src/common/debug.h b/gfx/angle/src/common/debug.h index 9356090ae..ccc80e802 100755 --- a/gfx/angle/src/common/debug.h +++ b/gfx/angle/src/common/debug.h @@ -57,20 +57,7 @@ void InitializeDebugAnnotations(DebugAnnotator *debugAnnotator); void UninitializeDebugAnnotations(); bool DebugAnnotationsActive(); -// This class is used to explicitly ignore values in the conditional logging macros. This avoids -// compiler warnings like "value computed is not used" and "statement has no effect". -class LogMessageVoidify -{ - public: - LogMessageVoidify() {} - // This has to be an operator with a precedence lower than << but higher than ?: - void operator&(std::ostream &) {} -}; - -// This can be any ostream, it is unused, but needs to be a valid reference. -std::ostream &DummyStream(); - -} // namespace gl +} #if defined(ANGLE_ENABLE_DEBUG_TRACE) || defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS) #define ANGLE_TRACE_ENABLED @@ -117,58 +104,61 @@ std::ostream &DummyStream(); #undef ANGLE_TRACE_ENABLED #endif -#if defined(COMPILER_GCC) || defined(__clang__) -#define ANGLE_CRASH() __builtin_trap() -#else -#define ANGLE_CRASH() ((void)(*(volatile char *)0 = 0)) -#endif - #if !defined(NDEBUG) #define ANGLE_ASSERT_IMPL(expression) assert(expression) #else // TODO(jmadill): Detect if debugger is attached and break. -#define ANGLE_ASSERT_IMPL(expression) ANGLE_CRASH() +#define ANGLE_ASSERT_IMPL(expression) abort() #endif // !defined(NDEBUG) -// Helper macro which avoids evaluating the arguments to a stream if the condition doesn't hold. -// Condition is evaluated once and only once. -#define ANGLE_LAZY_STREAM(stream, condition) \ - !(condition) ? static_cast(0) : ::gl::LogMessageVoidify() & (stream) - -#if defined(NDEBUG) && !defined(ANGLE_ENABLE_ASSERTS) -#define ANGLE_ASSERTS_ON 0 -#else -#define ANGLE_ASSERTS_ON 1 -#endif - // A macro asserting a condition and outputting failures to the debug log -#if ANGLE_ASSERTS_ON -#define ASSERT(expression) \ - (expression ? static_cast(0) \ - : (ERR("\t! Assert failed in %s(%d): %s\n", __FUNCTION__, __LINE__, #expression), \ - ANGLE_ASSERT_IMPL(expression))) +#if defined(ANGLE_ENABLE_ASSERTS) +#define ASSERT(expression) \ + { \ + if (!(expression)) \ + { \ + ERR("\t! Assert failed in %s(%d): %s\n", __FUNCTION__, __LINE__, #expression); \ + ANGLE_ASSERT_IMPL(expression); \ + } \ + } \ + ANGLE_EMPTY_STATEMENT +#define UNUSED_ASSERTION_VARIABLE(variable) #else -#define ASSERT(condition) \ - ANGLE_LAZY_STREAM(::gl::DummyStream(), ANGLE_ASSERTS_ON ? !(condition) : false) \ - << "Check failed: " #condition ". " -#endif // ANGLE_ASSERTS_ON +#define ASSERT(expression) (void(0)) +#define UNUSED_ASSERTION_VARIABLE(variable) ((void)variable) +#endif #define UNUSED_VARIABLE(variable) ((void)variable) // A macro to indicate unimplemented functionality -#ifndef NOASSERT_UNIMPLEMENTED + +#if defined (ANGLE_TEST_CONFIG) #define NOASSERT_UNIMPLEMENTED 1 #endif -#define UNIMPLEMENTED() \ - { \ - ERR("\t! Unimplemented: %s(%d)\n", __FUNCTION__, __LINE__); \ - ASSERT(NOASSERT_UNIMPLEMENTED); \ - } \ - ANGLE_EMPTY_STATEMENT +// Define NOASSERT_UNIMPLEMENTED to non zero to skip the assert fail in the unimplemented checks +// This will allow us to test with some automated test suites (eg dEQP) without crashing +#ifndef NOASSERT_UNIMPLEMENTED +#define NOASSERT_UNIMPLEMENTED 0 +#endif + +#if !defined(NDEBUG) +#define UNIMPLEMENTED() { \ + FIXME("\t! Unimplemented: %s(%d)\n", __FUNCTION__, __LINE__); \ + assert(NOASSERT_UNIMPLEMENTED); \ + } ANGLE_EMPTY_STATEMENT +#else + #define UNIMPLEMENTED() FIXME("\t! Unimplemented: %s(%d)\n", __FUNCTION__, __LINE__) +#endif // A macro for code which is not expected to be reached under valid assumptions -#define UNREACHABLE() \ - (ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__), ASSERT(false)) +#if !defined(NDEBUG) +#define UNREACHABLE() { \ + ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__); \ + assert(false); \ + } ANGLE_EMPTY_STATEMENT +#else + #define UNREACHABLE() ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__) +#endif #endif // COMMON_DEBUG_H_ diff --git a/gfx/angle/src/common/mathutil.cpp b/gfx/angle/src/common/mathutil.cpp index 5db997c66..acbcbdf0c 100755 --- a/gfx/angle/src/common/mathutil.cpp +++ b/gfx/angle/src/common/mathutil.cpp @@ -14,9 +14,6 @@ namespace gl { -namespace -{ - struct RGB9E5Data { unsigned int R : 9; @@ -26,20 +23,17 @@ struct RGB9E5Data }; // B is the exponent bias (15) -constexpr int g_sharedexp_bias = 15; +static const int g_sharedexp_bias = 15; // N is the number of mantissa bits per component (9) -constexpr int g_sharedexp_mantissabits = 9; +static const int g_sharedexp_mantissabits = 9; // Emax is the maximum allowed biased exponent value (31) -constexpr int g_sharedexp_maxexponent = 31; - -constexpr float g_sharedexp_max = - ((static_cast(1 << g_sharedexp_mantissabits) - 1) / - static_cast(1 << g_sharedexp_mantissabits)) * - static_cast(1 << (g_sharedexp_maxexponent - g_sharedexp_bias)); +static const int g_sharedexp_maxexponent = 31; -} // anonymous namespace +static const float g_sharedexp_max = ((pow(2.0f, g_sharedexp_mantissabits) - 1) / + pow(2.0f, g_sharedexp_mantissabits)) * + pow(2.0f, g_sharedexp_maxexponent - g_sharedexp_bias); unsigned int convertRGBFloatsTo999E5(float red, float green, float blue) { diff --git a/gfx/angle/src/common/mathutil.h b/gfx/angle/src/common/mathutil.h index 630b6c088..a82f2ecef 100755 --- a/gfx/angle/src/common/mathutil.h +++ b/gfx/angle/src/common/mathutil.h @@ -44,15 +44,6 @@ struct Vector4 float w; }; -struct Vector2 -{ - Vector2() {} - Vector2(float x, float y) : x(x), y(y) {} - - float x; - float y; -}; - inline bool isPow2(int x) { return (x & (x - 1)) == 0 && (x != 0); @@ -765,40 +756,6 @@ constexpr unsigned int iSquareRoot() return priv::iSquareRoot::value; } -// Sum, difference and multiplication operations for signed ints that wrap on 32-bit overflow. -// -// Unsigned types are defined to do arithmetic modulo 2^n in C++. For signed types, overflow -// behavior is undefined. - -template -inline T WrappingSum(T lhs, T rhs) -{ - uint32_t lhsUnsigned = static_cast(lhs); - uint32_t rhsUnsigned = static_cast(rhs); - return static_cast(lhsUnsigned + rhsUnsigned); -} - -template -inline T WrappingDiff(T lhs, T rhs) -{ - uint32_t lhsUnsigned = static_cast(lhs); - uint32_t rhsUnsigned = static_cast(rhs); - return static_cast(lhsUnsigned - rhsUnsigned); -} - -inline int32_t WrappingMul(int32_t lhs, int32_t rhs) -{ - int64_t lhsWide = static_cast(lhs); - int64_t rhsWide = static_cast(rhs); - // The multiplication is guaranteed not to overflow. - int64_t resultWide = lhsWide * rhsWide; - // Implement the desired wrapping behavior by masking out the high-order 32 bits. - resultWide = resultWide & 0xffffffffll; - // Casting to a narrower signed type is fine since the casted value is representable in the - // narrower type. - return static_cast(resultWide); -} - } // namespace gl namespace rx diff --git a/gfx/angle/src/common/third_party/numerics/base/logging.h b/gfx/angle/src/common/third_party/numerics/base/logging.h index 6cf05b4e6..d4e3e2402 100755 --- a/gfx/angle/src/common/third_party/numerics/base/logging.h +++ b/gfx/angle/src/common/third_party/numerics/base/logging.h @@ -16,7 +16,7 @@ // Unfortunately ANGLE relies on ASSERT being an empty statement, which these libs don't respect. #ifndef NOTREACHED -#define NOTREACHED() UNREACHABLE() +#define NOTREACHED() 0 #endif -#endif // BASE_LOGGING_H_ +#endif // BASE_LOGGING_H_ \ No newline at end of file diff --git a/gfx/angle/src/common/third_party/numerics/base/numerics/safe_conversions_impl.h b/gfx/angle/src/common/third_party/numerics/base/numerics/safe_conversions_impl.h index 1591b9c8c..798465f53 100755 --- a/gfx/angle/src/common/third_party/numerics/base/numerics/safe_conversions_impl.h +++ b/gfx/angle/src/common/third_party/numerics/base/numerics/safe_conversions_impl.h @@ -92,7 +92,7 @@ struct StaticDstRangeRelationToSrcRange -GLuint ConvertToGLuint(GLfloat param) -{ - return uiround(param); -} - -template <> -GLint ConvertToGLint(GLfloat param) -{ - return iround(param); -} - -template <> -GLint ConvertFromGLfloat(GLfloat param) -{ - return iround(param); -} -template <> -GLuint ConvertFromGLfloat(GLfloat param) -{ - return uiround(param); -} - unsigned int ParseAndStripArrayIndex(std::string *name) { unsigned int subscript = GL_INVALID_INDEX; diff --git a/gfx/angle/src/common/utilities.h b/gfx/angle/src/common/utilities.h index 16d6560a7..dc09011a2 100755 --- a/gfx/angle/src/common/utilities.h +++ b/gfx/angle/src/common/utilities.h @@ -68,76 +68,6 @@ bool IsTriangleMode(GLenum drawMode); template outT iround(GLfloat value) { return static_cast(value > 0.0f ? floor(value + 0.5f) : ceil(value - 0.5f)); } template outT uiround(GLfloat value) { return static_cast(value + 0.5f); } -// Helper for converting arbitrary GL types to other GL types used in queries and state setting -template -GLuint ConvertToGLuint(ParamType param) -{ - return static_cast(param); -} -template <> -GLuint ConvertToGLuint(GLfloat param); - -template -GLint ConvertToGLint(ParamType param) -{ - return static_cast(param); -} -template <> -GLint ConvertToGLint(GLfloat param); - -// Same conversion as uint -template -GLenum ConvertToGLenum(ParamType param) -{ - return static_cast(ConvertToGLuint(param)); -} - -template -GLfloat ConvertToGLfloat(ParamType param) -{ - return static_cast(param); -} - -template -ParamType ConvertFromGLfloat(GLfloat param) -{ - return static_cast(param); -} -template <> -GLint ConvertFromGLfloat(GLfloat param); -template <> -GLuint ConvertFromGLfloat(GLfloat param); - -template -ParamType ConvertFromGLenum(GLenum param) -{ - return static_cast(param); -} - -template -ParamType ConvertFromGLuint(GLuint param) -{ - return static_cast(param); -} - -template -ParamType ConvertFromGLint(GLint param) -{ - return static_cast(param); -} - -template -ParamType ConvertFromGLboolean(GLboolean param) -{ - return static_cast(param ? GL_TRUE : GL_FALSE); -} - -template -ParamType ConvertFromGLint64(GLint64 param) -{ - return clampCast(param); -} - unsigned int ParseAndStripArrayIndex(std::string *name); } // namespace gl diff --git a/gfx/angle/src/compiler.gypi b/gfx/angle/src/compiler.gypi index 279d5af9c..5f28881a9 100755 --- a/gfx/angle/src/compiler.gypi +++ b/gfx/angle/src/compiler.gypi @@ -6,7 +6,7 @@ 'variables': { # These file lists are shared with the GN build. - 'angle_translator_sources': + 'angle_translator_lib_sources': [ '../include/EGL/egl.h', '../include/EGL/eglext.h', @@ -22,13 +22,9 @@ '../include/GLSLANG/ShaderVars.h', '../include/KHR/khrplatform.h', '../include/angle_gl.h', - 'compiler/translator/AddAndTrueToLoopCondition.cpp', - 'compiler/translator/AddAndTrueToLoopCondition.h', 'compiler/translator/BaseTypes.h', 'compiler/translator/BuiltInFunctionEmulator.cpp', 'compiler/translator/BuiltInFunctionEmulator.h', - 'compiler/translator/BreakVariableAliasingInInnerLoops.cpp', - 'compiler/translator/BreakVariableAliasingInInnerLoops.h', 'compiler/translator/Cache.cpp', 'compiler/translator/Cache.h', 'compiler/translator/CallDAG.cpp', @@ -37,7 +33,6 @@ 'compiler/translator/Common.h', 'compiler/translator/Compiler.cpp', 'compiler/translator/Compiler.h', - 'compiler/translator/ConstantUnion.cpp', 'compiler/translator/ConstantUnion.h', 'compiler/translator/DeferGlobalInitializers.cpp', 'compiler/translator/DeferGlobalInitializers.h', @@ -86,36 +81,27 @@ 'compiler/translator/Pragma.h', 'compiler/translator/PruneEmptyDeclarations.cpp', 'compiler/translator/PruneEmptyDeclarations.h', - 'compiler/translator/QualifierTypes.h', - 'compiler/translator/QualifierTypes.cpp', 'compiler/translator/RecordConstantPrecision.cpp', 'compiler/translator/RecordConstantPrecision.h', 'compiler/translator/RegenerateStructNames.cpp', 'compiler/translator/RegenerateStructNames.h', - 'compiler/translator/RemoveInvariantDeclaration.cpp', - 'compiler/translator/RemoveInvariantDeclaration.h', 'compiler/translator/RemovePow.cpp', 'compiler/translator/RemovePow.h', 'compiler/translator/RewriteDoWhile.cpp', 'compiler/translator/RewriteDoWhile.h', 'compiler/translator/RewriteTexelFetchOffset.cpp', 'compiler/translator/RewriteTexelFetchOffset.h', - 'compiler/translator/RewriteUnaryMinusOperatorInt.cpp', - 'compiler/translator/RewriteUnaryMinusOperatorInt.h', + 'compiler/translator/RenameFunction.h', 'compiler/translator/ScalarizeVecAndMatConstructorArgs.cpp', 'compiler/translator/ScalarizeVecAndMatConstructorArgs.h', 'compiler/translator/SearchSymbol.cpp', 'compiler/translator/SearchSymbol.h', - 'compiler/translator/ShaderLang.cpp', - 'compiler/translator/ShaderVars.cpp', 'compiler/translator/SymbolTable.cpp', 'compiler/translator/SymbolTable.h', 'compiler/translator/Types.cpp', 'compiler/translator/Types.h', 'compiler/translator/UnfoldShortCircuitAST.cpp', 'compiler/translator/UnfoldShortCircuitAST.h', - 'compiler/translator/UseInterfaceBlockFields.cpp', - 'compiler/translator/UseInterfaceBlockFields.h', 'compiler/translator/ValidateGlobalInitializer.cpp', 'compiler/translator/ValidateGlobalInitializer.h', 'compiler/translator/ValidateLimitations.cpp', @@ -132,6 +118,13 @@ 'compiler/translator/VariablePacker.h', 'compiler/translator/blocklayout.cpp', 'compiler/translator/blocklayout.h', + 'compiler/translator/depgraph/DependencyGraph.cpp', + 'compiler/translator/depgraph/DependencyGraph.h', + 'compiler/translator/depgraph/DependencyGraphBuilder.cpp', + 'compiler/translator/depgraph/DependencyGraphBuilder.h', + 'compiler/translator/depgraph/DependencyGraphOutput.cpp', + 'compiler/translator/depgraph/DependencyGraphOutput.h', + 'compiler/translator/depgraph/DependencyGraphTraverse.cpp', 'compiler/translator/glslang.h', 'compiler/translator/glslang.l', 'compiler/translator/glslang.y', @@ -140,19 +133,23 @@ 'compiler/translator/glslang_tab.h', 'compiler/translator/intermOut.cpp', 'compiler/translator/length_limits.h', + 'compiler/translator/timing/RestrictFragmentShaderTiming.cpp', + 'compiler/translator/timing/RestrictFragmentShaderTiming.h', + 'compiler/translator/timing/RestrictVertexShaderTiming.cpp', + 'compiler/translator/timing/RestrictVertexShaderTiming.h', 'compiler/translator/util.cpp', 'compiler/translator/util.h', 'third_party/compiler/ArrayBoundsClamper.cpp', 'third_party/compiler/ArrayBoundsClamper.h', ], - 'angle_translator_essl_sources': + 'angle_translator_lib_essl_sources': [ 'compiler/translator/OutputESSL.cpp', 'compiler/translator/OutputESSL.h', 'compiler/translator/TranslatorESSL.cpp', 'compiler/translator/TranslatorESSL.h', ], - 'angle_translator_glsl_sources': + 'angle_translator_lib_glsl_sources': [ 'compiler/translator/BuiltInFunctionEmulatorGLSL.cpp', 'compiler/translator/BuiltInFunctionEmulatorGLSL.h', @@ -167,7 +164,7 @@ 'compiler/translator/VersionGLSL.cpp', 'compiler/translator/VersionGLSL.h', ], - 'angle_translator_hlsl_sources': + 'angle_translator_lib_hlsl_sources': [ 'compiler/translator/AddDefaultReturnStatements.cpp', 'compiler/translator/AddDefaultReturnStatements.h', @@ -240,6 +237,7 @@ 'compiler/preprocessor/Tokenizer.h', 'compiler/preprocessor/Tokenizer.l', 'compiler/preprocessor/numeric_lex.h', + 'compiler/preprocessor/pp_utils.h', ], }, # Everything below this is duplicated in the GN build. If you change @@ -249,23 +247,28 @@ { 'target_name': 'preprocessor', 'type': 'static_library', - 'dependencies': [ 'angle_common' ], - 'includes': [ '../gyp/common_defines.gypi', ], + 'includes': [ '../build/common_defines.gypi', ], 'sources': [ '<@(angle_preprocessor_sources)', ], }, { - 'target_name': 'translator', + 'target_name': 'translator_lib', 'type': 'static_library', 'dependencies': [ 'preprocessor', 'angle_common' ], - 'includes': [ '../gyp/common_defines.gypi', ], + 'includes': [ '../build/common_defines.gypi', ], 'include_dirs': [ '.', '../include', ], + 'defines': + [ + # define the static translator to indicate exported + # classes are (in fact) locally defined + 'ANGLE_TRANSLATOR_STATIC', + ], 'sources': [ - '<@(angle_translator_sources)', + '<@(angle_translator_lib_sources)', ], 'msvs_settings': { @@ -291,7 +294,7 @@ }, 'sources': [ - '<@(angle_translator_essl_sources)', + '<@(angle_translator_lib_essl_sources)', ], }], ['angle_enable_glsl==1', @@ -309,7 +312,7 @@ }, 'sources': [ - '<@(angle_translator_glsl_sources)', + '<@(angle_translator_lib_glsl_sources)', ], }], ['angle_enable_hlsl==1', @@ -327,10 +330,59 @@ }, 'sources': [ - '<@(angle_translator_hlsl_sources)', + '<@(angle_translator_lib_hlsl_sources)', ], }], ], }, + + { + 'target_name': 'translator', + 'type': '<(component)', + 'dependencies': [ 'translator_lib', 'angle_common' ], + 'includes': [ '../build/common_defines.gypi', ], + 'include_dirs': + [ + '.', + '../include', + ], + 'defines': + [ + 'ANGLE_TRANSLATOR_IMPLEMENTATION', + ], + 'sources': + [ + 'compiler/translator/ShaderLang.cpp', + 'compiler/translator/ShaderVars.cpp' + ], + }, + + { + 'target_name': 'translator_static', + 'type': 'static_library', + 'dependencies': [ 'translator_lib' ], + 'includes': [ '../build/common_defines.gypi', ], + 'include_dirs': + [ + '.', + '../include', + ], + 'defines': + [ + 'ANGLE_TRANSLATOR_STATIC', + ], + 'direct_dependent_settings': + { + 'defines': + [ + 'ANGLE_TRANSLATOR_STATIC', + ], + }, + 'sources': + [ + 'compiler/translator/ShaderLang.cpp', + 'compiler/translator/ShaderVars.cpp' + ], + }, ], } diff --git a/gfx/angle/src/compiler/fuzz/translator_fuzzer.cpp b/gfx/angle/src/compiler/fuzz/translator_fuzzer.cpp deleted file mode 100644 index 3ea117ba0..000000000 --- a/gfx/angle/src/compiler/fuzz/translator_fuzzer.cpp +++ /dev/null @@ -1,161 +0,0 @@ -// -// Copyright (c) 2016 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. -// - -// translator_fuzzer.cpp: A libfuzzer fuzzer for the shader translator. - -#include -#include -#include -#include - -#include "compiler/translator/Compiler.h" -#include "angle_gl.h" - -using namespace sh; - -struct TranslatorCacheKey -{ - bool operator==(const TranslatorCacheKey &other) const - { - return type == other.type && spec == other.spec && output == other.output; - } - - uint32_t type = 0; - uint32_t spec = 0; - uint32_t output = 0; -}; - -namespace std -{ - -template <> -struct hash -{ - std::size_t operator()(const TranslatorCacheKey &k) const - { - return (hash()(k.type) << 1) ^ (hash()(k.spec) >> 1) ^ - hash()(k.output); - } -}; -} // namespace std - -static std::unordered_map translators; - -extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) -{ - // Reserve some size for future compile options - const size_t kHeaderSize = 128; - - if (size <= kHeaderSize) - { - return 0; - } - - // Make sure the rest of data will be a valid C string so that we don't have to copy it. - if (data[size - 1] != 0) - { - return 0; - } - - uint32_t type = *reinterpret_cast(data); - uint32_t spec = *reinterpret_cast(data + 4); - uint32_t output = *reinterpret_cast(data + 8); - uint64_t options = *reinterpret_cast(data + 12); - - if (type != GL_FRAGMENT_SHADER && type != GL_VERTEX_SHADER) - { - return 0; - } - - if (spec != SH_GLES2_SPEC && type != SH_WEBGL_SPEC && spec != SH_GLES3_SPEC && - spec != SH_WEBGL2_SPEC) - { - return 0; - } - - std::vector validOutputs; - validOutputs.push_back(SH_ESSL_OUTPUT); - validOutputs.push_back(SH_GLSL_COMPATIBILITY_OUTPUT); - validOutputs.push_back(SH_GLSL_130_OUTPUT); - validOutputs.push_back(SH_GLSL_140_OUTPUT); - validOutputs.push_back(SH_GLSL_150_CORE_OUTPUT); - validOutputs.push_back(SH_GLSL_330_CORE_OUTPUT); - validOutputs.push_back(SH_GLSL_400_CORE_OUTPUT); - validOutputs.push_back(SH_GLSL_410_CORE_OUTPUT); - validOutputs.push_back(SH_GLSL_420_CORE_OUTPUT); - validOutputs.push_back(SH_GLSL_430_CORE_OUTPUT); - validOutputs.push_back(SH_GLSL_440_CORE_OUTPUT); - validOutputs.push_back(SH_GLSL_450_CORE_OUTPUT); - validOutputs.push_back(SH_HLSL_3_0_OUTPUT); - validOutputs.push_back(SH_HLSL_4_1_OUTPUT); - validOutputs.push_back(SH_HLSL_4_0_FL9_3_OUTPUT); - bool found = false; - for (auto valid : validOutputs) - { - found = found || (valid == output); - } - if (!found) - { - return 0; - } - - size -= kHeaderSize; - data += kHeaderSize; - - if (!ShInitialize()) - { - return 0; - } - - TranslatorCacheKey key; - key.type = type; - key.spec = spec; - key.output = output; - - if (translators.find(key) == translators.end()) - { - TCompiler *translator = ConstructCompiler(type, static_cast(spec), - static_cast(output)); - - if (!translator) - { - return 0; - } - - ShBuiltInResources resources; - ShInitBuiltInResources(&resources); - - // Enable all the extensions to have more coverage - resources.OES_standard_derivatives = 1; - resources.OES_EGL_image_external = 1; - resources.OES_EGL_image_external_essl3 = 1; - resources.NV_EGL_stream_consumer_external = 1; - resources.ARB_texture_rectangle = 1; - resources.EXT_blend_func_extended = 1; - resources.EXT_draw_buffers = 1; - resources.EXT_frag_depth = 1; - resources.EXT_shader_texture_lod = 1; - resources.WEBGL_debug_shader_precision = 1; - resources.EXT_shader_framebuffer_fetch = 1; - resources.NV_shader_framebuffer_fetch = 1; - resources.ARM_shader_framebuffer_fetch = 1; - - if (!translator->Init(resources)) - { - DeleteCompiler(translator); - return 0; - } - - translators[key] = translator; - } - - TCompiler *translator = translators[key]; - - const char *shaderStrings[] = {reinterpret_cast(data)}; - translator->compile(shaderStrings, 1, options); - - return 0; -} diff --git a/gfx/angle/src/compiler/preprocessor/64bit-tokenizer-safety.patch b/gfx/angle/src/compiler/preprocessor/64bit-tokenizer-safety.patch index 912520c74..4c2f79441 100755 --- a/gfx/angle/src/compiler/preprocessor/64bit-tokenizer-safety.patch +++ b/gfx/angle/src/compiler/preprocessor/64bit-tokenizer-safety.patch @@ -1,79 +1,31 @@ -diff --git a/src/compiler/preprocessor/Tokenizer.cpp b/src/compiler/preprocessor/Tokenizer.cpp -index 0d7ad58..5ef0e5e 100644 --- a/src/compiler/preprocessor/Tokenizer.cpp +++ b/src/compiler/preprocessor/Tokenizer.cpp -@@ -1703,7 +1703,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) - else - { - int num_to_read = -- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; -+ static_cast(YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1); - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ -@@ -1737,8 +1737,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner) - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - -- num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - -- number_to_move - 1; -+ num_to_read = static_cast(YY_CURRENT_BUFFER_LVALUE->yy_buf_size - -+ number_to_move - 1); - - } - -@@ -1746,8 +1746,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ -+ yy_size_t ret = 0; - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), -- yyg->yy_n_chars, num_to_read ); -+ ret, num_to_read ); -+ yyg->yy_n_chars = static_cast(ret); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } -@@ -1773,13 +1775,13 @@ static int yy_get_next_buffer (yyscan_t yyscanner) - - if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ -- int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); -+ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) pprealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - -- yyg->yy_n_chars += number_to_move; -+ yyg->yy_n_chars += static_cast(number_to_move); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - -@@ -2171,7 +2173,7 @@ void pppop_buffer_state (yyscan_t yyscanner) +@@ -56,6 +56,7 @@ typedef int16_t flex_int16_t; + typedef uint16_t flex_uint16_t; + typedef int32_t flex_int32_t; + typedef uint32_t flex_uint32_t; ++typedef uint64_t flex_uint64_t; + #else + typedef signed char flex_int8_t; + typedef short int flex_int16_t; +@@ -179,6 +180,11 @@ typedef void* yyscan_t; + typedef struct yy_buffer_state *YY_BUFFER_STATE; + #endif + ++#ifndef YY_TYPEDEF_YY_SIZE_T ++#define YY_TYPEDEF_YY_SIZE_T ++typedef size_t yy_size_t; ++#endif ++ + #define EOB_ACT_CONTINUE_SCAN 0 + #define EOB_ACT_END_OF_FILE 1 + #define EOB_ACT_LAST_MATCH 2 +@@ -353,7 +354,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); */ - static void ppensure_buffer_stack (yyscan_t yyscanner) - { -- int num_to_alloc; -+ yy_size_t num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { -@@ -2238,7 +2240,7 @@ YY_BUFFER_STATE pp_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in pp_scan_buffer()" ); - -- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ -+ b->yy_buf_size = static_cast(size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; -@@ -2293,7 +2295,7 @@ YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, int _yybytes_len , yysc - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in pp_scan_bytes()" ); - -- for ( i = 0; i < _yybytes_len; ++i ) -+ for ( i = 0; i < static_cast(_yybytes_len); ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + #define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ +- yyleng = (size_t) (yy_cp - yy_bp); \ ++ yyleng = (yy_size_t) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; diff --git a/gfx/angle/src/compiler/preprocessor/DiagnosticsBase.cpp b/gfx/angle/src/compiler/preprocessor/DiagnosticsBase.cpp index fcb24e4e8..9f62a9e0e 100755 --- a/gfx/angle/src/compiler/preprocessor/DiagnosticsBase.cpp +++ b/gfx/angle/src/compiler/preprocessor/DiagnosticsBase.cpp @@ -4,9 +4,9 @@ // found in the LICENSE file. // -#include "compiler/preprocessor/DiagnosticsBase.h" +#include "DiagnosticsBase.h" -#include "common/debug.h" +#include namespace pp { @@ -31,7 +31,7 @@ Diagnostics::Severity Diagnostics::severity(ID id) if ((id > PP_WARNING_BEGIN) && (id < PP_WARNING_END)) return PP_WARNING; - UNREACHABLE(); + assert(false); return PP_ERROR; } @@ -74,8 +74,6 @@ std::string Diagnostics::message(ID id) return "predefined macro undefined"; case PP_MACRO_UNTERMINATED_INVOCATION: return "unterminated macro invocation"; - case PP_MACRO_UNDEFINED_WHILE_INVOKED: - return "macro undefined while being invoked"; case PP_MACRO_TOO_FEW_ARGS: return "Not enough arguments for macro"; case PP_MACRO_TOO_MANY_ARGS: @@ -133,8 +131,8 @@ std::string Diagnostics::message(ID id) return "macro name with a double underscore is reserved - unintented behavior is possible"; // Warnings end. default: - UNREACHABLE(); - return ""; + assert(false); + return ""; } } diff --git a/gfx/angle/src/compiler/preprocessor/DiagnosticsBase.h b/gfx/angle/src/compiler/preprocessor/DiagnosticsBase.h index 6c3fe9ee9..a0899203f 100755 --- a/gfx/angle/src/compiler/preprocessor/DiagnosticsBase.h +++ b/gfx/angle/src/compiler/preprocessor/DiagnosticsBase.h @@ -44,7 +44,6 @@ class Diagnostics PP_MACRO_PREDEFINED_REDEFINED, PP_MACRO_PREDEFINED_UNDEFINED, PP_MACRO_UNTERMINATED_INVOCATION, - PP_MACRO_UNDEFINED_WHILE_INVOKED, PP_MACRO_TOO_FEW_ARGS, PP_MACRO_TOO_MANY_ARGS, PP_MACRO_DUPLICATE_PARAMETER_NAMES, diff --git a/gfx/angle/src/compiler/preprocessor/DirectiveHandlerBase.cpp b/gfx/angle/src/compiler/preprocessor/DirectiveHandlerBase.cpp index 049dae907..ef35c6ed5 100755 --- a/gfx/angle/src/compiler/preprocessor/DirectiveHandlerBase.cpp +++ b/gfx/angle/src/compiler/preprocessor/DirectiveHandlerBase.cpp @@ -4,7 +4,7 @@ // found in the LICENSE file. // -#include "compiler/preprocessor/DirectiveHandlerBase.h" +#include "DirectiveHandlerBase.h" namespace pp { diff --git a/gfx/angle/src/compiler/preprocessor/DirectiveParser.cpp b/gfx/angle/src/compiler/preprocessor/DirectiveParser.cpp index 643f73bd9..aceb3b2b2 100755 --- a/gfx/angle/src/compiler/preprocessor/DirectiveParser.cpp +++ b/gfx/angle/src/compiler/preprocessor/DirectiveParser.cpp @@ -4,19 +4,19 @@ // found in the LICENSE file. // -#include "compiler/preprocessor/DirectiveParser.h" +#include "DirectiveParser.h" #include +#include #include #include -#include "common/debug.h" -#include "compiler/preprocessor/DiagnosticsBase.h" -#include "compiler/preprocessor/DirectiveHandlerBase.h" -#include "compiler/preprocessor/ExpressionParser.h" -#include "compiler/preprocessor/MacroExpander.h" -#include "compiler/preprocessor/Token.h" -#include "compiler/preprocessor/Tokenizer.h" +#include "DiagnosticsBase.h" +#include "DirectiveHandlerBase.h" +#include "ExpressionParser.h" +#include "MacroExpander.h" +#include "Token.h" +#include "Tokenizer.h" namespace { enum DirectiveType @@ -248,7 +248,7 @@ void DirectiveParser::lex(Token *token) void DirectiveParser::parseDirective(Token *token) { - ASSERT(token->type == Token::PP_HASH); + assert(token->type == Token::PP_HASH); mTokenizer->lex(token); if (isEOD(token)) @@ -314,8 +314,8 @@ void DirectiveParser::parseDirective(Token *token) parseLine(token); break; default: - UNREACHABLE(); - break; + assert(false); + break; } skipUntilEOD(mTokenizer, token); @@ -328,7 +328,7 @@ void DirectiveParser::parseDirective(Token *token) void DirectiveParser::parseDefine(Token *token) { - ASSERT(getDirective(token) == DIRECTIVE_DEFINE); + assert(getDirective(token) == DIRECTIVE_DEFINE); mTokenizer->lex(token); if (token->type != Token::IDENTIFIER) @@ -428,7 +428,7 @@ void DirectiveParser::parseDefine(Token *token) void DirectiveParser::parseUndef(Token *token) { - ASSERT(getDirective(token) == DIRECTIVE_UNDEF); + assert(getDirective(token) == DIRECTIVE_UNDEF); mTokenizer->lex(token); if (token->type != Token::IDENTIFIER) @@ -445,13 +445,6 @@ void DirectiveParser::parseUndef(Token *token) { mDiagnostics->report(Diagnostics::PP_MACRO_PREDEFINED_UNDEFINED, token->location, token->text); - return; - } - else if (iter->second.expansionCount > 0) - { - mDiagnostics->report(Diagnostics::PP_MACRO_UNDEFINED_WHILE_INVOKED, token->location, - token->text); - return; } else { @@ -470,25 +463,25 @@ void DirectiveParser::parseUndef(Token *token) void DirectiveParser::parseIf(Token *token) { - ASSERT(getDirective(token) == DIRECTIVE_IF); + assert(getDirective(token) == DIRECTIVE_IF); parseConditionalIf(token); } void DirectiveParser::parseIfdef(Token *token) { - ASSERT(getDirective(token) == DIRECTIVE_IFDEF); + assert(getDirective(token) == DIRECTIVE_IFDEF); parseConditionalIf(token); } void DirectiveParser::parseIfndef(Token *token) { - ASSERT(getDirective(token) == DIRECTIVE_IFNDEF); + assert(getDirective(token) == DIRECTIVE_IFNDEF); parseConditionalIf(token); } void DirectiveParser::parseElse(Token *token) { - ASSERT(getDirective(token) == DIRECTIVE_ELSE); + assert(getDirective(token) == DIRECTIVE_ELSE); if (mConditionalStack.empty()) { @@ -529,7 +522,7 @@ void DirectiveParser::parseElse(Token *token) void DirectiveParser::parseElif(Token *token) { - ASSERT(getDirective(token) == DIRECTIVE_ELIF); + assert(getDirective(token) == DIRECTIVE_ELIF); if (mConditionalStack.empty()) { @@ -569,7 +562,7 @@ void DirectiveParser::parseElif(Token *token) void DirectiveParser::parseEndif(Token *token) { - ASSERT(getDirective(token) == DIRECTIVE_ENDIF); + assert(getDirective(token) == DIRECTIVE_ENDIF); if (mConditionalStack.empty()) { @@ -593,7 +586,7 @@ void DirectiveParser::parseEndif(Token *token) void DirectiveParser::parseError(Token *token) { - ASSERT(getDirective(token) == DIRECTIVE_ERROR); + assert(getDirective(token) == DIRECTIVE_ERROR); std::ostringstream stream; mTokenizer->lex(token); @@ -608,7 +601,7 @@ void DirectiveParser::parseError(Token *token) // Parses pragma of form: #pragma name[(value)]. void DirectiveParser::parsePragma(Token *token) { - ASSERT(getDirective(token) == DIRECTIVE_PRAGMA); + assert(getDirective(token) == DIRECTIVE_PRAGMA); enum State { @@ -669,7 +662,7 @@ void DirectiveParser::parsePragma(Token *token) void DirectiveParser::parseExtension(Token *token) { - ASSERT(getDirective(token) == DIRECTIVE_EXTENSION); + assert(getDirective(token) == DIRECTIVE_EXTENSION); enum State { @@ -750,7 +743,7 @@ void DirectiveParser::parseExtension(Token *token) void DirectiveParser::parseVersion(Token *token) { - ASSERT(getDirective(token) == DIRECTIVE_VERSION); + assert(getDirective(token) == DIRECTIVE_VERSION); if (mPastFirstStatement) { @@ -837,7 +830,7 @@ void DirectiveParser::parseVersion(Token *token) void DirectiveParser::parseLine(Token *token) { - ASSERT(getDirective(token) == DIRECTIVE_LINE); + assert(getDirective(token) == DIRECTIVE_LINE); bool valid = true; bool parsedFileNumber = false; @@ -938,8 +931,8 @@ void DirectiveParser::parseConditionalIf(Token *token) expression = parseExpressionIfdef(token) == 0 ? 1 : 0; break; default: - UNREACHABLE(); - break; + assert(false); + break; } block.skipGroup = expression == 0; block.foundValidGroup = expression != 0; @@ -949,7 +942,8 @@ void DirectiveParser::parseConditionalIf(Token *token) int DirectiveParser::parseExpressionIf(Token *token) { - ASSERT((getDirective(token) == DIRECTIVE_IF) || (getDirective(token) == DIRECTIVE_ELIF)); + assert((getDirective(token) == DIRECTIVE_IF) || + (getDirective(token) == DIRECTIVE_ELIF)); DefinedParser definedParser(mTokenizer, mMacroSet, mDiagnostics); MacroExpander macroExpander(&definedParser, mMacroSet, mDiagnostics); @@ -976,7 +970,8 @@ int DirectiveParser::parseExpressionIf(Token *token) int DirectiveParser::parseExpressionIfdef(Token *token) { - ASSERT((getDirective(token) == DIRECTIVE_IFDEF) || (getDirective(token) == DIRECTIVE_IFNDEF)); + assert((getDirective(token) == DIRECTIVE_IFDEF) || + (getDirective(token) == DIRECTIVE_IFNDEF)); mTokenizer->lex(token); if (token->type != Token::IDENTIFIER) diff --git a/gfx/angle/src/compiler/preprocessor/DirectiveParser.h b/gfx/angle/src/compiler/preprocessor/DirectiveParser.h index f0e889c8a..2888e289c 100755 --- a/gfx/angle/src/compiler/preprocessor/DirectiveParser.h +++ b/gfx/angle/src/compiler/preprocessor/DirectiveParser.h @@ -7,9 +7,10 @@ #ifndef COMPILER_PREPROCESSOR_DIRECTIVEPARSER_H_ #define COMPILER_PREPROCESSOR_DIRECTIVEPARSER_H_ -#include "compiler/preprocessor/Lexer.h" -#include "compiler/preprocessor/Macro.h" -#include "compiler/preprocessor/SourceLocation.h" +#include "Lexer.h" +#include "Macro.h" +#include "pp_utils.h" +#include "SourceLocation.h" namespace pp { @@ -29,6 +30,7 @@ class DirectiveParser : public Lexer void lex(Token *token) override; private: + PP_DISALLOW_COPY_AND_ASSIGN(DirectiveParser); void parseDirective(Token *token); void parseDefine(Token *token); diff --git a/gfx/angle/src/compiler/preprocessor/ExpressionParser.cpp b/gfx/angle/src/compiler/preprocessor/ExpressionParser.cpp index ee20a6ff6..b765c644c 100755 --- a/gfx/angle/src/compiler/preprocessor/ExpressionParser.cpp +++ b/gfx/angle/src/compiler/preprocessor/ExpressionParser.cpp @@ -99,15 +99,17 @@ #include #include -#include #include "DiagnosticsBase.h" #include "Lexer.h" #include "Token.h" -#include "common/mathutil.h" -typedef int32_t YYSTYPE; -typedef uint32_t UNSIGNED_TYPE; +#if defined(_MSC_VER) +typedef __int64 YYSTYPE; +#else +#include +typedef intmax_t YYSTYPE; +#endif // _MSC_VER #define YYENABLE_NLS 0 #define YYLTYPE_IS_TRIVIAL 1 @@ -496,12 +498,9 @@ static const yytype_uint8 yytranslate[] = #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 108, 108, 115, 116, 127, 127, 148, 148, 169, - 172, 175, 178, 181, 184, 187, 190, 193, 196, 221, - 246, 249, 252, 278, 305, 308, 311, 314, 326, 329 -}; +static const yytype_uint16 yyrline[] = {0, 110, 110, 117, 118, 129, 129, 150, 150, 171, + 174, 177, 180, 183, 186, 189, 192, 195, 198, 218, + 238, 241, 244, 264, 284, 287, 290, 293, 296, 299}; #endif #if YYDEBUG || YYERROR_VERBOSE || 0 @@ -1493,7 +1492,7 @@ yyreduce: case 18: { - if ((yyvsp[0]) < 0 || (yyvsp[0]) > 31) + if ((yyvsp[0]) < 0) { if (!context->isIgnoringErrors()) { @@ -1501,17 +1500,11 @@ yyreduce: stream << (yyvsp[-2]) << " >> " << (yyvsp[0]); std::string text = stream.str(); context->diagnostics->report(pp::Diagnostics::PP_UNDEFINED_SHIFT, - context->token->location, - text.c_str()); + context->token->location, text.c_str()); *(context->valid) = false; } (yyval) = static_cast(0); } - else if ((yyvsp[-2]) < 0) - { - // Logical shift right. - (yyval) = static_cast(static_cast((yyvsp[-2])) >> (yyvsp[0])); - } else { (yyval) = (yyvsp[-2]) >> (yyvsp[0]); @@ -1523,7 +1516,7 @@ yyreduce: case 19: { - if ((yyvsp[0]) < 0 || (yyvsp[0]) > 31) + if ((yyvsp[0]) < 0) { if (!context->isIgnoringErrors()) { @@ -1531,17 +1524,11 @@ yyreduce: stream << (yyvsp[-2]) << " << " << (yyvsp[0]); std::string text = stream.str(); context->diagnostics->report(pp::Diagnostics::PP_UNDEFINED_SHIFT, - context->token->location, - text.c_str()); + context->token->location, text.c_str()); *(context->valid) = false; } (yyval) = static_cast(0); } - else if ((yyvsp[-2]) < 0) - { - // Logical shift left. - (yyval) = static_cast(static_cast((yyvsp[-2])) << (yyvsp[0])); - } else { (yyval) = (yyvsp[-2]) << (yyvsp[0]); @@ -1553,7 +1540,7 @@ yyreduce: case 20: { - (yyval) = gl::WrappingDiff((yyvsp[-2]), (yyvsp[0])); + (yyval) = (yyvsp[-2]) - (yyvsp[0]); } break; @@ -1561,7 +1548,7 @@ yyreduce: case 21: { - (yyval) = gl::WrappingSum((yyvsp[-2]), (yyvsp[0])); + (yyval) = (yyvsp[-2]) + (yyvsp[0]); } break; @@ -1583,12 +1570,6 @@ yyreduce: } (yyval) = static_cast(0); } - else if (((yyvsp[-2]) == std::numeric_limits::min()) && ((yyvsp[0]) == -1)) - { - // Check for the special case where the minimum representable number is - // divided by -1. If left alone this has undefined results. - (yyval) = 0; - } else { (yyval) = (yyvsp[-2]) % (yyvsp[0]); @@ -1614,13 +1595,6 @@ yyreduce: } (yyval) = static_cast(0); } - else if (((yyvsp[-2]) == std::numeric_limits::min()) && ((yyvsp[0]) == -1)) - { - // Check for the special case where the minimum representable number is - // divided by -1. If left alone this leads to integer overflow in C++, which - // has undefined results. - (yyval) = std::numeric_limits::max(); - } else { (yyval) = (yyvsp[-2]) / (yyvsp[0]); @@ -1632,7 +1606,7 @@ yyreduce: case 24: { - (yyval) = gl::WrappingMul((yyvsp[-2]), (yyvsp[0])); + (yyval) = (yyvsp[-2]) * (yyvsp[0]); } break; @@ -1656,16 +1630,7 @@ yyreduce: case 27: { - // Check for negation of minimum representable integer to prevent undefined signed int - // overflow. - if ((yyvsp[0]) == std::numeric_limits::min()) - { - (yyval) = std::numeric_limits::min(); - } - else - { - (yyval) = -(yyvsp[0]); - } + (yyval) = - (yyvsp[0]); } break; diff --git a/gfx/angle/src/compiler/preprocessor/ExpressionParser.h b/gfx/angle/src/compiler/preprocessor/ExpressionParser.h index 0f2901b87..841c67b61 100755 --- a/gfx/angle/src/compiler/preprocessor/ExpressionParser.h +++ b/gfx/angle/src/compiler/preprocessor/ExpressionParser.h @@ -7,8 +7,8 @@ #ifndef COMPILER_PREPROCESSOR_EXPRESSIONPARSER_H_ #define COMPILER_PREPROCESSOR_EXPRESSIONPARSER_H_ -#include "common/angleutils.h" -#include "compiler/preprocessor/DiagnosticsBase.h" +#include "DiagnosticsBase.h" +#include "pp_utils.h" namespace pp { @@ -16,7 +16,7 @@ namespace pp class Lexer; struct Token; -class ExpressionParser : angle::NonCopyable +class ExpressionParser { public: struct ErrorSettings @@ -34,6 +34,8 @@ class ExpressionParser : angle::NonCopyable bool *valid); private: + PP_DISALLOW_COPY_AND_ASSIGN(ExpressionParser); + Lexer *mLexer; Diagnostics *mDiagnostics; }; diff --git a/gfx/angle/src/compiler/preprocessor/ExpressionParser.y b/gfx/angle/src/compiler/preprocessor/ExpressionParser.y index 4dbc9e828..dc0080eac 100755 --- a/gfx/angle/src/compiler/preprocessor/ExpressionParser.y +++ b/gfx/angle/src/compiler/preprocessor/ExpressionParser.y @@ -41,15 +41,17 @@ WHICH GENERATES THE GLSL ES preprocessor expression parser. #include #include -#include #include "DiagnosticsBase.h" #include "Lexer.h" #include "Token.h" -#include "common/mathutil.h" -typedef int32_t YYSTYPE; -typedef uint32_t UNSIGNED_TYPE; +#if defined(_MSC_VER) +typedef __int64 YYSTYPE; +#else +#include +typedef intmax_t YYSTYPE; +#endif // _MSC_VER #define YYENABLE_NLS 0 #define YYLTYPE_IS_TRIVIAL 1 @@ -194,7 +196,7 @@ expression $$ = $1 < $3; } | expression TOK_OP_RIGHT expression { - if ($3 < 0 || $3 > 31) + if ($3 < 0) { if (!context->isIgnoringErrors()) { @@ -208,18 +210,13 @@ expression } $$ = static_cast(0); } - else if ($1 < 0) - { - // Logical shift right. - $$ = static_cast(static_cast($1) >> $3); - } else { $$ = $1 >> $3; } } | expression TOK_OP_LEFT expression { - if ($3 < 0 || $3 > 31) + if ($3 < 0) { if (!context->isIgnoringErrors()) { @@ -233,21 +230,16 @@ expression } $$ = static_cast(0); } - else if ($1 < 0) - { - // Logical shift left. - $$ = static_cast(static_cast($1) << $3); - } else { $$ = $1 << $3; } } | expression '-' expression { - $$ = gl::WrappingDiff($1, $3); + $$ = $1 - $3; } | expression '+' expression { - $$ = gl::WrappingSum($1, $3); + $$ = $1 + $3; } | expression '%' expression { if ($3 == 0) @@ -264,12 +256,6 @@ expression } $$ = static_cast(0); } - else if (($1 == std::numeric_limits::min()) && ($3 == -1)) - { - // Check for the special case where the minimum representable number is - // divided by -1. If left alone this has undefined results. - $$ = 0; - } else { $$ = $1 % $3; @@ -290,20 +276,13 @@ expression } $$ = static_cast(0); } - else if (($1 == std::numeric_limits::min()) && ($3 == -1)) - { - // Check for the special case where the minimum representable number is - // divided by -1. If left alone this leads to integer overflow in C++, which - // has undefined results. - $$ = std::numeric_limits::max(); - } else { $$ = $1 / $3; } } | expression '*' expression { - $$ = gl::WrappingMul($1, $3); + $$ = $1 * $3; } | '!' expression %prec TOK_UNARY { $$ = ! $2; @@ -312,16 +291,7 @@ expression $$ = ~ $2; } | '-' expression %prec TOK_UNARY { - // Check for negation of minimum representable integer to prevent undefined signed int - // overflow. - if ($2 == std::numeric_limits::min()) - { - $$ = std::numeric_limits::min(); - } - else - { - $$ = -$2; - } + $$ = - $2; } | '+' expression %prec TOK_UNARY { $$ = + $2; diff --git a/gfx/angle/src/compiler/preprocessor/Input.cpp b/gfx/angle/src/compiler/preprocessor/Input.cpp index 8bce56ff2..5541d46f7 100755 --- a/gfx/angle/src/compiler/preprocessor/Input.cpp +++ b/gfx/angle/src/compiler/preprocessor/Input.cpp @@ -4,13 +4,12 @@ // found in the LICENSE file. // -#include "compiler/preprocessor/Input.h" +#include "Input.h" #include +#include #include -#include "common/debug.h" - namespace pp { @@ -33,7 +32,7 @@ Input::Input(size_t count, const char *const string[], const int length[]) : const char *Input::skipChar() { // This function should only be called when there is a character to skip. - ASSERT(mReadLoc.cIndex < mLength[mReadLoc.sIndex]); + assert(mReadLoc.cIndex < mLength[mReadLoc.sIndex]); ++mReadLoc.cIndex; if (mReadLoc.cIndex == mLength[mReadLoc.sIndex]) { diff --git a/gfx/angle/src/compiler/preprocessor/Input.h b/gfx/angle/src/compiler/preprocessor/Input.h index ecbb04962..a1de7ddd8 100755 --- a/gfx/angle/src/compiler/preprocessor/Input.h +++ b/gfx/angle/src/compiler/preprocessor/Input.h @@ -7,7 +7,7 @@ #ifndef COMPILER_PREPROCESSOR_INPUT_H_ #define COMPILER_PREPROCESSOR_INPUT_H_ -#include +#include #include namespace pp diff --git a/gfx/angle/src/compiler/preprocessor/Lexer.cpp b/gfx/angle/src/compiler/preprocessor/Lexer.cpp index 89cb3cf44..7c663ee76 100755 --- a/gfx/angle/src/compiler/preprocessor/Lexer.cpp +++ b/gfx/angle/src/compiler/preprocessor/Lexer.cpp @@ -4,7 +4,7 @@ // found in the LICENSE file. // -#include "compiler/preprocessor/Lexer.h" +#include "Lexer.h" namespace pp { diff --git a/gfx/angle/src/compiler/preprocessor/Lexer.h b/gfx/angle/src/compiler/preprocessor/Lexer.h index 775bc0a20..990dc5e21 100755 --- a/gfx/angle/src/compiler/preprocessor/Lexer.h +++ b/gfx/angle/src/compiler/preprocessor/Lexer.h @@ -7,14 +7,12 @@ #ifndef COMPILER_PREPROCESSOR_LEXER_H_ #define COMPILER_PREPROCESSOR_LEXER_H_ -#include "common/angleutils.h" - namespace pp { struct Token; -class Lexer : angle::NonCopyable +class Lexer { public: virtual ~Lexer(); diff --git a/gfx/angle/src/compiler/preprocessor/Macro.cpp b/gfx/angle/src/compiler/preprocessor/Macro.cpp index f5c94399d..4c4d5fd2e 100755 --- a/gfx/angle/src/compiler/preprocessor/Macro.cpp +++ b/gfx/angle/src/compiler/preprocessor/Macro.cpp @@ -4,10 +4,11 @@ // found in the LICENSE file. // -#include "compiler/preprocessor/Macro.h" +#include "Macro.h" -#include "common/angleutils.h" -#include "compiler/preprocessor/Token.h" +#include + +#include "Token.h" namespace pp { @@ -22,9 +23,12 @@ bool Macro::equals(const Macro &other) const void PredefineMacro(MacroSet *macroSet, const char *name, int value) { + std::ostringstream stream; + stream << value; + Token token; token.type = Token::CONST_INT; - token.text = ToString(value); + token.text = stream.str(); Macro macro; macro.predefined = true; diff --git a/gfx/angle/src/compiler/preprocessor/Macro.h b/gfx/angle/src/compiler/preprocessor/Macro.h index 557df163c..31ee22c26 100755 --- a/gfx/angle/src/compiler/preprocessor/Macro.h +++ b/gfx/angle/src/compiler/preprocessor/Macro.h @@ -26,12 +26,16 @@ struct Macro typedef std::vector Parameters; typedef std::vector Replacements; - Macro() : predefined(false), disabled(false), expansionCount(0), type(kTypeObj) {} + Macro() + : predefined(false), + disabled(false), + type(kTypeObj) + { + } bool equals(const Macro &other) const; bool predefined; mutable bool disabled; - mutable int expansionCount; Type type; std::string name; diff --git a/gfx/angle/src/compiler/preprocessor/MacroExpander.cpp b/gfx/angle/src/compiler/preprocessor/MacroExpander.cpp index 2f854f5a6..3c0423e72 100755 --- a/gfx/angle/src/compiler/preprocessor/MacroExpander.cpp +++ b/gfx/angle/src/compiler/preprocessor/MacroExpander.cpp @@ -4,22 +4,17 @@ // found in the LICENSE file. // -#include "compiler/preprocessor/MacroExpander.h" +#include "MacroExpander.h" #include +#include -#include "common/debug.h" -#include "compiler/preprocessor/DiagnosticsBase.h" -#include "compiler/preprocessor/Token.h" +#include "DiagnosticsBase.h" +#include "Token.h" namespace pp { -namespace -{ - -const size_t kMaxContextTokens = 10000; - class TokenLexer : public Lexer { public: @@ -45,52 +40,22 @@ class TokenLexer : public Lexer } private: + PP_DISALLOW_COPY_AND_ASSIGN(TokenLexer); + TokenVector mTokens; TokenVector::const_iterator mIter; }; -} // anonymous namespace - -class MacroExpander::ScopedMacroReenabler final : angle::NonCopyable -{ - public: - ScopedMacroReenabler(MacroExpander *expander); - ~ScopedMacroReenabler(); - - private: - MacroExpander *mExpander; -}; - -MacroExpander::ScopedMacroReenabler::ScopedMacroReenabler(MacroExpander *expander) - : mExpander(expander) -{ - mExpander->mDeferReenablingMacros = true; -} - -MacroExpander::ScopedMacroReenabler::~ScopedMacroReenabler() -{ - mExpander->mDeferReenablingMacros = false; - for (auto *macro : mExpander->mMacrosToReenable) - { - macro->disabled = false; - } - mExpander->mMacrosToReenable.clear(); -} - MacroExpander::MacroExpander(Lexer *lexer, MacroSet *macroSet, Diagnostics *diagnostics) - : mLexer(lexer), - mMacroSet(macroSet), - mDiagnostics(diagnostics), - mTotalTokensInContexts(0), - mDeferReenablingMacros(false) + : mLexer(lexer), mMacroSet(macroSet), mDiagnostics(diagnostics) { } MacroExpander::~MacroExpander() { - for (MacroContext *context : mContextStack) + for (std::size_t i = 0; i < mContextStack.size(); ++i) { - delete context; + delete mContextStack[i]; } } @@ -117,15 +82,10 @@ void MacroExpander::lex(Token *token) token->setExpansionDisabled(true); break; } - - // Bump the expansion count before peeking if the next token is a '(' - // otherwise there could be a #undef of the macro before the next token. - macro.expansionCount++; if ((macro.type == Macro::kTypeFunc) && !isNextTokenLeftParen()) { // If the token immediately after the macro name is not a '(', // this macro should not be expanded. - macro.expansionCount--; break; } @@ -154,7 +114,6 @@ void MacroExpander::getToken(Token *token) } else { - ASSERT(mTotalTokensInContexts == 0); mLexer->lex(token); } } @@ -165,11 +124,11 @@ void MacroExpander::ungetToken(const Token &token) { MacroContext *context = mContextStack.back(); context->unget(); - ASSERT(context->replacements[context->index] == token); + assert(context->replacements[context->index] == token); } else { - ASSERT(!mReserveToken.get()); + assert(!mReserveToken.get()); mReserveToken.reset(new Token(token)); } } @@ -187,10 +146,10 @@ bool MacroExpander::isNextTokenLeftParen() bool MacroExpander::pushMacro(const Macro ¯o, const Token &identifier) { - ASSERT(!macro.disabled); - ASSERT(!identifier.expansionDisabled()); - ASSERT(identifier.type == Token::IDENTIFIER); - ASSERT(identifier.text == macro.name); + assert(!macro.disabled); + assert(!identifier.expansionDisabled()); + assert(identifier.type == Token::IDENTIFIER); + assert(identifier.text == macro.name); std::vector replacements; if (!expandMacro(macro, identifier, &replacements)) @@ -203,30 +162,19 @@ bool MacroExpander::pushMacro(const Macro ¯o, const Token &identifier) context->macro = ¯o; context->replacements.swap(replacements); mContextStack.push_back(context); - mTotalTokensInContexts += context->replacements.size(); return true; } void MacroExpander::popMacro() { - ASSERT(!mContextStack.empty()); + assert(!mContextStack.empty()); MacroContext *context = mContextStack.back(); mContextStack.pop_back(); - ASSERT(context->empty()); - ASSERT(context->macro->disabled); - ASSERT(context->macro->expansionCount > 0); - if (mDeferReenablingMacros) - { - mMacrosToReenable.push_back(context->macro); - } - else - { - context->macro->disabled = false; - } - context->macro->expansionCount--; - mTotalTokensInContexts -= context->replacements.size(); + assert(context->empty()); + assert(context->macro->disabled); + context->macro->disabled = false; delete context; } @@ -251,21 +199,25 @@ bool MacroExpander::expandMacro(const Macro ¯o, const char kLine[] = "__LINE__"; const char kFile[] = "__FILE__"; - ASSERT(replacements->size() == 1); + assert(replacements->size() == 1); Token& repl = replacements->front(); if (macro.name == kLine) { - repl.text = ToString(identifier.location.line); + std::ostringstream stream; + stream << identifier.location.line; + repl.text = stream.str(); } else if (macro.name == kFile) { - repl.text = ToString(identifier.location.file); + std::ostringstream stream; + stream << identifier.location.file; + repl.text = stream.str(); } } } else { - ASSERT(macro.type == Macro::kTypeFunc); + assert(macro.type == Macro::kTypeFunc); std::vector args; args.reserve(macro.parameters.size()); if (!collectMacroArgs(macro, identifier, &args, &replacementLocation)) @@ -296,17 +248,10 @@ bool MacroExpander::collectMacroArgs(const Macro ¯o, { Token token; getToken(&token); - ASSERT(token.type == '('); + assert(token.type == '('); args->push_back(MacroArg()); - - // Defer reenabling macros until args collection is finished to avoid the possibility of - // infinite recursion. Otherwise infinite recursion might happen when expanding the args after - // macros have been popped from the context stack when parsing the args. - ScopedMacroReenabler deferReenablingMacros(this); - - int openParens = 1; - while (openParens != 0) + for (int openParens = 1; openParens != 0; ) { getToken(&token); @@ -372,9 +317,9 @@ bool MacroExpander::collectMacroArgs(const Macro ¯o, // Pre-expand each argument before substitution. // This step expands each argument individually before they are // inserted into the macro body. - size_t numTokens = 0; - for (auto &arg : *args) + for (std::size_t i = 0; i < args->size(); ++i) { + MacroArg &arg = args->at(i); TokenLexer lexer(&arg); MacroExpander expander(&lexer, mMacroSet, mDiagnostics); @@ -384,12 +329,6 @@ bool MacroExpander::collectMacroArgs(const Macro ¯o, { arg.push_back(token); expander.lex(&token); - numTokens++; - if (numTokens + mTotalTokensInContexts > kMaxContextTokens) - { - mDiagnostics->report(Diagnostics::PP_OUT_OF_MEMORY, token.location, token.text); - return false; - } } } return true; @@ -401,14 +340,6 @@ void MacroExpander::replaceMacroParams(const Macro ¯o, { for (std::size_t i = 0; i < macro.replacements.size(); ++i) { - if (!replacements->empty() && - replacements->size() + mTotalTokensInContexts > kMaxContextTokens) - { - const Token &token = replacements->back(); - mDiagnostics->report(Diagnostics::PP_OUT_OF_MEMORY, token.location, token.text); - return; - } - const Token &repl = macro.replacements[i]; if (repl.type != Token::IDENTIFIER) { @@ -441,25 +372,5 @@ void MacroExpander::replaceMacroParams(const Macro ¯o, } } -MacroExpander::MacroContext::MacroContext() : macro(0), index(0) -{ -} - -bool MacroExpander::MacroContext::empty() const -{ - return index == replacements.size(); -} - -const Token &MacroExpander::MacroContext::get() -{ - return replacements[index++]; -} - -void MacroExpander::MacroContext::unget() -{ - ASSERT(index > 0); - --index; -} - } // namespace pp diff --git a/gfx/angle/src/compiler/preprocessor/MacroExpander.h b/gfx/angle/src/compiler/preprocessor/MacroExpander.h index 3a8450f5e..dbf980308 100755 --- a/gfx/angle/src/compiler/preprocessor/MacroExpander.h +++ b/gfx/angle/src/compiler/preprocessor/MacroExpander.h @@ -7,11 +7,13 @@ #ifndef COMPILER_PREPROCESSOR_MACROEXPANDER_H_ #define COMPILER_PREPROCESSOR_MACROEXPANDER_H_ +#include #include #include -#include "compiler/preprocessor/Lexer.h" -#include "compiler/preprocessor/Macro.h" +#include "Lexer.h" +#include "Macro.h" +#include "pp_utils.h" namespace pp { @@ -28,6 +30,8 @@ class MacroExpander : public Lexer void lex(Token *token) override; private: + PP_DISALLOW_COPY_AND_ASSIGN(MacroExpander); + void getToken(Token *token); void ungetToken(const Token &token); bool isNextTokenLeftParen(); @@ -50,14 +54,28 @@ class MacroExpander : public Lexer struct MacroContext { - MacroContext(); - bool empty() const; - const Token &get(); - void unget(); - const Macro *macro; std::size_t index; std::vector replacements; + + MacroContext() + : macro(0), + index(0) + { + } + bool empty() const + { + return index == replacements.size(); + } + const Token &get() + { + return replacements[index++]; + } + void unget() + { + assert(index > 0); + --index; + } }; Lexer *mLexer; @@ -66,12 +84,6 @@ class MacroExpander : public Lexer std::unique_ptr mReserveToken; std::vector mContextStack; - size_t mTotalTokensInContexts; - - bool mDeferReenablingMacros; - std::vector mMacrosToReenable; - - class ScopedMacroReenabler; }; } // namespace pp diff --git a/gfx/angle/src/compiler/preprocessor/Preprocessor.cpp b/gfx/angle/src/compiler/preprocessor/Preprocessor.cpp index 1709d6673..2fa87fe74 100755 --- a/gfx/angle/src/compiler/preprocessor/Preprocessor.cpp +++ b/gfx/angle/src/compiler/preprocessor/Preprocessor.cpp @@ -4,15 +4,16 @@ // found in the LICENSE file. // -#include "compiler/preprocessor/Preprocessor.h" +#include "Preprocessor.h" -#include "common/debug.h" -#include "compiler/preprocessor/DiagnosticsBase.h" -#include "compiler/preprocessor/DirectiveParser.h" -#include "compiler/preprocessor/Macro.h" -#include "compiler/preprocessor/MacroExpander.h" -#include "compiler/preprocessor/Token.h" -#include "compiler/preprocessor/Tokenizer.h" +#include + +#include "DiagnosticsBase.h" +#include "DirectiveParser.h" +#include "Macro.h" +#include "MacroExpander.h" +#include "Token.h" +#include "Tokenizer.h" namespace pp { @@ -77,8 +78,8 @@ void Preprocessor::lex(Token *token) // Convert preprocessing tokens to compiler tokens or report // diagnostics. case Token::PP_HASH: - UNREACHABLE(); - break; + assert(false); + break; case Token::PP_NUMBER: mImpl->diagnostics->report(Diagnostics::PP_INVALID_NUMBER, token->location, token->text); diff --git a/gfx/angle/src/compiler/preprocessor/Preprocessor.h b/gfx/angle/src/compiler/preprocessor/Preprocessor.h index cd699786f..fe25daa12 100755 --- a/gfx/angle/src/compiler/preprocessor/Preprocessor.h +++ b/gfx/angle/src/compiler/preprocessor/Preprocessor.h @@ -7,9 +7,9 @@ #ifndef COMPILER_PREPROCESSOR_PREPROCESSOR_H_ #define COMPILER_PREPROCESSOR_PREPROCESSOR_H_ -#include +#include -#include "common/angleutils.h" +#include "pp_utils.h" namespace pp { @@ -19,7 +19,7 @@ class DirectiveHandler; struct PreprocessorImpl; struct Token; -class Preprocessor : angle::NonCopyable +class Preprocessor { public: Preprocessor(Diagnostics *diagnostics, DirectiveHandler *directiveHandler); @@ -44,6 +44,8 @@ class Preprocessor : angle::NonCopyable void setMaxTokenSize(size_t maxTokenSize); private: + PP_DISALLOW_COPY_AND_ASSIGN(Preprocessor); + PreprocessorImpl *mImpl; }; diff --git a/gfx/angle/src/compiler/preprocessor/Token.cpp b/gfx/angle/src/compiler/preprocessor/Token.cpp index 41610a402..d10265474 100755 --- a/gfx/angle/src/compiler/preprocessor/Token.cpp +++ b/gfx/angle/src/compiler/preprocessor/Token.cpp @@ -4,10 +4,11 @@ // found in the LICENSE file. // -#include "compiler/preprocessor/Token.h" +#include "Token.h" -#include "common/debug.h" -#include "compiler/preprocessor/numeric_lex.h" +#include + +#include "numeric_lex.h" namespace pp { @@ -54,19 +55,19 @@ void Token::setExpansionDisabled(bool disable) bool Token::iValue(int *value) const { - ASSERT(type == CONST_INT); + assert(type == CONST_INT); return numeric_lex_int(text, value); } bool Token::uValue(unsigned int *value) const { - ASSERT(type == CONST_INT); + assert(type == CONST_INT); return numeric_lex_int(text, value); } bool Token::fValue(float *value) const { - ASSERT(type == CONST_FLOAT); + assert(type == CONST_FLOAT); return numeric_lex_float(text, value); } diff --git a/gfx/angle/src/compiler/preprocessor/Token.h b/gfx/angle/src/compiler/preprocessor/Token.h index 716503b32..347c47e30 100755 --- a/gfx/angle/src/compiler/preprocessor/Token.h +++ b/gfx/angle/src/compiler/preprocessor/Token.h @@ -10,7 +10,7 @@ #include #include -#include "compiler/preprocessor/SourceLocation.h" +#include "SourceLocation.h" namespace pp { @@ -113,7 +113,7 @@ inline bool operator!=(const Token &lhs, const Token &rhs) return !lhs.equals(rhs); } -std::ostream &operator<<(std::ostream &out, const Token &token); +extern std::ostream &operator<<(std::ostream &out, const Token &token); } // namepsace pp diff --git a/gfx/angle/src/compiler/preprocessor/Tokenizer.cpp b/gfx/angle/src/compiler/preprocessor/Tokenizer.cpp index 40e910e22..eb6156f47 100755 --- a/gfx/angle/src/compiler/preprocessor/Tokenizer.cpp +++ b/gfx/angle/src/compiler/preprocessor/Tokenizer.cpp @@ -9,96 +9,20 @@ +#line 13 "./Tokenizer.cpp" + #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ - - - - - - - - - - #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ @@ -132,6 +56,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -173,27 +98,30 @@ typedef unsigned int flex_uint32_t; #endif /* ! FLEXINT_H */ +#ifdef __cplusplus +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#endif +#else /* ! __cplusplus */ +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) - +#define YY_USE_CONST +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif /* Returned upon end-of-file. */ #define YY_NULL 0 - - /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the @@ -201,34 +129,12 @@ typedef unsigned int flex_uint32_t; */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - - - - /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T typedef void* yyscan_t; #endif - - - - - - - - - - - - - - - - - - /* For convenience, these vars (plus the bison vars far below) are macros in the reentrant scanner. */ #define yyin yyg->yyin_r @@ -240,29 +146,12 @@ typedef void* yyscan_t; #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yy_flex_debug yyg->yy_flex_debug_r - - - - - - - - - - - - - - - /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yyg->yy_start = 1 + 2 * - - /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. @@ -270,41 +159,23 @@ typedef void* yyscan_t; #define YY_START ((yyg->yy_start - 1) / 2) #define YYSTATE YY_START - - /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - - /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE pprestart(yyin ,yyscanner ) - - #define YY_END_OF_BUFFER_CHAR 0 - /* Size of default input buffer. */ #ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else #define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ #endif - /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - - #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; @@ -315,22 +186,18 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; typedef size_t yy_size_t; #endif - - +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - - - #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) - - - /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -345,31 +212,26 @@ typedef size_t yy_size_t; } \ while ( 0 ) - - #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ - int yy_buf_size; + yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -393,7 +255,6 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -418,10 +279,6 @@ struct yy_buffer_state }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ - - - - /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". @@ -432,18 +289,11 @@ struct yy_buffer_state ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ : NULL) - - /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - - - - - void pprestart (FILE *input_file ,yyscan_t yyscanner ); void pp_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); YY_BUFFER_STATE pp_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); @@ -452,30 +302,22 @@ void pp_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void pppush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void pppop_buffer_state (yyscan_t yyscanner ); - static void ppensure_buffer_stack (yyscan_t yyscanner ); static void pp_load_buffer_state (yyscan_t yyscanner ); static void pp_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - - #define YY_FLUSH_BUFFER pp_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - YY_BUFFER_STATE pp_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE pp_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE pp_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - +YY_BUFFER_STATE pp_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); void *ppalloc (yy_size_t ,yyscan_t yyscanner ); void *pprealloc (void *,yy_size_t ,yyscan_t yyscanner ); void ppfree (void * ,yyscan_t yyscanner ); - #define yy_new_buffer pp_create_buffer - - #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ @@ -486,8 +328,6 @@ void ppfree (void * ,yyscan_t yyscanner ); YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } - - #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ @@ -498,50 +338,34 @@ void ppfree (void * ,yyscan_t yyscanner ); YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } - - #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - /* Begin user sect3 */ -#define ppwrap(yyscanner) (/*CONSTCOND*/1) +#define ppwrap(yyscanner) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; - - - typedef int yy_state_type; #define yytext_ptr yytext_r - - - - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); - - - +static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; - - #define YY_NUM_RULES 38 #define YY_END_OF_BUFFER 39 /* This struct is not used in this scanner, @@ -566,7 +390,7 @@ static yyconst flex_int16_t yy_accept[98] = } ; -static yyconst YY_CHAR yy_ec[256] = +static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, @@ -598,14 +422,14 @@ static yyconst YY_CHAR yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst YY_CHAR yy_meta[30] = +static yyconst flex_int32_t yy_meta[30] = { 0, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 1, 1, 4, 1, 5, 5, 5, 1, 1, 1, 5, 5, 5, 5, 5, 5, 1, 1, 1 } ; -static yyconst flex_uint16_t yy_base[103] = +static yyconst flex_int16_t yy_base[103] = { 0, 0, 0, 27, 29, 137, 194, 133, 194, 117, 100, 194, 98, 26, 194, 94, 24, 28, 33, 32, 39, @@ -637,7 +461,7 @@ static yyconst flex_int16_t yy_def[103] = 97, 97 } ; -static yyconst flex_uint16_t yy_nxt[224] = +static yyconst flex_int16_t yy_nxt[224] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, 22, 23, 24, @@ -720,10 +544,10 @@ IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh. #pragma warning(disable: 4005) #endif -#include "compiler/preprocessor/Tokenizer.h" +#include "Tokenizer.h" -#include "compiler/preprocessor/DiagnosticsBase.h" -#include "compiler/preprocessor/Token.h" +#include "DiagnosticsBase.h" +#include "Token.h" #if defined(__GNUC__) // Triggered by the auto-generated yy_fatal_error function. @@ -772,23 +596,11 @@ typedef pp::SourceLocation YYLTYPE; #define YY_INPUT(buf, result, maxSize) \ result = yyextra->input.read(buf, maxSize, &yylineno); - - - - #define INITIAL 0 #define COMMENT 1 - - - - - #define YY_EXTRA_TYPE pp::Tokenizer::Context* - - - /* Holds the entire state of the reentrant scanner. */ struct yyguts_t { @@ -802,8 +614,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - int yy_n_chars; - int yyleng_r; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -817,132 +629,69 @@ struct yyguts_t int yylineno_r; int yy_flex_debug_r; - - - char *yytext_r; int yy_more_flag; int yy_more_len; - - YYSTYPE * yylval_r; - - YYLTYPE * yylloc_r; - }; /* end struct yyguts_t */ - - - static int yy_init_globals (yyscan_t yyscanner ); - - - - /* This must go here because YYSTYPE and YYLTYPE are included * from bison output in section 1.*/ # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - - int pplex_init (yyscan_t* scanner); int pplex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - - /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ - int pplex_destroy (yyscan_t yyscanner ); - - int ppget_debug (yyscan_t yyscanner ); - - void ppset_debug (int debug_flag ,yyscan_t yyscanner ); - - YY_EXTRA_TYPE ppget_extra (yyscan_t yyscanner ); - - void ppset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - - FILE *ppget_in (yyscan_t yyscanner ); - - -void ppset_in (FILE * _in_str ,yyscan_t yyscanner ); - - +void ppset_in (FILE * in_str ,yyscan_t yyscanner ); FILE *ppget_out (yyscan_t yyscanner ); +void ppset_out (FILE * out_str ,yyscan_t yyscanner ); - -void ppset_out (FILE * _out_str ,yyscan_t yyscanner ); - - - - int ppget_leng (yyscan_t yyscanner ); - - +yy_size_t ppget_leng (yyscan_t yyscanner ); char *ppget_text (yyscan_t yyscanner ); - - int ppget_lineno (yyscan_t yyscanner ); - - -void ppset_lineno (int _line_number ,yyscan_t yyscanner ); - - - +void ppset_lineno (int line_number ,yyscan_t yyscanner ); int ppget_column (yyscan_t yyscanner ); - - - - -void ppset_column (int _column_no ,yyscan_t yyscanner ); - - - +void ppset_column (int column_no ,yyscan_t yyscanner ); YYSTYPE * ppget_lval (yyscan_t yyscanner ); - void ppset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); - - YYLTYPE *ppget_lloc (yyscan_t yyscanner ); - - void ppset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); - - /* Macros after this point can all be overridden by user definitions in * section 1. */ @@ -955,12 +704,6 @@ extern int ppwrap (yyscan_t yyscanner ); #endif #endif - -#ifndef YY_NO_UNPUT - -#endif - - #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif @@ -979,34 +722,19 @@ static int input (yyscan_t yyscanner ); #endif - - - - - - - /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else #define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ #endif - /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif - - /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ @@ -1028,7 +756,7 @@ static int input (yyscan_t yyscanner ); else \ { \ errno=0; \ - while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -1043,8 +771,6 @@ static int input (yyscan_t yyscanner ); #endif - - /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. @@ -1053,48 +779,24 @@ static int input (yyscan_t yyscanner ); #define yyterminate() return YY_NULL #endif - /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif - /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif - - - - /* end tables serialization structures and prototypes */ - - /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 - - - - - - - - - - - - - - - - extern int pplex \ (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); @@ -1102,7 +804,6 @@ extern int pplex \ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ - /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ @@ -1110,39 +811,27 @@ extern int pplex \ #define YY_USER_ACTION #endif - - /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; +#define YY_BREAK break; #endif - - #define YY_RULE_SETUP \ YY_USER_ACTION - - /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - - yylval = yylval_param; - - yylloc = yylloc_param; - if ( !yyg->yy_init ) { yyg->yy_init = 1; @@ -1151,8 +840,6 @@ YY_DECL YY_USER_INIT; #endif - - if ( ! yyg->yy_start ) yyg->yy_start = 1; /* first start state */ @@ -1173,10 +860,9 @@ YY_DECL { - /* Line comment */ - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; @@ -1192,7 +878,7 @@ YY_DECL yy_match: do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1204,7 +890,7 @@ yy_match: if ( yy_current_state >= 98 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_current_state != 97 ); @@ -1216,11 +902,8 @@ yy_find_action: YY_DO_BEFORE_ACTION; - - do_action: /* This label is used only to access EOF actions. */ - switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ @@ -1643,11 +1326,6 @@ ECHO; } /* end of user's declarations */ } /* end of pplex */ - - - - - /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: @@ -1658,9 +1336,9 @@ ECHO; static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - yy_size_t number_to_move, i; + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = yyg->yytext_ptr; + register int number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) @@ -1689,7 +1367,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -1702,8 +1380,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - int num_to_read = - static_cast(YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1); + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ @@ -1716,7 +1394,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1729,7 +1407,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; + b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -1737,8 +1415,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner) yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - num_to_read = static_cast(YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1); + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; } @@ -1746,10 +1424,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ - yy_size_t ret = 0; YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - ret, num_to_read ); - yyg->yy_n_chars = static_cast(ret); + yyg->yy_n_chars, num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } @@ -1773,7 +1449,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) pprealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); @@ -1781,7 +1457,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } - yyg->yy_n_chars += static_cast(number_to_move); + yyg->yy_n_chars += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; @@ -1790,21 +1466,19 @@ static int yy_get_next_buffer (yyscan_t yyscanner) return ret_val; } - /* yy_get_previous_state - get the state just before the EOB char was reached */ - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; + register yy_state_type yy_current_state; + register char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1816,13 +1490,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( yy_current_state >= 98 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } - /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis @@ -1830,11 +1503,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - int yy_is_jam; + register int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; + register char *yy_cp = yyg->yy_c_buf_p; - YY_CHAR yy_c = 1; + register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1846,18 +1519,13 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( yy_current_state >= 98 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 97); (void)yyg; return yy_is_jam ? 0 : yy_current_state; } - -#ifndef YY_NO_UNPUT - -#endif - #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) @@ -1883,7 +1551,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -1907,7 +1575,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) case EOB_ACT_END_OF_FILE: { if ( ppwrap(yyscanner ) ) - return 0; + return EOF; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; @@ -1929,7 +1597,6 @@ static int yy_get_next_buffer (yyscan_t yyscanner) *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ yyg->yy_hold_char = *++yyg->yy_c_buf_p; - return c; } #endif /* ifndef YY_NO_INPUT */ @@ -1953,7 +1620,6 @@ static int yy_get_next_buffer (yyscan_t yyscanner) pp_load_buffer_state(yyscanner ); } - /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. @@ -1990,7 +1656,6 @@ static int yy_get_next_buffer (yyscan_t yyscanner) yyg->yy_did_buffer_switch_on_eof = 1; } - static void pp_load_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; @@ -2014,7 +1679,7 @@ static void pp_load_buffer_state (yyscan_t yyscanner) if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in pp_create_buffer()" ); - b->yy_buf_size = (yy_size_t)size; + b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. @@ -2030,7 +1695,6 @@ static void pp_load_buffer_state (yyscan_t yyscanner) return b; } - /** Destroy the buffer. * @param b a buffer created with pp_create_buffer() * @param yyscanner The scanner object. @@ -2051,7 +1715,6 @@ static void pp_load_buffer_state (yyscan_t yyscanner) ppfree((void *) b ,yyscanner ); } - /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a pprestart() or at EOF. @@ -2076,11 +1739,8 @@ static void pp_load_buffer_state (yyscan_t yyscanner) b->yy_bs_column = 0; } - - b->yy_is_interactive = 0; - errno = oerrno; } @@ -2145,7 +1805,6 @@ void pppush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) yyg->yy_did_buffer_switch_on_eof = 1; } - /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. @@ -2167,7 +1826,6 @@ void pppop_buffer_state (yyscan_t yyscanner) } } - /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ @@ -2182,14 +1840,13 @@ static void ppensure_buffer_stack (yyscan_t yyscanner) * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + num_to_alloc = 1; yyg->yy_buffer_stack = (struct yy_buffer_state**)ppalloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in ppensure_buffer_stack()" ); - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); yyg->yy_buffer_stack_max = num_to_alloc; @@ -2200,7 +1857,7 @@ static void ppensure_buffer_stack (yyscan_t yyscanner) if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; + int grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)pprealloc @@ -2216,10 +1873,6 @@ static void ppensure_buffer_stack (yyscan_t yyscanner) } } - - - - /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer @@ -2234,16 +1887,16 @@ YY_BUFFER_STATE pp_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ - return NULL; + return 0; b = (YY_BUFFER_STATE) ppalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in pp_scan_buffer()" ); - b->yy_buf_size = static_cast(size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; + b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; @@ -2255,9 +1908,6 @@ YY_BUFFER_STATE pp_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann return b; } - - - /** Setup the input buffer state to scan a string. The next call to pplex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan @@ -2269,12 +1919,9 @@ YY_BUFFER_STATE pp_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann YY_BUFFER_STATE pp_scan_string (yyconst char * yystr , yyscan_t yyscanner) { - return pp_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); + return pp_scan_bytes(yystr,strlen(yystr) ,yyscanner); } - - - /** Setup the input buffer state to scan the given bytes. The next call to pplex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan @@ -2282,7 +1929,7 @@ YY_BUFFER_STATE pp_scan_string (yyconst char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; @@ -2290,12 +1937,12 @@ YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, int _yybytes_len , yysc yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) _yybytes_len + 2; + n = _yybytes_len + 2; buf = (char *) ppalloc(n ,yyscanner ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in pp_scan_bytes()" ); - for ( i = 0; i < static_cast(_yybytes_len); ++i ) + for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; @@ -2312,25 +1959,13 @@ YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, int _yybytes_len , yysc return b; } - - - - - - - - - - #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) +static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - (void) fprintf( stderr, "%s\n", msg ); + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -2351,11 +1986,8 @@ static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) } \ while ( 0 ) - - /* Accessor methods (get/set functions) to struct members. */ - /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ @@ -2365,8 +1997,6 @@ YY_EXTRA_TYPE ppget_extra (yyscan_t yyscanner) return yyextra; } - - /** Get the current line number. * @param yyscanner The scanner object. */ @@ -2374,16 +2004,12 @@ int ppget_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (! YY_CURRENT_BUFFER) return 0; return yylineno; } - - - /** Get the current column number. * @param yyscanner The scanner object. */ @@ -2391,16 +2017,12 @@ int ppget_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (! YY_CURRENT_BUFFER) return 0; return yycolumn; } - - - /** Get the input stream. * @param yyscanner The scanner object. */ @@ -2410,8 +2032,6 @@ FILE *ppget_in (yyscan_t yyscanner) return yyin; } - - /** Get the output stream. * @param yyscanner The scanner object. */ @@ -2421,18 +2041,15 @@ FILE *ppget_out (yyscan_t yyscanner) return yyout; } - - /** Get the length of the current token. * @param yyscanner The scanner object. */ -int ppget_leng (yyscan_t yyscanner) +yy_size_t ppget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; } - /** Get the current token. * @param yyscanner The scanner object. */ @@ -2443,8 +2060,6 @@ char *ppget_text (yyscan_t yyscanner) return yytext; } - - /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. @@ -2455,123 +2070,92 @@ void ppset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) yyextra = user_defined ; } - - /** Set the current line number. - * @param _line_number line number + * @param line_number * @param yyscanner The scanner object. */ -void ppset_lineno (int _line_number , yyscan_t yyscanner) +void ppset_lineno (int line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "ppset_lineno called with no buffer" ); - yylineno = _line_number; + yylineno = line_number; } - - - /** Set the current column. - * @param _column_no column number + * @param line_number * @param yyscanner The scanner object. */ -void ppset_column (int _column_no , yyscan_t yyscanner) +void ppset_column (int column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "ppset_column called with no buffer" ); - yycolumn = _column_no; + yycolumn = column_no; } - - - - /** Set the input stream. This does not discard the current * input buffer. - * @param _in_str A readable stream. + * @param in_str A readable stream. * @param yyscanner The scanner object. * @see pp_switch_to_buffer */ -void ppset_in (FILE * _in_str , yyscan_t yyscanner) +void ppset_in (FILE * in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; + yyin = in_str ; } - - -void ppset_out (FILE * _out_str , yyscan_t yyscanner) +void ppset_out (FILE * out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; + yyout = out_str ; } - - - int ppget_debug (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yy_flex_debug; } - - -void ppset_debug (int _bdebug , yyscan_t yyscanner) +void ppset_debug (int bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; + yy_flex_debug = bdebug ; } - /* Accessor methods for yylval and yylloc */ - YYSTYPE * ppget_lval (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yylval; } - - void ppset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yylval = yylval_param; } - - - YYLTYPE *ppget_lloc (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yylloc; } - - void ppset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yylloc = yylloc_param; } - - - - /* User-visible API */ /* pplex_init is special because it creates the scanner itself, so it is @@ -2600,7 +2184,6 @@ int pplex_init(yyscan_t* ptr_yy_globals) return yy_init_globals ( *ptr_yy_globals ); } - /* pplex_init_extra has the same functionality as pplex_init, but follows the * convention of taking the scanner as the last argument. Note however, that * this is a *pointer* to a scanner, as it will be allocated by this call (and @@ -2637,7 +2220,6 @@ int pplex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) return yy_init_globals ( *ptr_yy_globals ); } - static int yy_init_globals (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; @@ -2645,31 +2227,24 @@ static int yy_init_globals (yyscan_t yyscanner) * This function is called from pplex_destroy(), so don't allocate here. */ - - yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack = 0; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; + yyg->yy_c_buf_p = (char *) 0; yyg->yy_init = 0; yyg->yy_start = 0; - yyg->yy_start_stack_ptr = 0; yyg->yy_start_stack_depth = 0; yyg->yy_start_stack = NULL; - - - - - /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = (FILE *) 0; + yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by @@ -2678,7 +2253,6 @@ static int yy_init_globals (yyscan_t yyscanner) return 0; } - /* pplex_destroy is for both reentrant and non-reentrant scanners. */ int pplex_destroy (yyscan_t yyscanner) { @@ -2695,14 +2269,10 @@ int pplex_destroy (yyscan_t yyscanner) ppfree(yyg->yy_buffer_stack ,yyscanner); yyg->yy_buffer_stack = NULL; - /* Destroy the start condition stack. */ ppfree(yyg->yy_start_stack ,yyscanner ); yyg->yy_start_stack = NULL; - - - /* Reset the globals. This is important in a non-reentrant scanner so the next time * pplex() is called, initialization will occur. */ yy_init_globals( yyscanner); @@ -2713,32 +2283,23 @@ int pplex_destroy (yyscan_t yyscanner) return 0; } - - /* * Internal utility routines. */ - - #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - int i; + register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif - - #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { - int n; + register int n; for ( n = 0; s[n]; ++n ) ; @@ -2746,22 +2307,13 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) } #endif - - void *ppalloc (yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); + return (void *) malloc( size ); } - - void *pprealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -2769,32 +2321,21 @@ void *pprealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return realloc(ptr, size); + return (void *) realloc( (char *) ptr, size ); } - - void ppfree (void * ptr , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; free( (char *) ptr ); /* see pprealloc() for (char *) cast */ } - #define YYTABLES_NAME "yytables" - - - - - - - - namespace pp { -Tokenizer::Tokenizer(Diagnostics *diagnostics) : mHandle(nullptr), mMaxTokenSize(256) +Tokenizer::Tokenizer(Diagnostics *diagnostics) + : mHandle(0), + mMaxTokenSize(256) { mContext.diagnostics = diagnostics; } @@ -2851,7 +2392,7 @@ void Tokenizer::lex(Token *token) bool Tokenizer::initScanner() { - if ((mHandle == nullptr) && pplex_init_extra(&mContext, &mHandle)) + if ((mHandle == NULL) && pplex_init_extra(&mContext,&mHandle)) return false; pprestart(0,mHandle); @@ -2860,13 +2401,12 @@ bool Tokenizer::initScanner() void Tokenizer::destroyScanner() { - if (mHandle == nullptr) + if (mHandle == NULL) return; pplex_destroy(mHandle); - mHandle = nullptr; + mHandle = NULL; } } // namespace pp - diff --git a/gfx/angle/src/compiler/preprocessor/Tokenizer.h b/gfx/angle/src/compiler/preprocessor/Tokenizer.h index 6dfb19c66..49e64fa20 100755 --- a/gfx/angle/src/compiler/preprocessor/Tokenizer.h +++ b/gfx/angle/src/compiler/preprocessor/Tokenizer.h @@ -7,9 +7,9 @@ #ifndef COMPILER_PREPROCESSOR_TOKENIZER_H_ #define COMPILER_PREPROCESSOR_TOKENIZER_H_ -#include "common/angleutils.h" -#include "compiler/preprocessor/Input.h" -#include "compiler/preprocessor/Lexer.h" +#include "Input.h" +#include "Lexer.h" +#include "pp_utils.h" namespace pp { @@ -45,6 +45,7 @@ class Tokenizer : public Lexer void lex(Token *token) override; private: + PP_DISALLOW_COPY_AND_ASSIGN(Tokenizer); bool initScanner(); void destroyScanner(); diff --git a/gfx/angle/src/compiler/preprocessor/Tokenizer.l b/gfx/angle/src/compiler/preprocessor/Tokenizer.l index 62eb4caa6..d316da88b 100755 --- a/gfx/angle/src/compiler/preprocessor/Tokenizer.l +++ b/gfx/angle/src/compiler/preprocessor/Tokenizer.l @@ -27,10 +27,10 @@ IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh. #pragma warning(disable: 4005) #endif -#include "compiler/preprocessor/Tokenizer.h" +#include "Tokenizer.h" -#include "compiler/preprocessor/DiagnosticsBase.h" -#include "compiler/preprocessor/Token.h" +#include "DiagnosticsBase.h" +#include "Token.h" #if defined(__GNUC__) // Triggered by the auto-generated yy_fatal_error function. @@ -280,7 +280,9 @@ FRACTIONAL_CONSTANT ({DIGIT}*"."{DIGIT}+)|({DIGIT}+".") namespace pp { -Tokenizer::Tokenizer(Diagnostics *diagnostics) : mHandle(nullptr), mMaxTokenSize(256) +Tokenizer::Tokenizer(Diagnostics *diagnostics) + : mHandle(0), + mMaxTokenSize(256) { mContext.diagnostics = diagnostics; } @@ -337,7 +339,7 @@ void Tokenizer::lex(Token *token) bool Tokenizer::initScanner() { - if ((mHandle == nullptr) && yylex_init_extra(&mContext, &mHandle)) + if ((mHandle == NULL) && yylex_init_extra(&mContext, &mHandle)) return false; yyrestart(0, mHandle); @@ -346,11 +348,11 @@ bool Tokenizer::initScanner() void Tokenizer::destroyScanner() { - if (mHandle == nullptr) + if (mHandle == NULL) return; yylex_destroy(mHandle); - mHandle = nullptr; + mHandle = NULL; } } // namespace pp diff --git a/gfx/angle/src/compiler/preprocessor/numeric_lex.h b/gfx/angle/src/compiler/preprocessor/numeric_lex.h index 7cf976988..b32e42253 100755 --- a/gfx/angle/src/compiler/preprocessor/numeric_lex.h +++ b/gfx/angle/src/compiler/preprocessor/numeric_lex.h @@ -9,7 +9,6 @@ #ifndef COMPILER_PREPROCESSOR_NUMERICLEX_H_ #define COMPILER_PREPROCESSOR_NUMERICLEX_H_ -#include #include namespace pp { @@ -64,7 +63,7 @@ bool numeric_lex_float(const std::string &str, FloatType *value) stream.imbue(std::locale::classic()); stream >> (*value); - return !stream.fail() && std::isfinite(*value); + return !stream.fail(); #endif } diff --git a/gfx/angle/src/compiler/preprocessor/pp_utils.h b/gfx/angle/src/compiler/preprocessor/pp_utils.h new file mode 100644 index 000000000..9fba9385c --- /dev/null +++ b/gfx/angle/src/compiler/preprocessor/pp_utils.h @@ -0,0 +1,18 @@ +// +// Copyright (c) 2012 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. +// + +// pp_utils.h: Common preprocessor utilities + +#ifndef COMPILER_PREPROCESSOR_PPUTILS_H_ +#define COMPILER_PREPROCESSOR_PPUTILS_H_ + +// A macro to disallow the copy constructor and operator= functions +// This must be used in the private: declarations for a class. +#define PP_DISALLOW_COPY_AND_ASSIGN(TypeName) \ + TypeName(const TypeName &); \ + void operator=(const TypeName &) + +#endif // COMPILER_PREPROCESSOR_PPUTILS_H_ diff --git a/gfx/angle/src/compiler/translator/64bit-lexer-safety.patch b/gfx/angle/src/compiler/translator/64bit-lexer-safety.patch index e7e403771..db3b2fab5 100755 --- a/gfx/angle/src/compiler/translator/64bit-lexer-safety.patch +++ b/gfx/angle/src/compiler/translator/64bit-lexer-safety.patch @@ -1,13 +1,6 @@ -diff --git a/src/compiler/translator/glslang_lex.cpp b/src/compiler/translator/glslang_lex.cpp -index 1ba63df..2a206ab 100644 ---- a/src/compiler/translator/glslang_lex.cpp -+++ b/src/compiler/translator/glslang_lex.cpp -@@ -1,4 +1,3 @@ --#line 17 "./glslang.l" - // - // Copyright (c) 2012-2013 The ANGLE Project Authors. All rights reserved. - // Use of this source code is governed by a BSD-style license that can be -@@ -149,6 +148,7 @@ typedef int16_t flex_int16_t; +--- a/src/compiler/glslang_lex.cpp ++++ b/src/compiler/glslang_lex.cpp +@@ -68,6 +68,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; @@ -15,10 +8,10 @@ index 1ba63df..2a206ab 100644 #else typedef signed char flex_int8_t; typedef short int flex_int16_t; -@@ -335,6 +335,11 @@ typedef size_t yy_size_t; - - - +@@ -191,6 +192,11 @@ typedef void* yyscan_t; + typedef struct yy_buffer_state *YY_BUFFER_STATE; + #endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; @@ -27,96 +20,21 @@ index 1ba63df..2a206ab 100644 #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 -@@ -351,8 +356,8 @@ typedef size_t yy_size_t; +@@ -204,7 +210,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; */ #define YY_LESS_LINENO(n) \ do { \ - int yyl;\ -- for ( yyl = n; yyl < yyleng; ++yyl )\ + yy_size_t yyl;\ -+ for ( yyl = n; yyl < static_cast(yyleng); ++yyl )\ + for ( yyl = n; yyl < yyleng; ++yyl )\ if ( yytext[yyl] == '\n' )\ --yylineno;\ - }while(0) -@@ -1692,7 +1697,7 @@ yy_find_action: - if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) - { - yy_size_t yyl; -- for ( yyl = 0; yyl < yyleng; ++yyl ) -+ for ( yyl = 0; yyl < static_cast(yyleng); ++yyl ) - if ( yytext[yyl] == '\n' ) - - do{ yylineno++; -@@ -2655,7 +2660,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) - else - { - int num_to_read = -- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; -+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - static_cast(number_to_move) - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ -@@ -2690,7 +2695,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - -- number_to_move - 1; -+ static_cast(number_to_move) - 1; - - } - -@@ -2698,8 +2703,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ -+ size_t result = 0; - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), -- yyg->yy_n_chars, num_to_read ); -+ result, num_to_read ); -+ yyg->yy_n_chars = static_cast(result); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } -@@ -2725,13 +2732,13 @@ static int yy_get_next_buffer (yyscan_t yyscanner) - - if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ -- int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); -+ int new_size = yyg->yy_n_chars + static_cast(number_to_move) + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - -- yyg->yy_n_chars += number_to_move; -+ yyg->yy_n_chars += static_cast(number_to_move); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - -@@ -3158,7 +3165,7 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - -- num_to_alloc = yyg->yy_buffer_stack_max + grow_size; -+ num_to_alloc = static_cast(yyg->yy_buffer_stack_max + grow_size); - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) -@@ -3196,7 +3203,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - -- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ -+ b->yy_buf_size = static_cast(size) - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; -@@ -3251,7 +3258,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yysc - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - -- for ( i = 0; i < _yybytes_len; ++i ) -+ for ( i = 0; i < static_cast(_yybytes_len); ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; +@@ -378,7 +379,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); + */ + #define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ +- yyleng = (size_t) (yy_cp - yy_bp); \ ++ yyleng = (yy_size_t) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; diff --git a/gfx/angle/src/compiler/translator/ASTMetadataHLSL.cpp b/gfx/angle/src/compiler/translator/ASTMetadataHLSL.cpp index ba991b709..31bfae996 100755 --- a/gfx/angle/src/compiler/translator/ASTMetadataHLSL.cpp +++ b/gfx/angle/src/compiler/translator/ASTMetadataHLSL.cpp @@ -11,9 +11,6 @@ #include "compiler/translator/CallDAG.h" #include "compiler/translator/SymbolTable.h" -namespace sh -{ - namespace { @@ -34,7 +31,7 @@ class PullGradient : public TIntermTraverser ASSERT(index < metadataList->size()); } - void traverse(TIntermFunctionDefinition *node) + void traverse(TIntermAggregate *node) { node->traverse(this); ASSERT(mParents.empty()); @@ -75,9 +72,9 @@ class PullGradient : public TIntermTraverser return true; } - bool visitIfElse(Visit visit, TIntermIfElse *ifElse) override + bool visitSelection(Visit visit, TIntermSelection *selection) override { - visitControlFlow(visit, ifElse); + visitControlFlow(visit, selection); return true; } @@ -106,8 +103,9 @@ class PullGradient : public TIntermTraverser { if (node->isUserDefined()) { - size_t calleeIndex = mDag.findIndex(node->getFunctionSymbolInfo()); + size_t calleeIndex = mDag.findIndex(node); ASSERT(calleeIndex != CallDAG::InvalidIndex && calleeIndex < mIndex); + UNUSED_ASSERTION_VARIABLE(mIndex); if ((*mMetadataList)[calleeIndex].mUsesGradient) { onGradient(); @@ -115,8 +113,7 @@ class PullGradient : public TIntermTraverser } else { - TString name = - TFunction::unmangleName(node->getFunctionSymbolInfo()->getName()); + TString name = TFunction::unmangleName(node->getName()); if (name == "texture2D" || name == "texture2DProj" || @@ -160,7 +157,7 @@ class PullComputeDiscontinuousAndGradientLoops : public TIntermTraverser { } - void traverse(TIntermFunctionDefinition *node) + void traverse(TIntermAggregate *node) { node->traverse(this); ASSERT(mLoopsAndSwitches.empty()); @@ -199,7 +196,7 @@ class PullComputeDiscontinuousAndGradientLoops : public TIntermTraverser return true; } - bool visitIfElse(Visit visit, TIntermIfElse *node) override + bool visitSelection(Visit visit, TIntermSelection *node) override { if (visit == PreVisit) { @@ -278,8 +275,9 @@ class PullComputeDiscontinuousAndGradientLoops : public TIntermTraverser { if (node->isUserDefined()) { - size_t calleeIndex = mDag.findIndex(node->getFunctionSymbolInfo()); + size_t calleeIndex = mDag.findIndex(node); ASSERT(calleeIndex != CallDAG::InvalidIndex && calleeIndex < mIndex); + UNUSED_ASSERTION_VARIABLE(mIndex); if ((*mMetadataList)[calleeIndex].mHasGradientLoopInCallGraph) { @@ -312,7 +310,7 @@ class PullComputeDiscontinuousAndGradientLoops : public TIntermTraverser const CallDAG &mDag; std::vector mLoopsAndSwitches; - std::vector mIfs; + std::vector mIfs; }; // Tags all the functions called in a discontinuous loop @@ -329,7 +327,7 @@ class PushDiscontinuousLoops : public TIntermTraverser { } - void traverse(TIntermFunctionDefinition *node) + void traverse(TIntermAggregate *node) { node->traverse(this); ASSERT(mNestedDiscont == (mMetadata->mCalledInDiscontinuousLoop ? 1 : 0)); @@ -358,8 +356,9 @@ class PushDiscontinuousLoops : public TIntermTraverser case EOpFunctionCall: if (visit == PreVisit && node->isUserDefined() && mNestedDiscont > 0) { - size_t calleeIndex = mDag.findIndex(node->getFunctionSymbolInfo()); + size_t calleeIndex = mDag.findIndex(node); ASSERT(calleeIndex != CallDAG::InvalidIndex && calleeIndex < mIndex); + UNUSED_ASSERTION_VARIABLE(mIndex); (*mMetadataList)[calleeIndex].mCalledInDiscontinuousLoop = true; } @@ -386,7 +385,7 @@ bool ASTMetadataHLSL::hasGradientInCallGraph(TIntermLoop *node) return mControlFlowsContainingGradient.count(node) > 0; } -bool ASTMetadataHLSL::hasGradientLoop(TIntermIfElse *node) +bool ASTMetadataHLSL::hasGradientLoop(TIntermSelection *node) { return mIfsContainingGradientLoop.count(node) > 0; } @@ -450,5 +449,3 @@ MetadataList CreateASTMetadataHLSL(TIntermNode *root, const CallDAG &callDag) return metadataList; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/ASTMetadataHLSL.h b/gfx/angle/src/compiler/translator/ASTMetadataHLSL.h index f8ed5af4a..39e671e3e 100755 --- a/gfx/angle/src/compiler/translator/ASTMetadataHLSL.h +++ b/gfx/angle/src/compiler/translator/ASTMetadataHLSL.h @@ -12,12 +12,9 @@ #include #include -namespace sh -{ - class CallDAG; class TIntermNode; -class TIntermIfElse; +class TIntermSelection; class TIntermLoop; struct ASTMetadataHLSL @@ -33,7 +30,7 @@ struct ASTMetadataHLSL // Here "something uses a gradient" means here that it either contains a // gradient operation, or a call to a function that uses a gradient. bool hasGradientInCallGraph(TIntermLoop *node); - bool hasGradientLoop(TIntermIfElse *node); + bool hasGradientLoop(TIntermSelection *node); // Does the function use a gradient. bool mUsesGradient; @@ -47,7 +44,7 @@ struct ASTMetadataHLSL bool mCalledInDiscontinuousLoop; bool mHasGradientLoopInCallGraph; std::set mDiscontinuousLoops; - std::set mIfsContainingGradientLoop; + std::set mIfsContainingGradientLoop; // Will we need to generate a Lod0 version of the function. bool mNeedsLod0; @@ -58,6 +55,4 @@ typedef std::vector MetadataList; // Return the AST analysis result, in the order defined by the call DAG MetadataList CreateASTMetadataHLSL(TIntermNode *root, const CallDAG &callDag); -} // namespace sh - #endif // COMPILER_TRANSLATOR_ASTMETADATAHLSL_H_ diff --git a/gfx/angle/src/compiler/translator/AddAndTrueToLoopCondition.cpp b/gfx/angle/src/compiler/translator/AddAndTrueToLoopCondition.cpp deleted file mode 100644 index 0177fea96..000000000 --- a/gfx/angle/src/compiler/translator/AddAndTrueToLoopCondition.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) 2016 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 "compiler/translator/AddAndTrueToLoopCondition.h" - -#include "compiler/translator/IntermNode.h" - -namespace sh -{ - -namespace -{ - -// An AST traverser that rewrites for and while loops by replacing "condition" with -// "condition && true" to work around condition bug on Intel Mac. -class AddAndTrueToLoopConditionTraverser : public TIntermTraverser -{ - public: - AddAndTrueToLoopConditionTraverser() : TIntermTraverser(true, false, false) {} - - bool visitLoop(Visit, TIntermLoop *loop) override - { - // do-while loop doesn't have this bug. - if (loop->getType() != ELoopFor && loop->getType() != ELoopWhile) - { - return true; - } - - // For loop may not have a condition. - if (loop->getCondition() == nullptr) - { - return true; - } - - // Constant true. - TConstantUnion *trueConstant = new TConstantUnion(); - trueConstant->setBConst(true); - TIntermTyped *trueValue = new TIntermConstantUnion(trueConstant, TType(EbtBool)); - - // CONDITION && true. - TIntermBinary *andOp = new TIntermBinary(EOpLogicalAnd, loop->getCondition(), trueValue); - loop->setCondition(andOp); - - return true; - } -}; - -} // anonymous namespace - -void AddAndTrueToLoopCondition(TIntermNode *root) -{ - AddAndTrueToLoopConditionTraverser traverser; - root->traverse(&traverser); -} - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/AddAndTrueToLoopCondition.h b/gfx/angle/src/compiler/translator/AddAndTrueToLoopCondition.h deleted file mode 100644 index 34debe0ed..000000000 --- a/gfx/angle/src/compiler/translator/AddAndTrueToLoopCondition.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright (c) 2016 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. -// - -// Rewrite condition in for and while loops to work around driver bug on Intel Mac. - -#ifndef COMPILER_TRANSLATOR_ADDANDTRUETOLOOPCONDITION_H_ -#define COMPILER_TRANSLATOR_ADDANDTRUETOLOOPCONDITION_H_ - -class TIntermNode; -namespace sh -{ - -void AddAndTrueToLoopCondition(TIntermNode *root); - -} // namespace sh - -#endif // COMPILER_TRANSLATOR_ADDANDTRUETOLOOPCONDITION_H_ diff --git a/gfx/angle/src/compiler/translator/AddDefaultReturnStatements.cpp b/gfx/angle/src/compiler/translator/AddDefaultReturnStatements.cpp index 5767aea2b..97111d1a1 100755 --- a/gfx/angle/src/compiler/translator/AddDefaultReturnStatements.cpp +++ b/gfx/angle/src/compiler/translator/AddDefaultReturnStatements.cpp @@ -31,16 +31,21 @@ class AddDefaultReturnStatementsTraverser : private TIntermTraverser private: AddDefaultReturnStatementsTraverser() : TIntermTraverser(true, false, false) {} - static bool IsFunctionWithoutReturnStatement(TIntermFunctionDefinition *node, TType *returnType) + static bool IsFunctionWithoutReturnStatement(TIntermAggregate *node, TType *returnType) { *returnType = node->getType(); - if (node->getType().getBasicType() == EbtVoid) + if (node->getOp() != EOpFunction || node->getType().getBasicType() == EbtVoid) { return false; } - TIntermBlock *bodyNode = node->getBody(); - TIntermBranch *returnNode = bodyNode->getSequence()->back()->getAsBranchNode(); + TIntermAggregate *lastNode = node->getSequence()->back()->getAsAggregate(); + if (lastNode == nullptr) + { + return true; + } + + TIntermBranch *returnNode = lastNode->getSequence()->front()->getAsBranchNode(); if (returnNode != nullptr && returnNode->getFlowOp() == EOpReturn) { return false; @@ -49,16 +54,51 @@ class AddDefaultReturnStatementsTraverser : private TIntermTraverser return true; } - bool visitFunctionDefinition(Visit, TIntermFunctionDefinition *node) override + static TIntermTyped *GenerateTypeConstructor(const TType &returnType) + { + // Base case, constructing a single element + if (!returnType.isArray()) + { + size_t objectSize = returnType.getObjectSize(); + TConstantUnion *constantUnion = new TConstantUnion[objectSize]; + for (size_t constantIdx = 0; constantIdx < objectSize; constantIdx++) + { + constantUnion[constantIdx].setFConst(0.0f); + } + + TIntermConstantUnion *intermConstantUnion = + new TIntermConstantUnion(constantUnion, returnType); + return intermConstantUnion; + } + + // Recursive case, construct an array of single elements + TIntermAggregate *constructorAggrigate = + new TIntermAggregate(TypeToConstructorOperator(returnType)); + constructorAggrigate->setType(returnType); + + size_t arraySize = returnType.getArraySize(); + for (size_t arrayIdx = 0; arrayIdx < arraySize; arrayIdx++) + { + TType arrayElementType(returnType); + arrayElementType.clearArrayness(); + + constructorAggrigate->getSequence()->push_back( + GenerateTypeConstructor(arrayElementType)); + } + + return constructorAggrigate; + } + + bool visitAggregate(Visit, TIntermAggregate *node) override { TType returnType; if (IsFunctionWithoutReturnStatement(node, &returnType)) { TIntermBranch *branch = - new TIntermBranch(EOpReturn, TIntermTyped::CreateZero(returnType)); + new TIntermBranch(EOpReturn, GenerateTypeConstructor(returnType)); - TIntermBlock *bodyNode = node->getBody(); - bodyNode->getSequence()->push_back(branch); + TIntermAggregate *lastNode = node->getSequence()->back()->getAsAggregate(); + lastNode->getSequence()->push_back(branch); return false; } diff --git a/gfx/angle/src/compiler/translator/ArrayReturnValueToOutParameter.cpp b/gfx/angle/src/compiler/translator/ArrayReturnValueToOutParameter.cpp index 766f700ee..af5bb9ce3 100755 --- a/gfx/angle/src/compiler/translator/ArrayReturnValueToOutParameter.cpp +++ b/gfx/angle/src/compiler/translator/ArrayReturnValueToOutParameter.cpp @@ -10,9 +10,6 @@ #include "compiler/translator/IntermNode.h" -namespace sh -{ - namespace { @@ -44,7 +41,8 @@ TIntermAggregate *CreateReplacementCall(TIntermAggregate *originalCall, TIntermT TIntermAggregate *replacementCall = new TIntermAggregate(EOpFunctionCall); replacementCall->setType(TType(EbtVoid)); replacementCall->setUserDefined(); - *replacementCall->getFunctionSymbolInfo() = *originalCall->getFunctionSymbolInfo(); + replacementCall->setNameObj(originalCall->getNameObj()); + replacementCall->setFunctionId(originalCall->getFunctionId()); replacementCall->setLine(originalCall->getLine()); TIntermSequence *replacementParameters = replacementCall->getSequence(); TIntermSequence *originalParameters = originalCall->getSequence(); @@ -63,7 +61,6 @@ class ArrayReturnValueToOutParameterTraverser : private TIntermTraverser private: ArrayReturnValueToOutParameterTraverser(); - bool visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) override; bool visitAggregate(Visit visit, TIntermAggregate *node) override; bool visitBranch(Visit visit, TIntermBranch *node) override; bool visitBinary(Visit visit, TIntermBinary *node) override; @@ -85,47 +82,35 @@ ArrayReturnValueToOutParameterTraverser::ArrayReturnValueToOutParameterTraverser { } -bool ArrayReturnValueToOutParameterTraverser::visitFunctionDefinition( - Visit visit, - TIntermFunctionDefinition *node) +bool ArrayReturnValueToOutParameterTraverser::visitAggregate(Visit visit, TIntermAggregate *node) { - if (node->isArray() && visit == PreVisit) + if (visit == PreVisit) { - // Replace the parameters child node of the function definition with another node - // that has the out parameter added. - // Also set the function to return void. - - TIntermAggregate *params = node->getFunctionParameters(); - ASSERT(params != nullptr && params->getOp() == EOpParameters); + if (node->isArray()) + { + if (node->getOp() == EOpFunction) + { + // Replace the parameters child node of the function definition with another node + // that has the out parameter added. + // Also set the function to return void. - TIntermAggregate *replacementParams = new TIntermAggregate; - replacementParams->setOp(EOpParameters); - CopyAggregateChildren(params, replacementParams); - replacementParams->getSequence()->push_back(CreateReturnValueOutSymbol(node->getType())); - replacementParams->setLine(params->getLine()); + TIntermAggregate *params = node->getSequence()->front()->getAsAggregate(); + ASSERT(params != nullptr && params->getOp() == EOpParameters); - queueReplacementWithParent(node, params, replacementParams, OriginalNode::IS_DROPPED); + TIntermAggregate *replacementParams = new TIntermAggregate; + replacementParams->setOp(EOpParameters); + CopyAggregateChildren(params, replacementParams); + replacementParams->getSequence()->push_back(CreateReturnValueOutSymbol(node->getType())); + replacementParams->setLine(params->getLine()); - node->setType(TType(EbtVoid)); + queueReplacementWithParent(node, params, replacementParams, + OriginalNode::IS_DROPPED); - mInFunctionWithArrayReturnValue = true; - } - if (visit == PostVisit) - { - // This isn't conditional on node->isArray() since the type has already been changed on - // PreVisit. - mInFunctionWithArrayReturnValue = false; - } - return true; -} + node->setType(TType(EbtVoid)); -bool ArrayReturnValueToOutParameterTraverser::visitAggregate(Visit visit, TIntermAggregate *node) -{ - if (visit == PreVisit) - { - if (node->isArray()) - { - if (node->getOp() == EOpPrototype) + mInFunctionWithArrayReturnValue = true; + } + else if (node->getOp() == EOpPrototype) { // Replace the whole prototype node with another node that has the out parameter added. TIntermAggregate *replacement = new TIntermAggregate; @@ -133,7 +118,8 @@ bool ArrayReturnValueToOutParameterTraverser::visitAggregate(Visit visit, TInter CopyAggregateChildren(node, replacement); replacement->getSequence()->push_back(CreateReturnValueOutSymbol(node->getType())); replacement->setUserDefined(); - *replacement->getFunctionSymbolInfo() = *node->getFunctionSymbolInfo(); + replacement->setNameObj(node->getNameObj()); + replacement->setFunctionId(node->getFunctionId()); replacement->setLine(node->getLine()); replacement->setType(TType(EbtVoid)); @@ -150,21 +136,27 @@ bool ArrayReturnValueToOutParameterTraverser::visitAggregate(Visit visit, TInter // Cases 2 to 4 are already converted to simpler cases by SeparateExpressionsReturningArrays, so we // only need to worry about the case where a function call returning an array forms an expression by // itself. - TIntermBlock *parentBlock = getParentNode()->getAsBlock(); - if (parentBlock) + TIntermAggregate *parentAgg = getParentNode()->getAsAggregate(); + if (parentAgg != nullptr && parentAgg->getOp() == EOpSequence) { nextTemporaryIndex(); TIntermSequence replacements; replacements.push_back(createTempDeclaration(node->getType())); TIntermSymbol *returnSymbol = createTempSymbol(node->getType()); replacements.push_back(CreateReplacementCall(node, returnSymbol)); - mMultiReplacements.push_back( - NodeReplaceWithMultipleEntry(parentBlock, node, replacements)); + mMultiReplacements.push_back(NodeReplaceWithMultipleEntry(parentAgg, node, replacements)); } return false; } } } + else if (visit == PostVisit) + { + if (node->getOp() == EOpFunction) + { + mInFunctionWithArrayReturnValue = false; + } + } return true; } @@ -175,11 +167,12 @@ bool ArrayReturnValueToOutParameterTraverser::visitBranch(Visit visit, TIntermBr // Instead of returning a value, assign to the out parameter and then return. TIntermSequence replacements; + TIntermBinary *replacementAssignment = new TIntermBinary(EOpAssign); TIntermTyped *expression = node->getExpression(); ASSERT(expression != nullptr); - TIntermSymbol *returnValueSymbol = CreateReturnValueSymbol(expression->getType()); - TIntermBinary *replacementAssignment = - new TIntermBinary(EOpAssign, returnValueSymbol, expression); + replacementAssignment->setLeft(CreateReturnValueSymbol(expression->getType())); + replacementAssignment->setRight(node->getExpression()); + replacementAssignment->setType(expression->getType()); replacementAssignment->setLine(expression->getLine()); replacements.push_back(replacementAssignment); @@ -187,8 +180,7 @@ bool ArrayReturnValueToOutParameterTraverser::visitBranch(Visit visit, TIntermBr replacementBranch->setLine(node->getLine()); replacements.push_back(replacementBranch); - mMultiReplacements.push_back( - NodeReplaceWithMultipleEntry(getParentNode()->getAsBlock(), node, replacements)); + mMultiReplacements.push_back(NodeReplaceWithMultipleEntry(getParentNode()->getAsAggregate(), node, replacements)); } return false; } @@ -213,5 +205,3 @@ void ArrayReturnValueToOutParameter(TIntermNode *root, unsigned int *temporaryIn { ArrayReturnValueToOutParameterTraverser::apply(root, temporaryIndex); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/ArrayReturnValueToOutParameter.h b/gfx/angle/src/compiler/translator/ArrayReturnValueToOutParameter.h index e030f6ffe..983e203e6 100755 --- a/gfx/angle/src/compiler/translator/ArrayReturnValueToOutParameter.h +++ b/gfx/angle/src/compiler/translator/ArrayReturnValueToOutParameter.h @@ -9,11 +9,8 @@ #ifndef COMPILER_TRANSLATOR_ARRAYRETURNVALUETOOUTPARAMETER_H_ #define COMPILER_TRANSLATOR_ARRAYRETURNVALUETOOUTPARAMETER_H_ -namespace sh -{ class TIntermNode; void ArrayReturnValueToOutParameter(TIntermNode *root, unsigned int *temporaryIndex); -} // namespace sh #endif // COMPILER_TRANSLATOR_ARRAYRETURNVALUETOOUTPARAMETER_H_ diff --git a/gfx/angle/src/compiler/translator/BaseTypes.h b/gfx/angle/src/compiler/translator/BaseTypes.h index e050c88da..72ecb50f4 100755 --- a/gfx/angle/src/compiler/translator/BaseTypes.h +++ b/gfx/angle/src/compiler/translator/BaseTypes.h @@ -13,9 +13,6 @@ #include "common/debug.h" #include "GLSLANG/ShaderLang.h" -namespace sh -{ - // // Precision qualifiers // @@ -35,10 +32,10 @@ inline const char* getPrecisionString(TPrecision p) { switch(p) { - case EbpHigh: return "highp"; - case EbpMedium: return "mediump"; - case EbpLow: return "lowp"; - default: return "mediump"; // Safest fallback + case EbpHigh: return "highp"; break; + case EbpMedium: return "mediump"; break; + case EbpLow: return "lowp"; break; + default: return "mediump"; break; // Safest fallback } } @@ -79,98 +76,19 @@ enum TBasicType EbtSampler2DShadow, EbtSamplerCubeShadow, EbtSampler2DArrayShadow, - EbtGuardSamplerEnd, // non type: see implementation of IsSampler() - EbtGSampler2D, // non type: represents sampler2D, isampler2D, and usampler2D - EbtGSampler3D, // non type: represents sampler3D, isampler3D, and usampler3D - EbtGSamplerCube, // non type: represents samplerCube, isamplerCube, and usamplerCube - EbtGSampler2DArray, // non type: represents sampler2DArray, isampler2DArray, and - // usampler2DArray - - // images - EbtGuardImageBegin, - EbtImage2D, - EbtIImage2D, - EbtUImage2D, - EbtImage3D, - EbtIImage3D, - EbtUImage3D, - EbtImage2DArray, - EbtIImage2DArray, - EbtUImage2DArray, - EbtImageCube, - EbtIImageCube, - EbtUImageCube, - EbtGuardImageEnd, - - EbtGuardGImageBegin, - EbtGImage2D, // non type: represents image2D, uimage2D, iimage2D - EbtGImage3D, // non type: represents image3D, uimage3D, iimage3D - EbtGImage2DArray, // non type: represents image2DArray, uimage2DArray, iimage2DArray - EbtGImageCube, // non type: represents imageCube, uimageCube, iimageCube - EbtGuardGImageEnd, - + EbtGuardSamplerEnd, // non type: see implementation of IsSampler() + EbtGSampler2D, // non type: represents sampler2D, isampler2D, and usampler2D + EbtGSampler3D, // non type: represents sampler3D, isampler3D, and usampler3D + EbtGSamplerCube, // non type: represents samplerCube, isamplerCube, and usamplerCube + EbtGSampler2DArray, // non type: represents sampler2DArray, isampler2DArray, and usampler2DArray EbtStruct, EbtInterfaceBlock, - EbtAddress, // should be deprecated?? + EbtAddress, // should be deprecated?? // end of list EbtLast }; -inline TBasicType convertGImageToFloatImage(TBasicType type) -{ - switch (type) - { - case EbtGImage2D: - return EbtImage2D; - case EbtGImage3D: - return EbtImage3D; - case EbtGImage2DArray: - return EbtImage2DArray; - case EbtGImageCube: - return EbtImageCube; - default: - UNREACHABLE(); - } - return EbtLast; -} - -inline TBasicType convertGImageToIntImage(TBasicType type) -{ - switch (type) - { - case EbtGImage2D: - return EbtIImage2D; - case EbtGImage3D: - return EbtIImage3D; - case EbtGImage2DArray: - return EbtIImage2DArray; - case EbtGImageCube: - return EbtIImageCube; - default: - UNREACHABLE(); - } - return EbtLast; -} - -inline TBasicType convertGImageToUnsignedImage(TBasicType type) -{ - switch (type) - { - case EbtGImage2D: - return EbtUImage2D; - case EbtGImage3D: - return EbtUImage3D; - case EbtGImage2DArray: - return EbtUImage2DArray; - case EbtGImageCube: - return EbtUImageCube; - default: - UNREACHABLE(); - } - return EbtLast; -} - const char* getBasicString(TBasicType t); inline bool IsSampler(TBasicType type) @@ -178,22 +96,6 @@ inline bool IsSampler(TBasicType type) return type > EbtGuardSamplerBegin && type < EbtGuardSamplerEnd; } -inline bool IsImage(TBasicType type) -{ - return type > EbtGuardImageBegin && type < EbtGuardImageEnd; -} - -inline bool IsGImage(TBasicType type) -{ - return type > EbtGuardGImageBegin && type < EbtGuardGImageEnd; -} - -inline bool IsOpaqueType(TBasicType type) -{ - // TODO (mradev): add atomic types as opaque. - return IsSampler(type) || IsImage(type); -} - inline bool IsIntegerSampler(TBasicType type) { switch (type) @@ -224,56 +126,6 @@ inline bool IsIntegerSampler(TBasicType type) return false; } -inline bool IsFloatImage(TBasicType type) -{ - switch (type) - { - case EbtImage2D: - case EbtImage3D: - case EbtImage2DArray: - case EbtImageCube: - return true; - default: - break; - } - - return false; -} - -inline bool IsIntegerImage(TBasicType type) -{ - - switch (type) - { - case EbtIImage2D: - case EbtIImage3D: - case EbtIImage2DArray: - case EbtIImageCube: - return true; - default: - break; - } - - return false; -} - -inline bool IsUnsignedImage(TBasicType type) -{ - - switch (type) - { - case EbtUImage2D: - case EbtUImage3D: - case EbtUImage2DArray: - case EbtUImageCube: - return true; - default: - break; - } - - return false; -} - inline bool IsSampler2D(TBasicType type) { switch (type) @@ -431,7 +283,7 @@ inline bool IsInteger(TBasicType type) inline bool SupportsPrecision(TBasicType type) { - return type == EbtFloat || type == EbtInt || type == EbtUInt || IsOpaqueType(type); + return type == EbtFloat || type == EbtInt || type == EbtUInt || IsSampler(type); } // @@ -489,11 +341,10 @@ enum TQualifier EvqLastFragData, // GLSL ES 3.0 vertex output and fragment input - EvqSmooth, // Incomplete qualifier, smooth is the default - EvqFlat, // Incomplete qualifier - EvqCentroid, // Incomplete qualifier - EvqSmoothOut, - EvqFlatOut, + EvqSmooth, // Incomplete qualifier, smooth is the default + EvqFlat, // Incomplete qualifier + EvqSmoothOut = EvqSmooth, + EvqFlatOut = EvqFlat, EvqCentroidOut, // Implies smooth EvqSmoothIn, EvqFlatIn, @@ -508,40 +359,10 @@ enum TQualifier EvqGlobalInvocationID, EvqLocalInvocationIndex, - // GLSL ES 3.1 memory qualifiers - EvqReadOnly, - EvqWriteOnly, - EvqCoherent, - EvqRestrict, - EvqVolatile, - // end of list EvqLast }; -inline bool IsQualifierUnspecified(TQualifier qualifier) -{ - return (qualifier == EvqTemporary || qualifier == EvqGlobal); -} - -enum TLayoutImageInternalFormat -{ - EiifUnspecified, - EiifRGBA32F, - EiifRGBA16F, - EiifR32F, - EiifRGBA32UI, - EiifRGBA16UI, - EiifRGBA8UI, - EiifR32UI, - EiifRGBA32I, - EiifRGBA16I, - EiifRGBA8I, - EiifR32I, - EiifRGBA8, - EiifRGBA8_SNORM -}; - enum TLayoutMatrixPacking { EmpUnspecified, @@ -560,44 +381,36 @@ enum TLayoutBlockStorage struct TLayoutQualifier { int location; - unsigned int locationsSpecified; TLayoutMatrixPacking matrixPacking; TLayoutBlockStorage blockStorage; // Compute shader layout qualifiers. sh::WorkGroupSize localSize; - // Image format layout qualifier - TLayoutImageInternalFormat imageInternalFormat; - static TLayoutQualifier create() { TLayoutQualifier layoutQualifier; layoutQualifier.location = -1; - layoutQualifier.locationsSpecified = 0; layoutQualifier.matrixPacking = EmpUnspecified; layoutQualifier.blockStorage = EbsUnspecified; layoutQualifier.localSize.fill(-1); - layoutQualifier.imageInternalFormat = EiifUnspecified; return layoutQualifier; } bool isEmpty() const { return location == -1 && matrixPacking == EmpUnspecified && - blockStorage == EbsUnspecified && !localSize.isAnyValueSet() && - imageInternalFormat == EiifUnspecified; + blockStorage == EbsUnspecified && !localSize.isAnyValueSet(); } bool isCombinationValid() const { bool workSizeSpecified = localSize.isAnyValueSet(); bool otherLayoutQualifiersSpecified = - (location != -1 || matrixPacking != EmpUnspecified || blockStorage != EbsUnspecified || - imageInternalFormat != EiifUnspecified); + (location != -1 || matrixPacking != EmpUnspecified || blockStorage != EbsUnspecified); // we can have either the work group size specified, or the other layout qualifiers return !(workSizeSpecified && otherLayoutQualifiersSpecified); @@ -609,37 +422,6 @@ struct TLayoutQualifier } }; -struct TMemoryQualifier -{ - // GLSL ES 3.10 Revision 4, 4.9 Memory Access Qualifiers - // An image can be qualified as both readonly and writeonly. It still can be can be used with - // imageSize(). - bool readonly; - bool writeonly; - bool coherent; - - // restrict and volatile are reserved keywords in C/C++ - bool restrictQualifier; - bool volatileQualifier; - static TMemoryQualifier create() - { - TMemoryQualifier memoryQualifier; - - memoryQualifier.readonly = false; - memoryQualifier.writeonly = false; - memoryQualifier.coherent = false; - memoryQualifier.restrictQualifier = false; - memoryQualifier.volatileQualifier = false; - - return memoryQualifier; - } - - bool isEmpty() - { - return !readonly && !writeonly && !coherent && !restrictQualifier && !volatileQualifier; - } -}; - inline const char *getWorkGroupSizeString(size_t dimension) { switch (dimension) @@ -700,9 +482,6 @@ inline const char* getQualifierString(TQualifier q) case EvqSmoothIn: return "smooth in"; case EvqFlatIn: return "flat in"; case EvqCentroidIn: return "smooth centroid in"; - case EvqCentroid: return "centroid"; - case EvqFlat: return "flat"; - case EvqSmooth: return "smooth"; case EvqComputeIn: return "in"; case EvqNumWorkGroups: return "NumWorkGroups"; case EvqWorkGroupSize: return "WorkGroupSize"; @@ -710,8 +489,6 @@ inline const char* getQualifierString(TQualifier q) case EvqLocalInvocationID: return "LocalInvocationID"; case EvqGlobalInvocationID: return "GlobalInvocationID"; case EvqLocalInvocationIndex: return "LocalInvocationIndex"; - case EvqReadOnly: return "readonly"; - case EvqWriteOnly: return "writeonly"; default: UNREACHABLE(); return "unknown qualifier"; } // clang-format on @@ -740,42 +517,18 @@ inline const char* getBlockStorageString(TLayoutBlockStorage bsq) } } -inline const char *getImageInternalFormatString(TLayoutImageInternalFormat iifq) +inline const char* getInterpolationString(TQualifier q) { - switch (iifq) + switch(q) { - case EiifRGBA32F: - return "rgba32f"; - case EiifRGBA16F: - return "rgba16f"; - case EiifR32F: - return "r32f"; - case EiifRGBA32UI: - return "rgba32ui"; - case EiifRGBA16UI: - return "rgba16ui"; - case EiifRGBA8UI: - return "rgba8ui"; - case EiifR32UI: - return "r32ui"; - case EiifRGBA32I: - return "rgba32i"; - case EiifRGBA16I: - return "rgba16i"; - case EiifRGBA8I: - return "rgba8i"; - case EiifR32I: - return "r32i"; - case EiifRGBA8: - return "rgba8"; - case EiifRGBA8_SNORM: - return "rgba8_snorm"; - default: - UNREACHABLE(); - return "unknown internal image format"; + case EvqSmoothOut: return "smooth"; break; + case EvqCentroidOut: return "smooth centroid"; break; + case EvqFlatOut: return "flat"; break; + case EvqSmoothIn: return "smooth"; break; + case EvqCentroidIn: return "smooth centroid"; break; + case EvqFlatIn: return "flat"; break; + default: UNREACHABLE(); return "unknown interpolation"; } } -} // namespace sh - #endif // COMPILER_TRANSLATOR_BASETYPES_H_ diff --git a/gfx/angle/src/compiler/translator/BreakVariableAliasingInInnerLoops.cpp b/gfx/angle/src/compiler/translator/BreakVariableAliasingInInnerLoops.cpp deleted file mode 100644 index 018e72cd1..000000000 --- a/gfx/angle/src/compiler/translator/BreakVariableAliasingInInnerLoops.cpp +++ /dev/null @@ -1,106 +0,0 @@ -// -// Copyright (c) 2016 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. -// - -// BreakVariableAliasingInInnerLoops.h: To optimize simple assignments, the HLSL compiler frontend -// may record a variable as aliasing another. Sometimes the alias information gets garbled -// so we work around this issue by breaking the aliasing chain in inner loops. - -#include "BreakVariableAliasingInInnerLoops.h" - -#include "compiler/translator/IntermNode.h" - -// A HLSL compiler developer gave us more details on the root cause and the workaround needed: -// The root problem is that if the HLSL compiler is applying aliasing information even on -// incomplete simulations (in this case, a single pass). The bug is triggered by an assignment -// that comes from a series of assignments, possibly with swizzled or ternary operators with -// known conditionals, where the source is before the loop. -// So, a workaround is to add a +0 term to variables the first time they are assigned to in -// an inner loop (if they are declared in an outside scope, otherwise there is no need). -// This will break the aliasing chain. - -// For simplicity here we add a +0 to any assignment that is in at least two nested loops. Because -// the bug only shows up with swizzles, and ternary assignment, whole array or whole structure -// assignment don't need a workaround. - -namespace sh -{ - -namespace -{ - -class AliasingBreaker : public TIntermTraverser -{ - public: - AliasingBreaker() : TIntermTraverser(true, false, true) {} - - protected: - bool visitBinary(Visit visit, TIntermBinary *binary) - { - if (visit != PreVisit) - { - return false; - } - - if (mLoopLevel < 2 || !binary->isAssignment()) - { - return true; - } - - TIntermTyped *B = binary->getRight(); - TType type = B->getType(); - - if (!type.isScalar() && !type.isVector() && !type.isMatrix()) - { - return true; - } - - if (type.isArray() || IsSampler(type.getBasicType())) - { - return true; - } - - // We have a scalar / vector / matrix assignment with loop depth 2. - // Transform it from - // A = B - // to - // A = (B + typeof(0)); - - TIntermBinary *bPlusZero = new TIntermBinary(EOpAdd, B, TIntermTyped::CreateZero(type)); - bPlusZero->setLine(B->getLine()); - - binary->replaceChildNode(B, bPlusZero); - - return true; - } - - bool visitLoop(Visit visit, TIntermLoop *loop) - { - if (visit == PreVisit) - { - mLoopLevel++; - } - else - { - ASSERT(mLoopLevel > 0); - mLoopLevel--; - } - - return true; - } - - private: - int mLoopLevel = 0; -}; - -} // anonymous namespace - -void BreakVariableAliasingInInnerLoops(TIntermNode *root) -{ - AliasingBreaker breaker; - root->traverse(&breaker); -} - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/BreakVariableAliasingInInnerLoops.h b/gfx/angle/src/compiler/translator/BreakVariableAliasingInInnerLoops.h deleted file mode 100644 index b1d906f91..000000000 --- a/gfx/angle/src/compiler/translator/BreakVariableAliasingInInnerLoops.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) 2016 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. -// - -// BreakVariableAliasingInInnerLoops.h: To optimize simple assignments, the HLSL compiler frontend -// may record a variable as aliasing another. Sometimes the alias information gets garbled -// so we work around this issue by breaking the aliasing chain in inner loops. - -#ifndef COMPILER_TRANSLATOR_BREAKVARIABLEALIASINGININNERLOOPS_H_ -#define COMPILER_TRANSLATOR_BREAKVARIABLEALIASINGININNERLOOPS_H_ - -class TIntermNode; - -namespace sh -{ - -void BreakVariableAliasingInInnerLoops(TIntermNode *root); - -} // namespace sh - -#endif // COMPILER_TRANSLATOR_BREAKVARIABLEALIASINGININNERLOOPS_H_ diff --git a/gfx/angle/src/compiler/translator/BuiltInFunctionEmulator.cpp b/gfx/angle/src/compiler/translator/BuiltInFunctionEmulator.cpp index 152251fde..483fb4467 100755 --- a/gfx/angle/src/compiler/translator/BuiltInFunctionEmulator.cpp +++ b/gfx/angle/src/compiler/translator/BuiltInFunctionEmulator.cpp @@ -9,9 +9,6 @@ #include "compiler/translator/SymbolTable.h" #include "compiler/translator/Cache.h" -namespace sh -{ - class BuiltInFunctionEmulator::BuiltInFunctionEmulationMarker : public TIntermTraverser { public: @@ -245,5 +242,3 @@ BuiltInFunctionEmulator::FunctionId BuiltInFunctionEmulator::FunctionId::getCopy { return FunctionId(mOp, new TType(*mParam1), new TType(*mParam2), new TType(*mParam3)); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/BuiltInFunctionEmulator.h b/gfx/angle/src/compiler/translator/BuiltInFunctionEmulator.h index db5c202d2..6976edfd5 100755 --- a/gfx/angle/src/compiler/translator/BuiltInFunctionEmulator.h +++ b/gfx/angle/src/compiler/translator/BuiltInFunctionEmulator.h @@ -10,9 +10,6 @@ #include "compiler/translator/InfoSink.h" #include "compiler/translator/IntermNode.h" -namespace sh -{ - // // This class decides which built-in functions need to be replaced with the // emulated ones. @@ -85,6 +82,4 @@ class BuiltInFunctionEmulator std::vector mFunctions; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_BUILTINFUNCTIONEMULATOR_H_ diff --git a/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorGLSL.cpp b/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorGLSL.cpp index 74397fb7f..075a55361 100755 --- a/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorGLSL.cpp +++ b/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorGLSL.cpp @@ -11,68 +11,32 @@ #include "compiler/translator/SymbolTable.h" #include "compiler/translator/VersionGLSL.h" -namespace sh +void InitBuiltInFunctionEmulatorForGLSLWorkarounds(BuiltInFunctionEmulator *emu, sh::GLenum shaderType) { - -void InitBuiltInAbsFunctionEmulatorForGLSLWorkarounds(BuiltInFunctionEmulator *emu, - sh::GLenum shaderType) -{ - if (shaderType == GL_VERTEX_SHADER) - { - const TType *int1 = TCache::getType(EbtInt); - emu->addEmulatedFunction(EOpAbs, int1, "int webgl_abs_emu(int x) { return x * sign(x); }"); - } -} - -void InitBuiltInIsnanFunctionEmulatorForGLSLWorkarounds(BuiltInFunctionEmulator *emu, - int targetGLSLVersion) -{ - // isnan() is supported since GLSL 1.3. - if (targetGLSLVersion < GLSL_VERSION_130) - return; + // we use macros here instead of function definitions to work around more GLSL + // compiler bugs, in particular on NVIDIA hardware on Mac OSX. Macros are + // problematic because if the argument has side-effects they will be repeatedly + // evaluated. This is unlikely to show up in real shaders, but is something to + // consider. const TType *float1 = TCache::getType(EbtFloat); const TType *float2 = TCache::getType(EbtFloat, 2); const TType *float3 = TCache::getType(EbtFloat, 3); const TType *float4 = TCache::getType(EbtFloat, 4); - // !(x > 0.0 || x < 0.0 || x == 0.0) will be optimized and always equal to false. - emu->addEmulatedFunction( - EOpIsNan, float1, - "bool webgl_isnan_emu(float x) { return (x > 0.0 || x < 0.0) ? false : x != 0.0; }"); - emu->addEmulatedFunction( - EOpIsNan, float2, - "bvec2 webgl_isnan_emu(vec2 x)\n" - "{\n" - " bvec2 isnan;\n" - " for (int i = 0; i < 2; i++)\n" - " {\n" - " isnan[i] = (x[i] > 0.0 || x[i] < 0.0) ? false : x[i] != 0.0;\n" - " }\n" - " return isnan;\n" - "}\n"); - emu->addEmulatedFunction( - EOpIsNan, float3, - "bvec3 webgl_isnan_emu(vec3 x)\n" - "{\n" - " bvec3 isnan;\n" - " for (int i = 0; i < 3; i++)\n" - " {\n" - " isnan[i] = (x[i] > 0.0 || x[i] < 0.0) ? false : x[i] != 0.0;\n" - " }\n" - " return isnan;\n" - "}\n"); - emu->addEmulatedFunction( - EOpIsNan, float4, - "bvec4 webgl_isnan_emu(vec4 x)\n" - "{\n" - " bvec4 isnan;\n" - " for (int i = 0; i < 4; i++)\n" - " {\n" - " isnan[i] = (x[i] > 0.0 || x[i] < 0.0) ? false : x[i] != 0.0;\n" - " }\n" - " return isnan;\n" - "}\n"); + if (shaderType == GL_FRAGMENT_SHADER) + { + emu->addEmulatedFunction(EOpCos, float1, "webgl_emu_precision float webgl_cos_emu(webgl_emu_precision float a) { return cos(a); }"); + emu->addEmulatedFunction(EOpCos, float2, "webgl_emu_precision vec2 webgl_cos_emu(webgl_emu_precision vec2 a) { return cos(a); }"); + emu->addEmulatedFunction(EOpCos, float3, "webgl_emu_precision vec3 webgl_cos_emu(webgl_emu_precision vec3 a) { return cos(a); }"); + emu->addEmulatedFunction(EOpCos, float4, "webgl_emu_precision vec4 webgl_cos_emu(webgl_emu_precision vec4 a) { return cos(a); }"); + } + emu->addEmulatedFunction(EOpDistance, float1, float1, "#define webgl_distance_emu(x, y) ((x) >= (y) ? (x) - (y) : (y) - (x))"); + emu->addEmulatedFunction(EOpDot, float1, float1, "#define webgl_dot_emu(x, y) ((x) * (y))"); + emu->addEmulatedFunction(EOpLength, float1, "#define webgl_length_emu(x) ((x) >= 0.0 ? (x) : -(x))"); + emu->addEmulatedFunction(EOpNormalize, float1, "#define webgl_normalize_emu(x) ((x) == 0.0 ? 0.0 : ((x) > 0.0 ? 1.0 : -1.0))"); + emu->addEmulatedFunction(EOpReflect, float1, float1, "#define webgl_reflect_emu(I, N) ((I) - 2.0 * (N) * (I) * (N))"); + emu->addEmulatedFunction(EOpFaceForward, float1, float1, float1, "#define webgl_faceforward_emu(N, I, Nref) (((Nref) * (I) < 0.0) ? (N) : -(N))"); } // Emulate built-in functions missing from GLSL 1.30 and higher @@ -217,9 +181,7 @@ void InitBuiltInFunctionEmulatorForGLSLMissingFunctions(BuiltInFunctionEmulator " float scale;\n" " if(exponent < 0)\n" " {\n" - " // The negative unary operator is buggy on OSX.\n" - " // Work around this by using abs instead.\n" - " scale = 1.0 / (1 << abs(exponent));\n" + " scale = 1.0 / (1 << -exponent);\n" " }\n" " else\n" " {\n" @@ -251,5 +213,3 @@ void InitBuiltInFunctionEmulatorForGLSLMissingFunctions(BuiltInFunctionEmulator // clang-format on } } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorGLSL.h b/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorGLSL.h index 09fc85b0d..56242598a 100755 --- a/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorGLSL.h +++ b/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorGLSL.h @@ -9,27 +9,17 @@ #include "GLSLANG/ShaderLang.h" -namespace sh -{ class BuiltInFunctionEmulator; // -// This works around bug in Intel Mac drivers. +// This is only a workaround for OpenGL driver bugs, and isn't needed in general. // -void InitBuiltInAbsFunctionEmulatorForGLSLWorkarounds(BuiltInFunctionEmulator *emu, - sh::GLenum shaderType); - -// -// This works around isnan() bug in Intel Mac drivers -// -void InitBuiltInIsnanFunctionEmulatorForGLSLWorkarounds(BuiltInFunctionEmulator *emu, - int targetGLSLVersion); +void InitBuiltInFunctionEmulatorForGLSLWorkarounds(BuiltInFunctionEmulator *emu, sh::GLenum shaderType); // // This function is emulating built-in functions missing from GLSL 1.30 and higher. // void InitBuiltInFunctionEmulatorForGLSLMissingFunctions(BuiltInFunctionEmulator *emu, sh::GLenum shaderType, int targetGLSLVersion); -} // namespace sh #endif // COMPILER_TRANSLATOR_BUILTINFUNCTIONEMULATORGLSL_H_ diff --git a/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp b/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp index c51062e1e..50e15cbc2 100755 --- a/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp +++ b/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp @@ -8,62 +8,6 @@ #include "compiler/translator/BuiltInFunctionEmulator.h" #include "compiler/translator/BuiltInFunctionEmulatorHLSL.h" #include "compiler/translator/SymbolTable.h" -#include "compiler/translator/VersionGLSL.h" - -namespace sh -{ - -void InitBuiltInIsnanFunctionEmulatorForHLSLWorkarounds(BuiltInFunctionEmulator *emu, - int targetGLSLVersion) -{ - if (targetGLSLVersion < GLSL_VERSION_130) - return; - - TType *float1 = new TType(EbtFloat); - TType *float2 = new TType(EbtFloat, 2); - TType *float3 = new TType(EbtFloat, 3); - TType *float4 = new TType(EbtFloat, 4); - - emu->addEmulatedFunction(EOpIsNan, float1, - "bool webgl_isnan_emu(float x)\n" - "{\n" - " return (x > 0.0 || x < 0.0) ? false : x != 0.0;\n" - "}\n" - "\n"); - - emu->addEmulatedFunction(EOpIsNan, float2, - "bool2 webgl_isnan_emu(float2 x)\n" - "{\n" - " bool2 isnan;\n" - " for (int i = 0; i < 2; i++)\n" - " {\n" - " isnan[i] = (x[i] > 0.0 || x[i] < 0.0) ? false : x[i] != 0.0;\n" - " }\n" - " return isnan;\n" - "}\n"); - - emu->addEmulatedFunction(EOpIsNan, float3, - "bool3 webgl_isnan_emu(float3 x)\n" - "{\n" - " bool3 isnan;\n" - " for (int i = 0; i < 3; i++)\n" - " {\n" - " isnan[i] = (x[i] > 0.0 || x[i] < 0.0) ? false : x[i] != 0.0;\n" - " }\n" - " return isnan;\n" - "}\n"); - - emu->addEmulatedFunction(EOpIsNan, float4, - "bool4 webgl_isnan_emu(float4 x)\n" - "{\n" - " bool4 isnan;\n" - " for (int i = 0; i < 4; i++)\n" - " {\n" - " isnan[i] = (x[i] > 0.0 || x[i] < 0.0) ? false : x[i] != 0.0;\n" - " }\n" - " return isnan;\n" - "}\n"); -} void InitBuiltInFunctionEmulatorForHLSL(BuiltInFunctionEmulator *emu) { @@ -495,5 +439,3 @@ void InitBuiltInFunctionEmulatorForHLSL(BuiltInFunctionEmulator *emu) "}\n"); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorHLSL.h b/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorHLSL.h index 48da73f58..4c45a93dc 100755 --- a/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorHLSL.h +++ b/gfx/angle/src/compiler/translator/BuiltInFunctionEmulatorHLSL.h @@ -9,19 +9,8 @@ #include "GLSLANG/ShaderLang.h" -namespace sh -{ - class BuiltInFunctionEmulator; void InitBuiltInFunctionEmulatorForHLSL(BuiltInFunctionEmulator *emu); -// -// This works around isnan() bug on some Intel drivers. -// -void InitBuiltInIsnanFunctionEmulatorForHLSLWorkarounds(BuiltInFunctionEmulator *emu, - int targetGLSLVersion); - -} // namespace sh - #endif // COMPILER_TRANSLATOR_BUILTINFUNCTIONEMULATORHLSL_H_ diff --git a/gfx/angle/src/compiler/translator/Cache.cpp b/gfx/angle/src/compiler/translator/Cache.cpp index 094e3ff57..57a43700c 100755 --- a/gfx/angle/src/compiler/translator/Cache.cpp +++ b/gfx/angle/src/compiler/translator/Cache.cpp @@ -12,9 +12,6 @@ #include "common/debug.h" #include "compiler/translator/Cache.h" -namespace sh -{ - namespace { @@ -47,6 +44,7 @@ TCache::TypeKey::TypeKey(TBasicType basicType, "TypeKey::value is too small"); const size_t MaxEnumValue = std::numeric_limits::max(); + UNUSED_ASSERTION_VARIABLE(MaxEnumValue); // TODO: change to static_assert() once we deprecate MSVC 2013 support ASSERT(MaxEnumValue >= EbtLast && @@ -100,5 +98,3 @@ const TType *TCache::getType(TBasicType basicType, return type; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/Cache.h b/gfx/angle/src/compiler/translator/Cache.h index 9a5607f24..1d2abb77e 100755 --- a/gfx/angle/src/compiler/translator/Cache.h +++ b/gfx/angle/src/compiler/translator/Cache.h @@ -16,9 +16,6 @@ #include "compiler/translator/Types.h" #include "compiler/translator/PoolAlloc.h" -namespace sh -{ - class TCache { public: @@ -90,6 +87,4 @@ class TCache static TCache *sCache; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_CACHE_H_ diff --git a/gfx/angle/src/compiler/translator/CallDAG.cpp b/gfx/angle/src/compiler/translator/CallDAG.cpp index 00aa833b8..10f0eb937 100755 --- a/gfx/angle/src/compiler/translator/CallDAG.cpp +++ b/gfx/angle/src/compiler/translator/CallDAG.cpp @@ -11,9 +11,6 @@ #include "compiler/translator/CallDAG.h" #include "compiler/translator/InfoSink.h" -namespace sh -{ - // The CallDAGCreator does all the processing required to create the CallDAG // structure so that the latter contains only the necessary variables. class CallDAG::CallDAGCreator : public TIntermTraverser @@ -47,7 +44,6 @@ class CallDAG::CallDAGCreator : public TIntermTraverser skipped++; } } - ASSERT(mFunctions.size() == mCurrentIndex + skipped); return INITDAG_SUCCESS; } @@ -79,8 +75,7 @@ class CallDAG::CallDAGCreator : public TIntermTraverser record.callees.push_back(static_cast(callee->index)); } - (*idToIndex)[data.node->getFunctionSymbolInfo()->getId()] = - static_cast(data.index); + (*idToIndex)[data.node->getFunctionId()] = static_cast(data.index); } } @@ -97,39 +92,13 @@ class CallDAG::CallDAGCreator : public TIntermTraverser } std::set callees; - TIntermFunctionDefinition *node; + TIntermAggregate *node; TString name; size_t index; bool indexAssigned; bool visiting; }; - bool visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) override - { - // Create the record if need be and remember the node. - if (visit == PreVisit) - { - auto it = mFunctions.find(node->getFunctionSymbolInfo()->getName()); - - if (it == mFunctions.end()) - { - mCurrentFunction = &mFunctions[node->getFunctionSymbolInfo()->getName()]; - } - else - { - mCurrentFunction = &it->second; - } - - mCurrentFunction->node = node; - mCurrentFunction->name = node->getFunctionSymbolInfo()->getName(); - } - else if (visit == PostVisit) - { - mCurrentFunction = nullptr; - } - return true; - } - // Aggregates the AST node for each function as well as the name of the functions called by it bool visitAggregate(Visit visit, TIntermAggregate *node) override { @@ -139,10 +108,36 @@ class CallDAG::CallDAGCreator : public TIntermTraverser if (visit == PreVisit) { // Function declaration, create an empty record. - auto &record = mFunctions[node->getFunctionSymbolInfo()->getName()]; - record.name = node->getFunctionSymbolInfo()->getName(); + auto& record = mFunctions[node->getName()]; + record.name = node->getName(); } break; + case EOpFunction: + { + // Function definition, create the record if need be and remember the node. + if (visit == PreVisit) + { + auto it = mFunctions.find(node->getName()); + + if (it == mFunctions.end()) + { + mCurrentFunction = &mFunctions[node->getName()]; + } + else + { + mCurrentFunction = &it->second; + } + + mCurrentFunction->node = node; + mCurrentFunction->name = node->getName(); + + } + else if (visit == PostVisit) + { + mCurrentFunction = nullptr; + } + break; + } case EOpFunctionCall: { // Function call, add the callees @@ -151,7 +146,7 @@ class CallDAG::CallDAGCreator : public TIntermTraverser // Do not handle calls to builtin functions if (node->isUserDefined()) { - auto it = mFunctions.find(node->getFunctionSymbolInfo()->getName()); + auto it = mFunctions.find(node->getName()); ASSERT(it != mFunctions.end()); // We might be in a top-level function call to set a global variable @@ -170,102 +165,52 @@ class CallDAG::CallDAGCreator : public TIntermTraverser } // Recursively assigns indices to a sub DAG - InitResult assignIndicesInternal(CreatorFunctionData *root) + InitResult assignIndicesInternal(CreatorFunctionData *function) { - // Iterative implementation of the index assignment algorithm. A recursive version - // would be prettier but since the CallDAG creation runs before the limiting of the - // call depth, we might get stack overflows (computation of the call depth uses the - // CallDAG). + ASSERT(function); - ASSERT(root); + if (!function->node) + { + *mCreationInfo << "Undefined function '" << function->name + << ")' used in the following call chain:"; + return INITDAG_UNDEFINED; + } - if (root->indexAssigned) + if (function->indexAssigned) { return INITDAG_SUCCESS; } - // If we didn't have to detect recursion, functionsToProcess could be a simple queue - // in which we add the function being processed's callees. However in order to detect - // recursion we need to know which functions we are currently visiting. For that reason - // functionsToProcess will look like a concatenation of segments of the form - // [F visiting = true, subset of F callees with visiting = false] and the following - // segment (if any) will be start with a callee of F. - // This way we can remember when we started visiting a function, to put visiting back - // to false. - TVector functionsToProcess; - functionsToProcess.push_back(root); - - InitResult result = INITDAG_SUCCESS; - - while (!functionsToProcess.empty()) + if (function->visiting) { - CreatorFunctionData *function = functionsToProcess.back(); - - if (function->visiting) - { - function->visiting = false; - function->index = mCurrentIndex++; - function->indexAssigned = true; - - functionsToProcess.pop_back(); - continue; - } - - if (!function->node) - { - *mCreationInfo << "Undefined function '" << function->name - << ")' used in the following call chain:"; - result = INITDAG_UNDEFINED; - break; - } - - if (function->indexAssigned) - { - functionsToProcess.pop_back(); - continue; - } - - function->visiting = true; - - for (auto callee : function->callees) + if (mCreationInfo) { - functionsToProcess.push_back(callee); - - // Check if the callee is already being visited after pushing it so that it appears - // in the chain printed in the info log. - if (callee->visiting) - { - *mCreationInfo << "Recursive function call in the following call chain:"; - result = INITDAG_RECURSION; - break; - } - } - - if (result != INITDAG_SUCCESS) - { - break; + *mCreationInfo << "Recursive function call in the following call chain:" << function->name; } + return INITDAG_RECURSION; } + function->visiting = true; - // The call chain is made of the function we were visiting when the error was detected. - if (result != INITDAG_SUCCESS) + for (auto &callee : function->callees) { - bool first = true; - for (auto function : functionsToProcess) + InitResult result = assignIndicesInternal(callee); + if (result != INITDAG_SUCCESS) { - if (function->visiting) + // We know that there is an issue with the call chain in the AST, + // print the link of the chain we were processing. + if (mCreationInfo) { - if (!first) - { - *mCreationInfo << " -> "; - } - *mCreationInfo << function->name << ")"; - first = false; + *mCreationInfo << " <- " << function->name << ")"; } + return result; } } - return result; + function->index = mCurrentIndex++; + function->indexAssigned = true; + + function->visiting = false; + return INITDAG_SUCCESS; } TInfoSinkBase *mCreationInfo; @@ -287,9 +232,13 @@ CallDAG::~CallDAG() const size_t CallDAG::InvalidIndex = std::numeric_limits::max(); -size_t CallDAG::findIndex(const TFunctionSymbolInfo *functionInfo) const +size_t CallDAG::findIndex(const TIntermAggregate *function) const { - auto it = mFunctionIdToIndex.find(functionInfo->getId()); + TOperator op = function->getOp(); + ASSERT(op == EOpPrototype || op == EOpFunction || op == EOpFunctionCall); + UNUSED_ASSERTION_VARIABLE(op); + + auto it = mFunctionIdToIndex.find(function->getFunctionId()); if (it == mFunctionIdToIndex.end()) { @@ -309,7 +258,7 @@ const CallDAG::Record &CallDAG::getRecordFromIndex(size_t index) const const CallDAG::Record &CallDAG::getRecord(const TIntermAggregate *function) const { - size_t index = findIndex(function->getFunctionSymbolInfo()); + size_t index = findIndex(function); ASSERT(index != InvalidIndex && index < mRecords.size()); return mRecords[index]; } @@ -327,8 +276,6 @@ void CallDAG::clear() CallDAG::InitResult CallDAG::init(TIntermNode *root, TInfoSinkBase *info) { - ASSERT(info); - CallDAGCreator creator(info); // Creates the mapping of functions to callees @@ -344,5 +291,3 @@ CallDAG::InitResult CallDAG::init(TIntermNode *root, TInfoSinkBase *info) creator.fillDataStructures(&mRecords, &mFunctionIdToIndex); return INITDAG_SUCCESS; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/CallDAG.h b/gfx/angle/src/compiler/translator/CallDAG.h index 90c056878..06c377db0 100755 --- a/gfx/angle/src/compiler/translator/CallDAG.h +++ b/gfx/angle/src/compiler/translator/CallDAG.h @@ -16,8 +16,6 @@ #include "compiler/translator/IntermNode.h" #include "compiler/translator/VariableInfo.h" -namespace sh -{ // The translator needs to analyze the the graph of the function calls // to run checks and analyses; since in GLSL recursion is not allowed @@ -43,7 +41,7 @@ class CallDAG : angle::NonCopyable struct Record { std::string name; - TIntermFunctionDefinition *node; + TIntermAggregate *node; std::vector callees; }; @@ -59,7 +57,7 @@ class CallDAG : angle::NonCopyable InitResult init(TIntermNode *root, TInfoSinkBase *info); // Returns InvalidIndex if the function wasn't found - size_t findIndex(const TFunctionSymbolInfo *functionInfo) const; + size_t findIndex(const TIntermAggregate *function) const; const Record &getRecordFromIndex(size_t index) const; const Record &getRecord(const TIntermAggregate *function) const; @@ -74,6 +72,4 @@ class CallDAG : angle::NonCopyable class CallDAGCreator; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_CALLDAG_H_ diff --git a/gfx/angle/src/compiler/translator/CodeGen.cpp b/gfx/angle/src/compiler/translator/CodeGen.cpp index 22f2afc98..f099bccf1 100755 --- a/gfx/angle/src/compiler/translator/CodeGen.cpp +++ b/gfx/angle/src/compiler/translator/CodeGen.cpp @@ -6,79 +6,71 @@ #ifdef ANGLE_ENABLE_ESSL #include "compiler/translator/TranslatorESSL.h" -#endif // ANGLE_ENABLE_ESSL +#endif #ifdef ANGLE_ENABLE_GLSL #include "compiler/translator/TranslatorGLSL.h" -#endif // ANGLE_ENABLE_GLSL +#endif #ifdef ANGLE_ENABLE_HLSL #include "compiler/translator/TranslatorHLSL.h" -#endif // ANGLE_ENABLE_HLSL - -namespace sh -{ +#endif // ANGLE_ENABLE_HLSL // // This function must be provided to create the actual // compile object used by higher level code. It returns // a subclass of TCompiler. // -TCompiler *ConstructCompiler(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output) +TCompiler* ConstructCompiler( + sh::GLenum type, ShShaderSpec spec, ShShaderOutput output) { - switch (output) - { - case SH_ESSL_OUTPUT: + switch (output) { + case SH_ESSL_OUTPUT: #ifdef ANGLE_ENABLE_ESSL - return new TranslatorESSL(type, spec); + return new TranslatorESSL(type, spec); #else - // This compiler is not supported in this configuration. Return NULL per the - // sh::ConstructCompiler API. - return nullptr; -#endif // ANGLE_ENABLE_ESSL - - case SH_GLSL_130_OUTPUT: - case SH_GLSL_140_OUTPUT: - case SH_GLSL_150_CORE_OUTPUT: - case SH_GLSL_330_CORE_OUTPUT: - case SH_GLSL_400_CORE_OUTPUT: - case SH_GLSL_410_CORE_OUTPUT: - case SH_GLSL_420_CORE_OUTPUT: - case SH_GLSL_430_CORE_OUTPUT: - case SH_GLSL_440_CORE_OUTPUT: - case SH_GLSL_450_CORE_OUTPUT: - case SH_GLSL_COMPATIBILITY_OUTPUT: + // This compiler is not supported in this + // configuration. Return NULL per the ShConstructCompiler API. + return nullptr; +#endif // ANGLE_ENABLE_ESSL + case SH_GLSL_130_OUTPUT: + case SH_GLSL_140_OUTPUT: + case SH_GLSL_150_CORE_OUTPUT: + case SH_GLSL_330_CORE_OUTPUT: + case SH_GLSL_400_CORE_OUTPUT: + case SH_GLSL_410_CORE_OUTPUT: + case SH_GLSL_420_CORE_OUTPUT: + case SH_GLSL_430_CORE_OUTPUT: + case SH_GLSL_440_CORE_OUTPUT: + case SH_GLSL_450_CORE_OUTPUT: + case SH_GLSL_COMPATIBILITY_OUTPUT: #ifdef ANGLE_ENABLE_GLSL - return new TranslatorGLSL(type, spec, output); + return new TranslatorGLSL(type, spec, output); #else - // This compiler is not supported in this configuration. Return NULL per the - // sh::ConstructCompiler API. - return nullptr; -#endif // ANGLE_ENABLE_GLSL - - case SH_HLSL_3_0_OUTPUT: - case SH_HLSL_4_1_OUTPUT: - case SH_HLSL_4_0_FL9_3_OUTPUT: + // This compiler is not supported in this + // configuration. Return NULL per the ShConstructCompiler API. + return nullptr; +#endif // ANGLE_ENABLE_GLSL + case SH_HLSL_3_0_OUTPUT: + case SH_HLSL_4_1_OUTPUT: + case SH_HLSL_4_0_FL9_3_OUTPUT: #ifdef ANGLE_ENABLE_HLSL - return new TranslatorHLSL(type, spec, output); + return new TranslatorHLSL(type, spec, output); #else - // This compiler is not supported in this configuration. Return NULL per the - // sh::ConstructCompiler API. - return nullptr; -#endif // ANGLE_ENABLE_HLSL - - default: - // Unknown format. Return NULL per the sh::ConstructCompiler API. - return nullptr; + // This compiler is not supported in this + // configuration. Return NULL per the ShConstructCompiler API. + return nullptr; +#endif // ANGLE_ENABLE_HLSL + default: + // Unknown format. Return NULL per the ShConstructCompiler API. + return nullptr; } } // // Delete the compiler made by ConstructCompiler // -void DeleteCompiler(TCompiler *compiler) +void DeleteCompiler(TCompiler* compiler) { - SafeDelete(compiler); + delete compiler; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/Common.h b/gfx/angle/src/compiler/translator/Common.h index 853317891..60223232a 100755 --- a/gfx/angle/src/compiler/translator/Common.h +++ b/gfx/angle/src/compiler/translator/Common.h @@ -18,9 +18,6 @@ #include "common/debug.h" #include "compiler/translator/PoolAlloc.h" -namespace sh -{ - struct TSourceLoc { int first_file; int first_line; @@ -95,6 +92,4 @@ inline TString str(T i) return buffer; } -} // namespace sh - #endif // COMPILER_TRANSLATOR_COMMON_H_ diff --git a/gfx/angle/src/compiler/translator/Compiler.cpp b/gfx/angle/src/compiler/translator/Compiler.cpp index e085ed588..0257dd3a7 100755 --- a/gfx/angle/src/compiler/translator/Compiler.cpp +++ b/gfx/angle/src/compiler/translator/Compiler.cpp @@ -4,18 +4,11 @@ // found in the LICENSE file. // -#include "compiler/translator/Compiler.h" - -#include - -#include "angle_gl.h" -#include "common/utilities.h" -#include "compiler/translator/AddAndTrueToLoopCondition.h" #include "compiler/translator/Cache.h" +#include "compiler/translator/Compiler.h" #include "compiler/translator/CallDAG.h" #include "compiler/translator/DeferGlobalInitializers.h" #include "compiler/translator/EmulateGLFragColorBroadcast.h" -#include "compiler/translator/EmulatePrecision.h" #include "compiler/translator/ForLoopUnroll.h" #include "compiler/translator/Initialize.h" #include "compiler/translator/InitializeParseContext.h" @@ -23,100 +16,41 @@ #include "compiler/translator/ParseContext.h" #include "compiler/translator/PruneEmptyDeclarations.h" #include "compiler/translator/RegenerateStructNames.h" -#include "compiler/translator/RemoveInvariantDeclaration.h" #include "compiler/translator/RemovePow.h" +#include "compiler/translator/RenameFunction.h" #include "compiler/translator/RewriteDoWhile.h" #include "compiler/translator/ScalarizeVecAndMatConstructorArgs.h" #include "compiler/translator/UnfoldShortCircuitAST.h" -#include "compiler/translator/UseInterfaceBlockFields.h" #include "compiler/translator/ValidateLimitations.h" #include "compiler/translator/ValidateMaxParameters.h" #include "compiler/translator/ValidateOutputs.h" #include "compiler/translator/VariablePacker.h" +#include "compiler/translator/depgraph/DependencyGraph.h" +#include "compiler/translator/depgraph/DependencyGraphOutput.h" +#include "compiler/translator/timing/RestrictFragmentShaderTiming.h" +#include "compiler/translator/timing/RestrictVertexShaderTiming.h" #include "third_party/compiler/ArrayBoundsClamper.h" - -namespace sh -{ - -namespace -{ - -#if defined(ANGLE_ENABLE_FUZZER_CORPUS_OUTPUT) -void DumpFuzzerCase(char const *const *shaderStrings, - size_t numStrings, - uint32_t type, - uint32_t spec, - uint32_t output, - uint64_t options) -{ - static int fileIndex = 0; - - std::ostringstream o; - o << "corpus/" << fileIndex++ << ".sample"; - std::string s = o.str(); - - // Must match the input format of the fuzzer - FILE *f = fopen(s.c_str(), "w"); - fwrite(&type, sizeof(type), 1, f); - fwrite(&spec, sizeof(spec), 1, f); - fwrite(&output, sizeof(output), 1, f); - fwrite(&options, sizeof(options), 1, f); - - char zero[128 - 20] = {0}; - fwrite(&zero, 128 - 20, 1, f); - - for (size_t i = 0; i < numStrings; i++) - { - fwrite(shaderStrings[i], sizeof(char), strlen(shaderStrings[i]), f); - } - fwrite(&zero, 1, 1, f); - - fclose(f); -} -#endif // defined(ANGLE_ENABLE_FUZZER_CORPUS_OUTPUT) -} // anonymous namespace +#include "angle_gl.h" +#include "common/utilities.h" bool IsWebGLBasedSpec(ShShaderSpec spec) { - return (spec == SH_WEBGL_SPEC || spec == SH_WEBGL2_SPEC || spec == SH_WEBGL3_SPEC); + return (spec == SH_WEBGL_SPEC || spec == SH_CSS_SHADERS_SPEC || spec == SH_WEBGL2_SPEC || + spec == SH_WEBGL3_SPEC); } bool IsGLSL130OrNewer(ShShaderOutput output) { - return (output == SH_GLSL_130_OUTPUT || output == SH_GLSL_140_OUTPUT || - output == SH_GLSL_150_CORE_OUTPUT || output == SH_GLSL_330_CORE_OUTPUT || - output == SH_GLSL_400_CORE_OUTPUT || output == SH_GLSL_410_CORE_OUTPUT || - output == SH_GLSL_420_CORE_OUTPUT || output == SH_GLSL_430_CORE_OUTPUT || - output == SH_GLSL_440_CORE_OUTPUT || output == SH_GLSL_450_CORE_OUTPUT); -} - -bool IsGLSL420OrNewer(ShShaderOutput output) -{ - return (output == SH_GLSL_420_CORE_OUTPUT || output == SH_GLSL_430_CORE_OUTPUT || - output == SH_GLSL_440_CORE_OUTPUT || output == SH_GLSL_450_CORE_OUTPUT); -} - -bool IsGLSL410OrOlder(ShShaderOutput output) -{ - return (output == SH_GLSL_130_OUTPUT || output == SH_GLSL_140_OUTPUT || - output == SH_GLSL_150_CORE_OUTPUT || output == SH_GLSL_330_CORE_OUTPUT || - output == SH_GLSL_400_CORE_OUTPUT || output == SH_GLSL_410_CORE_OUTPUT); -} - -bool RemoveInvariant(sh::GLenum shaderType, - int shaderVersion, - ShShaderOutput outputType, - ShCompileOptions compileOptions) -{ - if ((compileOptions & SH_DONT_REMOVE_INVARIANT_FOR_FRAGMENT_INPUT) == 0 && - shaderType == GL_FRAGMENT_SHADER && IsGLSL420OrNewer(outputType)) - return true; - - if ((compileOptions & SH_REMOVE_INVARIANT_AND_CENTROID_FOR_ESSL3) != 0 && - shaderVersion >= 300 && shaderType == GL_VERTEX_SHADER && IsGLSL410OrOlder(outputType)) - return true; - - return false; + return (output == SH_GLSL_130_OUTPUT || + output == SH_GLSL_140_OUTPUT || + output == SH_GLSL_150_CORE_OUTPUT || + output == SH_GLSL_330_CORE_OUTPUT || + output == SH_GLSL_400_CORE_OUTPUT || + output == SH_GLSL_410_CORE_OUTPUT || + output == SH_GLSL_420_CORE_OUTPUT || + output == SH_GLSL_430_CORE_OUTPUT || + output == SH_GLSL_440_CORE_OUTPUT || + output == SH_GLSL_450_CORE_OUTPUT); } size_t GetGlobalMaxTokenSize(ShShaderSpec spec) @@ -125,10 +59,11 @@ size_t GetGlobalMaxTokenSize(ShShaderSpec spec) // size undefined. ES3 defines a max size of 1024 characters. switch (spec) { - case SH_WEBGL_SPEC: - return 256; - default: - return 1024; + case SH_WEBGL_SPEC: + case SH_CSS_SHADERS_SPEC: + return 256; + default: + return 1024; } } @@ -174,18 +109,19 @@ int MapSpecToShaderVersion(ShShaderSpec spec) { switch (spec) { - case SH_GLES2_SPEC: - case SH_WEBGL_SPEC: - return 100; - case SH_GLES3_SPEC: - case SH_WEBGL2_SPEC: - return 300; - case SH_GLES3_1_SPEC: - case SH_WEBGL3_SPEC: - return 310; - default: - UNREACHABLE(); - return 0; + case SH_GLES2_SPEC: + case SH_WEBGL_SPEC: + case SH_CSS_SHADERS_SPEC: + return 100; + case SH_GLES3_SPEC: + case SH_WEBGL2_SPEC: + return 300; + case SH_GLES3_1_SPEC: + case SH_WEBGL3_SPEC: + return 310; + default: + UNREACHABLE(); + return 0; } } @@ -226,7 +162,7 @@ TCompiler::~TCompiler() { } -bool TCompiler::shouldRunLoopAndIndexingValidation(ShCompileOptions compileOptions) const +bool TCompiler::shouldRunLoopAndIndexingValidation(int compileOptions) const { // If compiling an ESSL 1.00 shader for WebGL, or if its been requested through the API, // validate loop and indexing as well (to verify that the shader only uses minimal functionality @@ -261,16 +197,15 @@ bool TCompiler::Init(const ShBuiltInResources& resources) return true; } -TIntermBlock *TCompiler::compileTreeForTesting(const char *const shaderStrings[], - size_t numStrings, - ShCompileOptions compileOptions) +TIntermNode *TCompiler::compileTreeForTesting(const char* const shaderStrings[], + size_t numStrings, int compileOptions) { return compileTreeImpl(shaderStrings, numStrings, compileOptions); } -TIntermBlock *TCompiler::compileTreeImpl(const char *const shaderStrings[], - size_t numStrings, - const ShCompileOptions compileOptions) +TIntermNode *TCompiler::compileTreeImpl(const char *const shaderStrings[], + size_t numStrings, + const int compileOptions) { clearResults(); @@ -288,7 +223,8 @@ TIntermBlock *TCompiler::compileTreeImpl(const char *const shaderStrings[], ++firstSource; } - TParseContext parseContext(symbolTable, extensionBehavior, shaderType, shaderSpec, + TIntermediate intermediate(infoSink); + TParseContext parseContext(symbolTable, extensionBehavior, intermediate, shaderType, shaderSpec, compileOptions, true, infoSink, getResources()); parseContext.setFragmentPrecisionHighOnESSL1(fragmentPrecisionHigh); @@ -311,7 +247,7 @@ TIntermBlock *TCompiler::compileTreeImpl(const char *const shaderStrings[], success = false; } - TIntermBlock *root = nullptr; + TIntermNode *root = nullptr; if (success) { @@ -322,6 +258,7 @@ TIntermBlock *TCompiler::compileTreeImpl(const char *const shaderStrings[], mComputeShaderLocalSize = parseContext.getComputeShaderLocalSize(); root = parseContext.getTreeRoot(); + root = intermediate.postProcess(root); // Highp might have been auto-enabled based on shader version fragmentPrecisionHigh = parseContext.getFragmentPrecisionHigh(); @@ -358,17 +295,11 @@ TIntermBlock *TCompiler::compileTreeImpl(const char *const shaderStrings[], if (success && shouldRunLoopAndIndexingValidation(compileOptions)) success = validateLimitations(root); - // Fail compilation if precision emulation not supported. - if (success && getResources().WEBGL_debug_shader_precision && - getPragma().debugShaderPrecision) - { - if (!EmulatePrecision::SupportedInLanguage(outputType)) - { - infoSink.info.prefix(EPrefixError); - infoSink.info << "Precision emulation not supported for this output type."; - success = false; - } - } + if (success && (compileOptions & SH_TIMING_RESTRICTIONS)) + success = enforceTimingRestrictions(root, (compileOptions & SH_DEPENDENCY_GRAPH) != 0); + + if (success && shaderSpec == SH_CSS_SHADERS_SPEC) + rewriteCSSShader(root); // Unroll for-loop markup needs to happen after validateLimitations pass. if (success && (compileOptions & SH_UNROLL_FOR_LOOP_WITH_INTEGER_INDEX)) @@ -410,16 +341,10 @@ TIntermBlock *TCompiler::compileTreeImpl(const char *const shaderStrings[], (outputType == SH_GLSL_COMPATIBILITY_OUTPUT))) initializeGLPosition(root); - if (success && RemoveInvariant(shaderType, shaderVersion, outputType, compileOptions)) - sh::RemoveInvariantDeclaration(root); - // This pass might emit short circuits so keep it before the short circuit unfolding if (success && (compileOptions & SH_REWRITE_DO_WHILE_LOOPS)) RewriteDoWhile(root, getTemporaryIndex()); - if (success && (compileOptions & SH_ADD_AND_TRUE_TO_LOOP_CONDITION)) - sh::AddAndTrueToLoopCondition(root); - if (success && (compileOptions & SH_UNFOLD_SHORT_CIRCUIT)) { UnfoldShortCircuitAST unfoldShortCircuit; @@ -435,10 +360,6 @@ TIntermBlock *TCompiler::compileTreeImpl(const char *const shaderStrings[], if (success && shouldCollectVariables(compileOptions)) { collectVariables(root); - if (compileOptions & SH_USE_UNUSED_STANDARD_SHARED_BLOCKS) - { - useAllMembersInUnusedStandardAndSharedBlocks(root); - } if (compileOptions & SH_ENFORCE_PACKING_RESTRICTIONS) { success = enforcePackingRestrictions(); @@ -456,8 +377,9 @@ TIntermBlock *TCompiler::compileTreeImpl(const char *const shaderStrings[], if (success && (compileOptions & SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS)) { - ScalarizeVecAndMatConstructorArgs(root, shaderType, fragmentPrecisionHigh, - &mTemporaryIndex); + ScalarizeVecAndMatConstructorArgs scalarizer( + shaderType, fragmentPrecisionHigh); + root->traverse(&scalarizer); } if (success && (compileOptions & SH_REGENERATE_STRUCT_NAMES)) @@ -486,18 +408,12 @@ TIntermBlock *TCompiler::compileTreeImpl(const char *const shaderStrings[], return NULL; } -bool TCompiler::compile(const char *const shaderStrings[], - size_t numStrings, - ShCompileOptions compileOptionsIn) +bool TCompiler::compile(const char *const shaderStrings[], size_t numStrings, int compileOptionsIn) { -#if defined(ANGLE_ENABLE_FUZZER_CORPUS_OUTPUT) - DumpFuzzerCase(shaderStrings, numStrings, shaderType, shaderSpec, outputType, compileOptionsIn); -#endif // defined(ANGLE_ENABLE_FUZZER_CORPUS_OUTPUT) - if (numStrings == 0) return true; - ShCompileOptions compileOptions = compileOptionsIn; + int compileOptions = compileOptionsIn; // Apply key workarounds. if (shouldFlattenPragmaStdglInvariantAll()) @@ -506,19 +422,8 @@ bool TCompiler::compile(const char *const shaderStrings[], compileOptions |= SH_FLATTEN_PRAGMA_STDGL_INVARIANT_ALL; } - ShCompileOptions unrollFlags = - SH_UNROLL_FOR_LOOP_WITH_INTEGER_INDEX | SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX; - if ((compileOptions & SH_ADD_AND_TRUE_TO_LOOP_CONDITION) != 0 && - (compileOptions & unrollFlags) != 0) - { - infoSink.info.prefix(EPrefixError); - infoSink.info - << "Unsupported compile flag combination: unroll & ADD_TRUE_TO_LOOP_CONDITION"; - return false; - } - TScopedPoolAllocator scopedAlloc(&allocator); - TIntermBlock *root = compileTreeImpl(shaderStrings, numStrings, compileOptions); + TIntermNode *root = compileTreeImpl(shaderStrings, numStrings, compileOptions); if (root) { @@ -547,26 +452,32 @@ bool TCompiler::InitBuiltInSymbolTable(const ShBuiltInResources &resources) symbolTable.push(); // ESSL3_1_BUILTINS TPublicType integer; - integer.initializeBasicType(EbtInt); + integer.type = EbtInt; + integer.primarySize = 1; + integer.secondarySize = 1; + integer.array = false; TPublicType floatingPoint; - floatingPoint.initializeBasicType(EbtFloat); + floatingPoint.type = EbtFloat; + floatingPoint.primarySize = 1; + floatingPoint.secondarySize = 1; + floatingPoint.array = false; - switch (shaderType) + switch(shaderType) { - case GL_FRAGMENT_SHADER: - symbolTable.setDefaultPrecision(integer, EbpMedium); - break; - case GL_VERTEX_SHADER: - symbolTable.setDefaultPrecision(integer, EbpHigh); - symbolTable.setDefaultPrecision(floatingPoint, EbpHigh); - break; - case GL_COMPUTE_SHADER: - symbolTable.setDefaultPrecision(integer, EbpHigh); - symbolTable.setDefaultPrecision(floatingPoint, EbpHigh); - break; - default: - assert(false && "Language not supported"); + case GL_FRAGMENT_SHADER: + symbolTable.setDefaultPrecision(integer, EbpMedium); + break; + case GL_VERTEX_SHADER: + symbolTable.setDefaultPrecision(integer, EbpHigh); + symbolTable.setDefaultPrecision(floatingPoint, EbpHigh); + break; + case GL_COMPUTE_SHADER: + symbolTable.setDefaultPrecision(integer, EbpHigh); + symbolTable.setDefaultPrecision(floatingPoint, EbpHigh); + break; + default: + assert(false && "Language not supported"); } // Set defaults for sampler types that have default precision, even those that are // only available if an extension exists. @@ -589,7 +500,10 @@ void TCompiler::initSamplerDefaultPrecision(TBasicType samplerType) { ASSERT(samplerType > EbtGuardSamplerBegin && samplerType < EbtGuardSamplerEnd); TPublicType sampler; - sampler.initializeBasicType(samplerType); + sampler.primarySize = 1; + sampler.secondarySize = 1; + sampler.array = false; + sampler.type = samplerType; symbolTable.setDefaultPrecision(sampler, EbpLow); } @@ -599,60 +513,60 @@ void TCompiler::setResourceString() // clang-format off strstream << ":MaxVertexAttribs:" << compileResources.MaxVertexAttribs - << ":MaxVertexUniformVectors:" << compileResources.MaxVertexUniformVectors - << ":MaxVaryingVectors:" << compileResources.MaxVaryingVectors - << ":MaxVertexTextureImageUnits:" << compileResources.MaxVertexTextureImageUnits - << ":MaxCombinedTextureImageUnits:" << compileResources.MaxCombinedTextureImageUnits - << ":MaxTextureImageUnits:" << compileResources.MaxTextureImageUnits - << ":MaxFragmentUniformVectors:" << compileResources.MaxFragmentUniformVectors - << ":MaxDrawBuffers:" << compileResources.MaxDrawBuffers - << ":OES_standard_derivatives:" << compileResources.OES_standard_derivatives - << ":OES_EGL_image_external:" << compileResources.OES_EGL_image_external - << ":OES_EGL_image_external_essl3:" << compileResources.OES_EGL_image_external_essl3 - << ":NV_EGL_stream_consumer_external:" << compileResources.NV_EGL_stream_consumer_external - << ":ARB_texture_rectangle:" << compileResources.ARB_texture_rectangle - << ":EXT_draw_buffers:" << compileResources.EXT_draw_buffers - << ":FragmentPrecisionHigh:" << compileResources.FragmentPrecisionHigh - << ":MaxExpressionComplexity:" << compileResources.MaxExpressionComplexity - << ":MaxCallStackDepth:" << compileResources.MaxCallStackDepth - << ":MaxFunctionParameters:" << compileResources.MaxFunctionParameters - << ":EXT_blend_func_extended:" << compileResources.EXT_blend_func_extended - << ":EXT_frag_depth:" << compileResources.EXT_frag_depth - << ":EXT_shader_texture_lod:" << compileResources.EXT_shader_texture_lod - << ":EXT_shader_framebuffer_fetch:" << compileResources.EXT_shader_framebuffer_fetch - << ":NV_shader_framebuffer_fetch:" << compileResources.NV_shader_framebuffer_fetch - << ":ARM_shader_framebuffer_fetch:" << compileResources.ARM_shader_framebuffer_fetch - << ":MaxVertexOutputVectors:" << compileResources.MaxVertexOutputVectors - << ":MaxFragmentInputVectors:" << compileResources.MaxFragmentInputVectors - << ":MinProgramTexelOffset:" << compileResources.MinProgramTexelOffset - << ":MaxProgramTexelOffset:" << compileResources.MaxProgramTexelOffset - << ":MaxDualSourceDrawBuffers:" << compileResources.MaxDualSourceDrawBuffers - << ":NV_draw_buffers:" << compileResources.NV_draw_buffers - << ":WEBGL_debug_shader_precision:" << compileResources.WEBGL_debug_shader_precision - << ":MaxImageUnits:" << compileResources.MaxImageUnits - << ":MaxVertexImageUniforms:" << compileResources.MaxVertexImageUniforms - << ":MaxFragmentImageUniforms:" << compileResources.MaxFragmentImageUniforms - << ":MaxComputeImageUniforms:" << compileResources.MaxComputeImageUniforms - << ":MaxCombinedImageUniforms:" << compileResources.MaxCombinedImageUniforms - << ":MaxCombinedShaderOutputResources:" << compileResources.MaxCombinedShaderOutputResources - << ":MaxComputeWorkGroupCountX:" << compileResources.MaxComputeWorkGroupCount[0] - << ":MaxComputeWorkGroupCountY:" << compileResources.MaxComputeWorkGroupCount[1] - << ":MaxComputeWorkGroupCountZ:" << compileResources.MaxComputeWorkGroupCount[2] - << ":MaxComputeWorkGroupSizeX:" << compileResources.MaxComputeWorkGroupSize[0] - << ":MaxComputeWorkGroupSizeY:" << compileResources.MaxComputeWorkGroupSize[1] - << ":MaxComputeWorkGroupSizeZ:" << compileResources.MaxComputeWorkGroupSize[2] - << ":MaxComputeUniformComponents:" << compileResources.MaxComputeUniformComponents - << ":MaxComputeTextureImageUnits:" << compileResources.MaxComputeTextureImageUnits - << ":MaxComputeAtomicCounters:" << compileResources.MaxComputeAtomicCounters - << ":MaxComputeAtomicCounterBuffers:" << compileResources.MaxComputeAtomicCounterBuffers - << ":MaxVertexAtomicCounters:" << compileResources.MaxVertexAtomicCounters - << ":MaxFragmentAtomicCounters:" << compileResources.MaxFragmentAtomicCounters - << ":MaxCombinedAtomicCounters:" << compileResources.MaxCombinedAtomicCounters - << ":MaxAtomicCounterBindings:" << compileResources.MaxAtomicCounterBindings - << ":MaxVertexAtomicCounterBuffers:" << compileResources.MaxVertexAtomicCounterBuffers - << ":MaxFragmentAtomicCounterBuffers:" << compileResources.MaxFragmentAtomicCounterBuffers - << ":MaxCombinedAtomicCounterBuffers:" << compileResources.MaxCombinedAtomicCounterBuffers - << ":MaxAtomicCounterBufferSize:" << compileResources.MaxAtomicCounterBufferSize; + << ":MaxVertexUniformVectors:" << compileResources.MaxVertexUniformVectors + << ":MaxVaryingVectors:" << compileResources.MaxVaryingVectors + << ":MaxVertexTextureImageUnits:" << compileResources.MaxVertexTextureImageUnits + << ":MaxCombinedTextureImageUnits:" << compileResources.MaxCombinedTextureImageUnits + << ":MaxTextureImageUnits:" << compileResources.MaxTextureImageUnits + << ":MaxFragmentUniformVectors:" << compileResources.MaxFragmentUniformVectors + << ":MaxDrawBuffers:" << compileResources.MaxDrawBuffers + << ":OES_standard_derivatives:" << compileResources.OES_standard_derivatives + << ":OES_EGL_image_external:" << compileResources.OES_EGL_image_external + << ":OES_EGL_image_external_essl3:" << compileResources.OES_EGL_image_external_essl3 + << ":NV_EGL_stream_consumer_external:" << compileResources.NV_EGL_stream_consumer_external + << ":ARB_texture_rectangle:" << compileResources.ARB_texture_rectangle + << ":EXT_draw_buffers:" << compileResources.EXT_draw_buffers + << ":FragmentPrecisionHigh:" << compileResources.FragmentPrecisionHigh + << ":MaxExpressionComplexity:" << compileResources.MaxExpressionComplexity + << ":MaxCallStackDepth:" << compileResources.MaxCallStackDepth + << ":MaxFunctionParameters:" << compileResources.MaxFunctionParameters + << ":EXT_blend_func_extended:" << compileResources.EXT_blend_func_extended + << ":EXT_frag_depth:" << compileResources.EXT_frag_depth + << ":EXT_shader_texture_lod:" << compileResources.EXT_shader_texture_lod + << ":EXT_shader_framebuffer_fetch:" << compileResources.EXT_shader_framebuffer_fetch + << ":NV_shader_framebuffer_fetch:" << compileResources.NV_shader_framebuffer_fetch + << ":ARM_shader_framebuffer_fetch:" << compileResources.ARM_shader_framebuffer_fetch + << ":MaxVertexOutputVectors:" << compileResources.MaxVertexOutputVectors + << ":MaxFragmentInputVectors:" << compileResources.MaxFragmentInputVectors + << ":MinProgramTexelOffset:" << compileResources.MinProgramTexelOffset + << ":MaxProgramTexelOffset:" << compileResources.MaxProgramTexelOffset + << ":MaxDualSourceDrawBuffers:" << compileResources.MaxDualSourceDrawBuffers + << ":NV_draw_buffers:" << compileResources.NV_draw_buffers + << ":WEBGL_debug_shader_precision:" << compileResources.WEBGL_debug_shader_precision + << ":MaxImageUnits:" << compileResources.MaxImageUnits + << ":MaxVertexImageUniforms:" << compileResources.MaxVertexImageUniforms + << ":MaxFragmentImageUniforms:" << compileResources.MaxFragmentImageUniforms + << ":MaxComputeImageUniforms:" << compileResources.MaxComputeImageUniforms + << ":MaxCombinedImageUniforms:" << compileResources.MaxCombinedImageUniforms + << ":MaxCombinedShaderOutputResources:" << compileResources.MaxCombinedShaderOutputResources + << ":MaxComputeWorkGroupCountX:" << compileResources.MaxComputeWorkGroupCount[0] + << ":MaxComputeWorkGroupCountY:" << compileResources.MaxComputeWorkGroupCount[1] + << ":MaxComputeWorkGroupCountZ:" << compileResources.MaxComputeWorkGroupCount[2] + << ":MaxComputeWorkGroupSizeX:" << compileResources.MaxComputeWorkGroupSize[0] + << ":MaxComputeWorkGroupSizeY:" << compileResources.MaxComputeWorkGroupSize[1] + << ":MaxComputeWorkGroupSizeZ:" << compileResources.MaxComputeWorkGroupSize[2] + << ":MaxComputeUniformComponents:" << compileResources.MaxComputeUniformComponents + << ":MaxComputeTextureImageUnits:" << compileResources.MaxComputeTextureImageUnits + << ":MaxComputeAtomicCounters:" << compileResources.MaxComputeAtomicCounters + << ":MaxComputeAtomicCounterBuffers:" << compileResources.MaxComputeAtomicCounterBuffers + << ":MaxVertexAtomicCounters:" << compileResources.MaxVertexAtomicCounters + << ":MaxFragmentAtomicCounters:" << compileResources.MaxFragmentAtomicCounters + << ":MaxCombinedAtomicCounters:" << compileResources.MaxCombinedAtomicCounters + << ":MaxAtomicCounterBindings:" << compileResources.MaxAtomicCounterBindings + << ":MaxVertexAtomicCounterBuffers:" << compileResources.MaxVertexAtomicCounterBuffers + << ":MaxFragmentAtomicCounterBuffers:" << compileResources.MaxFragmentAtomicCounterBuffers + << ":MaxCombinedAtomicCounterBuffers:" << compileResources.MaxCombinedAtomicCounterBuffers + << ":MaxAtomicCounterBufferSize:" << compileResources.MaxAtomicCounterBufferSize; // clang-format on builtInResourcesString = strstream.str(); @@ -687,16 +601,16 @@ bool TCompiler::initCallDag(TIntermNode *root) switch (mCallDag.init(root, &infoSink.info)) { - case CallDAG::INITDAG_SUCCESS: - return true; - case CallDAG::INITDAG_RECURSION: - infoSink.info.prefix(EPrefixError); - infoSink.info << "Function recursion detected"; - return false; - case CallDAG::INITDAG_UNDEFINED: - infoSink.info.prefix(EPrefixError); - infoSink.info << "Unimplemented function detected"; - return false; + case CallDAG::INITDAG_SUCCESS: + return true; + case CallDAG::INITDAG_RECURSION: + infoSink.info.prefix(EPrefixError); + infoSink.info << "Function recursion detected"; + return false; + case CallDAG::INITDAG_UNDEFINED: + infoSink.info.prefix(EPrefixError); + infoSink.info << "Unimplemented function detected"; + return false; } UNREACHABLE(); @@ -790,38 +704,30 @@ class TCompiler::UnusedPredicate { public: UnusedPredicate(const CallDAG *callDag, const std::vector *metadatas) - : mCallDag(callDag), mMetadatas(metadatas) + : mCallDag(callDag), + mMetadatas(metadatas) { } bool operator ()(TIntermNode *node) { const TIntermAggregate *asAggregate = node->getAsAggregate(); - const TIntermFunctionDefinition *asFunction = node->getAsFunctionDefinition(); - - const TFunctionSymbolInfo *functionInfo = nullptr; - if (asFunction) + if (asAggregate == nullptr) { - functionInfo = asFunction->getFunctionSymbolInfo(); - } - else if (asAggregate) - { - if (asAggregate->getOp() == EOpPrototype) - { - functionInfo = asAggregate->getFunctionSymbolInfo(); - } + return false; } - if (functionInfo == nullptr) + + if (!(asAggregate->getOp() == EOpFunction || asAggregate->getOp() == EOpPrototype)) { return false; } - size_t callDagIndex = mCallDag->findIndex(functionInfo); + size_t callDagIndex = mCallDag->findIndex(asAggregate); if (callDagIndex == CallDAG::InvalidIndex) { // This happens only for unimplemented prototypes which are thus unused - ASSERT(asAggregate && asAggregate->getOp() == EOpPrototype); + ASSERT(asAggregate->getOp() == EOpPrototype); return true; } @@ -834,10 +740,13 @@ class TCompiler::UnusedPredicate const std::vector *mMetadatas; }; -bool TCompiler::pruneUnusedFunctions(TIntermBlock *root) +bool TCompiler::pruneUnusedFunctions(TIntermNode *root) { + TIntermAggregate *rootNode = root->getAsAggregate(); + ASSERT(rootNode != nullptr); + UnusedPredicate isUnused(&mCallDag, &functionMetadata); - TIntermSequence *sequence = root->getSequence(); + TIntermSequence *sequence = rootNode->getSequence(); if (!sequence->empty()) { @@ -854,6 +763,12 @@ bool TCompiler::validateOutputs(TIntermNode* root) return (validateOutputs.validateAndCountErrors(infoSink.info) == 0); } +void TCompiler::rewriteCSSShader(TIntermNode* root) +{ + RenameFunction renamer("main(", "css_main("); + root->traverse(&renamer); +} + bool TCompiler::validateLimitations(TIntermNode* root) { ValidateLimitations validate(shaderType, &infoSink.info); @@ -861,9 +776,39 @@ bool TCompiler::validateLimitations(TIntermNode* root) return validate.numErrors() == 0; } +bool TCompiler::enforceTimingRestrictions(TIntermNode* root, bool outputGraph) +{ + if (shaderSpec != SH_WEBGL_SPEC) + { + infoSink.info << "Timing restrictions must be enforced under the WebGL spec."; + return false; + } + + if (shaderType == GL_FRAGMENT_SHADER) + { + TDependencyGraph graph(root); + + // Output any errors first. + bool success = enforceFragmentShaderTimingRestrictions(graph); + + // Then, output the dependency graph. + if (outputGraph) + { + TDependencyGraphOutput output(infoSink.info); + output.outputAllSpanningTrees(graph); + } + + return success; + } + else + { + return enforceVertexShaderTimingRestrictions(root); + } +} + bool TCompiler::limitExpressionComplexity(TIntermNode* root) { - TMaxDepthTraverser traverser(maxExpressionComplexity + 1); + TMaxDepthTraverser traverser(maxExpressionComplexity+1); root->traverse(&traverser); if (traverser.getMaxDepth() > maxExpressionComplexity) @@ -881,13 +826,26 @@ bool TCompiler::limitExpressionComplexity(TIntermNode* root) return true; } +bool TCompiler::enforceFragmentShaderTimingRestrictions(const TDependencyGraph& graph) +{ + RestrictFragmentShaderTiming restrictor(infoSink.info); + restrictor.enforceRestrictions(graph); + return restrictor.numErrors() == 0; +} + +bool TCompiler::enforceVertexShaderTimingRestrictions(TIntermNode* root) +{ + RestrictVertexShaderTiming restrictor(infoSink.info); + restrictor.enforceRestrictions(root); + return restrictor.numErrors() == 0; +} + void TCompiler::collectVariables(TIntermNode* root) { if (!variablesCollected) { sh::CollectVariables collect(&attributes, &outputVariables, &uniforms, &varyings, - &interfaceBlocks, hashFunction, symbolTable, - extensionBehavior); + &interfaceBlocks, hashFunction, symbolTable, extensionBehavior); root->traverse(&collect); // This is for enforcePackingRestriction(). @@ -896,16 +854,6 @@ void TCompiler::collectVariables(TIntermNode* root) } } -bool TCompiler::shouldCollectVariables(ShCompileOptions compileOptions) -{ - return (compileOptions & SH_VARIABLES) != 0; -} - -bool TCompiler::wereVariablesCollected() const -{ - return variablesCollected; -} - bool TCompiler::enforcePackingRestrictions() { VariablePacker packer; @@ -918,23 +866,7 @@ void TCompiler::initializeGLPosition(TIntermNode* root) sh::ShaderVariable var(GL_FLOAT_VEC4, 0); var.name = "gl_Position"; list.push_back(var); - InitializeVariables(root, list, symbolTable); -} - -void TCompiler::useAllMembersInUnusedStandardAndSharedBlocks(TIntermNode *root) -{ - sh::InterfaceBlockList list; - - for (auto block : interfaceBlocks) - { - if (!block.staticUse && - (block.layout == sh::BLOCKLAYOUT_STANDARD || block.layout == sh::BLOCKLAYOUT_SHARED)) - { - list.push_back(block); - } - } - - sh::UseInterfaceBlockFields(root, list, symbolTable); + InitializeVariables(root, list); } void TCompiler::initializeOutputVariables(TIntermNode *root) @@ -955,7 +887,7 @@ void TCompiler::initializeOutputVariables(TIntermNode *root) list.push_back(var); } } - InitializeVariables(root, list, symbolTable); + InitializeVariables(root, list); } const TExtensionBehavior& TCompiler::getExtensionBehavior() const @@ -988,7 +920,7 @@ const BuiltInFunctionEmulator& TCompiler::getBuiltInFunctionEmulator() const return builtInFunctionEmulator; } -void TCompiler::writePragma(ShCompileOptions compileOptions) +void TCompiler::writePragma(int compileOptions) { if (!(compileOptions & SH_FLATTEN_PRAGMA_STDGL_INVARIANT_ALL)) { @@ -1011,5 +943,3 @@ bool TCompiler::isVaryingDefined(const char *varyingName) return false; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/Compiler.h b/gfx/angle/src/compiler/translator/Compiler.h index 42b4f8f06..6b682374b 100755 --- a/gfx/angle/src/compiler/translator/Compiler.h +++ b/gfx/angle/src/compiler/translator/Compiler.h @@ -24,16 +24,15 @@ #include "compiler/translator/VariableInfo.h" #include "third_party/compiler/ArrayBoundsClamper.h" -namespace sh -{ - class TCompiler; +class TDependencyGraph; #ifdef ANGLE_ENABLE_HLSL class TranslatorHLSL; #endif // ANGLE_ENABLE_HLSL // -// Helper function to identify specs that are based on the WebGL spec. +// Helper function to identify specs that are based on the WebGL spec, +// like the CSS Shaders spec. // bool IsWebGLBasedSpec(ShShaderSpec spec); @@ -41,16 +40,6 @@ bool IsWebGLBasedSpec(ShShaderSpec spec); // Helper function to check if the shader type is GLSL. // bool IsGLSL130OrNewer(ShShaderOutput output); -bool IsGLSL420OrNewer(ShShaderOutput output); -bool IsGLSL410OrOlder(ShShaderOutput output); - -// -// Helper function to check if the invariant qualifier can be removed. -// -bool RemoveInvariant(sh::GLenum shaderType, - int shaderVersion, - ShShaderOutput outputType, - ShCompileOptions compileOptions); // // The base class used to back handles returned to the driver. @@ -85,14 +74,12 @@ class TCompiler : public TShHandleBase // compileTreeForTesting should be used only when tests require access to // the AST. Users of this function need to manually manage the global pool - // allocator. Returns nullptr whenever there are compilation errors. - TIntermBlock *compileTreeForTesting(const char *const shaderStrings[], - size_t numStrings, - ShCompileOptions compileOptions); + // allocator. Returns NULL whenever there are compilation errors. + TIntermNode *compileTreeForTesting(const char* const shaderStrings[], + size_t numStrings, int compileOptions); - bool compile(const char *const shaderStrings[], - size_t numStrings, - ShCompileOptions compileOptions); + bool compile(const char* const shaderStrings[], + size_t numStrings, int compileOptions); // Get results of the last compilation. int getShaderVersion() const { return shaderVersion; } @@ -117,7 +104,7 @@ class TCompiler : public TShHandleBase ShShaderOutput getOutputType() const { return outputType; } const std::string &getBuiltInResourcesString() const { return builtInResourcesString; } - bool shouldRunLoopAndIndexingValidation(ShCompileOptions compileOptions) const; + bool shouldRunLoopAndIndexingValidation(int compileOptions) const; // Get the resources set by InitBuiltInSymbolTable const ShBuiltInResources& getResources() const; @@ -132,21 +119,20 @@ class TCompiler : public TShHandleBase bool checkCallDepth(); // Returns true if a program has no conflicting or missing fragment outputs bool validateOutputs(TIntermNode* root); + // Rewrites a shader's intermediate tree according to the CSS Shaders spec. + void rewriteCSSShader(TIntermNode* root); // Returns true if the given shader does not exceed the minimum // functionality mandated in GLSL 1.0 spec Appendix A. bool validateLimitations(TIntermNode* root); + // Collect info for all attribs, uniforms, varyings. + void collectVariables(TIntermNode* root); // Add emulated functions to the built-in function emulator. - virtual void initBuiltInFunctionEmulator(BuiltInFunctionEmulator *emu, - ShCompileOptions compileOptions){}; + virtual void initBuiltInFunctionEmulator(BuiltInFunctionEmulator *emu, int compileOptions) {}; // Translate to object code. - virtual void translate(TIntermNode *root, ShCompileOptions compileOptions) = 0; + virtual void translate(TIntermNode *root, int compileOptions) = 0; // Returns true if, after applying the packing rules in the GLSL 1.017 spec // Appendix A, section 7, the shader does not use too many uniforms. bool enforcePackingRestrictions(); - // Insert statements to reference all members in unused uniform blocks with standard and shared - // layout. This is to work around a Mac driver that treats unused standard/shared - // uniform blocks as inactive. - void useAllMembersInUnusedStandardAndSharedBlocks(TIntermNode *root); // Insert statements to initialize output variables in the beginning of main(). // This is to avoid undefined behaviors. void initializeOutputVariables(TIntermNode *root); @@ -155,13 +141,20 @@ class TCompiler : public TShHandleBase // while spec says it is allowed. // This function should only be applied to vertex shaders. void initializeGLPosition(TIntermNode* root); + // Returns true if the shader passes the restrictions that aim to prevent timing attacks. + bool enforceTimingRestrictions(TIntermNode* root, bool outputGraph); + // Returns true if the shader does not use samplers. + bool enforceVertexShaderTimingRestrictions(TIntermNode* root); + // Returns true if the shader does not use sampler dependent values to affect control + // flow or in operations whose time can depend on the input values. + bool enforceFragmentShaderTimingRestrictions(const TDependencyGraph& graph); // Return true if the maximum expression complexity is below the limit. bool limitExpressionComplexity(TIntermNode* root); // Get built-in extensions with default behavior. const TExtensionBehavior& getExtensionBehavior() const; const char *getSourcePath() const; const TPragma& getPragma() const { return mPragma; } - void writePragma(ShCompileOptions compileOptions); + void writePragma(int compileOptions); unsigned int *getTemporaryIndex() { return &mTemporaryIndex; } // Relies on collectVariables having been called. bool isVaryingDefined(const char *varyingName); @@ -170,16 +163,20 @@ class TCompiler : public TShHandleBase ShArrayIndexClampingStrategy getArrayIndexClampingStrategy() const; const BuiltInFunctionEmulator& getBuiltInFunctionEmulator() const; + virtual bool shouldCollectVariables(int compileOptions) + { + return (compileOptions & SH_VARIABLES) != 0; + } + virtual bool shouldFlattenPragmaStdglInvariantAll() = 0; - virtual bool shouldCollectVariables(ShCompileOptions compileOptions); - bool wereVariablesCollected() const; std::vector attributes; std::vector outputVariables; std::vector uniforms; std::vector expandedUniforms; std::vector varyings; std::vector interfaceBlocks; + bool variablesCollected; private: // Creates the function call DAG for further analysis, returning false if there is a recursion @@ -190,18 +187,13 @@ class TCompiler : public TShHandleBase void initSamplerDefaultPrecision(TBasicType samplerType); - // Collect info for all attribs, uniforms, varyings. - void collectVariables(TIntermNode *root); - - bool variablesCollected; - // Removes unused function declarations and prototypes from the AST class UnusedPredicate; - bool pruneUnusedFunctions(TIntermBlock *root); + bool pruneUnusedFunctions(TIntermNode *root); - TIntermBlock *compileTreeImpl(const char *const shaderStrings[], - size_t numStrings, - const ShCompileOptions compileOptions); + TIntermNode *compileTreeImpl(const char *const shaderStrings[], + size_t numStrings, + const int compileOptions); sh::GLenum shaderType; ShShaderSpec shaderSpec; @@ -269,6 +261,4 @@ TCompiler* ConstructCompiler( sh::GLenum type, ShShaderSpec spec, ShShaderOutput output); void DeleteCompiler(TCompiler*); -} // namespace sh - #endif // COMPILER_TRANSLATOR_COMPILER_H_ diff --git a/gfx/angle/src/compiler/translator/ConstantUnion.cpp b/gfx/angle/src/compiler/translator/ConstantUnion.cpp deleted file mode 100644 index 66f444b0b..000000000 --- a/gfx/angle/src/compiler/translator/ConstantUnion.cpp +++ /dev/null @@ -1,642 +0,0 @@ -// -// Copyright 2016 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. -// -// ConstantUnion: Constant folding helper class. - -#include "compiler/translator/ConstantUnion.h" - -#include "base/numerics/safe_math.h" -#include "common/mathutil.h" -#include "compiler/translator/Diagnostics.h" - -namespace sh -{ - -namespace -{ - -template -T CheckedSum(base::CheckedNumeric lhs, - base::CheckedNumeric rhs, - TDiagnostics *diag, - const TSourceLoc &line) -{ - ASSERT(lhs.IsValid() && rhs.IsValid()); - auto result = lhs + rhs; - if (!result.IsValid()) - { - diag->error(line, "Addition out of range", "*", ""); - return 0; - } - return result.ValueOrDefault(0); -} - -template -T CheckedDiff(base::CheckedNumeric lhs, - base::CheckedNumeric rhs, - TDiagnostics *diag, - const TSourceLoc &line) -{ - ASSERT(lhs.IsValid() && rhs.IsValid()); - auto result = lhs - rhs; - if (!result.IsValid()) - { - diag->error(line, "Difference out of range", "*", ""); - return 0; - } - return result.ValueOrDefault(0); -} - -template -T CheckedMul(base::CheckedNumeric lhs, - base::CheckedNumeric rhs, - TDiagnostics *diag, - const TSourceLoc &line) -{ - ASSERT(lhs.IsValid() && rhs.IsValid()); - auto result = lhs * rhs; - if (!result.IsValid()) - { - diag->error(line, "Multiplication out of range", "*", ""); - return 0; - } - return result.ValueOrDefault(0); -} - -} // anonymous namespace - -TConstantUnion::TConstantUnion() -{ - iConst = 0; - type = EbtVoid; -} - -bool TConstantUnion::cast(TBasicType newType, const TConstantUnion &constant) -{ - switch (newType) - { - case EbtFloat: - switch (constant.type) - { - case EbtInt: - setFConst(static_cast(constant.getIConst())); - break; - case EbtUInt: - setFConst(static_cast(constant.getUConst())); - break; - case EbtBool: - setFConst(static_cast(constant.getBConst())); - break; - case EbtFloat: - setFConst(static_cast(constant.getFConst())); - break; - default: - return false; - } - break; - case EbtInt: - switch (constant.type) - { - case EbtInt: - setIConst(static_cast(constant.getIConst())); - break; - case EbtUInt: - setIConst(static_cast(constant.getUConst())); - break; - case EbtBool: - setIConst(static_cast(constant.getBConst())); - break; - case EbtFloat: - setIConst(static_cast(constant.getFConst())); - break; - default: - return false; - } - break; - case EbtUInt: - switch (constant.type) - { - case EbtInt: - setUConst(static_cast(constant.getIConst())); - break; - case EbtUInt: - setUConst(static_cast(constant.getUConst())); - break; - case EbtBool: - setUConst(static_cast(constant.getBConst())); - break; - case EbtFloat: - setUConst(static_cast(constant.getFConst())); - break; - default: - return false; - } - break; - case EbtBool: - switch (constant.type) - { - case EbtInt: - setBConst(constant.getIConst() != 0); - break; - case EbtUInt: - setBConst(constant.getUConst() != 0); - break; - case EbtBool: - setBConst(constant.getBConst()); - break; - case EbtFloat: - setBConst(constant.getFConst() != 0.0f); - break; - default: - return false; - } - break; - case EbtStruct: // Struct fields don't get cast - switch (constant.type) - { - case EbtInt: - setIConst(constant.getIConst()); - break; - case EbtUInt: - setUConst(constant.getUConst()); - break; - case EbtBool: - setBConst(constant.getBConst()); - break; - case EbtFloat: - setFConst(constant.getFConst()); - break; - default: - return false; - } - break; - default: - return false; - } - - return true; -} - -bool TConstantUnion::operator==(const int i) const -{ - return i == iConst; -} - -bool TConstantUnion::operator==(const unsigned int u) const -{ - return u == uConst; -} - -bool TConstantUnion::operator==(const float f) const -{ - return f == fConst; -} - -bool TConstantUnion::operator==(const bool b) const -{ - return b == bConst; -} - -bool TConstantUnion::operator==(const TConstantUnion &constant) const -{ - if (constant.type != type) - return false; - - switch (type) - { - case EbtInt: - return constant.iConst == iConst; - case EbtUInt: - return constant.uConst == uConst; - case EbtFloat: - return constant.fConst == fConst; - case EbtBool: - return constant.bConst == bConst; - default: - return false; - } -} - -bool TConstantUnion::operator!=(const int i) const -{ - return !operator==(i); -} - -bool TConstantUnion::operator!=(const unsigned int u) const -{ - return !operator==(u); -} - -bool TConstantUnion::operator!=(const float f) const -{ - return !operator==(f); -} - -bool TConstantUnion::operator!=(const bool b) const -{ - return !operator==(b); -} - -bool TConstantUnion::operator!=(const TConstantUnion &constant) const -{ - return !operator==(constant); -} - -bool TConstantUnion::operator>(const TConstantUnion &constant) const -{ - ASSERT(type == constant.type); - switch (type) - { - case EbtInt: - return iConst > constant.iConst; - case EbtUInt: - return uConst > constant.uConst; - case EbtFloat: - return fConst > constant.fConst; - default: - return false; // Invalid operation, handled at semantic analysis - } -} - -bool TConstantUnion::operator<(const TConstantUnion &constant) const -{ - ASSERT(type == constant.type); - switch (type) - { - case EbtInt: - return iConst < constant.iConst; - case EbtUInt: - return uConst < constant.uConst; - case EbtFloat: - return fConst < constant.fConst; - default: - return false; // Invalid operation, handled at semantic analysis - } -} - -// static -TConstantUnion TConstantUnion::add(const TConstantUnion &lhs, - const TConstantUnion &rhs, - TDiagnostics *diag, - const TSourceLoc &line) -{ - TConstantUnion returnValue; - ASSERT(lhs.type == rhs.type); - switch (lhs.type) - { - case EbtInt: - returnValue.setIConst(gl::WrappingSum(lhs.iConst, rhs.iConst)); - break; - case EbtUInt: - returnValue.setUConst(gl::WrappingSum(lhs.uConst, rhs.uConst)); - break; - case EbtFloat: - returnValue.setFConst(CheckedSum(lhs.fConst, rhs.fConst, diag, line)); - break; - default: - UNREACHABLE(); - } - - return returnValue; -} - -// static -TConstantUnion TConstantUnion::sub(const TConstantUnion &lhs, - const TConstantUnion &rhs, - TDiagnostics *diag, - const TSourceLoc &line) -{ - TConstantUnion returnValue; - ASSERT(lhs.type == rhs.type); - switch (lhs.type) - { - case EbtInt: - returnValue.setIConst(gl::WrappingDiff(lhs.iConst, rhs.iConst)); - break; - case EbtUInt: - returnValue.setUConst(gl::WrappingDiff(lhs.uConst, rhs.uConst)); - break; - case EbtFloat: - returnValue.setFConst(CheckedDiff(lhs.fConst, rhs.fConst, diag, line)); - break; - default: - UNREACHABLE(); - } - - return returnValue; -} - -// static -TConstantUnion TConstantUnion::mul(const TConstantUnion &lhs, - const TConstantUnion &rhs, - TDiagnostics *diag, - const TSourceLoc &line) -{ - TConstantUnion returnValue; - ASSERT(lhs.type == rhs.type); - switch (lhs.type) - { - case EbtInt: - returnValue.setIConst(gl::WrappingMul(lhs.iConst, rhs.iConst)); - break; - case EbtUInt: - // Unsigned integer math in C++ is defined to be done in modulo 2^n, so we rely on that - // to implement wrapping multiplication. - returnValue.setUConst(lhs.uConst * rhs.uConst); - break; - case EbtFloat: - returnValue.setFConst(CheckedMul(lhs.fConst, rhs.fConst, diag, line)); - break; - default: - UNREACHABLE(); - } - - return returnValue; -} - -TConstantUnion TConstantUnion::operator%(const TConstantUnion &constant) const -{ - TConstantUnion returnValue; - ASSERT(type == constant.type); - switch (type) - { - case EbtInt: - returnValue.setIConst(iConst % constant.iConst); - break; - case EbtUInt: - returnValue.setUConst(uConst % constant.uConst); - break; - default: - UNREACHABLE(); - } - - return returnValue; -} - -// static -TConstantUnion TConstantUnion::rshift(const TConstantUnion &lhs, - const TConstantUnion &rhs, - TDiagnostics *diag, - const TSourceLoc &line) -{ - TConstantUnion returnValue; - ASSERT(lhs.type == EbtInt || lhs.type == EbtUInt); - ASSERT(rhs.type == EbtInt || rhs.type == EbtUInt); - if ((rhs.type == EbtInt && (rhs.iConst < 0 || rhs.iConst > 31)) || - (rhs.type == EbtUInt && rhs.uConst > 31u)) - { - diag->error(line, "Undefined shift (operand out of range)", ">>", ""); - switch (lhs.type) - { - case EbtInt: - returnValue.setIConst(0); - break; - case EbtUInt: - returnValue.setUConst(0u); - break; - default: - UNREACHABLE(); - } - return returnValue; - } - - switch (lhs.type) - { - case EbtInt: - { - unsigned int shiftOffset = 0; - switch (rhs.type) - { - case EbtInt: - shiftOffset = static_cast(rhs.iConst); - break; - case EbtUInt: - shiftOffset = rhs.uConst; - break; - default: - UNREACHABLE(); - } - if (shiftOffset > 0) - { - // ESSL 3.00.6 section 5.9: "If E1 is a signed integer, the right-shift will extend - // the sign bit." In C++ shifting negative integers is undefined, so we implement - // extending the sign bit manually. - int lhsSafe = lhs.iConst; - if (lhsSafe == std::numeric_limits::min()) - { - // The min integer needs special treatment because only bit it has set is the - // sign bit, which we clear later to implement safe right shift of negative - // numbers. - lhsSafe = -0x40000000; - --shiftOffset; - } - if (shiftOffset > 0) - { - bool extendSignBit = false; - if (lhsSafe < 0) - { - extendSignBit = true; - // Clear the sign bit so that bitshift right is defined in C++. - lhsSafe &= 0x7fffffff; - ASSERT(lhsSafe > 0); - } - returnValue.setIConst(lhsSafe >> shiftOffset); - - // Manually fill in the extended sign bit if necessary. - if (extendSignBit) - { - int extendedSignBit = static_cast(0xffffffffu << (31 - shiftOffset)); - returnValue.setIConst(returnValue.getIConst() | extendedSignBit); - } - } - else - { - returnValue.setIConst(lhsSafe); - } - } - else - { - returnValue.setIConst(lhs.iConst); - } - break; - } - case EbtUInt: - switch (rhs.type) - { - case EbtInt: - returnValue.setUConst(lhs.uConst >> rhs.iConst); - break; - case EbtUInt: - returnValue.setUConst(lhs.uConst >> rhs.uConst); - break; - default: - UNREACHABLE(); - } - break; - - default: - UNREACHABLE(); - } - return returnValue; -} - -// static -TConstantUnion TConstantUnion::lshift(const TConstantUnion &lhs, - const TConstantUnion &rhs, - TDiagnostics *diag, - const TSourceLoc &line) -{ - TConstantUnion returnValue; - ASSERT(lhs.type == EbtInt || lhs.type == EbtUInt); - ASSERT(rhs.type == EbtInt || rhs.type == EbtUInt); - if ((rhs.type == EbtInt && (rhs.iConst < 0 || rhs.iConst > 31)) || - (rhs.type == EbtUInt && rhs.uConst > 31u)) - { - diag->error(line, "Undefined shift (operand out of range)", "<<", ""); - switch (lhs.type) - { - case EbtInt: - returnValue.setIConst(0); - break; - case EbtUInt: - returnValue.setUConst(0u); - break; - default: - UNREACHABLE(); - } - return returnValue; - } - - switch (lhs.type) - { - case EbtInt: - switch (rhs.type) - { - // Cast to unsigned integer before shifting, since ESSL 3.00.6 section 5.9 says that - // lhs is "interpreted as a bit pattern". This also avoids the possibility of signed - // integer overflow or undefined shift of a negative integer. - case EbtInt: - returnValue.setIConst( - static_cast(static_cast(lhs.iConst) << rhs.iConst)); - break; - case EbtUInt: - returnValue.setIConst( - static_cast(static_cast(lhs.iConst) << rhs.uConst)); - break; - default: - UNREACHABLE(); - } - break; - - case EbtUInt: - switch (rhs.type) - { - case EbtInt: - returnValue.setUConst(lhs.uConst << rhs.iConst); - break; - case EbtUInt: - returnValue.setUConst(lhs.uConst << rhs.uConst); - break; - default: - UNREACHABLE(); - } - break; - - default: - UNREACHABLE(); - } - return returnValue; -} - -TConstantUnion TConstantUnion::operator&(const TConstantUnion &constant) const -{ - TConstantUnion returnValue; - ASSERT(constant.type == EbtInt || constant.type == EbtUInt); - switch (type) - { - case EbtInt: - returnValue.setIConst(iConst & constant.iConst); - break; - case EbtUInt: - returnValue.setUConst(uConst & constant.uConst); - break; - default: - UNREACHABLE(); - } - - return returnValue; -} - -TConstantUnion TConstantUnion::operator|(const TConstantUnion &constant) const -{ - TConstantUnion returnValue; - ASSERT(type == constant.type); - switch (type) - { - case EbtInt: - returnValue.setIConst(iConst | constant.iConst); - break; - case EbtUInt: - returnValue.setUConst(uConst | constant.uConst); - break; - default: - UNREACHABLE(); - } - - return returnValue; -} - -TConstantUnion TConstantUnion::operator^(const TConstantUnion &constant) const -{ - TConstantUnion returnValue; - ASSERT(type == constant.type); - switch (type) - { - case EbtInt: - returnValue.setIConst(iConst ^ constant.iConst); - break; - case EbtUInt: - returnValue.setUConst(uConst ^ constant.uConst); - break; - default: - UNREACHABLE(); - } - - return returnValue; -} - -TConstantUnion TConstantUnion::operator&&(const TConstantUnion &constant) const -{ - TConstantUnion returnValue; - ASSERT(type == constant.type); - switch (type) - { - case EbtBool: - returnValue.setBConst(bConst && constant.bConst); - break; - default: - UNREACHABLE(); - } - - return returnValue; -} - -TConstantUnion TConstantUnion::operator||(const TConstantUnion &constant) const -{ - TConstantUnion returnValue; - ASSERT(type == constant.type); - switch (type) - { - case EbtBool: - returnValue.setBConst(bConst || constant.bConst); - break; - default: - UNREACHABLE(); - } - - return returnValue; -} - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/ConstantUnion.h b/gfx/angle/src/compiler/translator/ConstantUnion.h index f6222ce5a..a86d27f3f 100755 --- a/gfx/angle/src/compiler/translator/ConstantUnion.h +++ b/gfx/angle/src/compiler/translator/ConstantUnion.h @@ -9,21 +9,77 @@ #include -#include "compiler/translator/Common.h" #include "compiler/translator/BaseTypes.h" -namespace sh -{ - -class TDiagnostics; - -class TConstantUnion -{ - public: +class TConstantUnion { +public: POOL_ALLOCATOR_NEW_DELETE(); - TConstantUnion(); + TConstantUnion() + { + iConst = 0; + type = EbtVoid; + } + + bool cast(TBasicType newType, const TConstantUnion &constant) + { + switch (newType) + { + case EbtFloat: + switch (constant.type) + { + case EbtInt: setFConst(static_cast(constant.getIConst())); break; + case EbtUInt: setFConst(static_cast(constant.getUConst())); break; + case EbtBool: setFConst(static_cast(constant.getBConst())); break; + case EbtFloat: setFConst(static_cast(constant.getFConst())); break; + default: return false; + } + break; + case EbtInt: + switch (constant.type) + { + case EbtInt: setIConst(static_cast(constant.getIConst())); break; + case EbtUInt: setIConst(static_cast(constant.getUConst())); break; + case EbtBool: setIConst(static_cast(constant.getBConst())); break; + case EbtFloat: setIConst(static_cast(constant.getFConst())); break; + default: return false; + } + break; + case EbtUInt: + switch (constant.type) + { + case EbtInt: setUConst(static_cast(constant.getIConst())); break; + case EbtUInt: setUConst(static_cast(constant.getUConst())); break; + case EbtBool: setUConst(static_cast(constant.getBConst())); break; + case EbtFloat: setUConst(static_cast(constant.getFConst())); break; + default: return false; + } + break; + case EbtBool: + switch (constant.type) + { + case EbtInt: setBConst(constant.getIConst() != 0); break; + case EbtUInt: setBConst(constant.getUConst() != 0); break; + case EbtBool: setBConst(constant.getBConst()); break; + case EbtFloat: setBConst(constant.getFConst() != 0.0f); break; + default: return false; + } + break; + case EbtStruct: // Struct fields don't get cast + switch (constant.type) + { + case EbtInt: setIConst(constant.getIConst()); break; + case EbtUInt: setUConst(constant.getUConst()); break; + case EbtBool: setBConst(constant.getBConst()); break; + case EbtFloat: setFConst(constant.getFConst()); break; + default: return false; + } + break; + default: + return false; + } - bool cast(TBasicType newType, const TConstantUnion &constant); + return true; + } void setIConst(int i) {iConst = i; type = EbtInt; } void setUConst(unsigned int u) { uConst = u; type = EbtUInt; } @@ -35,57 +91,258 @@ class TConstantUnion float getFConst() const { return fConst; } bool getBConst() const { return bConst; } - bool operator==(const int i) const; - bool operator==(const unsigned int u) const; - bool operator==(const float f) const; - bool operator==(const bool b) const; - bool operator==(const TConstantUnion &constant) const; - bool operator!=(const int i) const; - bool operator!=(const unsigned int u) const; - bool operator!=(const float f) const; - bool operator!=(const bool b) const; - bool operator!=(const TConstantUnion &constant) const; - bool operator>(const TConstantUnion &constant) const; - bool operator<(const TConstantUnion &constant) const; - static TConstantUnion add(const TConstantUnion &lhs, - const TConstantUnion &rhs, - TDiagnostics *diag, - const TSourceLoc &line); - static TConstantUnion sub(const TConstantUnion &lhs, - const TConstantUnion &rhs, - TDiagnostics *diag, - const TSourceLoc &line); - static TConstantUnion mul(const TConstantUnion &lhs, - const TConstantUnion &rhs, - TDiagnostics *diag, - const TSourceLoc &line); - TConstantUnion operator%(const TConstantUnion &constant) const; - static TConstantUnion rshift(const TConstantUnion &lhs, - const TConstantUnion &rhs, - TDiagnostics *diag, - const TSourceLoc &line); - static TConstantUnion lshift(const TConstantUnion &lhs, - const TConstantUnion &rhs, - TDiagnostics *diag, - const TSourceLoc &line); - TConstantUnion operator&(const TConstantUnion &constant) const; - TConstantUnion operator|(const TConstantUnion &constant) const; - TConstantUnion operator^(const TConstantUnion &constant) const; - TConstantUnion operator&&(const TConstantUnion &constant) const; - TConstantUnion operator||(const TConstantUnion &constant) const; + bool operator==(const int i) const + { + return i == iConst; + } + + bool operator==(const unsigned int u) const + { + return u == uConst; + } + + bool operator==(const float f) const + { + return f == fConst; + } + + bool operator==(const bool b) const + { + return b == bConst; + } + + bool operator==(const TConstantUnion& constant) const + { + if (constant.type != type) + return false; + + switch (type) { + case EbtInt: + return constant.iConst == iConst; + case EbtUInt: + return constant.uConst == uConst; + case EbtFloat: + return constant.fConst == fConst; + case EbtBool: + return constant.bConst == bConst; + default: + return false; + } + } + + bool operator!=(const int i) const + { + return !operator==(i); + } + + bool operator!=(const unsigned int u) const + { + return !operator==(u); + } + + bool operator!=(const float f) const + { + return !operator==(f); + } + + bool operator!=(const bool b) const + { + return !operator==(b); + } + + bool operator!=(const TConstantUnion& constant) const + { + return !operator==(constant); + } + + bool operator>(const TConstantUnion& constant) const + { + assert(type == constant.type); + switch (type) { + case EbtInt: + return iConst > constant.iConst; + case EbtUInt: + return uConst > constant.uConst; + case EbtFloat: + return fConst > constant.fConst; + default: + return false; // Invalid operation, handled at semantic analysis + } + } + + bool operator<(const TConstantUnion& constant) const + { + assert(type == constant.type); + switch (type) { + case EbtInt: + return iConst < constant.iConst; + case EbtUInt: + return uConst < constant.uConst; + case EbtFloat: + return fConst < constant.fConst; + default: + return false; // Invalid operation, handled at semantic analysis + } + } + + TConstantUnion operator+(const TConstantUnion& constant) const + { + TConstantUnion returnValue; + assert(type == constant.type); + switch (type) { + case EbtInt: returnValue.setIConst(iConst + constant.iConst); break; + case EbtUInt: returnValue.setUConst(uConst + constant.uConst); break; + case EbtFloat: returnValue.setFConst(fConst + constant.fConst); break; + default: assert(false && "Default missing"); + } + + return returnValue; + } + + TConstantUnion operator-(const TConstantUnion& constant) const + { + TConstantUnion returnValue; + assert(type == constant.type); + switch (type) { + case EbtInt: returnValue.setIConst(iConst - constant.iConst); break; + case EbtUInt: returnValue.setUConst(uConst - constant.uConst); break; + case EbtFloat: returnValue.setFConst(fConst - constant.fConst); break; + default: assert(false && "Default missing"); + } + + return returnValue; + } + + TConstantUnion operator*(const TConstantUnion& constant) const + { + TConstantUnion returnValue; + assert(type == constant.type); + switch (type) { + case EbtInt: returnValue.setIConst(iConst * constant.iConst); break; + case EbtUInt: returnValue.setUConst(uConst * constant.uConst); break; + case EbtFloat: returnValue.setFConst(fConst * constant.fConst); break; + default: assert(false && "Default missing"); + } + + return returnValue; + } + + TConstantUnion operator%(const TConstantUnion& constant) const + { + TConstantUnion returnValue; + assert(type == constant.type); + switch (type) { + case EbtInt: returnValue.setIConst(iConst % constant.iConst); break; + case EbtUInt: returnValue.setUConst(uConst % constant.uConst); break; + default: assert(false && "Default missing"); + } + + return returnValue; + } + + TConstantUnion operator>>(const TConstantUnion& constant) const + { + TConstantUnion returnValue; + assert(type == constant.type); + switch (type) { + case EbtInt: returnValue.setIConst(iConst >> constant.iConst); break; + case EbtUInt: returnValue.setUConst(uConst >> constant.uConst); break; + default: assert(false && "Default missing"); + } + + return returnValue; + } + + TConstantUnion operator<<(const TConstantUnion& constant) const + { + TConstantUnion returnValue; + // The signedness of the second parameter might be different, but we + // don't care, since the result is undefined if the second parameter is + // negative, and aliasing should not be a problem with unions. + assert(constant.type == EbtInt || constant.type == EbtUInt); + switch (type) { + case EbtInt: returnValue.setIConst(iConst << constant.iConst); break; + case EbtUInt: returnValue.setUConst(uConst << constant.uConst); break; + default: assert(false && "Default missing"); + } + + return returnValue; + } + + TConstantUnion operator&(const TConstantUnion& constant) const + { + TConstantUnion returnValue; + assert(constant.type == EbtInt || constant.type == EbtUInt); + switch (type) { + case EbtInt: returnValue.setIConst(iConst & constant.iConst); break; + case EbtUInt: returnValue.setUConst(uConst & constant.uConst); break; + default: assert(false && "Default missing"); + } + + return returnValue; + } + + TConstantUnion operator|(const TConstantUnion& constant) const + { + TConstantUnion returnValue; + assert(type == constant.type); + switch (type) { + case EbtInt: returnValue.setIConst(iConst | constant.iConst); break; + case EbtUInt: returnValue.setUConst(uConst | constant.uConst); break; + default: assert(false && "Default missing"); + } + + return returnValue; + } + + TConstantUnion operator^(const TConstantUnion& constant) const + { + TConstantUnion returnValue; + assert(type == constant.type); + switch (type) { + case EbtInt: returnValue.setIConst(iConst ^ constant.iConst); break; + case EbtUInt: returnValue.setUConst(uConst ^ constant.uConst); break; + default: assert(false && "Default missing"); + } + + return returnValue; + } + + TConstantUnion operator&&(const TConstantUnion& constant) const + { + TConstantUnion returnValue; + assert(type == constant.type); + switch (type) { + case EbtBool: returnValue.setBConst(bConst && constant.bConst); break; + default: assert(false && "Default missing"); + } + + return returnValue; + } + + TConstantUnion operator||(const TConstantUnion& constant) const + { + TConstantUnion returnValue; + assert(type == constant.type); + switch (type) { + case EbtBool: returnValue.setBConst(bConst || constant.bConst); break; + default: assert(false && "Default missing"); + } + + return returnValue; + } TBasicType getType() const { return type; } - private: - union { - int iConst; // used for ivec, scalar ints - unsigned int uConst; // used for uvec, scalar uints - bool bConst; // used for bvec, scalar bools - float fConst; // used for vec, mat, scalar floats - }; +private: + + union { + int iConst; // used for ivec, scalar ints + unsigned int uConst; // used for uvec, scalar uints + bool bConst; // used for bvec, scalar bools + float fConst; // used for vec, mat, scalar floats + } ; TBasicType type; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_CONSTANTUNION_H_ diff --git a/gfx/angle/src/compiler/translator/DeferGlobalInitializers.cpp b/gfx/angle/src/compiler/translator/DeferGlobalInitializers.cpp index 1c58562fc..76addf293 100755 --- a/gfx/angle/src/compiler/translator/DeferGlobalInitializers.cpp +++ b/gfx/angle/src/compiler/translator/DeferGlobalInitializers.cpp @@ -15,43 +15,42 @@ #include "compiler/translator/IntermNode.h" #include "compiler/translator/SymbolTable.h" -namespace sh -{ - namespace { -void SetInternalFunctionName(TFunctionSymbolInfo *functionInfo, const char *name) +void SetInternalFunctionName(TIntermAggregate *functionNode, const char *name) { TString nameStr(name); nameStr = TFunction::mangleName(nameStr); TName nameObj(nameStr); nameObj.setInternal(true); - functionInfo->setNameObj(nameObj); + functionNode->setNameObj(nameObj); } TIntermAggregate *CreateFunctionPrototypeNode(const char *name, const int functionId) { TIntermAggregate *functionNode = new TIntermAggregate(EOpPrototype); - SetInternalFunctionName(functionNode->getFunctionSymbolInfo(), name); + SetInternalFunctionName(functionNode, name); TType returnType(EbtVoid); functionNode->setType(returnType); - functionNode->getFunctionSymbolInfo()->setId(functionId); + functionNode->setFunctionId(functionId); return functionNode; } -TIntermFunctionDefinition *CreateFunctionDefinitionNode(const char *name, - TIntermBlock *functionBody, - const int functionId) +TIntermAggregate *CreateFunctionDefinitionNode(const char *name, + TIntermAggregate *functionBody, + const int functionId) { - TType returnType(EbtVoid); + TIntermAggregate *functionNode = new TIntermAggregate(EOpFunction); TIntermAggregate *paramsNode = new TIntermAggregate(EOpParameters); - TIntermFunctionDefinition *functionNode = - new TIntermFunctionDefinition(returnType, paramsNode, functionBody); + functionNode->getSequence()->push_back(paramsNode); + functionNode->getSequence()->push_back(functionBody); - SetInternalFunctionName(functionNode->getFunctionSymbolInfo(), name); - functionNode->getFunctionSymbolInfo()->setId(functionId); + SetInternalFunctionName(functionNode, name); + TType returnType(EbtVoid); + functionNode->setType(returnType); + functionNode->setFunctionId(functionId); return functionNode; } @@ -60,10 +59,10 @@ TIntermAggregate *CreateFunctionCallNode(const char *name, const int functionId) TIntermAggregate *functionNode = new TIntermAggregate(EOpFunctionCall); functionNode->setUserDefined(); - SetInternalFunctionName(functionNode->getFunctionSymbolInfo(), name); + SetInternalFunctionName(functionNode, name); TType returnType(EbtVoid); functionNode->setType(returnType); - functionNode->getFunctionSymbolInfo()->setId(functionId); + functionNode->setFunctionId(functionId); return functionNode; } @@ -74,7 +73,7 @@ class DeferGlobalInitializersTraverser : public TIntermTraverser bool visitBinary(Visit visit, TIntermBinary *node) override; - void insertInitFunction(TIntermBlock *root); + void insertInitFunction(TIntermNode *root); private: TIntermSequence mDeferredInitializers; @@ -102,8 +101,10 @@ bool DeferGlobalInitializersTraverser::visitBinary(Visit visit, TIntermBinary *n // Deferral is done also in any cases where the variable has not been constant folded, // since otherwise there's a chance that HLSL output will generate extra statements // from the initializer expression. - TIntermBinary *deferredInit = - new TIntermBinary(EOpAssign, symbolNode->deepCopy(), node->getRight()); + TIntermBinary *deferredInit = new TIntermBinary(EOpAssign); + deferredInit->setLeft(symbolNode->deepCopy()); + deferredInit->setRight(node->getRight()); + deferredInit->setType(node->getType()); mDeferredInitializers.push_back(deferredInit); // Change const global to a regular global if its initialization is deferred. @@ -114,7 +115,7 @@ bool DeferGlobalInitializersTraverser::visitBinary(Visit visit, TIntermBinary *n if (symbolNode->getQualifier() == EvqConst) { // All of the siblings in the same declaration need to have consistent qualifiers. - auto *siblings = getParentNode()->getAsDeclarationNode()->getSequence(); + auto *siblings = getParentNode()->getAsAggregate()->getSequence(); for (TIntermNode *siblingNode : *siblings) { TIntermBinary *siblingBinary = siblingNode->getAsBinaryNode(); @@ -135,51 +136,56 @@ bool DeferGlobalInitializersTraverser::visitBinary(Visit visit, TIntermBinary *n return false; } -void DeferGlobalInitializersTraverser::insertInitFunction(TIntermBlock *root) +void DeferGlobalInitializersTraverser::insertInitFunction(TIntermNode *root) { if (mDeferredInitializers.empty()) { return; } const int initFunctionId = TSymbolTable::nextUniqueId(); + TIntermAggregate *rootAgg = root->getAsAggregate(); + ASSERT(rootAgg != nullptr && rootAgg->getOp() == EOpSequence); const char *functionName = "initializeDeferredGlobals"; // Add function prototype to the beginning of the shader TIntermAggregate *functionPrototypeNode = CreateFunctionPrototypeNode(functionName, initFunctionId); - root->getSequence()->insert(root->getSequence()->begin(), functionPrototypeNode); + rootAgg->getSequence()->insert(rootAgg->getSequence()->begin(), functionPrototypeNode); // Add function definition to the end of the shader - TIntermBlock *functionBodyNode = new TIntermBlock(); + TIntermAggregate *functionBodyNode = new TIntermAggregate(EOpSequence); TIntermSequence *functionBody = functionBodyNode->getSequence(); for (const auto &deferredInit : mDeferredInitializers) { functionBody->push_back(deferredInit); } - TIntermFunctionDefinition *functionDefinition = + TIntermAggregate *functionDefinition = CreateFunctionDefinitionNode(functionName, functionBodyNode, initFunctionId); - root->getSequence()->push_back(functionDefinition); + rootAgg->getSequence()->push_back(functionDefinition); // Insert call into main function - for (TIntermNode *node : *root->getSequence()) + for (TIntermNode *node : *rootAgg->getSequence()) { - TIntermFunctionDefinition *nodeFunction = node->getAsFunctionDefinition(); - if (nodeFunction != nullptr && nodeFunction->getFunctionSymbolInfo()->isMain()) + TIntermAggregate *nodeAgg = node->getAsAggregate(); + if (nodeAgg != nullptr && nodeAgg->getOp() == EOpFunction && + TFunction::unmangleName(nodeAgg->getName()) == "main") { TIntermAggregate *functionCallNode = CreateFunctionCallNode(functionName, initFunctionId); - TIntermBlock *mainBody = nodeFunction->getBody(); - ASSERT(mainBody != nullptr); - mainBody->getSequence()->insert(mainBody->getSequence()->begin(), functionCallNode); + TIntermNode *mainBody = nodeAgg->getSequence()->back(); + TIntermAggregate *mainBodyAgg = mainBody->getAsAggregate(); + ASSERT(mainBodyAgg != nullptr && mainBodyAgg->getOp() == EOpSequence); + mainBodyAgg->getSequence()->insert(mainBodyAgg->getSequence()->begin(), + functionCallNode); } } } } // namespace -void DeferGlobalInitializers(TIntermBlock *root) +void DeferGlobalInitializers(TIntermNode *root) { DeferGlobalInitializersTraverser traverser; root->traverse(&traverser); @@ -190,5 +196,3 @@ void DeferGlobalInitializers(TIntermBlock *root) // Add the function with initialization and the call to that. traverser.insertInitFunction(root); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/DeferGlobalInitializers.h b/gfx/angle/src/compiler/translator/DeferGlobalInitializers.h index 261ec9001..14f25539c 100755 --- a/gfx/angle/src/compiler/translator/DeferGlobalInitializers.h +++ b/gfx/angle/src/compiler/translator/DeferGlobalInitializers.h @@ -13,11 +13,8 @@ #ifndef COMPILER_TRANSLATOR_DEFERGLOBALINITIALIZERS_H_ #define COMPILER_TRANSLATOR_DEFERGLOBALINITIALIZERS_H_ -class TIntermBlock; +class TIntermNode; -namespace sh -{ -void DeferGlobalInitializers(TIntermBlock *root); -} // namespace sh +void DeferGlobalInitializers(TIntermNode *root); #endif // COMPILER_TRANSLATOR_DEFERGLOBALINITIALIZERS_H_ diff --git a/gfx/angle/src/compiler/translator/Diagnostics.cpp b/gfx/angle/src/compiler/translator/Diagnostics.cpp index 3b4168617..6ba4679c4 100755 --- a/gfx/angle/src/compiler/translator/Diagnostics.cpp +++ b/gfx/angle/src/compiler/translator/Diagnostics.cpp @@ -11,9 +11,6 @@ #include "compiler/translator/Common.h" #include "compiler/translator/InfoSink.h" -namespace sh -{ - TDiagnostics::TDiagnostics(TInfoSink& infoSink) : mInfoSink(infoSink), mNumErrors(0), @@ -82,5 +79,3 @@ void TDiagnostics::print(ID id, { writeInfo(severity(id), loc, message(id), text, ""); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/Diagnostics.h b/gfx/angle/src/compiler/translator/Diagnostics.h index 25a8a3a57..bb521da1a 100755 --- a/gfx/angle/src/compiler/translator/Diagnostics.h +++ b/gfx/angle/src/compiler/translator/Diagnostics.h @@ -10,9 +10,6 @@ #include "common/angleutils.h" #include "compiler/preprocessor/DiagnosticsBase.h" -namespace sh -{ - class TInfoSink; struct TSourceLoc; @@ -48,6 +45,4 @@ class TDiagnostics : public pp::Diagnostics, angle::NonCopyable int mNumWarnings; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_DIAGNOSTICS_H_ diff --git a/gfx/angle/src/compiler/translator/DirectiveHandler.cpp b/gfx/angle/src/compiler/translator/DirectiveHandler.cpp index 073994d3c..f8081ecd6 100755 --- a/gfx/angle/src/compiler/translator/DirectiveHandler.cpp +++ b/gfx/angle/src/compiler/translator/DirectiveHandler.cpp @@ -12,9 +12,6 @@ #include "common/debug.h" #include "compiler/translator/Diagnostics.h" -namespace sh -{ - static TBehavior getBehavior(const std::string& str) { const char kRequire[] = "require"; @@ -198,5 +195,3 @@ void TDirectiveHandler::handleVersion(const pp::SourceLocation& loc, "version number", str, "not supported"); } } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/DirectiveHandler.h b/gfx/angle/src/compiler/translator/DirectiveHandler.h index a50b08219..00eb49114 100755 --- a/gfx/angle/src/compiler/translator/DirectiveHandler.h +++ b/gfx/angle/src/compiler/translator/DirectiveHandler.h @@ -13,8 +13,6 @@ #include "compiler/preprocessor/DirectiveHandlerBase.h" #include "GLSLANG/ShaderLang.h" -namespace sh -{ class TDiagnostics; class TDirectiveHandler : public pp::DirectiveHandler, angle::NonCopyable @@ -52,6 +50,4 @@ class TDirectiveHandler : public pp::DirectiveHandler, angle::NonCopyable bool mDebugShaderPrecisionSupported; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_DIRECTIVEHANDLER_H_ diff --git a/gfx/angle/src/compiler/translator/EmulateGLFragColorBroadcast.cpp b/gfx/angle/src/compiler/translator/EmulateGLFragColorBroadcast.cpp index a4eeb9b7e..a664d9e2f 100755 --- a/gfx/angle/src/compiler/translator/EmulateGLFragColorBroadcast.cpp +++ b/gfx/angle/src/compiler/translator/EmulateGLFragColorBroadcast.cpp @@ -14,60 +14,59 @@ #include "compiler/translator/EmulateGLFragColorBroadcast.h" #include "compiler/translator/IntermNode.h" -namespace sh +namespace { -namespace +TIntermConstantUnion *constructIndexNode(int index) +{ + TConstantUnion *u = new TConstantUnion[1]; + u[0].setIConst(index); + + TType type(EbtInt, EbpUndefined, EvqConst, 1); + TIntermConstantUnion *node = new TIntermConstantUnion(u, type); + return node; +} + +TIntermBinary *constructGLFragDataNode(int index) { + TIntermBinary *indexDirect = new TIntermBinary(EOpIndexDirect); + TIntermSymbol *symbol = new TIntermSymbol(0, "gl_FragData", TType(EbtFloat, 4)); + indexDirect->setLeft(symbol); + TIntermConstantUnion *indexNode = constructIndexNode(index); + indexDirect->setRight(indexNode); + return indexDirect; +} + +TIntermBinary *constructGLFragDataAssignNode(int index) +{ + TIntermBinary *assign = new TIntermBinary(EOpAssign); + assign->setLeft(constructGLFragDataNode(index)); + assign->setRight(constructGLFragDataNode(0)); + assign->setType(TType(EbtFloat, 4)); + return assign; +} class GLFragColorBroadcastTraverser : public TIntermTraverser { public: - GLFragColorBroadcastTraverser(int maxDrawBuffers) - : TIntermTraverser(true, false, false), - mMainSequence(nullptr), - mGLFragColorUsed(false), - mMaxDrawBuffers(maxDrawBuffers) + GLFragColorBroadcastTraverser() + : TIntermTraverser(true, false, false), mMainSequence(nullptr), mGLFragColorUsed(false) { } - void broadcastGLFragColor(); + void broadcastGLFragColor(int maxDrawBuffers); bool isGLFragColorUsed() const { return mGLFragColorUsed; } protected: void visitSymbol(TIntermSymbol *node) override; - bool visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) override; - - TIntermBinary *constructGLFragDataNode(int index) const; - TIntermBinary *constructGLFragDataAssignNode(int index) const; + bool visitAggregate(Visit visit, TIntermAggregate *node) override; private: TIntermSequence *mMainSequence; bool mGLFragColorUsed; - int mMaxDrawBuffers; }; -TIntermBinary *GLFragColorBroadcastTraverser::constructGLFragDataNode(int index) const -{ - TType gl_FragDataType = TType(EbtFloat, EbpMedium, EvqFragData, 4); - gl_FragDataType.setArraySize(mMaxDrawBuffers); - - TIntermSymbol *symbol = new TIntermSymbol(0, "gl_FragData", gl_FragDataType); - TIntermTyped *indexNode = TIntermTyped::CreateIndexNode(index); - - TIntermBinary *binary = new TIntermBinary(EOpIndexDirect, symbol, indexNode); - return binary; -} - -TIntermBinary *GLFragColorBroadcastTraverser::constructGLFragDataAssignNode(int index) const -{ - TIntermTyped *fragDataIndex = constructGLFragDataNode(index); - TIntermTyped *fragDataZero = constructGLFragDataNode(0); - - return new TIntermBinary(EOpAssign, fragDataIndex, fragDataZero); -} - void GLFragColorBroadcastTraverser::visitSymbol(TIntermSymbol *node) { if (node->getSymbol() == "gl_FragColor") @@ -77,22 +76,34 @@ void GLFragColorBroadcastTraverser::visitSymbol(TIntermSymbol *node) } } -bool GLFragColorBroadcastTraverser::visitFunctionDefinition(Visit visit, - TIntermFunctionDefinition *node) +bool GLFragColorBroadcastTraverser::visitAggregate(Visit visit, TIntermAggregate *node) { - ASSERT(visit == PreVisit); - if (node->getFunctionSymbolInfo()->isMain()) + switch (node->getOp()) { - TIntermBlock *body = node->getBody(); - ASSERT(body); - mMainSequence = body->getSequence(); + case EOpFunction: + // Function definition. + ASSERT(visit == PreVisit); + if (node->getName() == "main(") + { + TIntermSequence *sequence = node->getSequence(); + ASSERT((sequence->size() == 1) || (sequence->size() == 2)); + if (sequence->size() == 2) + { + TIntermAggregate *body = (*sequence)[1]->getAsAggregate(); + ASSERT(body); + mMainSequence = body->getSequence(); + } + } + break; + default: + break; } return true; } -void GLFragColorBroadcastTraverser::broadcastGLFragColor() +void GLFragColorBroadcastTraverser::broadcastGLFragColor(int maxDrawBuffers) { - ASSERT(mMaxDrawBuffers > 1); + ASSERT(maxDrawBuffers > 1); if (!mGLFragColorUsed) { return; @@ -102,7 +113,7 @@ void GLFragColorBroadcastTraverser::broadcastGLFragColor() // gl_FragData[1] = gl_FragData[0]; // ... // gl_FragData[maxDrawBuffers - 1] = gl_FragData[0]; - for (int colorIndex = 1; colorIndex < mMaxDrawBuffers; ++colorIndex) + for (int colorIndex = 1; colorIndex < maxDrawBuffers; ++colorIndex) { mMainSequence->insert(mMainSequence->end(), constructGLFragDataAssignNode(colorIndex)); } @@ -115,12 +126,12 @@ void EmulateGLFragColorBroadcast(TIntermNode *root, std::vector *outputVariables) { ASSERT(maxDrawBuffers > 1); - GLFragColorBroadcastTraverser traverser(maxDrawBuffers); + GLFragColorBroadcastTraverser traverser; root->traverse(&traverser); if (traverser.isGLFragColorUsed()) { traverser.updateTree(); - traverser.broadcastGLFragColor(); + traverser.broadcastGLFragColor(maxDrawBuffers); for (auto &var : *outputVariables) { if (var.name == "gl_FragColor") @@ -133,5 +144,3 @@ void EmulateGLFragColorBroadcast(TIntermNode *root, } } } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/EmulateGLFragColorBroadcast.h b/gfx/angle/src/compiler/translator/EmulateGLFragColorBroadcast.h index 09e8dae6d..627c4c67f 100755 --- a/gfx/angle/src/compiler/translator/EmulateGLFragColorBroadcast.h +++ b/gfx/angle/src/compiler/translator/EmulateGLFragColorBroadcast.h @@ -15,6 +15,8 @@ namespace sh { struct OutputVariable; +} + class TIntermNode; // Replace all gl_FragColor with gl_FragData[0], and in the end of main() function, @@ -22,7 +24,6 @@ class TIntermNode; // If gl_FragColor is in outputVariables, it is replaced by gl_FragData. void EmulateGLFragColorBroadcast(TIntermNode *root, int maxDrawBuffers, - std::vector *outputVariables); -} + std::vector *outputVariables); #endif // COMPILER_TRANSLATOR_EMULATEGLFRAGCOLORBROADCAST_H_ diff --git a/gfx/angle/src/compiler/translator/EmulatePrecision.cpp b/gfx/angle/src/compiler/translator/EmulatePrecision.cpp index c3c49021c..5f1454b57 100755 --- a/gfx/angle/src/compiler/translator/EmulatePrecision.cpp +++ b/gfx/angle/src/compiler/translator/EmulatePrecision.cpp @@ -8,9 +8,6 @@ #include -namespace sh -{ - namespace { @@ -94,7 +91,6 @@ class RoundingHelperWriterHLSL : public RoundingHelperWriter RoundingHelperWriter *RoundingHelperWriter::createHelperWriter(const ShShaderOutput outputLanguage) { - ASSERT(EmulatePrecision::SupportedInLanguage(outputLanguage)); switch (outputLanguage) { case SH_HLSL_4_1_OUTPUT: @@ -102,6 +98,9 @@ RoundingHelperWriter *RoundingHelperWriter::createHelperWriter(const ShShaderOut case SH_ESSL_OUTPUT: return new RoundingHelperWriterESSL(outputLanguage); default: + // Other languages not yet supported + ASSERT(outputLanguage == SH_GLSL_COMPATIBILITY_OUTPUT || + IsGLSL130OrNewer(outputLanguage)); return new RoundingHelperWriterGLSL(outputLanguage); } } @@ -433,7 +432,7 @@ TIntermAggregate *createInternalFunctionCallNode(TString name, TIntermNode *chil callNode->setOp(EOpFunctionCall); TName nameObj(TFunction::mangleName(name)); nameObj.setInternal(true); - callNode->getFunctionSymbolInfo()->setNameObj(nameObj); + callNode->setNameObj(nameObj); callNode->getSequence()->push_back(child); return callNode; } @@ -470,16 +469,15 @@ bool parentUsesResult(TIntermNode* parent, TIntermNode* node) return false; } - TIntermBlock *blockParent = parent->getAsBlock(); - // If the parent is a block, the result is not assigned anywhere, + TIntermAggregate *aggParent = parent->getAsAggregate(); + // If the parent's op is EOpSequence, the result is not assigned anywhere, // so rounding it is not needed. In particular, this can avoid a lot of // unnecessary rounding of unused return values of assignment. - if (blockParent) + if (aggParent && aggParent->getOp() == EOpSequence) { return false; } - TIntermBinary *binaryParent = parent->getAsBinaryNode(); - if (binaryParent && binaryParent->getOp() == EOpComma && (binaryParent->getRight() != node)) + if (aggParent && aggParent->getOp() == EOpComma && (aggParent->getSequence()->back() != node)) { return false; } @@ -513,7 +511,7 @@ bool EmulatePrecision::visitBinary(Visit visit, TIntermBinary *node) if (op == EOpInitialize && visit == InVisit) mDeclaringVariables = false; - if ((op == EOpIndexDirectStruct) && visit == InVisit) + if ((op == EOpIndexDirectStruct || op == EOpVectorSwizzle) && visit == InVisit) visitChildren = false; if (visit != PreVisit) @@ -601,30 +599,14 @@ bool EmulatePrecision::visitBinary(Visit visit, TIntermBinary *node) return visitChildren; } -bool EmulatePrecision::visitDeclaration(Visit visit, TIntermDeclaration *node) -{ - // Variable or interface block declaration. - if (visit == PreVisit) - { - mDeclaringVariables = true; - } - else if (visit == InVisit) - { - mDeclaringVariables = true; - } - else - { - mDeclaringVariables = false; - } - return true; -} - bool EmulatePrecision::visitAggregate(Visit visit, TIntermAggregate *node) { bool visitChildren = true; switch (node->getOp()) { + case EOpSequence: case EOpConstructStruct: + case EOpFunction: break; case EOpPrototype: visitChildren = false; @@ -635,6 +617,21 @@ bool EmulatePrecision::visitAggregate(Visit visit, TIntermAggregate *node) case EOpInvariantDeclaration: visitChildren = false; break; + case EOpDeclaration: + // Variable declaration. + if (visit == PreVisit) + { + mDeclaringVariables = true; + } + else if (visit == InVisit) + { + mDeclaringVariables = true; + } + else + { + mDeclaringVariables = false; + } + break; case EOpFunctionCall: { // Function call. @@ -708,19 +705,3 @@ void EmulatePrecision::writeEmulationHelpers(TInfoSinkBase &sink, roundingHelperWriter->writeCompoundAssignmentHelper(sink, it->lType, it->rType, "*", "mul"); } -// static -bool EmulatePrecision::SupportedInLanguage(const ShShaderOutput outputLanguage) -{ - switch (outputLanguage) - { - case SH_HLSL_4_1_OUTPUT: - case SH_ESSL_OUTPUT: - return true; - default: - // Other languages not yet supported - return (outputLanguage == SH_GLSL_COMPATIBILITY_OUTPUT || - sh::IsGLSL130OrNewer(outputLanguage)); - } -} - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/EmulatePrecision.h b/gfx/angle/src/compiler/translator/EmulatePrecision.h index deb49cd2c..c2b9857bb 100755 --- a/gfx/angle/src/compiler/translator/EmulatePrecision.h +++ b/gfx/angle/src/compiler/translator/EmulatePrecision.h @@ -18,9 +18,6 @@ // need to write a huge number of variations of the emulated compound assignment // to every translated shader with emulation enabled. -namespace sh -{ - class EmulatePrecision : public TLValueTrackingTraverser { public: @@ -30,14 +27,11 @@ class EmulatePrecision : public TLValueTrackingTraverser bool visitBinary(Visit visit, TIntermBinary *node) override; bool visitUnary(Visit visit, TIntermUnary *node) override; bool visitAggregate(Visit visit, TIntermAggregate *node) override; - bool visitDeclaration(Visit visit, TIntermDeclaration *node) override; void writeEmulationHelpers(TInfoSinkBase &sink, const int shaderVersion, const ShShaderOutput outputLanguage); - static bool SupportedInLanguage(const ShShaderOutput outputLanguage); - private: struct TypePair { @@ -67,6 +61,4 @@ class EmulatePrecision : public TLValueTrackingTraverser bool mDeclaringVariables; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_EMULATE_PRECISION_H_ diff --git a/gfx/angle/src/compiler/translator/ExpandIntegerPowExpressions.cpp b/gfx/angle/src/compiler/translator/ExpandIntegerPowExpressions.cpp index c5ff7b36b..b78c2059e 100755 --- a/gfx/angle/src/compiler/translator/ExpandIntegerPowExpressions.cpp +++ b/gfx/angle/src/compiler/translator/ExpandIntegerPowExpressions.cpp @@ -116,7 +116,7 @@ bool Traverser::visitAggregate(Visit visit, TIntermAggregate *node) TIntermTyped *lhs = sequence->at(0)->getAsTyped(); ASSERT(lhs); - TIntermDeclaration *init = createTempInitDeclaration(lhs); + TIntermAggregate *init = createTempInitDeclaration(lhs); TIntermTyped *current = createTempSymbol(lhs->getType()); insertStatementInParentBlock(init); @@ -124,7 +124,10 @@ bool Traverser::visitAggregate(Visit visit, TIntermAggregate *node) // Create a chain of n-1 multiples. for (int i = 1; i < n; ++i) { - TIntermBinary *mul = new TIntermBinary(EOpMul, current, createTempSymbol(lhs->getType())); + TIntermBinary *mul = new TIntermBinary(EOpMul); + mul->setLeft(current); + mul->setRight(createTempSymbol(lhs->getType())); + mul->setType(node->getType()); mul->setLine(node->getLine()); current = mul; } @@ -135,7 +138,9 @@ bool Traverser::visitAggregate(Visit visit, TIntermAggregate *node) TConstantUnion *oneVal = new TConstantUnion(); oneVal->setFConst(1.0f); TIntermConstantUnion *oneNode = new TIntermConstantUnion(oneVal, node->getType()); - TIntermBinary *div = new TIntermBinary(EOpDiv, oneNode, current); + TIntermBinary *div = new TIntermBinary(EOpDiv); + div->setLeft(oneNode); + div->setRight(current); current = div; } diff --git a/gfx/angle/src/compiler/translator/ExtensionGLSL.cpp b/gfx/angle/src/compiler/translator/ExtensionGLSL.cpp index 5b5dc580e..d7f45f7ee 100755 --- a/gfx/angle/src/compiler/translator/ExtensionGLSL.cpp +++ b/gfx/angle/src/compiler/translator/ExtensionGLSL.cpp @@ -10,9 +10,6 @@ #include "compiler/translator/VersionGLSL.h" -namespace sh -{ - TExtensionGLSL::TExtensionGLSL(ShShaderOutput output) : TIntermTraverser(true, false, false), mTargetVersion(ShaderOutputTypeToGLSLVersion(output)) { @@ -101,5 +98,3 @@ void TExtensionGLSL::checkOperator(TIntermOperator *node) break; } } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/ExtensionGLSL.h b/gfx/angle/src/compiler/translator/ExtensionGLSL.h index 3c2dbe074..6bb84d612 100755 --- a/gfx/angle/src/compiler/translator/ExtensionGLSL.h +++ b/gfx/angle/src/compiler/translator/ExtensionGLSL.h @@ -14,9 +14,6 @@ #include "compiler/translator/IntermNode.h" -namespace sh -{ - // Traverses the intermediate tree to determine which GLSL extensions are required // to support the shader. class TExtensionGLSL : public TIntermTraverser @@ -39,6 +36,4 @@ class TExtensionGLSL : public TIntermTraverser std::set mRequiredExtensions; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_EXTENSIONGLSL_H_ diff --git a/gfx/angle/src/compiler/translator/ForLoopUnroll.cpp b/gfx/angle/src/compiler/translator/ForLoopUnroll.cpp index 58cce845f..4cc1c26a1 100755 --- a/gfx/angle/src/compiler/translator/ForLoopUnroll.cpp +++ b/gfx/angle/src/compiler/translator/ForLoopUnroll.cpp @@ -9,9 +9,6 @@ #include "compiler/translator/ValidateLimitations.h" #include "angle_gl.h" -namespace sh -{ - bool ForLoopUnrollMarker::visitBinary(Visit, TIntermBinary *node) { if (mUnrollCondition != kSamplerArrayIndex) @@ -54,7 +51,7 @@ bool ForLoopUnrollMarker::visitLoop(Visit, TIntermLoop *node) // Check if loop index type is integer. // This is called after ValidateLimitations pass, so the loop has the limited form specified // in ESSL 1.00 appendix A. - TIntermSequence *declSeq = node->getInit()->getAsDeclarationNode()->getSequence(); + TIntermSequence *declSeq = node->getInit()->getAsAggregate()->getSequence(); TIntermSymbol *symbol = (*declSeq)[0]->getAsBinaryNode()->getLeft()->getAsSymbolNode(); if (symbol->getBasicType() == EbtInt) node->setUnrollFlag(true); @@ -98,5 +95,3 @@ void ForLoopUnrollMarker::visitSymbol(TIntermSymbol* symbol) } } } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/ForLoopUnroll.h b/gfx/angle/src/compiler/translator/ForLoopUnroll.h index cda89b29f..9c49ecad3 100755 --- a/gfx/angle/src/compiler/translator/ForLoopUnroll.h +++ b/gfx/angle/src/compiler/translator/ForLoopUnroll.h @@ -9,9 +9,6 @@ #include "compiler/translator/LoopInfo.h" -namespace sh -{ - // This class detects for-loops that needs to be unrolled. // Currently we support two unroll conditions: // 1) kForLoopWithIntegerIndex: unroll if the index type is integer. @@ -53,6 +50,4 @@ class ForLoopUnrollMarker : public TIntermTraverser bool mHasRunLoopValidation; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_FORLOOPUNROLL_H_ diff --git a/gfx/angle/src/compiler/translator/InfoSink.cpp b/gfx/angle/src/compiler/translator/InfoSink.cpp index e71fe51d3..cd59658ff 100755 --- a/gfx/angle/src/compiler/translator/InfoSink.cpp +++ b/gfx/angle/src/compiler/translator/InfoSink.cpp @@ -6,9 +6,6 @@ #include "compiler/translator/InfoSink.h" -namespace sh -{ - void TInfoSinkBase::prefix(TPrefixType p) { switch(p) { case EPrefixNone: @@ -55,5 +52,3 @@ void TInfoSinkBase::message(TPrefixType p, const TSourceLoc& loc, const char* m) sink.append(m); sink.append("\n"); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/InfoSink.h b/gfx/angle/src/compiler/translator/InfoSink.h index b18e5861b..f47fafa8e 100755 --- a/gfx/angle/src/compiler/translator/InfoSink.h +++ b/gfx/angle/src/compiler/translator/InfoSink.h @@ -11,9 +11,6 @@ #include #include "compiler/translator/Common.h" -namespace sh -{ - // Returns the fractional part of the given floating-point number. inline float fractionalPart(float f) { float intPart = 0.0f; @@ -116,6 +113,4 @@ public: TInfoSinkBase obj; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_INFOSINK_H_ diff --git a/gfx/angle/src/compiler/translator/Initialize.cpp b/gfx/angle/src/compiler/translator/Initialize.cpp index a0b35f636..0bf6ac45b 100755 --- a/gfx/angle/src/compiler/translator/Initialize.cpp +++ b/gfx/angle/src/compiler/translator/Initialize.cpp @@ -16,12 +16,8 @@ #include "compiler/translator/IntermNode.h" #include "angle_gl.h" -namespace sh -{ - void InsertBuiltInFunctions(sh::GLenum type, ShShaderSpec spec, const ShBuiltInResources &resources, TSymbolTable &symbolTable) { - const TType *voidType = TCache::getType(EbtVoid); const TType *float1 = TCache::getType(EbtFloat); const TType *float2 = TCache::getType(EbtFloat, 2); const TType *float3 = TCache::getType(EbtFloat, 3); @@ -473,26 +469,6 @@ void InsertBuiltInFunctions(sh::GLenum type, ShShaderSpec spec, const ShBuiltInR symbolTable.insertBuiltIn(ESSL3_BUILTINS, gvec4, "textureProjGradOffset", gsampler3D, float4, float3, float3, int3); symbolTable.insertBuiltIn(ESSL3_BUILTINS, float1, "textureProjGradOffset", sampler2DShadow, float4, float2, float2, int2); - const TType *gimage2D = TCache::getType(EbtGImage2D); - const TType *gimage3D = TCache::getType(EbtGImage3D); - const TType *gimage2DArray = TCache::getType(EbtGImage2DArray); - const TType *gimageCube = TCache::getType(EbtGImageCube); - - symbolTable.insertBuiltIn(ESSL3_1_BUILTINS, voidType, "imageStore", gimage2D, int2, gvec4); - symbolTable.insertBuiltIn(ESSL3_1_BUILTINS, voidType, "imageStore", gimage3D, int3, gvec4); - symbolTable.insertBuiltIn(ESSL3_1_BUILTINS, voidType, "imageStore", gimage2DArray, int3, gvec4); - symbolTable.insertBuiltIn(ESSL3_1_BUILTINS, voidType, "imageStore", gimageCube, int3, gvec4); - - symbolTable.insertBuiltIn(ESSL3_1_BUILTINS, gvec4, "imageLoad", gimage2D, int2); - symbolTable.insertBuiltIn(ESSL3_1_BUILTINS, gvec4, "imageLoad", gimage3D, int3); - symbolTable.insertBuiltIn(ESSL3_1_BUILTINS, gvec4, "imageLoad", gimage2DArray, int3); - symbolTable.insertBuiltIn(ESSL3_1_BUILTINS, gvec4, "imageLoad", gimageCube, int3); - - symbolTable.insertBuiltIn(ESSL3_1_BUILTINS, int2, "imageSize", gimage2D); - symbolTable.insertBuiltIn(ESSL3_1_BUILTINS, int3, "imageSize", gimage3D); - symbolTable.insertBuiltIn(ESSL3_1_BUILTINS, int3, "imageSize", gimage2DArray); - symbolTable.insertBuiltIn(ESSL3_1_BUILTINS, int3, "imageSize", gimageCube); - // // Depth range in window coordinates // @@ -535,13 +511,16 @@ void InsertBuiltInFunctions(sh::GLenum type, ShShaderSpec spec, const ShBuiltInR symbolTable.insertConstInt(ESSL1_BUILTINS, "gl_MaxVaryingVectors", resources.MaxVaryingVectors, EbpMedium); - symbolTable.insertConstInt(COMMON_BUILTINS, "gl_MaxDrawBuffers", resources.MaxDrawBuffers, - EbpMedium); - if (resources.EXT_blend_func_extended) + if (spec != SH_CSS_SHADERS_SPEC) { - symbolTable.insertConstIntExt(COMMON_BUILTINS, "GL_EXT_blend_func_extended", - "gl_MaxDualSourceDrawBuffersEXT", - resources.MaxDualSourceDrawBuffers); + symbolTable.insertConstInt(COMMON_BUILTINS, "gl_MaxDrawBuffers", resources.MaxDrawBuffers, + EbpMedium); + if (resources.EXT_blend_func_extended) + { + symbolTable.insertConstIntExt(COMMON_BUILTINS, "GL_EXT_blend_func_extended", + "gl_MaxDualSourceDrawBuffersEXT", + resources.MaxDualSourceDrawBuffers); + } } symbolTable.insertConstInt(ESSL3_BUILTINS, "gl_MaxVertexOutputVectors", @@ -611,73 +590,85 @@ void IdentifyBuiltIns(sh::GLenum type, ShShaderSpec spec, switch (type) { case GL_FRAGMENT_SHADER: - { - symbolTable.insert(COMMON_BUILTINS, new TVariable(NewPoolTString("gl_FragCoord"), - TType(EbtFloat, EbpMedium, EvqFragCoord, 4))); - symbolTable.insert(COMMON_BUILTINS, new TVariable(NewPoolTString("gl_FrontFacing"), - TType(EbtBool, EbpUndefined, EvqFrontFacing, 1))); - symbolTable.insert(COMMON_BUILTINS, new TVariable(NewPoolTString("gl_PointCoord"), - TType(EbtFloat, EbpMedium, EvqPointCoord, 2))); - - symbolTable.insert(ESSL1_BUILTINS, new TVariable(NewPoolTString("gl_FragColor"), - TType(EbtFloat, EbpMedium, EvqFragColor, 4))); - TType fragData(EbtFloat, EbpMedium, EvqFragData, 4, 1, true); - fragData.setArraySize(resources.MaxDrawBuffers); - symbolTable.insert(ESSL1_BUILTINS, new TVariable(NewPoolTString("gl_FragData"), fragData)); - - if (resources.EXT_blend_func_extended) - { - symbolTable.insert( - ESSL1_BUILTINS, "GL_EXT_blend_func_extended", - new TVariable(NewPoolTString("gl_SecondaryFragColorEXT"), - TType(EbtFloat, EbpMedium, EvqSecondaryFragColorEXT, 4))); - TType secondaryFragData(EbtFloat, EbpMedium, EvqSecondaryFragDataEXT, 4, 1, true); - secondaryFragData.setArraySize(resources.MaxDualSourceDrawBuffers); - symbolTable.insert( - ESSL1_BUILTINS, "GL_EXT_blend_func_extended", - new TVariable(NewPoolTString("gl_SecondaryFragDataEXT"), secondaryFragData)); - } - - if (resources.EXT_frag_depth) - { - symbolTable.insert( - ESSL1_BUILTINS, "GL_EXT_frag_depth", - new TVariable( - NewPoolTString("gl_FragDepthEXT"), - TType(EbtFloat, resources.FragmentPrecisionHigh ? EbpHigh : EbpMedium, - EvqFragDepthEXT, 1))); - } - - symbolTable.insert(ESSL3_BUILTINS, - new TVariable(NewPoolTString("gl_FragDepth"), - TType(EbtFloat, EbpHigh, EvqFragDepth, 1))); - - if (resources.EXT_shader_framebuffer_fetch || resources.NV_shader_framebuffer_fetch) - { - TType lastFragData(EbtFloat, EbpMedium, EvqLastFragData, 4, 1, true); - lastFragData.setArraySize(resources.MaxDrawBuffers); - - if (resources.EXT_shader_framebuffer_fetch) - { - symbolTable.insert(ESSL1_BUILTINS, "GL_EXT_shader_framebuffer_fetch", - new TVariable(NewPoolTString("gl_LastFragData"), lastFragData)); - } - else if (resources.NV_shader_framebuffer_fetch) - { - symbolTable.insert(ESSL1_BUILTINS, "GL_NV_shader_framebuffer_fetch", - new TVariable(NewPoolTString("gl_LastFragColor"), - TType(EbtFloat, EbpMedium, EvqLastFragColor, 4))); - symbolTable.insert(ESSL1_BUILTINS, "GL_NV_shader_framebuffer_fetch", - new TVariable(NewPoolTString("gl_LastFragData"), lastFragData)); - } - } - else if (resources.ARM_shader_framebuffer_fetch) - { - symbolTable.insert(ESSL1_BUILTINS, "GL_ARM_shader_framebuffer_fetch", - new TVariable(NewPoolTString("gl_LastFragColorARM"), - TType(EbtFloat, EbpMedium, EvqLastFragColor, 4))); - } - } + symbolTable.insert(COMMON_BUILTINS, new TVariable(NewPoolTString("gl_FragCoord"), + TType(EbtFloat, EbpMedium, EvqFragCoord, 4))); + symbolTable.insert(COMMON_BUILTINS, new TVariable(NewPoolTString("gl_FrontFacing"), + TType(EbtBool, EbpUndefined, EvqFrontFacing, 1))); + symbolTable.insert(COMMON_BUILTINS, new TVariable(NewPoolTString("gl_PointCoord"), + TType(EbtFloat, EbpMedium, EvqPointCoord, 2))); + + // + // In CSS Shaders, gl_FragColor, gl_FragData, and gl_MaxDrawBuffers are not available. + // Instead, css_MixColor and css_ColorMatrix are available. + // + if (spec != SH_CSS_SHADERS_SPEC) + { + symbolTable.insert(ESSL1_BUILTINS, new TVariable(NewPoolTString("gl_FragColor"), + TType(EbtFloat, EbpMedium, EvqFragColor, 4))); + TType fragData(EbtFloat, EbpMedium, EvqFragData, 4, 1, true); + fragData.setArraySize(resources.MaxDrawBuffers); + symbolTable.insert(ESSL1_BUILTINS, new TVariable(NewPoolTString("gl_FragData"), fragData)); + + if (resources.EXT_blend_func_extended) + { + symbolTable.insert( + ESSL1_BUILTINS, "GL_EXT_blend_func_extended", + new TVariable(NewPoolTString("gl_SecondaryFragColorEXT"), + TType(EbtFloat, EbpMedium, EvqSecondaryFragColorEXT, 4))); + TType secondaryFragData(EbtFloat, EbpMedium, EvqSecondaryFragDataEXT, 4, 1, true); + secondaryFragData.setArraySize(resources.MaxDualSourceDrawBuffers); + symbolTable.insert( + ESSL1_BUILTINS, "GL_EXT_blend_func_extended", + new TVariable(NewPoolTString("gl_SecondaryFragDataEXT"), secondaryFragData)); + } + + if (resources.EXT_frag_depth) + { + symbolTable.insert( + ESSL1_BUILTINS, "GL_EXT_frag_depth", + new TVariable( + NewPoolTString("gl_FragDepthEXT"), + TType(EbtFloat, resources.FragmentPrecisionHigh ? EbpHigh : EbpMedium, + EvqFragDepthEXT, 1))); + } + + symbolTable.insert(ESSL3_BUILTINS, + new TVariable(NewPoolTString("gl_FragDepth"), + TType(EbtFloat, EbpHigh, EvqFragDepth, 1))); + + if (resources.EXT_shader_framebuffer_fetch || resources.NV_shader_framebuffer_fetch) + { + TType lastFragData(EbtFloat, EbpMedium, EvqLastFragData, 4, 1, true); + lastFragData.setArraySize(resources.MaxDrawBuffers); + + if (resources.EXT_shader_framebuffer_fetch) + { + symbolTable.insert(ESSL1_BUILTINS, "GL_EXT_shader_framebuffer_fetch", + new TVariable(NewPoolTString("gl_LastFragData"), lastFragData)); + } + else if (resources.NV_shader_framebuffer_fetch) + { + symbolTable.insert(ESSL1_BUILTINS, "GL_NV_shader_framebuffer_fetch", + new TVariable(NewPoolTString("gl_LastFragColor"), + TType(EbtFloat, EbpMedium, EvqLastFragColor, 4))); + symbolTable.insert(ESSL1_BUILTINS, "GL_NV_shader_framebuffer_fetch", + new TVariable(NewPoolTString("gl_LastFragData"), lastFragData)); + } + } + else if (resources.ARM_shader_framebuffer_fetch) + { + symbolTable.insert(ESSL1_BUILTINS, "GL_ARM_shader_framebuffer_fetch", + new TVariable(NewPoolTString("gl_LastFragColorARM"), + TType(EbtFloat, EbpMedium, EvqLastFragColor, 4))); + } + } + else + { + symbolTable.insert(ESSL1_BUILTINS, new TVariable(NewPoolTString("css_MixColor"), + TType(EbtFloat, EbpMedium, EvqGlobal, 4))); + symbolTable.insert(ESSL1_BUILTINS, new TVariable(NewPoolTString("css_ColorMatrix"), + TType(EbtFloat, EbpMedium, EvqGlobal, 4, 4))); + } break; @@ -758,5 +749,3 @@ void ResetExtensionBehavior(TExtensionBehavior &extBehavior) ext_iter->second = EBhUndefined; } } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/Initialize.h b/gfx/angle/src/compiler/translator/Initialize.h index 0f1b60ba3..c43ce3417 100755 --- a/gfx/angle/src/compiler/translator/Initialize.h +++ b/gfx/angle/src/compiler/translator/Initialize.h @@ -11,9 +11,6 @@ #include "compiler/translator/Compiler.h" #include "compiler/translator/SymbolTable.h" -namespace sh -{ - void InsertBuiltInFunctions(sh::GLenum type, ShShaderSpec spec, const ShBuiltInResources &resources, TSymbolTable &table); void IdentifyBuiltIns(sh::GLenum type, ShShaderSpec spec, @@ -29,6 +26,4 @@ void InitExtensionBehavior(const ShBuiltInResources& resources, // extensions will remain unsupported. void ResetExtensionBehavior(TExtensionBehavior &extensionBehavior); -} // namespace sh - #endif // COMPILER_TRANSLATOR_INITIALIZE_H_ diff --git a/gfx/angle/src/compiler/translator/InitializeDll.cpp b/gfx/angle/src/compiler/translator/InitializeDll.cpp index 89901935c..713965389 100755 --- a/gfx/angle/src/compiler/translator/InitializeDll.cpp +++ b/gfx/angle/src/compiler/translator/InitializeDll.cpp @@ -13,9 +13,6 @@ #include -namespace sh -{ - bool InitProcess() { if (!InitializePoolIndex()) { @@ -39,5 +36,3 @@ void DetachProcess() FreePoolIndex(); TCache::destroy(); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/InitializeDll.h b/gfx/angle/src/compiler/translator/InitializeDll.h index b2c787a8c..4c400760f 100755 --- a/gfx/angle/src/compiler/translator/InitializeDll.h +++ b/gfx/angle/src/compiler/translator/InitializeDll.h @@ -6,11 +6,8 @@ #ifndef COMPILER_TRANSLATOR_INITIALIZEDLL_H_ #define COMPILER_TRANSLATOR_INITIALIZEDLL_H_ -namespace sh -{ bool InitProcess(); void DetachProcess(); -} // namespace sh #endif // COMPILER_TRANSLATOR_INITIALIZEDLL_H_ diff --git a/gfx/angle/src/compiler/translator/InitializeParseContext.cpp b/gfx/angle/src/compiler/translator/InitializeParseContext.cpp index 67a248b60..c35cedb34 100755 --- a/gfx/angle/src/compiler/translator/InitializeParseContext.cpp +++ b/gfx/angle/src/compiler/translator/InitializeParseContext.cpp @@ -10,9 +10,6 @@ #include -namespace sh -{ - TLSIndex GlobalParseContextIndex = TLS_INVALID_INDEX; bool InitializeParseContextIndex() @@ -43,4 +40,3 @@ TParseContext* GetGlobalParseContext() return static_cast(GetTLSValue(GlobalParseContextIndex)); } -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/InitializeParseContext.h b/gfx/angle/src/compiler/translator/InitializeParseContext.h index 9c315be3f..70dac702e 100755 --- a/gfx/angle/src/compiler/translator/InitializeParseContext.h +++ b/gfx/angle/src/compiler/translator/InitializeParseContext.h @@ -7,15 +7,11 @@ #ifndef COMPILER_TRANSLATOR_INITIALIZEPARSECONTEXT_H_ #define COMPILER_TRANSLATOR_INITIALIZEPARSECONTEXT_H_ -namespace sh -{ - bool InitializeParseContextIndex(); void FreeParseContextIndex(); class TParseContext; extern void SetGlobalParseContext(TParseContext* context); extern TParseContext* GetGlobalParseContext(); -} // namespace sh #endif // COMPILER_TRANSLATOR_INITIALIZEPARSECONTEXT_H_ diff --git a/gfx/angle/src/compiler/translator/InitializeVariables.cpp b/gfx/angle/src/compiler/translator/InitializeVariables.cpp index dafea1bd6..21f00936e 100755 --- a/gfx/angle/src/compiler/translator/InitializeVariables.cpp +++ b/gfx/angle/src/compiler/translator/InitializeVariables.cpp @@ -9,122 +9,191 @@ #include "angle_gl.h" #include "common/debug.h" #include "compiler/translator/IntermNode.h" -#include "compiler/translator/SymbolTable.h" #include "compiler/translator/util.h" -namespace sh +namespace { -namespace +TIntermConstantUnion *constructConstUnionNode(const TType &type) +{ + TType myType = type; + myType.clearArrayness(); + myType.setQualifier(EvqConst); + size_t size = myType.getObjectSize(); + TConstantUnion *u = new TConstantUnion[size]; + for (size_t ii = 0; ii < size; ++ii) + { + switch (type.getBasicType()) + { + case EbtFloat: + u[ii].setFConst(0.0f); + break; + case EbtInt: + u[ii].setIConst(0); + break; + case EbtUInt: + u[ii].setUConst(0u); + break; + default: + UNREACHABLE(); + return nullptr; + } + } + + TIntermConstantUnion *node = new TIntermConstantUnion(u, myType); + return node; +} + +TIntermConstantUnion *constructIndexNode(int index) { + TConstantUnion *u = new TConstantUnion[1]; + u[0].setIConst(index); + + TType type(EbtInt, EbpUndefined, EvqConst, 1); + TIntermConstantUnion *node = new TIntermConstantUnion(u, type); + return node; +} class VariableInitializer : public TIntermTraverser { public: - VariableInitializer(const InitVariableList &vars, const TSymbolTable &symbolTable) - : TIntermTraverser(true, false, false), - mVariables(vars), - mSymbolTable(symbolTable), - mCodeInserted(false) + VariableInitializer(const InitVariableList &vars) + : TIntermTraverser(true, false, false), mVariables(vars), mCodeInserted(false) { - ASSERT(mSymbolTable.atGlobalLevel()); } protected: bool visitBinary(Visit, TIntermBinary *node) override { return false; } bool visitUnary(Visit, TIntermUnary *node) override { return false; } - bool visitIfElse(Visit, TIntermIfElse *node) override { return false; } + bool visitSelection(Visit, TIntermSelection *node) override { return false; } bool visitLoop(Visit, TIntermLoop *node) override { return false; } bool visitBranch(Visit, TIntermBranch *node) override { return false; } - bool visitAggregate(Visit, TIntermAggregate *node) override { return false; } - bool visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) override; + bool visitAggregate(Visit visit, TIntermAggregate *node) override; private: void insertInitCode(TIntermSequence *sequence); const InitVariableList &mVariables; - const TSymbolTable &mSymbolTable; bool mCodeInserted; }; // VariableInitializer implementation. -bool VariableInitializer::visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) +bool VariableInitializer::visitAggregate(Visit visit, TIntermAggregate *node) { - // Function definition. - ASSERT(visit == PreVisit); - if (node->getFunctionSymbolInfo()->isMain()) + bool visitChildren = !mCodeInserted; + switch (node->getOp()) { - TIntermBlock *body = node->getBody(); - insertInitCode(body->getSequence()); - mCodeInserted = true; + case EOpSequence: + break; + case EOpFunction: + { + // Function definition. + ASSERT(visit == PreVisit); + if (node->getName() == "main(") + { + TIntermSequence *sequence = node->getSequence(); + ASSERT((sequence->size() == 1) || (sequence->size() == 2)); + TIntermAggregate *body = NULL; + if (sequence->size() == 1) + { + body = new TIntermAggregate(EOpSequence); + sequence->push_back(body); + } + else + { + body = (*sequence)[1]->getAsAggregate(); + } + ASSERT(body); + insertInitCode(body->getSequence()); + mCodeInserted = true; + } + break; + } + default: + visitChildren = false; + break; } - return false; + return visitChildren; } void VariableInitializer::insertInitCode(TIntermSequence *sequence) { - for (const auto &var : mVariables) + for (size_t ii = 0; ii < mVariables.size(); ++ii) { + const sh::ShaderVariable &var = mVariables[ii]; TString name = TString(var.name.c_str()); - if (var.isArray()) { - // Assign the array elements one by one to keep the AST compatible with ESSL 1.00 which - // doesn't have array assignment. + TType type = sh::ConvertShaderVariableTypeToTType(var.type); size_t pos = name.find_last_of('['); if (pos != TString::npos) - { name = name.substr(0, pos); - } - TType elementType = sh::GetShaderVariableBasicType(var); - TType arrayType = elementType; - arrayType.setArraySize(var.elementCount()); - - for (unsigned int i = 0; i < var.arraySize; ++i) + for (int index = static_cast(var.arraySize) - 1; index >= 0; --index) { - TIntermSymbol *arraySymbol = new TIntermSymbol(0, name, arrayType); - TIntermBinary *element = new TIntermBinary(EOpIndexDirect, arraySymbol, - TIntermTyped::CreateIndexNode(i)); + TIntermBinary *assign = new TIntermBinary(EOpAssign); + sequence->insert(sequence->begin(), assign); + + TIntermBinary *indexDirect = new TIntermBinary(EOpIndexDirect); + TIntermSymbol *symbol = new TIntermSymbol(0, name, type); + indexDirect->setLeft(symbol); + TIntermConstantUnion *indexNode = constructIndexNode(index); + indexDirect->setRight(indexNode); - TIntermTyped *zero = TIntermTyped::CreateZero(elementType); - TIntermBinary *assignment = new TIntermBinary(EOpAssign, element, zero); + assign->setLeft(indexDirect); - sequence->insert(sequence->begin(), assignment); + TIntermConstantUnion *zeroConst = constructConstUnionNode(type); + assign->setRight(zeroConst); } } else if (var.isStruct()) { - TVariable *structInfo = reinterpret_cast(mSymbolTable.findGlobal(name)); - ASSERT(structInfo); - - TIntermSymbol *symbol = new TIntermSymbol(0, name, structInfo->getType()); - TIntermTyped *zero = TIntermTyped::CreateZero(structInfo->getType()); - - TIntermBinary *assign = new TIntermBinary(EOpAssign, symbol, zero); - sequence->insert(sequence->begin(), assign); + TFieldList *fields = new TFieldList; + TSourceLoc loc; + for (auto field : var.fields) + { + fields->push_back(new TField(nullptr, new TString(field.name.c_str()), loc)); + } + TStructure *structure = new TStructure(new TString(var.structName.c_str()), fields); + TType type; + type.setStruct(structure); + for (int fieldIndex = 0; fieldIndex < static_cast(var.fields.size()); ++fieldIndex) + { + TIntermBinary *assign = new TIntermBinary(EOpAssign); + sequence->insert(sequence->begin(), assign); + + TIntermBinary *indexDirectStruct = new TIntermBinary(EOpIndexDirectStruct); + TIntermSymbol *symbol = new TIntermSymbol(0, name, type); + indexDirectStruct->setLeft(symbol); + TIntermConstantUnion *indexNode = constructIndexNode(fieldIndex); + indexDirectStruct->setRight(indexNode); + assign->setLeft(indexDirectStruct); + + const sh::ShaderVariable &field = var.fields[fieldIndex]; + TType fieldType = sh::ConvertShaderVariableTypeToTType(field.type); + TIntermConstantUnion *zeroConst = constructConstUnionNode(fieldType); + assign->setRight(zeroConst); + } } else { - TType type = sh::GetShaderVariableBasicType(var); - TIntermSymbol *symbol = new TIntermSymbol(0, name, type); - TIntermTyped *zero = TIntermTyped::CreateZero(type); - - TIntermBinary *assign = new TIntermBinary(EOpAssign, symbol, zero); + TType type = sh::ConvertShaderVariableTypeToTType(var.type); + TIntermBinary *assign = new TIntermBinary(EOpAssign); sequence->insert(sequence->begin(), assign); + TIntermSymbol *symbol = new TIntermSymbol(0, name, type); + assign->setLeft(symbol); + TIntermConstantUnion *zeroConst = constructConstUnionNode(type); + assign->setRight(zeroConst); } + } } } // namespace anonymous -void InitializeVariables(TIntermNode *root, - const InitVariableList &vars, - const TSymbolTable &symbolTable) +void InitializeVariables(TIntermNode *root, const InitVariableList &vars) { - VariableInitializer initializer(vars, symbolTable); + VariableInitializer initializer(vars); root->traverse(&initializer); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/InitializeVariables.h b/gfx/angle/src/compiler/translator/InitializeVariables.h index 9a34245a5..f826032d3 100755 --- a/gfx/angle/src/compiler/translator/InitializeVariables.h +++ b/gfx/angle/src/compiler/translator/InitializeVariables.h @@ -9,23 +9,10 @@ #include -namespace sh -{ class TIntermNode; -class TSymbolTable; typedef std::vector InitVariableList; -// Currently this function is only capable of initializing variables of basic types, -// array of basic types, or struct of basic types. -// For now it is used for the following two scenarios: -// 1. initializing gl_Position; -// 2. initializing ESSL 3.00 shaders' output variables (which might be structs). -// Specifically, it's not feasible to make it work for local variables because if their -// types are structs, we can't look into TSymbolTable to find the TType data. -void InitializeVariables(TIntermNode *root, - const InitVariableList &vars, - const TSymbolTable &symbolTable); -} // namespace sh +void InitializeVariables(TIntermNode *root, const InitVariableList &vars); #endif // COMPILER_TRANSLATOR_INITIALIZEVARIABLES_H_ diff --git a/gfx/angle/src/compiler/translator/IntermNode.cpp b/gfx/angle/src/compiler/translator/IntermNode.cpp index b91b43ecf..dcf47879a 100755 --- a/gfx/angle/src/compiler/translator/IntermNode.cpp +++ b/gfx/angle/src/compiler/translator/IntermNode.cpp @@ -21,10 +21,6 @@ #include "compiler/translator/HashNames.h" #include "compiler/translator/IntermNode.h" #include "compiler/translator/SymbolTable.h" -#include "compiler/translator/util.h" - -namespace sh -{ namespace { @@ -47,14 +43,13 @@ TConstantUnion *Vectorize(const TConstantUnion &constant, size_t size) return constUnion; } -void UndefinedConstantFoldingError(const TSourceLoc &loc, - TOperator op, - TBasicType basicType, - TDiagnostics *diagnostics, - TConstantUnion *result) +void UndefinedConstantFoldingError(const TSourceLoc &loc, TOperator op, TBasicType basicType, + TInfoSink &infoSink, TConstantUnion *result) { - diagnostics->warning(loc, "operation result is undefined for the values passed in", - GetOperatorString(op), ""); + std::stringstream constantFoldingErrorStream; + constantFoldingErrorStream << "'" << GetOperatorString(op) + << "' operation result is undefined for the values passed in"; + infoSink.info.message(EPrefixWarning, loc, constantFoldingErrorStream.str().c_str()); switch (basicType) { @@ -96,7 +91,7 @@ float VectorDotProduct(const TConstantUnion *paramArray1, return result; } -TIntermTyped *CreateFoldedNode(const TConstantUnion *constArray, +TIntermTyped *CreateFoldedNode(TConstantUnion *constArray, const TIntermTyped *originalNode, TQualifier qualifier) { @@ -173,7 +168,7 @@ bool TIntermLoop::replaceChildNode( REPLACE_IF_IS(mInit, TIntermNode, original, replacement); REPLACE_IF_IS(mCond, TIntermTyped, original, replacement); REPLACE_IF_IS(mExpr, TIntermTyped, original, replacement); - REPLACE_IF_IS(mBody, TIntermBlock, original, replacement); + REPLACE_IF_IS(mBody, TIntermAggregate, original, replacement); return false; } @@ -184,13 +179,6 @@ bool TIntermBranch::replaceChildNode( return false; } -bool TIntermSwizzle::replaceChildNode(TIntermNode *original, TIntermNode *replacement) -{ - ASSERT(original->getAsTyped()->getType() == replacement->getAsTyped()->getType()); - REPLACE_IF_IS(mOperand, TIntermTyped, original, replacement); - return false; -} - bool TIntermBinary::replaceChildNode( TIntermNode *original, TIntermNode *replacement) { @@ -202,67 +190,42 @@ bool TIntermBinary::replaceChildNode( bool TIntermUnary::replaceChildNode( TIntermNode *original, TIntermNode *replacement) { - ASSERT(original->getAsTyped()->getType() == replacement->getAsTyped()->getType()); REPLACE_IF_IS(mOperand, TIntermTyped, original, replacement); return false; } -bool TIntermFunctionDefinition::replaceChildNode(TIntermNode *original, TIntermNode *replacement) -{ - REPLACE_IF_IS(mParameters, TIntermAggregate, original, replacement); - REPLACE_IF_IS(mBody, TIntermBlock, original, replacement); - return false; -} - bool TIntermAggregate::replaceChildNode( TIntermNode *original, TIntermNode *replacement) { - return replaceChildNodeInternal(original, replacement); -} - -bool TIntermBlock::replaceChildNode(TIntermNode *original, TIntermNode *replacement) -{ - return replaceChildNodeInternal(original, replacement); -} - -bool TIntermDeclaration::replaceChildNode(TIntermNode *original, TIntermNode *replacement) -{ - return replaceChildNodeInternal(original, replacement); -} - -bool TIntermAggregateBase::replaceChildNodeInternal(TIntermNode *original, TIntermNode *replacement) -{ - for (size_t ii = 0; ii < getSequence()->size(); ++ii) + for (size_t ii = 0; ii < mSequence.size(); ++ii) { - REPLACE_IF_IS((*getSequence())[ii], TIntermNode, original, replacement); + REPLACE_IF_IS(mSequence[ii], TIntermNode, original, replacement); } return false; } -bool TIntermAggregateBase::replaceChildNodeWithMultiple(TIntermNode *original, - const TIntermSequence &replacements) +bool TIntermAggregate::replaceChildNodeWithMultiple(TIntermNode *original, TIntermSequence replacements) { - for (auto it = getSequence()->begin(); it < getSequence()->end(); ++it) + for (auto it = mSequence.begin(); it < mSequence.end(); ++it) { if (*it == original) { - it = getSequence()->erase(it); - getSequence()->insert(it, replacements.begin(), replacements.end()); + it = mSequence.erase(it); + mSequence.insert(it, replacements.begin(), replacements.end()); return true; } } return false; } -bool TIntermAggregateBase::insertChildNodes(TIntermSequence::size_type position, - const TIntermSequence &insertions) +bool TIntermAggregate::insertChildNodes(TIntermSequence::size_type position, TIntermSequence insertions) { - if (position > getSequence()->size()) + if (position > mSequence.size()) { return false; } - auto it = getSequence()->begin() + position; - getSequence()->insert(it, insertions.begin(), insertions.end()); + auto it = mSequence.begin() + position; + mSequence.insert(it, insertions.begin(), insertions.end()); return true; } @@ -320,47 +283,18 @@ void TIntermAggregate::setBuiltInFunctionPrecision() } // ESSL 3.0 spec section 8: textureSize always gets highp precision. // All other functions that take a sampler are assumed to be texture functions. - if (mFunctionInfo.getName().find("textureSize") == 0) + if (mName.getString().find("textureSize") == 0) mType.setPrecision(EbpHigh); else mType.setPrecision(precision); } -void TIntermBlock::appendStatement(TIntermNode *statement) -{ - // Declaration nodes with no children can appear if all the declarators just added constants to - // the symbol table instead of generating code. They're no-ops so they aren't added to blocks. - if (statement != nullptr && (statement->getAsDeclarationNode() == nullptr || - !statement->getAsDeclarationNode()->getSequence()->empty())) - { - mStatements.push_back(statement); - } -} - -void TIntermDeclaration::appendDeclarator(TIntermTyped *declarator) -{ - ASSERT(declarator != nullptr); - ASSERT(declarator->getAsSymbolNode() != nullptr || - (declarator->getAsBinaryNode() != nullptr && - declarator->getAsBinaryNode()->getOp() == EOpInitialize)); - ASSERT(mDeclarators.empty() || - declarator->getType().sameElementType(mDeclarators.back()->getAsTyped()->getType())); - mDeclarators.push_back(declarator); -} - -bool TIntermTernary::replaceChildNode(TIntermNode *original, TIntermNode *replacement) -{ - REPLACE_IF_IS(mCondition, TIntermTyped, original, replacement); - REPLACE_IF_IS(mTrueExpression, TIntermTyped, original, replacement); - REPLACE_IF_IS(mFalseExpression, TIntermTyped, original, replacement); - return false; -} - -bool TIntermIfElse::replaceChildNode(TIntermNode *original, TIntermNode *replacement) +bool TIntermSelection::replaceChildNode( + TIntermNode *original, TIntermNode *replacement) { REPLACE_IF_IS(mCondition, TIntermTyped, original, replacement); - REPLACE_IF_IS(mTrueBlock, TIntermBlock, original, replacement); - REPLACE_IF_IS(mFalseBlock, TIntermBlock, original, replacement); + REPLACE_IF_IS(mTrueBlock, TIntermNode, original, replacement); + REPLACE_IF_IS(mFalseBlock, TIntermNode, original, replacement); return false; } @@ -368,7 +302,7 @@ bool TIntermSwitch::replaceChildNode( TIntermNode *original, TIntermNode *replacement) { REPLACE_IF_IS(mInit, TIntermTyped, original, replacement); - REPLACE_IF_IS(mStatementList, TIntermBlock, original, replacement); + REPLACE_IF_IS(mStatementList, TIntermAggregate, original, replacement); return false; } @@ -402,100 +336,18 @@ bool TIntermTyped::isConstructorWithOnlyConstantUnionParameters() return true; } -// static -TIntermTyped *TIntermTyped::CreateIndexNode(int index) -{ - TConstantUnion *u = new TConstantUnion[1]; - u[0].setIConst(index); - - TType type(EbtInt, EbpUndefined, EvqConst, 1); - TIntermConstantUnion *node = new TIntermConstantUnion(u, type); - return node; -} - -// static -TIntermTyped *TIntermTyped::CreateZero(const TType &type) -{ - TType constType(type); - constType.setQualifier(EvqConst); - - if (!type.isArray() && type.getBasicType() != EbtStruct) - { - ASSERT(type.isScalar() || type.isVector() || type.isMatrix()); - - size_t size = constType.getObjectSize(); - TConstantUnion *u = new TConstantUnion[size]; - for (size_t i = 0; i < size; ++i) - { - switch (type.getBasicType()) - { - case EbtFloat: - u[i].setFConst(0.0f); - break; - case EbtInt: - u[i].setIConst(0); - break; - case EbtUInt: - u[i].setUConst(0u); - break; - case EbtBool: - u[i].setBConst(false); - break; - default: - UNREACHABLE(); - return nullptr; - } - } - - TIntermConstantUnion *node = new TIntermConstantUnion(u, constType); - return node; - } - - TIntermAggregate *constructor = new TIntermAggregate(sh::TypeToConstructorOperator(type)); - constructor->setType(constType); - - if (type.isArray()) - { - TType elementType(type); - elementType.clearArrayness(); - - size_t arraySize = type.getArraySize(); - for (size_t i = 0; i < arraySize; ++i) - { - constructor->getSequence()->push_back(CreateZero(elementType)); - } - } - else - { - ASSERT(type.getBasicType() == EbtStruct); - - TStructure *structure = type.getStruct(); - for (const auto &field : structure->fields()) - { - constructor->getSequence()->push_back(CreateZero(*field->type())); - } - } - - return constructor; -} - TIntermConstantUnion::TIntermConstantUnion(const TIntermConstantUnion &node) : TIntermTyped(node) { mUnionArrayPointer = node.mUnionArrayPointer; } -void TFunctionSymbolInfo::setFromFunction(const TFunction &function) -{ - setName(function.getMangledName()); - setId(function.getUniqueId()); -} - TIntermAggregate::TIntermAggregate(const TIntermAggregate &node) : TIntermOperator(node), + mName(node.mName), mUserDefined(node.mUserDefined), + mFunctionId(node.mFunctionId), mUseEmulatedFunction(node.mUseEmulatedFunction), - mGotPrecisionFromChildren(node.mGotPrecisionFromChildren), - mFunctionInfo(node.mFunctionInfo) + mGotPrecisionFromChildren(node.mGotPrecisionFromChildren) { for (TIntermNode *child : node.mSequence) { @@ -506,13 +358,6 @@ TIntermAggregate::TIntermAggregate(const TIntermAggregate &node) } } -TIntermSwizzle::TIntermSwizzle(const TIntermSwizzle &node) : TIntermTyped(node) -{ - TIntermTyped *operandCopy = node.mOperand->deepCopy(); - ASSERT(operandCopy != nullptr); - mOperand = operandCopy; -} - TIntermBinary::TIntermBinary(const TIntermBinary &node) : TIntermOperator(node), mAddIndexClamp(node.mAddIndexClamp) { @@ -531,15 +376,20 @@ TIntermUnary::TIntermUnary(const TIntermUnary &node) mOperand = operandCopy; } -TIntermTernary::TIntermTernary(const TIntermTernary &node) : TIntermTyped(node) +TIntermSelection::TIntermSelection(const TIntermSelection &node) : TIntermTyped(node) { + // Only supported for ternary nodes, not if statements. + TIntermTyped *trueTyped = node.mTrueBlock->getAsTyped(); + TIntermTyped *falseTyped = node.mFalseBlock->getAsTyped(); + ASSERT(trueTyped != nullptr); + ASSERT(falseTyped != nullptr); TIntermTyped *conditionCopy = node.mCondition->deepCopy(); - TIntermTyped *trueCopy = node.mTrueExpression->deepCopy(); - TIntermTyped *falseCopy = node.mFalseExpression->deepCopy(); + TIntermTyped *trueCopy = trueTyped->deepCopy(); + TIntermTyped *falseCopy = falseTyped->deepCopy(); ASSERT(conditionCopy != nullptr && trueCopy != nullptr && falseCopy != nullptr); - mCondition = conditionCopy; - mTrueExpression = trueCopy; - mFalseExpression = falseCopy; + mCondition = conditionCopy; + mTrueBlock = trueCopy; + mFalseBlock = falseCopy; } bool TIntermOperator::isAssignment() const @@ -694,187 +544,77 @@ TOperator TIntermBinary::GetMulAssignOpBasedOnOperands(const TType &left, const // Make sure the type of a unary operator is appropriate for its // combination of operation and operand type. // -void TIntermUnary::promote() +void TIntermUnary::promote(const TType *funcReturnType) { - TQualifier resultQualifier = EvqTemporary; - if (mOperand->getQualifier() == EvqConst) - resultQualifier = EvqConst; - - unsigned char operandPrimarySize = - static_cast(mOperand->getType().getNominalSize()); switch (mOp) { - case EOpFloatBitsToInt: - setType(TType(EbtInt, EbpHigh, resultQualifier, operandPrimarySize)); - break; - case EOpFloatBitsToUint: - setType(TType(EbtUInt, EbpHigh, resultQualifier, operandPrimarySize)); - break; - case EOpIntBitsToFloat: - case EOpUintBitsToFloat: - setType(TType(EbtFloat, EbpHigh, resultQualifier, operandPrimarySize)); - break; - case EOpPackSnorm2x16: - case EOpPackUnorm2x16: - case EOpPackHalf2x16: - setType(TType(EbtUInt, EbpHigh, resultQualifier)); - break; - case EOpUnpackSnorm2x16: - case EOpUnpackUnorm2x16: - setType(TType(EbtFloat, EbpHigh, resultQualifier, 2)); - break; - case EOpUnpackHalf2x16: - setType(TType(EbtFloat, EbpMedium, resultQualifier, 2)); - break; - case EOpAny: - case EOpAll: - setType(TType(EbtBool, EbpUndefined, resultQualifier)); - break; - case EOpLength: - case EOpDeterminant: - setType(TType(EbtFloat, mOperand->getType().getPrecision(), resultQualifier)); - break; - case EOpTranspose: - setType(TType(EbtFloat, mOperand->getType().getPrecision(), resultQualifier, - static_cast(mOperand->getType().getRows()), - static_cast(mOperand->getType().getCols()))); - break; - case EOpIsInf: - case EOpIsNan: - setType(TType(EbtBool, EbpUndefined, resultQualifier, operandPrimarySize)); - break; - default: - setType(mOperand->getType()); - mType.setQualifier(resultQualifier); - break; - } -} - -TIntermSwizzle::TIntermSwizzle(TIntermTyped *operand, const TVector &swizzleOffsets) - : TIntermTyped(TType(EbtFloat, EbpUndefined)), - mOperand(operand), - mSwizzleOffsets(swizzleOffsets) -{ - ASSERT(mSwizzleOffsets.size() <= 4); - promote(); -} - -TIntermUnary::TIntermUnary(TOperator op, TIntermTyped *operand) - : TIntermOperator(op), mOperand(operand), mUseEmulatedFunction(false) -{ - promote(); -} - -TIntermBinary::TIntermBinary(TOperator op, TIntermTyped *left, TIntermTyped *right) - : TIntermOperator(op), mLeft(left), mRight(right), mAddIndexClamp(false) -{ - promote(); -} - -TIntermTernary::TIntermTernary(TIntermTyped *cond, - TIntermTyped *trueExpression, - TIntermTyped *falseExpression) - : TIntermTyped(trueExpression->getType()), - mCondition(cond), - mTrueExpression(trueExpression), - mFalseExpression(falseExpression) -{ - getTypePointer()->setQualifier( - TIntermTernary::DetermineQualifier(cond, trueExpression, falseExpression)); -} - -// static -TQualifier TIntermTernary::DetermineQualifier(TIntermTyped *cond, - TIntermTyped *trueExpression, - TIntermTyped *falseExpression) -{ - if (cond->getQualifier() == EvqConst && trueExpression->getQualifier() == EvqConst && - falseExpression->getQualifier() == EvqConst) - { - return EvqConst; + case EOpFloatBitsToInt: + case EOpFloatBitsToUint: + case EOpIntBitsToFloat: + case EOpUintBitsToFloat: + case EOpPackSnorm2x16: + case EOpPackUnorm2x16: + case EOpPackHalf2x16: + case EOpUnpackSnorm2x16: + case EOpUnpackUnorm2x16: + mType.setPrecision(EbpHigh); + break; + case EOpUnpackHalf2x16: + mType.setPrecision(EbpMedium); + break; + default: + setType(mOperand->getType()); } - return EvqTemporary; -} - -void TIntermSwizzle::promote() -{ - TQualifier resultQualifier = EvqTemporary; - if (mOperand->getQualifier() == EvqConst) - resultQualifier = EvqConst; - auto numFields = mSwizzleOffsets.size(); - setType(TType(mOperand->getBasicType(), mOperand->getPrecision(), resultQualifier, - static_cast(numFields))); -} - -bool TIntermSwizzle::hasDuplicateOffsets() const -{ - int offsetCount[4] = {0u, 0u, 0u, 0u}; - for (const auto offset : mSwizzleOffsets) + if (funcReturnType != nullptr) { - offsetCount[offset]++; - if (offsetCount[offset] > 1) + if (funcReturnType->getBasicType() == EbtBool) { - return true; + // Bool types should not have precision. + setType(*funcReturnType); } - } - return false; -} - -void TIntermSwizzle::writeOffsetsAsXYZW(TInfoSinkBase *out) const -{ - for (const int offset : mSwizzleOffsets) - { - switch (offset) + else { - case 0: - *out << "x"; - break; - case 1: - *out << "y"; - break; - case 2: - *out << "z"; - break; - case 3: - *out << "w"; - break; - default: - UNREACHABLE(); + // Precision of the node has been set based on the operand. + setTypePreservePrecision(*funcReturnType); } } + + if (mOperand->getQualifier() == EvqConst) + mType.setQualifier(EvqConst); + else + mType.setQualifier(EvqTemporary); } -TQualifier TIntermBinary::GetCommaQualifier(int shaderVersion, - const TIntermTyped *left, - const TIntermTyped *right) +TIntermBinary::TIntermBinary(TOperator op, TIntermTyped *left, TIntermTyped *right) + : TIntermOperator(op), mLeft(left), mRight(right), mAddIndexClamp(false) { - // ESSL3.00 section 12.43: The result of a sequence operator is not a constant-expression. - if (shaderVersion >= 300 || left->getQualifier() != EvqConst || - right->getQualifier() != EvqConst) - { - return EvqTemporary; - } - return EvqConst; + promote(); } -// Establishes the type of the result of the binary operation. +// +// Establishes the type of the resultant operation, as well as +// makes the operator the correct one for the operands. +// +// For lots of operations it should already be established that the operand +// combination is valid, but returns false if operator can't work on operands. +// void TIntermBinary::promote() { + ASSERT(mLeft->isArray() == mRight->isArray()); + ASSERT(!isMultiplication() || mOp == GetMulOpBasedOnOperands(mLeft->getType(), mRight->getType())); - // Comma is handled as a special case. - if (mOp == EOpComma) - { - setType(mRight->getType()); - return; - } - // Base assumption: just make the type the same as the left // operand. Then only deviations from this need be coded. setType(mLeft->getType()); + // The result gets promoted to the highest precision. + TPrecision higherPrecision = GetHigherPrecision( + mLeft->getPrecision(), mRight->getPrecision()); + getTypePointer()->setPrecision(higherPrecision); + TQualifier resultQualifier = EvqConst; // Binary operations results in temporary variables unless both // operands are const. @@ -884,55 +624,6 @@ void TIntermBinary::promote() getTypePointer()->setQualifier(EvqTemporary); } - // Handle indexing ops. - switch (mOp) - { - case EOpIndexDirect: - case EOpIndexIndirect: - if (mLeft->isArray()) - { - mType.clearArrayness(); - } - else if (mLeft->isMatrix()) - { - setType(TType(mLeft->getBasicType(), mLeft->getPrecision(), resultQualifier, - static_cast(mLeft->getRows()))); - } - else if (mLeft->isVector()) - { - setType(TType(mLeft->getBasicType(), mLeft->getPrecision(), resultQualifier)); - } - else - { - UNREACHABLE(); - } - return; - case EOpIndexDirectStruct: - { - const TFieldList &fields = mLeft->getType().getStruct()->fields(); - const int i = mRight->getAsConstantUnion()->getIConst(0); - setType(*fields[i]->type()); - getTypePointer()->setQualifier(resultQualifier); - return; - } - case EOpIndexDirectInterfaceBlock: - { - const TFieldList &fields = mLeft->getType().getInterfaceBlock()->fields(); - const int i = mRight->getAsConstantUnion()->getIConst(0); - setType(*fields[i]->type()); - getTypePointer()->setQualifier(resultQualifier); - return; - } - default: - break; - } - - ASSERT(mLeft->isArray() == mRight->isArray()); - - // The result gets promoted to the highest precision. - TPrecision higherPrecision = GetHigherPrecision(mLeft->getPrecision(), mRight->getPrecision()); - getTypePointer()->setPrecision(higherPrecision); - const int nominalSize = std::max(mLeft->getNominalSize(), mRight->getNominalSize()); @@ -952,8 +643,8 @@ void TIntermBinary::promote() case EOpGreaterThan: case EOpLessThanEqual: case EOpGreaterThanEqual: - setType(TType(EbtBool, EbpUndefined, resultQualifier)); - break; + setType(TType(EbtBool, EbpUndefined)); + break; // // And and Or operate on conditionals @@ -962,7 +653,7 @@ void TIntermBinary::promote() case EOpLogicalXor: case EOpLogicalOr: ASSERT(mLeft->getBasicType() == EbtBool && mRight->getBasicType() == EbtBool); - setType(TType(EbtBool, EbpUndefined, resultQualifier)); + setType(TType(EbtBool, EbpUndefined)); break; default: @@ -1058,7 +749,8 @@ void TIntermBinary::promote() case EOpIndexIndirect: case EOpIndexDirectInterfaceBlock: case EOpIndexDirectStruct: - // These ops should be already fully handled. + // TODO (oetuaho): These ops could be handled here as well (should be done closer to the + // top of the function). UNREACHABLE(); break; default: @@ -1067,35 +759,26 @@ void TIntermBinary::promote() } } -const TConstantUnion *TIntermConstantUnion::foldIndexing(int index) +TIntermTyped *TIntermBinary::fold(TDiagnostics *diagnostics) { - if (isArray()) - { - ASSERT(index < static_cast(getType().getArraySize())); - TType arrayElementType = getType(); - arrayElementType.clearArrayness(); - size_t arrayElementSize = arrayElementType.getObjectSize(); - return &mUnionArrayPointer[arrayElementSize * index]; - } - else if (isMatrix()) - { - ASSERT(index < getType().getCols()); - int size = getType().getRows(); - return &mUnionArrayPointer[size * index]; - } - else if (isVector()) + TIntermConstantUnion *leftConstant = mLeft->getAsConstantUnion(); + TIntermConstantUnion *rightConstant = mRight->getAsConstantUnion(); + if (leftConstant == nullptr || rightConstant == nullptr) { - ASSERT(index < getType().getNominalSize()); - return &mUnionArrayPointer[index]; + return nullptr; } - else + TConstantUnion *constArray = leftConstant->foldBinary(mOp, rightConstant, diagnostics); + + // Nodes may be constant folded without being qualified as constant. + TQualifier resultQualifier = EvqConst; + if (mLeft->getQualifier() != EvqConst || mRight->getQualifier() != EvqConst) { - UNREACHABLE(); - return nullptr; + resultQualifier = EvqTemporary; } + return CreateFoldedNode(constArray, this, resultQualifier); } -TIntermTyped *TIntermSwizzle::fold() +TIntermTyped *TIntermUnary::fold(TInfoSink &infoSink) { TIntermConstantUnion *operandConstant = mOperand->getAsConstantUnion(); if (operandConstant == nullptr) @@ -1103,117 +786,48 @@ TIntermTyped *TIntermSwizzle::fold() return nullptr; } - TConstantUnion *constArray = new TConstantUnion[mSwizzleOffsets.size()]; - for (size_t i = 0; i < mSwizzleOffsets.size(); ++i) + TConstantUnion *constArray = nullptr; + switch (mOp) { - constArray[i] = *operandConstant->foldIndexing(mSwizzleOffsets.at(i)); + case EOpAny: + case EOpAll: + case EOpLength: + case EOpTranspose: + case EOpDeterminant: + case EOpInverse: + case EOpPackSnorm2x16: + case EOpUnpackSnorm2x16: + case EOpPackUnorm2x16: + case EOpUnpackUnorm2x16: + case EOpPackHalf2x16: + case EOpUnpackHalf2x16: + constArray = operandConstant->foldUnaryWithDifferentReturnType(mOp, infoSink); + break; + default: + constArray = operandConstant->foldUnaryWithSameReturnType(mOp, infoSink); + break; } - return CreateFoldedNode(constArray, this, mType.getQualifier()); + + // Nodes may be constant folded without being qualified as constant. + TQualifier resultQualifier = mOperand->getQualifier() == EvqConst ? EvqConst : EvqTemporary; + return CreateFoldedNode(constArray, this, resultQualifier); } -TIntermTyped *TIntermBinary::fold(TDiagnostics *diagnostics) +TIntermTyped *TIntermAggregate::fold(TInfoSink &infoSink) { - TIntermConstantUnion *leftConstant = mLeft->getAsConstantUnion(); - TIntermConstantUnion *rightConstant = mRight->getAsConstantUnion(); - switch (mOp) + // Make sure that all params are constant before actual constant folding. + for (auto *param : *getSequence()) { - case EOpIndexDirect: + if (param->getAsConstantUnion() == nullptr) { - if (leftConstant == nullptr || rightConstant == nullptr) - { - return nullptr; - } - int index = rightConstant->getIConst(0); - - const TConstantUnion *constArray = leftConstant->foldIndexing(index); - return CreateFoldedNode(constArray, this, mType.getQualifier()); + return nullptr; } - case EOpIndexDirectStruct: - { - if (leftConstant == nullptr || rightConstant == nullptr) - { - return nullptr; - } - const TFieldList &fields = mLeft->getType().getStruct()->fields(); - size_t index = static_cast(rightConstant->getIConst(0)); - - size_t previousFieldsSize = 0; - for (size_t i = 0; i < index; ++i) - { - previousFieldsSize += fields[i]->type()->getObjectSize(); - } - - const TConstantUnion *constArray = leftConstant->getUnionArrayPointer(); - return CreateFoldedNode(constArray + previousFieldsSize, this, mType.getQualifier()); - } - case EOpIndexIndirect: - case EOpIndexDirectInterfaceBlock: - // Can never be constant folded. - return nullptr; - default: - { - if (leftConstant == nullptr || rightConstant == nullptr) - { - return nullptr; - } - TConstantUnion *constArray = - leftConstant->foldBinary(mOp, rightConstant, diagnostics, mLeft->getLine()); - - // Nodes may be constant folded without being qualified as constant. - return CreateFoldedNode(constArray, this, mType.getQualifier()); - } - } -} - -TIntermTyped *TIntermUnary::fold(TDiagnostics *diagnostics) -{ - TIntermConstantUnion *operandConstant = mOperand->getAsConstantUnion(); - if (operandConstant == nullptr) - { - return nullptr; - } - - TConstantUnion *constArray = nullptr; - switch (mOp) - { - case EOpAny: - case EOpAll: - case EOpLength: - case EOpTranspose: - case EOpDeterminant: - case EOpInverse: - case EOpPackSnorm2x16: - case EOpUnpackSnorm2x16: - case EOpPackUnorm2x16: - case EOpUnpackUnorm2x16: - case EOpPackHalf2x16: - case EOpUnpackHalf2x16: - constArray = operandConstant->foldUnaryNonComponentWise(mOp); - break; - default: - constArray = operandConstant->foldUnaryComponentWise(mOp, diagnostics); - break; - } - - // Nodes may be constant folded without being qualified as constant. - return CreateFoldedNode(constArray, this, mType.getQualifier()); -} - -TIntermTyped *TIntermAggregate::fold(TDiagnostics *diagnostics) -{ - // Make sure that all params are constant before actual constant folding. - for (auto *param : *getSequence()) - { - if (param->getAsConstantUnion() == nullptr) - { - return nullptr; - } - } - TConstantUnion *constArray = nullptr; - if (isConstructor()) - constArray = TIntermConstantUnion::FoldAggregateConstructor(this); - else - constArray = TIntermConstantUnion::FoldAggregateBuiltIn(this, diagnostics); + } + TConstantUnion *constArray = nullptr; + if (isConstructor()) + constArray = TIntermConstantUnion::FoldAggregateConstructor(this, infoSink); + else + constArray = TIntermConstantUnion::FoldAggregateBuiltIn(this, infoSink); // Nodes may be constant folded without being qualified as constant. TQualifier resultQualifier = areChildrenConstQualified() ? EvqConst : EvqTemporary; @@ -1228,13 +842,15 @@ TIntermTyped *TIntermAggregate::fold(TDiagnostics *diagnostics) // TConstantUnion *TIntermConstantUnion::foldBinary(TOperator op, TIntermConstantUnion *rightNode, - TDiagnostics *diagnostics, - const TSourceLoc &line) + TDiagnostics *diagnostics) { const TConstantUnion *leftArray = getUnionArrayPointer(); const TConstantUnion *rightArray = rightNode->getUnionArrayPointer(); - ASSERT(leftArray && rightArray); + if (!leftArray) + return nullptr; + if (!rightArray) + return nullptr; size_t objectSize = getType().getObjectSize(); @@ -1257,12 +873,12 @@ TConstantUnion *TIntermConstantUnion::foldBinary(TOperator op, case EOpAdd: resultArray = new TConstantUnion[objectSize]; for (size_t i = 0; i < objectSize; i++) - resultArray[i] = TConstantUnion::add(leftArray[i], rightArray[i], diagnostics, line); + resultArray[i] = leftArray[i] + rightArray[i]; break; case EOpSub: resultArray = new TConstantUnion[objectSize]; for (size_t i = 0; i < objectSize; i++) - resultArray[i] = TConstantUnion::sub(leftArray[i], rightArray[i], diagnostics, line); + resultArray[i] = leftArray[i] - rightArray[i]; break; case EOpMul: @@ -1270,12 +886,11 @@ TConstantUnion *TIntermConstantUnion::foldBinary(TOperator op, case EOpMatrixTimesScalar: resultArray = new TConstantUnion[objectSize]; for (size_t i = 0; i < objectSize; i++) - resultArray[i] = TConstantUnion::mul(leftArray[i], rightArray[i], diagnostics, line); + resultArray[i] = leftArray[i] * rightArray[i]; break; case EOpMatrixTimesMatrix: { - // TODO(jmadll): This code should check for overflows. ASSERT(getType().getBasicType() == EbtFloat && rightNode->getBasicType() == EbtFloat); const int leftCols = getCols(); @@ -1334,42 +949,14 @@ TConstantUnion *TIntermConstantUnion::foldBinary(TOperator op, } else { - int lhs = leftArray[i].getIConst(); - int divisor = rightArray[i].getIConst(); if (op == EOpDiv) { - // Check for the special case where the minimum representable number is - // divided by -1. If left alone this leads to integer overflow in C++. - // ESSL 3.00.6 section 4.1.3 Integers: - // "However, for the case where the minimum representable value is - // divided by -1, it is allowed to return either the minimum - // representable value or the maximum representable value." - if (lhs == -0x7fffffff - 1 && divisor == -1) - { - resultArray[i].setIConst(0x7fffffff); - } - else - { - resultArray[i].setIConst(lhs / divisor); - } + resultArray[i].setIConst(leftArray[i].getIConst() / rightArray[i].getIConst()); } else { ASSERT(op == EOpIMod); - if (lhs < 0 || divisor < 0) - { - // ESSL 3.00.6 section 5.9: Results of modulus are undefined when - // either one of the operands is negative. - diagnostics->warning(getLine(), - "Negative modulus operator operand " - "encountered during constant folding", - "%", ""); - resultArray[i].setIConst(0); - } - else - { - resultArray[i].setIConst(lhs % divisor); - } + resultArray[i].setIConst(leftArray[i].getIConst() % rightArray[i].getIConst()); } } break; @@ -1405,7 +992,6 @@ TConstantUnion *TIntermConstantUnion::foldBinary(TOperator op, case EOpMatrixTimesVector: { - // TODO(jmadll): This code should check for overflows. ASSERT(rightNode->getBasicType() == EbtFloat); const int matrixCols = getCols(); @@ -1428,7 +1014,6 @@ TConstantUnion *TIntermConstantUnion::foldBinary(TOperator op, case EOpVectorTimesMatrix: { - // TODO(jmadll): This code should check for overflows. ASSERT(getType().getBasicType() == EbtFloat); const int matrixCols = rightNode->getType().getCols(); @@ -1498,12 +1083,12 @@ TConstantUnion *TIntermConstantUnion::foldBinary(TOperator op, case EOpBitShiftLeft: resultArray = new TConstantUnion[objectSize]; for (size_t i = 0; i < objectSize; i++) - resultArray[i] = TConstantUnion::lshift(leftArray[i], rightArray[i], diagnostics, line); + resultArray[i] = leftArray[i] << rightArray[i]; break; case EOpBitShiftRight: resultArray = new TConstantUnion[objectSize]; for (size_t i = 0; i < objectSize; i++) - resultArray[i] = TConstantUnion::rshift(leftArray[i], rightArray[i], diagnostics, line); + resultArray[i] = leftArray[i] >> rightArray[i]; break; case EOpLessThan: @@ -1561,22 +1146,29 @@ TConstantUnion *TIntermConstantUnion::foldBinary(TOperator op, return resultArray; } -// The fold functions do operations on a constant at GLSL compile time, without generating run-time -// code. Returns the constant value to keep using. Nullptr should not be returned. -TConstantUnion *TIntermConstantUnion::foldUnaryNonComponentWise(TOperator op) +// +// The fold functions see if an operation on a constant can be done in place, +// without generating run-time code. +// +// Returns the constant value to keep using or nullptr. +// +TConstantUnion *TIntermConstantUnion::foldUnaryWithDifferentReturnType(TOperator op, TInfoSink &infoSink) { - // Do operations where the return type may have a different number of components compared to the - // operand type. + // + // Do operations where the return type has a different number of components compared to the operand type. + // const TConstantUnion *operandArray = getUnionArrayPointer(); - ASSERT(operandArray); + if (!operandArray) + return nullptr; size_t objectSize = getType().getObjectSize(); TConstantUnion *resultArray = nullptr; switch (op) { - case EOpAny: - ASSERT(getType().getBasicType() == EbtBool); + case EOpAny: + if (getType().getBasicType() == EbtBool) + { resultArray = new TConstantUnion(); resultArray->setBConst(false); for (size_t i = 0; i < objectSize; i++) @@ -1588,9 +1180,16 @@ TConstantUnion *TIntermConstantUnion::foldUnaryNonComponentWise(TOperator op) } } break; + } + else + { + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; + } - case EOpAll: - ASSERT(getType().getBasicType() == EbtBool); + case EOpAll: + if (getType().getBasicType() == EbtBool) + { resultArray = new TConstantUnion(); resultArray->setBConst(true); for (size_t i = 0; i < objectSize; i++) @@ -1602,55 +1201,89 @@ TConstantUnion *TIntermConstantUnion::foldUnaryNonComponentWise(TOperator op) } } break; + } + else + { + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; + } - case EOpLength: - ASSERT(getType().getBasicType() == EbtFloat); + case EOpLength: + if (getType().getBasicType() == EbtFloat) + { resultArray = new TConstantUnion(); resultArray->setFConst(VectorLength(operandArray, objectSize)); break; + } + else + { + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; + } - case EOpTranspose: + case EOpTranspose: + if (getType().getBasicType() == EbtFloat) { - ASSERT(getType().getBasicType() == EbtFloat); resultArray = new TConstantUnion[objectSize]; angle::Matrix result = GetMatrix(operandArray, getType().getRows(), getType().getCols()).transpose(); SetUnionArrayFromMatrix(result, resultArray); break; } + else + { + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; + } - case EOpDeterminant: + case EOpDeterminant: + if (getType().getBasicType() == EbtFloat) { - ASSERT(getType().getBasicType() == EbtFloat); unsigned int size = getType().getNominalSize(); ASSERT(size >= 2 && size <= 4); resultArray = new TConstantUnion(); resultArray->setFConst(GetMatrix(operandArray, size).determinant()); break; } + else + { + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; + } - case EOpInverse: + case EOpInverse: + if (getType().getBasicType() == EbtFloat) { - ASSERT(getType().getBasicType() == EbtFloat); unsigned int size = getType().getNominalSize(); ASSERT(size >= 2 && size <= 4); - resultArray = new TConstantUnion[objectSize]; + resultArray = new TConstantUnion[objectSize]; angle::Matrix result = GetMatrix(operandArray, size).inverse(); SetUnionArrayFromMatrix(result, resultArray); break; } + else + { + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; + } - case EOpPackSnorm2x16: - ASSERT(getType().getBasicType() == EbtFloat); + case EOpPackSnorm2x16: + if (getType().getBasicType() == EbtFloat) + { ASSERT(getType().getNominalSize() == 2); resultArray = new TConstantUnion(); - resultArray->setUConst( - gl::packSnorm2x16(operandArray[0].getFConst(), operandArray[1].getFConst())); + resultArray->setUConst(gl::packSnorm2x16(operandArray[0].getFConst(), operandArray[1].getFConst())); break; + } + else + { + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; + } - case EOpUnpackSnorm2x16: + case EOpUnpackSnorm2x16: + if (getType().getBasicType() == EbtUInt) { - ASSERT(getType().getBasicType() == EbtUInt); resultArray = new TConstantUnion[2]; float f1, f2; gl::unpackSnorm2x16(operandArray[0].getUConst(), &f1, &f2); @@ -1658,18 +1291,29 @@ TConstantUnion *TIntermConstantUnion::foldUnaryNonComponentWise(TOperator op) resultArray[1].setFConst(f2); break; } + else + { + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; + } - case EOpPackUnorm2x16: - ASSERT(getType().getBasicType() == EbtFloat); + case EOpPackUnorm2x16: + if (getType().getBasicType() == EbtFloat) + { ASSERT(getType().getNominalSize() == 2); resultArray = new TConstantUnion(); - resultArray->setUConst( - gl::packUnorm2x16(operandArray[0].getFConst(), operandArray[1].getFConst())); + resultArray->setUConst(gl::packUnorm2x16(operandArray[0].getFConst(), operandArray[1].getFConst())); break; + } + else + { + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; + } - case EOpUnpackUnorm2x16: + case EOpUnpackUnorm2x16: + if (getType().getBasicType() == EbtUInt) { - ASSERT(getType().getBasicType() == EbtUInt); resultArray = new TConstantUnion[2]; float f1, f2; gl::unpackUnorm2x16(operandArray[0].getUConst(), &f1, &f2); @@ -1677,18 +1321,29 @@ TConstantUnion *TIntermConstantUnion::foldUnaryNonComponentWise(TOperator op) resultArray[1].setFConst(f2); break; } + else + { + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; + } - case EOpPackHalf2x16: - ASSERT(getType().getBasicType() == EbtFloat); + case EOpPackHalf2x16: + if (getType().getBasicType() == EbtFloat) + { ASSERT(getType().getNominalSize() == 2); resultArray = new TConstantUnion(); - resultArray->setUConst( - gl::packHalf2x16(operandArray[0].getFConst(), operandArray[1].getFConst())); + resultArray->setUConst(gl::packHalf2x16(operandArray[0].getFConst(), operandArray[1].getFConst())); break; + } + else + { + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; + } - case EOpUnpackHalf2x16: + case EOpUnpackHalf2x16: + if (getType().getBasicType() == EbtUInt) { - ASSERT(getType().getBasicType() == EbtUInt); resultArray = new TConstantUnion[2]; float f1, f2; gl::unpackHalf2x16(operandArray[0].getUConst(), &f1, &f2); @@ -1696,24 +1351,29 @@ TConstantUnion *TIntermConstantUnion::foldUnaryNonComponentWise(TOperator op) resultArray[1].setFConst(f2); break; } + else + { + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; + } + break; - default: - UNREACHABLE(); - break; + default: + break; } return resultArray; } -TConstantUnion *TIntermConstantUnion::foldUnaryComponentWise(TOperator op, - TDiagnostics *diagnostics) +TConstantUnion *TIntermConstantUnion::foldUnaryWithSameReturnType(TOperator op, TInfoSink &infoSink) { - // Do unary operations where each component of the result is computed based on the corresponding - // component of the operand. Also folds normalize, though the divisor in that case takes all - // components into account. + // + // Do unary operations where the return type is the same as operand type. + // const TConstantUnion *operandArray = getUnionArrayPointer(); - ASSERT(operandArray); + if (!operandArray) + return nullptr; size_t objectSize = getType().getObjectSize(); @@ -1722,232 +1382,243 @@ TConstantUnion *TIntermConstantUnion::foldUnaryComponentWise(TOperator op, { switch(op) { - case EOpNegative: - switch (getType().getBasicType()) - { - case EbtFloat: - resultArray[i].setFConst(-operandArray[i].getFConst()); - break; - case EbtInt: - if (operandArray[i] == std::numeric_limits::min()) - { - // The minimum representable integer doesn't have a positive - // counterpart, rather the negation overflows and in ESSL is supposed to - // wrap back to the minimum representable integer. Make sure that we - // don't actually let the negation overflow, which has undefined - // behavior in C++. - resultArray[i].setIConst(std::numeric_limits::min()); - } - else - { - resultArray[i].setIConst(-operandArray[i].getIConst()); - } - break; - case EbtUInt: - if (operandArray[i] == 0x80000000u) - { - resultArray[i].setUConst(0x80000000u); - } - else - { - resultArray[i].setUConst(static_cast( - -static_cast(operandArray[i].getUConst()))); - } - break; - default: - UNREACHABLE(); - return nullptr; - } + case EOpNegative: + switch (getType().getBasicType()) + { + case EbtFloat: + resultArray[i].setFConst(-operandArray[i].getFConst()); + break; + case EbtInt: + resultArray[i].setIConst(-operandArray[i].getIConst()); + break; + case EbtUInt: + resultArray[i].setUConst(static_cast( + -static_cast(operandArray[i].getUConst()))); break; + default: + infoSink.info.message( + EPrefixInternalError, getLine(), + "Unary operation not folded into constant"); + return nullptr; + } + break; - case EOpPositive: - switch (getType().getBasicType()) - { - case EbtFloat: - resultArray[i].setFConst(operandArray[i].getFConst()); - break; - case EbtInt: - resultArray[i].setIConst(operandArray[i].getIConst()); - break; - case EbtUInt: - resultArray[i].setUConst(static_cast( - static_cast(operandArray[i].getUConst()))); - break; - default: - UNREACHABLE(); - return nullptr; - } + case EOpPositive: + switch (getType().getBasicType()) + { + case EbtFloat: + resultArray[i].setFConst(operandArray[i].getFConst()); + break; + case EbtInt: + resultArray[i].setIConst(operandArray[i].getIConst()); break; + case EbtUInt: + resultArray[i].setUConst(static_cast( + static_cast(operandArray[i].getUConst()))); + break; + default: + infoSink.info.message( + EPrefixInternalError, getLine(), + "Unary operation not folded into constant"); + return nullptr; + } + break; - case EOpLogicalNot: - switch (getType().getBasicType()) - { - case EbtBool: - resultArray[i].setBConst(!operandArray[i].getBConst()); - break; - default: - UNREACHABLE(); - return nullptr; - } + case EOpLogicalNot: + // this code is written for possible future use, + // will not get executed currently + switch (getType().getBasicType()) + { + case EbtBool: + resultArray[i].setBConst(!operandArray[i].getBConst()); break; + default: + infoSink.info.message( + EPrefixInternalError, getLine(), + "Unary operation not folded into constant"); + return nullptr; + } + break; - case EOpBitwiseNot: - switch (getType().getBasicType()) - { - case EbtInt: - resultArray[i].setIConst(~operandArray[i].getIConst()); - break; - case EbtUInt: - resultArray[i].setUConst(~operandArray[i].getUConst()); - break; - default: - UNREACHABLE(); - return nullptr; - } + case EOpBitwiseNot: + switch (getType().getBasicType()) + { + case EbtInt: + resultArray[i].setIConst(~operandArray[i].getIConst()); + break; + case EbtUInt: + resultArray[i].setUConst(~operandArray[i].getUConst()); break; + default: + infoSink.info.message( + EPrefixInternalError, getLine(), + "Unary operation not folded into constant"); + return nullptr; + } + break; - case EOpRadians: - ASSERT(getType().getBasicType() == EbtFloat); + case EOpRadians: + if (getType().getBasicType() == EbtFloat) + { resultArray[i].setFConst(kDegreesToRadiansMultiplier * operandArray[i].getFConst()); break; + } + infoSink.info.message( + EPrefixInternalError, getLine(), + "Unary operation not folded into constant"); + return nullptr; - case EOpDegrees: - ASSERT(getType().getBasicType() == EbtFloat); + case EOpDegrees: + if (getType().getBasicType() == EbtFloat) + { resultArray[i].setFConst(kRadiansToDegreesMultiplier * operandArray[i].getFConst()); break; + } + infoSink.info.message( + EPrefixInternalError, getLine(), + "Unary operation not folded into constant"); + return nullptr; - case EOpSin: - foldFloatTypeUnary(operandArray[i], &sinf, &resultArray[i]); - break; + case EOpSin: + if (!foldFloatTypeUnary(operandArray[i], &sinf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpCos: - foldFloatTypeUnary(operandArray[i], &cosf, &resultArray[i]); - break; + case EOpCos: + if (!foldFloatTypeUnary(operandArray[i], &cosf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpTan: - foldFloatTypeUnary(operandArray[i], &tanf, &resultArray[i]); - break; + case EOpTan: + if (!foldFloatTypeUnary(operandArray[i], &tanf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpAsin: - // For asin(x), results are undefined if |x| > 1, we are choosing to set result to - // 0. - if (fabsf(operandArray[i].getFConst()) > 1.0f) - UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), - diagnostics, &resultArray[i]); - else - foldFloatTypeUnary(operandArray[i], &asinf, &resultArray[i]); - break; + case EOpAsin: + // For asin(x), results are undefined if |x| > 1, we are choosing to set result to 0. + if (getType().getBasicType() == EbtFloat && fabsf(operandArray[i].getFConst()) > 1.0f) + UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), infoSink, &resultArray[i]); + else if (!foldFloatTypeUnary(operandArray[i], &asinf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpAcos: - // For acos(x), results are undefined if |x| > 1, we are choosing to set result to - // 0. - if (fabsf(operandArray[i].getFConst()) > 1.0f) - UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), - diagnostics, &resultArray[i]); - else - foldFloatTypeUnary(operandArray[i], &acosf, &resultArray[i]); - break; + case EOpAcos: + // For acos(x), results are undefined if |x| > 1, we are choosing to set result to 0. + if (getType().getBasicType() == EbtFloat && fabsf(operandArray[i].getFConst()) > 1.0f) + UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), infoSink, &resultArray[i]); + else if (!foldFloatTypeUnary(operandArray[i], &acosf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpAtan: - foldFloatTypeUnary(operandArray[i], &atanf, &resultArray[i]); - break; + case EOpAtan: + if (!foldFloatTypeUnary(operandArray[i], &atanf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpSinh: - foldFloatTypeUnary(operandArray[i], &sinhf, &resultArray[i]); - break; + case EOpSinh: + if (!foldFloatTypeUnary(operandArray[i], &sinhf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpCosh: - foldFloatTypeUnary(operandArray[i], &coshf, &resultArray[i]); - break; + case EOpCosh: + if (!foldFloatTypeUnary(operandArray[i], &coshf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpTanh: - foldFloatTypeUnary(operandArray[i], &tanhf, &resultArray[i]); - break; + case EOpTanh: + if (!foldFloatTypeUnary(operandArray[i], &tanhf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpAsinh: - foldFloatTypeUnary(operandArray[i], &asinhf, &resultArray[i]); - break; + case EOpAsinh: + if (!foldFloatTypeUnary(operandArray[i], &asinhf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpAcosh: - // For acosh(x), results are undefined if x < 1, we are choosing to set result to 0. - if (operandArray[i].getFConst() < 1.0f) - UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), - diagnostics, &resultArray[i]); - else - foldFloatTypeUnary(operandArray[i], &acoshf, &resultArray[i]); - break; + case EOpAcosh: + // For acosh(x), results are undefined if x < 1, we are choosing to set result to 0. + if (getType().getBasicType() == EbtFloat && operandArray[i].getFConst() < 1.0f) + UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), infoSink, &resultArray[i]); + else if (!foldFloatTypeUnary(operandArray[i], &acoshf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpAtanh: - // For atanh(x), results are undefined if |x| >= 1, we are choosing to set result to - // 0. - if (fabsf(operandArray[i].getFConst()) >= 1.0f) - UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), - diagnostics, &resultArray[i]); - else - foldFloatTypeUnary(operandArray[i], &atanhf, &resultArray[i]); + case EOpAtanh: + // For atanh(x), results are undefined if |x| >= 1, we are choosing to set result to 0. + if (getType().getBasicType() == EbtFloat && fabsf(operandArray[i].getFConst()) >= 1.0f) + UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), infoSink, &resultArray[i]); + else if (!foldFloatTypeUnary(operandArray[i], &atanhf, infoSink, &resultArray[i])) + return nullptr; + break; + + case EOpAbs: + switch (getType().getBasicType()) + { + case EbtFloat: + resultArray[i].setFConst(fabsf(operandArray[i].getFConst())); + break; + case EbtInt: + resultArray[i].setIConst(abs(operandArray[i].getIConst())); break; + default: + infoSink.info.message( + EPrefixInternalError, getLine(), + "Unary operation not folded into constant"); + return nullptr; + } + break; - case EOpAbs: - switch (getType().getBasicType()) + case EOpSign: + switch (getType().getBasicType()) + { + case EbtFloat: { - case EbtFloat: - resultArray[i].setFConst(fabsf(operandArray[i].getFConst())); - break; - case EbtInt: - resultArray[i].setIConst(abs(operandArray[i].getIConst())); - break; - default: - UNREACHABLE(); - return nullptr; + float fConst = operandArray[i].getFConst(); + float fResult = 0.0f; + if (fConst > 0.0f) + fResult = 1.0f; + else if (fConst < 0.0f) + fResult = -1.0f; + resultArray[i].setFConst(fResult); } break; - - case EOpSign: - switch (getType().getBasicType()) + case EbtInt: { - case EbtFloat: - { - float fConst = operandArray[i].getFConst(); - float fResult = 0.0f; - if (fConst > 0.0f) - fResult = 1.0f; - else if (fConst < 0.0f) - fResult = -1.0f; - resultArray[i].setFConst(fResult); - break; - } - case EbtInt: - { - int iConst = operandArray[i].getIConst(); - int iResult = 0; - if (iConst > 0) - iResult = 1; - else if (iConst < 0) - iResult = -1; - resultArray[i].setIConst(iResult); - break; - } - default: - UNREACHABLE(); - return nullptr; + int iConst = operandArray[i].getIConst(); + int iResult = 0; + if (iConst > 0) + iResult = 1; + else if (iConst < 0) + iResult = -1; + resultArray[i].setIConst(iResult); } break; + default: + infoSink.info.message( + EPrefixInternalError, getLine(), + "Unary operation not folded into constant"); + return nullptr; + } + break; - case EOpFloor: - foldFloatTypeUnary(operandArray[i], &floorf, &resultArray[i]); - break; + case EOpFloor: + if (!foldFloatTypeUnary(operandArray[i], &floorf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpTrunc: - foldFloatTypeUnary(operandArray[i], &truncf, &resultArray[i]); - break; + case EOpTrunc: + if (!foldFloatTypeUnary(operandArray[i], &truncf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpRound: - foldFloatTypeUnary(operandArray[i], &roundf, &resultArray[i]); - break; + case EOpRound: + if (!foldFloatTypeUnary(operandArray[i], &roundf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpRoundEven: + case EOpRoundEven: + if (getType().getBasicType() == EbtFloat) { - ASSERT(getType().getBasicType() == EbtFloat); float x = operandArray[i].getFConst(); float result; float fractPart = modff(x, &result); @@ -1958,151 +1629,197 @@ TConstantUnion *TIntermConstantUnion::foldUnaryComponentWise(TOperator op, resultArray[i].setFConst(result); break; } + infoSink.info.message( + EPrefixInternalError, getLine(), + "Unary operation not folded into constant"); + return nullptr; - case EOpCeil: - foldFloatTypeUnary(operandArray[i], &ceilf, &resultArray[i]); - break; + case EOpCeil: + if (!foldFloatTypeUnary(operandArray[i], &ceilf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpFract: + case EOpFract: + if (getType().getBasicType() == EbtFloat) { - ASSERT(getType().getBasicType() == EbtFloat); float x = operandArray[i].getFConst(); resultArray[i].setFConst(x - floorf(x)); break; } + infoSink.info.message( + EPrefixInternalError, getLine(), + "Unary operation not folded into constant"); + return nullptr; - case EOpIsNan: - ASSERT(getType().getBasicType() == EbtFloat); + case EOpIsNan: + if (getType().getBasicType() == EbtFloat) + { resultArray[i].setBConst(gl::isNaN(operandArray[0].getFConst())); break; + } + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; - case EOpIsInf: - ASSERT(getType().getBasicType() == EbtFloat); + case EOpIsInf: + if (getType().getBasicType() == EbtFloat) + { resultArray[i].setBConst(gl::isInf(operandArray[0].getFConst())); break; + } + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; - case EOpFloatBitsToInt: - ASSERT(getType().getBasicType() == EbtFloat); + case EOpFloatBitsToInt: + if (getType().getBasicType() == EbtFloat) + { resultArray[i].setIConst(gl::bitCast(operandArray[0].getFConst())); break; + } + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; - case EOpFloatBitsToUint: - ASSERT(getType().getBasicType() == EbtFloat); + case EOpFloatBitsToUint: + if (getType().getBasicType() == EbtFloat) + { resultArray[i].setUConst(gl::bitCast(operandArray[0].getFConst())); break; + } + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; - case EOpIntBitsToFloat: - ASSERT(getType().getBasicType() == EbtInt); + case EOpIntBitsToFloat: + if (getType().getBasicType() == EbtInt) + { resultArray[i].setFConst(gl::bitCast(operandArray[0].getIConst())); break; + } + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; - case EOpUintBitsToFloat: - ASSERT(getType().getBasicType() == EbtUInt); + case EOpUintBitsToFloat: + if (getType().getBasicType() == EbtUInt) + { resultArray[i].setFConst(gl::bitCast(operandArray[0].getUConst())); break; + } + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; - case EOpExp: - foldFloatTypeUnary(operandArray[i], &expf, &resultArray[i]); - break; + case EOpExp: + if (!foldFloatTypeUnary(operandArray[i], &expf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpLog: - // For log(x), results are undefined if x <= 0, we are choosing to set result to 0. - if (operandArray[i].getFConst() <= 0.0f) - UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), - diagnostics, &resultArray[i]); - else - foldFloatTypeUnary(operandArray[i], &logf, &resultArray[i]); - break; + case EOpLog: + // For log(x), results are undefined if x <= 0, we are choosing to set result to 0. + if (getType().getBasicType() == EbtFloat && operandArray[i].getFConst() <= 0.0f) + UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), infoSink, &resultArray[i]); + else if (!foldFloatTypeUnary(operandArray[i], &logf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpExp2: - foldFloatTypeUnary(operandArray[i], &exp2f, &resultArray[i]); - break; + case EOpExp2: + if (!foldFloatTypeUnary(operandArray[i], &exp2f, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpLog2: - // For log2(x), results are undefined if x <= 0, we are choosing to set result to 0. - // And log2f is not available on some plarforms like old android, so just using - // log(x)/log(2) here. - if (operandArray[i].getFConst() <= 0.0f) - UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), - diagnostics, &resultArray[i]); - else - { - foldFloatTypeUnary(operandArray[i], &logf, &resultArray[i]); - resultArray[i].setFConst(resultArray[i].getFConst() / logf(2.0f)); - } - break; + case EOpLog2: + // For log2(x), results are undefined if x <= 0, we are choosing to set result to 0. + // And log2f is not available on some plarforms like old android, so just using log(x)/log(2) here. + if (getType().getBasicType() == EbtFloat && operandArray[i].getFConst() <= 0.0f) + UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), infoSink, &resultArray[i]); + else if (!foldFloatTypeUnary(operandArray[i], &logf, infoSink, &resultArray[i])) + return nullptr; + else + resultArray[i].setFConst(resultArray[i].getFConst() / logf(2.0f)); + break; - case EOpSqrt: - // For sqrt(x), results are undefined if x < 0, we are choosing to set result to 0. - if (operandArray[i].getFConst() < 0.0f) - UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), - diagnostics, &resultArray[i]); - else - foldFloatTypeUnary(operandArray[i], &sqrtf, &resultArray[i]); - break; + case EOpSqrt: + // For sqrt(x), results are undefined if x < 0, we are choosing to set result to 0. + if (getType().getBasicType() == EbtFloat && operandArray[i].getFConst() < 0.0f) + UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), infoSink, &resultArray[i]); + else if (!foldFloatTypeUnary(operandArray[i], &sqrtf, infoSink, &resultArray[i])) + return nullptr; + break; - case EOpInverseSqrt: - // There is no stdlib built-in function equavalent for GLES built-in inversesqrt(), - // so getting the square root first using builtin function sqrt() and then taking - // its inverse. - // Also, for inversesqrt(x), results are undefined if x <= 0, we are choosing to set - // result to 0. - if (operandArray[i].getFConst() <= 0.0f) - UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), - diagnostics, &resultArray[i]); - else - { - foldFloatTypeUnary(operandArray[i], &sqrtf, &resultArray[i]); - resultArray[i].setFConst(1.0f / resultArray[i].getFConst()); - } - break; + case EOpInverseSqrt: + // There is no stdlib built-in function equavalent for GLES built-in inversesqrt(), + // so getting the square root first using builtin function sqrt() and then taking its inverse. + // Also, for inversesqrt(x), results are undefined if x <= 0, we are choosing to set result to 0. + if (getType().getBasicType() == EbtFloat && operandArray[i].getFConst() <= 0.0f) + UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), infoSink, &resultArray[i]); + else if (!foldFloatTypeUnary(operandArray[i], &sqrtf, infoSink, &resultArray[i])) + return nullptr; + else + resultArray[i].setFConst(1.0f / resultArray[i].getFConst()); + break; - case EOpVectorLogicalNot: - ASSERT(getType().getBasicType() == EbtBool); + case EOpVectorLogicalNot: + if (getType().getBasicType() == EbtBool) + { resultArray[i].setBConst(!operandArray[i].getBConst()); break; + } + infoSink.info.message( + EPrefixInternalError, getLine(), + "Unary operation not folded into constant"); + return nullptr; - case EOpNormalize: + case EOpNormalize: + if (getType().getBasicType() == EbtFloat) { - ASSERT(getType().getBasicType() == EbtFloat); - float x = operandArray[i].getFConst(); + float x = operandArray[i].getFConst(); float length = VectorLength(operandArray, objectSize); if (length) resultArray[i].setFConst(x / length); else - UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), - diagnostics, &resultArray[i]); + UndefinedConstantFoldingError(getLine(), op, getType().getBasicType(), infoSink, + &resultArray[i]); break; } + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; - case EOpDFdx: - case EOpDFdy: - case EOpFwidth: - ASSERT(getType().getBasicType() == EbtFloat); + case EOpDFdx: + case EOpDFdy: + case EOpFwidth: + if (getType().getBasicType() == EbtFloat) + { // Derivatives of constant arguments should be 0. resultArray[i].setFConst(0.0f); break; + } + infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant"); + return nullptr; - default: - return nullptr; + default: + return nullptr; } } return resultArray; } -void TIntermConstantUnion::foldFloatTypeUnary(const TConstantUnion ¶meter, - FloatTypeUnaryFunc builtinFunc, - TConstantUnion *result) const +bool TIntermConstantUnion::foldFloatTypeUnary(const TConstantUnion ¶meter, FloatTypeUnaryFunc builtinFunc, + TInfoSink &infoSink, TConstantUnion *result) const { ASSERT(builtinFunc); - ASSERT(getType().getBasicType() == EbtFloat); - result->setFConst(builtinFunc(parameter.getFConst())); + if (getType().getBasicType() == EbtFloat) + { + result->setFConst(builtinFunc(parameter.getFConst())); + return true; + } + + infoSink.info.message( + EPrefixInternalError, getLine(), + "Unary operation not folded into constant"); + return false; } // static -TConstantUnion *TIntermConstantUnion::FoldAggregateConstructor(TIntermAggregate *aggregate) +TConstantUnion *TIntermConstantUnion::FoldAggregateConstructor(TIntermAggregate *aggregate, + TInfoSink &infoSink) { ASSERT(aggregate->getSequence()->size() > 0u); size_t resultSize = aggregate->getType().getObjectSize(); @@ -2201,8 +1918,7 @@ TConstantUnion *TIntermConstantUnion::FoldAggregateConstructor(TIntermAggregate } // static -TConstantUnion *TIntermConstantUnion::FoldAggregateBuiltIn(TIntermAggregate *aggregate, - TDiagnostics *diagnostics) +TConstantUnion *TIntermConstantUnion::FoldAggregateBuiltIn(TIntermAggregate *aggregate, TInfoSink &infoSink) { TOperator op = aggregate->getOp(); TIntermSequence *sequence = aggregate->getSequence(); @@ -2243,298 +1959,284 @@ TConstantUnion *TIntermConstantUnion::FoldAggregateBuiltIn(TIntermAggregate *agg // switch (op) { - case EOpAtan: + case EOpAtan: { - ASSERT(basicType == EbtFloat); - resultArray = new TConstantUnion[maxObjectSize]; - for (size_t i = 0; i < maxObjectSize; i++) + if (basicType == EbtFloat) { - float y = unionArrays[0][i].getFConst(); - float x = unionArrays[1][i].getFConst(); - // Results are undefined if x and y are both 0. - if (x == 0.0f && y == 0.0f) - UndefinedConstantFoldingError(loc, op, basicType, diagnostics, - &resultArray[i]); - else - resultArray[i].setFConst(atan2f(y, x)); + resultArray = new TConstantUnion[maxObjectSize]; + for (size_t i = 0; i < maxObjectSize; i++) + { + float y = unionArrays[0][i].getFConst(); + float x = unionArrays[1][i].getFConst(); + // Results are undefined if x and y are both 0. + if (x == 0.0f && y == 0.0f) + UndefinedConstantFoldingError(loc, op, basicType, infoSink, &resultArray[i]); + else + resultArray[i].setFConst(atan2f(y, x)); + } } - break; + else + UNREACHABLE(); } + break; - case EOpPow: + case EOpPow: { - ASSERT(basicType == EbtFloat); - resultArray = new TConstantUnion[maxObjectSize]; - for (size_t i = 0; i < maxObjectSize; i++) + if (basicType == EbtFloat) { - float x = unionArrays[0][i].getFConst(); - float y = unionArrays[1][i].getFConst(); - // Results are undefined if x < 0. - // Results are undefined if x = 0 and y <= 0. - if (x < 0.0f) - UndefinedConstantFoldingError(loc, op, basicType, diagnostics, - &resultArray[i]); - else if (x == 0.0f && y <= 0.0f) - UndefinedConstantFoldingError(loc, op, basicType, diagnostics, - &resultArray[i]); - else - resultArray[i].setFConst(powf(x, y)); + resultArray = new TConstantUnion[maxObjectSize]; + for (size_t i = 0; i < maxObjectSize; i++) + { + float x = unionArrays[0][i].getFConst(); + float y = unionArrays[1][i].getFConst(); + // Results are undefined if x < 0. + // Results are undefined if x = 0 and y <= 0. + if (x < 0.0f) + UndefinedConstantFoldingError(loc, op, basicType, infoSink, &resultArray[i]); + else if (x == 0.0f && y <= 0.0f) + UndefinedConstantFoldingError(loc, op, basicType, infoSink, &resultArray[i]); + else + resultArray[i].setFConst(powf(x, y)); + } } - break; + else + UNREACHABLE(); } + break; - case EOpMod: + case EOpMod: { - ASSERT(basicType == EbtFloat); - resultArray = new TConstantUnion[maxObjectSize]; - for (size_t i = 0; i < maxObjectSize; i++) + if (basicType == EbtFloat) { - float x = unionArrays[0][i].getFConst(); - float y = unionArrays[1][i].getFConst(); - resultArray[i].setFConst(x - y * floorf(x / y)); + resultArray = new TConstantUnion[maxObjectSize]; + for (size_t i = 0; i < maxObjectSize; i++) + { + float x = unionArrays[0][i].getFConst(); + float y = unionArrays[1][i].getFConst(); + resultArray[i].setFConst(x - y * floorf(x / y)); + } } - break; + else + UNREACHABLE(); } + break; - case EOpMin: + case EOpMin: { resultArray = new TConstantUnion[maxObjectSize]; for (size_t i = 0; i < maxObjectSize; i++) { switch (basicType) { - case EbtFloat: - resultArray[i].setFConst(std::min(unionArrays[0][i].getFConst(), - unionArrays[1][i].getFConst())); - break; - case EbtInt: - resultArray[i].setIConst(std::min(unionArrays[0][i].getIConst(), - unionArrays[1][i].getIConst())); - break; - case EbtUInt: - resultArray[i].setUConst(std::min(unionArrays[0][i].getUConst(), - unionArrays[1][i].getUConst())); - break; - default: - UNREACHABLE(); - break; + case EbtFloat: + resultArray[i].setFConst(std::min(unionArrays[0][i].getFConst(), unionArrays[1][i].getFConst())); + break; + case EbtInt: + resultArray[i].setIConst(std::min(unionArrays[0][i].getIConst(), unionArrays[1][i].getIConst())); + break; + case EbtUInt: + resultArray[i].setUConst(std::min(unionArrays[0][i].getUConst(), unionArrays[1][i].getUConst())); + break; + default: + UNREACHABLE(); + break; } } - break; } + break; - case EOpMax: + case EOpMax: { resultArray = new TConstantUnion[maxObjectSize]; for (size_t i = 0; i < maxObjectSize; i++) { switch (basicType) { - case EbtFloat: - resultArray[i].setFConst(std::max(unionArrays[0][i].getFConst(), - unionArrays[1][i].getFConst())); - break; - case EbtInt: - resultArray[i].setIConst(std::max(unionArrays[0][i].getIConst(), - unionArrays[1][i].getIConst())); - break; - case EbtUInt: - resultArray[i].setUConst(std::max(unionArrays[0][i].getUConst(), - unionArrays[1][i].getUConst())); - break; - default: - UNREACHABLE(); - break; + case EbtFloat: + resultArray[i].setFConst(std::max(unionArrays[0][i].getFConst(), unionArrays[1][i].getFConst())); + break; + case EbtInt: + resultArray[i].setIConst(std::max(unionArrays[0][i].getIConst(), unionArrays[1][i].getIConst())); + break; + case EbtUInt: + resultArray[i].setUConst(std::max(unionArrays[0][i].getUConst(), unionArrays[1][i].getUConst())); + break; + default: + UNREACHABLE(); + break; } } - break; } + break; - case EOpStep: + case EOpStep: { - ASSERT(basicType == EbtFloat); - resultArray = new TConstantUnion[maxObjectSize]; - for (size_t i = 0; i < maxObjectSize; i++) - resultArray[i].setFConst( - unionArrays[1][i].getFConst() < unionArrays[0][i].getFConst() ? 0.0f - : 1.0f); - break; + if (basicType == EbtFloat) + { + resultArray = new TConstantUnion[maxObjectSize]; + for (size_t i = 0; i < maxObjectSize; i++) + resultArray[i].setFConst(unionArrays[1][i].getFConst() < unionArrays[0][i].getFConst() ? 0.0f : 1.0f); + } + else + UNREACHABLE(); } + break; - case EOpLessThan: + case EOpLessThan: { resultArray = new TConstantUnion[maxObjectSize]; for (size_t i = 0; i < maxObjectSize; i++) { switch (basicType) { - case EbtFloat: - resultArray[i].setBConst(unionArrays[0][i].getFConst() < - unionArrays[1][i].getFConst()); - break; - case EbtInt: - resultArray[i].setBConst(unionArrays[0][i].getIConst() < - unionArrays[1][i].getIConst()); - break; - case EbtUInt: - resultArray[i].setBConst(unionArrays[0][i].getUConst() < - unionArrays[1][i].getUConst()); - break; - default: - UNREACHABLE(); - break; + case EbtFloat: + resultArray[i].setBConst(unionArrays[0][i].getFConst() < unionArrays[1][i].getFConst()); + break; + case EbtInt: + resultArray[i].setBConst(unionArrays[0][i].getIConst() < unionArrays[1][i].getIConst()); + break; + case EbtUInt: + resultArray[i].setBConst(unionArrays[0][i].getUConst() < unionArrays[1][i].getUConst()); + break; + default: + UNREACHABLE(); + break; } } - break; } + break; - case EOpLessThanEqual: + case EOpLessThanEqual: { resultArray = new TConstantUnion[maxObjectSize]; for (size_t i = 0; i < maxObjectSize; i++) { switch (basicType) { - case EbtFloat: - resultArray[i].setBConst(unionArrays[0][i].getFConst() <= - unionArrays[1][i].getFConst()); - break; - case EbtInt: - resultArray[i].setBConst(unionArrays[0][i].getIConst() <= - unionArrays[1][i].getIConst()); - break; - case EbtUInt: - resultArray[i].setBConst(unionArrays[0][i].getUConst() <= - unionArrays[1][i].getUConst()); - break; - default: - UNREACHABLE(); - break; + case EbtFloat: + resultArray[i].setBConst(unionArrays[0][i].getFConst() <= unionArrays[1][i].getFConst()); + break; + case EbtInt: + resultArray[i].setBConst(unionArrays[0][i].getIConst() <= unionArrays[1][i].getIConst()); + break; + case EbtUInt: + resultArray[i].setBConst(unionArrays[0][i].getUConst() <= unionArrays[1][i].getUConst()); + break; + default: + UNREACHABLE(); + break; } } - break; } + break; - case EOpGreaterThan: + case EOpGreaterThan: { resultArray = new TConstantUnion[maxObjectSize]; for (size_t i = 0; i < maxObjectSize; i++) { switch (basicType) { - case EbtFloat: - resultArray[i].setBConst(unionArrays[0][i].getFConst() > - unionArrays[1][i].getFConst()); - break; - case EbtInt: - resultArray[i].setBConst(unionArrays[0][i].getIConst() > - unionArrays[1][i].getIConst()); - break; - case EbtUInt: - resultArray[i].setBConst(unionArrays[0][i].getUConst() > - unionArrays[1][i].getUConst()); - break; - default: - UNREACHABLE(); - break; + case EbtFloat: + resultArray[i].setBConst(unionArrays[0][i].getFConst() > unionArrays[1][i].getFConst()); + break; + case EbtInt: + resultArray[i].setBConst(unionArrays[0][i].getIConst() > unionArrays[1][i].getIConst()); + break; + case EbtUInt: + resultArray[i].setBConst(unionArrays[0][i].getUConst() > unionArrays[1][i].getUConst()); + break; + default: + UNREACHABLE(); + break; } } - break; } - case EOpGreaterThanEqual: + break; + + case EOpGreaterThanEqual: { resultArray = new TConstantUnion[maxObjectSize]; for (size_t i = 0; i < maxObjectSize; i++) { switch (basicType) { - case EbtFloat: - resultArray[i].setBConst(unionArrays[0][i].getFConst() >= - unionArrays[1][i].getFConst()); - break; - case EbtInt: - resultArray[i].setBConst(unionArrays[0][i].getIConst() >= - unionArrays[1][i].getIConst()); - break; - case EbtUInt: - resultArray[i].setBConst(unionArrays[0][i].getUConst() >= - unionArrays[1][i].getUConst()); - break; - default: - UNREACHABLE(); - break; + case EbtFloat: + resultArray[i].setBConst(unionArrays[0][i].getFConst() >= unionArrays[1][i].getFConst()); + break; + case EbtInt: + resultArray[i].setBConst(unionArrays[0][i].getIConst() >= unionArrays[1][i].getIConst()); + break; + case EbtUInt: + resultArray[i].setBConst(unionArrays[0][i].getUConst() >= unionArrays[1][i].getUConst()); + break; + default: + UNREACHABLE(); + break; } } } break; - case EOpVectorEqual: + case EOpVectorEqual: { resultArray = new TConstantUnion[maxObjectSize]; for (size_t i = 0; i < maxObjectSize; i++) { switch (basicType) { - case EbtFloat: - resultArray[i].setBConst(unionArrays[0][i].getFConst() == - unionArrays[1][i].getFConst()); - break; - case EbtInt: - resultArray[i].setBConst(unionArrays[0][i].getIConst() == - unionArrays[1][i].getIConst()); - break; - case EbtUInt: - resultArray[i].setBConst(unionArrays[0][i].getUConst() == - unionArrays[1][i].getUConst()); - break; - case EbtBool: - resultArray[i].setBConst(unionArrays[0][i].getBConst() == - unionArrays[1][i].getBConst()); - break; - default: - UNREACHABLE(); - break; + case EbtFloat: + resultArray[i].setBConst(unionArrays[0][i].getFConst() == unionArrays[1][i].getFConst()); + break; + case EbtInt: + resultArray[i].setBConst(unionArrays[0][i].getIConst() == unionArrays[1][i].getIConst()); + break; + case EbtUInt: + resultArray[i].setBConst(unionArrays[0][i].getUConst() == unionArrays[1][i].getUConst()); + break; + case EbtBool: + resultArray[i].setBConst(unionArrays[0][i].getBConst() == unionArrays[1][i].getBConst()); + break; + default: + UNREACHABLE(); + break; } } - break; } + break; - case EOpVectorNotEqual: + case EOpVectorNotEqual: { resultArray = new TConstantUnion[maxObjectSize]; for (size_t i = 0; i < maxObjectSize; i++) { switch (basicType) { - case EbtFloat: - resultArray[i].setBConst(unionArrays[0][i].getFConst() != - unionArrays[1][i].getFConst()); - break; - case EbtInt: - resultArray[i].setBConst(unionArrays[0][i].getIConst() != - unionArrays[1][i].getIConst()); - break; - case EbtUInt: - resultArray[i].setBConst(unionArrays[0][i].getUConst() != - unionArrays[1][i].getUConst()); - break; - case EbtBool: - resultArray[i].setBConst(unionArrays[0][i].getBConst() != - unionArrays[1][i].getBConst()); - break; - default: - UNREACHABLE(); - break; + case EbtFloat: + resultArray[i].setBConst(unionArrays[0][i].getFConst() != unionArrays[1][i].getFConst()); + break; + case EbtInt: + resultArray[i].setBConst(unionArrays[0][i].getIConst() != unionArrays[1][i].getIConst()); + break; + case EbtUInt: + resultArray[i].setBConst(unionArrays[0][i].getUConst() != unionArrays[1][i].getUConst()); + break; + case EbtBool: + resultArray[i].setBConst(unionArrays[0][i].getBConst() != unionArrays[1][i].getBConst()); + break; + default: + UNREACHABLE(); + break; } } - break; } + break; - case EOpDistance: + case EOpDistance: + if (basicType == EbtFloat) { - ASSERT(basicType == EbtFloat); TConstantUnion *distanceArray = new TConstantUnion[maxObjectSize]; - resultArray = new TConstantUnion(); + resultArray = new TConstantUnion(); for (size_t i = 0; i < maxObjectSize; i++) { float x = unionArrays[0][i].getFConst(); @@ -2542,40 +2244,47 @@ TConstantUnion *TIntermConstantUnion::FoldAggregateBuiltIn(TIntermAggregate *agg distanceArray[i].setFConst(x - y); } resultArray->setFConst(VectorLength(distanceArray, maxObjectSize)); - break; } + else + UNREACHABLE(); + break; + + case EOpDot: - case EOpDot: - ASSERT(basicType == EbtFloat); + if (basicType == EbtFloat) + { resultArray = new TConstantUnion(); - resultArray->setFConst( - VectorDotProduct(unionArrays[0], unionArrays[1], maxObjectSize)); - break; + resultArray->setFConst(VectorDotProduct(unionArrays[0], unionArrays[1], maxObjectSize)); + } + else + UNREACHABLE(); + break; - case EOpCross: + case EOpCross: + if (basicType == EbtFloat && maxObjectSize == 3) { - ASSERT(basicType == EbtFloat && maxObjectSize == 3); resultArray = new TConstantUnion[maxObjectSize]; - float x0 = unionArrays[0][0].getFConst(); - float x1 = unionArrays[0][1].getFConst(); - float x2 = unionArrays[0][2].getFConst(); - float y0 = unionArrays[1][0].getFConst(); - float y1 = unionArrays[1][1].getFConst(); - float y2 = unionArrays[1][2].getFConst(); + float x0 = unionArrays[0][0].getFConst(); + float x1 = unionArrays[0][1].getFConst(); + float x2 = unionArrays[0][2].getFConst(); + float y0 = unionArrays[1][0].getFConst(); + float y1 = unionArrays[1][1].getFConst(); + float y2 = unionArrays[1][2].getFConst(); resultArray[0].setFConst(x1 * y2 - y1 * x2); resultArray[1].setFConst(x2 * y0 - y2 * x0); resultArray[2].setFConst(x0 * y1 - y0 * x1); - break; } + else + UNREACHABLE(); + break; - case EOpReflect: + case EOpReflect: + if (basicType == EbtFloat) { - ASSERT(basicType == EbtFloat); // genType reflect (genType I, genType N) : - // For the incident vector I and surface orientation N, returns the reflection - // direction: + // For the incident vector I and surface orientation N, returns the reflection direction: // I - 2 * dot(N, I) * N. - resultArray = new TConstantUnion[maxObjectSize]; + resultArray = new TConstantUnion[maxObjectSize]; float dotProduct = VectorDotProduct(unionArrays[1], unionArrays[0], maxObjectSize); for (size_t i = 0; i < maxObjectSize; i++) { @@ -2583,40 +2292,45 @@ TConstantUnion *TIntermConstantUnion::FoldAggregateBuiltIn(TIntermAggregate *agg 2.0f * dotProduct * unionArrays[1][i].getFConst(); resultArray[i].setFConst(result); } - break; } + else + UNREACHABLE(); + break; - case EOpMul: + case EOpMul: + if (basicType == EbtFloat && (*sequence)[0]->getAsTyped()->isMatrix() && + (*sequence)[1]->getAsTyped()->isMatrix()) { - ASSERT(basicType == EbtFloat && (*sequence)[0]->getAsTyped()->isMatrix() && - (*sequence)[1]->getAsTyped()->isMatrix()); // Perform component-wise matrix multiplication. resultArray = new TConstantUnion[maxObjectSize]; - int size = (*sequence)[0]->getAsTyped()->getNominalSize(); + int size = (*sequence)[0]->getAsTyped()->getNominalSize(); angle::Matrix result = GetMatrix(unionArrays[0], size).compMult(GetMatrix(unionArrays[1], size)); SetUnionArrayFromMatrix(result, resultArray); - break; } + else + UNREACHABLE(); + break; - case EOpOuterProduct: + case EOpOuterProduct: + if (basicType == EbtFloat) { - ASSERT(basicType == EbtFloat); size_t numRows = (*sequence)[0]->getAsTyped()->getType().getObjectSize(); size_t numCols = (*sequence)[1]->getAsTyped()->getType().getObjectSize(); - resultArray = new TConstantUnion[numRows * numCols]; + resultArray = new TConstantUnion[numRows * numCols]; angle::Matrix result = GetMatrix(unionArrays[0], static_cast(numRows), 1) .outerProduct(GetMatrix(unionArrays[1], 1, static_cast(numCols))); SetUnionArrayFromMatrix(result, resultArray); - break; } - - default: + else UNREACHABLE(); - // TODO: Add constant folding support for other built-in operations that take 2 - // parameters and not handled above. - return nullptr; + break; + + default: + UNREACHABLE(); + // TODO: Add constant folding support for other built-in operations that take 2 parameters and not handled above. + return nullptr; } } else if (paramsCount == 3) @@ -2626,123 +2340,124 @@ TConstantUnion *TIntermConstantUnion::FoldAggregateBuiltIn(TIntermAggregate *agg // switch (op) { - case EOpClamp: + case EOpClamp: { resultArray = new TConstantUnion[maxObjectSize]; for (size_t i = 0; i < maxObjectSize; i++) { switch (basicType) { - case EbtFloat: + case EbtFloat: { - float x = unionArrays[0][i].getFConst(); + float x = unionArrays[0][i].getFConst(); float min = unionArrays[1][i].getFConst(); float max = unionArrays[2][i].getFConst(); // Results are undefined if min > max. if (min > max) - UndefinedConstantFoldingError(loc, op, basicType, diagnostics, - &resultArray[i]); + UndefinedConstantFoldingError(loc, op, basicType, infoSink, &resultArray[i]); else resultArray[i].setFConst(gl::clamp(x, min, max)); - break; } - - case EbtInt: + break; + case EbtInt: { - int x = unionArrays[0][i].getIConst(); + int x = unionArrays[0][i].getIConst(); int min = unionArrays[1][i].getIConst(); int max = unionArrays[2][i].getIConst(); // Results are undefined if min > max. if (min > max) - UndefinedConstantFoldingError(loc, op, basicType, diagnostics, - &resultArray[i]); + UndefinedConstantFoldingError(loc, op, basicType, infoSink, &resultArray[i]); else resultArray[i].setIConst(gl::clamp(x, min, max)); - break; } - case EbtUInt: + break; + case EbtUInt: { - unsigned int x = unionArrays[0][i].getUConst(); + unsigned int x = unionArrays[0][i].getUConst(); unsigned int min = unionArrays[1][i].getUConst(); unsigned int max = unionArrays[2][i].getUConst(); // Results are undefined if min > max. if (min > max) - UndefinedConstantFoldingError(loc, op, basicType, diagnostics, - &resultArray[i]); + UndefinedConstantFoldingError(loc, op, basicType, infoSink, &resultArray[i]); else resultArray[i].setUConst(gl::clamp(x, min, max)); - break; } - default: - UNREACHABLE(); - break; + break; + default: + UNREACHABLE(); + break; } } - break; } + break; - case EOpMix: + case EOpMix: { - ASSERT(basicType == EbtFloat); - resultArray = new TConstantUnion[maxObjectSize]; - for (size_t i = 0; i < maxObjectSize; i++) + if (basicType == EbtFloat) { - float x = unionArrays[0][i].getFConst(); - float y = unionArrays[1][i].getFConst(); - TBasicType type = (*sequence)[2]->getAsTyped()->getType().getBasicType(); - if (type == EbtFloat) + resultArray = new TConstantUnion[maxObjectSize]; + for (size_t i = 0; i < maxObjectSize; i++) { - // Returns the linear blend of x and y, i.e., x * (1 - a) + y * a. - float a = unionArrays[2][i].getFConst(); - resultArray[i].setFConst(x * (1.0f - a) + y * a); - } - else // 3rd parameter is EbtBool - { - ASSERT(type == EbtBool); - // Selects which vector each returned component comes from. - // For a component of a that is false, the corresponding component of x is - // returned. - // For a component of a that is true, the corresponding component of y is - // returned. - bool a = unionArrays[2][i].getBConst(); - resultArray[i].setFConst(a ? y : x); + float x = unionArrays[0][i].getFConst(); + float y = unionArrays[1][i].getFConst(); + TBasicType type = (*sequence)[2]->getAsTyped()->getType().getBasicType(); + if (type == EbtFloat) + { + // Returns the linear blend of x and y, i.e., x * (1 - a) + y * a. + float a = unionArrays[2][i].getFConst(); + resultArray[i].setFConst(x * (1.0f - a) + y * a); + } + else // 3rd parameter is EbtBool + { + ASSERT(type == EbtBool); + // Selects which vector each returned component comes from. + // For a component of a that is false, the corresponding component of x is returned. + // For a component of a that is true, the corresponding component of y is returned. + bool a = unionArrays[2][i].getBConst(); + resultArray[i].setFConst(a ? y : x); + } } } - break; + else + UNREACHABLE(); } + break; - case EOpSmoothStep: + case EOpSmoothStep: { - ASSERT(basicType == EbtFloat); - resultArray = new TConstantUnion[maxObjectSize]; - for (size_t i = 0; i < maxObjectSize; i++) + if (basicType == EbtFloat) { - float edge0 = unionArrays[0][i].getFConst(); - float edge1 = unionArrays[1][i].getFConst(); - float x = unionArrays[2][i].getFConst(); - // Results are undefined if edge0 >= edge1. - if (edge0 >= edge1) + resultArray = new TConstantUnion[maxObjectSize]; + for (size_t i = 0; i < maxObjectSize; i++) { - UndefinedConstantFoldingError(loc, op, basicType, diagnostics, - &resultArray[i]); - } - else - { - // Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and performs smooth - // Hermite interpolation between 0 and 1 when edge0 < x < edge1. - float t = gl::clamp((x - edge0) / (edge1 - edge0), 0.0f, 1.0f); - resultArray[i].setFConst(t * t * (3.0f - 2.0f * t)); + float edge0 = unionArrays[0][i].getFConst(); + float edge1 = unionArrays[1][i].getFConst(); + float x = unionArrays[2][i].getFConst(); + // Results are undefined if edge0 >= edge1. + if (edge0 >= edge1) + { + UndefinedConstantFoldingError(loc, op, basicType, infoSink, &resultArray[i]); + } + else + { + // Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and performs smooth + // Hermite interpolation between 0 and 1 when edge0 < x < edge1. + float t = gl::clamp((x - edge0) / (edge1 - edge0), 0.0f, 1.0f); + resultArray[i].setFConst(t * t * (3.0f - 2.0f * t)); + } } } - break; + else + UNREACHABLE(); } + break; - case EOpFaceForward: + case EOpFaceForward: + if (basicType == EbtFloat) { - ASSERT(basicType == EbtFloat); // genType faceforward(genType N, genType I, genType Nref) : // If dot(Nref, I) < 0 return N, otherwise return -N. - resultArray = new TConstantUnion[maxObjectSize]; + resultArray = new TConstantUnion[maxObjectSize]; float dotProduct = VectorDotProduct(unionArrays[2], unionArrays[1], maxObjectSize); for (size_t i = 0; i < maxObjectSize; i++) { @@ -2751,42 +2466,43 @@ TConstantUnion *TIntermConstantUnion::FoldAggregateBuiltIn(TIntermAggregate *agg else resultArray[i].setFConst(-unionArrays[0][i].getFConst()); } - break; } + else + UNREACHABLE(); + break; - case EOpRefract: + case EOpRefract: + if (basicType == EbtFloat) { - ASSERT(basicType == EbtFloat); // genType refract(genType I, genType N, float eta) : - // For the incident vector I and surface normal N, and the ratio of indices of - // refraction eta, + // For the incident vector I and surface normal N, and the ratio of indices of refraction eta, // return the refraction vector. The result is computed by // k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I)) // if (k < 0.0) // return genType(0.0) // else // return eta * I - (eta * dot(N, I) + sqrt(k)) * N - resultArray = new TConstantUnion[maxObjectSize]; + resultArray = new TConstantUnion[maxObjectSize]; float dotProduct = VectorDotProduct(unionArrays[1], unionArrays[0], maxObjectSize); for (size_t i = 0; i < maxObjectSize; i++) { float eta = unionArrays[2][i].getFConst(); - float k = 1.0f - eta * eta * (1.0f - dotProduct * dotProduct); + float k = 1.0f - eta * eta * (1.0f - dotProduct * dotProduct); if (k < 0.0f) resultArray[i].setFConst(0.0f); else resultArray[i].setFConst(eta * unionArrays[0][i].getFConst() - - (eta * dotProduct + sqrtf(k)) * - unionArrays[1][i].getFConst()); + (eta * dotProduct + sqrtf(k)) * unionArrays[1][i].getFConst()); } - break; } - - default: + else UNREACHABLE(); - // TODO: Add constant folding support for other built-in operations that take 3 - // parameters and not handled above. - return nullptr; + break; + + default: + UNREACHABLE(); + // TODO: Add constant folding support for other built-in operations that take 3 parameters and not handled above. + return nullptr; } } return resultArray; @@ -2815,12 +2531,14 @@ void TIntermTraverser::updateTree() bool inserted = insertion.parent->insertChildNodes(insertion.position + 1, insertion.insertionsAfter); ASSERT(inserted); + UNUSED_ASSERTION_VARIABLE(inserted); } if (!insertion.insertionsBefore.empty()) { bool inserted = insertion.parent->insertChildNodes(insertion.position, insertion.insertionsBefore); ASSERT(inserted); + UNUSED_ASSERTION_VARIABLE(inserted); } } for (size_t ii = 0; ii < mReplacements.size(); ++ii) @@ -2830,6 +2548,7 @@ void TIntermTraverser::updateTree() bool replaced = replacement.parent->replaceChildNode( replacement.original, replacement.replacement); ASSERT(replaced); + UNUSED_ASSERTION_VARIABLE(replaced); if (!replacement.originalBecomesChildOfReplacement) { @@ -2852,6 +2571,7 @@ void TIntermTraverser::updateTree() bool replaced = replacement.parent->replaceChildNodeWithMultiple( replacement.original, replacement.replacements); ASSERT(replaced); + UNUSED_ASSERTION_VARIABLE(replaced); } clearReplacementQueue(); @@ -2879,5 +2599,3 @@ void TIntermTraverser::queueReplacementWithParent(TIntermNode *parent, bool originalBecomesChild = (originalStatus == OriginalNode::BECOMES_CHILD); mReplacements.push_back(NodeUpdateEntry(parent, original, replacement, originalBecomesChild)); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/IntermNode.h b/gfx/angle/src/compiler/translator/IntermNode.h index 94811bd1c..7068685ee 100755 --- a/gfx/angle/src/compiler/translator/IntermNode.h +++ b/gfx/angle/src/compiler/translator/IntermNode.h @@ -27,22 +27,14 @@ #include "compiler/translator/Operator.h" #include "compiler/translator/Types.h" -namespace sh -{ - class TDiagnostics; class TIntermTraverser; class TIntermAggregate; -class TIntermBlock; -class TIntermDeclaration; -class TIntermFunctionDefinition; -class TIntermSwizzle; class TIntermBinary; class TIntermUnary; class TIntermConstantUnion; -class TIntermTernary; -class TIntermIfElse; +class TIntermSelection; class TIntermSwitch; class TIntermCase; class TIntermTyped; @@ -54,7 +46,6 @@ class TIntermRaw; class TIntermBranch; class TSymbolTable; -class TFunction; // Encapsulate an identifier string and track whether it is coming from the original shader code // (not internal) or from ANGLE (internal). Usually internal names shouldn't be decorated or hashed. @@ -99,15 +90,10 @@ class TIntermNode : angle::NonCopyable virtual void traverse(TIntermTraverser *) = 0; virtual TIntermTyped *getAsTyped() { return 0; } virtual TIntermConstantUnion *getAsConstantUnion() { return 0; } - virtual TIntermFunctionDefinition *getAsFunctionDefinition() { return nullptr; } virtual TIntermAggregate *getAsAggregate() { return 0; } - virtual TIntermBlock *getAsBlock() { return nullptr; } - virtual TIntermDeclaration *getAsDeclarationNode() { return nullptr; } - virtual TIntermSwizzle *getAsSwizzleNode() { return nullptr; } virtual TIntermBinary *getAsBinaryNode() { return 0; } virtual TIntermUnary *getAsUnaryNode() { return 0; } - virtual TIntermTernary *getAsTernaryNode() { return nullptr; } - virtual TIntermIfElse *getAsIfElseNode() { return nullptr; } + virtual TIntermSelection *getAsSelectionNode() { return 0; } virtual TIntermSwitch *getAsSwitchNode() { return 0; } virtual TIntermCase *getAsCaseNode() { return 0; } virtual TIntermSymbol *getAsSymbolNode() { return 0; } @@ -155,7 +141,6 @@ class TIntermTyped : public TIntermNode TBasicType getBasicType() const { return mType.getBasicType(); } TQualifier getQualifier() const { return mType.getQualifier(); } TPrecision getPrecision() const { return mType.getPrecision(); } - TMemoryQualifier getMemoryQualifier() const { return mType.getMemoryQualifier(); } int getCols() const { return mType.getCols(); } int getRows() const { return mType.getRows(); } int getNominalSize() const { return mType.getNominalSize(); } @@ -174,9 +159,6 @@ class TIntermTyped : public TIntermNode bool isConstructorWithOnlyConstantUnionParameters(); - static TIntermTyped *CreateIndexNode(int index); - static TIntermTyped *CreateZero(const TType &type); - protected: TType mType; @@ -200,7 +182,7 @@ class TIntermLoop : public TIntermNode TIntermNode *init, TIntermTyped *cond, TIntermTyped *expr, - TIntermBlock *body) + TIntermAggregate *body) : mType(type), mInit(init), mCond(cond), mExpr(expr), mBody(body), mUnrollFlag(false) { } @@ -213,11 +195,11 @@ class TIntermLoop : public TIntermNode TIntermNode *getInit() { return mInit; } TIntermTyped *getCondition() { return mCond; } TIntermTyped *getExpression() { return mExpr; } - TIntermBlock *getBody() { return mBody; } + TIntermAggregate *getBody() { return mBody; } void setCondition(TIntermTyped *condition) { mCond = condition; } void setExpression(TIntermTyped *expression) { mExpr = expression; } - void setBody(TIntermBlock *body) { mBody = body; } + void setBody(TIntermAggregate *body) { mBody = body; } void setUnrollFlag(bool flag) { mUnrollFlag = flag; } bool getUnrollFlag() const { return mUnrollFlag; } @@ -227,7 +209,7 @@ class TIntermLoop : public TIntermNode TIntermNode *mInit; // for-loop initialization TIntermTyped *mCond; // loop exit condition TIntermTyped *mExpr; // for-loop expression - TIntermBlock *mBody; // loop body + TIntermAggregate *mBody; // loop body bool mUnrollFlag; // Whether the loop should be unrolled or not. }; @@ -334,7 +316,6 @@ class TIntermConstantUnion : public TIntermTyped TIntermConstantUnion(const TConstantUnion *unionPointer, const TType &type) : TIntermTyped(type), mUnionArrayPointer(unionPointer) { - ASSERT(unionPointer); } TIntermTyped *deepCopy() const override { return new TIntermConstantUnion(*this); } @@ -362,7 +343,6 @@ class TIntermConstantUnion : public TIntermTyped void replaceConstantUnion(const TConstantUnion *safeConstantUnion) { - ASSERT(safeConstantUnion); // Previous union pointer freed on pool deallocation. mUnionArrayPointer = safeConstantUnion; } @@ -373,15 +353,13 @@ class TIntermConstantUnion : public TIntermTyped TConstantUnion *foldBinary(TOperator op, TIntermConstantUnion *rightNode, - TDiagnostics *diagnostics, - const TSourceLoc &line); - const TConstantUnion *foldIndexing(int index); - TConstantUnion *foldUnaryNonComponentWise(TOperator op); - TConstantUnion *foldUnaryComponentWise(TOperator op, TDiagnostics *diagnostics); + TDiagnostics *diagnostics); + TConstantUnion *foldUnaryWithDifferentReturnType(TOperator op, TInfoSink &infoSink); + TConstantUnion *foldUnaryWithSameReturnType(TOperator op, TInfoSink &infoSink); - static TConstantUnion *FoldAggregateConstructor(TIntermAggregate *aggregate); - static TConstantUnion *FoldAggregateBuiltIn(TIntermAggregate *aggregate, - TDiagnostics *diagnostics); + static TConstantUnion *FoldAggregateConstructor(TIntermAggregate *aggregate, + TInfoSink &infoSink); + static TConstantUnion *FoldAggregateBuiltIn(TIntermAggregate *aggregate, TInfoSink &infoSink); protected: // Same data may be shared between multiple constant unions, so it can't be modified. @@ -389,9 +367,7 @@ class TIntermConstantUnion : public TIntermTyped private: typedef float(*FloatTypeUnaryFunc) (float); - void foldFloatTypeUnary(const TConstantUnion ¶meter, - FloatTypeUnaryFunc builtinFunc, - TConstantUnion *result) const; + bool foldFloatTypeUnary(const TConstantUnion ¶meter, FloatTypeUnaryFunc builtinFunc, TInfoSink &infoSink, TConstantUnion *result) const; TIntermConstantUnion(const TIntermConstantUnion &node); // Note: not deleted, just private! }; @@ -403,6 +379,7 @@ class TIntermOperator : public TIntermTyped { public: TOperator getOp() const { return mOp; } + void setOp(TOperator op) { mOp = op; } bool isAssignment() const; bool isMultiplication() const; @@ -423,54 +400,24 @@ class TIntermOperator : public TIntermTyped TOperator mOp; }; -// Node for vector swizzles. -class TIntermSwizzle : public TIntermTyped -{ - public: - // This constructor determines the type of the node based on the operand. - TIntermSwizzle(TIntermTyped *operand, const TVector &swizzleOffsets); - - TIntermTyped *deepCopy() const override { return new TIntermSwizzle(*this); } - - TIntermSwizzle *getAsSwizzleNode() override { return this; }; - void traverse(TIntermTraverser *it) override; - bool replaceChildNode(TIntermNode *original, TIntermNode *replacement) override; - - bool hasSideEffects() const override { return mOperand->hasSideEffects(); } - - TIntermTyped *getOperand() { return mOperand; } - void writeOffsetsAsXYZW(TInfoSinkBase *out) const; - - bool hasDuplicateOffsets() const; - - TIntermTyped *fold(); - - protected: - TIntermTyped *mOperand; - TVector mSwizzleOffsets; - - private: - void promote(); - - TIntermSwizzle(const TIntermSwizzle &node); // Note: not deleted, just private! -}; - // // Nodes for all the basic binary math operators. // class TIntermBinary : public TIntermOperator { public: + TIntermBinary(TOperator op) + : TIntermOperator(op), + mAddIndexClamp(false) {} + // This constructor determines the type of the binary node based on the operands and op. + // This is only supported for math/logical ops, not indexing. TIntermBinary(TOperator op, TIntermTyped *left, TIntermTyped *right); TIntermTyped *deepCopy() const override { return new TIntermBinary(*this); } static TOperator GetMulOpBasedOnOperands(const TType &left, const TType &right); static TOperator GetMulAssignOpBasedOnOperands(const TType &left, const TType &right); - static TQualifier GetCommaQualifier(int shaderVersion, - const TIntermTyped *left, - const TIntermTyped *right); TIntermBinary *getAsBinaryNode() override { return this; }; void traverse(TIntermTraverser *it) override; @@ -481,6 +428,8 @@ class TIntermBinary : public TIntermOperator return isAssignment() || mLeft->hasSideEffects() || mRight->hasSideEffects(); } + void setLeft(TIntermTyped *node) { mLeft = node; } + void setRight(TIntermTyped *node) { mRight = node; } TIntermTyped *getLeft() const { return mLeft; } TIntermTyped *getRight() const { return mRight; } TIntermTyped *fold(TDiagnostics *diagnostics); @@ -507,7 +456,14 @@ class TIntermBinary : public TIntermOperator class TIntermUnary : public TIntermOperator { public: - TIntermUnary(TOperator op, TIntermTyped *operand); + TIntermUnary(TOperator op, const TType &type) + : TIntermOperator(op, type), + mOperand(NULL), + mUseEmulatedFunction(false) {} + TIntermUnary(TOperator op) + : TIntermOperator(op), + mOperand(NULL), + mUseEmulatedFunction(false) {} TIntermTyped *deepCopy() const override { return new TIntermUnary(*this); } @@ -517,8 +473,10 @@ class TIntermUnary : public TIntermOperator bool hasSideEffects() const override { return isAssignment() || mOperand->hasSideEffects(); } + void setOperand(TIntermTyped *operand) { mOperand = operand; } TIntermTyped *getOperand() { return mOperand; } - TIntermTyped *fold(TDiagnostics *diagnostics); + void promote(const TType *funcReturnType); + TIntermTyped *fold(TInfoSink &infoSink); void setUseEmulatedFunction() { mUseEmulatedFunction = true; } bool getUseEmulatedFunction() { return mUseEmulatedFunction; } @@ -531,107 +489,22 @@ class TIntermUnary : public TIntermOperator bool mUseEmulatedFunction; private: - void promote(); - TIntermUnary(const TIntermUnary &node); // note: not deleted, just private! }; -class TFunctionSymbolInfo -{ - public: - POOL_ALLOCATOR_NEW_DELETE(); - TFunctionSymbolInfo() : mId(0) {} - - TFunctionSymbolInfo(const TFunctionSymbolInfo &) = default; - TFunctionSymbolInfo &operator=(const TFunctionSymbolInfo &) = default; - - void setFromFunction(const TFunction &function); - - void setNameObj(const TName &name) { mName = name; } - const TName &getNameObj() const { return mName; } - - const TString &getName() const { return mName.getString(); } - void setName(const TString &name) { mName.setString(name); } - bool isMain() const { return mName.getString() == "main("; } - - void setId(int functionId) { mId = functionId; } - int getId() const { return mId; } - private: - TName mName; - int mId; -}; - -// Node for function definitions. -class TIntermFunctionDefinition : public TIntermTyped -{ - public: - // TODO(oetuaho@nvidia.com): See if TFunctionSymbolInfo could be added to constructor - // parameters. - TIntermFunctionDefinition(const TType &type, TIntermAggregate *parameters, TIntermBlock *body) - : TIntermTyped(type), mParameters(parameters), mBody(body) - { - ASSERT(parameters != nullptr); - ASSERT(body != nullptr); - } - - TIntermFunctionDefinition *getAsFunctionDefinition() override { return this; } - void traverse(TIntermTraverser *it) override; - bool replaceChildNode(TIntermNode *original, TIntermNode *replacement) override; - - TIntermTyped *deepCopy() const override - { - UNREACHABLE(); - return nullptr; - } - bool hasSideEffects() const override - { - UNREACHABLE(); - return true; - } - - TIntermAggregate *getFunctionParameters() const { return mParameters; } - TIntermBlock *getBody() const { return mBody; } - - TFunctionSymbolInfo *getFunctionSymbolInfo() { return &mFunctionInfo; } - const TFunctionSymbolInfo *getFunctionSymbolInfo() const { return &mFunctionInfo; } - - private: - TIntermAggregate *mParameters; - TIntermBlock *mBody; - - TFunctionSymbolInfo mFunctionInfo; -}; - typedef TVector TIntermSequence; typedef TVector TQualifierList; -// Interface for node classes that have an arbitrarily sized set of children. -class TIntermAggregateBase -{ - public: - virtual ~TIntermAggregateBase() {} - - virtual TIntermSequence *getSequence() = 0; - virtual const TIntermSequence *getSequence() const = 0; - - bool replaceChildNodeWithMultiple(TIntermNode *original, const TIntermSequence &replacements); - bool insertChildNodes(TIntermSequence::size_type position, const TIntermSequence &insertions); - - protected: - TIntermAggregateBase() {} - - bool replaceChildNodeInternal(TIntermNode *original, TIntermNode *replacement); -}; - // // Nodes that operate on an arbitrary sized set of children. // -class TIntermAggregate : public TIntermOperator, public TIntermAggregateBase +class TIntermAggregate : public TIntermOperator { public: TIntermAggregate() : TIntermOperator(EOpNull), mUserDefined(false), + mFunctionId(0), mUseEmulatedFunction(false), mGotPrecisionFromChildren(false) { @@ -639,6 +512,7 @@ class TIntermAggregate : public TIntermOperator, public TIntermAggregateBase TIntermAggregate(TOperator op) : TIntermOperator(op), mUserDefined(false), + mFunctionId(0), mUseEmulatedFunction(false), mGotPrecisionFromChildren(false) { @@ -648,22 +522,29 @@ class TIntermAggregate : public TIntermOperator, public TIntermAggregateBase // Note: only supported for nodes that can be a part of an expression. TIntermTyped *deepCopy() const override { return new TIntermAggregate(*this); } - void setOp(TOperator op) { mOp = op; } - TIntermAggregate *getAsAggregate() override { return this; } void traverse(TIntermTraverser *it) override; bool replaceChildNode(TIntermNode *original, TIntermNode *replacement) override; - + bool replaceChildNodeWithMultiple(TIntermNode *original, TIntermSequence replacements); + bool insertChildNodes(TIntermSequence::size_type position, TIntermSequence insertions); // Conservatively assume function calls and other aggregate operators have side-effects bool hasSideEffects() const override { return true; } - TIntermTyped *fold(TDiagnostics *diagnostics); + TIntermTyped *fold(TInfoSink &infoSink); - TIntermSequence *getSequence() override { return &mSequence; } - const TIntermSequence *getSequence() const override { return &mSequence; } + TIntermSequence *getSequence() { return &mSequence; } + + void setNameObj(const TName &name) { mName = name; } + const TName &getNameObj() const { return mName; } + + void setName(const TString &name) { mName.setString(name); } + const TString &getName() const { return mName.getString(); } void setUserDefined() { mUserDefined = true; } bool isUserDefined() const { return mUserDefined; } + void setFunctionId(int functionId) { mFunctionId = functionId; } + int getFunctionId() const { return mFunctionId; } + void setUseEmulatedFunction() { mUseEmulatedFunction = true; } bool getUseEmulatedFunction() { return mUseEmulatedFunction; } @@ -674,12 +555,11 @@ class TIntermAggregate : public TIntermOperator, public TIntermAggregateBase // Returns true if changing parameter precision may affect the return value. bool gotPrecisionFromChildren() const { return mGotPrecisionFromChildren; } - TFunctionSymbolInfo *getFunctionSymbolInfo() { return &mFunctionInfo; } - const TFunctionSymbolInfo *getFunctionSymbolInfo() const { return &mFunctionInfo; } - protected: TIntermSequence mSequence; + TName mName; bool mUserDefined; // used for user defined function names + int mFunctionId; // If set to true, replace the built-in function call with an emulated one // to work around driver bugs. @@ -687,110 +567,50 @@ class TIntermAggregate : public TIntermOperator, public TIntermAggregateBase bool mGotPrecisionFromChildren; - TFunctionSymbolInfo mFunctionInfo; - private: TIntermAggregate(const TIntermAggregate &node); // note: not deleted, just private! }; -// A list of statements. Either the root node which contains declarations and function definitions, -// or a block that can be marked with curly braces {}. -class TIntermBlock : public TIntermNode, public TIntermAggregateBase -{ - public: - TIntermBlock() : TIntermNode() {} - ~TIntermBlock() {} - - TIntermBlock *getAsBlock() override { return this; } - void traverse(TIntermTraverser *it) override; - bool replaceChildNode(TIntermNode *original, TIntermNode *replacement) override; - - // Only intended for initially building the block. - void appendStatement(TIntermNode *statement); - - TIntermSequence *getSequence() override { return &mStatements; } - const TIntermSequence *getSequence() const override { return &mStatements; } - - protected: - TIntermSequence mStatements; -}; - -// Struct, interface block or variable declaration. Can contain multiple variable declarators. -class TIntermDeclaration : public TIntermNode, public TIntermAggregateBase +// +// For if tests. +// +class TIntermSelection : public TIntermTyped { public: - TIntermDeclaration() : TIntermNode() {} - ~TIntermDeclaration() {} - - TIntermDeclaration *getAsDeclarationNode() override { return this; } - void traverse(TIntermTraverser *it) override; - bool replaceChildNode(TIntermNode *original, TIntermNode *replacement) override; - - // Only intended for initially building the declaration. - // The declarator node should be either TIntermSymbol or TIntermBinary with op set to - // EOpInitialize. - void appendDeclarator(TIntermTyped *declarator); - - TIntermSequence *getSequence() override { return &mDeclarators; } - const TIntermSequence *getSequence() const override { return &mDeclarators; } - protected: - TIntermSequence mDeclarators; -}; + TIntermSelection(TIntermTyped *cond, TIntermNode *trueB, TIntermNode *falseB) + : TIntermTyped(TType(EbtVoid, EbpUndefined)), + mCondition(cond), + mTrueBlock(trueB), + mFalseBlock(falseB) {} + TIntermSelection(TIntermTyped *cond, TIntermNode *trueB, TIntermNode *falseB, + const TType &type) + : TIntermTyped(type), + mCondition(cond), + mTrueBlock(trueB), + mFalseBlock(falseB) {} -// For ternary operators like a ? b : c. -class TIntermTernary : public TIntermTyped -{ - public: - TIntermTernary(TIntermTyped *cond, TIntermTyped *trueExpression, TIntermTyped *falseExpression); + // Note: only supported for ternary operator nodes. + TIntermTyped *deepCopy() const override { return new TIntermSelection(*this); } void traverse(TIntermTraverser *it) override; bool replaceChildNode(TIntermNode *original, TIntermNode *replacement) override; - TIntermTyped *getCondition() const { return mCondition; } - TIntermTyped *getTrueExpression() const { return mTrueExpression; } - TIntermTyped *getFalseExpression() const { return mFalseExpression; } - TIntermTernary *getAsTernaryNode() override { return this; } - - TIntermTyped *deepCopy() const override { return new TIntermTernary(*this); } - - bool hasSideEffects() const override - { - return mCondition->hasSideEffects() || mTrueExpression->hasSideEffects() || - mFalseExpression->hasSideEffects(); - } - - static TQualifier DetermineQualifier(TIntermTyped *cond, - TIntermTyped *trueExpression, - TIntermTyped *falseExpression); - - private: - TIntermTernary(const TIntermTernary &node); // Note: not deleted, just private! - - TIntermTyped *mCondition; - TIntermTyped *mTrueExpression; - TIntermTyped *mFalseExpression; -}; - -class TIntermIfElse : public TIntermNode -{ - public: - TIntermIfElse(TIntermTyped *cond, TIntermBlock *trueB, TIntermBlock *falseB) - : TIntermNode(), mCondition(cond), mTrueBlock(trueB), mFalseBlock(falseB) - { - } - - void traverse(TIntermTraverser *it) override; - bool replaceChildNode(TIntermNode *original, TIntermNode *replacement) override; + // Conservatively assume selections have side-effects + bool hasSideEffects() const override { return true; } - TIntermTyped *getCondition() const { return mCondition; } - TIntermBlock *getTrueBlock() const { return mTrueBlock; } - TIntermBlock *getFalseBlock() const { return mFalseBlock; } - TIntermIfElse *getAsIfElseNode() override { return this; } + bool usesTernaryOperator() const { return getBasicType() != EbtVoid; } + TIntermNode *getCondition() const { return mCondition; } + TIntermNode *getTrueBlock() const { return mTrueBlock; } + TIntermNode *getFalseBlock() const { return mFalseBlock; } + TIntermSelection *getAsSelectionNode() override { return this; } protected: TIntermTyped *mCondition; - TIntermBlock *mTrueBlock; - TIntermBlock *mFalseBlock; + TIntermNode *mTrueBlock; + TIntermNode *mFalseBlock; + + private: + TIntermSelection(const TIntermSelection &node); // Note: not deleted, just private! }; // @@ -799,8 +619,10 @@ class TIntermIfElse : public TIntermNode class TIntermSwitch : public TIntermNode { public: - TIntermSwitch(TIntermTyped *init, TIntermBlock *statementList) - : TIntermNode(), mInit(init), mStatementList(statementList) + TIntermSwitch(TIntermTyped *init, TIntermAggregate *statementList) + : TIntermNode(), + mInit(init), + mStatementList(statementList) { } @@ -811,12 +633,12 @@ class TIntermSwitch : public TIntermNode TIntermSwitch *getAsSwitchNode() override { return this; } TIntermTyped *getInit() { return mInit; } - TIntermBlock *getStatementList() { return mStatementList; } - void setStatementList(TIntermBlock *statementList) { mStatementList = statementList; } + TIntermAggregate *getStatementList() { return mStatementList; } + void setStatementList(TIntermAggregate *statementList) { mStatementList = statementList; } protected: TIntermTyped *mInit; - TIntermBlock *mStatementList; + TIntermAggregate *mStatementList; }; // @@ -872,20 +694,12 @@ class TIntermTraverser : angle::NonCopyable virtual void visitSymbol(TIntermSymbol *node) {} virtual void visitRaw(TIntermRaw *node) {} virtual void visitConstantUnion(TIntermConstantUnion *node) {} - virtual bool visitSwizzle(Visit visit, TIntermSwizzle *node) { return true; } virtual bool visitBinary(Visit visit, TIntermBinary *node) { return true; } virtual bool visitUnary(Visit visit, TIntermUnary *node) { return true; } - virtual bool visitTernary(Visit visit, TIntermTernary *node) { return true; } - virtual bool visitIfElse(Visit visit, TIntermIfElse *node) { return true; } + virtual bool visitSelection(Visit visit, TIntermSelection *node) { return true; } virtual bool visitSwitch(Visit visit, TIntermSwitch *node) { return true; } virtual bool visitCase(Visit visit, TIntermCase *node) { return true; } - virtual bool visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) - { - return true; - } virtual bool visitAggregate(Visit visit, TIntermAggregate *node) { return true; } - virtual bool visitBlock(Visit visit, TIntermBlock *node) { return true; } - virtual bool visitDeclaration(Visit visit, TIntermDeclaration *node) { return true; } virtual bool visitLoop(Visit visit, TIntermLoop *node) { return true; } virtual bool visitBranch(Visit visit, TIntermBranch *node) { return true; } @@ -895,17 +709,12 @@ class TIntermTraverser : angle::NonCopyable virtual void traverseSymbol(TIntermSymbol *node); virtual void traverseRaw(TIntermRaw *node); virtual void traverseConstantUnion(TIntermConstantUnion *node); - virtual void traverseSwizzle(TIntermSwizzle *node); virtual void traverseBinary(TIntermBinary *node); virtual void traverseUnary(TIntermUnary *node); - virtual void traverseTernary(TIntermTernary *node); - virtual void traverseIfElse(TIntermIfElse *node); + virtual void traverseSelection(TIntermSelection *node); virtual void traverseSwitch(TIntermSwitch *node); virtual void traverseCase(TIntermCase *node); - virtual void traverseFunctionDefinition(TIntermFunctionDefinition *node); virtual void traverseAggregate(TIntermAggregate *node); - virtual void traverseBlock(TIntermBlock *node); - virtual void traverseDeclaration(TIntermDeclaration *node); virtual void traverseLoop(TIntermLoop *node); virtual void traverseBranch(TIntermBranch *node); @@ -952,7 +761,7 @@ class TIntermTraverser : angle::NonCopyable return nullptr; } - void pushParentBlock(TIntermBlock *node); + void pushParentBlock(TIntermAggregate *node); void incrementParentBlockPos(); void popParentBlock(); @@ -964,14 +773,14 @@ class TIntermTraverser : angle::NonCopyable // To replace a single node with multiple nodes on the parent aggregate node struct NodeReplaceWithMultipleEntry { - NodeReplaceWithMultipleEntry(TIntermAggregateBase *_parent, - TIntermNode *_original, - TIntermSequence _replacements) - : parent(_parent), original(_original), replacements(_replacements) + NodeReplaceWithMultipleEntry(TIntermAggregate *_parent, TIntermNode *_original, TIntermSequence _replacements) + : parent(_parent), + original(_original), + replacements(_replacements) { } - TIntermAggregateBase *parent; + TIntermAggregate *parent; TIntermNode *original; TIntermSequence replacements; }; @@ -979,7 +788,7 @@ class TIntermTraverser : angle::NonCopyable // To insert multiple nodes on the parent aggregate node struct NodeInsertMultipleEntry { - NodeInsertMultipleEntry(TIntermBlock *_parent, + NodeInsertMultipleEntry(TIntermAggregate *_parent, TIntermSequence::size_type _position, TIntermSequence _insertionsBefore, TIntermSequence _insertionsAfter) @@ -990,7 +799,7 @@ class TIntermTraverser : angle::NonCopyable { } - TIntermBlock *parent; + TIntermAggregate *parent; TIntermSequence::size_type position; TIntermSequence insertionsBefore; TIntermSequence insertionsAfter; @@ -1016,11 +825,11 @@ class TIntermTraverser : angle::NonCopyable // Helper to create a temporary symbol node. TIntermSymbol *createTempSymbol(const TType &type); // Create a node that declares but doesn't initialize a temporary symbol. - TIntermDeclaration *createTempDeclaration(const TType &type); + TIntermAggregate *createTempDeclaration(const TType &type); // Create a node that initializes the current temporary symbol with initializer having the given qualifier. - TIntermDeclaration *createTempInitDeclaration(TIntermTyped *initializer, TQualifier qualifier); + TIntermAggregate *createTempInitDeclaration(TIntermTyped *initializer, TQualifier qualifier); // Create a node that initializes the current temporary symbol with initializer. - TIntermDeclaration *createTempInitDeclaration(TIntermTyped *initializer); + TIntermAggregate *createTempInitDeclaration(TIntermTyped *initializer); // Create a node that assigns rightNode to the current temporary symbol. TIntermBinary *createTempAssignment(TIntermTyped *rightNode); // Increment temporary symbol index. @@ -1082,12 +891,13 @@ class TIntermTraverser : angle::NonCopyable struct ParentBlock { - ParentBlock(TIntermBlock *nodeIn, TIntermSequence::size_type posIn) - : node(nodeIn), pos(posIn) + ParentBlock(TIntermAggregate *nodeIn, TIntermSequence::size_type posIn) + : node(nodeIn), + pos(posIn) { } - TIntermBlock *node; + TIntermAggregate *node; TIntermSequence::size_type pos; }; @@ -1120,7 +930,6 @@ class TLValueTrackingTraverser : public TIntermTraverser void traverseBinary(TIntermBinary *node) final; void traverseUnary(TIntermUnary *node) final; - void traverseFunctionDefinition(TIntermFunctionDefinition *node) final; void traverseAggregate(TIntermAggregate *node) final; protected: @@ -1189,10 +998,8 @@ class TMaxDepthTraverser : public TIntermTraverser bool visitBinary(Visit, TIntermBinary *) override { return depthCheck(); } bool visitUnary(Visit, TIntermUnary *) override { return depthCheck(); } - bool visitTernary(Visit, TIntermTernary *) override { return depthCheck(); } - bool visitIfElse(Visit, TIntermIfElse *) override { return depthCheck(); } + bool visitSelection(Visit, TIntermSelection *) override { return depthCheck(); } bool visitAggregate(Visit, TIntermAggregate *) override { return depthCheck(); } - bool visitBlock(Visit, TIntermBlock *) override { return depthCheck(); } bool visitLoop(Visit, TIntermLoop *) override { return depthCheck(); } bool visitBranch(Visit, TIntermBranch *) override { return depthCheck(); } @@ -1202,6 +1009,4 @@ class TMaxDepthTraverser : public TIntermTraverser int mDepthLimit; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_INTERMNODE_H_ diff --git a/gfx/angle/src/compiler/translator/IntermNodePatternMatcher.cpp b/gfx/angle/src/compiler/translator/IntermNodePatternMatcher.cpp index dd2054f68..b614d8365 100755 --- a/gfx/angle/src/compiler/translator/IntermNodePatternMatcher.cpp +++ b/gfx/angle/src/compiler/translator/IntermNodePatternMatcher.cpp @@ -12,9 +12,17 @@ #include "compiler/translator/IntermNode.h" -namespace sh +namespace { +bool IsNodeBlock(TIntermNode *node) +{ + ASSERT(node != nullptr); + return (node->getAsAggregate() && node->getAsAggregate()->getOp() == EOpSequence); +} + +} // anonymous namespace + IntermNodePatternMatcher::IntermNodePatternMatcher(const unsigned int mask) : mMask(mask) { } @@ -31,7 +39,7 @@ bool IntermNodePatternMatcher::matchInternal(TIntermBinary *node, TIntermNode *p if ((mMask & kExpressionReturningArray) != 0) { if (node->isArray() && node->getOp() == EOpAssign && parentNode != nullptr && - !parentNode->getAsBlock()) + !IsNodeBlock(parentNode)) { return true; } @@ -88,7 +96,7 @@ bool IntermNodePatternMatcher::match(TIntermAggregate *node, TIntermNode *parent if (node->getType().isArray() && !parentIsAssignment && (node->isConstructor() || node->getOp() == EOpFunctionCall) && - !parentNode->getAsBlock()) + !IsNodeBlock(parentNode)) { return true; } @@ -97,13 +105,14 @@ bool IntermNodePatternMatcher::match(TIntermAggregate *node, TIntermNode *parent return false; } -bool IntermNodePatternMatcher::match(TIntermTernary *node) +bool IntermNodePatternMatcher::match(TIntermSelection *node) { if ((mMask & kUnfoldedShortCircuitExpression) != 0) { - return true; + if (node->usesTernaryOperator()) + { + return true; + } } return false; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/IntermNodePatternMatcher.h b/gfx/angle/src/compiler/translator/IntermNodePatternMatcher.h index 10f9657ed..be6fc61f7 100755 --- a/gfx/angle/src/compiler/translator/IntermNodePatternMatcher.h +++ b/gfx/angle/src/compiler/translator/IntermNodePatternMatcher.h @@ -11,13 +11,10 @@ #ifndef COMPILER_TRANSLATOR_INTERMNODEPATTERNMATCHER_H_ #define COMPILER_TRANSLATOR_INTERMNODEPATTERNMATCHER_H_ -namespace sh -{ - class TIntermAggregate; class TIntermBinary; class TIntermNode; -class TIntermTernary; +class TIntermSelection; class IntermNodePatternMatcher { @@ -45,7 +42,7 @@ class IntermNodePatternMatcher bool match(TIntermBinary *node, TIntermNode *parentNode, bool isLValueRequiredHere); bool match(TIntermAggregate *node, TIntermNode *parentNode); - bool match(TIntermTernary *node); + bool match(TIntermSelection *node); private: const unsigned int mMask; @@ -53,6 +50,4 @@ class IntermNodePatternMatcher bool matchInternal(TIntermBinary *node, TIntermNode *parentNode); }; -} // namespace sh - #endif diff --git a/gfx/angle/src/compiler/translator/IntermTraverse.cpp b/gfx/angle/src/compiler/translator/IntermTraverse.cpp index 7f91595d4..2f66ba7cd 100755 --- a/gfx/angle/src/compiler/translator/IntermTraverse.cpp +++ b/gfx/angle/src/compiler/translator/IntermTraverse.cpp @@ -8,9 +8,6 @@ #include "compiler/translator/InfoSink.h" #include "compiler/translator/SymbolTable.h" -namespace sh -{ - void TIntermSymbol::traverse(TIntermTraverser *it) { it->traverseSymbol(this); @@ -26,11 +23,6 @@ void TIntermConstantUnion::traverse(TIntermTraverser *it) it->traverseConstantUnion(this); } -void TIntermSwizzle::traverse(TIntermTraverser *it) -{ - it->traverseSwizzle(this); -} - void TIntermBinary::traverse(TIntermTraverser *it) { it->traverseBinary(this); @@ -41,14 +33,9 @@ void TIntermUnary::traverse(TIntermTraverser *it) it->traverseUnary(this); } -void TIntermTernary::traverse(TIntermTraverser *it) +void TIntermSelection::traverse(TIntermTraverser *it) { - it->traverseTernary(this); -} - -void TIntermIfElse::traverse(TIntermTraverser *it) -{ - it->traverseIfElse(this); + it->traverseSelection(this); } void TIntermSwitch::traverse(TIntermTraverser *it) @@ -61,21 +48,6 @@ void TIntermCase::traverse(TIntermTraverser *it) it->traverseCase(this); } -void TIntermFunctionDefinition::traverse(TIntermTraverser *it) -{ - it->traverseFunctionDefinition(this); -} - -void TIntermBlock::traverse(TIntermTraverser *it) -{ - it->traverseBlock(this); -} - -void TIntermDeclaration::traverse(TIntermTraverser *it) -{ - it->traverseDeclaration(this); -} - void TIntermAggregate::traverse(TIntermTraverser *it) { it->traverseAggregate(this); @@ -106,7 +78,7 @@ TIntermTraverser::~TIntermTraverser() { } -void TIntermTraverser::pushParentBlock(TIntermBlock *node) +void TIntermTraverser::pushParentBlock(TIntermAggregate *node) { mParentBlockStack.push_back(ParentBlock(node, 0)); } @@ -154,11 +126,7 @@ TIntermSymbol *TIntermTraverser::createTempSymbol(const TType &type, TQualifier TIntermSymbol *node = new TIntermSymbol(0, symbolName, type); node->setInternal(true); - - ASSERT(qualifier == EvqTemporary || qualifier == EvqConst || qualifier == EvqGlobal); node->getTypePointer()->setQualifier(qualifier); - // TODO(oetuaho): Might be useful to sanitize layout qualifier etc. on the type of the created - // symbol. This might need to be done in other places as well. return node; } @@ -167,25 +135,27 @@ TIntermSymbol *TIntermTraverser::createTempSymbol(const TType &type) return createTempSymbol(type, EvqTemporary); } -TIntermDeclaration *TIntermTraverser::createTempDeclaration(const TType &type) +TIntermAggregate *TIntermTraverser::createTempDeclaration(const TType &type) { - TIntermDeclaration *tempDeclaration = new TIntermDeclaration(); - tempDeclaration->appendDeclarator(createTempSymbol(type)); + TIntermAggregate *tempDeclaration = new TIntermAggregate(EOpDeclaration); + tempDeclaration->getSequence()->push_back(createTempSymbol(type)); return tempDeclaration; } -TIntermDeclaration *TIntermTraverser::createTempInitDeclaration(TIntermTyped *initializer, - TQualifier qualifier) +TIntermAggregate *TIntermTraverser::createTempInitDeclaration(TIntermTyped *initializer, TQualifier qualifier) { ASSERT(initializer != nullptr); TIntermSymbol *tempSymbol = createTempSymbol(initializer->getType(), qualifier); - TIntermDeclaration *tempDeclaration = new TIntermDeclaration(); - TIntermBinary *tempInit = new TIntermBinary(EOpInitialize, tempSymbol, initializer); - tempDeclaration->appendDeclarator(tempInit); + TIntermAggregate *tempDeclaration = new TIntermAggregate(EOpDeclaration); + TIntermBinary *tempInit = new TIntermBinary(EOpInitialize); + tempInit->setLeft(tempSymbol); + tempInit->setRight(initializer); + tempInit->setType(tempSymbol->getType()); + tempDeclaration->getSequence()->push_back(tempInit); return tempDeclaration; } -TIntermDeclaration *TIntermTraverser::createTempInitDeclaration(TIntermTyped *initializer) +TIntermAggregate *TIntermTraverser::createTempInitDeclaration(TIntermTyped *initializer) { return createTempInitDeclaration(initializer, EvqTemporary); } @@ -194,7 +164,10 @@ TIntermBinary *TIntermTraverser::createTempAssignment(TIntermTyped *rightNode) { ASSERT(rightNode != nullptr); TIntermSymbol *tempSymbol = createTempSymbol(rightNode->getType()); - TIntermBinary *assignment = new TIntermBinary(EOpAssign, tempSymbol, rightNode); + TIntermBinary *assignment = new TIntermBinary(EOpAssign); + assignment->setLeft(tempSymbol); + assignment->setRight(rightNode); + assignment->setType(tempSymbol->getType()); return assignment; } @@ -217,14 +190,13 @@ void TLValueTrackingTraverser::addToFunctionMap(const TName &name, TIntermSequen bool TLValueTrackingTraverser::isInFunctionMap(const TIntermAggregate *callNode) const { ASSERT(callNode->getOp() == EOpFunctionCall); - return (mFunctionMap.find(callNode->getFunctionSymbolInfo()->getNameObj()) != - mFunctionMap.end()); + return (mFunctionMap.find(callNode->getNameObj()) != mFunctionMap.end()); } TIntermSequence *TLValueTrackingTraverser::getFunctionParameters(const TIntermAggregate *callNode) { ASSERT(isInFunctionMap(callNode)); - return mFunctionMap[callNode->getFunctionSymbolInfo()->getNameObj()]; + return mFunctionMap[callNode->getNameObj()]; } void TLValueTrackingTraverser::setInFunctionCallOutParameter(bool inOutParameter) @@ -261,26 +233,6 @@ void TIntermTraverser::traverseConstantUnion(TIntermConstantUnion *node) visitConstantUnion(node); } -void TIntermTraverser::traverseSwizzle(TIntermSwizzle *node) -{ - bool visit = true; - - if (preVisit) - visit = visitSwizzle(PreVisit, node); - - if (visit) - { - incrementDepth(node); - - node->getOperand()->traverse(this); - - decrementDepth(); - } - - if (visit && postVisit) - visitSwizzle(PostVisit, node); -} - // // Traverse a binary node. // @@ -442,99 +394,9 @@ void TLValueTrackingTraverser::traverseUnary(TIntermUnary *node) visitUnary(PostVisit, node); } -// Traverse a function definition node. -void TIntermTraverser::traverseFunctionDefinition(TIntermFunctionDefinition *node) -{ - bool visit = true; - - if (preVisit) - visit = visitFunctionDefinition(PreVisit, node); - - if (visit) - { - incrementDepth(node); - mInGlobalScope = false; - - node->getFunctionParameters()->traverse(this); - if (inVisit) - visit = visitFunctionDefinition(InVisit, node); - node->getBody()->traverse(this); - - mInGlobalScope = true; - decrementDepth(); - } - - if (visit && postVisit) - visitFunctionDefinition(PostVisit, node); -} - -// Traverse a block node. -void TIntermTraverser::traverseBlock(TIntermBlock *node) -{ - bool visit = true; - - TIntermSequence *sequence = node->getSequence(); - - if (preVisit) - visit = visitBlock(PreVisit, node); - - if (visit) - { - incrementDepth(node); - pushParentBlock(node); - - for (auto *child : *sequence) - { - child->traverse(this); - if (visit && inVisit) - { - if (child != sequence->back()) - visit = visitBlock(InVisit, node); - } - - incrementParentBlockPos(); - } - - popParentBlock(); - decrementDepth(); - } - - if (visit && postVisit) - visitBlock(PostVisit, node); -} - -// Traverse a declaration node. -void TIntermTraverser::traverseDeclaration(TIntermDeclaration *node) -{ - bool visit = true; - - TIntermSequence *sequence = node->getSequence(); - - if (preVisit) - visit = visitDeclaration(PreVisit, node); - - if (visit) - { - incrementDepth(node); - - for (auto *child : *sequence) - { - child->traverse(this); - if (visit && inVisit) - { - if (child != sequence->back()) - visit = visitDeclaration(InVisit, node); - } - } - - decrementDepth(); - } - - if (visit && postVisit) - visitDeclaration(PostVisit, node); -} - +// // Traverse an aggregate node. Same comments in binary node apply here. +// void TIntermTraverser::traverseAggregate(TIntermAggregate *node) { bool visit = true; @@ -548,6 +410,11 @@ void TIntermTraverser::traverseAggregate(TIntermAggregate *node) { incrementDepth(node); + if (node->getOp() == EOpSequence) + pushParentBlock(node); + else if (node->getOp() == EOpFunction) + mInGlobalScope = false; + for (auto *child : *sequence) { child->traverse(this); @@ -556,8 +423,16 @@ void TIntermTraverser::traverseAggregate(TIntermAggregate *node) if (child != sequence->back()) visit = visitAggregate(InVisit, node); } + + if (node->getOp() == EOpSequence) + incrementParentBlockPos(); } + if (node->getOp() == EOpSequence) + popParentBlock(); + else if (node->getOp() == EOpFunction) + mInGlobalScope = true; + decrementDepth(); } @@ -565,24 +440,26 @@ void TIntermTraverser::traverseAggregate(TIntermAggregate *node) visitAggregate(PostVisit, node); } -void TLValueTrackingTraverser::traverseFunctionDefinition(TIntermFunctionDefinition *node) -{ - TIntermAggregate *params = node->getFunctionParameters(); - ASSERT(params != nullptr); - ASSERT(params->getOp() == EOpParameters); - addToFunctionMap(node->getFunctionSymbolInfo()->getNameObj(), params->getSequence()); - - TIntermTraverser::traverseFunctionDefinition(node); -} - void TLValueTrackingTraverser::traverseAggregate(TIntermAggregate *node) { bool visit = true; TIntermSequence *sequence = node->getSequence(); - if (node->getOp() == EOpPrototype) + switch (node->getOp()) { - addToFunctionMap(node->getFunctionSymbolInfo()->getNameObj(), sequence); + case EOpFunction: + { + TIntermAggregate *params = sequence->front()->getAsAggregate(); + ASSERT(params != nullptr); + ASSERT(params->getOp() == EOpParameters); + addToFunctionMap(node->getNameObj(), params->getSequence()); + break; + } + case EOpPrototype: + addToFunctionMap(node->getNameObj(), sequence); + break; + default: + break; } if (preVisit) @@ -628,6 +505,11 @@ void TLValueTrackingTraverser::traverseAggregate(TIntermAggregate *node) } else { + if (node->getOp() == EOpSequence) + pushParentBlock(node); + else if (node->getOp() == EOpFunction) + mInGlobalScope = false; + // Find the built-in function corresponding to this op so that we can determine the // in/out qualifiers of its parameters. TFunction *builtInFunc = nullptr; @@ -669,10 +551,18 @@ void TLValueTrackingTraverser::traverseAggregate(TIntermAggregate *node) visit = visitAggregate(InVisit, node); } + if (node->getOp() == EOpSequence) + incrementParentBlockPos(); + ++paramIndex; } setInFunctionCallOutParameter(false); + + if (node->getOp() == EOpSequence) + popParentBlock(); + else if (node->getOp() == EOpFunction) + mInGlobalScope = true; } decrementDepth(); @@ -683,37 +573,14 @@ void TLValueTrackingTraverser::traverseAggregate(TIntermAggregate *node) } // -// Traverse a ternary node. Same comments in binary node apply here. +// Traverse a selection node. Same comments in binary node apply here. // -void TIntermTraverser::traverseTernary(TIntermTernary *node) -{ - bool visit = true; - - if (preVisit) - visit = visitTernary(PreVisit, node); - - if (visit) - { - incrementDepth(node); - node->getCondition()->traverse(this); - if (node->getTrueExpression()) - node->getTrueExpression()->traverse(this); - if (node->getFalseExpression()) - node->getFalseExpression()->traverse(this); - decrementDepth(); - } - - if (visit && postVisit) - visitTernary(PostVisit, node); -} - -// Traverse an if-else node. Same comments in binary node apply here. -void TIntermTraverser::traverseIfElse(TIntermIfElse *node) +void TIntermTraverser::traverseSelection(TIntermSelection *node) { bool visit = true; if (preVisit) - visit = visitIfElse(PreVisit, node); + visit = visitSelection(PreVisit, node); if (visit) { @@ -727,7 +594,7 @@ void TIntermTraverser::traverseIfElse(TIntermIfElse *node) } if (visit && postVisit) - visitIfElse(PostVisit, node); + visitSelection(PostVisit, node); } // @@ -766,11 +633,7 @@ void TIntermTraverser::traverseCase(TIntermCase *node) visit = visitCase(PreVisit, node); if (visit && node->getCondition()) - { - incrementDepth(node); node->getCondition()->traverse(this); - decrementDepth(); - } if (visit && postVisit) visitCase(PostVisit, node); @@ -834,5 +697,3 @@ void TIntermTraverser::traverseRaw(TIntermRaw *node) { visitRaw(node); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/Intermediate.cpp b/gfx/angle/src/compiler/translator/Intermediate.cpp index 9e3e455ae..b6fefa45e 100755 --- a/gfx/angle/src/compiler/translator/Intermediate.cpp +++ b/gfx/angle/src/compiler/translator/Intermediate.cpp @@ -15,9 +15,6 @@ #include "compiler/translator/Intermediate.h" #include "compiler/translator/SymbolTable.h" -namespace sh -{ - //////////////////////////////////////////////////////////////////////////// // // First set of functions are to help build the intermediate representation. @@ -47,30 +44,52 @@ TIntermSymbol *TIntermediate::addSymbol( // Returns the added node. // The caller should set the type of the returned node. // -TIntermTyped *TIntermediate::addIndex(TOperator op, - TIntermTyped *base, - TIntermTyped *index, - const TSourceLoc &line, - TDiagnostics *diagnostics) +TIntermTyped *TIntermediate::addIndex( + TOperator op, TIntermTyped *base, TIntermTyped *index, const TSourceLoc &line) { - TIntermBinary *node = new TIntermBinary(op, base, index); + TIntermBinary *node = new TIntermBinary(op); node->setLine(line); + node->setLeft(base); + node->setRight(index); - TIntermTyped *folded = node->fold(diagnostics); - if (folded) - { - return folded; - } + // caller should set the type return node; } +// +// Add one node as the parent of another that it operates on. +// +// Returns the added node. +// +TIntermTyped *TIntermediate::addUnaryMath( + TOperator op, TIntermTyped *child, const TSourceLoc &line, const TType *funcReturnType) +{ + // + // Make a new node for the operator. + // + TIntermUnary *node = new TIntermUnary(op); + node->setLine(line); + node->setOperand(child); + node->promote(funcReturnType); + + TIntermTyped *foldedNode = node->fold(mInfoSink); + if (foldedNode) + return foldedNode; + + return node; +} + +// // This is the safe way to change the operator on an aggregate, as it // does lots of error checking and fixing. Especially for establishing -// a function call's operation on it's set of parameters. +// a function call's operation on it's set of parameters. Sequences +// of instructions are also aggregates, but they just direnctly set +// their operator to EOpSequence. // // Returns an aggregate node, which could be the one passed in if // it was already an aggregate but no operator was set. +// TIntermAggregate *TIntermediate::setAggregateOperator( TIntermNode *node, TOperator op, const TSourceLoc &line) { @@ -141,10 +160,11 @@ TIntermAggregate *TIntermediate::growAggregate( // // Returns an aggregate, unless NULL was passed in for the existing node. // -TIntermAggregate *TIntermediate::MakeAggregate(TIntermNode *node, const TSourceLoc &line) +TIntermAggregate *TIntermediate::makeAggregate( + TIntermNode *node, const TSourceLoc &line) { - if (node == nullptr) - return nullptr; + if (node == NULL) + return NULL; TIntermAggregate *aggNode = new TIntermAggregate; aggNode->getSequence()->push_back(node); @@ -155,57 +175,70 @@ TIntermAggregate *TIntermediate::MakeAggregate(TIntermNode *node, const TSourceL } // If the input node is nullptr, return nullptr. -// If the input node is a block node, return it. -// If the input node is not a block node, put it inside a block node and return that. -TIntermBlock *TIntermediate::EnsureBlock(TIntermNode *node) +// If the input node is a sequence (block) node, return it. +// If the input node is not a sequence node, put it inside a sequence node and return that. +TIntermAggregate *TIntermediate::ensureSequence(TIntermNode *node) { if (node == nullptr) return nullptr; - TIntermBlock *blockNode = node->getAsBlock(); - if (blockNode != nullptr) - return blockNode; - - blockNode = new TIntermBlock(); - blockNode->setLine(node->getLine()); - blockNode->getSequence()->push_back(node); - return blockNode; + TIntermAggregate *aggNode = node->getAsAggregate(); + if (aggNode != nullptr && aggNode->getOp() == EOpSequence) + return aggNode; + + aggNode = makeAggregate(node, node->getLine()); + aggNode->setOp(EOpSequence); + return aggNode; } +// // For "if" test nodes. There are three children; a condition, // a true path, and a false path. The two paths are in the // nodePair. // -// Returns the node created. -TIntermNode *TIntermediate::addIfElse(TIntermTyped *cond, - TIntermNodePair nodePair, - const TSourceLoc &line) +// Returns the selection node created. +// +TIntermNode *TIntermediate::addSelection( + TIntermTyped *cond, TIntermNodePair nodePair, const TSourceLoc &line) { - // For compile time constant conditions, prune the code now. + // + // For compile time constant selections, prune the code and + // test now. + // if (cond->getAsConstantUnion()) { if (cond->getAsConstantUnion()->getBConst(0) == true) { - return EnsureBlock(nodePair.node1); + return nodePair.node1 ? setAggregateOperator( + nodePair.node1, EOpSequence, nodePair.node1->getLine()) : NULL; } else { - return EnsureBlock(nodePair.node2); + return nodePair.node2 ? setAggregateOperator( + nodePair.node2, EOpSequence, nodePair.node2->getLine()) : NULL; } } - TIntermIfElse *node = - new TIntermIfElse(cond, EnsureBlock(nodePair.node1), EnsureBlock(nodePair.node2)); + TIntermSelection *node = new TIntermSelection( + cond, ensureSequence(nodePair.node1), ensureSequence(nodePair.node2)); node->setLine(line); return node; } -TIntermTyped *TIntermediate::AddComma(TIntermTyped *left, +TIntermTyped *TIntermediate::addComma(TIntermTyped *left, TIntermTyped *right, const TSourceLoc &line, int shaderVersion) { + TQualifier resultQualifier = EvqConst; + // ESSL3.00 section 12.43: The result of a sequence operator is not a constant-expression. + if (shaderVersion >= 300 || left->getQualifier() != EvqConst || + right->getQualifier() != EvqConst) + { + resultQualifier = EvqTemporary; + } + TIntermTyped *commaNode = nullptr; if (!left->hasSideEffects()) { @@ -213,53 +246,58 @@ TIntermTyped *TIntermediate::AddComma(TIntermTyped *left, } else { - commaNode = new TIntermBinary(EOpComma, left, right); - commaNode->setLine(line); + commaNode = growAggregate(left, right, line); + commaNode->getAsAggregate()->setOp(EOpComma); + commaNode->setType(right->getType()); } - TQualifier resultQualifier = TIntermBinary::GetCommaQualifier(shaderVersion, left, right); commaNode->getTypePointer()->setQualifier(resultQualifier); return commaNode; } +// // For "?:" test nodes. There are three children; a condition, // a true path, and a false path. The two paths are specified // as separate parameters. // -// Returns the ternary node created, or one of trueExpression and falseExpression if the expression -// could be folded. -TIntermTyped *TIntermediate::AddTernarySelection(TIntermTyped *cond, - TIntermTyped *trueExpression, - TIntermTyped *falseExpression, - const TSourceLoc &line) +// Returns the selection node created, or one of trueBlock and falseBlock if the expression could be folded. +// +TIntermTyped *TIntermediate::addSelection(TIntermTyped *cond, TIntermTyped *trueBlock, TIntermTyped *falseBlock, + const TSourceLoc &line) { + TQualifier resultQualifier = EvqTemporary; + if (cond->getQualifier() == EvqConst && trueBlock->getQualifier() == EvqConst && + falseBlock->getQualifier() == EvqConst) + { + resultQualifier = EvqConst; + } // Note that the node resulting from here can be a constant union without being qualified as // constant. if (cond->getAsConstantUnion()) { - TQualifier resultQualifier = - TIntermTernary::DetermineQualifier(cond, trueExpression, falseExpression); if (cond->getAsConstantUnion()->getBConst(0)) { - trueExpression->getTypePointer()->setQualifier(resultQualifier); - return trueExpression; + trueBlock->getTypePointer()->setQualifier(resultQualifier); + return trueBlock; } else { - falseExpression->getTypePointer()->setQualifier(resultQualifier); - return falseExpression; + falseBlock->getTypePointer()->setQualifier(resultQualifier); + return falseBlock; } } - // Make a ternary node. - TIntermTernary *node = new TIntermTernary(cond, trueExpression, falseExpression); + // + // Make a selection node. + // + TIntermSelection *node = new TIntermSelection(cond, trueBlock, falseBlock, trueBlock->getType()); + node->getTypePointer()->setQualifier(resultQualifier); node->setLine(line); return node; } -TIntermSwitch *TIntermediate::addSwitch(TIntermTyped *init, - TIntermBlock *statementList, - const TSourceLoc &line) +TIntermSwitch *TIntermediate::addSwitch( + TIntermTyped *init, TIntermAggregate *statementList, const TSourceLoc &line) { TIntermSwitch *node = new TIntermSwitch(init, statementList); node->setLine(line); @@ -292,22 +330,24 @@ TIntermConstantUnion *TIntermediate::addConstantUnion(const TConstantUnion *cons return node; } -TIntermTyped *TIntermediate::AddSwizzle(TIntermTyped *baseExpression, - const TVectorFields &fields, - const TSourceLoc &dotLocation) +TIntermTyped *TIntermediate::addSwizzle( + TVectorFields &fields, const TSourceLoc &line) { - TVector fieldsVector; - for (int i = 0; i < fields.num; ++i) - { - fieldsVector.push_back(fields.offsets[i]); - } - TIntermSwizzle *node = new TIntermSwizzle(baseExpression, fieldsVector); - node->setLine(dotLocation); - TIntermTyped *folded = node->fold(); - if (folded) + TIntermAggregate *node = new TIntermAggregate(EOpSequence); + + node->setLine(line); + TIntermConstantUnion *constIntNode; + TIntermSequence *sequenceVector = node->getSequence(); + TConstantUnion *unionArray; + + for (int i = 0; i < fields.num; i++) { - return folded; + unionArray = new TConstantUnion[1]; + unionArray->setIConst(fields.offsets[i]); + constIntNode = addConstantUnion( + unionArray, TType(EbtInt, EbpUndefined, EvqConst), line); + sequenceVector->push_back(constIntNode); } return node; @@ -320,7 +360,7 @@ TIntermNode *TIntermediate::addLoop( TLoopType type, TIntermNode *init, TIntermTyped *cond, TIntermTyped *expr, TIntermNode *body, const TSourceLoc &line) { - TIntermNode *node = new TIntermLoop(type, init, cond, expr, EnsureBlock(body)); + TIntermNode *node = new TIntermLoop(type, init, cond, expr, ensureSequence(body)); node->setLine(line); return node; @@ -344,8 +384,34 @@ TIntermBranch* TIntermediate::addBranch( return node; } -TIntermTyped *TIntermediate::foldAggregateBuiltIn(TIntermAggregate *aggregate, - TDiagnostics *diagnostics) +// +// This is to be executed once the final root is put on top by the parsing +// process. +// +TIntermAggregate *TIntermediate::postProcess(TIntermNode *root) +{ + if (root == nullptr) + return nullptr; + + // + // Finish off the top level sequence, if any + // + TIntermAggregate *aggRoot = root->getAsAggregate(); + if (aggRoot != nullptr && aggRoot->getOp() == EOpNull) + { + aggRoot->setOp(EOpSequence); + } + else if (aggRoot == nullptr || aggRoot->getOp() != EOpSequence) + { + aggRoot = new TIntermAggregate(EOpSequence); + aggRoot->setLine(root->getLine()); + aggRoot->getSequence()->push_back(root); + } + + return aggRoot; +} + +TIntermTyped *TIntermediate::foldAggregateBuiltIn(TIntermAggregate *aggregate) { switch (aggregate->getOp()) { @@ -372,16 +438,14 @@ TIntermTyped *TIntermediate::foldAggregateBuiltIn(TIntermAggregate *aggregate, case EOpFaceForward: case EOpReflect: case EOpRefract: - return aggregate->fold(diagnostics); + return aggregate->fold(mInfoSink); default: // TODO: Add support for folding array constructors if (aggregate->isConstructor() && !aggregate->isArray()) { - return aggregate->fold(diagnostics); + return aggregate->fold(mInfoSink); } // Constant folding not supported for the built-in. return nullptr; } } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/Intermediate.h b/gfx/angle/src/compiler/translator/Intermediate.h index d712bf953..339daa3e8 100755 --- a/gfx/angle/src/compiler/translator/Intermediate.h +++ b/gfx/angle/src/compiler/translator/Intermediate.h @@ -9,9 +9,6 @@ #include "compiler/translator/IntermNode.h" -namespace sh -{ - struct TVectorFields { int offsets[4]; @@ -19,42 +16,38 @@ struct TVectorFields }; // -// Set of helper functions to help build the tree. +// Set of helper functions to help parse and build the tree. // +class TInfoSink; class TIntermediate { public: POOL_ALLOCATOR_NEW_DELETE(); - TIntermediate() {} + TIntermediate(TInfoSink &i) + : mInfoSink(i) { } TIntermSymbol *addSymbol( int id, const TString &, const TType &, const TSourceLoc &); - TIntermTyped *addIndex(TOperator op, - TIntermTyped *base, - TIntermTyped *index, - const TSourceLoc &line, - TDiagnostics *diagnostics); + TIntermTyped *addIndex( + TOperator op, TIntermTyped *base, TIntermTyped *index, const TSourceLoc &); TIntermTyped *addUnaryMath( TOperator op, TIntermTyped *child, const TSourceLoc &line, const TType *funcReturnType); TIntermAggregate *growAggregate( TIntermNode *left, TIntermNode *right, const TSourceLoc &); - static TIntermAggregate *MakeAggregate(TIntermNode *node, const TSourceLoc &line); - static TIntermBlock *EnsureBlock(TIntermNode *node); + TIntermAggregate *makeAggregate(TIntermNode *node, const TSourceLoc &); + TIntermAggregate *ensureSequence(TIntermNode *node); TIntermAggregate *setAggregateOperator(TIntermNode *, TOperator, const TSourceLoc &); - TIntermNode *addIfElse(TIntermTyped *cond, TIntermNodePair code, const TSourceLoc &line); - static TIntermTyped *AddTernarySelection(TIntermTyped *cond, - TIntermTyped *trueExpression, - TIntermTyped *falseExpression, - const TSourceLoc &line); - TIntermSwitch *addSwitch(TIntermTyped *init, - TIntermBlock *statementList, - const TSourceLoc &line); + TIntermNode *addSelection(TIntermTyped *cond, TIntermNodePair code, const TSourceLoc &); + TIntermTyped *addSelection(TIntermTyped *cond, TIntermTyped *trueBlock, TIntermTyped *falseBlock, + const TSourceLoc &line); + TIntermSwitch *addSwitch( + TIntermTyped *init, TIntermAggregate *statementList, const TSourceLoc &line); TIntermCase *addCase( TIntermTyped *condition, const TSourceLoc &line); - static TIntermTyped *AddComma(TIntermTyped *left, - TIntermTyped *right, - const TSourceLoc &line, - int shaderVersion); + TIntermTyped *addComma(TIntermTyped *left, + TIntermTyped *right, + const TSourceLoc &line, + int shaderVersion); TIntermConstantUnion *addConstantUnion(const TConstantUnion *constantUnion, const TType &type, const TSourceLoc &line); @@ -62,18 +55,17 @@ class TIntermediate TIntermNode *, const TSourceLoc &); TIntermBranch *addBranch(TOperator, const TSourceLoc &); TIntermBranch *addBranch(TOperator, TIntermTyped *, const TSourceLoc &); - static TIntermTyped *AddSwizzle(TIntermTyped *baseExpression, - const TVectorFields &fields, - const TSourceLoc &dotLocation); + TIntermTyped *addSwizzle(TVectorFields &, const TSourceLoc &); + TIntermAggregate *postProcess(TIntermNode *root); static void outputTree(TIntermNode *, TInfoSinkBase &); - TIntermTyped *foldAggregateBuiltIn(TIntermAggregate *aggregate, TDiagnostics *diagnostics); + TIntermTyped *foldAggregateBuiltIn(TIntermAggregate *aggregate); private: void operator=(TIntermediate &); // prevent assignments -}; -} // namespace sh + TInfoSink & mInfoSink; +}; #endif // COMPILER_TRANSLATOR_INTERMEDIATE_H_ diff --git a/gfx/angle/src/compiler/translator/LoopInfo.cpp b/gfx/angle/src/compiler/translator/LoopInfo.cpp index 48fa24472..d931a18a2 100755 --- a/gfx/angle/src/compiler/translator/LoopInfo.cpp +++ b/gfx/angle/src/compiler/translator/LoopInfo.cpp @@ -6,9 +6,6 @@ #include "compiler/translator/LoopInfo.h" -namespace sh -{ - namespace { @@ -96,7 +93,8 @@ void TLoopIndexInfo::fillInfo(TIntermLoop *node) // Here we assume all the operations are valid, because the loop node is // already validated in ValidateLimitations. - TIntermSequence *declSeq = node->getInit()->getAsDeclarationNode()->getSequence(); + TIntermSequence *declSeq = + node->getInit()->getAsAggregate()->getSequence(); TIntermBinary *declInit = (*declSeq)[0]->getAsBinaryNode(); TIntermSymbol *symbol = declInit->getLeft()->getAsSymbolNode(); @@ -211,4 +209,3 @@ void TLoopStack::pop() pop_back(); } -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/LoopInfo.h b/gfx/angle/src/compiler/translator/LoopInfo.h index 393aa64f6..ec73fd0fa 100755 --- a/gfx/angle/src/compiler/translator/LoopInfo.h +++ b/gfx/angle/src/compiler/translator/LoopInfo.h @@ -9,9 +9,6 @@ #include "compiler/translator/IntermNode.h" -namespace sh -{ - class TLoopIndexInfo { public: @@ -79,7 +76,5 @@ class TLoopStack : public TVector void pop(); }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_LOOPINFO_H_ diff --git a/gfx/angle/src/compiler/translator/Operator.cpp b/gfx/angle/src/compiler/translator/Operator.cpp index 57878b930..2a6f1e4fc 100755 --- a/gfx/angle/src/compiler/translator/Operator.cpp +++ b/gfx/angle/src/compiler/translator/Operator.cpp @@ -62,6 +62,8 @@ const char *GetOperatorString(TOperator op) case EOpIndexDirectStruct: case EOpIndexDirectInterfaceBlock: return "."; + case EOpVectorSwizzle: return "."; + case EOpRadians: return "radians"; case EOpDegrees: return "degrees"; case EOpSin: return "sin"; diff --git a/gfx/angle/src/compiler/translator/Operator.h b/gfx/angle/src/compiler/translator/Operator.h index f7706f8ed..b3acc5f08 100755 --- a/gfx/angle/src/compiler/translator/Operator.h +++ b/gfx/angle/src/compiler/translator/Operator.h @@ -13,9 +13,12 @@ enum TOperator { EOpNull, // if in a node, should only mean a node is still being built + EOpSequence, // denotes a list of statements, or parameters, etc. EOpFunctionCall, + EOpFunction, // For function definition EOpParameters, // an aggregate listing the parameters to a function + EOpDeclaration, EOpInvariantDeclaration, // Specialized declarations for attributing invariance EOpPrototype, @@ -74,6 +77,8 @@ enum TOperator EOpIndexDirectStruct, EOpIndexDirectInterfaceBlock, + EOpVectorSwizzle, + // // Built-in functions potentially mapped to operators // diff --git a/gfx/angle/src/compiler/translator/OutputESSL.cpp b/gfx/angle/src/compiler/translator/OutputESSL.cpp index e55d6c544..77e0a8fb3 100755 --- a/gfx/angle/src/compiler/translator/OutputESSL.cpp +++ b/gfx/angle/src/compiler/translator/OutputESSL.cpp @@ -6,27 +6,20 @@ #include "compiler/translator/OutputESSL.h" -namespace sh -{ - TOutputESSL::TOutputESSL(TInfoSinkBase &objSink, ShArrayIndexClampingStrategy clampingStrategy, ShHashFunction64 hashFunction, NameMap &nameMap, TSymbolTable &symbolTable, - sh::GLenum shaderType, int shaderVersion, - bool forceHighp, - ShCompileOptions compileOptions) + bool forceHighp) : TOutputGLSLBase(objSink, clampingStrategy, hashFunction, nameMap, symbolTable, - shaderType, shaderVersion, - SH_ESSL_OUTPUT, - compileOptions), + SH_ESSL_OUTPUT), mForceHighp(forceHighp) { } @@ -43,5 +36,3 @@ bool TOutputESSL::writeVariablePrecision(TPrecision precision) out << getPrecisionString(precision); return true; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/OutputESSL.h b/gfx/angle/src/compiler/translator/OutputESSL.h index 5b2cb9492..c5a963499 100755 --- a/gfx/angle/src/compiler/translator/OutputESSL.h +++ b/gfx/angle/src/compiler/translator/OutputESSL.h @@ -9,29 +9,22 @@ #include "compiler/translator/OutputGLSLBase.h" -namespace sh -{ - class TOutputESSL : public TOutputGLSLBase { - public: - TOutputESSL(TInfoSinkBase &objSink, +public: + TOutputESSL(TInfoSinkBase& objSink, ShArrayIndexClampingStrategy clampingStrategy, ShHashFunction64 hashFunction, - NameMap &nameMap, - TSymbolTable &symbolTable, - sh::GLenum shaderType, + NameMap& nameMap, + TSymbolTable& symbolTable, int shaderVersion, - bool forceHighp, - ShCompileOptions compileOptions); + bool forceHighp); - protected: - bool writeVariablePrecision(TPrecision precision) override; +protected: + bool writeVariablePrecision(TPrecision precision) override; - private: +private: bool mForceHighp; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_OUTPUTESSL_H_ diff --git a/gfx/angle/src/compiler/translator/OutputGLSL.cpp b/gfx/angle/src/compiler/translator/OutputGLSL.cpp index fc2b18471..431425020 100755 --- a/gfx/angle/src/compiler/translator/OutputGLSL.cpp +++ b/gfx/angle/src/compiler/translator/OutputGLSL.cpp @@ -6,27 +6,20 @@ #include "compiler/translator/OutputGLSL.h" -namespace sh -{ - -TOutputGLSL::TOutputGLSL(TInfoSinkBase &objSink, +TOutputGLSL::TOutputGLSL(TInfoSinkBase& objSink, ShArrayIndexClampingStrategy clampingStrategy, ShHashFunction64 hashFunction, - NameMap &nameMap, - TSymbolTable &symbolTable, - sh::GLenum shaderType, + NameMap& nameMap, + TSymbolTable& symbolTable, int shaderVersion, - ShShaderOutput output, - ShCompileOptions compileOptions) + ShShaderOutput output) : TOutputGLSLBase(objSink, clampingStrategy, hashFunction, nameMap, symbolTable, - shaderType, shaderVersion, - output, - compileOptions) + output) { } @@ -44,11 +37,11 @@ void TOutputGLSL::visitSymbol(TIntermSymbol *node) { out << "gl_FragDepth"; } - else if (symbol == "gl_FragColor" && sh::IsGLSL130OrNewer(getShaderOutput())) + else if (symbol == "gl_FragColor" && IsGLSL130OrNewer(getShaderOutput())) { out << "webgl_FragColor"; } - else if (symbol == "gl_FragData" && sh::IsGLSL130OrNewer(getShaderOutput())) + else if (symbol == "gl_FragData" && IsGLSL130OrNewer(getShaderOutput())) { out << "webgl_FragData"; } @@ -94,8 +87,8 @@ TString TOutputGLSL::translateTextureFunction(TString &name) "textureCubeGradEXT", "textureGrad", NULL, NULL }; - const char **mapping = - (sh::IsGLSL130OrNewer(getShaderOutput())) ? legacyToCoreRename : simpleRename; + const char **mapping = (IsGLSL130OrNewer(getShaderOutput())) ? + legacyToCoreRename : simpleRename; for (int i = 0; mapping[i] != NULL; i += 2) { @@ -107,5 +100,3 @@ TString TOutputGLSL::translateTextureFunction(TString &name) return name; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/OutputGLSL.h b/gfx/angle/src/compiler/translator/OutputGLSL.h index d910c0004..9b1aca4ea 100755 --- a/gfx/angle/src/compiler/translator/OutputGLSL.h +++ b/gfx/angle/src/compiler/translator/OutputGLSL.h @@ -9,21 +9,16 @@ #include "compiler/translator/OutputGLSLBase.h" -namespace sh -{ - class TOutputGLSL : public TOutputGLSLBase { public: - TOutputGLSL(TInfoSinkBase &objSink, + TOutputGLSL(TInfoSinkBase& objSink, ShArrayIndexClampingStrategy clampingStrategy, ShHashFunction64 hashFunction, - NameMap &nameMap, - TSymbolTable &symbolTable, - sh::GLenum shaderType, + NameMap& nameMap, + TSymbolTable& symbolTable, int shaderVersion, - ShShaderOutput output, - ShCompileOptions compileOptions); + ShShaderOutput output); protected: bool writeVariablePrecision(TPrecision) override; @@ -31,6 +26,4 @@ class TOutputGLSL : public TOutputGLSLBase TString translateTextureFunction(TString &name) override; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_OUTPUTGLSL_H_ diff --git a/gfx/angle/src/compiler/translator/OutputGLSLBase.cpp b/gfx/angle/src/compiler/translator/OutputGLSLBase.cpp index 2c32b2ea5..296eef7d1 100755 --- a/gfx/angle/src/compiler/translator/OutputGLSLBase.cpp +++ b/gfx/angle/src/compiler/translator/OutputGLSLBase.cpp @@ -10,9 +10,6 @@ #include -namespace sh -{ - namespace { TString arrayBrackets(const TType &type) @@ -25,17 +22,16 @@ TString arrayBrackets(const TType &type) bool isSingleStatement(TIntermNode *node) { - if (node->getAsFunctionDefinition()) - { - return false; - } - else if (node->getAsBlock()) + if (const TIntermAggregate *aggregate = node->getAsAggregate()) { - return false; + return (aggregate->getOp() != EOpFunction) && + (aggregate->getOp() != EOpSequence); } - else if (node->getAsIfElseNode()) + else if (const TIntermSelection *selection = node->getAsSelectionNode()) { - return false; + // Ternary operators are usually part of an assignment operator. + // This handles those rare cases in which they are all by themselves. + return selection->usesTernaryOperator(); } else if (node->getAsLoopNode()) { @@ -52,32 +48,6 @@ bool isSingleStatement(TIntermNode *node) return true; } -// If SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS is enabled, layout qualifiers are spilled whenever -// variables with specified layout qualifiers are copied. Additional checks are needed against the -// type and storage qualifier of the variable to verify that layout qualifiers have to be outputted. -// TODO (mradev): Fix layout qualifier spilling in ScalarizeVecAndMatConstructorArgs and remove -// NeedsToWriteLayoutQualifier. -bool NeedsToWriteLayoutQualifier(const TType &type) -{ - if (type.getBasicType() == EbtInterfaceBlock) - { - return false; - } - - const TLayoutQualifier &layoutQualifier = type.getLayoutQualifier(); - - if ((type.getQualifier() == EvqFragmentOut || type.getQualifier() == EvqVertexIn) && - layoutQualifier.location >= 0) - { - return true; - } - if (IsImage(type.getBasicType()) && layoutQualifier.imageInternalFormat != EiifUnspecified) - { - return true; - } - return false; -} - } // namespace TOutputGLSLBase::TOutputGLSLBase(TInfoSinkBase &objSink, @@ -85,10 +55,8 @@ TOutputGLSLBase::TOutputGLSLBase(TInfoSinkBase &objSink, ShHashFunction64 hashFunction, NameMap &nameMap, TSymbolTable &symbolTable, - sh::GLenum shaderType, int shaderVersion, - ShShaderOutput output, - ShCompileOptions compileOptions) + ShShaderOutput output) : TIntermTraverser(true, true, true), mObjSink(objSink), mDeclaringVariables(false), @@ -96,20 +64,9 @@ TOutputGLSLBase::TOutputGLSLBase(TInfoSinkBase &objSink, mHashFunction(hashFunction), mNameMap(nameMap), mSymbolTable(symbolTable), - mShaderType(shaderType), mShaderVersion(shaderVersion), - mOutput(output), - mCompileOptions(compileOptions) -{ -} - -void TOutputGLSLBase::writeInvariantQualifier(const TType &type) + mOutput(output) { - if (!sh::RemoveInvariant(mShaderType, mShaderVersion, mOutput, mCompileOptions)) - { - TInfoSinkBase &out = objSink(); - out << "invariant "; - } } void TOutputGLSLBase::writeTriplet( @@ -134,121 +91,55 @@ void TOutputGLSLBase::writeBuiltInFunctionTriplet( void TOutputGLSLBase::writeLayoutQualifier(const TType &type) { - if (!NeedsToWriteLayoutQualifier(type)) - { - return; - } - - TInfoSinkBase &out = objSink(); - const TLayoutQualifier &layoutQualifier = type.getLayoutQualifier(); - out << "layout("; - if (type.getQualifier() == EvqFragmentOut || type.getQualifier() == EvqVertexIn) { + const TLayoutQualifier &layoutQualifier = type.getLayoutQualifier(); if (layoutQualifier.location >= 0) { - out << "location = " << layoutQualifier.location; + TInfoSinkBase &out = objSink(); + out << "layout(location = " << layoutQualifier.location << ") "; } } - - if (IsImage(type.getBasicType()) && layoutQualifier.imageInternalFormat != EiifUnspecified) - { - ASSERT(type.getQualifier() == EvqTemporary || type.getQualifier() == EvqUniform); - out << getImageInternalFormatString(layoutQualifier.imageInternalFormat); - } - - out << ") "; -} - -const char *TOutputGLSLBase::mapQualifierToString(TQualifier qualifier) -{ - if (sh::IsGLSL410OrOlder(mOutput) && mShaderVersion >= 300 && - (mCompileOptions & SH_REMOVE_INVARIANT_AND_CENTROID_FOR_ESSL3) != 0) - { - switch (qualifier) - { - // The return string is consistent with sh::getQualifierString() from - // BaseTypes.h minus the "centroid" keyword. - case EvqCentroid: - return ""; - case EvqCentroidIn: - return "smooth in"; - case EvqCentroidOut: - return "smooth out"; - default: - break; - } - } - if (sh::IsGLSL130OrNewer(mOutput)) - { - switch (qualifier) - { - case EvqAttribute: - return "in"; - case EvqVaryingIn: - return "in"; - case EvqVaryingOut: - return "out"; - default: - break; - } - } - return sh::getQualifierString(qualifier); } void TOutputGLSLBase::writeVariableType(const TType &type) { - TQualifier qualifier = type.getQualifier(); TInfoSinkBase &out = objSink(); if (type.isInvariant()) { - writeInvariantQualifier(type); + out << "invariant "; } if (type.getBasicType() == EbtInterfaceBlock) { TInterfaceBlock *interfaceBlock = type.getInterfaceBlock(); declareInterfaceBlockLayout(interfaceBlock); } + TQualifier qualifier = type.getQualifier(); if (qualifier != EvqTemporary && qualifier != EvqGlobal) { - const char *qualifierString = mapQualifierToString(qualifier); - if (qualifierString && qualifierString[0] != '\0') + if (IsGLSL130OrNewer(mOutput)) { - out << qualifierString << " "; + switch (qualifier) + { + case EvqAttribute: + out << "in "; + break; + case EvqVaryingIn: + out << "in "; + break; + case EvqVaryingOut: + out << "out "; + break; + default: + out << type.getQualifierString() << " "; + break; + } + } + else + { + out << type.getQualifierString() << " "; } } - - const TMemoryQualifier &memoryQualifier = type.getMemoryQualifier(); - if (memoryQualifier.readonly) - { - ASSERT(IsImage(type.getBasicType())); - out << "readonly "; - } - - if (memoryQualifier.writeonly) - { - ASSERT(IsImage(type.getBasicType())); - out << "writeonly "; - } - - if (memoryQualifier.coherent) - { - ASSERT(IsImage(type.getBasicType())); - out << "coherent "; - } - - if (memoryQualifier.restrictQualifier) - { - ASSERT(IsImage(type.getBasicType())); - out << "restrict "; - } - - if (memoryQualifier.volatileQualifier) - { - ASSERT(IsImage(type.getBasicType())); - out << "volatile "; - } - // Declare the struct if we have not done so already. if (type.getBasicType() == EbtStruct && !structDeclared(type.getStruct())) { @@ -286,8 +177,9 @@ void TOutputGLSLBase::writeFunctionParameters(const TIntermSequence &args) const TType &type = arg->getType(); writeVariableType(type); - if (!arg->getName().getString().empty()) - out << " " << hashName(arg->getName()); + const TString &name = arg->getSymbol(); + if (!name.empty()) + out << " " << hashName(name); if (type.isArray()) out << arrayBrackets(type); @@ -305,7 +197,7 @@ const TConstantUnion *TOutputGLSLBase::writeConstantUnion( if (type.getBasicType() == EbtStruct) { const TStructure *structure = type.getStruct(); - out << hashName(TName(structure->name())) << "("; + out << hashName(structure->name()) << "("; const TFieldList &fields = structure->fields(); for (size_t i = 0; i < fields.size(); ++i) @@ -379,7 +271,7 @@ void TOutputGLSLBase::visitSymbol(TIntermSymbol *node) if (mLoopUnrollStack.needsToReplaceSymbolWithValue(node)) out << mLoopUnrollStack.getLoopIndexValue(node); else - out << hashVariableName(node->getName()); + out << hashVariableName(node->getSymbol()); if (mDeclaringVariables && node->getType().isArray()) out << arrayBrackets(node->getType()); @@ -390,222 +282,241 @@ void TOutputGLSLBase::visitConstantUnion(TIntermConstantUnion *node) writeConstantUnion(node->getType(), node->getUnionArrayPointer()); } -bool TOutputGLSLBase::visitSwizzle(Visit visit, TIntermSwizzle *node) -{ - TInfoSinkBase &out = objSink(); - if (visit == PostVisit) - { - out << "."; - node->writeOffsetsAsXYZW(&out); - } - return true; -} - bool TOutputGLSLBase::visitBinary(Visit visit, TIntermBinary *node) { bool visitChildren = true; TInfoSinkBase &out = objSink(); switch (node->getOp()) { - case EOpComma: - writeTriplet(visit, "(", ", ", ")"); - break; - case EOpInitialize: + case EOpInitialize: + if (visit == InVisit) + { + out << " = "; + // RHS of initialize is not being declared. + mDeclaringVariables = false; + } + break; + case EOpAssign: + writeTriplet(visit, "(", " = ", ")"); + break; + case EOpAddAssign: + writeTriplet(visit, "(", " += ", ")"); + break; + case EOpSubAssign: + writeTriplet(visit, "(", " -= ", ")"); + break; + case EOpDivAssign: + writeTriplet(visit, "(", " /= ", ")"); + break; + case EOpIModAssign: + writeTriplet(visit, "(", " %= ", ")"); + break; + // Notice the fall-through. + case EOpMulAssign: + case EOpVectorTimesMatrixAssign: + case EOpVectorTimesScalarAssign: + case EOpMatrixTimesScalarAssign: + case EOpMatrixTimesMatrixAssign: + writeTriplet(visit, "(", " *= ", ")"); + break; + case EOpBitShiftLeftAssign: + writeTriplet(visit, "(", " <<= ", ")"); + break; + case EOpBitShiftRightAssign: + writeTriplet(visit, "(", " >>= ", ")"); + break; + case EOpBitwiseAndAssign: + writeTriplet(visit, "(", " &= ", ")"); + break; + case EOpBitwiseXorAssign: + writeTriplet(visit, "(", " ^= ", ")"); + break; + case EOpBitwiseOrAssign: + writeTriplet(visit, "(", " |= ", ")"); + break; + + case EOpIndexDirect: + writeTriplet(visit, NULL, "[", "]"); + break; + case EOpIndexIndirect: + if (node->getAddIndexClamp()) + { if (visit == InVisit) { - out << " = "; - // RHS of initialize is not being declared. - mDeclaringVariables = false; + if (mClampingStrategy == SH_CLAMP_WITH_CLAMP_INTRINSIC) + out << "[int(clamp(float("; + else + out << "[webgl_int_clamp("; } - break; - case EOpAssign: - writeTriplet(visit, "(", " = ", ")"); - break; - case EOpAddAssign: - writeTriplet(visit, "(", " += ", ")"); - break; - case EOpSubAssign: - writeTriplet(visit, "(", " -= ", ")"); - break; - case EOpDivAssign: - writeTriplet(visit, "(", " /= ", ")"); - break; - case EOpIModAssign: - writeTriplet(visit, "(", " %= ", ")"); - break; - // Notice the fall-through. - case EOpMulAssign: - case EOpVectorTimesMatrixAssign: - case EOpVectorTimesScalarAssign: - case EOpMatrixTimesScalarAssign: - case EOpMatrixTimesMatrixAssign: - writeTriplet(visit, "(", " *= ", ")"); - break; - case EOpBitShiftLeftAssign: - writeTriplet(visit, "(", " <<= ", ")"); - break; - case EOpBitShiftRightAssign: - writeTriplet(visit, "(", " >>= ", ")"); - break; - case EOpBitwiseAndAssign: - writeTriplet(visit, "(", " &= ", ")"); - break; - case EOpBitwiseXorAssign: - writeTriplet(visit, "(", " ^= ", ")"); - break; - case EOpBitwiseOrAssign: - writeTriplet(visit, "(", " |= ", ")"); - break; - - case EOpIndexDirect: - writeTriplet(visit, NULL, "[", "]"); - break; - case EOpIndexIndirect: - if (node->getAddIndexClamp()) + else if (visit == PostVisit) { - if (visit == InVisit) + int maxSize; + TIntermTyped *left = node->getLeft(); + TType leftType = left->getType(); + + if (left->isArray()) { - if (mClampingStrategy == SH_CLAMP_WITH_CLAMP_INTRINSIC) - out << "[int(clamp(float("; - else - out << "[webgl_int_clamp("; + // The shader will fail validation if the array length is not > 0. + maxSize = static_cast(leftType.getArraySize()) - 1; } - else if (visit == PostVisit) + else { - int maxSize; - TIntermTyped *left = node->getLeft(); - TType leftType = left->getType(); - - if (left->isArray()) - { - // The shader will fail validation if the array length is not > 0. - maxSize = static_cast(leftType.getArraySize()) - 1; - } - else - { - maxSize = leftType.getNominalSize() - 1; - } - - if (mClampingStrategy == SH_CLAMP_WITH_CLAMP_INTRINSIC) - out << "), 0.0, float(" << maxSize << ")))]"; - else - out << ", 0, " << maxSize << ")]"; + maxSize = leftType.getNominalSize() - 1; } + + if (mClampingStrategy == SH_CLAMP_WITH_CLAMP_INTRINSIC) + out << "), 0.0, float(" << maxSize << ")))]"; + else + out << ", 0, " << maxSize << ")]"; } - else - { - writeTriplet(visit, NULL, "[", "]"); - } - break; - case EOpIndexDirectStruct: - if (visit == InVisit) - { - // Here we are writing out "foo.bar", where "foo" is struct - // and "bar" is field. In AST, it is represented as a binary - // node, where left child represents "foo" and right child "bar". - // The node itself represents ".". The struct field "bar" is - // actually stored as an index into TStructure::fields. - out << "."; - const TStructure *structure = node->getLeft()->getType().getStruct(); - const TIntermConstantUnion *index = node->getRight()->getAsConstantUnion(); - const TField *field = structure->fields()[index->getIConst(0)]; - - TString fieldName = field->name(); - if (!mSymbolTable.findBuiltIn(structure->name(), mShaderVersion)) - fieldName = hashName(TName(fieldName)); - - out << fieldName; - visitChildren = false; - } - break; - case EOpIndexDirectInterfaceBlock: - if (visit == InVisit) + } + else + { + writeTriplet(visit, NULL, "[", "]"); + } + break; + case EOpIndexDirectStruct: + if (visit == InVisit) + { + // Here we are writing out "foo.bar", where "foo" is struct + // and "bar" is field. In AST, it is represented as a binary + // node, where left child represents "foo" and right child "bar". + // The node itself represents ".". The struct field "bar" is + // actually stored as an index into TStructure::fields. + out << "."; + const TStructure *structure = node->getLeft()->getType().getStruct(); + const TIntermConstantUnion *index = node->getRight()->getAsConstantUnion(); + const TField *field = structure->fields()[index->getIConst(0)]; + + TString fieldName = field->name(); + if (!mSymbolTable.findBuiltIn(structure->name(), mShaderVersion)) + fieldName = hashName(fieldName); + + out << fieldName; + visitChildren = false; + } + break; + case EOpIndexDirectInterfaceBlock: + if (visit == InVisit) + { + out << "."; + const TInterfaceBlock *interfaceBlock = node->getLeft()->getType().getInterfaceBlock(); + const TIntermConstantUnion *index = node->getRight()->getAsConstantUnion(); + const TField *field = interfaceBlock->fields()[index->getIConst(0)]; + + TString fieldName = field->name(); + ASSERT(!mSymbolTable.findBuiltIn(interfaceBlock->name(), mShaderVersion)); + fieldName = hashName(fieldName); + + out << fieldName; + visitChildren = false; + } + break; + case EOpVectorSwizzle: + if (visit == InVisit) + { + out << "."; + TIntermAggregate *rightChild = node->getRight()->getAsAggregate(); + TIntermSequence *sequence = rightChild->getSequence(); + for (TIntermSequence::iterator sit = sequence->begin(); sit != sequence->end(); ++sit) { - out << "."; - const TInterfaceBlock *interfaceBlock = - node->getLeft()->getType().getInterfaceBlock(); - const TIntermConstantUnion *index = node->getRight()->getAsConstantUnion(); - const TField *field = interfaceBlock->fields()[index->getIConst(0)]; - - TString fieldName = field->name(); - ASSERT(!mSymbolTable.findBuiltIn(interfaceBlock->name(), mShaderVersion)); - fieldName = hashName(TName(fieldName)); - - out << fieldName; - visitChildren = false; + TIntermConstantUnion *element = (*sit)->getAsConstantUnion(); + ASSERT(element->getBasicType() == EbtInt); + ASSERT(element->getNominalSize() == 1); + const TConstantUnion& data = element->getUnionArrayPointer()[0]; + ASSERT(data.getType() == EbtInt); + switch (data.getIConst()) + { + case 0: + out << "x"; + break; + case 1: + out << "y"; + break; + case 2: + out << "z"; + break; + case 3: + out << "w"; + break; + default: + UNREACHABLE(); + } } - break; + visitChildren = false; + } + break; - case EOpAdd: - writeTriplet(visit, "(", " + ", ")"); - break; - case EOpSub: - writeTriplet(visit, "(", " - ", ")"); - break; - case EOpMul: - writeTriplet(visit, "(", " * ", ")"); - break; - case EOpDiv: - writeTriplet(visit, "(", " / ", ")"); - break; - case EOpIMod: - writeTriplet(visit, "(", " % ", ")"); - break; - case EOpBitShiftLeft: - writeTriplet(visit, "(", " << ", ")"); - break; - case EOpBitShiftRight: - writeTriplet(visit, "(", " >> ", ")"); - break; - case EOpBitwiseAnd: - writeTriplet(visit, "(", " & ", ")"); - break; - case EOpBitwiseXor: - writeTriplet(visit, "(", " ^ ", ")"); - break; - case EOpBitwiseOr: - writeTriplet(visit, "(", " | ", ")"); - break; + case EOpAdd: + writeTriplet(visit, "(", " + ", ")"); + break; + case EOpSub: + writeTriplet(visit, "(", " - ", ")"); + break; + case EOpMul: + writeTriplet(visit, "(", " * ", ")"); + break; + case EOpDiv: + writeTriplet(visit, "(", " / ", ")"); + break; + case EOpIMod: + writeTriplet(visit, "(", " % ", ")"); + break; + case EOpBitShiftLeft: + writeTriplet(visit, "(", " << ", ")"); + break; + case EOpBitShiftRight: + writeTriplet(visit, "(", " >> ", ")"); + break; + case EOpBitwiseAnd: + writeTriplet(visit, "(", " & ", ")"); + break; + case EOpBitwiseXor: + writeTriplet(visit, "(", " ^ ", ")"); + break; + case EOpBitwiseOr: + writeTriplet(visit, "(", " | ", ")"); + break; - case EOpEqual: - writeTriplet(visit, "(", " == ", ")"); - break; - case EOpNotEqual: - writeTriplet(visit, "(", " != ", ")"); - break; - case EOpLessThan: - writeTriplet(visit, "(", " < ", ")"); - break; - case EOpGreaterThan: - writeTriplet(visit, "(", " > ", ")"); - break; - case EOpLessThanEqual: - writeTriplet(visit, "(", " <= ", ")"); - break; - case EOpGreaterThanEqual: - writeTriplet(visit, "(", " >= ", ")"); - break; + case EOpEqual: + writeTriplet(visit, "(", " == ", ")"); + break; + case EOpNotEqual: + writeTriplet(visit, "(", " != ", ")"); + break; + case EOpLessThan: + writeTriplet(visit, "(", " < ", ")"); + break; + case EOpGreaterThan: + writeTriplet(visit, "(", " > ", ")"); + break; + case EOpLessThanEqual: + writeTriplet(visit, "(", " <= ", ")"); + break; + case EOpGreaterThanEqual: + writeTriplet(visit, "(", " >= ", ")"); + break; - // Notice the fall-through. - case EOpVectorTimesScalar: - case EOpVectorTimesMatrix: - case EOpMatrixTimesVector: - case EOpMatrixTimesScalar: - case EOpMatrixTimesMatrix: - writeTriplet(visit, "(", " * ", ")"); - break; + // Notice the fall-through. + case EOpVectorTimesScalar: + case EOpVectorTimesMatrix: + case EOpMatrixTimesVector: + case EOpMatrixTimesScalar: + case EOpMatrixTimesMatrix: + writeTriplet(visit, "(", " * ", ")"); + break; - case EOpLogicalOr: - writeTriplet(visit, "(", " || ", ")"); - break; - case EOpLogicalXor: - writeTriplet(visit, "(", " ^^ ", ")"); - break; - case EOpLogicalAnd: - writeTriplet(visit, "(", " && ", ")"); - break; - default: - UNREACHABLE(); + case EOpLogicalOr: + writeTriplet(visit, "(", " || ", ")"); + break; + case EOpLogicalXor: + writeTriplet(visit, "(", " ^^ ", ")"); + break; + case EOpLogicalAnd: + writeTriplet(visit, "(", " && ", ")"); + break; + default: + UNREACHABLE(); } return visitChildren; @@ -800,40 +711,40 @@ bool TOutputGLSLBase::visitUnary(Visit visit, TIntermUnary *node) return true; } -bool TOutputGLSLBase::visitTernary(Visit visit, TIntermTernary *node) +bool TOutputGLSLBase::visitSelection(Visit visit, TIntermSelection *node) { TInfoSinkBase &out = objSink(); - // Notice two brackets at the beginning and end. The outer ones - // encapsulate the whole ternary expression. This preserves the - // order of precedence when ternary expressions are used in a - // compound expression, i.e., c = 2 * (a < b ? 1 : 2). - out << "(("; - node->getCondition()->traverse(this); - out << ") ? ("; - node->getTrueExpression()->traverse(this); - out << ") : ("; - node->getFalseExpression()->traverse(this); - out << "))"; - return false; -} -bool TOutputGLSLBase::visitIfElse(Visit visit, TIntermIfElse *node) -{ - TInfoSinkBase &out = objSink(); - - out << "if ("; - node->getCondition()->traverse(this); - out << ")\n"; + if (node->usesTernaryOperator()) + { + // Notice two brackets at the beginning and end. The outer ones + // encapsulate the whole ternary expression. This preserves the + // order of precedence when ternary expressions are used in a + // compound expression, i.e., c = 2 * (a < b ? 1 : 2). + out << "(("; + node->getCondition()->traverse(this); + out << ") ? ("; + node->getTrueBlock()->traverse(this); + out << ") : ("; + node->getFalseBlock()->traverse(this); + out << "))"; + } + else + { + out << "if ("; + node->getCondition()->traverse(this); + out << ")\n"; - incrementDepth(node); - visitCodeBlock(node->getTrueBlock()); + incrementDepth(node); + visitCodeBlock(node->getTrueBlock()); - if (node->getFalseBlock()) - { - out << "else\n"; - visitCodeBlock(node->getFalseBlock()); + if (node->getFalseBlock()) + { + out << "else\n"; + visitCodeBlock(node->getFalseBlock()); + } + decrementDepth(); } - decrementDepth(); return false; } @@ -867,65 +778,6 @@ bool TOutputGLSLBase::visitCase(Visit visit, TIntermCase *node) } } -bool TOutputGLSLBase::visitBlock(Visit visit, TIntermBlock *node) -{ - TInfoSinkBase &out = objSink(); - // Scope the blocks except when at the global scope. - if (mDepth > 0) - { - out << "{\n"; - } - - incrementDepth(node); - for (TIntermSequence::const_iterator iter = node->getSequence()->begin(); - iter != node->getSequence()->end(); ++iter) - { - TIntermNode *curNode = *iter; - ASSERT(curNode != nullptr); - curNode->traverse(this); - - if (isSingleStatement(curNode)) - out << ";\n"; - } - decrementDepth(); - - // Scope the blocks except when at the global scope. - if (mDepth > 0) - { - out << "}\n"; - } - return false; -} - -bool TOutputGLSLBase::visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) -{ - TInfoSinkBase &out = objSink(); - - ASSERT(visit == PreVisit); - { - const TType &type = node->getType(); - writeVariableType(type); - if (type.isArray()) - out << arrayBrackets(type); - } - - out << " " << hashFunctionNameIfNeeded(node->getFunctionSymbolInfo()->getNameObj()); - - incrementDepth(node); - - // Traverse function parameters. - TIntermAggregate *params = node->getFunctionParameters()->getAsAggregate(); - ASSERT(params->getOp() == EOpParameters); - params->traverse(this); - - // Traverse function body. - visitCodeBlock(node->getBody()); - decrementDepth(); - - // Fully processed; no need to visit children. - return false; -} - bool TOutputGLSLBase::visitAggregate(Visit visit, TIntermAggregate *node) { bool visitChildren = true; @@ -933,6 +785,33 @@ bool TOutputGLSLBase::visitAggregate(Visit visit, TIntermAggregate *node) bool useEmulatedFunction = (visit == PreVisit && node->getUseEmulatedFunction()); switch (node->getOp()) { + case EOpSequence: + // Scope the sequences except when at the global scope. + if (mDepth > 0) + { + out << "{\n"; + } + + incrementDepth(node); + for (TIntermSequence::const_iterator iter = node->getSequence()->begin(); + iter != node->getSequence()->end(); ++iter) + { + TIntermNode *curNode = *iter; + ASSERT(curNode != NULL); + curNode->traverse(this); + + if (isSingleStatement(curNode)) + out << ";\n"; + } + decrementDepth(); + + // Scope the sequences except when at the global scope. + if (mDepth > 0) + { + out << "}\n"; + } + visitChildren = false; + break; case EOpPrototype: // Function declaration. ASSERT(visit == PreVisit); @@ -943,7 +822,7 @@ bool TOutputGLSLBase::visitAggregate(Visit visit, TIntermAggregate *node) out << arrayBrackets(type); } - out << " " << hashFunctionNameIfNeeded(node->getFunctionSymbolInfo()->getNameObj()); + out << " " << hashFunctionNameIfNeeded(node->getNameObj()); out << "("; writeFunctionParameters(*(node->getSequence())); @@ -951,10 +830,46 @@ bool TOutputGLSLBase::visitAggregate(Visit visit, TIntermAggregate *node) visitChildren = false; break; + case EOpFunction: { + // Function definition. + ASSERT(visit == PreVisit); + { + const TType &type = node->getType(); + writeVariableType(type); + if (type.isArray()) + out << arrayBrackets(type); + } + + out << " " << hashFunctionNameIfNeeded(node->getNameObj()); + + incrementDepth(node); + // Function definition node contains one or two children nodes + // representing function parameters and function body. The latter + // is not present in case of empty function bodies. + const TIntermSequence &sequence = *(node->getSequence()); + ASSERT((sequence.size() == 1) || (sequence.size() == 2)); + TIntermSequence::const_iterator seqIter = sequence.begin(); + + // Traverse function parameters. + TIntermAggregate *params = (*seqIter)->getAsAggregate(); + ASSERT(params != NULL); + ASSERT(params->getOp() == EOpParameters); + params->traverse(this); + + // Traverse function body. + TIntermAggregate *body = ++seqIter != sequence.end() ? + (*seqIter)->getAsAggregate() : NULL; + visitCodeBlock(body); + decrementDepth(); + + // Fully processed; no need to visit children. + visitChildren = false; + break; + } case EOpFunctionCall: // Function call. if (visit == PreVisit) - out << hashFunctionNameIfNeeded(node->getFunctionSymbolInfo()->getNameObj()) << "("; + out << hashFunctionNameIfNeeded(node->getNameObj()) << "("; else if (visit == InVisit) out << ", "; else @@ -968,6 +883,27 @@ bool TOutputGLSLBase::visitAggregate(Visit visit, TIntermAggregate *node) out << ")"; visitChildren = false; break; + case EOpDeclaration: + // Variable declaration. + if (visit == PreVisit) + { + const TIntermSequence &sequence = *(node->getSequence()); + const TIntermTyped *variable = sequence.front()->getAsTyped(); + writeLayoutQualifier(variable->getType()); + writeVariableType(variable->getType()); + out << " "; + mDeclaringVariables = true; + } + else if (visit == InVisit) + { + out << ", "; + mDeclaringVariables = true; + } + else + { + mDeclaringVariables = false; + } + break; case EOpInvariantDeclaration: // Invariant declaration. ASSERT(visit == PreVisit); @@ -976,7 +912,7 @@ bool TOutputGLSLBase::visitAggregate(Visit visit, TIntermAggregate *node) ASSERT(sequence && sequence->size() == 1); const TIntermSymbol *symbol = sequence->front()->getAsSymbolNode(); ASSERT(symbol); - out << "invariant " << hashVariableName(symbol->getName()); + out << "invariant " << hashVariableName(symbol->getSymbol()); } visitChildren = false; break; @@ -1031,6 +967,9 @@ bool TOutputGLSLBase::visitAggregate(Visit visit, TIntermAggregate *node) case EOpVectorNotEqual: writeBuiltInFunctionTriplet(visit, "notEqual(", useEmulatedFunction); break; + case EOpComma: + writeTriplet(visit, "(", ", ", ")"); + break; case EOpMod: writeBuiltInFunctionTriplet(visit, "mod(", useEmulatedFunction); @@ -1090,32 +1029,6 @@ bool TOutputGLSLBase::visitAggregate(Visit visit, TIntermAggregate *node) return visitChildren; } -bool TOutputGLSLBase::visitDeclaration(Visit visit, TIntermDeclaration *node) -{ - TInfoSinkBase &out = objSink(); - - // Variable declaration. - if (visit == PreVisit) - { - const TIntermSequence &sequence = *(node->getSequence()); - const TIntermTyped *variable = sequence.front()->getAsTyped(); - writeLayoutQualifier(variable->getType()); - writeVariableType(variable->getType()); - out << " "; - mDeclaringVariables = true; - } - else if (visit == InVisit) - { - out << ", "; - mDeclaringVariables = true; - } - else - { - mDeclaringVariables = false; - } - return true; -} - bool TOutputGLSLBase::visitLoop(Visit visit, TIntermLoop *node) { TInfoSinkBase &out = objSink(); @@ -1149,10 +1062,11 @@ bool TOutputGLSLBase::visitLoop(Visit visit, TIntermLoop *node) else { // Need to put a one-iteration loop here to handle break. - TIntermSequence *declSeq = node->getInit()->getAsDeclarationNode()->getSequence(); + TIntermSequence *declSeq = + node->getInit()->getAsAggregate()->getSequence(); TIntermSymbol *indexSymbol = (*declSeq)[0]->getAsBinaryNode()->getLeft()->getAsSymbolNode(); - TString name = hashVariableName(indexSymbol->getName()); + TString name = hashVariableName(indexSymbol->getSymbol()); out << "for (int " << name << " = 0; " << name << " < 1; " << "++" << name << ")\n"; @@ -1220,7 +1134,7 @@ bool TOutputGLSLBase::visitBranch(Visit visit, TIntermBranch *node) return true; } -void TOutputGLSLBase::visitCodeBlock(TIntermBlock *node) +void TOutputGLSLBase::visitCodeBlock(TIntermNode *node) { TInfoSinkBase &out = objSink(); if (node != NULL) @@ -1240,43 +1154,27 @@ void TOutputGLSLBase::visitCodeBlock(TIntermBlock *node) TString TOutputGLSLBase::getTypeName(const TType &type) { if (type.getBasicType() == EbtStruct) - return hashName(TName(type.getStruct()->name())); + return hashName(type.getStruct()->name()); else return type.getBuiltInTypeNameString(); } -TString TOutputGLSLBase::hashName(const TName &name) +TString TOutputGLSLBase::hashName(const TString &name) { - if (name.getString().empty()) - { - ASSERT(!name.isInternal()); - return name.getString(); - } - if (name.isInternal()) - { - // TODO(oetuaho): Would be nicer to prefix non-internal names with "_" instead, like is - // done in the HLSL output, but that requires fairly complex changes elsewhere in the code - // as well. - // We need to use a prefix that is reserved in WebGL in order to guarantee that the internal - // names don't conflict with user-defined names from WebGL. - return "webgl_angle_" + name.getString(); - } - if (mHashFunction == nullptr) - { - return name.getString(); - } - NameMap::const_iterator it = mNameMap.find(name.getString().c_str()); + if (mHashFunction == NULL || name.empty()) + return name; + NameMap::const_iterator it = mNameMap.find(name.c_str()); if (it != mNameMap.end()) return it->second.c_str(); - TString hashedName = TIntermTraverser::hash(name.getString(), mHashFunction); - mNameMap[name.getString().c_str()] = hashedName.c_str(); + TString hashedName = TIntermTraverser::hash(name, mHashFunction); + mNameMap[name.c_str()] = hashedName.c_str(); return hashedName; } -TString TOutputGLSLBase::hashVariableName(const TName &name) +TString TOutputGLSLBase::hashVariableName(const TString &name) { - if (mSymbolTable.findBuiltIn(name.getString(), mShaderVersion) != NULL) - return name.getString(); + if (mSymbolTable.findBuiltIn(name, mShaderVersion) != NULL) + return name; return hashName(name); } @@ -1287,16 +1185,9 @@ TString TOutputGLSLBase::hashFunctionNameIfNeeded(const TName &mangledName) if (mSymbolTable.findBuiltIn(mangledStr, mShaderVersion) != nullptr || name == "main") return translateTextureFunction(name); if (mangledName.isInternal()) - { - // Internal function names are outputted as-is - they may refer to functions manually added - // to the output shader source that are not included in the AST at all. return name; - } else - { - TName nameObj(name); - return hashName(nameObj); - } + return hashName(name); } bool TOutputGLSLBase::structDeclared(const TStructure *structure) const @@ -1314,14 +1205,14 @@ void TOutputGLSLBase::declareStruct(const TStructure *structure) { TInfoSinkBase &out = objSink(); - out << "struct " << hashName(TName(structure->name())) << "{\n"; + out << "struct " << hashName(structure->name()) << "{\n"; const TFieldList &fields = structure->fields(); for (size_t i = 0; i < fields.size(); ++i) { const TField *field = fields[i]; if (writeVariablePrecision(field->type()->getPrecision())) out << " "; - out << getTypeName(*field->type()) << " " << hashName(TName(field->name())); + out << getTypeName(*field->type()) << " " << hashName(field->name()); if (field->type()->isArray()) out << arrayBrackets(*field->type()); out << ";\n"; @@ -1382,19 +1273,17 @@ void TOutputGLSLBase::declareInterfaceBlock(const TInterfaceBlock *interfaceBloc { TInfoSinkBase &out = objSink(); - out << hashName(TName(interfaceBlock->name())) << "{\n"; + out << hashName(interfaceBlock->name()) << "{\n"; const TFieldList &fields = interfaceBlock->fields(); for (size_t i = 0; i < fields.size(); ++i) { const TField *field = fields[i]; if (writeVariablePrecision(field->type()->getPrecision())) out << " "; - out << getTypeName(*field->type()) << " " << hashName(TName(field->name())); + out << getTypeName(*field->type()) << " " << hashName(field->name()); if (field->type()->isArray()) out << arrayBrackets(*field->type()); out << ";\n"; } out << "}"; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/OutputGLSLBase.h b/gfx/angle/src/compiler/translator/OutputGLSLBase.h index ede4c4925..29b710487 100755 --- a/gfx/angle/src/compiler/translator/OutputGLSLBase.h +++ b/gfx/angle/src/compiler/translator/OutputGLSLBase.h @@ -13,9 +13,6 @@ #include "compiler/translator/LoopInfo.h" #include "compiler/translator/ParseContext.h" -namespace sh -{ - class TOutputGLSLBase : public TIntermTraverser { public: @@ -23,11 +20,9 @@ class TOutputGLSLBase : public TIntermTraverser ShArrayIndexClampingStrategy clampingStrategy, ShHashFunction64 hashFunction, NameMap &nameMap, - TSymbolTable &symbolTable, - sh::GLenum shaderType, + TSymbolTable& symbolTable, int shaderVersion, - ShShaderOutput output, - ShCompileOptions compileOptions); + ShShaderOutput output); ShShaderOutput getShaderOutput() const { @@ -38,7 +33,6 @@ class TOutputGLSLBase : public TIntermTraverser TInfoSinkBase &objSink() { return mObjSink; } void writeTriplet(Visit visit, const char *preStr, const char *inStr, const char *postStr); void writeLayoutQualifier(const TType &type); - void writeInvariantQualifier(const TType &type); void writeVariableType(const TType &type); virtual bool writeVariablePrecision(TPrecision precision) = 0; void writeFunctionParameters(const TIntermSequence &args); @@ -48,27 +42,22 @@ class TOutputGLSLBase : public TIntermTraverser void visitSymbol(TIntermSymbol *node) override; void visitConstantUnion(TIntermConstantUnion *node) override; - bool visitSwizzle(Visit visit, TIntermSwizzle *node) override; bool visitBinary(Visit visit, TIntermBinary *node) override; bool visitUnary(Visit visit, TIntermUnary *node) override; - bool visitTernary(Visit visit, TIntermTernary *node) override; - bool visitIfElse(Visit visit, TIntermIfElse *node) override; + bool visitSelection(Visit visit, TIntermSelection *node) override; bool visitSwitch(Visit visit, TIntermSwitch *node) override; bool visitCase(Visit visit, TIntermCase *node) override; - bool visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) override; bool visitAggregate(Visit visit, TIntermAggregate *node) override; - bool visitBlock(Visit visit, TIntermBlock *node) override; - bool visitDeclaration(Visit visit, TIntermDeclaration *node) override; bool visitLoop(Visit visit, TIntermLoop *node) override; bool visitBranch(Visit visit, TIntermBranch *node) override; - void visitCodeBlock(TIntermBlock *node); + void visitCodeBlock(TIntermNode *node); // Return the original name if hash function pointer is NULL; // otherwise return the hashed name. - TString hashName(const TName &name); + TString hashName(const TString &name); // Same as hashName(), but without hashing built-in variables. - TString hashVariableName(const TName &name); + TString hashVariableName(const TString &name); // Same as hashName(), but without hashing built-in functions and with unmangling. TString hashFunctionNameIfNeeded(const TName &mangledName); // Used to translate function names for differences between ESSL and GLSL @@ -83,8 +72,6 @@ class TOutputGLSLBase : public TIntermTraverser void writeBuiltInFunctionTriplet(Visit visit, const char *preStr, bool useEmulatedFunction); - const char *mapQualifierToString(TQualifier qialifier); - TInfoSinkBase &mObjSink; bool mDeclaringVariables; @@ -103,15 +90,9 @@ class TOutputGLSLBase : public TIntermTraverser TSymbolTable &mSymbolTable; - sh::GLenum mShaderType; - const int mShaderVersion; ShShaderOutput mOutput; - - ShCompileOptions mCompileOptions; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_OUTPUTGLSLBASE_H_ diff --git a/gfx/angle/src/compiler/translator/OutputHLSL.cpp b/gfx/angle/src/compiler/translator/OutputHLSL.cpp index 5ef2e89f9..639178281 100755 --- a/gfx/angle/src/compiler/translator/OutputHLSL.cpp +++ b/gfx/angle/src/compiler/translator/OutputHLSL.cpp @@ -28,11 +28,13 @@ #include "compiler/translator/blocklayout.h" #include "compiler/translator/util.h" -namespace sh +namespace { -namespace +bool IsSequence(TIntermNode *node) { + return node->getAsAggregate() != nullptr && node->getAsAggregate()->getOp() == EOpSequence; +} void WriteSingleConstant(TInfoSinkBase &out, const TConstantUnion *const constUnion) { @@ -75,14 +77,14 @@ const TConstantUnion *WriteConstantUnionArray(TInfoSinkBase &out, } // namespace -OutputHLSL::OutputHLSL(sh::GLenum shaderType, - int shaderVersion, - const TExtensionBehavior &extensionBehavior, - const char *sourcePath, - ShShaderOutput outputType, - int numRenderTargets, - const std::vector &uniforms, - ShCompileOptions compileOptions) +namespace sh +{ + +OutputHLSL::OutputHLSL(sh::GLenum shaderType, int shaderVersion, + const TExtensionBehavior &extensionBehavior, + const char *sourcePath, ShShaderOutput outputType, + int numRenderTargets, const std::vector &uniforms, + int compileOptions) : TIntermTraverser(true, true, true), mShaderType(shaderType), mShaderVersion(shaderVersion), @@ -156,17 +158,12 @@ void OutputHLSL::output(TIntermNode *treeRoot, TInfoSinkBase &objSink) BuiltInFunctionEmulator builtInFunctionEmulator; InitBuiltInFunctionEmulatorForHLSL(&builtInFunctionEmulator); - if ((mCompileOptions & SH_EMULATE_ISNAN_FLOAT_FUNCTION) != 0) - { - InitBuiltInIsnanFunctionEmulatorForHLSLWorkarounds(&builtInFunctionEmulator, - mShaderVersion); - } - builtInFunctionEmulator.MarkBuiltInFunctionsForEmulation(treeRoot); // Now that we are done changing the AST, do the analyses need for HLSL generation CallDAG::InitResult success = mCallDag.init(treeRoot, &objSink); ASSERT(success == CallDAG::INITDAG_SUCCESS); + UNUSED_ASSERTION_VARIABLE(success); mASTMetadataList = CreateASTMetadataHLSL(treeRoot, mCallDag); // Output the body and footer first to determine what has to go in the header @@ -842,17 +839,6 @@ bool OutputHLSL::ancestorEvaluatesToSamplerInStruct(Visit visit) return false; } -bool OutputHLSL::visitSwizzle(Visit visit, TIntermSwizzle *node) -{ - TInfoSinkBase &out = getInfoSink(); - if (visit == PostVisit) - { - out << "."; - node->writeOffsetsAsXYZW(&out); - } - return true; -} - bool OutputHLSL::visitBinary(Visit visit, TIntermBinary *node) { TInfoSinkBase &out = getInfoSink(); @@ -866,139 +852,133 @@ bool OutputHLSL::visitBinary(Visit visit, TIntermBinary *node) switch (node->getOp()) { - case EOpComma: - outputTriplet(out, visit, "(", ", ", ")"); - break; - case EOpAssign: - if (node->getLeft()->isArray()) - { - TIntermAggregate *rightAgg = node->getRight()->getAsAggregate(); - if (rightAgg != nullptr && rightAgg->isConstructor()) - { - const TString &functionName = addArrayConstructIntoFunction(node->getType()); - out << functionName << "("; - node->getLeft()->traverse(this); - TIntermSequence *seq = rightAgg->getSequence(); - for (auto &arrayElement : *seq) - { - out << ", "; - arrayElement->traverse(this); - } - out << ")"; - return false; - } - // ArrayReturnValueToOutParameter should have eliminated expressions where a - // function call is assigned. - ASSERT(rightAgg == nullptr || rightAgg->getOp() != EOpFunctionCall); - - const TString &functionName = addArrayAssignmentFunction(node->getType()); - outputTriplet(out, visit, (functionName + "(").c_str(), ", ", ")"); - } - else + case EOpAssign: + if (node->getLeft()->isArray()) + { + TIntermAggregate *rightAgg = node->getRight()->getAsAggregate(); + if (rightAgg != nullptr && rightAgg->isConstructor()) { - outputTriplet(out, visit, "(", " = ", ")"); - } - break; - case EOpInitialize: - if (visit == PreVisit) - { - TIntermSymbol *symbolNode = node->getLeft()->getAsSymbolNode(); - ASSERT(symbolNode); - TIntermTyped *expression = node->getRight(); - - // Global initializers must be constant at this point. - ASSERT(symbolNode->getQualifier() != EvqGlobal || - canWriteAsHLSLLiteral(expression)); - - // GLSL allows to write things like "float x = x;" where a new variable x is defined - // and the value of an existing variable x is assigned. HLSL uses C semantics (the - // new variable is created before the assignment is evaluated), so we need to - // convert - // this to "float t = x, x = t;". - if (writeSameSymbolInitializer(out, symbolNode, expression)) - { - // Skip initializing the rest of the expression - return false; - } - else if (writeConstantInitialization(out, symbolNode, expression)) + const TString &functionName = addArrayConstructIntoFunction(node->getType()); + out << functionName << "("; + node->getLeft()->traverse(this); + TIntermSequence *seq = rightAgg->getSequence(); + for (auto &arrayElement : *seq) { - return false; + out << ", "; + arrayElement->traverse(this); } + out << ")"; + return false; } - else if (visit == InVisit) - { - out << " = "; - } - break; - case EOpAddAssign: - outputTriplet(out, visit, "(", " += ", ")"); - break; - case EOpSubAssign: - outputTriplet(out, visit, "(", " -= ", ")"); - break; - case EOpMulAssign: - outputTriplet(out, visit, "(", " *= ", ")"); - break; - case EOpVectorTimesScalarAssign: - outputTriplet(out, visit, "(", " *= ", ")"); - break; - case EOpMatrixTimesScalarAssign: - outputTriplet(out, visit, "(", " *= ", ")"); - break; - case EOpVectorTimesMatrixAssign: - if (visit == PreVisit) - { - out << "("; - } - else if (visit == InVisit) - { - out << " = mul("; - node->getLeft()->traverse(this); - out << ", transpose("; - } - else - { - out << ")))"; - } - break; - case EOpMatrixTimesMatrixAssign: - if (visit == PreVisit) - { - out << "("; - } - else if (visit == InVisit) + // ArrayReturnValueToOutParameter should have eliminated expressions where a function call is assigned. + ASSERT(rightAgg == nullptr || rightAgg->getOp() != EOpFunctionCall); + + const TString &functionName = addArrayAssignmentFunction(node->getType()); + outputTriplet(out, visit, (functionName + "(").c_str(), ", ", ")"); + } + else + { + outputTriplet(out, visit, "(", " = ", ")"); + } + break; + case EOpInitialize: + if (visit == PreVisit) + { + TIntermSymbol *symbolNode = node->getLeft()->getAsSymbolNode(); + ASSERT(symbolNode); + TIntermTyped *expression = node->getRight(); + + // Global initializers must be constant at this point. + ASSERT(symbolNode->getQualifier() != EvqGlobal || canWriteAsHLSLLiteral(expression)); + + // GLSL allows to write things like "float x = x;" where a new variable x is defined + // and the value of an existing variable x is assigned. HLSL uses C semantics (the + // new variable is created before the assignment is evaluated), so we need to convert + // this to "float t = x, x = t;". + if (writeSameSymbolInitializer(out, symbolNode, expression)) { - out << " = transpose(mul(transpose("; - node->getLeft()->traverse(this); - out << "), transpose("; + // Skip initializing the rest of the expression + return false; } - else + else if (writeConstantInitialization(out, symbolNode, expression)) { - out << "))))"; + return false; } - break; - case EOpDivAssign: - outputTriplet(out, visit, "(", " /= ", ")"); - break; - case EOpIModAssign: - outputTriplet(out, visit, "(", " %= ", ")"); - break; - case EOpBitShiftLeftAssign: - outputTriplet(out, visit, "(", " <<= ", ")"); - break; - case EOpBitShiftRightAssign: - outputTriplet(out, visit, "(", " >>= ", ")"); - break; - case EOpBitwiseAndAssign: - outputTriplet(out, visit, "(", " &= ", ")"); - break; - case EOpBitwiseXorAssign: - outputTriplet(out, visit, "(", " ^= ", ")"); - break; - case EOpBitwiseOrAssign: - outputTriplet(out, visit, "(", " |= ", ")"); - break; - case EOpIndexDirect: + } + else if (visit == InVisit) + { + out << " = "; + } + break; + case EOpAddAssign: + outputTriplet(out, visit, "(", " += ", ")"); + break; + case EOpSubAssign: + outputTriplet(out, visit, "(", " -= ", ")"); + break; + case EOpMulAssign: + outputTriplet(out, visit, "(", " *= ", ")"); + break; + case EOpVectorTimesScalarAssign: + outputTriplet(out, visit, "(", " *= ", ")"); + break; + case EOpMatrixTimesScalarAssign: + outputTriplet(out, visit, "(", " *= ", ")"); + break; + case EOpVectorTimesMatrixAssign: + if (visit == PreVisit) + { + out << "("; + } + else if (visit == InVisit) + { + out << " = mul("; + node->getLeft()->traverse(this); + out << ", transpose("; + } + else + { + out << ")))"; + } + break; + case EOpMatrixTimesMatrixAssign: + if (visit == PreVisit) + { + out << "("; + } + else if (visit == InVisit) + { + out << " = transpose(mul(transpose("; + node->getLeft()->traverse(this); + out << "), transpose("; + } + else + { + out << "))))"; + } + break; + case EOpDivAssign: + outputTriplet(out, visit, "(", " /= ", ")"); + break; + case EOpIModAssign: + outputTriplet(out, visit, "(", " %= ", ")"); + break; + case EOpBitShiftLeftAssign: + outputTriplet(out, visit, "(", " <<= ", ")"); + break; + case EOpBitShiftRightAssign: + outputTriplet(out, visit, "(", " >>= ", ")"); + break; + case EOpBitwiseAndAssign: + outputTriplet(out, visit, "(", " &= ", ")"); + break; + case EOpBitwiseXorAssign: + outputTriplet(out, visit, "(", " ^= ", ")"); + break; + case EOpBitwiseOrAssign: + outputTriplet(out, visit, "(", " |= ", ")"); + break; + case EOpIndexDirect: { const TType& leftType = node->getLeft()->getType(); if (leftType.isInterfaceBlock()) @@ -1077,6 +1057,42 @@ bool OutputHLSL::visitBinary(Visit visit, TIntermBinary *node) return false; } break; + case EOpVectorSwizzle: + if (visit == InVisit) + { + out << "."; + + TIntermAggregate *swizzle = node->getRight()->getAsAggregate(); + + if (swizzle) + { + TIntermSequence *sequence = swizzle->getSequence(); + + for (TIntermSequence::iterator sit = sequence->begin(); sit != sequence->end(); sit++) + { + TIntermConstantUnion *element = (*sit)->getAsConstantUnion(); + + if (element) + { + int i = element->getIConst(0); + + switch (i) + { + case 0: out << "x"; break; + case 1: out << "y"; break; + case 2: out << "z"; break; + case 3: out << "w"; break; + default: UNREACHABLE(); + } + } + else UNREACHABLE(); + } + } + else UNREACHABLE(); + + return false; // Fully processed + } + break; case EOpAdd: outputTriplet(out, visit, "(", " + ", ")"); break; @@ -1280,12 +1296,9 @@ bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node) outputTriplet(out, visit, "frac(", "", ")"); break; case EOpIsNan: - if (node->getUseEmulatedFunction()) - writeEmulatedFunctionTriplet(out, visit, "isnan("); - else - outputTriplet(out, visit, "isnan(", "", ")"); - mRequiresIEEEStrictCompiling = true; - break; + outputTriplet(out, visit, "isnan(", "", ")"); + mRequiresIEEEStrictCompiling = true; + break; case EOpIsInf: outputTriplet(out, visit, "isinf(", "", ")"); break; @@ -1418,232 +1431,236 @@ TString OutputHLSL::samplerNamePrefixFromStruct(TIntermTyped *node) } } -bool OutputHLSL::visitBlock(Visit visit, TIntermBlock *node) -{ - TInfoSinkBase &out = getInfoSink(); - - if (mInsideFunction) - { - outputLineDirective(out, node->getLine().first_line); - out << "{\n"; - } - - for (TIntermSequence::iterator sit = node->getSequence()->begin(); - sit != node->getSequence()->end(); sit++) - { - outputLineDirective(out, (*sit)->getLine().first_line); - - (*sit)->traverse(this); - - // Don't output ; after case labels, they're terminated by : - // This is needed especially since outputting a ; after a case statement would turn empty - // case statements into non-empty case statements, disallowing fall-through from them. - // Also no need to output ; after if statements or sequences. This is done just for - // code clarity. - if ((*sit)->getAsCaseNode() == nullptr && (*sit)->getAsIfElseNode() == nullptr && - (*sit)->getAsBlock() == nullptr) - out << ";\n"; - } - - if (mInsideFunction) - { - outputLineDirective(out, node->getLine().last_line); - out << "}\n"; - } - - return false; -} - -bool OutputHLSL::visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) +bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) { TInfoSinkBase &out = getInfoSink(); - ASSERT(mCurrentFunctionMetadata == nullptr); - - size_t index = mCallDag.findIndex(node->getFunctionSymbolInfo()); - ASSERT(index != CallDAG::InvalidIndex); - mCurrentFunctionMetadata = &mASTMetadataList[index]; - - out << TypeString(node->getType()) << " "; - - TIntermSequence *parameters = node->getFunctionParameters()->getSequence(); - - if (node->getFunctionSymbolInfo()->isMain()) - { - out << "gl_main("; - } - else - { - out << DecorateFunctionIfNeeded(node->getFunctionSymbolInfo()->getNameObj()) - << DisambiguateFunctionName(parameters) << (mOutputLod0Function ? "Lod0(" : "("); - } - - for (unsigned int i = 0; i < parameters->size(); i++) + switch (node->getOp()) { - TIntermSymbol *symbol = (*parameters)[i]->getAsSymbolNode(); - - if (symbol) + case EOpSequence: { - ensureStructDefined(symbol->getType()); - - out << argumentString(symbol); - - if (i < parameters->size() - 1) + if (mInsideFunction) { - out << ", "; + outputLineDirective(out, node->getLine().first_line); + out << "{\n"; } - } - else - UNREACHABLE(); - } - - out << ")\n"; - - mInsideFunction = true; - // The function body node will output braces. - node->getBody()->traverse(this); - mInsideFunction = false; - - mCurrentFunctionMetadata = nullptr; - - bool needsLod0 = mASTMetadataList[index].mNeedsLod0; - if (needsLod0 && !mOutputLod0Function && mShaderType == GL_FRAGMENT_SHADER) - { - ASSERT(!node->getFunctionSymbolInfo()->isMain()); - mOutputLod0Function = true; - node->traverse(this); - mOutputLod0Function = false; - } - return false; -} + for (TIntermSequence::iterator sit = node->getSequence()->begin(); sit != node->getSequence()->end(); sit++) + { + outputLineDirective(out, (*sit)->getLine().first_line); + + (*sit)->traverse(this); + + // Don't output ; after case labels, they're terminated by : + // This is needed especially since outputting a ; after a case statement would turn empty + // case statements into non-empty case statements, disallowing fall-through from them. + // Also no need to output ; after selection (if) statements or sequences. This is done just + // for code clarity. + TIntermSelection *asSelection = (*sit)->getAsSelectionNode(); + ASSERT(asSelection == nullptr || !asSelection->usesTernaryOperator()); + if ((*sit)->getAsCaseNode() == nullptr && asSelection == nullptr && !IsSequence(*sit)) + out << ";\n"; + } -bool OutputHLSL::visitDeclaration(Visit visit, TIntermDeclaration *node) -{ - TInfoSinkBase &out = getInfoSink(); - if (visit == PreVisit) - { - TIntermSequence *sequence = node->getSequence(); - TIntermTyped *variable = (*sequence)[0]->getAsTyped(); - ASSERT(sequence->size() == 1); + if (mInsideFunction) + { + outputLineDirective(out, node->getLine().last_line); + out << "}\n"; + } - if (variable && - (variable->getQualifier() == EvqTemporary || variable->getQualifier() == EvqGlobal || - variable->getQualifier() == EvqConst)) + return false; + } + case EOpDeclaration: + if (visit == PreVisit) { - ensureStructDefined(variable->getType()); + TIntermSequence *sequence = node->getSequence(); + TIntermTyped *variable = (*sequence)[0]->getAsTyped(); + ASSERT(sequence->size() == 1); - if (!variable->getAsSymbolNode() || - variable->getAsSymbolNode()->getSymbol() != "") // Variable declaration + if (variable && + (variable->getQualifier() == EvqTemporary || + variable->getQualifier() == EvqGlobal || variable->getQualifier() == EvqConst)) { - if (!mInsideFunction) + ensureStructDefined(variable->getType()); + + if (!variable->getAsSymbolNode() || variable->getAsSymbolNode()->getSymbol() != "") // Variable declaration { - out << "static "; - } + if (!mInsideFunction) + { + out << "static "; + } - out << TypeString(variable->getType()) + " "; + out << TypeString(variable->getType()) + " "; - TIntermSymbol *symbol = variable->getAsSymbolNode(); + TIntermSymbol *symbol = variable->getAsSymbolNode(); - if (symbol) - { - symbol->traverse(this); - out << ArrayString(symbol->getType()); - out << " = " + initializer(symbol->getType()); + if (symbol) + { + symbol->traverse(this); + out << ArrayString(symbol->getType()); + out << " = " + initializer(symbol->getType()); + } + else + { + variable->traverse(this); + } } - else + else if (variable->getAsSymbolNode() && variable->getAsSymbolNode()->getSymbol() == "") // Type (struct) declaration { - variable->traverse(this); + // Already added to constructor map } + else UNREACHABLE(); } - else if (variable->getAsSymbolNode() && - variable->getAsSymbolNode()->getSymbol() == "") // Type (struct) declaration + else if (variable && IsVaryingOut(variable->getQualifier())) { - // Already added to constructor map + for (TIntermSequence::iterator sit = sequence->begin(); sit != sequence->end(); sit++) + { + TIntermSymbol *symbol = (*sit)->getAsSymbolNode(); + + if (symbol) + { + // Vertex (output) varyings which are declared but not written to should still be declared to allow successful linking + mReferencedVaryings[symbol->getSymbol()] = symbol; + } + else + { + (*sit)->traverse(this); + } + } } - else - UNREACHABLE(); + + return false; } - else if (variable && IsVaryingOut(variable->getQualifier())) + else if (visit == InVisit) + { + out << ", "; + } + break; + case EOpInvariantDeclaration: + // Do not do any translation + return false; + case EOpPrototype: + if (visit == PreVisit) { - for (TIntermSequence::iterator sit = sequence->begin(); sit != sequence->end(); sit++) + size_t index = mCallDag.findIndex(node); + // Skip the prototype if it is not implemented (and thus not used) + if (index == CallDAG::InvalidIndex) { - TIntermSymbol *symbol = (*sit)->getAsSymbolNode(); + return false; + } + + TIntermSequence *arguments = node->getSequence(); + + TString name = DecorateFunctionIfNeeded(node->getNameObj()); + out << TypeString(node->getType()) << " " << name << DisambiguateFunctionName(arguments) + << (mOutputLod0Function ? "Lod0(" : "("); + + for (unsigned int i = 0; i < arguments->size(); i++) + { + TIntermSymbol *symbol = (*arguments)[i]->getAsSymbolNode(); if (symbol) { - // Vertex (output) varyings which are declared but not written to should - // still be declared to allow successful linking - mReferencedVaryings[symbol->getSymbol()] = symbol; - } - else - { - (*sit)->traverse(this); + out << argumentString(symbol); + + if (i < arguments->size() - 1) + { + out << ", "; + } } + else UNREACHABLE(); } - } - } - return false; -} -bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) -{ - TInfoSinkBase &out = getInfoSink(); + out << ");\n"; - switch (node->getOp()) - { - case EOpInvariantDeclaration: - // Do not do any translation - return false; - case EOpPrototype: - if (visit == PreVisit) + // Also prototype the Lod0 variant if needed + bool needsLod0 = mASTMetadataList[index].mNeedsLod0; + if (needsLod0 && !mOutputLod0Function && mShaderType == GL_FRAGMENT_SHADER) { - size_t index = mCallDag.findIndex(node->getFunctionSymbolInfo()); - // Skip the prototype if it is not implemented (and thus not used) - if (index == CallDAG::InvalidIndex) - { - return false; - } + mOutputLod0Function = true; + node->traverse(this); + mOutputLod0Function = false; + } + + return false; + } + break; + case EOpComma: + outputTriplet(out, visit, "(", ", ", ")"); + break; + case EOpFunction: + { + ASSERT(mCurrentFunctionMetadata == nullptr); + TString name = TFunction::unmangleName(node->getNameObj().getString()); + + size_t index = mCallDag.findIndex(node); + ASSERT(index != CallDAG::InvalidIndex); + mCurrentFunctionMetadata = &mASTMetadataList[index]; - TIntermSequence *arguments = node->getSequence(); + out << TypeString(node->getType()) << " "; - TString name = - DecorateFunctionIfNeeded(node->getFunctionSymbolInfo()->getNameObj()); - out << TypeString(node->getType()) << " " << name + TIntermSequence *sequence = node->getSequence(); + TIntermSequence *arguments = (*sequence)[0]->getAsAggregate()->getSequence(); + + if (name == "main") + { + out << "gl_main("; + } + else + { + out << DecorateFunctionIfNeeded(node->getNameObj()) << DisambiguateFunctionName(arguments) << (mOutputLod0Function ? "Lod0(" : "("); + } - for (unsigned int i = 0; i < arguments->size(); i++) + for (unsigned int i = 0; i < arguments->size(); i++) + { + TIntermSymbol *symbol = (*arguments)[i]->getAsSymbolNode(); + + if (symbol) { - TIntermSymbol *symbol = (*arguments)[i]->getAsSymbolNode(); + ensureStructDefined(symbol->getType()); - if (symbol) - { - out << argumentString(symbol); + out << argumentString(symbol); - if (i < arguments->size() - 1) - { - out << ", "; - } + if (i < arguments->size() - 1) + { + out << ", "; } - else - UNREACHABLE(); } + else UNREACHABLE(); + } - out << ");\n"; + out << ")\n"; - // Also prototype the Lod0 variant if needed - bool needsLod0 = mASTMetadataList[index].mNeedsLod0; - if (needsLod0 && !mOutputLod0Function && mShaderType == GL_FRAGMENT_SHADER) - { - mOutputLod0Function = true; - node->traverse(this); - mOutputLod0Function = false; - } + if (sequence->size() > 1) + { + mInsideFunction = true; + TIntermNode *body = (*sequence)[1]; + // The function body node will output braces. + ASSERT(IsSequence(body)); + body->traverse(this); + mInsideFunction = false; + } + else + { + out << "{}\n"; + } - return false; + mCurrentFunctionMetadata = nullptr; + + bool needsLod0 = mASTMetadataList[index].mNeedsLod0; + if (needsLod0 && !mOutputLod0Function && mShaderType == GL_FRAGMENT_SHADER) + { + ASSERT(name != "main"); + mOutputLod0Function = true; + node->traverse(this); + mOutputLod0Function = false; } - break; - case EOpFunctionCall: + + return false; + } + break; + case EOpFunctionCall: { TIntermSequence *arguments = node->getSequence(); @@ -1654,23 +1671,23 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) { UNIMPLEMENTED(); } - size_t index = mCallDag.findIndex(node->getFunctionSymbolInfo()); + size_t index = mCallDag.findIndex(node); ASSERT(index != CallDAG::InvalidIndex); lod0 &= mASTMetadataList[index].mNeedsLod0; - out << DecorateFunctionIfNeeded(node->getFunctionSymbolInfo()->getNameObj()); + out << DecorateFunctionIfNeeded(node->getNameObj()); out << DisambiguateFunctionName(node->getSequence()); out << (lod0 ? "Lod0(" : "("); } - else if (node->getFunctionSymbolInfo()->getNameObj().isInternal()) + else if (node->getNameObj().isInternal()) { // This path is used for internal functions that don't have their definitions in the // AST, such as precision emulation functions. - out << DecorateFunctionIfNeeded(node->getFunctionSymbolInfo()->getNameObj()) << "("; + out << DecorateFunctionIfNeeded(node->getNameObj()) << "("; } else { - TString name = TFunction::unmangleName(node->getFunctionSymbolInfo()->getName()); + TString name = TFunction::unmangleName(node->getNameObj().getString()); TBasicType samplerType = (*arguments)[0]->getAsTyped()->getType().getBasicType(); int coords = (*arguments)[1]->getAsTyped()->getNominalSize(); TString textureFunctionName = mTextureFunctionHLSL->useTextureFunction( @@ -1724,6 +1741,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) return false; } + break; case EOpParameters: outputTriplet(out, visit, "(", ", ", ")\n{\n"); break; @@ -1802,7 +1820,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) case EOpConstructMat4: outputConstructor(out, visit, node->getType(), "mat4", node->getSequence()); break; - case EOpConstructStruct: + case EOpConstructStruct: { if (node->getType().isArray()) { @@ -1831,31 +1849,31 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) case EOpVectorNotEqual: outputTriplet(out, visit, "(", " != ", ")"); break; - case EOpMod: - ASSERT(node->getUseEmulatedFunction()); - writeEmulatedFunctionTriplet(out, visit, "mod("); - break; - case EOpModf: - outputTriplet(out, visit, "modf(", ", ", ")"); - break; - case EOpPow: - outputTriplet(out, visit, "pow(", ", ", ")"); - break; - case EOpAtan: - ASSERT(node->getSequence()->size() == 2); // atan(x) is a unary operator - ASSERT(node->getUseEmulatedFunction()); - writeEmulatedFunctionTriplet(out, visit, "atan("); - break; - case EOpMin: - outputTriplet(out, visit, "min(", ", ", ")"); - break; - case EOpMax: - outputTriplet(out, visit, "max(", ", ", ")"); - break; - case EOpClamp: - outputTriplet(out, visit, "clamp(", ", ", ")"); - break; - case EOpMix: + case EOpMod: + ASSERT(node->getUseEmulatedFunction()); + writeEmulatedFunctionTriplet(out, visit, "mod("); + break; + case EOpModf: + outputTriplet(out, visit, "modf(", ", ", ")"); + break; + case EOpPow: + outputTriplet(out, visit, "pow(", ", ", ")"); + break; + case EOpAtan: + ASSERT(node->getSequence()->size() == 2); // atan(x) is a unary operator + ASSERT(node->getUseEmulatedFunction()); + writeEmulatedFunctionTriplet(out, visit, "atan("); + break; + case EOpMin: + outputTriplet(out, visit, "min(", ", ", ")"); + break; + case EOpMax: + outputTriplet(out, visit, "max(", ", ", ")"); + break; + case EOpClamp: + outputTriplet(out, visit, "clamp(", ", ", ")"); + break; + case EOpMix: { TIntermTyped *lastParamNode = (*(node->getSequence()))[2]->getAsTyped(); if (lastParamNode->getType().getBasicType() == EbtBool) @@ -1869,8 +1887,8 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) { outputTriplet(out, visit, "lerp(", ", ", ")"); } - break; } + break; case EOpStep: outputTriplet(out, visit, "step(", ", ", ")"); break; @@ -1886,31 +1904,30 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) case EOpCross: outputTriplet(out, visit, "cross(", ", ", ")"); break; - case EOpFaceForward: - ASSERT(node->getUseEmulatedFunction()); - writeEmulatedFunctionTriplet(out, visit, "faceforward("); - break; - case EOpReflect: - outputTriplet(out, visit, "reflect(", ", ", ")"); - break; - case EOpRefract: - outputTriplet(out, visit, "refract(", ", ", ")"); - break; - case EOpOuterProduct: - ASSERT(node->getUseEmulatedFunction()); - writeEmulatedFunctionTriplet(out, visit, "outerProduct("); - break; - case EOpMul: - outputTriplet(out, visit, "(", " * ", ")"); - break; - default: - UNREACHABLE(); + case EOpFaceForward: + ASSERT(node->getUseEmulatedFunction()); + writeEmulatedFunctionTriplet(out, visit, "faceforward("); + break; + case EOpReflect: + outputTriplet(out, visit, "reflect(", ", ", ")"); + break; + case EOpRefract: + outputTriplet(out, visit, "refract(", ", ", ")"); + break; + case EOpOuterProduct: + ASSERT(node->getUseEmulatedFunction()); + writeEmulatedFunctionTriplet(out, visit, "outerProduct("); + break; + case EOpMul: + outputTriplet(out, visit, "(", " * ", ")"); + break; + default: UNREACHABLE(); } return true; } -void OutputHLSL::writeIfElse(TInfoSinkBase &out, TIntermIfElse *node) +void OutputHLSL::writeSelection(TInfoSinkBase &out, TIntermSelection *node) { out << "if ("; @@ -1925,6 +1942,8 @@ void OutputHLSL::writeIfElse(TInfoSinkBase &out, TIntermIfElse *node) if (node->getTrueBlock()) { // The trueBlock child node will output braces. + ASSERT(IsSequence(node->getTrueBlock())); + node->getTrueBlock()->traverse(this); // Detect true discard @@ -1945,7 +1964,9 @@ void OutputHLSL::writeIfElse(TInfoSinkBase &out, TIntermIfElse *node) outputLineDirective(out, node->getFalseBlock()->getLine().first_line); - // The falseBlock child node will output braces. + // Either this is "else if" or the falseBlock child node will output braces. + ASSERT(IsSequence(node->getFalseBlock()) || node->getFalseBlock()->getAsSelectionNode() != nullptr); + node->getFalseBlock()->traverse(this); outputLineDirective(out, node->getFalseBlock()->getLine().first_line); @@ -1961,18 +1982,11 @@ void OutputHLSL::writeIfElse(TInfoSinkBase &out, TIntermIfElse *node) } } -bool OutputHLSL::visitTernary(Visit, TIntermTernary *) -{ - // Ternary ops should have been already converted to something else in the AST. HLSL ternary - // operator doesn't short-circuit, so it's not the same as the GLSL ternary operator. - UNREACHABLE(); - return false; -} - -bool OutputHLSL::visitIfElse(Visit visit, TIntermIfElse *node) +bool OutputHLSL::visitSelection(Visit visit, TIntermSelection *node) { TInfoSinkBase &out = getInfoSink(); + ASSERT(!node->usesTernaryOperator()); ASSERT(mInsideFunction); // D3D errors when there is a gradient operation in a loop in an unflattened if. @@ -1981,7 +1995,7 @@ bool OutputHLSL::visitIfElse(Visit visit, TIntermIfElse *node) out << "FLATTEN "; } - writeIfElse(out, node); + writeSelection(out, node); return false; } @@ -2085,6 +2099,7 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node) if (node->getBody()) { // The loop body node will output braces. + ASSERT(IsSequence(node->getBody())); node->getBody()->traverse(this); } else @@ -2172,6 +2187,39 @@ bool OutputHLSL::visitBranch(Visit visit, TIntermBranch *node) return true; } +bool OutputHLSL::isSingleStatement(TIntermNode *node) +{ + TIntermAggregate *aggregate = node->getAsAggregate(); + + if (aggregate) + { + if (aggregate->getOp() == EOpSequence) + { + return false; + } + else if (aggregate->getOp() == EOpDeclaration) + { + // Declaring multiple comma-separated variables must be considered multiple statements + // because each individual declaration has side effects which are visible in the next. + return false; + } + else + { + for (TIntermSequence::iterator sit = aggregate->getSequence()->begin(); sit != aggregate->getSequence()->end(); sit++) + { + if (!isSingleStatement(*sit)) + { + return false; + } + } + + return true; + } + } + + return true; +} + // Handle loops with more than 254 iterations (unsupported by D3D9) by splitting them // (The D3D documentation says 255 iterations, but the compiler complains at anything more than 254). bool OutputHLSL::handleExcessiveLoop(TInfoSinkBase &out, TIntermLoop *node) @@ -2189,7 +2237,7 @@ bool OutputHLSL::handleExcessiveLoop(TInfoSinkBase &out, TIntermLoop *node) // Parse index name and intial value if (node->getInit()) { - TIntermDeclaration *init = node->getInit()->getAsDeclarationNode(); + TIntermAggregate *init = node->getInit()->getAsAggregate(); if (init) { @@ -2854,4 +2902,6 @@ void OutputHLSL::ensureStructDefined(const TType &type) } } -} // namespace sh + + +} diff --git a/gfx/angle/src/compiler/translator/OutputHLSL.h b/gfx/angle/src/compiler/translator/OutputHLSL.h index 833f4736b..e5204e419 100755 --- a/gfx/angle/src/compiler/translator/OutputHLSL.h +++ b/gfx/angle/src/compiler/translator/OutputHLSL.h @@ -30,14 +30,11 @@ typedef std::map ReferencedSymbols; class OutputHLSL : public TIntermTraverser { public: - OutputHLSL(sh::GLenum shaderType, - int shaderVersion, - const TExtensionBehavior &extensionBehavior, - const char *sourcePath, - ShShaderOutput outputType, - int numRenderTargets, - const std::vector &uniforms, - ShCompileOptions compileOptions); + OutputHLSL(sh::GLenum shaderType, int shaderVersion, + const TExtensionBehavior &extensionBehavior, + const char *sourcePath, ShShaderOutput outputType, + int numRenderTargets, const std::vector &uniforms, + int compileOptions); ~OutputHLSL(); @@ -59,20 +56,16 @@ class OutputHLSL : public TIntermTraverser void visitSymbol(TIntermSymbol*); void visitRaw(TIntermRaw*); void visitConstantUnion(TIntermConstantUnion*); - bool visitSwizzle(Visit visit, TIntermSwizzle *node) override; bool visitBinary(Visit visit, TIntermBinary*); bool visitUnary(Visit visit, TIntermUnary*); - bool visitTernary(Visit visit, TIntermTernary *); - bool visitIfElse(Visit visit, TIntermIfElse *); + bool visitSelection(Visit visit, TIntermSelection*); bool visitSwitch(Visit visit, TIntermSwitch *); bool visitCase(Visit visit, TIntermCase *); - bool visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) override; bool visitAggregate(Visit visit, TIntermAggregate*); - bool visitBlock(Visit visit, TIntermBlock *node); - bool visitDeclaration(Visit visit, TIntermDeclaration *node); bool visitLoop(Visit visit, TIntermLoop*); bool visitBranch(Visit visit, TIntermBranch*); + bool isSingleStatement(TIntermNode *node); bool handleExcessiveLoop(TInfoSinkBase &out, TIntermLoop *node); // Emit one of three strings depending on traverse phase. Called with literal strings so using const char* instead of TString. @@ -108,7 +101,7 @@ class OutputHLSL : public TIntermTraverser TIntermTyped *expression); void writeDeferredGlobalInitializers(TInfoSinkBase &out); - void writeIfElse(TInfoSinkBase &out, TIntermIfElse *node); + void writeSelection(TInfoSinkBase &out, TIntermSelection *node); // Returns the function name TString addStructEqualityFunction(const TStructure &structure); @@ -124,7 +117,7 @@ class OutputHLSL : public TIntermTraverser const TExtensionBehavior &mExtensionBehavior; const char *mSourcePath; const ShShaderOutput mOutputType; - ShCompileOptions mCompileOptions; + int mCompileOptions; bool mInsideFunction; diff --git a/gfx/angle/src/compiler/translator/ParseContext.cpp b/gfx/angle/src/compiler/translator/ParseContext.cpp index 4ad597c4f..5e15eea24 100755 --- a/gfx/angle/src/compiler/translator/ParseContext.cpp +++ b/gfx/angle/src/compiler/translator/ParseContext.cpp @@ -16,102 +16,12 @@ #include "compiler/translator/ValidateGlobalInitializer.h" #include "compiler/translator/util.h" -namespace sh -{ - /////////////////////////////////////////////////////////////////////// // // Sub- vector and matrix fields // //////////////////////////////////////////////////////////////////////// -namespace -{ - -const int kWebGLMaxStructNesting = 4; - -bool ContainsSampler(const TType &type) -{ - if (IsSampler(type.getBasicType())) - return true; - - if (type.getBasicType() == EbtStruct || type.isInterfaceBlock()) - { - const TFieldList &fields = type.getStruct()->fields(); - for (unsigned int i = 0; i < fields.size(); ++i) - { - if (ContainsSampler(*fields[i]->type())) - return true; - } - } - - return false; -} - -bool ContainsImage(const TType &type) -{ - if (IsImage(type.getBasicType())) - return true; - - if (type.getBasicType() == EbtStruct || type.isInterfaceBlock()) - { - const TFieldList &fields = type.getStruct()->fields(); - for (unsigned int i = 0; i < fields.size(); ++i) - { - if (ContainsImage(*fields[i]->type())) - return true; - } - } - - return false; -} - -} // namespace - -TParseContext::TParseContext(TSymbolTable &symt, - TExtensionBehavior &ext, - sh::GLenum type, - ShShaderSpec spec, - ShCompileOptions options, - bool checksPrecErrors, - TInfoSink &is, - const ShBuiltInResources &resources) - : intermediate(), - symbolTable(symt), - mDeferredSingleDeclarationErrorCheck(false), - mShaderType(type), - mShaderSpec(spec), - mCompileOptions(options), - mShaderVersion(100), - mTreeRoot(nullptr), - mLoopNestingLevel(0), - mStructNestingLevel(0), - mSwitchNestingLevel(0), - mCurrentFunctionType(nullptr), - mFunctionReturnsValue(false), - mChecksPrecisionErrors(checksPrecErrors), - mFragmentPrecisionHighOnESSL1(false), - mDefaultMatrixPacking(EmpColumnMajor), - mDefaultBlockStorage(sh::IsWebGLBasedSpec(spec) ? EbsStd140 : EbsShared), - mDiagnostics(is), - mDirectiveHandler(ext, - mDiagnostics, - mShaderVersion, - mShaderType, - resources.WEBGL_debug_shader_precision == 1), - mPreprocessor(&mDiagnostics, &mDirectiveHandler), - mScanner(nullptr), - mUsesFragData(false), - mUsesFragColor(false), - mUsesSecondaryOutputs(false), - mMinProgramTexelOffset(resources.MinProgramTexelOffset), - mMaxProgramTexelOffset(resources.MaxProgramTexelOffset), - mComputeShaderLocalSizeDeclared(false), - mDeclaringFunction(false) -{ - mComputeShaderLocalSize.fill(-1); -} - // // Look at a '.' field selector string and change it into offsets // for a vector. @@ -303,12 +213,6 @@ void TParseContext::checkPrecisionSpecified(const TSourceLoc &line, { if (!mChecksPrecisionErrors) return; - - if (precision != EbpUndefined && !SupportsPrecision(type)) - { - error(line, "illegal type for precision qualifier", getBasicString(type)); - } - if (precision == EbpUndefined) { switch (type) @@ -327,11 +231,6 @@ void TParseContext::checkPrecisionSpecified(const TSourceLoc &line, error(line, "No precision specified (sampler)", ""); return; } - if (IsImage(type)) - { - error(line, "No precision specified (image)", ""); - return; - } } } } @@ -342,18 +241,6 @@ bool TParseContext::checkCanBeLValue(const TSourceLoc &line, const char *op, TIn { TIntermSymbol *symNode = node->getAsSymbolNode(); TIntermBinary *binaryNode = node->getAsBinaryNode(); - TIntermSwizzle *swizzleNode = node->getAsSwizzleNode(); - - if (swizzleNode) - { - bool ok = checkCanBeLValue(line, op, swizzleNode->getOperand()); - if (ok && swizzleNode->hasDuplicateOffsets()) - { - error(line, " l-value of swizzle cannot have duplicate components", op); - return false; - } - return ok; - } if (binaryNode) { @@ -364,10 +251,34 @@ bool TParseContext::checkCanBeLValue(const TSourceLoc &line, const char *op, TIn case EOpIndexDirectStruct: case EOpIndexDirectInterfaceBlock: return checkCanBeLValue(line, op, binaryNode->getLeft()); + case EOpVectorSwizzle: + { + bool ok = checkCanBeLValue(line, op, binaryNode->getLeft()); + if (ok) + { + int offsetCount[4] = {0, 0, 0, 0}; + + TIntermAggregate *swizzleOffsets = binaryNode->getRight()->getAsAggregate(); + + for (const auto &offset : *swizzleOffsets->getSequence()) + { + int value = offset->getAsTyped()->getAsConstantUnion()->getIConst(0); + offsetCount[value]++; + if (offsetCount[value] > 1) + { + error(line, " l-value of swizzle cannot have duplicate components", op); + return false; + } + } + } + + return ok; + } default: break; } error(line, " l-value required", op); + return false; } @@ -441,10 +352,6 @@ bool TParseContext::checkCanBeLValue(const TSourceLoc &line, const char *op, TIn { message = "can't modify a sampler"; } - if (IsImage(node->getBasicType())) - { - message = "can't modify an image"; - } } if (message == 0 && binaryNode == 0 && symNode == 0) @@ -528,7 +435,7 @@ bool TParseContext::checkIsNotReserved(const TSourceLoc &line, const TString &id error(line, reservedErrMsg, "gl_"); return false; } - if (sh::IsWebGLBasedSpec(mShaderSpec)) + if (IsWebGLBasedSpec(mShaderSpec)) { if (identifier.compare(0, 6, "webgl_") == 0) { @@ -540,6 +447,11 @@ bool TParseContext::checkIsNotReserved(const TSourceLoc &line, const TString &id error(line, reservedErrMsg, "_webgl_"); return false; } + if (mShaderSpec == SH_CSS_SHADERS_SPEC && identifier.compare(0, 4, "css_") == 0) + { + error(line, reservedErrMsg, "css_"); + return false; + } } if (identifier.find("__") != TString::npos) { @@ -675,11 +587,6 @@ bool TParseContext::checkConstructorArguments(const TSourceLoc &line, error(line, "cannot convert a sampler", "constructor"); return false; } - if (op != EOpConstructStruct && IsImage(argTyped->getBasicType())) - { - error(line, "cannot convert an image", "constructor"); - return false; - } if (argTyped->getBasicType() == EbtVoid) { error(line, "cannot convert a void", "constructor"); @@ -754,19 +661,19 @@ void TParseContext::checkIsScalarBool(const TSourceLoc &line, const TIntermTyped // or not. void TParseContext::checkIsScalarBool(const TSourceLoc &line, const TPublicType &pType) { - if (pType.getBasicType() != EbtBool || pType.isAggregate()) + if (pType.type != EbtBool || pType.isAggregate()) { error(line, "boolean expression expected", ""); } } bool TParseContext::checkIsNotSampler(const TSourceLoc &line, - const TTypeSpecifierNonArray &pType, + const TPublicType &pType, const char *reason) { if (pType.type == EbtStruct) { - if (ContainsSampler(*pType.userDef)) + if (containsSampler(*pType.userDef)) { error(line, reason, getBasicString(pType.type), "(structure contains a sampler)"); return false; @@ -783,31 +690,6 @@ bool TParseContext::checkIsNotSampler(const TSourceLoc &line, return true; } -bool TParseContext::checkIsNotImage(const TSourceLoc &line, - const TTypeSpecifierNonArray &pType, - const char *reason) -{ - if (pType.type == EbtStruct) - { - if (ContainsImage(*pType.userDef)) - { - error(line, reason, getBasicString(pType.type), "(structure contains an image)"); - - return false; - } - - return true; - } - else if (IsImage(pType.type)) - { - error(line, reason, getBasicString(pType.type)); - - return false; - } - - return true; -} - void TParseContext::checkDeclaratorLocationIsNotSpecified(const TSourceLoc &line, const TPublicType &pType) { @@ -828,34 +710,33 @@ void TParseContext::checkLocationIsNotSpecified(const TSourceLoc &location, } } -void TParseContext::checkOutParameterIsNotOpaqueType(const TSourceLoc &line, - TQualifier qualifier, - const TType &type) -{ - checkOutParameterIsNotSampler(line, qualifier, type); - checkOutParameterIsNotImage(line, qualifier, type); -} - void TParseContext::checkOutParameterIsNotSampler(const TSourceLoc &line, TQualifier qualifier, const TType &type) { - ASSERT(qualifier == EvqOut || qualifier == EvqInOut); - if (IsSampler(type.getBasicType())) + if ((qualifier == EvqOut || qualifier == EvqInOut) && type.getBasicType() != EbtStruct && + IsSampler(type.getBasicType())) { error(line, "samplers cannot be output parameters", type.getBasicString()); } } -void TParseContext::checkOutParameterIsNotImage(const TSourceLoc &line, - TQualifier qualifier, - const TType &type) +bool TParseContext::containsSampler(const TType &type) { - ASSERT(qualifier == EvqOut || qualifier == EvqInOut); - if (IsImage(type.getBasicType())) + if (IsSampler(type.getBasicType())) + return true; + + if (type.getBasicType() == EbtStruct || type.isInterfaceBlock()) { - error(line, "images cannot be output parameters", type.getBasicString()); + const TFieldList &fields = type.getStruct()->fields(); + for (unsigned int i = 0; i < fields.size(); ++i) + { + if (containsSampler(*fields[i]->type())) + return true; + } } + + return false; } // Do size checking for an array type's size. @@ -942,7 +823,7 @@ bool TParseContext::checkIsValidTypeForArray(const TSourceLoc &line, const TPubl // In ESSL1.00 shaders, structs cannot be varying (section 4.3.5). This is checked elsewhere. // In ESSL3.00 shaders, struct inputs/outputs are allowed but not arrays of structs (section // 4.3.4). - if (mShaderVersion >= 300 && elementType.getBasicType() == EbtStruct && + if (mShaderVersion >= 300 && elementType.type == EbtStruct && sh::IsVarying(elementType.qualifier)) { error(line, "cannot declare arrays of structs of this qualifier", @@ -1047,33 +928,27 @@ bool TParseContext::declareVariable(const TSourceLoc &line, return true; } -void TParseContext::checkIsParameterQualifierValid( - const TSourceLoc &line, - const TTypeQualifierBuilder &typeQualifierBuilder, - TType *type) +void TParseContext::checkIsParameterQualifierValid(const TSourceLoc &line, + TQualifier qualifier, + TQualifier paramQualifier, + TType *type) { - TTypeQualifier typeQualifier = typeQualifierBuilder.getParameterTypeQualifier(&mDiagnostics); - - if (typeQualifier.qualifier == EvqOut || typeQualifier.qualifier == EvqInOut) - { - checkOutParameterIsNotOpaqueType(line, typeQualifier.qualifier, *type); - } - - if (!IsImage(type->getBasicType())) + if (qualifier != EvqConst && qualifier != EvqTemporary) { - checkIsMemoryQualifierNotSpecified(typeQualifier.memoryQualifier, line); + error(line, "qualifier not allowed on function parameter", getQualifierString(qualifier)); + return; } - else + if (qualifier == EvqConst && paramQualifier != EvqIn) { - type->setMemoryQualifier(typeQualifier.memoryQualifier); + error(line, "qualifier not allowed with ", getQualifierString(qualifier), + getQualifierString(paramQualifier)); + return; } - type->setQualifier(typeQualifier.qualifier); - - if (typeQualifier.precision != EbpUndefined) - { - type->setPrecision(typeQualifier.precision); - } + if (qualifier == EvqConst) + type->setQualifier(EvqConstReadOnly); + else + type->setQualifier(paramQualifier); } bool TParseContext::checkCanUseExtension(const TSourceLoc &line, const TString &extension) @@ -1113,7 +988,7 @@ void TParseContext::singleDeclarationErrorCheck(const TPublicType &publicType, case EvqVertexIn: case EvqFragmentOut: case EvqComputeIn: - if (publicType.getBasicType() == EbtStruct) + if (publicType.type == EbtStruct) { error(identifierLocation, "cannot be used with a structure", getQualifierString(publicType.qualifier)); @@ -1125,14 +1000,7 @@ void TParseContext::singleDeclarationErrorCheck(const TPublicType &publicType, } if (publicType.qualifier != EvqUniform && - !checkIsNotSampler(identifierLocation, publicType.typeSpecifierNonArray, - "samplers must be uniform")) - { - return; - } - if (publicType.qualifier != EvqUniform && - !checkIsNotImage(identifierLocation, publicType.typeSpecifierNonArray, - "images must be uniform")) + !checkIsNotSampler(identifierLocation, publicType, "samplers must be uniform")) { return; } @@ -1160,89 +1028,6 @@ void TParseContext::singleDeclarationErrorCheck(const TPublicType &publicType, { checkLocationIsNotSpecified(identifierLocation, publicType.layoutQualifier); } - - if (IsImage(publicType.getBasicType())) - { - - switch (layoutQualifier.imageInternalFormat) - { - case EiifRGBA32F: - case EiifRGBA16F: - case EiifR32F: - case EiifRGBA8: - case EiifRGBA8_SNORM: - if (!IsFloatImage(publicType.getBasicType())) - { - error(identifierLocation, - "internal image format requires a floating image type", - getBasicString(publicType.getBasicType())); - return; - } - break; - case EiifRGBA32I: - case EiifRGBA16I: - case EiifRGBA8I: - case EiifR32I: - if (!IsIntegerImage(publicType.getBasicType())) - { - error(identifierLocation, - "internal image format requires an integer image type", - getBasicString(publicType.getBasicType())); - return; - } - break; - case EiifRGBA32UI: - case EiifRGBA16UI: - case EiifRGBA8UI: - case EiifR32UI: - if (!IsUnsignedImage(publicType.getBasicType())) - { - error(identifierLocation, - "internal image format requires an unsigned image type", - getBasicString(publicType.getBasicType())); - return; - } - break; - case EiifUnspecified: - error(identifierLocation, "layout qualifier", "No image internal format specified"); - return; - default: - error(identifierLocation, "layout qualifier", "unrecognized token"); - return; - } - - // GLSL ES 3.10 Revision 4, 4.9 Memory Access Qualifiers - switch (layoutQualifier.imageInternalFormat) - { - case EiifR32F: - case EiifR32I: - case EiifR32UI: - break; - default: - if (!publicType.memoryQualifier.readonly && !publicType.memoryQualifier.writeonly) - { - error(identifierLocation, "layout qualifier", - "Except for images with the r32f, r32i and r32ui format qualifiers, " - "image variables must be qualified readonly and/or writeonly"); - return; - } - break; - } - } - else - { - - if (!checkInternalFormatIsNotSpecified(identifierLocation, - layoutQualifier.imageInternalFormat)) - { - return; - } - - if (!checkIsMemoryQualifierNotSpecified(publicType.memoryQualifier, identifierLocation)) - { - return; - } - } } void TParseContext::checkLayoutQualifierSupported(const TSourceLoc &location, @@ -1273,18 +1058,6 @@ bool TParseContext::checkWorkGroupSizeIsNotSpecified(const TSourceLoc &location, return true; } -bool TParseContext::checkInternalFormatIsNotSpecified(const TSourceLoc &location, - TLayoutImageInternalFormat internalFormat) -{ - if (internalFormat != EiifUnspecified) - { - error(location, "invalid layout qualifier:", getImageInternalFormatString(internalFormat), - "only valid when used with images"); - return false; - } - return true; -} - void TParseContext::functionCallLValueErrorCheck(const TFunction *fnCandidate, TIntermAggregate *fnCall) { @@ -1304,27 +1077,12 @@ void TParseContext::functionCallLValueErrorCheck(const TFunction *fnCandidate, } } -void TParseContext::checkInvariantVariableQualifier(bool invariant, - const TQualifier qualifier, - const TSourceLoc &invariantLocation) +void TParseContext::checkInvariantIsOutVariableES3(const TQualifier qualifier, + const TSourceLoc &invariantLocation) { - if (!invariant) - return; - - if (mShaderVersion < 300) - { - // input variables in the fragment shader can be also qualified as invariant - if (!sh::CanBeInvariantESSL1(qualifier)) - { - error(invariantLocation, "Cannot be qualified as invariant.", "invariant"); - } - } - else + if (!sh::IsVaryingOut(qualifier) && qualifier != EvqFragmentOut) { - if (!sh::CanBeInvariantESSL3OrGreater(qualifier)) - { - error(invariantLocation, "Cannot be qualified as invariant.", "invariant"); - } + error(invariantLocation, "Only out variables can be invariant.", "invariant"); } } @@ -1522,26 +1280,15 @@ bool TParseContext::executeInitializer(const TSourceLoc &line, const TString &identifier, const TPublicType &pType, TIntermTyped *initializer, - TIntermBinary **initNode) + TIntermNode **intermNode) { - ASSERT(initNode != nullptr); - ASSERT(*initNode == nullptr); + ASSERT(intermNode != nullptr); TType type = TType(pType); TVariable *variable = nullptr; if (type.isUnsizedArray()) { - // We have not checked yet whether the initializer actually is an array or not. - if (initializer->isArray()) - { - type.setArraySize(initializer->getArraySize()); - } - else - { - // Having a non-array initializer for an unsized array will result in an error later, - // so we don't generate an error message here. - type.setArraySize(1u); - } + type.setArraySize(initializer->getArraySize()); } if (!declareVariable(line, identifier, type, &variable)) { @@ -1607,7 +1354,7 @@ bool TParseContext::executeInitializer(const TSourceLoc &line, if (initializer->getAsConstantUnion()) { variable->shareConstPointer(initializer->getAsConstantUnion()->getUnionArrayPointer()); - *initNode = nullptr; + *intermNode = nullptr; return false; } else if (initializer->getAsSymbolNode()) @@ -1620,7 +1367,7 @@ bool TParseContext::executeInitializer(const TSourceLoc &line, if (constArray) { variable->shareConstPointer(constArray); - *initNode = nullptr; + *intermNode = nullptr; return false; } } @@ -1628,8 +1375,8 @@ bool TParseContext::executeInitializer(const TSourceLoc &line, TIntermSymbol *intermSymbol = intermediate.addSymbol( variable->getUniqueId(), variable->getName(), variable->getType(), line); - *initNode = createAssign(EOpInitialize, intermSymbol, initializer, line); - if (*initNode == nullptr) + *intermNode = createAssign(EOpInitialize, intermSymbol, initializer, line); + if (*intermNode == nullptr) { assignError(line, "=", intermSymbol->getCompleteString(), initializer->getCompleteString()); return true; @@ -1638,80 +1385,51 @@ bool TParseContext::executeInitializer(const TSourceLoc &line, return false; } -void TParseContext::addFullySpecifiedType(TPublicType *typeSpecifier) -{ - checkPrecisionSpecified(typeSpecifier->getLine(), typeSpecifier->precision, - typeSpecifier->getBasicType()); - - if (mShaderVersion < 300 && typeSpecifier->array) - { - error(typeSpecifier->getLine(), "not supported", "first-class array"); - typeSpecifier->clearArrayness(); - } -} - -TPublicType TParseContext::addFullySpecifiedType(const TTypeQualifierBuilder &typeQualifierBuilder, +TPublicType TParseContext::addFullySpecifiedType(TQualifier qualifier, + bool invariant, + TLayoutQualifier layoutQualifier, const TPublicType &typeSpecifier) { - TTypeQualifier typeQualifier = typeQualifierBuilder.getVariableTypeQualifier(&mDiagnostics); - TPublicType returnType = typeSpecifier; - returnType.qualifier = typeQualifier.qualifier; - returnType.invariant = typeQualifier.invariant; - returnType.layoutQualifier = typeQualifier.layoutQualifier; - returnType.memoryQualifier = typeQualifier.memoryQualifier; - returnType.precision = typeSpecifier.precision; - - if (typeQualifier.precision != EbpUndefined) - { - returnType.precision = typeQualifier.precision; - } - - checkPrecisionSpecified(typeSpecifier.getLine(), returnType.precision, - typeSpecifier.getBasicType()); + returnType.qualifier = qualifier; + returnType.invariant = invariant; + returnType.layoutQualifier = layoutQualifier; - checkInvariantVariableQualifier(returnType.invariant, returnType.qualifier, - typeSpecifier.getLine()); - - checkWorkGroupSizeIsNotSpecified(typeSpecifier.getLine(), returnType.layoutQualifier); + checkWorkGroupSizeIsNotSpecified(typeSpecifier.line, layoutQualifier); if (mShaderVersion < 300) { if (typeSpecifier.array) { - error(typeSpecifier.getLine(), "not supported", "first-class array"); + error(typeSpecifier.line, "not supported", "first-class array"); returnType.clearArrayness(); } - if (returnType.qualifier == EvqAttribute && - (typeSpecifier.getBasicType() == EbtBool || typeSpecifier.getBasicType() == EbtInt)) + if (qualifier == EvqAttribute && + (typeSpecifier.type == EbtBool || typeSpecifier.type == EbtInt)) { - error(typeSpecifier.getLine(), "cannot be bool or int", - getQualifierString(returnType.qualifier)); + error(typeSpecifier.line, "cannot be bool or int", getQualifierString(qualifier)); } - if ((returnType.qualifier == EvqVaryingIn || returnType.qualifier == EvqVaryingOut) && - (typeSpecifier.getBasicType() == EbtBool || typeSpecifier.getBasicType() == EbtInt)) + if ((qualifier == EvqVaryingIn || qualifier == EvqVaryingOut) && + (typeSpecifier.type == EbtBool || typeSpecifier.type == EbtInt)) { - error(typeSpecifier.getLine(), "cannot be bool or int", - getQualifierString(returnType.qualifier)); + error(typeSpecifier.line, "cannot be bool or int", getQualifierString(qualifier)); } } else { - if (!returnType.layoutQualifier.isEmpty()) + if (!layoutQualifier.isEmpty()) { - checkIsAtGlobalLevel(typeSpecifier.getLine(), "layout"); + checkIsAtGlobalLevel(typeSpecifier.line, "layout"); } - if (sh::IsVarying(returnType.qualifier) || returnType.qualifier == EvqVertexIn || - returnType.qualifier == EvqFragmentOut) + if (sh::IsVarying(qualifier) || qualifier == EvqVertexIn || qualifier == EvqFragmentOut) { - checkInputOutputTypeIsValidES3(returnType.qualifier, typeSpecifier, - typeSpecifier.getLine()); + checkInputOutputTypeIsValidES3(qualifier, typeSpecifier, typeSpecifier.line); } - if (returnType.qualifier == EvqComputeIn) + if (qualifier == EvqComputeIn) { - error(typeSpecifier.getLine(), "'in' can be only used to specify the local group size", + error(typeSpecifier.line, "'in' can be only used to specify the local group size", "in"); } } @@ -1724,7 +1442,7 @@ void TParseContext::checkInputOutputTypeIsValidES3(const TQualifier qualifier, const TSourceLoc &qualifierLocation) { // An input/output variable can never be bool or a sampler. Samplers are checked elsewhere. - if (type.getBasicType() == EbtBool) + if (type.type == EbtBool) { error(qualifierLocation, "cannot be bool", getQualifierString(qualifier)); } @@ -1742,7 +1460,7 @@ void TParseContext::checkInputOutputTypeIsValidES3(const TQualifier qualifier, return; case EvqFragmentOut: // ESSL 3.00 section 4.3.6 - if (type.typeSpecifierNonArray.isMatrix()) + if (type.isMatrix()) { error(qualifierLocation, "cannot be matrix", getQualifierString(qualifier)); } @@ -1755,15 +1473,15 @@ void TParseContext::checkInputOutputTypeIsValidES3(const TQualifier qualifier, // Vertex shader outputs / fragment shader inputs have a different, slightly more lenient set of // restrictions. bool typeContainsIntegers = - (type.getBasicType() == EbtInt || type.getBasicType() == EbtUInt || - type.isStructureContainingType(EbtInt) || type.isStructureContainingType(EbtUInt)); + (type.type == EbtInt || type.type == EbtUInt || type.isStructureContainingType(EbtInt) || + type.isStructureContainingType(EbtUInt)); if (typeContainsIntegers && qualifier != EvqFlatIn && qualifier != EvqFlatOut) { error(qualifierLocation, "must use 'flat' interpolation here", getQualifierString(qualifier)); } - if (type.getBasicType() == EbtStruct) + if (type.type == EbtStruct) { // ESSL 3.00 sections 4.3.4 and 4.3.6. // These restrictions are only implied by the ESSL 3.00 spec, but @@ -1791,57 +1509,9 @@ void TParseContext::checkInputOutputTypeIsValidES3(const TQualifier qualifier, } } -void TParseContext::checkLocalVariableConstStorageQualifier(const TQualifierWrapperBase &qualifier) -{ - if (qualifier.getType() == QtStorage) - { - const TStorageQualifierWrapper &storageQualifier = - static_cast(qualifier); - if (!declaringFunction() && storageQualifier.getQualifier() != EvqConst && - !symbolTable.atGlobalLevel()) - { - error(storageQualifier.getLine(), - "Local variables can only use the const storage qualifier.", - storageQualifier.getQualifierString().c_str()); - } - } -} - -bool TParseContext::checkIsMemoryQualifierNotSpecified(const TMemoryQualifier &memoryQualifier, - const TSourceLoc &location) -{ - if (memoryQualifier.readonly) - { - error(location, "Only allowed with images.", "readonly"); - return false; - } - if (memoryQualifier.writeonly) - { - error(location, "Only allowed with images.", "writeonly"); - return false; - } - if (memoryQualifier.coherent) - { - error(location, "Only allowed with images.", "coherent"); - return false; - } - if (memoryQualifier.restrictQualifier) - { - error(location, "Only allowed with images.", "restrict"); - return false; - } - if (memoryQualifier.volatileQualifier) - { - error(location, "Only allowed with images.", "volatile"); - return false; - } - return true; -} - -TIntermDeclaration *TParseContext::parseSingleDeclaration( - TPublicType &publicType, - const TSourceLoc &identifierOrTypeLocation, - const TString &identifier) +TIntermAggregate *TParseContext::parseSingleDeclaration(TPublicType &publicType, + const TSourceLoc &identifierOrTypeLocation, + const TString &identifier) { TType type(publicType); if ((mCompileOptions & SH_FLATTEN_PRAGMA_STDGL_INVARIANT_ALL) && @@ -1877,9 +1547,6 @@ TIntermDeclaration *TParseContext::parseSingleDeclaration( mDeferredSingleDeclarationErrorCheck = emptyDeclaration; - TIntermDeclaration *declaration = new TIntermDeclaration(); - declaration->setLine(identifierOrTypeLocation); - if (emptyDeclaration) { if (publicType.isUnsizedArray()) @@ -1900,23 +1567,17 @@ TIntermDeclaration *TParseContext::parseSingleDeclaration( declareVariable(identifierOrTypeLocation, identifier, type, &variable); if (variable && symbol) - { symbol->setId(variable->getUniqueId()); - } } - // We append the symbol even if the declaration is empty, mainly because of struct declarations - // that may just declare a type. - declaration->appendDeclarator(symbol); - - return declaration; + return intermediate.makeAggregate(symbol, identifierOrTypeLocation); } -TIntermDeclaration *TParseContext::parseSingleArrayDeclaration(TPublicType &publicType, - const TSourceLoc &identifierLocation, - const TString &identifier, - const TSourceLoc &indexLocation, - TIntermTyped *indexExpression) +TIntermAggregate *TParseContext::parseSingleArrayDeclaration(TPublicType &publicType, + const TSourceLoc &identifierLocation, + const TString &identifier, + const TSourceLoc &indexLocation, + TIntermTyped *indexExpression) { mDeferredSingleDeclarationErrorCheck = false; @@ -1936,44 +1597,38 @@ TIntermDeclaration *TParseContext::parseSingleArrayDeclaration(TPublicType &publ TVariable *variable = nullptr; declareVariable(identifierLocation, identifier, arrayType, &variable); - TIntermDeclaration *declaration = new TIntermDeclaration(); - declaration->setLine(identifierLocation); - TIntermSymbol *symbol = intermediate.addSymbol(0, identifier, arrayType, identifierLocation); if (variable && symbol) - { symbol->setId(variable->getUniqueId()); - declaration->appendDeclarator(symbol); - } - return declaration; + return intermediate.makeAggregate(symbol, identifierLocation); } -TIntermDeclaration *TParseContext::parseSingleInitDeclaration(const TPublicType &publicType, - const TSourceLoc &identifierLocation, - const TString &identifier, - const TSourceLoc &initLocation, - TIntermTyped *initializer) +TIntermAggregate *TParseContext::parseSingleInitDeclaration(const TPublicType &publicType, + const TSourceLoc &identifierLocation, + const TString &identifier, + const TSourceLoc &initLocation, + TIntermTyped *initializer) { mDeferredSingleDeclarationErrorCheck = false; singleDeclarationErrorCheck(publicType, identifierLocation); - TIntermDeclaration *declaration = new TIntermDeclaration(); - declaration->setLine(identifierLocation); - - TIntermBinary *initNode = nullptr; - if (!executeInitializer(identifierLocation, identifier, publicType, initializer, &initNode)) + TIntermNode *intermNode = nullptr; + if (!executeInitializer(identifierLocation, identifier, publicType, initializer, &intermNode)) { - if (initNode) - { - declaration->appendDeclarator(initNode); - } + // + // Build intermediate representation + // + return intermNode ? intermediate.makeAggregate(intermNode, initLocation) : nullptr; + } + else + { + return nullptr; } - return declaration; } -TIntermDeclaration *TParseContext::parseSingleArrayInitDeclaration( +TIntermAggregate *TParseContext::parseSingleArrayInitDeclaration( TPublicType &publicType, const TSourceLoc &identifierLocation, const TString &identifier, @@ -2001,81 +1656,58 @@ TIntermDeclaration *TParseContext::parseSingleArrayInitDeclaration( // This ensures useless error messages regarding the variable's non-arrayness won't follow. arrayType.setArraySize(size); - TIntermDeclaration *declaration = new TIntermDeclaration(); - declaration->setLine(identifierLocation); - // initNode will correspond to the whole of "type b[n] = initializer". - TIntermBinary *initNode = nullptr; + TIntermNode *initNode = nullptr; if (!executeInitializer(identifierLocation, identifier, arrayType, initializer, &initNode)) { - if (initNode) - { - declaration->appendDeclarator(initNode); - } + return initNode ? intermediate.makeAggregate(initNode, initLocation) : nullptr; + } + else + { + return nullptr; } - - return declaration; } -TIntermAggregate *TParseContext::parseInvariantDeclaration( - const TTypeQualifierBuilder &typeQualifierBuilder, - const TSourceLoc &identifierLoc, - const TString *identifier, - const TSymbol *symbol) +TIntermAggregate *TParseContext::parseInvariantDeclaration(const TSourceLoc &invariantLoc, + const TSourceLoc &identifierLoc, + const TString *identifier, + const TSymbol *symbol) { - TTypeQualifier typeQualifier = typeQualifierBuilder.getVariableTypeQualifier(&mDiagnostics); + // invariant declaration + if (!checkIsAtGlobalLevel(invariantLoc, "invariant varying")) + return nullptr; - if (!typeQualifier.invariant) + if (!symbol) { - error(identifierLoc, "Expected invariant", identifier->c_str()); + error(identifierLoc, "undeclared identifier declared as invariant", identifier->c_str()); return nullptr; } - if (!checkIsAtGlobalLevel(identifierLoc, "invariant varying")) - { - return nullptr; - } - if (!symbol) - { - error(identifierLoc, "undeclared identifier declared as invariant", identifier->c_str()); - return nullptr; - } - if (!IsQualifierUnspecified(typeQualifier.qualifier)) - { - error(identifierLoc, "invariant declaration specifies qualifier", - getQualifierString(typeQualifier.qualifier)); - } - if (typeQualifier.precision != EbpUndefined) - { - error(identifierLoc, "invariant declaration specifies precision", - getPrecisionString(typeQualifier.precision)); - } - if (!typeQualifier.layoutQualifier.isEmpty()) + else { - error(identifierLoc, "invariant declaration specifies layout", "'layout'"); - } - - const TVariable *variable = getNamedVariable(identifierLoc, identifier, symbol); - ASSERT(variable); - const TType &type = variable->getType(); - - checkInvariantVariableQualifier(typeQualifier.invariant, type.getQualifier(), - typeQualifier.line); - checkIsMemoryQualifierNotSpecified(typeQualifier.memoryQualifier, typeQualifier.line); - - symbolTable.addInvariantVarying(std::string(identifier->c_str())); - - TIntermSymbol *intermSymbol = - intermediate.addSymbol(variable->getUniqueId(), *identifier, type, identifierLoc); + const TString kGlFrontFacing("gl_FrontFacing"); + if (*identifier == kGlFrontFacing) + { + error(identifierLoc, "identifier should not be declared as invariant", + identifier->c_str()); + return nullptr; + } + symbolTable.addInvariantVarying(std::string(identifier->c_str())); + const TVariable *variable = getNamedVariable(identifierLoc, identifier, symbol); + ASSERT(variable); + const TType &type = variable->getType(); + TIntermSymbol *intermSymbol = + intermediate.addSymbol(variable->getUniqueId(), *identifier, type, identifierLoc); - TIntermAggregate *aggregate = TIntermediate::MakeAggregate(intermSymbol, identifierLoc); - aggregate->setOp(EOpInvariantDeclaration); - return aggregate; + TIntermAggregate *aggregate = intermediate.makeAggregate(intermSymbol, identifierLoc); + aggregate->setOp(EOpInvariantDeclaration); + return aggregate; + } } -void TParseContext::parseDeclarator(TPublicType &publicType, - const TSourceLoc &identifierLocation, - const TString &identifier, - TIntermDeclaration *declarationOut) +TIntermAggregate *TParseContext::parseDeclarator(TPublicType &publicType, + TIntermAggregate *aggregateDeclaration, + const TSourceLoc &identifierLocation, + const TString &identifier) { // If the declaration starting this declarator list was empty (example: int,), some checks were // not performed. @@ -2095,18 +1727,17 @@ void TParseContext::parseDeclarator(TPublicType &publicType, TIntermSymbol *symbol = intermediate.addSymbol(0, identifier, TType(publicType), identifierLocation); if (variable && symbol) - { symbol->setId(variable->getUniqueId()); - declarationOut->appendDeclarator(symbol); - } + + return intermediate.growAggregate(aggregateDeclaration, symbol, identifierLocation); } -void TParseContext::parseArrayDeclarator(TPublicType &publicType, - const TSourceLoc &identifierLocation, - const TString &identifier, - const TSourceLoc &arrayLocation, - TIntermTyped *indexExpression, - TIntermDeclaration *declarationOut) +TIntermAggregate *TParseContext::parseArrayDeclarator(TPublicType &publicType, + TIntermAggregate *aggregateDeclaration, + const TSourceLoc &identifierLocation, + const TString &identifier, + const TSourceLoc &arrayLocation, + TIntermTyped *indexExpression) { // If the declaration starting this declarator list was empty (example: int,), some checks were // not performed. @@ -2134,16 +1765,18 @@ void TParseContext::parseArrayDeclarator(TPublicType &publicType, if (variable && symbol) symbol->setId(variable->getUniqueId()); - declarationOut->appendDeclarator(symbol); + return intermediate.growAggregate(aggregateDeclaration, symbol, identifierLocation); } + + return nullptr; } -void TParseContext::parseInitDeclarator(const TPublicType &publicType, - const TSourceLoc &identifierLocation, - const TString &identifier, - const TSourceLoc &initLocation, - TIntermTyped *initializer, - TIntermDeclaration *declarationOut) +TIntermAggregate *TParseContext::parseInitDeclarator(const TPublicType &publicType, + TIntermAggregate *aggregateDeclaration, + const TSourceLoc &identifierLocation, + const TString &identifier, + const TSourceLoc &initLocation, + TIntermTyped *initializer) { // If the declaration starting this declarator list was empty (example: int,), some checks were // not performed. @@ -2155,27 +1788,35 @@ void TParseContext::parseInitDeclarator(const TPublicType &publicType, checkDeclaratorLocationIsNotSpecified(identifierLocation, publicType); - TIntermBinary *initNode = nullptr; - if (!executeInitializer(identifierLocation, identifier, publicType, initializer, &initNode)) + TIntermNode *intermNode = nullptr; + if (!executeInitializer(identifierLocation, identifier, publicType, initializer, &intermNode)) { // // build the intermediate representation // - if (initNode) + if (intermNode) { - declarationOut->appendDeclarator(initNode); + return intermediate.growAggregate(aggregateDeclaration, intermNode, initLocation); } + else + { + return aggregateDeclaration; + } + } + else + { + return nullptr; } } -void TParseContext::parseArrayInitDeclarator(const TPublicType &publicType, - const TSourceLoc &identifierLocation, - const TString &identifier, - const TSourceLoc &indexLocation, - TIntermTyped *indexExpression, - const TSourceLoc &initLocation, - TIntermTyped *initializer, - TIntermDeclaration *declarationOut) +TIntermAggregate *TParseContext::parseArrayInitDeclarator(const TPublicType &publicType, + TIntermAggregate *aggregateDeclaration, + const TSourceLoc &identifierLocation, + const TString &identifier, + const TSourceLoc &indexLocation, + TIntermTyped *indexExpression, + const TSourceLoc &initLocation, + TIntermTyped *initializer) { // If the declaration starting this declarator list was empty (example: int,), some checks were // not performed. @@ -2203,24 +1844,28 @@ void TParseContext::parseArrayInitDeclarator(const TPublicType &publicType, arrayType.setArraySize(size); // initNode will correspond to the whole of "b[n] = initializer". - TIntermBinary *initNode = nullptr; + TIntermNode *initNode = nullptr; if (!executeInitializer(identifierLocation, identifier, arrayType, initializer, &initNode)) { if (initNode) { - declarationOut->appendDeclarator(initNode); + return intermediate.growAggregate(aggregateDeclaration, initNode, initLocation); + } + else + { + return aggregateDeclaration; } } + else + { + return nullptr; + } } -void TParseContext::parseGlobalLayoutQualifier(const TTypeQualifierBuilder &typeQualifierBuilder) +void TParseContext::parseGlobalLayoutQualifier(const TPublicType &typeQualifier) { - TTypeQualifier typeQualifier = typeQualifierBuilder.getVariableTypeQualifier(&mDiagnostics); const TLayoutQualifier layoutQualifier = typeQualifier.layoutQualifier; - checkInvariantVariableQualifier(typeQualifier.invariant, typeQualifier.qualifier, - typeQualifier.line); - // It should never be the case, but some strange parser errors can send us here. if (layoutQualifier.isEmpty()) { @@ -2234,10 +1879,6 @@ void TParseContext::parseGlobalLayoutQualifier(const TTypeQualifierBuilder &type return; } - checkIsMemoryQualifierNotSpecified(typeQualifier.memoryQualifier, typeQualifier.line); - - checkInternalFormatIsNotSpecified(typeQualifier.line, layoutQualifier.imageInternalFormat); - if (typeQualifier.qualifier == EvqComputeIn) { if (mComputeShaderLocalSizeDeclared && @@ -2325,31 +1966,30 @@ void TParseContext::parseGlobalLayoutQualifier(const TTypeQualifierBuilder &type } } -TIntermAggregate *TParseContext::addFunctionPrototypeDeclaration(const TFunction &parsedFunction, +TIntermAggregate *TParseContext::addFunctionPrototypeDeclaration(const TFunction &function, const TSourceLoc &location) { - // Note: function found from the symbol table could be the same as parsedFunction if this is the - // first declaration. Either way the instance in the symbol table is used to track whether the - // function is declared multiple times. - TFunction *function = static_cast( - symbolTable.find(parsedFunction.getMangledName(), getShaderVersion())); - if (function->hasPrototypeDeclaration() && mShaderVersion == 100) + // Note: symbolTableFunction could be the same as function if this is the first declaration. + // Either way the instance in the symbol table is used to track whether the function is declared + // multiple times. + TFunction *symbolTableFunction = + static_cast(symbolTable.find(function.getMangledName(), getShaderVersion())); + if (symbolTableFunction->hasPrototypeDeclaration() && mShaderVersion == 100) { // ESSL 1.00.17 section 4.2.7. // Doesn't apply to ESSL 3.00.4: see section 4.2.3. error(location, "duplicate function prototype declarations are not allowed", "function"); } - function->setHasPrototypeDeclaration(); + symbolTableFunction->setHasPrototypeDeclaration(); TIntermAggregate *prototype = new TIntermAggregate; - // TODO(oetuaho@nvidia.com): Instead of converting the function information here, the node could - // point to the data that already exists in the symbol table. - prototype->setType(function->getReturnType()); - prototype->getFunctionSymbolInfo()->setFromFunction(*function); + prototype->setType(function.getReturnType()); + prototype->setName(function.getMangledName()); + prototype->setFunctionId(function.getUniqueId()); - for (size_t i = 0; i < function->getParamCount(); i++) + for (size_t i = 0; i < function.getParamCount(); i++) { - const TConstParameter ¶m = function->getParam(i); + const TConstParameter ¶m = function.getParam(i); if (param.name != 0) { TVariable variable(param.name, *param.type); @@ -2378,83 +2018,71 @@ TIntermAggregate *TParseContext::addFunctionPrototypeDeclaration(const TFunction return prototype; } -TIntermFunctionDefinition *TParseContext::addFunctionDefinition( - const TFunction &function, - TIntermAggregate *functionParameters, - TIntermBlock *functionBody, - const TSourceLoc &location) +TIntermAggregate *TParseContext::addFunctionDefinition(const TFunction &function, + TIntermAggregate *functionPrototype, + TIntermAggregate *functionBody, + const TSourceLoc &location) { - // Check that non-void functions have at least one return statement. + //?? Check that all paths return a value if return type != void ? + // May be best done as post process phase on intermediate code if (mCurrentFunctionType->getBasicType() != EbtVoid && !mFunctionReturnsValue) { error(location, "function does not return a value:", "", function.getName().c_str()); } - if (functionBody == nullptr) - { - functionBody = new TIntermBlock(); - functionBody->setLine(location); - } - TIntermFunctionDefinition *functionNode = - new TIntermFunctionDefinition(function.getReturnType(), functionParameters, functionBody); - functionNode->setLine(location); - - functionNode->getFunctionSymbolInfo()->setFromFunction(function); + TIntermAggregate *aggregate = + intermediate.growAggregate(functionPrototype, functionBody, location); + intermediate.setAggregateOperator(aggregate, EOpFunction, location); + aggregate->setName(function.getMangledName().c_str()); + aggregate->setType(function.getReturnType()); + aggregate->setFunctionId(function.getUniqueId()); symbolTable.pop(); - return functionNode; + return aggregate; } -void TParseContext::parseFunctionDefinitionHeader(const TSourceLoc &location, - TFunction **function, - TIntermAggregate **aggregateOut) +void TParseContext::parseFunctionPrototype(const TSourceLoc &location, + TFunction *function, + TIntermAggregate **aggregateOut) { - ASSERT(function); - ASSERT(*function); const TSymbol *builtIn = - symbolTable.findBuiltIn((*function)->getMangledName(), getShaderVersion()); + symbolTable.findBuiltIn(function->getMangledName(), getShaderVersion()); if (builtIn) { - error(location, "built-in functions cannot be redefined", (*function)->getName().c_str()); + error(location, "built-in functions cannot be redefined", function->getName().c_str()); } - else - { - TFunction *prevDec = static_cast( - symbolTable.find((*function)->getMangledName(), getShaderVersion())); - // Note: 'prevDec' could be 'function' if this is the first time we've seen function as it - // would have just been put in the symbol table. Otherwise, we're looking up an earlier - // occurance. - if (*function != prevDec) - { - // Swap the parameters of the previous declaration to the parameters of the function - // definition (parameter names may differ). - prevDec->swapParameters(**function); - - // The function definition will share the same symbol as any previous declaration. - *function = prevDec; - } - - if ((*function)->isDefined()) - { - error(location, "function already has a body", (*function)->getName().c_str()); - } - - (*function)->setDefined(); + TFunction *prevDec = + static_cast(symbolTable.find(function->getMangledName(), getShaderVersion())); + // + // Note: 'prevDec' could be 'function' if this is the first time we've seen function + // as it would have just been put in the symbol table. Otherwise, we're looking up + // an earlier occurance. + // + if (prevDec->isDefined()) + { + // Then this function already has a body. + error(location, "function already has a body", function->getName().c_str()); } + prevDec->setDefined(); + // + // Overload the unique ID of the definition to be the same unique ID as the declaration. + // Eventually we will probably want to have only a single definition and just swap the + // arguments to be the definition's arguments. + // + function->setUniqueId(prevDec->getUniqueId()); // Raise error message if main function takes any parameters or return anything other than void - if ((*function)->getName() == "main") + if (function->getName() == "main") { - if ((*function)->getParamCount() > 0) + if (function->getParamCount() > 0) { - error(location, "function cannot take any parameter(s)", - (*function)->getName().c_str()); + error(location, "function cannot take any parameter(s)", function->getName().c_str()); } - if ((*function)->getReturnType().getBasicType() != EbtVoid) + if (function->getReturnType().getBasicType() != EbtVoid) { - error(location, "", (*function)->getReturnType().getBasicString(), + error(location, "", function->getReturnType().getBasicString(), "main function cannot return a value"); } } @@ -2462,7 +2090,7 @@ void TParseContext::parseFunctionDefinitionHeader(const TSourceLoc &location, // // Remember the return type for later checking for RETURN statements. // - mCurrentFunctionType = &((*function)->getReturnType()); + mCurrentFunctionType = &(prevDec->getReturnType()); mFunctionReturnsValue = false; // @@ -2474,9 +2102,9 @@ void TParseContext::parseFunctionDefinitionHeader(const TSourceLoc &location, // knows where to find parameters. // TIntermAggregate *paramNodes = new TIntermAggregate; - for (size_t i = 0; i < (*function)->getParamCount(); i++) + for (size_t i = 0; i < function->getParamCount(); i++) { - const TConstParameter ¶m = (*function)->getParam(i); + const TConstParameter ¶m = function->getParam(i); if (param.name != 0) { TVariable *variable = new TVariable(param.name, *param.type); @@ -2534,7 +2162,7 @@ TFunction *TParseContext::parseFunctionDeclarator(const TSourceLoc &location, TF { if (prevDec->getReturnType() != function->getReturnType()) { - error(location, "function must have the same return type in all of its declarations", + error(location, "overloaded functions must have the same return type", function->getReturnType().getBasicString()); } for (size_t i = 0; i < prevDec->getParamCount(); ++i) @@ -2542,8 +2170,7 @@ TFunction *TParseContext::parseFunctionDeclarator(const TSourceLoc &location, TF if (prevDec->getParam(i).type->getQualifier() != function->getParam(i).type->getQualifier()) { - error(location, - "function must have the same parameter qualifiers in all of its declarations", + error(location, "overloaded functions must have the same parameter qualifiers", function->getParam(i).type->getQualifierString()); } } @@ -2563,7 +2190,9 @@ TFunction *TParseContext::parseFunctionDeclarator(const TSourceLoc &location, TF else { // Insert the unmangled name to detect potential future redefinition as a variable. - symbolTable.getOuterLevel()->insertUnmangled(function); + TFunction *newFunction = + new TFunction(NewPoolTString(function->getName().c_str()), &function->getReturnType()); + symbolTable.getOuterLevel()->insertUnmangled(newFunction); } // We're at the inner scope level of the function's arguments and body statement. @@ -2591,10 +2220,8 @@ TFunction *TParseContext::parseFunctionHeader(const TPublicType &type, { error(location, "no qualifiers allowed for function return", "layout"); } - // make sure a sampler or an image is not involved as well... - checkIsNotSampler(location, type.typeSpecifierNonArray, - "samplers can't be function return values"); - checkIsNotImage(location, type.typeSpecifierNonArray, "images can't be function return values"); + // make sure a sampler is not involved as well... + checkIsNotSampler(location, type, "samplers can't be function return values"); if (mShaderVersion < 300) { // Array return values are forbidden, but there's also no valid syntax for declaring array @@ -2616,14 +2243,14 @@ TFunction *TParseContext::parseFunctionHeader(const TPublicType &type, TFunction *TParseContext::addConstructorFunc(const TPublicType &publicTypeIn) { TPublicType publicType = publicTypeIn; - if (publicType.isStructSpecifier()) + if (publicType.isStructSpecifier) { - error(publicType.getLine(), "constructor can't be a structure definition", - getBasicString(publicType.getBasicType())); + error(publicType.line, "constructor can't be a structure definition", + getBasicString(publicType.type)); } TOperator op = EOpNull; - if (publicType.getUserDef()) + if (publicType.userDef) { op = EOpConstructStruct; } @@ -2632,9 +2259,8 @@ TFunction *TParseContext::addConstructorFunc(const TPublicType &publicTypeIn) op = sh::TypeToConstructorOperator(TType(publicType)); if (op == EOpNull) { - error(publicType.getLine(), "cannot construct this type", - getBasicString(publicType.getBasicType())); - publicType.setBasicType(EbtFloat); + error(publicType.line, "cannot construct this type", getBasicString(publicType.type)); + publicType.type = EbtFloat; op = EOpConstructFloat; } } @@ -2657,12 +2283,6 @@ TIntermTyped *TParseContext::addConstructor(TIntermNode *arguments, TType type = fnCall->getReturnType(); if (type.isUnsizedArray()) { - if (fnCall->getParamCount() == 0) - { - error(line, "implicitly sized array constructor must have at least one argument", "[]"); - type.setArraySize(1u); - return TIntermTyped::CreateZero(type); - } type.setArraySize(static_cast(fnCall->getParamCount())); } bool constType = true; @@ -2702,7 +2322,7 @@ TIntermTyped *TParseContext::addConstructor(TIntermNode *arguments, constructor->setType(type); - TIntermTyped *constConstructor = intermediate.foldAggregateBuiltIn(constructor, &mDiagnostics); + TIntermTyped *constConstructor = intermediate.foldAggregateBuiltIn(constructor); if (constConstructor) { return constConstructor; @@ -2711,36 +2331,118 @@ TIntermTyped *TParseContext::addConstructor(TIntermNode *arguments, return constructor; } +// This function returns vector field(s) being accessed from a constant vector. +TIntermConstantUnion *TParseContext::foldVectorSwizzle(TVectorFields &fields, + TIntermConstantUnion *baseNode, + const TSourceLoc &location) +{ + const TConstantUnion *unionArray = baseNode->getUnionArrayPointer(); + ASSERT(unionArray); + + TConstantUnion *constArray = new TConstantUnion[fields.num]; + const auto &type = baseNode->getType(); + + for (int i = 0; i < fields.num; i++) + { + // Out-of-range indices should already be checked. + ASSERT(fields.offsets[i] < type.getNominalSize()); + constArray[i] = unionArray[fields.offsets[i]]; + } + return intermediate.addConstantUnion(constArray, type, location); +} + +// This function returns the column vector being accessed from a constant matrix. +TIntermConstantUnion *TParseContext::foldMatrixSubscript(int index, + TIntermConstantUnion *baseNode, + const TSourceLoc &location) +{ + ASSERT(index < baseNode->getType().getCols()); + + const TConstantUnion *unionArray = baseNode->getUnionArrayPointer(); + int size = baseNode->getType().getRows(); + return intermediate.addConstantUnion(&unionArray[size * index], baseNode->getType(), location); +} + +// This function returns an element of an array accessed from a constant array. +TIntermConstantUnion *TParseContext::foldArraySubscript(int index, + TIntermConstantUnion *baseNode, + const TSourceLoc &location) +{ + ASSERT(index < static_cast(baseNode->getArraySize())); + + TType arrayElementType = baseNode->getType(); + arrayElementType.clearArrayness(); + size_t arrayElementSize = arrayElementType.getObjectSize(); + const TConstantUnion *unionArray = baseNode->getUnionArrayPointer(); + return intermediate.addConstantUnion(&unionArray[arrayElementSize * index], baseNode->getType(), + location); +} + +// +// This function returns the value of a particular field inside a constant structure from the symbol +// table. +// If there is an embedded/nested struct, it appropriately calls addConstStructNested or +// addConstStructFromAggr function and returns the parse-tree with the values of the embedded/nested +// struct. +// +TIntermTyped *TParseContext::addConstStruct(const TString &identifier, + TIntermTyped *node, + const TSourceLoc &line) +{ + const TFieldList &fields = node->getType().getStruct()->fields(); + size_t instanceSize = 0; + + for (size_t index = 0; index < fields.size(); ++index) + { + if (fields[index]->name() == identifier) + { + break; + } + else + { + instanceSize += fields[index]->type()->getObjectSize(); + } + } + + TIntermTyped *typedNode; + TIntermConstantUnion *tempConstantNode = node->getAsConstantUnion(); + if (tempConstantNode) + { + const TConstantUnion *constArray = tempConstantNode->getUnionArrayPointer(); + + // type will be changed in the calling function + typedNode = intermediate.addConstantUnion(constArray + instanceSize, + tempConstantNode->getType(), line); + } + else + { + error(line, "Cannot offset into the structure", "Error"); + return nullptr; + } + + return typedNode; +} + // // Interface/uniform blocks // -TIntermDeclaration *TParseContext::addInterfaceBlock( - const TTypeQualifierBuilder &typeQualifierBuilder, - const TSourceLoc &nameLine, - const TString &blockName, - TFieldList *fieldList, - const TString *instanceName, - const TSourceLoc &instanceLine, - TIntermTyped *arrayIndex, - const TSourceLoc &arrayIndexLine) +TIntermAggregate *TParseContext::addInterfaceBlock(const TPublicType &typeQualifier, + const TSourceLoc &nameLine, + const TString &blockName, + TFieldList *fieldList, + const TString *instanceName, + const TSourceLoc &instanceLine, + TIntermTyped *arrayIndex, + const TSourceLoc &arrayIndexLine) { checkIsNotReserved(nameLine, blockName); - TTypeQualifier typeQualifier = typeQualifierBuilder.getVariableTypeQualifier(&mDiagnostics); - if (typeQualifier.qualifier != EvqUniform) { error(typeQualifier.line, "invalid qualifier:", getQualifierString(typeQualifier.qualifier), "interface blocks must be uniform"); } - if (typeQualifier.invariant) - { - error(typeQualifier.line, "invalid qualifier on interface block member", "invariant"); - } - - checkIsMemoryQualifierNotSpecified(typeQualifier.memoryQualifier, typeQualifier.line); - TLayoutQualifier blockLayoutQualifier = typeQualifier.layoutQualifier; checkLocationIsNotSpecified(typeQualifier.line, blockLayoutQualifier); @@ -2756,8 +2458,6 @@ TIntermDeclaration *TParseContext::addInterfaceBlock( checkWorkGroupSizeIsNotSpecified(nameLine, blockLayoutQualifier); - checkInternalFormatIsNotSpecified(nameLine, blockLayoutQualifier.imageInternalFormat); - TSymbol *blockNameSymbol = new TInterfaceBlockName(&blockName); if (!symbolTable.declare(blockNameSymbol)) { @@ -2775,12 +2475,6 @@ TIntermDeclaration *TParseContext::addInterfaceBlock( "sampler types are not allowed in interface blocks"); } - if (IsImage(fieldType->getBasicType())) - { - error(field->line(), "unsupported type", fieldType->getBasicString(), - "image types are not allowed in interface blocks"); - } - const TQualifier qualifier = fieldType->getQualifier(); switch (qualifier) { @@ -2793,11 +2487,6 @@ TIntermDeclaration *TParseContext::addInterfaceBlock( break; } - if (fieldType->isInvariant()) - { - error(field->line(), "invalid qualifier on interface block member", "invariant"); - } - // check layout qualifiers TLayoutQualifier fieldLayoutQualifier = fieldType->getLayoutQualifier(); checkLocationIsNotSpecified(field->line(), fieldLayoutQualifier); @@ -2876,14 +2565,13 @@ TIntermDeclaration *TParseContext::addInterfaceBlock( symbolName = instanceTypeDef->getName(); } - TIntermSymbol *blockSymbol = - intermediate.addSymbol(symbolId, symbolName, interfaceBlockType, typeQualifier.line); - TIntermDeclaration *declaration = new TIntermDeclaration(); - declaration->appendDeclarator(blockSymbol); - declaration->setLine(nameLine); + TIntermAggregate *aggregate = intermediate.makeAggregate( + intermediate.addSymbol(symbolId, symbolName, interfaceBlockType, typeQualifier.line), + nameLine); + aggregate->setOp(EOpDeclaration); exitStructDeclaration(); - return declaration; + return aggregate; } void TParseContext::enterStructDeclaration(const TSourceLoc &line, const TString &identifier) @@ -2904,9 +2592,15 @@ void TParseContext::exitStructDeclaration() --mStructNestingLevel; } +namespace +{ +const int kWebGLMaxStructNesting = 4; + +} // namespace + void TParseContext::checkIsBelowStructNestingLimit(const TSourceLoc &line, const TField &field) { - if (!sh::IsWebGLBasedSpec(mShaderSpec)) + if (!IsWebGLBasedSpec(mShaderSpec)) { return; } @@ -2936,6 +2630,8 @@ TIntermTyped *TParseContext::addIndexExpression(TIntermTyped *baseExpression, const TSourceLoc &location, TIntermTyped *indexExpression) { + TIntermTyped *indexedExpression = NULL; + if (!baseExpression->isArray() && !baseExpression->isMatrix() && !baseExpression->isVector()) { if (baseExpression->getAsSymbolNode()) @@ -2947,11 +2643,6 @@ TIntermTyped *TParseContext::addIndexExpression(TIntermTyped *baseExpression, { error(location, " left of '[' is not of type array, matrix, or vector ", "expression"); } - - TConstantUnion *unionArray = new TConstantUnion[1]; - unionArray->setFConst(0.0f); - return intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpHigh, EvqConst), - location); } TIntermConstantUnion *indexConstantUnion = indexExpression->getAsConstantUnion(); @@ -2981,78 +2672,151 @@ TIntermTyped *TParseContext::addIndexExpression(TIntermTyped *baseExpression, if (indexConstantUnion) { - // If an out-of-range index is not qualified as constant, the behavior in the spec is - // undefined. This applies even if ANGLE has been able to constant fold it (ANGLE may - // constant fold expressions that are not constant expressions). The most compatible way to - // handle this case is to report a warning instead of an error and force the index to be in - // the correct range. + // If the index is not qualified as constant, the behavior in the spec is undefined. This + // applies even if ANGLE has been able to constant fold it (ANGLE may constant fold + // expressions that are not constant expressions). The most compatible way to handle this + // case is to report a warning instead of an error and force the index to be in the + // correct range. bool outOfRangeIndexIsError = indexExpression->getQualifier() == EvqConst; int index = indexConstantUnion->getIConst(0); + if (!baseExpression->isArray()) + { + // Array checks are done later because a different error message might be generated + // based on the index in some cases. + if (baseExpression->isVector()) + { + index = checkIndexOutOfRange(outOfRangeIndexIsError, location, index, + baseExpression->getType().getNominalSize(), + "vector field selection out of range", "[]"); + } + else if (baseExpression->isMatrix()) + { + index = checkIndexOutOfRange(outOfRangeIndexIsError, location, index, + baseExpression->getType().getCols(), + "matrix field selection out of range", "[]"); + } + } - int safeIndex = -1; - - if (baseExpression->isArray()) + TIntermConstantUnion *baseConstantUnion = baseExpression->getAsConstantUnion(); + if (baseConstantUnion) { - if (baseExpression->getQualifier() == EvqFragData && index > 0) + if (baseExpression->isArray()) { - if (mShaderSpec == SH_WEBGL2_SPEC) + index = checkIndexOutOfRange(outOfRangeIndexIsError, location, index, + baseExpression->getArraySize(), + "array index out of range", "[]"); + // Constant folding for array indexing. + indexedExpression = foldArraySubscript(index, baseConstantUnion, location); + } + else if (baseExpression->isVector()) + { + // Constant folding for vector indexing - reusing vector swizzle folding. + TVectorFields fields; + fields.num = 1; + fields.offsets[0] = index; + indexedExpression = foldVectorSwizzle(fields, baseConstantUnion, location); + } + else if (baseExpression->isMatrix()) + { + // Constant folding for matrix indexing. + indexedExpression = foldMatrixSubscript(index, baseConstantUnion, location); + } + } + else + { + int safeIndex = -1; + + if (baseExpression->isArray()) + { + if (baseExpression->getQualifier() == EvqFragData && index > 0) { - // Error has been already generated if index is not const. - if (indexExpression->getQualifier() == EvqConst) + if (mShaderSpec == SH_WEBGL2_SPEC) + { + // Error has been already generated if index is not const. + if (indexExpression->getQualifier() == EvqConst) + { + error(location, "", "[", + "array index for gl_FragData must be constant zero"); + } + safeIndex = 0; + } + else if (!isExtensionEnabled("GL_EXT_draw_buffers")) { - error(location, "", "[", - "array index for gl_FragData must be constant zero"); + outOfRangeError(outOfRangeIndexIsError, location, "", "[", + "array index for gl_FragData must be zero when " + "GL_EXT_draw_buffers is disabled"); + safeIndex = 0; } - safeIndex = 0; } - else if (!isExtensionEnabled("GL_EXT_draw_buffers")) + // Only do generic out-of-range check if similar error hasn't already been reported. + if (safeIndex < 0) { - outOfRangeError(outOfRangeIndexIsError, location, "", "[", - "array index for gl_FragData must be zero when " - "GL_EXT_draw_buffers is disabled"); - safeIndex = 0; + safeIndex = checkIndexOutOfRange(outOfRangeIndexIsError, location, index, + baseExpression->getArraySize(), + "array index out of range", "[]"); } } - // Only do generic out-of-range check if similar error hasn't already been reported. - if (safeIndex < 0) + + // Data of constant unions can't be changed, because it may be shared with other + // constant unions or even builtins, like gl_MaxDrawBuffers. Instead use a new + // sanitized object. + if (safeIndex != -1) { - safeIndex = checkIndexOutOfRange(outOfRangeIndexIsError, location, index, - baseExpression->getArraySize(), - "array index out of range", "[]"); + TConstantUnion *safeConstantUnion = new TConstantUnion(); + safeConstantUnion->setIConst(safeIndex); + indexConstantUnion->replaceConstantUnion(safeConstantUnion); } - } - else if (baseExpression->isMatrix()) - { - safeIndex = checkIndexOutOfRange(outOfRangeIndexIsError, location, index, - baseExpression->getType().getCols(), - "matrix field selection out of range", "[]"); - } - else if (baseExpression->isVector()) - { - safeIndex = checkIndexOutOfRange(outOfRangeIndexIsError, location, index, - baseExpression->getType().getNominalSize(), - "vector field selection out of range", "[]"); - } - ASSERT(safeIndex >= 0); - // Data of constant unions can't be changed, because it may be shared with other - // constant unions or even builtins, like gl_MaxDrawBuffers. Instead use a new - // sanitized object. - if (safeIndex != index) - { - TConstantUnion *safeConstantUnion = new TConstantUnion(); - safeConstantUnion->setIConst(safeIndex); - indexConstantUnion->replaceConstantUnion(safeConstantUnion); + indexedExpression = + intermediate.addIndex(EOpIndexDirect, baseExpression, indexExpression, location); } + } + else + { + indexedExpression = + intermediate.addIndex(EOpIndexIndirect, baseExpression, indexExpression, location); + } + + if (indexedExpression == 0) + { + TConstantUnion *unionArray = new TConstantUnion[1]; + unionArray->setFConst(0.0f); + indexedExpression = + intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpHigh, EvqConst), location); + } + else if (baseExpression->isArray()) + { + TType indexedType = baseExpression->getType(); + indexedType.clearArrayness(); + indexedExpression->setType(indexedType); + } + else if (baseExpression->isMatrix()) + { + indexedExpression->setType(TType(baseExpression->getBasicType(), + baseExpression->getPrecision(), EvqTemporary, + static_cast(baseExpression->getRows()))); + } + else if (baseExpression->isVector()) + { + indexedExpression->setType( + TType(baseExpression->getBasicType(), baseExpression->getPrecision(), EvqTemporary)); + } + else + { + indexedExpression->setType(baseExpression->getType()); + } - return intermediate.addIndex(EOpIndexDirect, baseExpression, indexExpression, location, - &mDiagnostics); + if (baseExpression->getType().getQualifier() == EvqConst && + indexExpression->getType().getQualifier() == EvqConst) + { + indexedExpression->getTypePointer()->setQualifier(EvqConst); } else { - return intermediate.addIndex(EOpIndexIndirect, baseExpression, indexExpression, location, - &mDiagnostics); + indexedExpression->getTypePointer()->setQualifier(EvqTemporary); } + + return indexedExpression; } int TParseContext::checkIndexOutOfRange(bool outOfRangeIndexIsError, @@ -3085,10 +2849,11 @@ TIntermTyped *TParseContext::addFieldSelectionExpression(TIntermTyped *baseExpre const TString &fieldString, const TSourceLoc &fieldLocation) { + TIntermTyped *indexedExpression = NULL; + if (baseExpression->isArray()) { error(fieldLocation, "cannot apply dot operator to an array", "."); - return baseExpression; } if (baseExpression->isVector()) @@ -3101,19 +2866,41 @@ TIntermTyped *TParseContext::addFieldSelectionExpression(TIntermTyped *baseExpre fields.offsets[0] = 0; } - return TIntermediate::AddSwizzle(baseExpression, fields, dotLocation); + if (baseExpression->getAsConstantUnion()) + { + // constant folding for vector fields + indexedExpression = + foldVectorSwizzle(fields, baseExpression->getAsConstantUnion(), fieldLocation); + } + else + { + TIntermTyped *index = intermediate.addSwizzle(fields, fieldLocation); + indexedExpression = + intermediate.addIndex(EOpVectorSwizzle, baseExpression, index, dotLocation); + } + if (indexedExpression == nullptr) + { + indexedExpression = baseExpression; + } + else + { + // Note that the qualifier set here will be corrected later. + indexedExpression->setType(TType(baseExpression->getBasicType(), + baseExpression->getPrecision(), EvqTemporary, + static_cast(fields.num))); + } } else if (baseExpression->getBasicType() == EbtStruct) { + bool fieldFound = false; const TFieldList &fields = baseExpression->getType().getStruct()->fields(); if (fields.empty()) { error(dotLocation, "structure has no fields", "Internal Error"); - return baseExpression; + indexedExpression = baseExpression; } else { - bool fieldFound = false; unsigned int i; for (i = 0; i < fields.size(); ++i) { @@ -3125,29 +2912,47 @@ TIntermTyped *TParseContext::addFieldSelectionExpression(TIntermTyped *baseExpre } if (fieldFound) { - TIntermTyped *index = TIntermTyped::CreateIndexNode(i); - index->setLine(fieldLocation); - return intermediate.addIndex(EOpIndexDirectStruct, baseExpression, index, - dotLocation, &mDiagnostics); + if (baseExpression->getAsConstantUnion()) + { + indexedExpression = addConstStruct(fieldString, baseExpression, dotLocation); + if (indexedExpression == 0) + { + indexedExpression = baseExpression; + } + else + { + indexedExpression->setType(*fields[i]->type()); + } + } + else + { + TConstantUnion *unionArray = new TConstantUnion[1]; + unionArray->setIConst(i); + TIntermTyped *index = intermediate.addConstantUnion( + unionArray, *fields[i]->type(), fieldLocation); + indexedExpression = intermediate.addIndex(EOpIndexDirectStruct, baseExpression, + index, dotLocation); + indexedExpression->setType(*fields[i]->type()); + } } else { error(dotLocation, " no such field in structure", fieldString.c_str()); - return baseExpression; + indexedExpression = baseExpression; } } } else if (baseExpression->isInterfaceBlock()) { + bool fieldFound = false; const TFieldList &fields = baseExpression->getType().getInterfaceBlock()->fields(); if (fields.empty()) { error(dotLocation, "interface block has no fields", "Internal Error"); - return baseExpression; + indexedExpression = baseExpression; } else { - bool fieldFound = false; unsigned int i; for (i = 0; i < fields.size(); ++i) { @@ -3159,15 +2964,18 @@ TIntermTyped *TParseContext::addFieldSelectionExpression(TIntermTyped *baseExpre } if (fieldFound) { - TIntermTyped *index = TIntermTyped::CreateIndexNode(i); - index->setLine(fieldLocation); - return intermediate.addIndex(EOpIndexDirectInterfaceBlock, baseExpression, index, - dotLocation, &mDiagnostics); + TConstantUnion *unionArray = new TConstantUnion[1]; + unionArray->setIConst(i); + TIntermTyped *index = + intermediate.addConstantUnion(unionArray, *fields[i]->type(), fieldLocation); + indexedExpression = intermediate.addIndex(EOpIndexDirectInterfaceBlock, + baseExpression, index, dotLocation); + indexedExpression->setType(*fields[i]->type()); } else { error(dotLocation, " no such field in interface block", fieldString.c_str()); - return baseExpression; + indexedExpression = baseExpression; } } } @@ -3185,8 +2993,19 @@ TIntermTyped *TParseContext::addFieldSelectionExpression(TIntermTyped *baseExpre "side", fieldString.c_str()); } - return baseExpression; + indexedExpression = baseExpression; } + + if (baseExpression->getQualifier() == EvqConst) + { + indexedExpression->getTypePointer()->setQualifier(EvqConst); + } + else + { + indexedExpression->getTypePointer()->setQualifier(EvqTemporary); + } + + return indexedExpression; } TLayoutQualifier TParseContext::parseLayoutQualifier(const TString &qualifierType, @@ -3196,18 +3015,10 @@ TLayoutQualifier TParseContext::parseLayoutQualifier(const TString &qualifierTyp if (qualifierType == "shared") { - if (sh::IsWebGLBasedSpec(mShaderSpec)) - { - error(qualifierTypeLine, "Only std140 layout is allowed in WebGL", "shared"); - } qualifier.blockStorage = EbsShared; } else if (qualifierType == "packed") { - if (sh::IsWebGLBasedSpec(mShaderSpec)) - { - error(qualifierTypeLine, "Only std140 layout is allowed in WebGL", "packed"); - } qualifier.blockStorage = EbsPacked; } else if (qualifierType == "std140") @@ -3227,72 +3038,6 @@ TLayoutQualifier TParseContext::parseLayoutQualifier(const TString &qualifierTyp error(qualifierTypeLine, "invalid layout qualifier", qualifierType.c_str(), "location requires an argument"); } - else if (qualifierType == "rgba32f") - { - checkLayoutQualifierSupported(qualifierTypeLine, qualifierType, 310); - qualifier.imageInternalFormat = EiifRGBA32F; - } - else if (qualifierType == "rgba16f") - { - checkLayoutQualifierSupported(qualifierTypeLine, qualifierType, 310); - qualifier.imageInternalFormat = EiifRGBA16F; - } - else if (qualifierType == "r32f") - { - checkLayoutQualifierSupported(qualifierTypeLine, qualifierType, 310); - qualifier.imageInternalFormat = EiifR32F; - } - else if (qualifierType == "rgba8") - { - checkLayoutQualifierSupported(qualifierTypeLine, qualifierType, 310); - qualifier.imageInternalFormat = EiifRGBA8; - } - else if (qualifierType == "rgba8_snorm") - { - checkLayoutQualifierSupported(qualifierTypeLine, qualifierType, 310); - qualifier.imageInternalFormat = EiifRGBA8_SNORM; - } - else if (qualifierType == "rgba32i") - { - checkLayoutQualifierSupported(qualifierTypeLine, qualifierType, 310); - qualifier.imageInternalFormat = EiifRGBA32I; - } - else if (qualifierType == "rgba16i") - { - checkLayoutQualifierSupported(qualifierTypeLine, qualifierType, 310); - qualifier.imageInternalFormat = EiifRGBA16I; - } - else if (qualifierType == "rgba8i") - { - checkLayoutQualifierSupported(qualifierTypeLine, qualifierType, 310); - qualifier.imageInternalFormat = EiifRGBA8I; - } - else if (qualifierType == "r32i") - { - checkLayoutQualifierSupported(qualifierTypeLine, qualifierType, 310); - qualifier.imageInternalFormat = EiifR32I; - } - else if (qualifierType == "rgba32ui") - { - checkLayoutQualifierSupported(qualifierTypeLine, qualifierType, 310); - qualifier.imageInternalFormat = EiifRGBA32UI; - } - else if (qualifierType == "rgba16ui") - { - checkLayoutQualifierSupported(qualifierTypeLine, qualifierType, 310); - qualifier.imageInternalFormat = EiifRGBA16UI; - } - else if (qualifierType == "rgba8ui") - { - checkLayoutQualifierSupported(qualifierTypeLine, qualifierType, 310); - qualifier.imageInternalFormat = EiifRGBA8UI; - } - else if (qualifierType == "r32ui") - { - checkLayoutQualifierSupported(qualifierTypeLine, qualifierType, 310); - qualifier.imageInternalFormat = EiifR32UI; - } - else { error(qualifierTypeLine, "invalid layout qualifier", qualifierType.c_str()); @@ -3338,7 +3083,6 @@ TLayoutQualifier TParseContext::parseLayoutQualifier(const TString &qualifierTyp else { qualifier.location = intValue; - qualifier.locationsSpecified = 1; } } else if (qualifierType == "local_size_x") @@ -3364,48 +3108,106 @@ TLayoutQualifier TParseContext::parseLayoutQualifier(const TString &qualifierTyp return qualifier; } -TTypeQualifierBuilder *TParseContext::createTypeQualifierBuilder(const TSourceLoc &loc) -{ - return new TTypeQualifierBuilder( - new TStorageQualifierWrapper(symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary, loc), - mShaderVersion); -} - TLayoutQualifier TParseContext::joinLayoutQualifiers(TLayoutQualifier leftQualifier, TLayoutQualifier rightQualifier, const TSourceLoc &rightQualifierLocation) { - return sh::JoinLayoutQualifiers(leftQualifier, rightQualifier, rightQualifierLocation, - &mDiagnostics); + TLayoutQualifier joinedQualifier = leftQualifier; + + if (rightQualifier.location != -1) + { + joinedQualifier.location = rightQualifier.location; + } + if (rightQualifier.matrixPacking != EmpUnspecified) + { + joinedQualifier.matrixPacking = rightQualifier.matrixPacking; + } + if (rightQualifier.blockStorage != EbsUnspecified) + { + joinedQualifier.blockStorage = rightQualifier.blockStorage; + } + + for (size_t i = 0u; i < rightQualifier.localSize.size(); ++i) + { + if (rightQualifier.localSize[i] != -1) + { + if (joinedQualifier.localSize[i] != -1 && + joinedQualifier.localSize[i] != rightQualifier.localSize[i]) + { + error(rightQualifierLocation, + "Cannot have multiple different work group size specifiers", + getWorkGroupSizeString(i)); + } + joinedQualifier.localSize[i] = rightQualifier.localSize[i]; + } + } + + return joinedQualifier; } -TFieldList *TParseContext::addStructDeclaratorListWithQualifiers( - const TTypeQualifierBuilder &typeQualifierBuilder, - TPublicType *typeSpecifier, - TFieldList *fieldList) +TPublicType TParseContext::joinInterpolationQualifiers(const TSourceLoc &interpolationLoc, + TQualifier interpolationQualifier, + const TSourceLoc &storageLoc, + TQualifier storageQualifier) { - TTypeQualifier typeQualifier = typeQualifierBuilder.getVariableTypeQualifier(&mDiagnostics); + TQualifier mergedQualifier = EvqSmoothIn; - typeSpecifier->qualifier = typeQualifier.qualifier; - typeSpecifier->layoutQualifier = typeQualifier.layoutQualifier; - typeSpecifier->memoryQualifier = typeQualifier.memoryQualifier; - typeSpecifier->invariant = typeQualifier.invariant; - if (typeQualifier.precision != EbpUndefined) + if (storageQualifier == EvqFragmentIn) { - typeSpecifier->precision = typeQualifier.precision; + if (interpolationQualifier == EvqSmooth) + mergedQualifier = EvqSmoothIn; + else if (interpolationQualifier == EvqFlat) + mergedQualifier = EvqFlatIn; + else + UNREACHABLE(); + } + else if (storageQualifier == EvqCentroidIn) + { + if (interpolationQualifier == EvqSmooth) + mergedQualifier = EvqCentroidIn; + else if (interpolationQualifier == EvqFlat) + mergedQualifier = EvqFlatIn; + else + UNREACHABLE(); } - return addStructDeclaratorList(*typeSpecifier, fieldList); + else if (storageQualifier == EvqVertexOut) + { + if (interpolationQualifier == EvqSmooth) + mergedQualifier = EvqSmoothOut; + else if (interpolationQualifier == EvqFlat) + mergedQualifier = EvqFlatOut; + else + UNREACHABLE(); + } + else if (storageQualifier == EvqCentroidOut) + { + if (interpolationQualifier == EvqSmooth) + mergedQualifier = EvqCentroidOut; + else if (interpolationQualifier == EvqFlat) + mergedQualifier = EvqFlatOut; + else + UNREACHABLE(); + } + else + { + error(interpolationLoc, + "interpolation qualifier requires a fragment 'in' or vertex 'out' storage qualifier", + getInterpolationString(interpolationQualifier)); + + mergedQualifier = storageQualifier; + } + + TPublicType type; + type.setBasic(EbtVoid, mergedQualifier, storageLoc); + return type; } TFieldList *TParseContext::addStructDeclaratorList(const TPublicType &typeSpecifier, TFieldList *fieldList) { - checkPrecisionSpecified(typeSpecifier.getLine(), typeSpecifier.precision, - typeSpecifier.getBasicType()); - - checkIsNonVoid(typeSpecifier.getLine(), (*fieldList)[0]->name(), typeSpecifier.getBasicType()); + checkIsNonVoid(typeSpecifier.line, (*fieldList)[0]->name(), typeSpecifier.type); - checkWorkGroupSizeIsNotSpecified(typeSpecifier.getLine(), typeSpecifier.layoutQualifier); + checkWorkGroupSizeIsNotSpecified(typeSpecifier.line, typeSpecifier.layoutQualifier); for (unsigned int i = 0; i < fieldList->size(); ++i) { @@ -3413,43 +3215,42 @@ TFieldList *TParseContext::addStructDeclaratorList(const TPublicType &typeSpecif // Careful not to replace already known aspects of type, like array-ness // TType *type = (*fieldList)[i]->type(); - type->setBasicType(typeSpecifier.getBasicType()); - type->setPrimarySize(typeSpecifier.getPrimarySize()); - type->setSecondarySize(typeSpecifier.getSecondarySize()); + type->setBasicType(typeSpecifier.type); + type->setPrimarySize(typeSpecifier.primarySize); + type->setSecondarySize(typeSpecifier.secondarySize); type->setPrecision(typeSpecifier.precision); type->setQualifier(typeSpecifier.qualifier); type->setLayoutQualifier(typeSpecifier.layoutQualifier); - type->setMemoryQualifier(typeSpecifier.memoryQualifier); - type->setInvariant(typeSpecifier.invariant); // don't allow arrays of arrays if (type->isArray()) { - checkIsValidTypeForArray(typeSpecifier.getLine(), typeSpecifier); + checkIsValidTypeForArray(typeSpecifier.line, typeSpecifier); } if (typeSpecifier.array) type->setArraySize(static_cast(typeSpecifier.arraySize)); - if (typeSpecifier.getUserDef()) + if (typeSpecifier.userDef) { - type->setStruct(typeSpecifier.getUserDef()->getStruct()); + type->setStruct(typeSpecifier.userDef->getStruct()); } - checkIsBelowStructNestingLimit(typeSpecifier.getLine(), *(*fieldList)[i]); + checkIsBelowStructNestingLimit(typeSpecifier.line, *(*fieldList)[i]); } return fieldList; } -TTypeSpecifierNonArray TParseContext::addStructure(const TSourceLoc &structLine, - const TSourceLoc &nameLine, - const TString *structName, - TFieldList *fieldList) +TPublicType TParseContext::addStructure(const TSourceLoc &structLine, + const TSourceLoc &nameLine, + const TString *structName, + TFieldList *fieldList) { TStructure *structure = new TStructure(structName, fieldList); TType *structureType = new TType(structure); // Store a bool in the struct if we're at global scope, to allow us to // skip the local struct scoping workaround in HLSL. + structure->setUniqueId(TSymbolTable::nextUniqueId()); structure->setAtGlobalScope(symbolTable.atGlobalLevel()); if (!structName->empty()) @@ -3477,31 +3278,19 @@ TTypeSpecifierNonArray TParseContext::addStructure(const TSourceLoc &structLine, getQualifierString(qualifier)); break; } - if (field.type()->isInvariant()) - { - error(field.line(), "invalid qualifier on struct member", "invariant"); - } - if (IsImage(field.type()->getBasicType())) - { - error(field.line(), "disallowed type in struct", field.type()->getBasicString()); - } - - checkIsMemoryQualifierNotSpecified(field.type()->getMemoryQualifier(), field.line()); - - checkLocationIsNotSpecified(field.line(), field.type()->getLayoutQualifier()); } - TTypeSpecifierNonArray typeSpecifierNonArray; - typeSpecifierNonArray.initialize(EbtStruct, structLine); - typeSpecifierNonArray.userDef = structureType; - typeSpecifierNonArray.isStructSpecifier = true; + TPublicType publicType; + publicType.setBasic(EbtStruct, EvqTemporary, structLine); + publicType.userDef = structureType; + publicType.isStructSpecifier = true; exitStructDeclaration(); - return typeSpecifierNonArray; + return publicType; } TIntermSwitch *TParseContext::addSwitch(TIntermTyped *init, - TIntermBlock *statementList, + TIntermAggregate *statementList, const TSourceLoc &loc) { TBasicType switchType = init->getBasicType(); @@ -3613,7 +3402,7 @@ TIntermTyped *TParseContext::createUnaryMath(TOperator op, case EOpNegative: case EOpPositive: if (child->getBasicType() == EbtStruct || child->getBasicType() == EbtBool || - child->isArray() || IsOpaqueType(child->getBasicType())) + child->isArray() || IsSampler(child->getBasicType())) { return nullptr; } @@ -3622,14 +3411,7 @@ TIntermTyped *TParseContext::createUnaryMath(TOperator op, break; } - TIntermUnary *node = new TIntermUnary(op, child); - node->setLine(loc); - - TIntermTyped *foldedNode = node->fold(&mDiagnostics); - if (foldedNode) - return foldedNode; - - return node; + return intermediate.addUnaryMath(op, child, loc, funcReturnType); } TIntermTyped *TParseContext::addUnaryMath(TOperator op, TIntermTyped *child, const TSourceLoc &loc) @@ -3778,14 +3560,6 @@ bool TParseContext::binaryOpCommonCheck(TOperator op, GetOperatorString(op)); return false; } - - if ((op == EOpAssign || op == EOpInitialize) && - left->getType().isStructureContainingImages()) - { - error(loc, "undefined operation for structs containing images", - GetOperatorString(op)); - return false; - } case EOpLessThan: case EOpGreaterThan: case EOpLessThanEqual: @@ -3916,12 +3690,10 @@ TIntermTyped *TParseContext::addBinaryMathInternal(TOperator op, case EOpLogicalAnd: ASSERT(!left->isArray() && !right->isArray() && !left->getType().getStruct() && !right->getType().getStruct()); - if (left->getBasicType() != EbtBool || !left->isScalar() || !right->isScalar()) + if (left->getBasicType() != EbtBool || left->isMatrix() || left->isVector()) { return nullptr; } - // Basic types matching should have been already checked. - ASSERT(right->getBasicType() == EbtBool); break; case EOpAdd: case EOpSub: @@ -4000,10 +3772,10 @@ TIntermTyped *TParseContext::addBinaryMathBooleanResult(TOperator op, return node; } -TIntermBinary *TParseContext::createAssign(TOperator op, - TIntermTyped *left, - TIntermTyped *right, - const TSourceLoc &loc) +TIntermTyped *TParseContext::createAssign(TOperator op, + TIntermTyped *left, + TIntermTyped *right, + const TSourceLoc &loc) { if (binaryOpCommonCheck(op, left, right, loc)) { @@ -4053,7 +3825,7 @@ TIntermTyped *TParseContext::addComma(TIntermTyped *left, ","); } - return TIntermediate::AddComma(left, right, loc, mShaderVersion); + return intermediate.addComma(left, right, loc, mShaderVersion); } TIntermBranch *TParseContext::addBranch(TOperator op, const TSourceLoc &loc) @@ -4105,7 +3877,7 @@ TIntermBranch *TParseContext::addBranch(TOperator op, void TParseContext::checkTextureOffsetConst(TIntermAggregate *functionCall) { ASSERT(!functionCall->isUserDefined()); - const TString &name = functionCall->getFunctionSymbolInfo()->getName(); + const TString &name = functionCall->getName(); TIntermNode *offset = nullptr; TIntermSequence *arguments = functionCall->getSequence(); if (name.compare(0, 16, "texelFetchOffset") == 0 || @@ -4153,99 +3925,6 @@ void TParseContext::checkTextureOffsetConst(TIntermAggregate *functionCall) } } -// GLSL ES 3.10 Revision 4, 4.9 Memory Access Qualifiers -void TParseContext::checkImageMemoryAccessForBuiltinFunctions(TIntermAggregate *functionCall) -{ - ASSERT(!functionCall->isUserDefined()); - const TString &name = functionCall->getFunctionSymbolInfo()->getName(); - - if (name.compare(0, 5, "image") == 0) - { - TIntermSequence *arguments = functionCall->getSequence(); - TIntermNode *imageNode = (*arguments)[0]; - TIntermSymbol *imageSymbol = imageNode->getAsSymbolNode(); - - const TMemoryQualifier &memoryQualifier = imageSymbol->getMemoryQualifier(); - - if (name.compare(5, 5, "Store") == 0) - { - if (memoryQualifier.readonly) - { - error(imageNode->getLine(), - "'imageStore' cannot be used with images qualified as 'readonly'", - imageSymbol->getSymbol().c_str()); - } - } - else if (name.compare(5, 4, "Load") == 0) - { - if (memoryQualifier.writeonly) - { - error(imageNode->getLine(), - "'imageLoad' cannot be used with images qualified as 'writeonly'", - imageSymbol->getSymbol().c_str()); - } - } - } -} - -// GLSL ES 3.10 Revision 4, 13.51 Matching of Memory Qualifiers in Function Parameters -void TParseContext::checkImageMemoryAccessForUserDefinedFunctions( - const TFunction *functionDefinition, - const TIntermAggregate *functionCall) -{ - ASSERT(functionCall->isUserDefined()); - - const TIntermSequence &arguments = *functionCall->getSequence(); - - ASSERT(functionDefinition->getParamCount() == arguments.size()); - - for (size_t i = 0; i < arguments.size(); ++i) - { - const TType &functionArgumentType = arguments[i]->getAsTyped()->getType(); - const TType &functionParameterType = *functionDefinition->getParam(i).type; - ASSERT(functionArgumentType.getBasicType() == functionParameterType.getBasicType()); - - if (IsImage(functionArgumentType.getBasicType())) - { - const TMemoryQualifier &functionArgumentMemoryQualifier = - functionArgumentType.getMemoryQualifier(); - const TMemoryQualifier &functionParameterMemoryQualifier = - functionParameterType.getMemoryQualifier(); - if (functionArgumentMemoryQualifier.readonly && - !functionParameterMemoryQualifier.readonly) - { - error(functionCall->getLine(), - "Function call discards the 'readonly' qualifier from image", - arguments[i]->getAsSymbolNode()->getSymbol().c_str()); - } - - if (functionArgumentMemoryQualifier.writeonly && - !functionParameterMemoryQualifier.writeonly) - { - error(functionCall->getLine(), - "Function call discards the 'writeonly' qualifier from image", - arguments[i]->getAsSymbolNode()->getSymbol().c_str()); - } - - if (functionArgumentMemoryQualifier.coherent && - !functionParameterMemoryQualifier.coherent) - { - error(functionCall->getLine(), - "Function call discards the 'coherent' qualifier from image", - arguments[i]->getAsSymbolNode()->getSymbol().c_str()); - } - - if (functionArgumentMemoryQualifier.volatileQualifier && - !functionParameterMemoryQualifier.volatileQualifier) - { - error(functionCall->getLine(), - "Function call discards the 'volatile' qualifier from image", - arguments[i]->getAsSymbolNode()->getSymbol().c_str()); - } - } - } -} - TIntermTyped *TParseContext::addFunctionCallOrMethod(TFunction *fnCall, TIntermNode *paramNode, TIntermNode *thisNode, @@ -4361,8 +4040,7 @@ TIntermTyped *TParseContext::addFunctionCallOrMethod(TFunction *fnCall, // See if we can constant fold a built-in. Note that this may be possible even // if it is not const-qualified. - TIntermTyped *foldedNode = - intermediate.foldAggregateBuiltIn(aggregate, &mDiagnostics); + TIntermTyped *foldedNode = intermediate.foldAggregateBuiltIn(aggregate); if (foldedNode) { callNode = foldedNode; @@ -4387,20 +4065,15 @@ TIntermTyped *TParseContext::addFunctionCallOrMethod(TFunction *fnCall, // if builtIn == true, it's definitely a builtIn function with EOpNull if (!builtIn) aggregate->setUserDefined(); - aggregate->getFunctionSymbolInfo()->setFromFunction(*fnCandidate); + aggregate->setName(fnCandidate->getMangledName()); + aggregate->setFunctionId(fnCandidate->getUniqueId()); - // This needs to happen after the function info including name is set + // This needs to happen after the name is set if (builtIn) { aggregate->setBuiltInFunctionPrecision(); checkTextureOffsetConst(aggregate); - - checkImageMemoryAccessForBuiltinFunctions(aggregate); - } - else - { - checkImageMemoryAccessForUserDefinedFunctions(fnCandidate, aggregate); } callNode = aggregate; @@ -4422,46 +4095,34 @@ TIntermTyped *TParseContext::addFunctionCallOrMethod(TFunction *fnCall, } TIntermTyped *TParseContext::addTernarySelection(TIntermTyped *cond, - TIntermTyped *trueExpression, - TIntermTyped *falseExpression, + TIntermTyped *trueBlock, + TIntermTyped *falseBlock, const TSourceLoc &loc) { checkIsScalarBool(loc, cond); - if (trueExpression->getType() != falseExpression->getType()) - { - binaryOpError(loc, ":", trueExpression->getCompleteString(), - falseExpression->getCompleteString()); - return falseExpression; - } - if (IsOpaqueType(trueExpression->getBasicType())) + if (trueBlock->getType() != falseBlock->getType()) { - // ESSL 1.00 section 4.1.7 - // ESSL 3.00 section 4.1.7 - // Opaque/sampler types are not allowed in most types of expressions, including ternary. - // Note that structs containing opaque types don't need to be checked as structs are - // forbidden below. - error(loc, "ternary operator is not allowed for opaque types", ":"); - return falseExpression; + binaryOpError(loc, ":", trueBlock->getCompleteString(), falseBlock->getCompleteString()); + return falseBlock; } - // ESSL1 sections 5.2 and 5.7: // ESSL3 section 5.7: // Ternary operator is not among the operators allowed for structures/arrays. - if (trueExpression->isArray() || trueExpression->getBasicType() == EbtStruct) + if (trueBlock->isArray() || trueBlock->getBasicType() == EbtStruct) { error(loc, "ternary operator is not allowed for structures or arrays", ":"); - return falseExpression; + return falseBlock; } // WebGL2 section 5.26, the following results in an error: // "Ternary operator applied to void, arrays, or structs containing arrays" - if (mShaderSpec == SH_WEBGL2_SPEC && trueExpression->getBasicType() == EbtVoid) + if (mShaderSpec == SH_WEBGL2_SPEC && trueBlock->getBasicType() == EbtVoid) { error(loc, "ternary operator is not allowed for void", ":"); - return falseExpression; + return falseBlock; } - return TIntermediate::AddTernarySelection(cond, trueExpression, falseExpression, loc); + return intermediate.addSelection(cond, trueBlock, falseBlock, loc); } // @@ -4488,5 +4149,3 @@ int PaParseStrings(size_t count, return (error == 0) && (context->numErrors() == 0) ? 0 : 1; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/ParseContext.h b/gfx/angle/src/compiler/translator/ParseContext.h index cdc80755a..cf153db36 100755 --- a/gfx/angle/src/compiler/translator/ParseContext.h +++ b/gfx/angle/src/compiler/translator/ParseContext.h @@ -11,12 +11,8 @@ #include "compiler/translator/DirectiveHandler.h" #include "compiler/translator/Intermediate.h" #include "compiler/translator/SymbolTable.h" -#include "compiler/translator/QualifierTypes.h" #include "compiler/preprocessor/Preprocessor.h" -namespace sh -{ - struct TMatrixFields { bool wholeRow; @@ -34,12 +30,47 @@ class TParseContext : angle::NonCopyable public: TParseContext(TSymbolTable &symt, TExtensionBehavior &ext, + TIntermediate &interm, sh::GLenum type, ShShaderSpec spec, - ShCompileOptions options, + int options, bool checksPrecErrors, TInfoSink &is, - const ShBuiltInResources &resources); + const ShBuiltInResources &resources) + : intermediate(interm), + symbolTable(symt), + mDeferredSingleDeclarationErrorCheck(false), + mShaderType(type), + mShaderSpec(spec), + mCompileOptions(options), + mShaderVersion(100), + mTreeRoot(nullptr), + mLoopNestingLevel(0), + mStructNestingLevel(0), + mSwitchNestingLevel(0), + mCurrentFunctionType(nullptr), + mFunctionReturnsValue(false), + mChecksPrecisionErrors(checksPrecErrors), + mFragmentPrecisionHighOnESSL1(false), + mDefaultMatrixPacking(EmpColumnMajor), + mDefaultBlockStorage(EbsShared), + mDiagnostics(is), + mDirectiveHandler(ext, + mDiagnostics, + mShaderVersion, + mShaderType, + resources.WEBGL_debug_shader_precision == 1), + mPreprocessor(&mDiagnostics, &mDirectiveHandler), + mScanner(nullptr), + mUsesFragData(false), + mUsesFragColor(false), + mUsesSecondaryOutputs(false), + mMinProgramTexelOffset(resources.MinProgramTexelOffset), + mMaxProgramTexelOffset(resources.MaxProgramTexelOffset), + mComputeShaderLocalSizeDeclared(false) + { + mComputeShaderLocalSize.fill(-1); + } const pp::Preprocessor &getPreprocessor() const { return mPreprocessor; } pp::Preprocessor &getPreprocessor() { return mPreprocessor; } @@ -62,8 +93,8 @@ class TParseContext : angle::NonCopyable const char *token, const char *extraInfo = ""); - TIntermBlock *getTreeRoot() const { return mTreeRoot; } - void setTreeRoot(TIntermBlock *treeRoot) { mTreeRoot = treeRoot; } + TIntermNode *getTreeRoot() const { return mTreeRoot; } + void setTreeRoot(TIntermNode *treeRoot) { mTreeRoot = treeRoot; } bool getFragmentPrecisionHigh() const { @@ -88,12 +119,6 @@ class TParseContext : angle::NonCopyable bool isComputeShaderLocalSizeDeclared() const { return mComputeShaderLocalSizeDeclared; } sh::WorkGroupSize getComputeShaderLocalSize() const; - void enterFunctionDeclaration() { mDeclaringFunction = true; } - - void exitFunctionDeclaration() { mDeclaringFunction = false; } - - bool declaringFunction() const { return mDeclaringFunction; } - // This method is guaranteed to succeed, even if no variable with 'name' exists. const TVariable *getNamedVariable(const TSourceLoc &location, const TString *name, const TSymbol *symbol); TIntermTyped *parseVariableIdentifier(const TSourceLoc &location, @@ -127,17 +152,16 @@ class TParseContext : angle::NonCopyable bool checkIsNonVoid(const TSourceLoc &line, const TString &identifier, const TBasicType &type); void checkIsScalarBool(const TSourceLoc &line, const TIntermTyped *type); void checkIsScalarBool(const TSourceLoc &line, const TPublicType &pType); - bool checkIsNotSampler(const TSourceLoc &line, - const TTypeSpecifierNonArray &pType, - const char *reason); - bool checkIsNotImage(const TSourceLoc &line, - const TTypeSpecifierNonArray &pType, - const char *reason); + bool checkIsNotSampler(const TSourceLoc &line, const TPublicType &pType, const char *reason); void checkDeclaratorLocationIsNotSpecified(const TSourceLoc &line, const TPublicType &pType); void checkLocationIsNotSpecified(const TSourceLoc &location, const TLayoutQualifier &layoutQualifier); + void checkOutParameterIsNotSampler(const TSourceLoc &line, + TQualifier qualifier, + const TType &type); void checkIsParameterQualifierValid(const TSourceLoc &line, - const TTypeQualifierBuilder &typeQualifierBuilder, + TQualifier qualifier, + TQualifier paramQualifier, TType *type); bool checkCanUseExtension(const TSourceLoc &line, const TString &extension); void singleDeclarationErrorCheck(const TPublicType &publicType, @@ -147,16 +171,14 @@ class TParseContext : angle::NonCopyable int versionRequired); bool checkWorkGroupSizeIsNotSpecified(const TSourceLoc &location, const TLayoutQualifier &layoutQualifier); - bool checkInternalFormatIsNotSpecified(const TSourceLoc &location, - TLayoutImageInternalFormat internalFormat); + void functionCallLValueErrorCheck(const TFunction *fnCandidate, TIntermAggregate *fnCall); - void checkInvariantVariableQualifier(bool invariant, - const TQualifier qualifier, - const TSourceLoc &invariantLocation); + void checkInvariantIsOutVariableES3(const TQualifier qualifier, + const TSourceLoc &invariantLocation); void checkInputOutputTypeIsValidES3(const TQualifier qualifier, const TPublicType &type, const TSourceLoc &qualifierLocation); - void checkLocalVariableConstStorageQualifier(const TQualifierWrapperBase &qualifier); + const TPragma &pragma() const { return mDirectiveHandler.pragma(); } const TExtensionBehavior &extensionBehavior() const { return mDirectiveHandler.extensionBehavior(); } bool supportsExtension(const char *extension); @@ -164,84 +186,86 @@ class TParseContext : angle::NonCopyable void handleExtensionDirective(const TSourceLoc &loc, const char *extName, const char *behavior); void handlePragmaDirective(const TSourceLoc &loc, const char *name, const char *value, bool stdgl); + bool containsSampler(const TType &type); const TFunction* findFunction( const TSourceLoc &line, TFunction *pfnCall, int inputShaderVersion, bool *builtIn = 0); bool executeInitializer(const TSourceLoc &line, const TString &identifier, const TPublicType &pType, TIntermTyped *initializer, - TIntermBinary **initNode); + TIntermNode **intermNode); - void addFullySpecifiedType(TPublicType *typeSpecifier); - TPublicType addFullySpecifiedType(const TTypeQualifierBuilder &typeQualifierBuilder, + TPublicType addFullySpecifiedType(TQualifier qualifier, + bool invariant, + TLayoutQualifier layoutQualifier, const TPublicType &typeSpecifier); - TIntermDeclaration *parseSingleDeclaration(TPublicType &publicType, - const TSourceLoc &identifierOrTypeLocation, - const TString &identifier); - TIntermDeclaration *parseSingleArrayDeclaration(TPublicType &publicType, - const TSourceLoc &identifierLocation, - const TString &identifier, - const TSourceLoc &indexLocation, - TIntermTyped *indexExpression); - TIntermDeclaration *parseSingleInitDeclaration(const TPublicType &publicType, - const TSourceLoc &identifierLocation, - const TString &identifier, - const TSourceLoc &initLocation, - TIntermTyped *initializer); + TIntermAggregate *parseSingleDeclaration(TPublicType &publicType, + const TSourceLoc &identifierOrTypeLocation, + const TString &identifier); + TIntermAggregate *parseSingleArrayDeclaration(TPublicType &publicType, + const TSourceLoc &identifierLocation, + const TString &identifier, + const TSourceLoc &indexLocation, + TIntermTyped *indexExpression); + TIntermAggregate *parseSingleInitDeclaration(const TPublicType &publicType, + const TSourceLoc &identifierLocation, + const TString &identifier, + const TSourceLoc &initLocation, + TIntermTyped *initializer); // Parse a declaration like "type a[n] = initializer" // Note that this does not apply to declarations like "type[n] a = initializer" - TIntermDeclaration *parseSingleArrayInitDeclaration(TPublicType &publicType, - const TSourceLoc &identifierLocation, - const TString &identifier, - const TSourceLoc &indexLocation, - TIntermTyped *indexExpression, - const TSourceLoc &initLocation, - TIntermTyped *initializer); - - TIntermAggregate *parseInvariantDeclaration(const TTypeQualifierBuilder &typeQualifierBuilder, + TIntermAggregate *parseSingleArrayInitDeclaration(TPublicType &publicType, + const TSourceLoc &identifierLocation, + const TString &identifier, + const TSourceLoc &indexLocation, + TIntermTyped *indexExpression, + const TSourceLoc &initLocation, + TIntermTyped *initializer); + + TIntermAggregate *parseInvariantDeclaration(const TSourceLoc &invariantLoc, const TSourceLoc &identifierLoc, const TString *identifier, const TSymbol *symbol); - void parseDeclarator(TPublicType &publicType, - const TSourceLoc &identifierLocation, - const TString &identifier, - TIntermDeclaration *declarationOut); - void parseArrayDeclarator(TPublicType &publicType, - const TSourceLoc &identifierLocation, - const TString &identifier, - const TSourceLoc &arrayLocation, - TIntermTyped *indexExpression, - TIntermDeclaration *declarationOut); - void parseInitDeclarator(const TPublicType &publicType, - const TSourceLoc &identifierLocation, - const TString &identifier, - const TSourceLoc &initLocation, - TIntermTyped *initializer, - TIntermDeclaration *declarationOut); + TIntermAggregate *parseDeclarator(TPublicType &publicType, + TIntermAggregate *aggregateDeclaration, + const TSourceLoc &identifierLocation, + const TString &identifier); + TIntermAggregate *parseArrayDeclarator(TPublicType &publicType, + TIntermAggregate *aggregateDeclaration, + const TSourceLoc &identifierLocation, + const TString &identifier, + const TSourceLoc &arrayLocation, + TIntermTyped *indexExpression); + TIntermAggregate *parseInitDeclarator(const TPublicType &publicType, + TIntermAggregate *aggregateDeclaration, + const TSourceLoc &identifierLocation, + const TString &identifier, + const TSourceLoc &initLocation, + TIntermTyped *initializer); // Parse a declarator like "a[n] = initializer" - void parseArrayInitDeclarator(const TPublicType &publicType, - const TSourceLoc &identifierLocation, - const TString &identifier, - const TSourceLoc &indexLocation, - TIntermTyped *indexExpression, - const TSourceLoc &initLocation, - TIntermTyped *initializer, - TIntermDeclaration *declarationOut); - - void parseGlobalLayoutQualifier(const TTypeQualifierBuilder &typeQualifierBuilder); - TIntermAggregate *addFunctionPrototypeDeclaration(const TFunction &parsedFunction, + TIntermAggregate *parseArrayInitDeclarator(const TPublicType &publicType, + TIntermAggregate *aggregateDeclaration, + const TSourceLoc &identifierLocation, + const TString &identifier, + const TSourceLoc &indexLocation, + TIntermTyped *indexExpression, + const TSourceLoc &initLocation, + TIntermTyped *initializer); + + void parseGlobalLayoutQualifier(const TPublicType &typeQualifier); + TIntermAggregate *addFunctionPrototypeDeclaration(const TFunction &function, const TSourceLoc &location); - TIntermFunctionDefinition *addFunctionDefinition(const TFunction &function, - TIntermAggregate *functionParameters, - TIntermBlock *functionBody, - const TSourceLoc &location); - void parseFunctionDefinitionHeader(const TSourceLoc &location, - TFunction **function, - TIntermAggregate **aggregateOut); + TIntermAggregate *addFunctionDefinition(const TFunction &function, + TIntermAggregate *functionPrototype, + TIntermAggregate *functionBody, + const TSourceLoc &location); + void parseFunctionPrototype(const TSourceLoc &location, + TFunction *function, + TIntermAggregate **aggregateOut); TFunction *parseFunctionDeclarator(const TSourceLoc &location, TFunction *function); TFunction *parseFunctionHeader(const TPublicType &type, @@ -253,6 +277,8 @@ class TParseContext : angle::NonCopyable TFunction *fnCall, const TSourceLoc &line); + TIntermTyped *addConstStruct( + const TString &identifier, TIntermTyped *node, const TSourceLoc& line); TIntermTyped *addIndexExpression(TIntermTyped *baseExpression, const TSourceLoc& location, TIntermTyped *indexExpression); @@ -261,24 +287,20 @@ class TParseContext : angle::NonCopyable const TString &fieldString, const TSourceLoc &fieldLocation); - TFieldList *addStructDeclaratorListWithQualifiers( - const TTypeQualifierBuilder &typeQualifierBuilder, - TPublicType *typeSpecifier, - TFieldList *fieldList); TFieldList *addStructDeclaratorList(const TPublicType &typeSpecifier, TFieldList *fieldList); - TTypeSpecifierNonArray addStructure(const TSourceLoc &structLine, + TPublicType addStructure(const TSourceLoc &structLine, + const TSourceLoc &nameLine, + const TString *structName, + TFieldList *fieldList); + + TIntermAggregate* addInterfaceBlock(const TPublicType &typeQualifier, const TSourceLoc &nameLine, - const TString *structName, - TFieldList *fieldList); - - TIntermDeclaration *addInterfaceBlock(const TTypeQualifierBuilder &typeQualifierBuilder, - const TSourceLoc &nameLine, - const TString &blockName, - TFieldList *fieldList, - const TString *instanceName, - const TSourceLoc &instanceLine, - TIntermTyped *arrayIndex, - const TSourceLoc &arrayIndexLine); + const TString &blockName, + TFieldList *fieldList, + const TString *instanceName, + const TSourceLoc &instanceLine, + TIntermTyped *arrayIndex, + const TSourceLoc& arrayIndexLine); void parseLocalSize(const TString &qualifierType, const TSourceLoc &qualifierTypeLine, @@ -293,10 +315,11 @@ class TParseContext : angle::NonCopyable const TSourceLoc &qualifierTypeLine, int intValue, const TSourceLoc &intValueLine); - TTypeQualifierBuilder *createTypeQualifierBuilder(const TSourceLoc &loc); TLayoutQualifier joinLayoutQualifiers(TLayoutQualifier leftQualifier, TLayoutQualifier rightQualifier, const TSourceLoc &rightQualifierLocation); + TPublicType joinInterpolationQualifiers(const TSourceLoc &interpolationLoc, TQualifier interpolationQualifier, + const TSourceLoc &storageLoc, TQualifier storageQualifier); // Performs an error check for embedded struct declarations. void enterStructDeclaration(const TSourceLoc &line, const TString &identifier); @@ -304,9 +327,7 @@ class TParseContext : angle::NonCopyable void checkIsBelowStructNestingLimit(const TSourceLoc &line, const TField &field); - TIntermSwitch *addSwitch(TIntermTyped *init, - TIntermBlock *statementList, - const TSourceLoc &loc); + TIntermSwitch *addSwitch(TIntermTyped *init, TIntermAggregate *statementList, const TSourceLoc &loc); TIntermCase *addCase(TIntermTyped *condition, const TSourceLoc &loc); TIntermCase *addDefault(const TSourceLoc &loc); @@ -325,22 +346,17 @@ class TParseContext : angle::NonCopyable TIntermBranch *addBranch(TOperator op, TIntermTyped *returnValue, const TSourceLoc &loc); void checkTextureOffsetConst(TIntermAggregate *functionCall); - void checkImageMemoryAccessForBuiltinFunctions(TIntermAggregate *functionCall); - void checkImageMemoryAccessForUserDefinedFunctions(const TFunction *functionDefinition, - const TIntermAggregate *functionCall); TIntermTyped *addFunctionCallOrMethod(TFunction *fnCall, TIntermNode *paramNode, TIntermNode *thisNode, const TSourceLoc &loc, bool *fatalError); - TIntermTyped *addTernarySelection(TIntermTyped *cond, - TIntermTyped *trueExpression, - TIntermTyped *falseExpression, - const TSourceLoc &line); + TIntermTyped *addTernarySelection( + TIntermTyped *cond, TIntermTyped *trueBlock, TIntermTyped *falseBlock, const TSourceLoc &line); // TODO(jmadill): make these private - TIntermediate intermediate; // to build a parse tree + TIntermediate &intermediate; // to hold and build a parse tree TSymbolTable &symbolTable; // symbol table that goes with the language currently being parsed private: @@ -352,6 +368,18 @@ class TParseContext : angle::NonCopyable const char *reason, const char *token); + // Constant folding for element access. Note that the returned node does not have the correct + // type - it is expected to be fixed later. + TIntermConstantUnion *foldVectorSwizzle(TVectorFields &fields, + TIntermConstantUnion *baseNode, + const TSourceLoc &location); + TIntermConstantUnion *foldMatrixSubscript(int index, + TIntermConstantUnion *baseNode, + const TSourceLoc &location); + TIntermConstantUnion *foldArraySubscript(int index, + TIntermConstantUnion *baseNode, + const TSourceLoc &location); + bool declareVariable(const TSourceLoc &line, const TString &identifier, const TType &type, TVariable **variable); void checkCanBeDeclaredWithoutInitializer(const TSourceLoc &line, @@ -364,24 +392,10 @@ class TParseContext : angle::NonCopyable // Assumes that multiplication op has already been set based on the types. bool isMultiplicationTypeCombinationValid(TOperator op, const TType &left, const TType &right); - bool checkIsMemoryQualifierNotSpecified(const TMemoryQualifier &memoryQualifier, - const TSourceLoc &location); - void checkOutParameterIsNotImage(const TSourceLoc &line, - TQualifier qualifier, - const TType &type); - void checkOutParameterIsNotOpaqueType(const TSourceLoc &line, - TQualifier qualifier, - const TType &type); - void checkOutParameterIsNotSampler(const TSourceLoc &line, - TQualifier qualifier, - const TType &type); - TIntermTyped *addBinaryMathInternal( TOperator op, TIntermTyped *left, TIntermTyped *right, const TSourceLoc &loc); - TIntermBinary *createAssign(TOperator op, - TIntermTyped *left, - TIntermTyped *right, - const TSourceLoc &loc); + TIntermTyped *createAssign( + TOperator op, TIntermTyped *left, TIntermTyped *right, const TSourceLoc &loc); // The funcReturnType parameter is expected to be non-null when the operation is a built-in function. // It is expected to be null for other unary operators. TIntermTyped *createUnaryMath( @@ -395,18 +409,16 @@ class TParseContext : angle::NonCopyable bool mDeferredSingleDeclarationErrorCheck; sh::GLenum mShaderType; // vertex or fragment language (future: pack or unpack) - ShShaderSpec mShaderSpec; // The language specification compiler conforms to - GLES2 or WebGL. - ShCompileOptions mCompileOptions; // Options passed to TCompiler + ShShaderSpec mShaderSpec; // The language specification compiler conforms to - GLES2 or WebGL. + int mCompileOptions; // Options passed to TCompiler int mShaderVersion; - TIntermBlock *mTreeRoot; // root of parse tree being created + TIntermNode *mTreeRoot; // root of parse tree being created int mLoopNestingLevel; // 0 if outside all loops - int mStructNestingLevel; // incremented while parsing a struct declaration + int mStructNestingLevel; // incremented while parsing a struct declaration int mSwitchNestingLevel; // 0 if outside all switch statements - const TType - *mCurrentFunctionType; // the return type of the function that's currently being parsed + const TType *mCurrentFunctionType; // the return type of the function that's currently being parsed bool mFunctionReturnsValue; // true if a non-void function has a return - bool mChecksPrecisionErrors; // true if an error will be generated when a variable is declared - // without precision, explicit or implicit. + bool mChecksPrecisionErrors; // true if an error will be generated when a variable is declared without precision, explicit or implicit. bool mFragmentPrecisionHighOnESSL1; // true if highp precision is supported when compiling // ESSL1. TLayoutMatrixPacking mDefaultMatrixPacking; @@ -426,13 +438,9 @@ class TParseContext : angle::NonCopyable // keep track of local group size declared in layout. It should be declared only once. bool mComputeShaderLocalSizeDeclared; sh::WorkGroupSize mComputeShaderLocalSize; - // keeps track whether we are declaring / defining a function - bool mDeclaringFunction; }; int PaParseStrings( size_t count, const char *const string[], const int length[], TParseContext *context); -} // namespace sh - #endif // COMPILER_TRANSLATOR_PARSECONTEXT_H_ diff --git a/gfx/angle/src/compiler/translator/PoolAlloc.cpp b/gfx/angle/src/compiler/translator/PoolAlloc.cpp index 3b44afe33..27e1c06b5 100755 --- a/gfx/angle/src/compiler/translator/PoolAlloc.cpp +++ b/gfx/angle/src/compiler/translator/PoolAlloc.cpp @@ -50,17 +50,28 @@ void SetGlobalPoolAllocator(TPoolAllocator* poolAllocator) // Implement the functionality of the TPoolAllocator class, which // is documented in PoolAlloc.h. // -TPoolAllocator::TPoolAllocator(int growthIncrement, int allocationAlignment) - : alignment(allocationAlignment), -#if !defined(ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC) - pageSize(growthIncrement), - freeList(0), - inUseList(0), - numCalls(0), - totalBytes(0), -#endif - mLocked(false) +TPoolAllocator::TPoolAllocator(int growthIncrement, int allocationAlignment) : + pageSize(growthIncrement), + alignment(allocationAlignment), + freeList(0), + inUseList(0), + numCalls(0), + totalBytes(0), + mLocked(false) { + // + // Don't allow page sizes we know are smaller than all common + // OS page sizes. + // + if (pageSize < 4*1024) + pageSize = 4*1024; + + // + // A large currentPageOffset indicates a new page needs to + // be obtained to allocate memory. + // + currentPageOffset = pageSize; + // // Adjust alignment to be at least pointer aligned and // power of 2. @@ -75,20 +86,6 @@ TPoolAllocator::TPoolAllocator(int growthIncrement, int allocationAlignment) alignment = a; alignmentMask = a - 1; -#if !defined(ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC) - // - // Don't allow page sizes we know are smaller than all common - // OS page sizes. - // - if (pageSize < 4 * 1024) - pageSize = 4 * 1024; - - // - // A large currentPageOffset indicates a new page needs to - // be obtained to allocate memory. - // - currentPageOffset = pageSize; - // // Align header skip // @@ -96,14 +93,10 @@ TPoolAllocator::TPoolAllocator(int growthIncrement, int allocationAlignment) if (headerSkip < sizeof(tHeader)) { headerSkip = (sizeof(tHeader) + alignmentMask) & ~alignmentMask; } -#else // !defined(ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC) - mStack.push_back({}); -#endif } TPoolAllocator::~TPoolAllocator() { -#if !defined(ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC) while (inUseList) { tHeader* next = inUseList->nextPage; inUseList->~tHeader(); @@ -120,16 +113,6 @@ TPoolAllocator::~TPoolAllocator() delete [] reinterpret_cast(freeList); freeList = next; } -#else // !defined(ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC) - for (auto &allocs : mStack) - { - for (auto alloc : allocs) - { - free(alloc); - } - } - mStack.clear(); -#endif } // Support MSVC++ 6.0 @@ -170,18 +153,14 @@ void TAllocation::checkGuardBlock(unsigned char* blockMem, unsigned char val, co void TPoolAllocator::push() { -#if !defined(ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC) tAllocState state = { currentPageOffset, inUseList }; - mStack.push_back(state); - + stack.push_back(state); + // // Indicate there is no current page to allocate from. // currentPageOffset = pageSize; -#else // !defined(ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC) - mStack.push_back({}); -#endif } // @@ -193,12 +172,11 @@ void TPoolAllocator::push() // void TPoolAllocator::pop() { - if (mStack.size() < 1) + if (stack.size() < 1) return; -#if !defined(ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC) - tHeader *page = mStack.back().page; - currentPageOffset = mStack.back().offset; + tHeader* page = stack.back().page; + currentPageOffset = stack.back().offset; while (inUseList != page) { // invoke destructor to free allocation list @@ -214,14 +192,7 @@ void TPoolAllocator::pop() inUseList = nextInUse; } - mStack.pop_back(); -#else // !defined(ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC) - for (auto &alloc : mStack.back()) - { - free(alloc); - } - mStack.pop_back(); -#endif + stack.pop_back(); } // @@ -230,7 +201,7 @@ void TPoolAllocator::pop() // void TPoolAllocator::popAll() { - while (mStack.size() > 0) + while (stack.size() > 0) pop(); } @@ -238,7 +209,6 @@ void* TPoolAllocator::allocate(size_t numBytes) { ASSERT(!mLocked); -#if !defined(ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC) // // Just keep some interesting statistics. // @@ -315,14 +285,6 @@ void* TPoolAllocator::allocate(size_t numBytes) currentPageOffset = (headerSkip + allocationSize + alignmentMask) & ~alignmentMask; return initializeAllocation(inUseList, ret, numBytes); -#else // !defined(ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC) - void *alloc = malloc(numBytes + alignmentMask); - mStack.back().push_back(alloc); - - intptr_t intAlloc = reinterpret_cast(alloc); - intAlloc = (intAlloc + alignmentMask) & ~alignmentMask; - return reinterpret_cast(intAlloc); -#endif } void TPoolAllocator::lock() diff --git a/gfx/angle/src/compiler/translator/PoolAlloc.h b/gfx/angle/src/compiler/translator/PoolAlloc.h index f15b3e05d..026e7a5c1 100755 --- a/gfx/angle/src/compiler/translator/PoolAlloc.h +++ b/gfx/angle/src/compiler/translator/PoolAlloc.h @@ -157,12 +157,7 @@ public: void lock(); void unlock(); - private: - size_t alignment; // all returned allocations will be aligned at - // this granularity, which will be a power of 2 - size_t alignmentMask; - -#if !defined(ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC) +protected: friend struct tHeader; struct tHeader { @@ -205,21 +200,20 @@ public: } size_t pageSize; // granularity of allocation from the OS + size_t alignment; // all returned allocations will be aligned at + // this granularity, which will be a power of 2 + size_t alignmentMask; size_t headerSkip; // amount of memory to skip to make room for the // header (basically, size of header, rounded // up to make it aligned size_t currentPageOffset; // next offset in top of inUseList to allocate from tHeader* freeList; // list of popped memory tHeader* inUseList; // list of all memory currently being used - tAllocStack mStack; // stack of where to allocate from, to partition pool + tAllocStack stack; // stack of where to allocate from, to partition pool int numCalls; // just an interesting statistic size_t totalBytes; // just an interesting statistic - -#else // !defined(ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC) - std::vector> mStack; -#endif - +private: TPoolAllocator& operator=(const TPoolAllocator&); // dont allow assignment operator TPoolAllocator(const TPoolAllocator&); // dont allow default copy constructor bool mLocked; diff --git a/gfx/angle/src/compiler/translator/PruneEmptyDeclarations.cpp b/gfx/angle/src/compiler/translator/PruneEmptyDeclarations.cpp index 7ec434796..8cbeb7dee 100755 --- a/gfx/angle/src/compiler/translator/PruneEmptyDeclarations.cpp +++ b/gfx/angle/src/compiler/translator/PruneEmptyDeclarations.cpp @@ -9,9 +9,6 @@ #include "compiler/translator/IntermNode.h" -namespace sh -{ - namespace { @@ -21,7 +18,7 @@ class PruneEmptyDeclarationsTraverser : private TIntermTraverser static void apply(TIntermNode *root); private: PruneEmptyDeclarationsTraverser(); - bool visitDeclaration(Visit, TIntermDeclaration *node) override; + bool visitAggregate(Visit, TIntermAggregate *node) override; }; void PruneEmptyDeclarationsTraverser::apply(TIntermNode *root) @@ -36,71 +33,65 @@ PruneEmptyDeclarationsTraverser::PruneEmptyDeclarationsTraverser() { } -bool PruneEmptyDeclarationsTraverser::visitDeclaration(Visit, TIntermDeclaration *node) +bool PruneEmptyDeclarationsTraverser::visitAggregate(Visit, TIntermAggregate *node) { - TIntermSequence *sequence = node->getSequence(); - if (sequence->size() >= 1) + if (node->getOp() == EOpDeclaration) { - TIntermSymbol *sym = sequence->front()->getAsSymbolNode(); - // Prune declarations without a variable name, unless it's an interface block declaration. - if (sym != nullptr && sym->getSymbol() == "" && !sym->isInterfaceBlock()) + TIntermSequence *sequence = node->getSequence(); + if (sequence->size() >= 1) { - if (sequence->size() > 1) - { - // Generate a replacement that will remove the empty declarator in the beginning of - // a declarator list. Example of a declaration that will be changed: - // float, a; - // will be changed to - // float a; - // This applies also to struct declarations. - TIntermSequence emptyReplacement; - mMultiReplacements.push_back( - NodeReplaceWithMultipleEntry(node, sym, emptyReplacement)); - } - else if (sym->getBasicType() != EbtStruct) + TIntermSymbol *sym = sequence->front()->getAsSymbolNode(); + // Prune declarations without a variable name, unless it's an interface block declaration. + if (sym != nullptr && sym->getSymbol() == "" && !sym->isInterfaceBlock()) { - // Single struct declarations may just declare the struct type and no variables, so - // they should not be pruned. All other single empty declarations can be pruned - // entirely. Example of an empty declaration that will be pruned: - // float; - TIntermSequence emptyReplacement; - TIntermBlock *parentAsBlock = getParentNode()->getAsBlock(); - // The declaration may be inside a block or in a loop init expression. - ASSERT(parentAsBlock != nullptr || getParentNode()->getAsLoopNode() != nullptr); - if (parentAsBlock) + if (sequence->size() > 1) { - mMultiReplacements.push_back( - NodeReplaceWithMultipleEntry(parentAsBlock, node, emptyReplacement)); + // Generate a replacement that will remove the empty declarator in the beginning of a declarator + // list. Example of a declaration that will be changed: + // float, a; + // will be changed to + // float a; + // This applies also to struct declarations. + TIntermSequence emptyReplacement; + mMultiReplacements.push_back(NodeReplaceWithMultipleEntry(node, sym, emptyReplacement)); } - else + else if (sym->getBasicType() != EbtStruct) { - queueReplacement(node, nullptr, OriginalNode::IS_DROPPED); + // Single struct declarations may just declare the struct type and no variables, so they should + // not be pruned. All other single empty declarations can be pruned entirely. Example of an empty + // declaration that will be pruned: + // float; + TIntermSequence emptyReplacement; + TIntermAggregate *parentAgg = getParentNode()->getAsAggregate(); + ASSERT(parentAgg != nullptr); + mMultiReplacements.push_back(NodeReplaceWithMultipleEntry(parentAgg, node, emptyReplacement)); } - } - else if (sym->getType().getQualifier() != EvqGlobal && - sym->getType().getQualifier() != EvqTemporary) - { - // We've hit an empty struct declaration with a qualifier, for example like - // this: - // const struct a { int i; }; - // NVIDIA GL driver version 367.27 doesn't accept this kind of declarations, so - // we convert the declaration to a regular struct declaration. This is okay, - // since ESSL 1.00 spec section 4.1.8 says about structs that "The optional - // qualifiers only apply to any declarators, and are not part of the type being - // defined for name." - - if (mInGlobalScope) - { - sym->getTypePointer()->setQualifier(EvqGlobal); - } - else + else if (sym->getType().getQualifier() != EvqGlobal && + sym->getType().getQualifier() != EvqTemporary) { - sym->getTypePointer()->setQualifier(EvqTemporary); + // We've hit an empty struct declaration with a qualifier, for example like + // this: + // const struct a { int i; }; + // NVIDIA GL driver version 367.27 doesn't accept this kind of declarations, so + // we convert the declaration to a regular struct declaration. This is okay, + // since ESSL 1.00 spec section 4.1.8 says about structs that "The optional + // qualifiers only apply to any declarators, and are not part of the type being + // defined for name." + + if (mInGlobalScope) + { + sym->getTypePointer()->setQualifier(EvqGlobal); + } + else + { + sym->getTypePointer()->setQualifier(EvqTemporary); + } } } } + return false; } - return false; + return true; } } // namespace @@ -109,5 +100,3 @@ void PruneEmptyDeclarations(TIntermNode *root) { PruneEmptyDeclarationsTraverser::apply(root); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/PruneEmptyDeclarations.h b/gfx/angle/src/compiler/translator/PruneEmptyDeclarations.h index f03657766..122e83090 100755 --- a/gfx/angle/src/compiler/translator/PruneEmptyDeclarations.h +++ b/gfx/angle/src/compiler/translator/PruneEmptyDeclarations.h @@ -8,11 +8,8 @@ #ifndef COMPILER_TRANSLATOR_PRUNEEMPTYDECLARATIONS_H_ #define COMPILER_TRANSLATOR_PRUNEEMPTYDECLARATIONS_H_ -namespace sh -{ class TIntermNode; void PruneEmptyDeclarations(TIntermNode *root); -} #endif // COMPILER_TRANSLATOR_PRUNEEMPTYDECLARATIONS_H_ diff --git a/gfx/angle/src/compiler/translator/QualifierTypes.cpp b/gfx/angle/src/compiler/translator/QualifierTypes.cpp deleted file mode 100644 index 302f5177d..000000000 --- a/gfx/angle/src/compiler/translator/QualifierTypes.cpp +++ /dev/null @@ -1,727 +0,0 @@ -// -// Copyright (c) 2002-2016 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 "compiler/translator/QualifierTypes.h" - -#include "compiler/translator/Diagnostics.h" - -#include - -namespace sh -{ - -namespace -{ - -// GLSL ES 3.10 does not impose a strict order on type qualifiers and allows multiple layout -// declarations. -// GLSL ES 3.10 Revision 4, 4.10 Order of Qualification -bool AreTypeQualifierChecksRelaxed(int shaderVersion) -{ - return shaderVersion >= 310; -} - -bool IsScopeQualifier(TQualifier qualifier) -{ - return qualifier == EvqGlobal || qualifier == EvqTemporary; -} - -bool IsScopeQualifierWrapper(const TQualifierWrapperBase *qualifier) -{ - if (qualifier->getType() != QtStorage) - return false; - const TStorageQualifierWrapper *storageQualifier = - static_cast(qualifier); - TQualifier q = storageQualifier->getQualifier(); - return IsScopeQualifier(q); -} - -// Returns true if the invariant for the qualifier sequence holds -bool IsInvariantCorrect(const TTypeQualifierBuilder::QualifierSequence &qualifiers) -{ - // We should have at least one qualifier. - // The first qualifier always tells the scope. - return qualifiers.size() >= 1 && IsScopeQualifierWrapper(qualifiers[0]); -} - -// Returns true if there are qualifiers which have been specified multiple times -// If areQualifierChecksRelaxed is set to true, then layout qualifier repetition is allowed. -bool HasRepeatingQualifiers(const TTypeQualifierBuilder::QualifierSequence &qualifiers, - bool areQualifierChecksRelaxed, - std::string *errorMessage) -{ - bool invariantFound = false; - bool precisionFound = false; - bool layoutFound = false; - bool interpolationFound = false; - - unsigned int locationsSpecified = 0; - bool isOut = false; - - // The iteration starts from one since the first qualifier only reveals the scope of the - // expression. It is inserted first whenever the sequence gets created. - for (size_t i = 1; i < qualifiers.size(); ++i) - { - switch (qualifiers[i]->getType()) - { - case QtInvariant: - { - if (invariantFound) - { - *errorMessage = "The invariant qualifier specified multiple times."; - return true; - } - invariantFound = true; - break; - } - case QtPrecision: - { - if (precisionFound) - { - *errorMessage = "The precision qualifier specified multiple times."; - return true; - } - precisionFound = true; - break; - } - case QtLayout: - { - if (layoutFound && !areQualifierChecksRelaxed) - { - *errorMessage = "The layout qualifier specified multiple times."; - return true; - } - if (invariantFound && !areQualifierChecksRelaxed) - { - // This combination is not correct according to the syntax specified in the - // formal grammar in the ESSL 3.00 spec. In ESSL 3.10 the grammar does not have - // a similar restriction. - *errorMessage = - "The layout qualifier and invariant qualifier cannot coexist in the same " - "declaration according to the grammar."; - return true; - } - layoutFound = true; - const TLayoutQualifier ¤tQualifier = - static_cast(qualifiers[i])->getQualifier(); - locationsSpecified += currentQualifier.locationsSpecified; - break; - } - case QtInterpolation: - { - // 'centroid' is treated as a storage qualifier - // 'flat centroid' will be squashed to 'flat' - // 'smooth centroid' will be squashed to 'centroid' - if (interpolationFound) - { - *errorMessage = "The interpolation qualifier specified multiple times."; - return true; - } - interpolationFound = true; - break; - } - case QtStorage: - { - // Go over all of the storage qualifiers up until the current one and check for - // repetitions. - TQualifier currentQualifier = - static_cast(qualifiers[i])->getQualifier(); - if (currentQualifier == EvqVertexOut || currentQualifier == EvqFragmentOut) - { - isOut = true; - } - for (size_t j = 1; j < i; ++j) - { - if (qualifiers[j]->getType() == QtStorage) - { - const TStorageQualifierWrapper *previousQualifierWrapper = - static_cast(qualifiers[j]); - TQualifier previousQualifier = previousQualifierWrapper->getQualifier(); - if (currentQualifier == previousQualifier) - { - *errorMessage = previousQualifierWrapper->getQualifierString().c_str(); - *errorMessage += " specified multiple times"; - return true; - } - } - } - break; - } - case QtMemory: - { - // Go over all of the memory qualifiers up until the current one and check for - // repetitions. - // Having both readonly and writeonly in a sequence is valid. - // GLSL ES 3.10 Revision 4, 4.9 Memory Access Qualifiers - TQualifier currentQualifier = - static_cast(qualifiers[i])->getQualifier(); - for (size_t j = 1; j < i; ++j) - { - if (qualifiers[j]->getType() == QtMemory) - { - const TMemoryQualifierWrapper *previousQualifierWrapper = - static_cast(qualifiers[j]); - TQualifier previousQualifier = previousQualifierWrapper->getQualifier(); - if (currentQualifier == previousQualifier) - { - *errorMessage = previousQualifierWrapper->getQualifierString().c_str(); - *errorMessage += " specified multiple times"; - return true; - } - } - } - break; - } - default: - UNREACHABLE(); - } - } - - if (locationsSpecified > 1 && isOut) - { - // GLSL ES 3.00.6 section 4.3.8.2 Output Layout Qualifiers - // GLSL ES 3.10 section 4.4.2 Output Layout Qualifiers - // "The qualifier may appear at most once within a declaration." - *errorMessage = "Output layout location specified multiple times."; - return true; - } - - return false; -} - -// GLSL ES 3.00_6, 4.7 Order of Qualification -// The correct order of qualifiers is: -// invariant-qualifier interpolation-qualifier storage-qualifier precision-qualifier -// layout-qualifier has to be before storage-qualifier. -bool AreQualifiersInOrder(const TTypeQualifierBuilder::QualifierSequence &qualifiers, - std::string *errorMessage) -{ - bool foundInterpolation = false; - bool foundStorage = false; - bool foundPrecision = false; - for (size_t i = 1; i < qualifiers.size(); ++i) - { - switch (qualifiers[i]->getType()) - { - case QtInvariant: - if (foundInterpolation || foundStorage || foundPrecision) - { - *errorMessage = "The invariant qualifier has to be first in the expression."; - return false; - } - break; - case QtInterpolation: - if (foundStorage) - { - *errorMessage = "Storage qualifiers have to be after interpolation qualifiers."; - return false; - } - else if (foundPrecision) - { - *errorMessage = - "Precision qualifiers have to be after interpolation qualifiers."; - return false; - } - foundInterpolation = true; - break; - case QtLayout: - if (foundStorage) - { - *errorMessage = "Storage qualifiers have to be after layout qualifiers."; - return false; - } - else if (foundPrecision) - { - *errorMessage = "Precision qualifiers have to be after layout qualifiers."; - return false; - } - break; - case QtStorage: - if (foundPrecision) - { - *errorMessage = "Precision qualifiers have to be after storage qualifiers."; - return false; - } - foundStorage = true; - break; - case QtMemory: - if (foundPrecision) - { - *errorMessage = "Precision qualifiers have to be after memory qualifiers."; - return false; - } - break; - case QtPrecision: - foundPrecision = true; - break; - default: - UNREACHABLE(); - } - } - return true; -} - -struct QualifierComparator -{ - bool operator()(const TQualifierWrapperBase *q1, const TQualifierWrapperBase *q2) - { - return q1->getRank() < q2->getRank(); - } -}; - -void SortSequence(TTypeQualifierBuilder::QualifierSequence &qualifiers) -{ - // We need a stable sorting algorithm since the order of layout-qualifier declarations matter. - // The sorting starts from index 1, instead of 0, since the element at index 0 tells the scope - // and we always want it to be first. - std::stable_sort(qualifiers.begin() + 1, qualifiers.end(), QualifierComparator()); -} - -// Handles the joining of storage qualifiers for variables. -bool JoinVariableStorageQualifier(TQualifier *joinedQualifier, TQualifier storageQualifier) -{ - switch (*joinedQualifier) - { - case EvqGlobal: - *joinedQualifier = storageQualifier; - break; - case EvqTemporary: - { - switch (storageQualifier) - { - case EvqConst: - *joinedQualifier = storageQualifier; - break; - default: - return false; - } - break; - } - case EvqSmooth: - { - switch (storageQualifier) - { - case EvqCentroid: - *joinedQualifier = EvqCentroid; - break; - case EvqVertexOut: - *joinedQualifier = EvqSmoothOut; - break; - case EvqFragmentIn: - *joinedQualifier = EvqSmoothIn; - break; - default: - return false; - } - break; - } - case EvqFlat: - { - switch (storageQualifier) - { - case EvqCentroid: - *joinedQualifier = EvqFlat; - break; - case EvqVertexOut: - *joinedQualifier = EvqFlatOut; - break; - case EvqFragmentIn: - *joinedQualifier = EvqFlatIn; - break; - default: - return false; - } - break; - } - case EvqCentroid: - { - switch (storageQualifier) - { - case EvqVertexOut: - *joinedQualifier = EvqCentroidOut; - break; - case EvqFragmentIn: - *joinedQualifier = EvqCentroidIn; - break; - default: - return false; - } - break; - } - default: - return false; - } - return true; -} - -// Handles the joining of storage qualifiers for a parameter in a function. -bool JoinParameterStorageQualifier(TQualifier *joinedQualifier, TQualifier storageQualifier) -{ - switch (*joinedQualifier) - { - case EvqTemporary: - *joinedQualifier = storageQualifier; - break; - case EvqConst: - { - switch (storageQualifier) - { - case EvqIn: - *joinedQualifier = EvqConstReadOnly; - break; - default: - return false; - } - break; - } - default: - return false; - } - return true; -} - -bool JoinMemoryQualifier(TMemoryQualifier *joinedMemoryQualifier, TQualifier memoryQualifier) -{ - switch (memoryQualifier) - { - case EvqReadOnly: - joinedMemoryQualifier->readonly = true; - break; - case EvqWriteOnly: - joinedMemoryQualifier->writeonly = true; - break; - case EvqCoherent: - joinedMemoryQualifier->coherent = true; - break; - case EvqRestrict: - joinedMemoryQualifier->restrictQualifier = true; - break; - case EvqVolatile: - // Variables having the volatile qualifier are automatcally treated as coherent as well. - // GLSL ES 3.10, Revision 4, 4.9 Memory Access Qualifiers - joinedMemoryQualifier->volatileQualifier = true; - joinedMemoryQualifier->coherent = true; - break; - default: - UNREACHABLE(); - } - return true; -} - -TTypeQualifier GetVariableTypeQualifierFromSortedSequence( - const TTypeQualifierBuilder::QualifierSequence &sortedSequence, - TDiagnostics *diagnostics) -{ - TTypeQualifier typeQualifier( - static_cast(sortedSequence[0])->getQualifier(), - sortedSequence[0]->getLine()); - for (size_t i = 1; i < sortedSequence.size(); ++i) - { - const TQualifierWrapperBase *qualifier = sortedSequence[i]; - bool isQualifierValid = false; - switch (qualifier->getType()) - { - case QtInvariant: - isQualifierValid = true; - typeQualifier.invariant = true; - break; - case QtInterpolation: - { - switch (typeQualifier.qualifier) - { - case EvqGlobal: - isQualifierValid = true; - typeQualifier.qualifier = - static_cast(qualifier) - ->getQualifier(); - break; - default: - isQualifierValid = false; - } - break; - } - case QtLayout: - { - const TLayoutQualifierWrapper *layoutQualifierWrapper = - static_cast(qualifier); - isQualifierValid = true; - typeQualifier.layoutQualifier = sh::JoinLayoutQualifiers( - typeQualifier.layoutQualifier, layoutQualifierWrapper->getQualifier(), - layoutQualifierWrapper->getLine(), diagnostics); - break; - } - case QtStorage: - isQualifierValid = JoinVariableStorageQualifier( - &typeQualifier.qualifier, - static_cast(qualifier)->getQualifier()); - break; - case QtPrecision: - isQualifierValid = true; - typeQualifier.precision = - static_cast(qualifier)->getQualifier(); - ASSERT(typeQualifier.precision != EbpUndefined); - break; - case QtMemory: - isQualifierValid = JoinMemoryQualifier( - &typeQualifier.memoryQualifier, - static_cast(qualifier)->getQualifier()); - break; - default: - UNREACHABLE(); - } - if (!isQualifierValid) - { - const TString &qualifierString = qualifier->getQualifierString(); - diagnostics->error(qualifier->getLine(), "invalid qualifier combination", - qualifierString.c_str(), ""); - break; - } - } - return typeQualifier; -} - -TTypeQualifier GetParameterTypeQualifierFromSortedSequence( - const TTypeQualifierBuilder::QualifierSequence &sortedSequence, - TDiagnostics *diagnostics) -{ - TTypeQualifier typeQualifier(EvqTemporary, sortedSequence[0]->getLine()); - for (size_t i = 1; i < sortedSequence.size(); ++i) - { - const TQualifierWrapperBase *qualifier = sortedSequence[i]; - bool isQualifierValid = false; - switch (qualifier->getType()) - { - case QtInvariant: - case QtInterpolation: - case QtLayout: - break; - case QtMemory: - isQualifierValid = JoinMemoryQualifier( - &typeQualifier.memoryQualifier, - static_cast(qualifier)->getQualifier()); - break; - case QtStorage: - isQualifierValid = JoinParameterStorageQualifier( - &typeQualifier.qualifier, - static_cast(qualifier)->getQualifier()); - break; - case QtPrecision: - isQualifierValid = true; - typeQualifier.precision = - static_cast(qualifier)->getQualifier(); - ASSERT(typeQualifier.precision != EbpUndefined); - break; - default: - UNREACHABLE(); - } - if (!isQualifierValid) - { - const TString &qualifierString = qualifier->getQualifierString(); - diagnostics->error(qualifier->getLine(), "invalid parameter qualifier", - qualifierString.c_str(), ""); - break; - } - } - - switch (typeQualifier.qualifier) - { - case EvqIn: - case EvqConstReadOnly: // const in - case EvqOut: - case EvqInOut: - break; - case EvqConst: - typeQualifier.qualifier = EvqConstReadOnly; - break; - case EvqTemporary: - // no qualifier has been specified, set it to EvqIn which is the default - typeQualifier.qualifier = EvqIn; - break; - default: - diagnostics->error(sortedSequence[0]->getLine(), "Invalid parameter qualifier ", - getQualifierString(typeQualifier.qualifier), ""); - } - return typeQualifier; -} -} // namespace - -TLayoutQualifier JoinLayoutQualifiers(TLayoutQualifier leftQualifier, - TLayoutQualifier rightQualifier, - const TSourceLoc &rightQualifierLocation, - TDiagnostics *diagnostics) -{ - TLayoutQualifier joinedQualifier = leftQualifier; - - if (rightQualifier.location != -1) - { - joinedQualifier.location = rightQualifier.location; - ++joinedQualifier.locationsSpecified; - } - if (rightQualifier.matrixPacking != EmpUnspecified) - { - joinedQualifier.matrixPacking = rightQualifier.matrixPacking; - } - if (rightQualifier.blockStorage != EbsUnspecified) - { - joinedQualifier.blockStorage = rightQualifier.blockStorage; - } - - for (size_t i = 0u; i < rightQualifier.localSize.size(); ++i) - { - if (rightQualifier.localSize[i] != -1) - { - if (joinedQualifier.localSize[i] != -1 && - joinedQualifier.localSize[i] != rightQualifier.localSize[i]) - { - diagnostics->error(rightQualifierLocation, - "Cannot have multiple different work group size specifiers", - getWorkGroupSizeString(i), ""); - } - joinedQualifier.localSize[i] = rightQualifier.localSize[i]; - } - } - - if (rightQualifier.imageInternalFormat != EiifUnspecified) - { - joinedQualifier.imageInternalFormat = rightQualifier.imageInternalFormat; - } - - return joinedQualifier; -} - -unsigned int TInvariantQualifierWrapper::getRank() const -{ - return 0u; -} - -unsigned int TInterpolationQualifierWrapper::getRank() const -{ - return 1u; -} - -unsigned int TLayoutQualifierWrapper::getRank() const -{ - return 2u; -} - -unsigned int TStorageQualifierWrapper::getRank() const -{ - // Force the 'centroid' auxilary storage qualifier to be always first among all storage - // qualifiers. - if (mStorageQualifier == EvqCentroid) - { - return 3u; - } - else - { - return 4u; - } -} - -unsigned int TMemoryQualifierWrapper::getRank() const -{ - return 4u; -} - -unsigned int TPrecisionQualifierWrapper::getRank() const -{ - return 5u; -} - -TTypeQualifier::TTypeQualifier(TQualifier scope, const TSourceLoc &loc) - : layoutQualifier(TLayoutQualifier::create()), - memoryQualifier(TMemoryQualifier::create()), - precision(EbpUndefined), - qualifier(scope), - invariant(false), - line(loc) -{ - ASSERT(IsScopeQualifier(qualifier)); -} - -TTypeQualifierBuilder::TTypeQualifierBuilder(const TStorageQualifierWrapper *scope, - int shaderVersion) - : mShaderVersion(shaderVersion) -{ - ASSERT(IsScopeQualifier(scope->getQualifier())); - mQualifiers.push_back(scope); -} - -void TTypeQualifierBuilder::appendQualifier(const TQualifierWrapperBase *qualifier) -{ - mQualifiers.push_back(qualifier); -} - -bool TTypeQualifierBuilder::checkSequenceIsValid(TDiagnostics *diagnostics) const -{ - bool areQualifierChecksRelaxed = AreTypeQualifierChecksRelaxed(mShaderVersion); - std::string errorMessage; - if (HasRepeatingQualifiers(mQualifiers, areQualifierChecksRelaxed, &errorMessage)) - { - diagnostics->error(mQualifiers[0]->getLine(), "qualifier sequence", errorMessage.c_str(), - ""); - return false; - } - - if (!areQualifierChecksRelaxed && !AreQualifiersInOrder(mQualifiers, &errorMessage)) - { - diagnostics->error(mQualifiers[0]->getLine(), "qualifier sequence", errorMessage.c_str(), - ""); - return false; - } - - return true; -} - -TTypeQualifier TTypeQualifierBuilder::getParameterTypeQualifier(TDiagnostics *diagnostics) const -{ - ASSERT(IsInvariantCorrect(mQualifiers)); - ASSERT(static_cast(mQualifiers[0])->getQualifier() == - EvqTemporary); - - if (!checkSequenceIsValid(diagnostics)) - { - return TTypeQualifier(EvqTemporary, mQualifiers[0]->getLine()); - } - - // If the qualifier checks are relaxed, then it is easier to sort the qualifiers so - // that the order imposed by the GLSL ES 3.00 spec is kept. Then we can use the same code to - // combine the qualifiers. - if (AreTypeQualifierChecksRelaxed(mShaderVersion)) - { - // Copy the qualifier sequence so that we can sort them. - QualifierSequence sortedQualifierSequence = mQualifiers; - SortSequence(sortedQualifierSequence); - return GetParameterTypeQualifierFromSortedSequence(sortedQualifierSequence, diagnostics); - } - return GetParameterTypeQualifierFromSortedSequence(mQualifiers, diagnostics); -} - -TTypeQualifier TTypeQualifierBuilder::getVariableTypeQualifier(TDiagnostics *diagnostics) const -{ - ASSERT(IsInvariantCorrect(mQualifiers)); - - if (!checkSequenceIsValid(diagnostics)) - { - return TTypeQualifier( - static_cast(mQualifiers[0])->getQualifier(), - mQualifiers[0]->getLine()); - } - - // If the qualifier checks are relaxed, then it is easier to sort the qualifiers so - // that the order imposed by the GLSL ES 3.00 spec is kept. Then we can use the same code to - // combine the qualifiers. - if (AreTypeQualifierChecksRelaxed(mShaderVersion)) - { - // Copy the qualifier sequence so that we can sort them. - QualifierSequence sortedQualifierSequence = mQualifiers; - SortSequence(sortedQualifierSequence); - return GetVariableTypeQualifierFromSortedSequence(sortedQualifierSequence, diagnostics); - } - return GetVariableTypeQualifierFromSortedSequence(mQualifiers, diagnostics); -} - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/QualifierTypes.h b/gfx/angle/src/compiler/translator/QualifierTypes.h deleted file mode 100644 index 10bdeed89..000000000 --- a/gfx/angle/src/compiler/translator/QualifierTypes.h +++ /dev/null @@ -1,191 +0,0 @@ -// -// Copyright (c) 2002-2016 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. -// - -#ifndef COMPILER_TRANSLATOR_QUALIFIER_TYPES_H_ -#define COMPILER_TRANSLATOR_QUALIFIER_TYPES_H_ - -#include "common/angleutils.h" -#include "compiler/translator/BaseTypes.h" -#include "compiler/translator/Types.h" - -namespace sh -{ -class TDiagnostics; - -TLayoutQualifier JoinLayoutQualifiers(TLayoutQualifier leftQualifier, - TLayoutQualifier rightQualifier, - const TSourceLoc &rightQualifierLocation, - TDiagnostics *diagnostics); - -enum TQualifierType -{ - QtInvariant, - QtInterpolation, - QtLayout, - QtStorage, - QtPrecision, - QtMemory -}; - -class TQualifierWrapperBase : angle::NonCopyable -{ - public: - POOL_ALLOCATOR_NEW_DELETE(); - TQualifierWrapperBase(const TSourceLoc &line) : mLine(line) {} - virtual ~TQualifierWrapperBase(){}; - virtual TQualifierType getType() const = 0; - virtual TString getQualifierString() const = 0; - virtual unsigned int getRank() const = 0; - const TSourceLoc &getLine() const { return mLine; } - private: - TSourceLoc mLine; -}; - -class TInvariantQualifierWrapper final : public TQualifierWrapperBase -{ - public: - TInvariantQualifierWrapper(const TSourceLoc &line) : TQualifierWrapperBase(line) {} - ~TInvariantQualifierWrapper() {} - - TQualifierType getType() const { return QtInvariant; } - TString getQualifierString() const { return "invariant"; } - unsigned int getRank() const; -}; - -class TInterpolationQualifierWrapper final : public TQualifierWrapperBase -{ - public: - TInterpolationQualifierWrapper(TQualifier interpolationQualifier, const TSourceLoc &line) - : TQualifierWrapperBase(line), mInterpolationQualifier(interpolationQualifier) - { - } - ~TInterpolationQualifierWrapper() {} - - TQualifierType getType() const { return QtInterpolation; } - TString getQualifierString() const { return sh::getQualifierString(mInterpolationQualifier); } - TQualifier getQualifier() const { return mInterpolationQualifier; } - unsigned int getRank() const; - - private: - TQualifier mInterpolationQualifier; -}; - -class TLayoutQualifierWrapper final : public TQualifierWrapperBase -{ - public: - TLayoutQualifierWrapper(TLayoutQualifier layoutQualifier, const TSourceLoc &line) - : TQualifierWrapperBase(line), mLayoutQualifier(layoutQualifier) - { - } - ~TLayoutQualifierWrapper() {} - - TQualifierType getType() const { return QtLayout; } - TString getQualifierString() const { return "layout"; } - const TLayoutQualifier &getQualifier() const { return mLayoutQualifier; } - unsigned int getRank() const; - - private: - TLayoutQualifier mLayoutQualifier; -}; - -class TStorageQualifierWrapper final : public TQualifierWrapperBase -{ - public: - TStorageQualifierWrapper(TQualifier storageQualifier, const TSourceLoc &line) - : TQualifierWrapperBase(line), mStorageQualifier(storageQualifier) - { - } - ~TStorageQualifierWrapper() {} - - TQualifierType getType() const { return QtStorage; } - TString getQualifierString() const { return sh::getQualifierString(mStorageQualifier); } - TQualifier getQualifier() const { return mStorageQualifier; } - unsigned int getRank() const; - - private: - TQualifier mStorageQualifier; -}; - -class TPrecisionQualifierWrapper final : public TQualifierWrapperBase -{ - public: - TPrecisionQualifierWrapper(TPrecision precisionQualifier, const TSourceLoc &line) - : TQualifierWrapperBase(line), mPrecisionQualifier(precisionQualifier) - { - } - ~TPrecisionQualifierWrapper() {} - - TQualifierType getType() const { return QtPrecision; } - TString getQualifierString() const { return sh::getPrecisionString(mPrecisionQualifier); } - TPrecision getQualifier() const { return mPrecisionQualifier; } - unsigned int getRank() const; - - private: - TPrecision mPrecisionQualifier; -}; - -class TMemoryQualifierWrapper final : public TQualifierWrapperBase -{ - public: - TMemoryQualifierWrapper(TQualifier memoryQualifier, const TSourceLoc &line) - : TQualifierWrapperBase(line), mMemoryQualifier(memoryQualifier) - { - } - ~TMemoryQualifierWrapper() {} - - TQualifierType getType() const { return QtMemory; } - TString getQualifierString() const { return sh::getQualifierString(mMemoryQualifier); } - TQualifier getQualifier() const { return mMemoryQualifier; } - unsigned int getRank() const; - - private: - TQualifier mMemoryQualifier; -}; - -// TTypeQualifier tightly covers type_qualifier from the grammar -struct TTypeQualifier -{ - // initializes all of the qualifiers and sets the scope - TTypeQualifier(TQualifier scope, const TSourceLoc &loc); - - TLayoutQualifier layoutQualifier; - TMemoryQualifier memoryQualifier; - TPrecision precision; - TQualifier qualifier; - bool invariant; - TSourceLoc line; -}; - -// TTypeQualifierBuilder contains all of the qualifiers when type_qualifier gets parsed. -// It is to be used to validate the qualifier sequence and build a TTypeQualifier from it. -class TTypeQualifierBuilder : angle::NonCopyable -{ - public: - using QualifierSequence = TVector; - - public: - POOL_ALLOCATOR_NEW_DELETE(); - TTypeQualifierBuilder(const TStorageQualifierWrapper *scope, int shaderVersion); - // Adds the passed qualifier to the end of the sequence. - void appendQualifier(const TQualifierWrapperBase *qualifier); - // Checks for the order of qualification and repeating qualifiers. - bool checkSequenceIsValid(TDiagnostics *diagnostics) const; - // Goes over the qualifier sequence and parses it to form a type qualifier for a function - // parameter. - // The returned object is initialized even if the parsing fails. - TTypeQualifier getParameterTypeQualifier(TDiagnostics *diagnostics) const; - // Goes over the qualifier sequence and parses it to form a type qualifier for a variable. - // The returned object is initialized even if the parsing fails. - TTypeQualifier getVariableTypeQualifier(TDiagnostics *diagnostics) const; - - private: - QualifierSequence mQualifiers; - int mShaderVersion; -}; - -} // namespace sh - -#endif // COMPILER_TRANSLATOR_QUALIFIER_TYPES_H_ diff --git a/gfx/angle/src/compiler/translator/RecordConstantPrecision.cpp b/gfx/angle/src/compiler/translator/RecordConstantPrecision.cpp index 6b8515a2c..af1d1d1a3 100755 --- a/gfx/angle/src/compiler/translator/RecordConstantPrecision.cpp +++ b/gfx/angle/src/compiler/translator/RecordConstantPrecision.cpp @@ -18,9 +18,6 @@ #include "compiler/translator/InfoSink.h" #include "compiler/translator/IntermNode.h" -namespace sh -{ - namespace { @@ -48,11 +45,6 @@ RecordConstantPrecisionTraverser::RecordConstantPrecisionTraverser() bool RecordConstantPrecisionTraverser::operandAffectsParentOperationPrecision(TIntermTyped *operand) { - if (getParentNode()->getAsCaseNode() || getParentNode()->getAsBlock()) - { - return false; - } - const TIntermBinary *parentAsBinary = getParentNode()->getAsBinaryNode(); if (parentAsBinary != nullptr) { @@ -163,5 +155,3 @@ void RecordConstantPrecision(TIntermNode *root, unsigned int *temporaryIndex) } while (traverser.foundHigherPrecisionConstant()); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/RecordConstantPrecision.h b/gfx/angle/src/compiler/translator/RecordConstantPrecision.h index a62831e22..2cd401b41 100755 --- a/gfx/angle/src/compiler/translator/RecordConstantPrecision.h +++ b/gfx/angle/src/compiler/translator/RecordConstantPrecision.h @@ -16,11 +16,8 @@ #ifndef COMPILER_TRANSLATOR_RECORDCONSTANTPRECISION_H_ #define COMPILER_TRANSLATOR_RECORDCONSTANTPRECISION_H_ -namespace sh -{ class TIntermNode; void RecordConstantPrecision(TIntermNode *root, unsigned int *temporaryIndex); -} // namespace sh #endif // COMPILER_TRANSLATOR_RECORDCONSTANTPRECISION_H_ diff --git a/gfx/angle/src/compiler/translator/RegenerateStructNames.cpp b/gfx/angle/src/compiler/translator/RegenerateStructNames.cpp index a01d79abe..5e0db2ad2 100755 --- a/gfx/angle/src/compiler/translator/RegenerateStructNames.cpp +++ b/gfx/angle/src/compiler/translator/RegenerateStructNames.cpp @@ -7,9 +7,6 @@ #include "common/debug.h" #include "compiler/translator/RegenerateStructNames.h" -namespace sh -{ - void RegenerateStructNames::visitSymbol(TIntermSymbol *symbol) { ASSERT(symbol); @@ -61,16 +58,25 @@ void RegenerateStructNames::visitSymbol(TIntermSymbol *symbol) userType->setName(tmp); } -bool RegenerateStructNames::visitBlock(Visit, TIntermBlock *block) +bool RegenerateStructNames::visitAggregate(Visit, TIntermAggregate *aggregate) { - ++mScopeDepth; - TIntermSequence &sequence = *(block->getSequence()); - for (TIntermNode *node : sequence) + ASSERT(aggregate); + switch (aggregate->getOp()) { - node->traverse(this); + case EOpSequence: + ++mScopeDepth; + { + TIntermSequence &sequence = *(aggregate->getSequence()); + for (size_t ii = 0; ii < sequence.size(); ++ii) + { + TIntermNode *node = sequence[ii]; + ASSERT(node != NULL); + node->traverse(this); + } + } + --mScopeDepth; + return false; + default: + return true; } - --mScopeDepth; - return false; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/RegenerateStructNames.h b/gfx/angle/src/compiler/translator/RegenerateStructNames.h index 86c5060b3..3b98e5d70 100755 --- a/gfx/angle/src/compiler/translator/RegenerateStructNames.h +++ b/gfx/angle/src/compiler/translator/RegenerateStructNames.h @@ -12,9 +12,6 @@ #include -namespace sh -{ - class RegenerateStructNames : public TIntermTraverser { public: @@ -27,7 +24,7 @@ class RegenerateStructNames : public TIntermTraverser protected: void visitSymbol(TIntermSymbol *) override; - bool visitBlock(Visit, TIntermBlock *block) override; + bool visitAggregate(Visit, TIntermAggregate *) override; private: const TSymbolTable &mSymbolTable; @@ -41,6 +38,4 @@ class RegenerateStructNames : public TIntermTraverser std::set mDeclaredGlobalStructs; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_REGENERATESTRUCTNAMES_H_ diff --git a/gfx/angle/src/compiler/translator/RemoveDynamicIndexing.cpp b/gfx/angle/src/compiler/translator/RemoveDynamicIndexing.cpp index 31914dcf3..37955e736 100755 --- a/gfx/angle/src/compiler/translator/RemoveDynamicIndexing.cpp +++ b/gfx/angle/src/compiler/translator/RemoveDynamicIndexing.cpp @@ -14,9 +14,6 @@ #include "compiler/translator/IntermNodePatternMatcher.h" #include "compiler/translator/SymbolTable.h" -namespace sh -{ - namespace { @@ -95,15 +92,21 @@ TIntermBinary *CreateIndexDirectBaseSymbolNode(const TType &indexedType, const int index, TQualifier baseQualifier) { + TIntermBinary *indexNode = new TIntermBinary(EOpIndexDirect); + indexNode->setType(fieldType); TIntermSymbol *baseSymbol = CreateBaseSymbol(indexedType, baseQualifier); - TIntermBinary *indexNode = - new TIntermBinary(EOpIndexDirect, baseSymbol, TIntermTyped::CreateIndexNode(index)); + indexNode->setLeft(baseSymbol); + indexNode->setRight(CreateIntConstantNode(index)); return indexNode; } TIntermBinary *CreateAssignValueSymbolNode(TIntermTyped *targetNode, const TType &assignedValueType) { - return new TIntermBinary(EOpAssign, targetNode, CreateValueSymbol(assignedValueType)); + TIntermBinary *assignNode = new TIntermBinary(EOpAssign); + assignNode->setType(assignedValueType); + assignNode->setLeft(targetNode); + assignNode->setRight(CreateValueSymbol(assignedValueType)); + return assignNode; } TIntermTyped *EnsureSignedInt(TIntermTyped *node) @@ -175,7 +178,7 @@ TType GetFieldType(const TType &indexedType) // base[1] = value; // } // Note that else is not used in above functions to avoid the RewriteElseBlocks transformation. -TIntermFunctionDefinition *GetIndexFunctionDefinition(TType type, bool write) +TIntermAggregate *GetIndexFunctionDefinition(TType type, bool write) { ASSERT(!type.isArray()); // Conservatively use highp here, even if the indexed type is not highp. That way the code can't @@ -183,6 +186,8 @@ TIntermFunctionDefinition *GetIndexFunctionDefinition(TType type, bool write) // highp values are being indexed in the shader. For HLSL precision doesn't matter, but in // principle this code could be used with multiple backends. type.setPrecision(EbpHigh); + TIntermAggregate *indexingFunction = new TIntermAggregate(EOpFunction); + indexingFunction->setNameObj(GetIndexFunctionName(type, write)); TType fieldType = GetFieldType(type); int numCases = 0; @@ -194,6 +199,14 @@ TIntermFunctionDefinition *GetIndexFunctionDefinition(TType type, bool write) { numCases = type.getNominalSize(); } + if (write) + { + indexingFunction->setType(TType(EbtVoid)); + } + else + { + indexingFunction->setType(fieldType); + } TIntermAggregate *paramsNode = new TIntermAggregate(EOpParameters); TQualifier baseQualifier = EvqInOut; @@ -208,8 +221,9 @@ TIntermFunctionDefinition *GetIndexFunctionDefinition(TType type, bool write) TIntermSymbol *valueParam = CreateValueSymbol(fieldType); paramsNode->getSequence()->push_back(valueParam); } + indexingFunction->getSequence()->push_back(paramsNode); - TIntermBlock *statementList = new TIntermBlock(); + TIntermAggregate *statementList = new TIntermAggregate(EOpSequence); for (int i = 0; i < numCases; ++i) { TIntermCase *caseNode = new TIntermCase(CreateIntConstantNode(i)); @@ -239,17 +253,18 @@ TIntermFunctionDefinition *GetIndexFunctionDefinition(TType type, bool write) TIntermSwitch *switchNode = new TIntermSwitch(CreateIndexSymbol(), statementList); - TIntermBlock *bodyNode = new TIntermBlock(); + TIntermAggregate *bodyNode = new TIntermAggregate(EOpSequence); bodyNode->getSequence()->push_back(switchNode); - TIntermBinary *cond = - new TIntermBinary(EOpLessThan, CreateIndexSymbol(), CreateIntConstantNode(0)); + TIntermBinary *cond = new TIntermBinary(EOpLessThan); cond->setType(TType(EbtBool, EbpUndefined)); + cond->setLeft(CreateIndexSymbol()); + cond->setRight(CreateIntConstantNode(0)); // Two blocks: one accesses (either reads or writes) the first element and returns, // the other accesses the last element. - TIntermBlock *useFirstBlock = new TIntermBlock(); - TIntermBlock *useLastBlock = new TIntermBlock(); + TIntermAggregate *useFirstBlock = new TIntermAggregate(EOpSequence); + TIntermAggregate *useLastBlock = new TIntermAggregate(EOpSequence); TIntermBinary *indexFirstNode = CreateIndexDirectBaseSymbolNode(type, fieldType, 0, baseQualifier); TIntermBinary *indexLastNode = @@ -272,20 +287,12 @@ TIntermFunctionDefinition *GetIndexFunctionDefinition(TType type, bool write) TIntermBranch *returnLastNode = new TIntermBranch(EOpReturn, indexLastNode); useLastBlock->getSequence()->push_back(returnLastNode); } - TIntermIfElse *ifNode = new TIntermIfElse(cond, useFirstBlock, nullptr); + TIntermSelection *ifNode = new TIntermSelection(cond, useFirstBlock, nullptr); bodyNode->getSequence()->push_back(ifNode); bodyNode->getSequence()->push_back(useLastBlock); - TIntermFunctionDefinition *indexingFunction = nullptr; - if (write) - { - indexingFunction = new TIntermFunctionDefinition(TType(EbtVoid), paramsNode, bodyNode); - } - else - { - indexingFunction = new TIntermFunctionDefinition(fieldType, paramsNode, bodyNode); - } - indexingFunction->getFunctionSymbolInfo()->setNameObj(GetIndexFunctionName(type, write)); + indexingFunction->getSequence()->push_back(bodyNode); + return indexingFunction; } @@ -327,8 +334,8 @@ RemoveDynamicIndexingTraverser::RemoveDynamicIndexingTraverser(const TSymbolTabl void RemoveDynamicIndexingTraverser::insertHelperDefinitions(TIntermNode *root) { - TIntermBlock *rootBlock = root->getAsBlock(); - ASSERT(rootBlock != nullptr); + TIntermAggregate *rootAgg = root->getAsAggregate(); + ASSERT(rootAgg != nullptr && rootAgg->getOp() == EOpSequence); TIntermSequence insertions; for (TType type : mIndexedVecAndMatrixTypes) { @@ -338,7 +345,7 @@ void RemoveDynamicIndexingTraverser::insertHelperDefinitions(TIntermNode *root) { insertions.push_back(GetIndexFunctionDefinition(type, true)); } - mInsertions.push_back(NodeInsertMultipleEntry(rootBlock, 0, insertions, TIntermSequence())); + mInsertions.push_back(NodeInsertMultipleEntry(rootAgg, 0, insertions, TIntermSequence())); } // Create a call to dyn_index_*() based on an indirect indexing op node @@ -350,8 +357,7 @@ TIntermAggregate *CreateIndexFunctionCall(TIntermBinary *node, TIntermAggregate *indexingCall = new TIntermAggregate(EOpFunctionCall); indexingCall->setLine(node->getLine()); indexingCall->setUserDefined(); - indexingCall->getFunctionSymbolInfo()->setNameObj( - GetIndexFunctionName(indexedNode->getType(), false)); + indexingCall->setNameObj(GetIndexFunctionName(indexedNode->getType(), false)); indexingCall->getSequence()->push_back(indexedNode); indexingCall->getSequence()->push_back(index); @@ -369,8 +375,7 @@ TIntermAggregate *CreateIndexedWriteFunctionCall(TIntermBinary *node, ASSERT(leftCopy != nullptr && leftCopy->getAsTyped() != nullptr); TIntermAggregate *indexedWriteCall = CreateIndexFunctionCall(node, leftCopy->getAsTyped(), index); - indexedWriteCall->getFunctionSymbolInfo()->setNameObj( - GetIndexFunctionName(node->getLeft()->getType(), true)); + indexedWriteCall->setNameObj(GetIndexFunctionName(node->getLeft()->getType(), true)); indexedWriteCall->setType(TType(EbtVoid)); indexedWriteCall->getSequence()->push_back(writtenValue); return indexedWriteCall; @@ -393,7 +398,7 @@ bool RemoveDynamicIndexingTraverser::visitBinary(Visit visit, TIntermBinary *nod // Now v_expr[s0] can be safely executed several times without unintended side effects. // Init the temp variable holding the index - TIntermDeclaration *initIndex = createTempInitDeclaration(node->getRight()); + TIntermAggregate *initIndex = createTempInitDeclaration(node->getRight()); insertStatementInParentBlock(initIndex); mUsedTreeInsertion = true; @@ -444,7 +449,7 @@ bool RemoveDynamicIndexingTraverser::visitBinary(Visit visit, TIntermBinary *nod // Store the index in a temporary signed int variable. TIntermTyped *indexInitializer = EnsureSignedInt(node->getRight()); - TIntermDeclaration *initIndex = createTempInitDeclaration(indexInitializer); + TIntermAggregate *initIndex = createTempInitDeclaration(indexInitializer); initIndex->setLine(node->getLine()); insertionsBefore.push_back(initIndex); @@ -509,5 +514,3 @@ void RemoveDynamicIndexing(TIntermNode *root, traverser.insertHelperDefinitions(root); traverser.updateTree(); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/RemoveDynamicIndexing.h b/gfx/angle/src/compiler/translator/RemoveDynamicIndexing.h index 06305d0f8..ae3a93c9b 100755 --- a/gfx/angle/src/compiler/translator/RemoveDynamicIndexing.h +++ b/gfx/angle/src/compiler/translator/RemoveDynamicIndexing.h @@ -10,9 +10,6 @@ #ifndef COMPILER_TRANSLATOR_REMOVEDYNAMICINDEXING_H_ #define COMPILER_TRANSLATOR_REMOVEDYNAMICINDEXING_H_ -namespace sh -{ - class TIntermNode; class TSymbolTable; @@ -21,6 +18,4 @@ void RemoveDynamicIndexing(TIntermNode *root, const TSymbolTable &symbolTable, int shaderVersion); -} // namespace sh - #endif // COMPILER_TRANSLATOR_REMOVEDYNAMICINDEXING_H_ diff --git a/gfx/angle/src/compiler/translator/RemoveInvariantDeclaration.cpp b/gfx/angle/src/compiler/translator/RemoveInvariantDeclaration.cpp deleted file mode 100644 index f6f016310..000000000 --- a/gfx/angle/src/compiler/translator/RemoveInvariantDeclaration.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// -// Copyright (c) 2016 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 "compiler/translator/RemoveInvariantDeclaration.h" - -#include "compiler/translator/IntermNode.h" - -namespace sh -{ - -namespace -{ - -// An AST traverser that removes invariant declaration for input in fragment shader -// when GLSL >= 4.20 and for output in vertex shader when GLSL < 4.2. -class RemoveInvariantDeclarationTraverser : public TIntermTraverser -{ - public: - RemoveInvariantDeclarationTraverser() : TIntermTraverser(true, false, false) {} - - private: - bool visitAggregate(Visit visit, TIntermAggregate *node) override - { - if (node->getOp() == EOpInvariantDeclaration) - { - TIntermSequence emptyReplacement; - mMultiReplacements.push_back(NodeReplaceWithMultipleEntry(getParentNode()->getAsBlock(), - node, emptyReplacement)); - return false; - } - return true; - } -}; - -} // anonymous namespace - -void RemoveInvariantDeclaration(TIntermNode *root) -{ - RemoveInvariantDeclarationTraverser traverser; - root->traverse(&traverser); - traverser.updateTree(); -} - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/RemoveInvariantDeclaration.h b/gfx/angle/src/compiler/translator/RemoveInvariantDeclaration.h deleted file mode 100644 index cf9d4aa4c..000000000 --- a/gfx/angle/src/compiler/translator/RemoveInvariantDeclaration.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// Copyright (c) 2016 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. -// - -#ifndef COMPILER_TRANSLATOR_REMOVEINVARIANTDECLARATION_H_ -#define COMPILER_TRANSLATOR_REMOVEINVARIANTDECLARATION_H_ - -class TIntermNode; -namespace sh -{ - -void RemoveInvariantDeclaration(TIntermNode *root); - -} // namespace sh - -#endif // COMPILER_TRANSLATOR_REMOVEINVARIANTDECLARATION_H_ diff --git a/gfx/angle/src/compiler/translator/RemovePow.cpp b/gfx/angle/src/compiler/translator/RemovePow.cpp index 192084c36..ba505753a 100755 --- a/gfx/angle/src/compiler/translator/RemovePow.cpp +++ b/gfx/angle/src/compiler/translator/RemovePow.cpp @@ -13,9 +13,6 @@ #include "compiler/translator/InfoSink.h" #include "compiler/translator/IntermNode.h" -namespace sh -{ - namespace { @@ -58,15 +55,19 @@ bool RemovePowTraverser::visitAggregate(Visit visit, TIntermAggregate *node) TIntermTyped *x = node->getSequence()->at(0)->getAsTyped(); TIntermTyped *y = node->getSequence()->at(1)->getAsTyped(); - TIntermUnary *log = new TIntermUnary(EOpLog2, x); + TIntermUnary *log = new TIntermUnary(EOpLog2); + log->setOperand(x); log->setLine(node->getLine()); + log->setType(x->getType()); TOperator op = TIntermBinary::GetMulOpBasedOnOperands(y->getType(), log->getType()); TIntermBinary *mul = new TIntermBinary(op, y, log); mul->setLine(node->getLine()); - TIntermUnary *exp = new TIntermUnary(EOpExp2, mul); + TIntermUnary *exp = new TIntermUnary(EOpExp2); + exp->setOperand(mul); exp->setLine(node->getLine()); + exp->setType(node->getType()); queueReplacement(node, exp, OriginalNode::IS_DROPPED); @@ -95,5 +96,3 @@ void RemovePow(TIntermNode *root) } while (traverser.needAnotherIteration()); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/RemovePow.h b/gfx/angle/src/compiler/translator/RemovePow.h index 1e2f4e116..40f9d672b 100755 --- a/gfx/angle/src/compiler/translator/RemovePow.h +++ b/gfx/angle/src/compiler/translator/RemovePow.h @@ -11,11 +11,8 @@ #ifndef COMPILER_TRANSLATOR_REMOVEPOW_H_ #define COMPILER_TRANSLATOR_REMOVEPOW_H_ -namespace sh -{ class TIntermNode; void RemovePow(TIntermNode *root); -} // namespace sh #endif // COMPILER_TRANSLATOR_REMOVEPOW_H_ diff --git a/gfx/angle/src/compiler/translator/RemoveSwitchFallThrough.cpp b/gfx/angle/src/compiler/translator/RemoveSwitchFallThrough.cpp index dd995af47..b278b5343 100755 --- a/gfx/angle/src/compiler/translator/RemoveSwitchFallThrough.cpp +++ b/gfx/angle/src/compiler/translator/RemoveSwitchFallThrough.cpp @@ -6,10 +6,7 @@ #include "compiler/translator/RemoveSwitchFallThrough.h" -namespace sh -{ - -TIntermBlock *RemoveSwitchFallThrough::removeFallThrough(TIntermBlock *statementList) +TIntermAggregate *RemoveSwitchFallThrough::removeFallThrough(TIntermAggregate *statementList) { RemoveSwitchFallThrough rm(statementList); ASSERT(statementList); @@ -25,13 +22,14 @@ TIntermBlock *RemoveSwitchFallThrough::removeFallThrough(TIntermBlock *statement return rm.mStatementListOut; } -RemoveSwitchFallThrough::RemoveSwitchFallThrough(TIntermBlock *statementList) +RemoveSwitchFallThrough::RemoveSwitchFallThrough(TIntermAggregate *statementList) : TIntermTraverser(true, false, false), mStatementList(statementList), mLastStatementWasBreak(false), mPreviousCase(nullptr) { - mStatementListOut = new TIntermBlock(); + mStatementListOut = new TIntermAggregate(); + mStatementListOut->setOp(EOpSequence); } void RemoveSwitchFallThrough::visitSymbol(TIntermSymbol *node) @@ -64,14 +62,7 @@ bool RemoveSwitchFallThrough::visitUnary(Visit, TIntermUnary *node) return false; } -bool RemoveSwitchFallThrough::visitTernary(Visit, TIntermTernary *node) -{ - mPreviousCase->getSequence()->push_back(node); - mLastStatementWasBreak = false; - return false; -} - -bool RemoveSwitchFallThrough::visitIfElse(Visit, TIntermIfElse *node) +bool RemoveSwitchFallThrough::visitSelection(Visit, TIntermSelection *node) { mPreviousCase->getSequence()->push_back(node); mLastStatementWasBreak = false; @@ -132,20 +123,14 @@ void RemoveSwitchFallThrough::handlePreviousCase() bool RemoveSwitchFallThrough::visitCase(Visit, TIntermCase *node) { handlePreviousCase(); - mPreviousCase = new TIntermBlock(); + mPreviousCase = new TIntermAggregate(); + mPreviousCase->setOp(EOpSequence); mPreviousCase->getSequence()->push_back(node); // Don't traverse the condition of the case statement return false; } bool RemoveSwitchFallThrough::visitAggregate(Visit, TIntermAggregate *node) -{ - mPreviousCase->getSequence()->push_back(node); - mLastStatementWasBreak = false; - return false; -} - -bool RemoveSwitchFallThrough::visitBlock(Visit, TIntermBlock *node) { if (node != mStatementList) { @@ -170,5 +155,3 @@ bool RemoveSwitchFallThrough::visitBranch(Visit, TIntermBranch *node) mLastStatementWasBreak = true; return false; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/RemoveSwitchFallThrough.h b/gfx/angle/src/compiler/translator/RemoveSwitchFallThrough.h index fd8bf4fa2..db8699327 100755 --- a/gfx/angle/src/compiler/translator/RemoveSwitchFallThrough.h +++ b/gfx/angle/src/compiler/translator/RemoveSwitchFallThrough.h @@ -9,42 +9,35 @@ #include "compiler/translator/IntermNode.h" -namespace sh -{ - class RemoveSwitchFallThrough : public TIntermTraverser { public: // When given a statementList from a switch AST node, return an updated // statementList that has fall-through removed. - static TIntermBlock *removeFallThrough(TIntermBlock *statementList); + static TIntermAggregate *removeFallThrough(TIntermAggregate *statementList); private: - RemoveSwitchFallThrough(TIntermBlock *statementList); + RemoveSwitchFallThrough(TIntermAggregate *statementList); void visitSymbol(TIntermSymbol *node) override; void visitConstantUnion(TIntermConstantUnion *node) override; bool visitBinary(Visit, TIntermBinary *node) override; bool visitUnary(Visit, TIntermUnary *node) override; - bool visitTernary(Visit visit, TIntermTernary *node) override; - bool visitIfElse(Visit visit, TIntermIfElse *node) override; + bool visitSelection(Visit visit, TIntermSelection *node) override; bool visitSwitch(Visit, TIntermSwitch *node) override; bool visitCase(Visit, TIntermCase *node) override; bool visitAggregate(Visit, TIntermAggregate *node) override; - bool visitBlock(Visit, TIntermBlock *node) override; bool visitLoop(Visit, TIntermLoop *node) override; bool visitBranch(Visit, TIntermBranch *node) override; void outputSequence(TIntermSequence *sequence, size_t startIndex); void handlePreviousCase(); - TIntermBlock *mStatementList; - TIntermBlock *mStatementListOut; + TIntermAggregate *mStatementList; + TIntermAggregate *mStatementListOut; bool mLastStatementWasBreak; - TIntermBlock *mPreviousCase; - std::vector mCasesSharingBreak; + TIntermAggregate *mPreviousCase; + std::vector mCasesSharingBreak; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_REMOVESWITCHFALLTHROUGH_H_ diff --git a/gfx/angle/src/compiler/translator/RenameFunction.h b/gfx/angle/src/compiler/translator/RenameFunction.h new file mode 100644 index 000000000..fd6a365fe --- /dev/null +++ b/gfx/angle/src/compiler/translator/RenameFunction.h @@ -0,0 +1,36 @@ +// +// Copyright (c) 2012 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. +// + +#ifndef COMPILER_TRANSLATOR_RENAMEFUNCTION_H_ +#define COMPILER_TRANSLATOR_RENAMEFUNCTION_H_ + +#include "compiler/translator/IntermNode.h" + +// +// Renames a function, including its declaration and any calls to it. +// +class RenameFunction : public TIntermTraverser +{ +public: + RenameFunction(const TString& oldFunctionName, const TString& newFunctionName) + : TIntermTraverser(true, false, false) + , mOldFunctionName(oldFunctionName) + , mNewFunctionName(newFunctionName) {} + + bool visitAggregate(Visit visit, TIntermAggregate *node) override + { + TOperator op = node->getOp(); + if ((op == EOpFunction || op == EOpFunctionCall) && node->getName() == mOldFunctionName) + node->setName(mNewFunctionName); + return true; + } + +private: + const TString mOldFunctionName; + const TString mNewFunctionName; +}; + +#endif // COMPILER_TRANSLATOR_RENAMEFUNCTION_H_ diff --git a/gfx/angle/src/compiler/translator/RewriteDoWhile.cpp b/gfx/angle/src/compiler/translator/RewriteDoWhile.cpp index 7999cbf49..834744754 100755 --- a/gfx/angle/src/compiler/translator/RewriteDoWhile.cpp +++ b/gfx/angle/src/compiler/translator/RewriteDoWhile.cpp @@ -11,9 +11,6 @@ #include "compiler/translator/IntermNode.h" -namespace sh -{ - namespace { @@ -46,11 +43,15 @@ class DoWhileRewriter : public TIntermTraverser public: DoWhileRewriter() : TIntermTraverser(true, false, false) {} - bool visitBlock(Visit, TIntermBlock *node) override + bool visitAggregate(Visit, TIntermAggregate *node) override { - // A well-formed AST can only have do-while inside TIntermBlock. By doing a prefix traversal - // we are able to replace the do-while in the sequence directly as the content of the - // do-while will be traversed later. + // A well-formed AST can only have do-while in EOpSequence which represent lists of + // statements. By doing a prefix traversal we are able to replace the do-while in the + // sequence directly as the content of the do-while will be traversed later. + if (node->getOp() != EOpSequence) + { + return true; + } TIntermSequence *statements = node->getSequence(); @@ -70,7 +71,7 @@ class DoWhileRewriter : public TIntermTraverser TType boolType = TType(EbtBool); // bool temp = false; - TIntermDeclaration *tempDeclaration = nullptr; + TIntermAggregate *tempDeclaration = nullptr; { TConstantUnion *falseConstant = new TConstantUnion(); falseConstant->setBConst(false); @@ -94,22 +95,23 @@ class DoWhileRewriter : public TIntermTraverser // break; // } // } - TIntermIfElse *breakIf = nullptr; + TIntermSelection *breakIf = nullptr; { TIntermBranch *breakStatement = new TIntermBranch(EOpBreak, nullptr); - TIntermBlock *breakBlock = new TIntermBlock(); + TIntermAggregate *breakBlock = new TIntermAggregate(EOpSequence); breakBlock->getSequence()->push_back(breakStatement); - TIntermUnary *negatedCondition = - new TIntermUnary(EOpLogicalNot, loop->getCondition()); + TIntermUnary *negatedCondition = new TIntermUnary(EOpLogicalNot); + negatedCondition->setOperand(loop->getCondition()); - TIntermIfElse *innerIf = new TIntermIfElse(negatedCondition, breakBlock, nullptr); + TIntermSelection *innerIf = + new TIntermSelection(negatedCondition, breakBlock, nullptr); - TIntermBlock *innerIfBlock = new TIntermBlock(); + TIntermAggregate *innerIfBlock = new TIntermAggregate(EOpSequence); innerIfBlock->getSequence()->push_back(innerIf); - breakIf = new TIntermIfElse(createTempSymbol(boolType), innerIfBlock, nullptr); + breakIf = new TIntermSelection(createTempSymbol(boolType), innerIfBlock, nullptr); } // Assemble the replacement loops, reusing the do-while loop's body and inserting our @@ -120,10 +122,14 @@ class DoWhileRewriter : public TIntermTraverser trueConstant->setBConst(true); TIntermTyped *trueValue = new TIntermConstantUnion(trueConstant, boolType); - TIntermBlock *body = loop->getBody(); - if (body == nullptr) + TIntermAggregate *body = nullptr; + if (loop->getBody() != nullptr) { - body = new TIntermBlock(); + body = loop->getBody()->getAsAggregate(); + } + else + { + body = new TIntermAggregate(EOpSequence); } auto sequence = body->getSequence(); sequence->insert(sequence->begin(), assignTrue); @@ -155,5 +161,3 @@ void RewriteDoWhile(TIntermNode *root, unsigned int *temporaryIndex) root->traverse(&rewriter); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/RewriteDoWhile.h b/gfx/angle/src/compiler/translator/RewriteDoWhile.h index 91a7958c0..f6ec1caf0 100755 --- a/gfx/angle/src/compiler/translator/RewriteDoWhile.h +++ b/gfx/angle/src/compiler/translator/RewriteDoWhile.h @@ -10,10 +10,7 @@ #ifndef COMPILER_TRANSLATOR_REWRITEDOWHILE_H_ #define COMPILER_TRANSLATOR_REWRITEDOWHILE_H_ -namespace sh -{ class TIntermNode; void RewriteDoWhile(TIntermNode *root, unsigned int *temporaryIndex); -} // namespace sh #endif // COMPILER_TRANSLATOR_REWRITEDOWHILE_H_ diff --git a/gfx/angle/src/compiler/translator/RewriteElseBlocks.cpp b/gfx/angle/src/compiler/translator/RewriteElseBlocks.cpp index 937de11cd..52ede1743 100755 --- a/gfx/angle/src/compiler/translator/RewriteElseBlocks.cpp +++ b/gfx/angle/src/compiler/translator/RewriteElseBlocks.cpp @@ -8,8 +8,6 @@ // #include "compiler/translator/RewriteElseBlocks.h" - -#include "compiler/translator/Intermediate.h" #include "compiler/translator/NodeSearch.h" #include "compiler/translator/SymbolTable.h" @@ -25,60 +23,81 @@ class ElseBlockRewriter : public TIntermTraverser ElseBlockRewriter(); protected: - bool visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *aggregate) override; - bool visitBlock(Visit visit, TIntermBlock *block) override; + bool visitAggregate(Visit visit, TIntermAggregate *aggregate) override; private: const TType *mFunctionType; - TIntermNode *rewriteIfElse(TIntermIfElse *ifElse); + TIntermNode *rewriteSelection(TIntermSelection *selection); }; +TIntermUnary *MakeNewUnary(TOperator op, TIntermTyped *operand) +{ + TIntermUnary *unary = new TIntermUnary(op, operand->getType()); + unary->setOperand(operand); + return unary; +} + ElseBlockRewriter::ElseBlockRewriter() : TIntermTraverser(true, false, true), mFunctionType(NULL) {} -bool ElseBlockRewriter::visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) +bool ElseBlockRewriter::visitAggregate(Visit visit, TIntermAggregate *node) { - // Store the current function context (see comment below) - mFunctionType = ((visit == PreVisit) ? &node->getType() : nullptr); - return true; -} - -bool ElseBlockRewriter::visitBlock(Visit visit, TIntermBlock *node) -{ - if (visit == PostVisit) + switch (node->getOp()) { - for (size_t statementIndex = 0; statementIndex != node->getSequence()->size(); - statementIndex++) + case EOpSequence: + if (visit == PostVisit) { - TIntermNode *statement = (*node->getSequence())[statementIndex]; - TIntermIfElse *ifElse = statement->getAsIfElseNode(); - if (ifElse && ifElse->getFalseBlock() != nullptr) + for (size_t statementIndex = 0; statementIndex != node->getSequence()->size(); statementIndex++) { - (*node->getSequence())[statementIndex] = rewriteIfElse(ifElse); + TIntermNode *statement = (*node->getSequence())[statementIndex]; + TIntermSelection *selection = statement->getAsSelectionNode(); + if (selection && selection->getFalseBlock() != nullptr) + { + // Check for if / else if + TIntermSelection *elseIfBranch = selection->getFalseBlock()->getAsSelectionNode(); + if (elseIfBranch) + { + selection->replaceChildNode(elseIfBranch, rewriteSelection(elseIfBranch)); + delete elseIfBranch; + } + + (*node->getSequence())[statementIndex] = rewriteSelection(selection); + delete selection; + } } } + break; + + case EOpFunction: + // Store the current function context (see comment below) + mFunctionType = ((visit == PreVisit) ? &node->getType() : NULL); + break; + + default: break; } + return true; } -TIntermNode *ElseBlockRewriter::rewriteIfElse(TIntermIfElse *ifElse) +TIntermNode *ElseBlockRewriter::rewriteSelection(TIntermSelection *selection) { - ASSERT(ifElse != nullptr); + ASSERT(selection != nullptr); nextTemporaryIndex(); - TIntermDeclaration *storeCondition = createTempInitDeclaration(ifElse->getCondition()); + TIntermTyped *typedCondition = selection->getCondition()->getAsTyped(); + TIntermAggregate *storeCondition = createTempInitDeclaration(typedCondition); - TIntermBlock *falseBlock = nullptr; + TIntermSelection *falseBlock = nullptr; TType boolType(EbtBool, EbpUndefined, EvqTemporary); - if (ifElse->getFalseBlock()) + if (selection->getFalseBlock()) { - TIntermBlock *negatedElse = nullptr; + TIntermAggregate *negatedElse = nullptr; // crbug.com/346463 // D3D generates error messages claiming a function has no return value, when rewriting // an if-else clause that returns something non-void in a function. By appending dummy @@ -89,24 +108,22 @@ TIntermNode *ElseBlockRewriter::rewriteIfElse(TIntermIfElse *ifElse) mFunctionType->getBasicString(); TString rawText = "return (" + typeString + ")0"; TIntermRaw *returnNode = new TIntermRaw(*mFunctionType, rawText); - negatedElse = new TIntermBlock(); + negatedElse = new TIntermAggregate(EOpSequence); negatedElse->getSequence()->push_back(returnNode); } TIntermSymbol *conditionSymbolElse = createTempSymbol(boolType); - TIntermUnary *negatedCondition = new TIntermUnary(EOpLogicalNot, conditionSymbolElse); - TIntermIfElse *falseIfElse = - new TIntermIfElse(negatedCondition, ifElse->getFalseBlock(), negatedElse); - falseBlock = TIntermediate::EnsureBlock(falseIfElse); + TIntermUnary *negatedCondition = MakeNewUnary(EOpLogicalNot, conditionSymbolElse); + falseBlock = new TIntermSelection(negatedCondition, + selection->getFalseBlock(), negatedElse); } TIntermSymbol *conditionSymbolSel = createTempSymbol(boolType); - TIntermIfElse *newIfElse = - new TIntermIfElse(conditionSymbolSel, ifElse->getTrueBlock(), falseBlock); + TIntermSelection *newSelection = new TIntermSelection(conditionSymbolSel, selection->getTrueBlock(), falseBlock); - TIntermBlock *block = new TIntermBlock(); + TIntermAggregate *block = new TIntermAggregate(EOpSequence); block->getSequence()->push_back(storeCondition); - block->getSequence()->push_back(newIfElse); + block->getSequence()->push_back(newSelection); return block; } diff --git a/gfx/angle/src/compiler/translator/RewriteTexelFetchOffset.cpp b/gfx/angle/src/compiler/translator/RewriteTexelFetchOffset.cpp index 487c90991..4ceceb226 100755 --- a/gfx/angle/src/compiler/translator/RewriteTexelFetchOffset.cpp +++ b/gfx/angle/src/compiler/translator/RewriteTexelFetchOffset.cpp @@ -22,6 +22,7 @@ class Traverser : public TIntermTraverser { public: static void Apply(TIntermNode *root, + unsigned int *tempIndex, const TSymbolTable &symbolTable, int shaderVersion); @@ -42,10 +43,12 @@ Traverser::Traverser(const TSymbolTable &symbolTable, int shaderVersion) // static void Traverser::Apply(TIntermNode *root, + unsigned int *tempIndex, const TSymbolTable &symbolTable, int shaderVersion) { Traverser traverser(symbolTable, shaderVersion); + traverser.useTemporaryIndex(tempIndex); do { traverser.nextIteration(); @@ -60,6 +63,7 @@ void Traverser::Apply(TIntermNode *root, void Traverser::nextIteration() { mFound = false; + nextTemporaryIndex(); } bool Traverser::visitAggregate(Visit visit, TIntermAggregate *node) @@ -75,7 +79,7 @@ bool Traverser::visitAggregate(Visit visit, TIntermAggregate *node) return true; } - if (node->getFunctionSymbolInfo()->getName().compare(0, 16, "texelFetchOffset") != 0) + if (node->getName().compare(0, 16, "texelFetchOffset") != 0) { return true; } @@ -83,36 +87,42 @@ bool Traverser::visitAggregate(Visit visit, TIntermAggregate *node) // Potential problem case detected, apply workaround. const TIntermSequence *sequence = node->getSequence(); ASSERT(sequence->size() == 4u); + nextTemporaryIndex(); // Decide if there is a 2DArray sampler. - bool is2DArray = node->getFunctionSymbolInfo()->getName().find("s2a1") != TString::npos; + bool is2DArray = node->getName().find("s2a1") != TString::npos; // Create new argument list from node->getName(). // e.g. Get "(is2a1;vi3;i1;" from "texelFetchOffset(is2a1;vi3;i1;vi2;" - TString newArgs = node->getFunctionSymbolInfo()->getName().substr( - 16, node->getFunctionSymbolInfo()->getName().length() - 20); + TString newArgs = node->getName().substr(16, node->getName().length() - 20); TString newName = "texelFetch" + newArgs; TSymbol *texelFetchSymbol = symbolTable->findBuiltIn(newName, shaderVersion); ASSERT(texelFetchSymbol); int uniqueId = texelFetchSymbol->getUniqueId(); // Create new node that represents the call of function texelFetch. - // Its argument list will be: texelFetch(sampler, Position+offset, lod). TIntermAggregate *texelFetchNode = new TIntermAggregate(EOpFunctionCall); - texelFetchNode->getFunctionSymbolInfo()->setName(newName); - texelFetchNode->getFunctionSymbolInfo()->setId(uniqueId); + texelFetchNode->setName(newName); + texelFetchNode->setFunctionId(uniqueId); texelFetchNode->setType(node->getType()); texelFetchNode->setLine(node->getLine()); + // Create argument List of texelFetch(sampler, Position+offset, lod). + TIntermSequence newsequence; + // sampler - texelFetchNode->getSequence()->push_back(sequence->at(0)); + newsequence.push_back(sequence->at(0)); + // Position+offset + TIntermBinary *add = new TIntermBinary(EOpAdd); + add->setType(node->getType()); // Position TIntermTyped *texCoordNode = sequence->at(1)->getAsTyped(); ASSERT(texCoordNode); - + add->setLine(texCoordNode->getLine()); + add->setType(texCoordNode->getType()); + add->setLeft(texCoordNode); // offset - TIntermTyped *offsetNode = nullptr; ASSERT(sequence->at(3)->getAsTyped()); if (is2DArray) { @@ -122,31 +132,28 @@ bool Traverser::visitAggregate(Visit visit, TIntermAggregate *node) constructIVec3Node->setLine(texCoordNode->getLine()); constructIVec3Node->setType(texCoordNode->getType()); - constructIVec3Node->getSequence()->push_back(sequence->at(3)->getAsTyped()); + TIntermSequence ivec3Sequence; + ivec3Sequence.push_back(sequence->at(3)->getAsTyped()); TConstantUnion *zero = new TConstantUnion(); zero->setIConst(0); TType *intType = new TType(EbtInt); TIntermConstantUnion *zeroNode = new TIntermConstantUnion(zero, *intType); - constructIVec3Node->getSequence()->push_back(zeroNode); + ivec3Sequence.push_back(zeroNode); + constructIVec3Node->insertChildNodes(0, ivec3Sequence); - offsetNode = constructIVec3Node; + add->setRight(constructIVec3Node); } else { - offsetNode = sequence->at(3)->getAsTyped(); + add->setRight(sequence->at(3)->getAsTyped()); } - - // Position+offset - TIntermBinary *add = new TIntermBinary(EOpAdd, texCoordNode, offsetNode); - add->setLine(texCoordNode->getLine()); - texelFetchNode->getSequence()->push_back(add); + newsequence.push_back(add); // lod - texelFetchNode->getSequence()->push_back(sequence->at(2)); - - ASSERT(texelFetchNode->getSequence()->size() == 3u); + newsequence.push_back(sequence->at(2)); + texelFetchNode->insertChildNodes(0, newsequence); // Replace the old node by this new node. queueReplacement(node, texelFetchNode, OriginalNode::IS_DROPPED); @@ -157,6 +164,7 @@ bool Traverser::visitAggregate(Visit visit, TIntermAggregate *node) } // anonymous namespace void RewriteTexelFetchOffset(TIntermNode *root, + unsigned int *tempIndex, const TSymbolTable &symbolTable, int shaderVersion) { @@ -164,7 +172,7 @@ void RewriteTexelFetchOffset(TIntermNode *root, if (shaderVersion < 300) return; - Traverser::Apply(root, symbolTable, shaderVersion); + Traverser::Apply(root, tempIndex, symbolTable, shaderVersion); } } // namespace sh \ No newline at end of file diff --git a/gfx/angle/src/compiler/translator/RewriteTexelFetchOffset.h b/gfx/angle/src/compiler/translator/RewriteTexelFetchOffset.h index 4218f0b69..a60c26331 100755 --- a/gfx/angle/src/compiler/translator/RewriteTexelFetchOffset.h +++ b/gfx/angle/src/compiler/translator/RewriteTexelFetchOffset.h @@ -22,6 +22,7 @@ namespace sh { void RewriteTexelFetchOffset(TIntermNode *root, + unsigned int *tempIndex, const TSymbolTable &symbolTable, int shaderVersion); diff --git a/gfx/angle/src/compiler/translator/RewriteUnaryMinusOperatorInt.cpp b/gfx/angle/src/compiler/translator/RewriteUnaryMinusOperatorInt.cpp deleted file mode 100644 index ef708cb2e..000000000 --- a/gfx/angle/src/compiler/translator/RewriteUnaryMinusOperatorInt.cpp +++ /dev/null @@ -1,112 +0,0 @@ -// -// Copyright (c) 2016 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. -// -// Implementation of evaluating unary integer variable bug workaround. -// See header for more info. - -#include "compiler/translator/RewriteUnaryMinusOperatorInt.h" - -#include "compiler/translator/IntermNode.h" - -namespace sh -{ - -namespace -{ - -class Traverser : public TIntermTraverser -{ - public: - static void Apply(TIntermNode *root); - - private: - Traverser(); - bool visitUnary(Visit visit, TIntermUnary *node) override; - void nextIteration(); - - bool mFound = false; -}; - -// static -void Traverser::Apply(TIntermNode *root) -{ - Traverser traverser; - do - { - traverser.nextIteration(); - root->traverse(&traverser); - if (traverser.mFound) - { - traverser.updateTree(); - } - } while (traverser.mFound); -} - -Traverser::Traverser() : TIntermTraverser(true, false, false) -{ -} - -void Traverser::nextIteration() -{ - mFound = false; -} - -bool Traverser::visitUnary(Visit visit, TIntermUnary *node) -{ - if (mFound) - { - return false; - } - - // Decide if the current unary operator is unary minus. - if (node->getOp() != EOpNegative) - { - return true; - } - - // Decide if the current operand is an integer variable. - TIntermTyped *opr = node->getOperand(); - if (!opr->getType().isScalarInt()) - { - return true; - } - - // Potential problem case detected, apply workaround: -(int) -> ~(int) + 1. - // ~(int) - TIntermUnary *bitwiseNot = new TIntermUnary(EOpBitwiseNot, opr); - bitwiseNot->setLine(opr->getLine()); - - // Constant 1 (or 1u) - TConstantUnion *one = new TConstantUnion(); - if (opr->getType().getBasicType() == EbtInt) - { - one->setIConst(1); - } - else - { - one->setUConst(1u); - } - TIntermConstantUnion *oneNode = new TIntermConstantUnion(one, opr->getType()); - oneNode->getTypePointer()->setQualifier(EvqConst); - oneNode->setLine(opr->getLine()); - - // ~(int) + 1 - TIntermBinary *add = new TIntermBinary(EOpAdd, bitwiseNot, oneNode); - add->setLine(opr->getLine()); - - queueReplacement(node, add, OriginalNode::IS_DROPPED); - - mFound = true; - return false; -} - -} // anonymous namespace - -void RewriteUnaryMinusOperatorInt(TIntermNode *root) -{ - Traverser::Apply(root); -} - -} // namespace sh \ No newline at end of file diff --git a/gfx/angle/src/compiler/translator/RewriteUnaryMinusOperatorInt.h b/gfx/angle/src/compiler/translator/RewriteUnaryMinusOperatorInt.h deleted file mode 100644 index 50f0c442a..000000000 --- a/gfx/angle/src/compiler/translator/RewriteUnaryMinusOperatorInt.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2016 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. -// -// This mutating tree traversal works around a bug on evaluating unary -// integer variable on Intel D3D driver. It works by rewriting -(int) to -// ~(int) + 1 when evaluating unary integer variables. - -#ifndef COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORINT_H_ -#define COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORINT_H_ - -class TIntermNode; -namespace sh -{ - -void RewriteUnaryMinusOperatorInt(TIntermNode *root); - -} // namespace sh - -#endif // COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORINT_H_ \ No newline at end of file diff --git a/gfx/angle/src/compiler/translator/ScalarizeVecAndMatConstructorArgs.cpp b/gfx/angle/src/compiler/translator/ScalarizeVecAndMatConstructorArgs.cpp index 5afa0d308..775c5d871 100755 --- a/gfx/angle/src/compiler/translator/ScalarizeVecAndMatConstructorArgs.cpp +++ b/gfx/angle/src/compiler/translator/ScalarizeVecAndMatConstructorArgs.cpp @@ -3,10 +3,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Scalarize vector and matrix constructor args, so that vectors built from components don't have -// matrix arguments, and matrices built from components don't have vector arguments. This avoids -// driver bugs around vector and matrix constructors. -// #include "common/debug.h" #include "compiler/translator/ScalarizeVecAndMatConstructorArgs.h" @@ -15,10 +11,6 @@ #include "angle_gl.h" #include "common/angleutils.h" -#include "compiler/translator/IntermNode.h" - -namespace sh -{ namespace { @@ -45,9 +37,23 @@ bool ContainsVectorNode(const TIntermSequence &sequence) return false; } +TIntermConstantUnion *ConstructIndexNode(int index) +{ + TConstantUnion *u = new TConstantUnion[1]; + u[0].setIConst(index); + + TType type(EbtInt, EbpUndefined, EvqConst, 1); + TIntermConstantUnion *node = new TIntermConstantUnion(u, type); + return node; +} + TIntermBinary *ConstructVectorIndexBinaryNode(TIntermSymbol *symbolNode, int index) { - return new TIntermBinary(EOpIndexDirect, symbolNode, TIntermTyped::CreateIndexNode(index)); + TIntermBinary *binary = new TIntermBinary(EOpIndexDirect); + binary->setLeft(symbolNode); + TIntermConstantUnion *indexNode = ConstructIndexNode(index); + binary->setRight(indexNode); + return binary; } TIntermBinary *ConstructMatrixIndexBinaryNode( @@ -56,53 +62,40 @@ TIntermBinary *ConstructMatrixIndexBinaryNode( TIntermBinary *colVectorNode = ConstructVectorIndexBinaryNode(symbolNode, colIndex); - return new TIntermBinary(EOpIndexDirect, colVectorNode, - TIntermTyped::CreateIndexNode(rowIndex)); + TIntermBinary *binary = new TIntermBinary(EOpIndexDirect); + binary->setLeft(colVectorNode); + TIntermConstantUnion *rowIndexNode = ConstructIndexNode(rowIndex); + binary->setRight(rowIndexNode); + return binary; } -class ScalarizeArgsTraverser : public TIntermTraverser -{ - public: - ScalarizeArgsTraverser(sh::GLenum shaderType, - bool fragmentPrecisionHigh, - unsigned int *temporaryIndex) - : TIntermTraverser(true, false, false), - mShaderType(shaderType), - mFragmentPrecisionHigh(fragmentPrecisionHigh) - { - useTemporaryIndex(temporaryIndex); - } - - protected: - bool visitAggregate(Visit visit, TIntermAggregate *node) override; - bool visitBlock(Visit visit, TIntermBlock *node) override; - - private: - void scalarizeArgs(TIntermAggregate *aggregate, bool scalarizeVector, bool scalarizeMatrix); - - // If we have the following code: - // mat4 m(0); - // vec4 v(1, m); - // We will rewrite to: - // mat4 m(0); - // mat4 s0 = m; - // vec4 v(1, s0[0][0], s0[0][1], s0[0][2]); - // This function is to create nodes for "mat4 s0 = m;" and insert it to the code sequence. This - // way the possible side effects of the constructor argument will only be evaluated once. - void createTempVariable(TIntermTyped *original); - - std::vector mBlockStack; - - sh::GLenum mShaderType; - bool mFragmentPrecisionHigh; -}; +} // namespace anonymous -bool ScalarizeArgsTraverser::visitAggregate(Visit visit, TIntermAggregate *node) +bool ScalarizeVecAndMatConstructorArgs::visitAggregate(Visit visit, TIntermAggregate *node) { if (visit == PreVisit) { switch (node->getOp()) { + case EOpSequence: + mSequenceStack.push_back(TIntermSequence()); + { + for (TIntermSequence::const_iterator iter = node->getSequence()->begin(); + iter != node->getSequence()->end(); ++iter) + { + TIntermNode *child = *iter; + ASSERT(child != NULL); + child->traverse(this); + mSequenceStack.back().push_back(child); + } + } + if (mSequenceStack.back().size() > node->getSequence()->size()) + { + node->getSequence()->clear(); + *(node->getSequence()) = mSequenceStack.back(); + } + mSequenceStack.pop_back(); + return false; case EOpConstructVec2: case EOpConstructVec3: case EOpConstructVec4: @@ -134,29 +127,8 @@ bool ScalarizeArgsTraverser::visitAggregate(Visit visit, TIntermAggregate *node) return true; } -bool ScalarizeArgsTraverser::visitBlock(Visit visit, TIntermBlock *node) -{ - mBlockStack.push_back(TIntermSequence()); - { - for (TIntermNode *child : *node->getSequence()) - { - ASSERT(child != nullptr); - child->traverse(this); - mBlockStack.back().push_back(child); - } - } - if (mBlockStack.back().size() > node->getSequence()->size()) - { - node->getSequence()->clear(); - *(node->getSequence()) = mBlockStack.back(); - } - mBlockStack.pop_back(); - return false; -} - -void ScalarizeArgsTraverser::scalarizeArgs(TIntermAggregate *aggregate, - bool scalarizeVector, - bool scalarizeMatrix) +void ScalarizeVecAndMatConstructorArgs::scalarizeArgs( + TIntermAggregate *aggregate, bool scalarizeVector, bool scalarizeMatrix) { ASSERT(aggregate); int size = 0; @@ -207,10 +179,12 @@ void ScalarizeArgsTraverser::scalarizeArgs(TIntermAggregate *aggregate, ASSERT(size > 0); TIntermTyped *node = original[ii]->getAsTyped(); ASSERT(node); - createTempVariable(node); + TString varName = createTempVariable(node); if (node->isScalar()) { - sequence->push_back(createTempSymbol(node->getType())); + TIntermSymbol *symbolNode = + new TIntermSymbol(-1, varName, node->getType()); + sequence->push_back(symbolNode); size--; } else if (node->isVector()) @@ -221,7 +195,8 @@ void ScalarizeArgsTraverser::scalarizeArgs(TIntermAggregate *aggregate, size -= repeat; for (int index = 0; index < repeat; ++index) { - TIntermSymbol *symbolNode = createTempSymbol(node->getType()); + TIntermSymbol *symbolNode = + new TIntermSymbol(-1, varName, node->getType()); TIntermBinary *newNode = ConstructVectorIndexBinaryNode( symbolNode, index); sequence->push_back(newNode); @@ -229,7 +204,8 @@ void ScalarizeArgsTraverser::scalarizeArgs(TIntermAggregate *aggregate, } else { - TIntermSymbol *symbolNode = createTempSymbol(node->getType()); + TIntermSymbol *symbolNode = + new TIntermSymbol(-1, varName, node->getType()); sequence->push_back(symbolNode); size -= node->getNominalSize(); } @@ -244,7 +220,8 @@ void ScalarizeArgsTraverser::scalarizeArgs(TIntermAggregate *aggregate, size -= repeat; while (repeat > 0) { - TIntermSymbol *symbolNode = createTempSymbol(node->getType()); + TIntermSymbol *symbolNode = + new TIntermSymbol(-1, varName, node->getType()); TIntermBinary *newNode = ConstructMatrixIndexBinaryNode( symbolNode, colIndex, rowIndex); sequence->push_back(newNode); @@ -259,7 +236,8 @@ void ScalarizeArgsTraverser::scalarizeArgs(TIntermAggregate *aggregate, } else { - TIntermSymbol *symbolNode = createTempSymbol(node->getType()); + TIntermSymbol *symbolNode = + new TIntermSymbol(-1, varName, node->getType()); sequence->push_back(symbolNode); size -= node->getCols() * node->getRows(); } @@ -267,13 +245,29 @@ void ScalarizeArgsTraverser::scalarizeArgs(TIntermAggregate *aggregate, } } -void ScalarizeArgsTraverser::createTempVariable(TIntermTyped *original) +TString ScalarizeVecAndMatConstructorArgs::createTempVariable(TIntermTyped *original) { - ASSERT(original); - nextTemporaryIndex(); - TIntermDeclaration *decl = createTempInitDeclaration(original); + TString tempVarName = "_webgl_tmp_"; + if (original->isScalar()) + { + tempVarName += "scalar_"; + } + else if (original->isVector()) + { + tempVarName += "vec_"; + } + else + { + ASSERT(original->isMatrix()); + tempVarName += "mat_"; + } + tempVarName += Str(mTempVarCount).c_str(); + mTempVarCount++; + ASSERT(original); TType type = original->getType(); + type.setQualifier(EvqTemporary); + if (mShaderType == GL_FRAGMENT_SHADER && type.getBasicType() == EbtFloat && type.getPrecision() == EbpUndefined) @@ -281,26 +275,21 @@ void ScalarizeArgsTraverser::createTempVariable(TIntermTyped *original) // We use the highest available precision for the temporary variable // to avoid computing the actual precision using the rules defined // in GLSL ES 1.0 Section 4.5.2. - TIntermBinary *init = decl->getSequence()->at(0)->getAsBinaryNode(); - init->getTypePointer()->setPrecision(mFragmentPrecisionHigh ? EbpHigh : EbpMedium); - init->getLeft()->getTypePointer()->setPrecision(mFragmentPrecisionHigh ? EbpHigh - : EbpMedium); + type.setPrecision(mFragmentPrecisionHigh ? EbpHigh : EbpMedium); } - ASSERT(mBlockStack.size() > 0); - TIntermSequence &sequence = mBlockStack.back(); - sequence.push_back(decl); -} + TIntermBinary *init = new TIntermBinary(EOpInitialize); + TIntermSymbol *symbolNode = new TIntermSymbol(-1, tempVarName, type); + init->setLeft(symbolNode); + init->setRight(original); + init->setType(type); -} // namespace anonymous + TIntermAggregate *decl = new TIntermAggregate(EOpDeclaration); + decl->getSequence()->push_back(init); -void ScalarizeVecAndMatConstructorArgs(TIntermBlock *root, - sh::GLenum shaderType, - bool fragmentPrecisionHigh, - unsigned int *temporaryIndex) -{ - ScalarizeArgsTraverser scalarizer(shaderType, fragmentPrecisionHigh, temporaryIndex); - root->traverse(&scalarizer); -} + ASSERT(mSequenceStack.size() > 0); + TIntermSequence &sequence = mSequenceStack.back(); + sequence.push_back(decl); -} // namespace sh + return tempVarName; +} diff --git a/gfx/angle/src/compiler/translator/ScalarizeVecAndMatConstructorArgs.h b/gfx/angle/src/compiler/translator/ScalarizeVecAndMatConstructorArgs.h index 14bbbe13e..d7553be23 100755 --- a/gfx/angle/src/compiler/translator/ScalarizeVecAndMatConstructorArgs.h +++ b/gfx/angle/src/compiler/translator/ScalarizeVecAndMatConstructorArgs.h @@ -3,24 +3,46 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Scalarize vector and matrix constructor args, so that vectors built from components don't have -// matrix arguments, and matrices built from components don't have vector arguments. This avoids -// driver bugs around vector and matrix constructors. -// #ifndef COMPILER_TRANSLATOR_SCALARIZEVECANDMATCONSTRUCTORARGS_H_ #define COMPILER_TRANSLATOR_SCALARIZEVECANDMATCONSTRUCTORARGS_H_ -#include "GLSLANG/ShaderLang.h" +#include "compiler/translator/IntermNode.h" -namespace sh +class ScalarizeVecAndMatConstructorArgs : public TIntermTraverser { -class TIntermBlock; + public: + ScalarizeVecAndMatConstructorArgs(sh::GLenum shaderType, + bool fragmentPrecisionHigh) + : TIntermTraverser(true, false, false), + mTempVarCount(0), + mShaderType(shaderType), + mFragmentPrecisionHigh(fragmentPrecisionHigh) {} + + protected: + bool visitAggregate(Visit visit, TIntermAggregate *node) override; + + private: + void scalarizeArgs(TIntermAggregate *aggregate, + bool scalarizeVector, bool scalarizeMatrix); + + // If we have the following code: + // mat4 m(0); + // vec4 v(1, m); + // We will rewrite to: + // mat4 m(0); + // mat4 _webgl_tmp_mat_0 = m; + // vec4 v(1, _webgl_tmp_mat_0[0][0], _webgl_tmp_mat_0[0][1], _webgl_tmp_mat_0[0][2]); + // This function is to create nodes for "mat4 _webgl_tmp_mat_0 = m;" and insert it to + // the code sequence. + // Return the temporary variable name. + TString createTempVariable(TIntermTyped *original); + + std::vector mSequenceStack; + int mTempVarCount; -void ScalarizeVecAndMatConstructorArgs(TIntermBlock *root, - sh::GLenum shaderType, - bool fragmentPrecisionHigh, - unsigned int *temporaryIndex); -} // namespace sh + sh::GLenum mShaderType; + bool mFragmentPrecisionHigh; +}; #endif // COMPILER_TRANSLATOR_SCALARIZEVECANDMATCONSTRUCTORARGS_H_ diff --git a/gfx/angle/src/compiler/translator/SeparateArrayInitialization.cpp b/gfx/angle/src/compiler/translator/SeparateArrayInitialization.cpp index 98e010a56..de9050cd8 100755 --- a/gfx/angle/src/compiler/translator/SeparateArrayInitialization.cpp +++ b/gfx/angle/src/compiler/translator/SeparateArrayInitialization.cpp @@ -20,9 +20,6 @@ #include "compiler/translator/IntermNode.h" #include "compiler/translator/OutputHLSL.h" -namespace sh -{ - namespace { @@ -32,7 +29,7 @@ class SeparateArrayInitTraverser : private TIntermTraverser static void apply(TIntermNode *root); private: SeparateArrayInitTraverser(); - bool visitDeclaration(Visit, TIntermDeclaration *node) override; + bool visitAggregate(Visit, TIntermAggregate *node) override; }; void SeparateArrayInitTraverser::apply(TIntermNode *root) @@ -47,38 +44,44 @@ SeparateArrayInitTraverser::SeparateArrayInitTraverser() { } -bool SeparateArrayInitTraverser::visitDeclaration(Visit, TIntermDeclaration *node) +bool SeparateArrayInitTraverser::visitAggregate(Visit, TIntermAggregate *node) { - TIntermSequence *sequence = node->getSequence(); - TIntermBinary *initNode = sequence->back()->getAsBinaryNode(); - if (initNode != nullptr && initNode->getOp() == EOpInitialize) + if (node->getOp() == EOpDeclaration) { - TIntermTyped *initializer = initNode->getRight(); - if (initializer->isArray() && !sh::OutputHLSL::canWriteAsHLSLLiteral(initializer)) + TIntermSequence *sequence = node->getSequence(); + TIntermBinary *initNode = sequence->back()->getAsBinaryNode(); + if (initNode != nullptr && initNode->getOp() == EOpInitialize) { - // We rely on that array declarations have been isolated to single declarations. - ASSERT(sequence->size() == 1); - TIntermTyped *symbol = initNode->getLeft(); - TIntermBlock *parentBlock = getParentNode()->getAsBlock(); - ASSERT(parentBlock != nullptr); + TIntermTyped *initializer = initNode->getRight(); + if (initializer->isArray() && !sh::OutputHLSL::canWriteAsHLSLLiteral(initializer)) + { + // We rely on that array declarations have been isolated to single declarations. + ASSERT(sequence->size() == 1); + TIntermTyped *symbol = initNode->getLeft(); + TIntermAggregate *parentAgg = getParentNode()->getAsAggregate(); + ASSERT(parentAgg != nullptr); - TIntermSequence replacements; + TIntermSequence replacements; - TIntermDeclaration *replacementDeclaration = new TIntermDeclaration(); - replacementDeclaration->appendDeclarator(symbol); - replacementDeclaration->setLine(symbol->getLine()); - replacements.push_back(replacementDeclaration); + TIntermAggregate *replacementDeclaration = new TIntermAggregate; + replacementDeclaration->setOp(EOpDeclaration); + replacementDeclaration->getSequence()->push_back(symbol); + replacementDeclaration->setLine(symbol->getLine()); + replacements.push_back(replacementDeclaration); - TIntermBinary *replacementAssignment = - new TIntermBinary(EOpAssign, symbol, initializer); - replacementAssignment->setLine(symbol->getLine()); - replacements.push_back(replacementAssignment); + TIntermBinary *replacementAssignment = new TIntermBinary(EOpAssign); + replacementAssignment->setLeft(symbol); + replacementAssignment->setRight(initializer); + replacementAssignment->setType(initializer->getType()); + replacementAssignment->setLine(symbol->getLine()); + replacements.push_back(replacementAssignment); - mMultiReplacements.push_back( - NodeReplaceWithMultipleEntry(parentBlock, node, replacements)); + mMultiReplacements.push_back(NodeReplaceWithMultipleEntry(parentAgg, node, replacements)); + } } + return false; } - return false; + return true; } } // namespace @@ -87,5 +90,3 @@ void SeparateArrayInitialization(TIntermNode *root) { SeparateArrayInitTraverser::apply(root); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/SeparateArrayInitialization.h b/gfx/angle/src/compiler/translator/SeparateArrayInitialization.h index 038d38a61..d16357a3a 100755 --- a/gfx/angle/src/compiler/translator/SeparateArrayInitialization.h +++ b/gfx/angle/src/compiler/translator/SeparateArrayInitialization.h @@ -18,11 +18,8 @@ #ifndef COMPILER_TRANSLATOR_SEPARATEARRAYINITIALIZATION_H_ #define COMPILER_TRANSLATOR_SEPARATEARRAYINITIALIZATION_H_ -namespace sh -{ class TIntermNode; void SeparateArrayInitialization(TIntermNode *root); -} // namespace sh #endif // COMPILER_TRANSLATOR_SEPARATEARRAYINITIALIZATION_H_ diff --git a/gfx/angle/src/compiler/translator/SeparateDeclarations.cpp b/gfx/angle/src/compiler/translator/SeparateDeclarations.cpp index 4d3835370..d33747f85 100755 --- a/gfx/angle/src/compiler/translator/SeparateDeclarations.cpp +++ b/gfx/angle/src/compiler/translator/SeparateDeclarations.cpp @@ -17,9 +17,6 @@ #include "compiler/translator/IntermNode.h" -namespace sh -{ - namespace { @@ -29,7 +26,7 @@ class SeparateDeclarationsTraverser : private TIntermTraverser static void apply(TIntermNode *root); private: SeparateDeclarationsTraverser(); - bool visitDeclaration(Visit, TIntermDeclaration *node) override; + bool visitAggregate(Visit, TIntermAggregate *node) override; }; void SeparateDeclarationsTraverser::apply(TIntermNode *root) @@ -44,28 +41,32 @@ SeparateDeclarationsTraverser::SeparateDeclarationsTraverser() { } -bool SeparateDeclarationsTraverser::visitDeclaration(Visit, TIntermDeclaration *node) +bool SeparateDeclarationsTraverser::visitAggregate(Visit, TIntermAggregate *node) { - TIntermSequence *sequence = node->getSequence(); - if (sequence->size() > 1) + if (node->getOp() == EOpDeclaration) { - TIntermBlock *parentBlock = getParentNode()->getAsBlock(); - ASSERT(parentBlock != nullptr); - - TIntermSequence replacementDeclarations; - for (size_t ii = 0; ii < sequence->size(); ++ii) + TIntermSequence *sequence = node->getSequence(); + if (sequence->size() > 1) { - TIntermDeclaration *replacementDeclaration = new TIntermDeclaration(); + TIntermAggregate *parentAgg = getParentNode()->getAsAggregate(); + ASSERT(parentAgg != nullptr); - replacementDeclaration->appendDeclarator(sequence->at(ii)->getAsTyped()); - replacementDeclaration->setLine(sequence->at(ii)->getLine()); - replacementDeclarations.push_back(replacementDeclaration); - } + TIntermSequence replacementDeclarations; + for (size_t ii = 0; ii < sequence->size(); ++ii) + { + TIntermAggregate *replacementDeclaration = new TIntermAggregate; - mMultiReplacements.push_back( - NodeReplaceWithMultipleEntry(parentBlock, node, replacementDeclarations)); + replacementDeclaration->setOp(EOpDeclaration); + replacementDeclaration->getSequence()->push_back(sequence->at(ii)); + replacementDeclaration->setLine(sequence->at(ii)->getLine()); + replacementDeclarations.push_back(replacementDeclaration); + } + + mMultiReplacements.push_back(NodeReplaceWithMultipleEntry(parentAgg, node, replacementDeclarations)); + } + return false; } - return false; + return true; } } // namespace @@ -74,5 +75,3 @@ void SeparateDeclarations(TIntermNode *root) { SeparateDeclarationsTraverser::apply(root); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/SeparateDeclarations.h b/gfx/angle/src/compiler/translator/SeparateDeclarations.h index 2c2611a49..77913ab8b 100755 --- a/gfx/angle/src/compiler/translator/SeparateDeclarations.h +++ b/gfx/angle/src/compiler/translator/SeparateDeclarations.h @@ -16,11 +16,8 @@ #ifndef COMPILER_TRANSLATOR_SEPARATEDECLARATIONS_H_ #define COMPILER_TRANSLATOR_SEPARATEDECLARATIONS_H_ -namespace sh -{ class TIntermNode; void SeparateDeclarations(TIntermNode *root); -} // namespace sh #endif // COMPILER_TRANSLATOR_SEPARATEDECLARATIONS_H_ diff --git a/gfx/angle/src/compiler/translator/SeparateExpressionsReturningArrays.cpp b/gfx/angle/src/compiler/translator/SeparateExpressionsReturningArrays.cpp index 0f7c404d3..4041be971 100755 --- a/gfx/angle/src/compiler/translator/SeparateExpressionsReturningArrays.cpp +++ b/gfx/angle/src/compiler/translator/SeparateExpressionsReturningArrays.cpp @@ -14,9 +14,6 @@ #include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNodePatternMatcher.h" -namespace sh -{ - namespace { @@ -52,7 +49,11 @@ SeparateExpressionsTraverser::SeparateExpressionsTraverser() // and also needs to be replaced in its original location by a different node. TIntermBinary *CopyAssignmentNode(TIntermBinary *node) { - return new TIntermBinary(node->getOp(), node->getLeft(), node->getRight()); + TIntermBinary *copyNode = new TIntermBinary(node->getOp()); + copyNode->setLeft(node->getLeft()); + copyNode->setRight(node->getRight()); + copyNode->setType(node->getType()); + return copyNode; } // Performs a shallow copy of a constructor/function call node. @@ -62,11 +63,12 @@ TIntermAggregate *CopyAggregateNode(TIntermAggregate *node) TIntermSequence *copySeq = copyNode->getSequence(); copySeq->insert(copySeq->begin(), node->getSequence()->begin(), node->getSequence()->end()); copyNode->setType(node->getType()); - *copyNode->getFunctionSymbolInfo() = *node->getFunctionSymbolInfo(); + copyNode->setFunctionId(node->getFunctionId()); if (node->isUserDefined()) { copyNode->setUserDefined(); } + copyNode->setNameObj(node->getNameObj()); return copyNode; } @@ -140,5 +142,3 @@ void SeparateExpressionsReturningArrays(TIntermNode *root, unsigned int *tempora } while (traverser.foundArrayExpression()); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/SeparateExpressionsReturningArrays.h b/gfx/angle/src/compiler/translator/SeparateExpressionsReturningArrays.h index d0c73dc18..b178ebb3e 100755 --- a/gfx/angle/src/compiler/translator/SeparateExpressionsReturningArrays.h +++ b/gfx/angle/src/compiler/translator/SeparateExpressionsReturningArrays.h @@ -12,11 +12,8 @@ #ifndef COMPILER_TRANSLATOR_SEPARATEEXPRESSIONSRETURNINGARRAYS_H_ #define COMPILER_TRANSLATOR_SEPARATEEXPRESSIONSRETURNINGARRAYS_H_ -namespace sh -{ class TIntermNode; void SeparateExpressionsReturningArrays(TIntermNode *root, unsigned int *temporaryIndex); -} // namespace sh #endif // COMPILER_TRANSLATOR_SEPARATEEXPRESSIONSRETURNINGARRAYS_H_ diff --git a/gfx/angle/src/compiler/translator/ShaderLang.cpp b/gfx/angle/src/compiler/translator/ShaderLang.cpp index b776ca50b..429bbf2e4 100755 --- a/gfx/angle/src/compiler/translator/ShaderLang.cpp +++ b/gfx/angle/src/compiler/translator/ShaderLang.cpp @@ -20,8 +20,6 @@ #include "compiler/translator/VariablePacker.h" #include "angle_gl.h" -using namespace sh; - namespace { @@ -36,31 +34,31 @@ template const std::vector *GetVariableList(const TCompiler *compiler); template <> -const std::vector *GetVariableList(const TCompiler *compiler) +const std::vector *GetVariableList(const TCompiler *compiler) { return &compiler->getUniforms(); } template <> -const std::vector *GetVariableList(const TCompiler *compiler) +const std::vector *GetVariableList(const TCompiler *compiler) { return &compiler->getVaryings(); } template <> -const std::vector *GetVariableList(const TCompiler *compiler) +const std::vector *GetVariableList(const TCompiler *compiler) { return &compiler->getAttributes(); } template <> -const std::vector *GetVariableList(const TCompiler *compiler) +const std::vector *GetVariableList(const TCompiler *compiler) { return &compiler->getOutputVariables(); } template <> -const std::vector *GetVariableList(const TCompiler *compiler) +const std::vector *GetVariableList(const TCompiler *compiler) { return &compiler->getInterfaceBlocks(); } @@ -237,9 +235,8 @@ ShHandle ShConstructCompiler(sh::GLenum type, ShShaderSpec spec, } // Generate built-in symbol table. - if (!compiler->Init(*resources)) - { - sh::Destruct(base); + if (!compiler->Init(*resources)) { + ShDestruct(base); return 0; } @@ -271,10 +268,11 @@ const std::string &ShGetBuiltInResourcesString(const ShHandle handle) // Return: The return value of ShCompile is really boolean, indicating // success or failure. // -bool ShCompile(const ShHandle handle, - const char *const shaderStrings[], - size_t numStrings, - ShCompileOptions compileOptions) +bool ShCompile( + const ShHandle handle, + const char *const shaderStrings[], + size_t numStrings, + int compileOptions) { TCompiler *compiler = GetCompilerFromHandle(handle); ASSERT(compiler); @@ -335,32 +333,32 @@ const std::map *ShGetNameHashingMap( return &(compiler->getNameMap()); } -const std::vector *ShGetUniforms(const ShHandle handle) +const std::vector *ShGetUniforms(const ShHandle handle) { - return GetShaderVariables(handle); + return GetShaderVariables(handle); } -const std::vector *ShGetVaryings(const ShHandle handle) +const std::vector *ShGetVaryings(const ShHandle handle) { - return GetShaderVariables(handle); + return GetShaderVariables(handle); } -const std::vector *ShGetAttributes(const ShHandle handle) +const std::vector *ShGetAttributes(const ShHandle handle) { - return GetShaderVariables(handle); + return GetShaderVariables(handle); } -const std::vector *ShGetOutputVariables(const ShHandle handle) +const std::vector *ShGetOutputVariables(const ShHandle handle) { - return GetShaderVariables(handle); + return GetShaderVariables(handle); } -const std::vector *ShGetInterfaceBlocks(const ShHandle handle) +const std::vector *ShGetInterfaceBlocks(const ShHandle handle) { - return GetShaderVariables(handle); + return GetShaderVariables(handle); } -WorkGroupSize ShGetComputeShaderLocalGroupSize(const ShHandle handle) +sh::WorkGroupSize ShGetComputeShaderLocalGroupSize(const ShHandle handle) { ASSERT(handle); @@ -372,7 +370,7 @@ WorkGroupSize ShGetComputeShaderLocalGroupSize(const ShHandle handle) } bool ShCheckVariablesWithinPackingLimits(int maxVectors, - const std::vector &variables) + const std::vector &variables) { VariablePacker packer; return packer.CheckVariablesWithinPackingLimits(maxVectors, variables); @@ -408,126 +406,7 @@ const std::map *ShGetUniformRegisterMap(const ShHandl return translator->getUniformRegisterMap(); #else - return nullptr; + static std::map map; + return ↦ #endif // ANGLE_ENABLE_HLSL } - -namespace sh -{ -bool Initialize() -{ - return ShInitialize(); -} - -bool Finalize() -{ - return ShFinalize(); -} - -void InitBuiltInResources(ShBuiltInResources *resources) -{ - ShInitBuiltInResources(resources); -} - -const std::string &GetBuiltInResourcesString(const ShHandle handle) -{ - return ShGetBuiltInResourcesString(handle); -} - -ShHandle ConstructCompiler(sh::GLenum type, - ShShaderSpec spec, - ShShaderOutput output, - const ShBuiltInResources *resources) -{ - return ShConstructCompiler(type, spec, output, resources); -} - -void Destruct(ShHandle handle) -{ - return ShDestruct(handle); -} - -bool Compile(const ShHandle handle, - const char *const shaderStrings[], - size_t numStrings, - ShCompileOptions compileOptions) -{ - return ShCompile(handle, shaderStrings, numStrings, compileOptions); -} - -void ClearResults(const ShHandle handle) -{ - return ShClearResults(handle); -} - -int GetShaderVersion(const ShHandle handle) -{ - return ShGetShaderVersion(handle); -} - -ShShaderOutput GetShaderOutputType(const ShHandle handle) -{ - return ShGetShaderOutputType(handle); -} - -const std::string &GetInfoLog(const ShHandle handle) -{ - return ShGetInfoLog(handle); -} - -const std::string &GetObjectCode(const ShHandle handle) -{ - return ShGetObjectCode(handle); -} - -const std::map *GetNameHashingMap(const ShHandle handle) -{ - return ShGetNameHashingMap(handle); -} - -const std::vector *GetUniforms(const ShHandle handle) -{ - return ShGetUniforms(handle); -} -const std::vector *GetVaryings(const ShHandle handle) -{ - return ShGetVaryings(handle); -} -const std::vector *GetAttributes(const ShHandle handle) -{ - return ShGetAttributes(handle); -} - -const std::vector *GetOutputVariables(const ShHandle handle) -{ - return ShGetOutputVariables(handle); -} -const std::vector *GetInterfaceBlocks(const ShHandle handle) -{ - return ShGetInterfaceBlocks(handle); -} - -sh::WorkGroupSize GetComputeShaderLocalGroupSize(const ShHandle handle) -{ - return ShGetComputeShaderLocalGroupSize(handle); -} - -bool CheckVariablesWithinPackingLimits(int maxVectors, - const std::vector &variables) -{ - return ShCheckVariablesWithinPackingLimits(maxVectors, variables); -} - -bool GetInterfaceBlockRegister(const ShHandle handle, - const std::string &interfaceBlockName, - unsigned int *indexOut) -{ - return ShGetInterfaceBlockRegister(handle, interfaceBlockName, indexOut); -} - -const std::map *GetUniformRegisterMap(const ShHandle handle) -{ - return ShGetUniformRegisterMap(handle); -} - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/SimplifyLoopConditions.cpp b/gfx/angle/src/compiler/translator/SimplifyLoopConditions.cpp index 85c166e59..61a68fc93 100755 --- a/gfx/angle/src/compiler/translator/SimplifyLoopConditions.cpp +++ b/gfx/angle/src/compiler/translator/SimplifyLoopConditions.cpp @@ -13,9 +13,6 @@ #include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNodePatternMatcher.h" -namespace sh -{ - namespace { @@ -39,7 +36,7 @@ class SimplifyLoopConditionsTraverser : public TLValueTrackingTraverser bool visitBinary(Visit visit, TIntermBinary *node) override; bool visitAggregate(Visit visit, TIntermAggregate *node) override; - bool visitTernary(Visit visit, TIntermTernary *node) override; + bool visitSelection(Visit visit, TIntermSelection *node) override; void nextIteration(); bool foundLoopToChange() const { return mFoundLoopToChange; } @@ -97,20 +94,20 @@ bool SimplifyLoopConditionsTraverser::visitAggregate(Visit visit, TIntermAggrega // If we're outside a loop condition, we only need to traverse nodes that may contain loops. if (!mInsideLoopConditionOrExpression) - return false; + return (node->getOp() == EOpSequence || node->getOp() == EOpFunction); mFoundLoopToChange = mConditionsToSimplify.match(node, getParentNode()); return !mFoundLoopToChange; } -bool SimplifyLoopConditionsTraverser::visitTernary(Visit visit, TIntermTernary *node) +bool SimplifyLoopConditionsTraverser::visitSelection(Visit visit, TIntermSelection *node) { if (mFoundLoopToChange) return false; // Don't traverse ternary operators outside loop conditions. if (!mInsideLoopConditionOrExpression) - return false; + return !node->usesTernaryOperator(); mFoundLoopToChange = mConditionsToSimplify.match(node); return !mFoundLoopToChange; @@ -148,9 +145,10 @@ void SimplifyLoopConditionsTraverser::traverseLoop(TIntermLoop *node) tempInitSeq.push_back(createTempInitDeclaration(node->getCondition()->deepCopy())); insertStatementsInParentBlock(tempInitSeq); - TIntermBlock *newBody = new TIntermBlock(); + TIntermAggregate *newBody = new TIntermAggregate(EOpSequence); if (node->getBody()) { + ASSERT(node->getBody()->getOp() == EOpSequence); newBody->getSequence()->push_back(node->getBody()); } newBody->getSequence()->push_back( @@ -178,9 +176,10 @@ void SimplifyLoopConditionsTraverser::traverseLoop(TIntermLoop *node) tempInitSeq.push_back(createTempInitDeclaration(CreateBoolConstantNode(true))); insertStatementsInParentBlock(tempInitSeq); - TIntermBlock *newBody = new TIntermBlock(); + TIntermAggregate *newBody = new TIntermAggregate(EOpSequence); if (node->getBody()) { + ASSERT(node->getBody()->getOp() == EOpSequence); newBody->getSequence()->push_back(node->getBody()); } newBody->getSequence()->push_back( @@ -203,7 +202,7 @@ void SimplifyLoopConditionsTraverser::traverseLoop(TIntermLoop *node) // bool s0 = expr; // while (s0) { { body; } exprB; s0 = expr; } // } - TIntermBlock *loopScope = new TIntermBlock(); + TIntermAggregate *loopScope = new TIntermAggregate(EOpSequence); if (node->getInit()) { loopScope->getSequence()->push_back(node->getInit()); @@ -211,15 +210,12 @@ void SimplifyLoopConditionsTraverser::traverseLoop(TIntermLoop *node) loopScope->getSequence()->push_back( createTempInitDeclaration(node->getCondition()->deepCopy())); - TIntermBlock *whileLoopBody = new TIntermBlock(); + TIntermAggregate *whileLoopBody = new TIntermAggregate(EOpSequence); if (node->getBody()) { whileLoopBody->getSequence()->push_back(node->getBody()); } - if (node->getExpression()) - { - whileLoopBody->getSequence()->push_back(node->getExpression()); - } + whileLoopBody->getSequence()->push_back(node->getExpression()); whileLoopBody->getSequence()->push_back( createTempAssignment(node->getCondition()->deepCopy())); TIntermLoop *whileLoop = new TIntermLoop( @@ -246,8 +242,8 @@ void SimplifyLoopConditionsTraverser::traverseLoop(TIntermLoop *node) // for (init; expr; ) { { body; } exprB; } TIntermTyped *loopExpression = node->getExpression(); node->setExpression(nullptr); - TIntermBlock *oldBody = node->getBody(); - node->setBody(new TIntermBlock()); + TIntermAggregate *oldBody = node->getBody(); + node->setBody(new TIntermAggregate(EOpSequence)); if (oldBody != nullptr) { node->getBody()->getSequence()->push_back(oldBody); @@ -284,5 +280,3 @@ void SimplifyLoopConditions(TIntermNode *root, traverser.updateTree(); } while (traverser.foundLoopToChange()); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/SimplifyLoopConditions.h b/gfx/angle/src/compiler/translator/SimplifyLoopConditions.h index 968089d54..b8802aa11 100755 --- a/gfx/angle/src/compiler/translator/SimplifyLoopConditions.h +++ b/gfx/angle/src/compiler/translator/SimplifyLoopConditions.h @@ -11,8 +11,6 @@ #ifndef COMPILER_TRANSLATOR_SIMPLIFYLOOPCONDITIONS_H_ #define COMPILER_TRANSLATOR_SIMPLIFYLOOPCONDITIONS_H_ -namespace sh -{ class TIntermNode; class TSymbolTable; @@ -21,6 +19,5 @@ void SimplifyLoopConditions(TIntermNode *root, unsigned int *temporaryIndex, const TSymbolTable &symbolTable, int shaderVersion); -} // namespace sh #endif // COMPILER_TRANSLATOR_SIMPLIFYLOOPCONDITIONS_H_ diff --git a/gfx/angle/src/compiler/translator/SplitSequenceOperator.cpp b/gfx/angle/src/compiler/translator/SplitSequenceOperator.cpp index 4c63b59f7..45fc8dc9b 100755 --- a/gfx/angle/src/compiler/translator/SplitSequenceOperator.cpp +++ b/gfx/angle/src/compiler/translator/SplitSequenceOperator.cpp @@ -14,9 +14,6 @@ #include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNodePatternMatcher.h" -namespace sh -{ - namespace { @@ -29,7 +26,7 @@ class SplitSequenceOperatorTraverser : public TLValueTrackingTraverser bool visitBinary(Visit visit, TIntermBinary *node) override; bool visitAggregate(Visit visit, TIntermAggregate *node) override; - bool visitTernary(Visit visit, TIntermTernary *node) override; + bool visitSelection(Visit visit, TIntermSelection *node) override; void nextIteration(); bool foundExpressionToSplit() const { return mFoundExpressionToSplit; } @@ -60,7 +57,7 @@ void SplitSequenceOperatorTraverser::nextIteration() nextTemporaryIndex(); } -bool SplitSequenceOperatorTraverser::visitAggregate(Visit visit, TIntermAggregate *node) +bool SplitSequenceOperatorTraverser::visitBinary(Visit visit, TIntermBinary *node) { if (mFoundExpressionToSplit) return false; @@ -68,14 +65,15 @@ bool SplitSequenceOperatorTraverser::visitAggregate(Visit visit, TIntermAggregat if (mInsideSequenceOperator > 0 && visit == PreVisit) { // Detect expressions that need to be simplified - mFoundExpressionToSplit = mPatternToSplitMatcher.match(node, getParentNode()); + mFoundExpressionToSplit = + mPatternToSplitMatcher.match(node, getParentNode(), isLValueRequiredHere()); return !mFoundExpressionToSplit; } return true; } -bool SplitSequenceOperatorTraverser::visitBinary(Visit visit, TIntermBinary *node) +bool SplitSequenceOperatorTraverser::visitAggregate(Visit visit, TIntermAggregate *node) { if (node->getOp() == EOpComma) { @@ -93,12 +91,19 @@ bool SplitSequenceOperatorTraverser::visitBinary(Visit visit, TIntermBinary *nod // execution order. if (mFoundExpressionToSplit && mInsideSequenceOperator == 1) { - // Move the left side operand into a separate statement in the parent block. + // Move all operands of the sequence operation except the last one into separate + // statements in the parent block. TIntermSequence insertions; - insertions.push_back(node->getLeft()); + for (auto *sequenceChild : *node->getSequence()) + { + if (sequenceChild != node->getSequence()->back()) + { + insertions.push_back(sequenceChild); + } + } insertStatementsInParentBlock(insertions); - // Replace the comma node with its right side operand. - queueReplacement(node, node->getRight(), OriginalNode::IS_DROPPED); + // Replace the sequence with its last operand + queueReplacement(node, node->getSequence()->back(), OriginalNode::IS_DROPPED); } mInsideSequenceOperator--; } @@ -111,15 +116,14 @@ bool SplitSequenceOperatorTraverser::visitBinary(Visit visit, TIntermBinary *nod if (mInsideSequenceOperator > 0 && visit == PreVisit) { // Detect expressions that need to be simplified - mFoundExpressionToSplit = - mPatternToSplitMatcher.match(node, getParentNode(), isLValueRequiredHere()); + mFoundExpressionToSplit = mPatternToSplitMatcher.match(node, getParentNode()); return !mFoundExpressionToSplit; } return true; } -bool SplitSequenceOperatorTraverser::visitTernary(Visit visit, TIntermTernary *node) +bool SplitSequenceOperatorTraverser::visitSelection(Visit visit, TIntermSelection *node) { if (mFoundExpressionToSplit) return false; @@ -154,5 +158,3 @@ void SplitSequenceOperator(TIntermNode *root, traverser.updateTree(); } while (traverser.foundExpressionToSplit()); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/SplitSequenceOperator.h b/gfx/angle/src/compiler/translator/SplitSequenceOperator.h index 6df9d458e..4a46fe36c 100755 --- a/gfx/angle/src/compiler/translator/SplitSequenceOperator.h +++ b/gfx/angle/src/compiler/translator/SplitSequenceOperator.h @@ -12,9 +12,6 @@ #ifndef COMPILER_TRANSLATOR_SPLITSEQUENCEOPERATOR_H_ #define COMPILER_TRANSLATOR_SPLITSEQUENCEOPERATOR_H_ -namespace sh -{ - class TIntermNode; class TSymbolTable; @@ -24,6 +21,4 @@ void SplitSequenceOperator(TIntermNode *root, const TSymbolTable &symbolTable, int shaderVersion); -} // namespace sh - #endif // COMPILER_TRANSLATOR_SPLITSEQUENCEOPERATOR_H_ diff --git a/gfx/angle/src/compiler/translator/SymbolTable.cpp b/gfx/angle/src/compiler/translator/SymbolTable.cpp index 188f810e3..059c5c76a 100755 --- a/gfx/angle/src/compiler/translator/SymbolTable.cpp +++ b/gfx/angle/src/compiler/translator/SymbolTable.cpp @@ -19,38 +19,15 @@ #include #include -namespace sh -{ - int TSymbolTable::uniqueIdCounter = 0; -TSymbol::TSymbol(const TString *n) : uniqueId(TSymbolTable::nextUniqueId()), name(n) -{ -} - // // Functions have buried pointers to delete. // TFunction::~TFunction() -{ - clearParameters(); -} - -void TFunction::clearParameters() { for (TParamList::iterator i = parameters.begin(); i != parameters.end(); ++i) delete (*i).type; - parameters.clear(); - mangledName = nullptr; -} - -void TFunction::swapParameters(const TFunction ¶metersSource) -{ - clearParameters(); - for (auto parameter : parametersSource.parameters) - { - addParameter(parameter); - } } const TString *TFunction::buildMangledName() const @@ -76,6 +53,8 @@ TSymbolTableLevel::~TSymbolTableLevel() bool TSymbolTableLevel::insert(TSymbol *symbol) { + symbol->setUniqueId(TSymbolTable::nextUniqueId()); + // returning true means symbol was added to the table tInsertResult result = level.insert(tLevelPair(symbol->getMangledName(), symbol)); @@ -84,6 +63,8 @@ bool TSymbolTableLevel::insert(TSymbol *symbol) bool TSymbolTableLevel::insertUnmangled(TFunction *function) { + function->setUniqueId(TSymbolTable::nextUniqueId()); + // returning true means symbol was added to the table tInsertResult result = level.insert(tLevelPair(function->getName(), function)); @@ -126,12 +107,6 @@ TSymbol *TSymbolTable::find(const TString &name, int shaderVersion, return symbol; } -TSymbol *TSymbolTable::findGlobal(const TString &name) const -{ - ASSERT(table.size() > GLOBAL_LEVEL); - return table[GLOBAL_LEVEL]->find(name); -} - TSymbol *TSymbolTable::findBuiltIn( const TString &name, int shaderVersion) const { @@ -258,43 +233,6 @@ void TSymbolTable::insertBuiltIn(ESymbolLevel level, TOperator op, const char *e insertBuiltIn(level, gvec4 ? TCache::getType(EbtInt, 4) : rvalue, name, TCache::getType(EbtISampler2DArray), ptype2, ptype3, ptype4, ptype5); insertBuiltIn(level, gvec4 ? TCache::getType(EbtUInt, 4) : rvalue, name, TCache::getType(EbtUSampler2DArray), ptype2, ptype3, ptype4, ptype5); } - else if (IsGImage(ptype1->getBasicType())) - { - insertUnmangledBuiltIn(name); - - const TType *floatType = TCache::getType(EbtFloat, 4); - const TType *intType = TCache::getType(EbtInt, 4); - const TType *unsignedType = TCache::getType(EbtUInt, 4); - - const TType *floatImage = - TCache::getType(convertGImageToFloatImage(ptype1->getBasicType())); - const TType *intImage = TCache::getType(convertGImageToIntImage(ptype1->getBasicType())); - const TType *unsignedImage = - TCache::getType(convertGImageToUnsignedImage(ptype1->getBasicType())); - - // GLSL ES 3.10, Revision 4, 8.12 Image Functions - if (rvalue->getBasicType() == EbtGVec4) - { - // imageLoad - insertBuiltIn(level, floatType, name, floatImage, ptype2, ptype3, ptype4, ptype5); - insertBuiltIn(level, intType, name, intImage, ptype2, ptype3, ptype4, ptype5); - insertBuiltIn(level, unsignedType, name, unsignedImage, ptype2, ptype3, ptype4, ptype5); - } - else if (rvalue->getBasicType() == EbtVoid) - { - // imageStore - insertBuiltIn(level, rvalue, name, floatImage, ptype2, floatType, ptype4, ptype5); - insertBuiltIn(level, rvalue, name, intImage, ptype2, intType, ptype4, ptype5); - insertBuiltIn(level, rvalue, name, unsignedImage, ptype2, unsignedType, ptype4, ptype5); - } - else - { - // imageSize - insertBuiltIn(level, rvalue, name, floatImage, ptype2, ptype3, ptype4, ptype5); - insertBuiltIn(level, rvalue, name, intImage, ptype2, ptype3, ptype4, ptype5); - insertBuiltIn(level, rvalue, name, unsignedImage, ptype2, ptype3, ptype4, ptype5); - } - } else if (IsGenType(rvalue) || IsGenType(ptype1) || IsGenType(ptype2) || IsGenType(ptype3)) { ASSERT(!ptype4 && !ptype5); @@ -367,5 +305,3 @@ TPrecision TSymbolTable::getDefaultPrecision(TBasicType type) const } return prec; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/SymbolTable.h b/gfx/angle/src/compiler/translator/SymbolTable.h index 7c4d3aab3..60e0b9929 100755 --- a/gfx/angle/src/compiler/translator/SymbolTable.h +++ b/gfx/angle/src/compiler/translator/SymbolTable.h @@ -38,16 +38,16 @@ #include "compiler/translator/InfoSink.h" #include "compiler/translator/IntermNode.h" -namespace sh -{ - // Symbol base class. (Can build functions or variables out of these...) class TSymbol : angle::NonCopyable { public: POOL_ALLOCATOR_NEW_DELETE(); - TSymbol(const TString *n); - + TSymbol(const TString *n) + : uniqueId(0), + name(n) + { + } virtual ~TSymbol() { // don't delete name, it's from the pool @@ -69,6 +69,10 @@ class TSymbol : angle::NonCopyable { return false; } + void setUniqueId(int id) + { + uniqueId = id; + } int getUniqueId() const { return uniqueId; @@ -83,7 +87,7 @@ class TSymbol : angle::NonCopyable } private: - const int uniqueId; + int uniqueId; // For real comparing during code generation const TString *name; TString extension; }; @@ -225,8 +229,6 @@ class TFunction : public TSymbol mangledName = nullptr; } - void swapParameters(const TFunction ¶metersSource); - const TString &getMangledName() const override { if (mangledName == nullptr) @@ -260,8 +262,6 @@ class TFunction : public TSymbol } private: - void clearParameters(); - const TString *buildMangledName() const; typedef TVector TParamList; @@ -459,11 +459,8 @@ class TSymbolTable : angle::NonCopyable TSymbol *find(const TString &name, int shaderVersion, bool *builtIn = NULL, bool *sameScope = NULL) const; - - TSymbol *findGlobal(const TString &name) const; - TSymbol *findBuiltIn(const TString &name, int shaderVersion) const; - + TSymbolTableLevel *getOuterLevel() { assert(currentLevel() >= 1); @@ -474,15 +471,15 @@ class TSymbolTable : angle::NonCopyable bool setDefaultPrecision(const TPublicType &type, TPrecision prec) { - if (!SupportsPrecision(type.getBasicType())) + if (!SupportsPrecision(type.type)) return false; - if (type.getBasicType() == EbtUInt) + if (type.type == EbtUInt) return false; // ESSL 3.00.4 section 4.5.4 if (type.isAggregate()) return false; // Not allowed to set for aggregate types int indexOfLastElement = static_cast(precisionStack.size()) - 1; // Uses map operator [], overwrites the current value - (*precisionStack[indexOfLastElement])[type.getBasicType()] = prec; + (*precisionStack[indexOfLastElement])[type.type] = prec; return true; } @@ -544,6 +541,4 @@ class TSymbolTable : angle::NonCopyable static int uniqueIdCounter; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_SYMBOLTABLE_H_ diff --git a/gfx/angle/src/compiler/translator/TextureFunctionHLSL.cpp b/gfx/angle/src/compiler/translator/TextureFunctionHLSL.cpp index 33d098531..6580f258d 100755 --- a/gfx/angle/src/compiler/translator/TextureFunctionHLSL.cpp +++ b/gfx/angle/src/compiler/translator/TextureFunctionHLSL.cpp @@ -393,22 +393,41 @@ void OutputTextureFunctionArgumentList(TInfoSinkBase &out, { switch (textureFunction.sampler) { + case EbtSampler2D: + out << ", int2 offset"; + break; case EbtSampler3D: - case EbtISampler3D: - case EbtUSampler3D: out << ", int3 offset"; break; - case EbtSampler2D: case EbtSampler2DArray: + out << ", int2 offset"; + break; case EbtISampler2D: + out << ", int2 offset"; + break; + case EbtISampler3D: + out << ", int3 offset"; + break; case EbtISampler2DArray: + out << ", int2 offset"; + break; case EbtUSampler2D: + out << ", int2 offset"; + break; + case EbtUSampler3D: + out << ", int3 offset"; + break; case EbtUSampler2DArray: + out << ", int2 offset"; + break; case EbtSampler2DShadow: + out << ", int2 offset"; + break; case EbtSampler2DArrayShadow: - case EbtSamplerExternalOES: out << ", int2 offset"; break; + case EbtSamplerExternalOES: + out << ", int2 offset"; default: UNREACHABLE(); } @@ -1094,8 +1113,32 @@ const char *TextureFunctionHLSL::TextureFunction::getReturnType() const bool TextureFunctionHLSL::TextureFunction::operator<(const TextureFunction &rhs) const { - return std::tie(sampler, coords, proj, offset, method) < - std::tie(rhs.sampler, rhs.coords, rhs.proj, rhs.offset, rhs.method); + if (sampler < rhs.sampler) + return true; + if (sampler > rhs.sampler) + return false; + + if (coords < rhs.coords) + return true; + if (coords > rhs.coords) + return false; + + if (!proj && rhs.proj) + return true; + if (proj && !rhs.proj) + return false; + + if (!offset && rhs.offset) + return true; + if (offset && !rhs.offset) + return false; + + if (method < rhs.method) + return true; + if (method > rhs.method) + return false; + + return false; } TString TextureFunctionHLSL::useTextureFunction(const TString &name, diff --git a/gfx/angle/src/compiler/translator/TranslatorESSL.cpp b/gfx/angle/src/compiler/translator/TranslatorESSL.cpp index 43bce74cc..fef176857 100755 --- a/gfx/angle/src/compiler/translator/TranslatorESSL.cpp +++ b/gfx/angle/src/compiler/translator/TranslatorESSL.cpp @@ -6,20 +6,26 @@ #include "compiler/translator/TranslatorESSL.h" +#include "compiler/translator/BuiltInFunctionEmulatorGLSL.h" #include "compiler/translator/EmulatePrecision.h" #include "compiler/translator/RecordConstantPrecision.h" #include "compiler/translator/OutputESSL.h" #include "angle_gl.h" -namespace sh -{ - TranslatorESSL::TranslatorESSL(sh::GLenum type, ShShaderSpec spec) : TCompiler(type, spec, SH_ESSL_OUTPUT) { } -void TranslatorESSL::translate(TIntermNode *root, ShCompileOptions compileOptions) +void TranslatorESSL::initBuiltInFunctionEmulator(BuiltInFunctionEmulator *emu, int compileOptions) +{ + if (compileOptions & SH_EMULATE_BUILT_IN_FUNCTIONS) + { + InitBuiltInFunctionEmulatorForGLSLWorkarounds(emu, getShaderType()); + } +} + +void TranslatorESSL::translate(TIntermNode *root, int compileOptions) { TInfoSinkBase& sink = getInfoSink().obj; @@ -81,8 +87,7 @@ void TranslatorESSL::translate(TIntermNode *root, ShCompileOptions compileOption // Write translated shader. TOutputESSL outputESSL(sink, getArrayIndexClampingStrategy(), getHashFunction(), getNameMap(), - getSymbolTable(), getShaderType(), shaderVer, precisionEmulation, - compileOptions); + getSymbolTable(), shaderVer, precisionEmulation); root->traverse(&outputESSL); } @@ -111,5 +116,3 @@ void TranslatorESSL::writeExtensionBehavior() { } } } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/TranslatorESSL.h b/gfx/angle/src/compiler/translator/TranslatorESSL.h index b7b46a65e..0fbc47de5 100755 --- a/gfx/angle/src/compiler/translator/TranslatorESSL.h +++ b/gfx/angle/src/compiler/translator/TranslatorESSL.h @@ -9,22 +9,19 @@ #include "compiler/translator/Compiler.h" -namespace sh -{ - class TranslatorESSL : public TCompiler { public: TranslatorESSL(sh::GLenum type, ShShaderSpec spec); protected: - void translate(TIntermNode *root, ShCompileOptions compileOptions) override; + void initBuiltInFunctionEmulator(BuiltInFunctionEmulator *emu, int compileOptions) override; + + void translate(TIntermNode *root, int compileOptions) override; bool shouldFlattenPragmaStdglInvariantAll() override; private: void writeExtensionBehavior(); }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_TRANSLATORESSL_H_ diff --git a/gfx/angle/src/compiler/translator/TranslatorGLSL.cpp b/gfx/angle/src/compiler/translator/TranslatorGLSL.cpp index 1d6582b02..0ee96f590 100755 --- a/gfx/angle/src/compiler/translator/TranslatorGLSL.cpp +++ b/gfx/angle/src/compiler/translator/TranslatorGLSL.cpp @@ -11,36 +11,26 @@ #include "compiler/translator/EmulatePrecision.h" #include "compiler/translator/ExtensionGLSL.h" #include "compiler/translator/OutputGLSL.h" -#include "compiler/translator/RewriteTexelFetchOffset.h" #include "compiler/translator/VersionGLSL.h" -namespace sh -{ - TranslatorGLSL::TranslatorGLSL(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output) : TCompiler(type, spec, output) { } -void TranslatorGLSL::initBuiltInFunctionEmulator(BuiltInFunctionEmulator *emu, - ShCompileOptions compileOptions) +void TranslatorGLSL::initBuiltInFunctionEmulator(BuiltInFunctionEmulator *emu, int compileOptions) { - if (compileOptions & SH_EMULATE_ABS_INT_FUNCTION) - { - InitBuiltInAbsFunctionEmulatorForGLSLWorkarounds(emu, getShaderType()); - } - - if (compileOptions & SH_EMULATE_ISNAN_FLOAT_FUNCTION) + if (compileOptions & SH_EMULATE_BUILT_IN_FUNCTIONS) { - InitBuiltInIsnanFunctionEmulatorForGLSLWorkarounds(emu, getShaderVersion()); + InitBuiltInFunctionEmulatorForGLSLWorkarounds(emu, getShaderType()); } int targetGLSLVersion = ShaderOutputTypeToGLSLVersion(getOutputType()); InitBuiltInFunctionEmulatorForGLSLMissingFunctions(emu, getShaderType(), targetGLSLVersion); } -void TranslatorGLSL::translate(TIntermNode *root, ShCompileOptions compileOptions) +void TranslatorGLSL::translate(TIntermNode *root, int compileOptions) { TInfoSinkBase& sink = getInfoSink().obj; @@ -60,7 +50,7 @@ void TranslatorGLSL::translate(TIntermNode *root, ShCompileOptions compileOption // variables that are actually used, to avoid affecting the behavior of the shader. if ((compileOptions & SH_FLATTEN_PRAGMA_STDGL_INVARIANT_ALL) && getPragma().stdgl.invariantAll) { - ASSERT(wereVariablesCollected()); + collectVariables(root); switch (getShaderType()) { @@ -85,11 +75,6 @@ void TranslatorGLSL::translate(TIntermNode *root, ShCompileOptions compileOption } } - if ((compileOptions & SH_REWRITE_TEXELFETCHOFFSET_TO_TEXELFETCH) != 0) - { - sh::RewriteTexelFetchOffset(root, getSymbolTable(), getShaderVersion()); - } - bool precisionEmulation = getResources().WEBGL_debug_shader_precision && getPragma().debugShaderPrecision; if (precisionEmulation) @@ -188,9 +173,13 @@ void TranslatorGLSL::translate(TIntermNode *root, ShCompileOptions compileOption } // Write translated shader. - TOutputGLSL outputGLSL(sink, getArrayIndexClampingStrategy(), getHashFunction(), getNameMap(), - getSymbolTable(), getShaderType(), getShaderVersion(), getOutputType(), - compileOptions); + TOutputGLSL outputGLSL(sink, + getArrayIndexClampingStrategy(), + getHashFunction(), + getNameMap(), + getSymbolTable(), + getShaderVersion(), + getOutputType()); root->traverse(&outputGLSL); } @@ -201,12 +190,6 @@ bool TranslatorGLSL::shouldFlattenPragmaStdglInvariantAll() return IsGLSL130OrNewer(getOutputType()); } -bool TranslatorGLSL::shouldCollectVariables(ShCompileOptions compileOptions) -{ - return (compileOptions & SH_FLATTEN_PRAGMA_STDGL_INVARIANT_ALL) || - TCompiler::shouldCollectVariables(compileOptions); -} - void TranslatorGLSL::writeVersion(TIntermNode *root) { TVersionGLSL versionGLSL(getShaderType(), getPragma(), getOutputType()); @@ -294,5 +277,3 @@ void TranslatorGLSL::conditionallyOutputInvariantDeclaration(const char *builtin sink << "invariant " << builtinVaryingName << ";\n"; } } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/TranslatorGLSL.h b/gfx/angle/src/compiler/translator/TranslatorGLSL.h index d6f694824..91df58868 100755 --- a/gfx/angle/src/compiler/translator/TranslatorGLSL.h +++ b/gfx/angle/src/compiler/translator/TranslatorGLSL.h @@ -9,21 +9,16 @@ #include "compiler/translator/Compiler.h" -namespace sh -{ - class TranslatorGLSL : public TCompiler { public: TranslatorGLSL(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output); protected: - void initBuiltInFunctionEmulator(BuiltInFunctionEmulator *emu, - ShCompileOptions compileOptions) override; + void initBuiltInFunctionEmulator(BuiltInFunctionEmulator *emu, int compileOptions) override; - void translate(TIntermNode *root, ShCompileOptions compileOptions) override; + void translate(TIntermNode *root, int compileOptions) override; bool shouldFlattenPragmaStdglInvariantAll() override; - bool shouldCollectVariables(ShCompileOptions compileOptions) override; private: void writeVersion(TIntermNode *root); @@ -31,6 +26,4 @@ class TranslatorGLSL : public TCompiler void conditionallyOutputInvariantDeclaration(const char *builtinVaryingName); }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_TRANSLATORGLSL_H_ diff --git a/gfx/angle/src/compiler/translator/TranslatorHLSL.cpp b/gfx/angle/src/compiler/translator/TranslatorHLSL.cpp index 7ef1d4e36..6721d8942 100755 --- a/gfx/angle/src/compiler/translator/TranslatorHLSL.cpp +++ b/gfx/angle/src/compiler/translator/TranslatorHLSL.cpp @@ -8,7 +8,6 @@ #include "compiler/translator/AddDefaultReturnStatements.h" #include "compiler/translator/ArrayReturnValueToOutParameter.h" -#include "compiler/translator/BreakVariableAliasingInInnerLoops.h" #include "compiler/translator/EmulatePrecision.h" #include "compiler/translator/ExpandIntegerPowExpressions.h" #include "compiler/translator/IntermNodePatternMatcher.h" @@ -16,7 +15,6 @@ #include "compiler/translator/RemoveDynamicIndexing.h" #include "compiler/translator/RewriteElseBlocks.h" #include "compiler/translator/RewriteTexelFetchOffset.h" -#include "compiler/translator/RewriteUnaryMinusOperatorInt.h" #include "compiler/translator/SeparateArrayInitialization.h" #include "compiler/translator/SeparateDeclarations.h" #include "compiler/translator/SeparateExpressionsReturningArrays.h" @@ -24,15 +22,12 @@ #include "compiler/translator/SplitSequenceOperator.h" #include "compiler/translator/UnfoldShortCircuitToIf.h" -namespace sh -{ - TranslatorHLSL::TranslatorHLSL(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output) : TCompiler(type, spec, output) { } -void TranslatorHLSL::translate(TIntermNode *root, ShCompileOptions compileOptions) +void TranslatorHLSL::translate(TIntermNode *root, int compileOptions) { const ShBuiltInResources &resources = getResources(); int numRenderTargets = resources.EXT_draw_buffers ? resources.MaxDrawBuffers : 1; @@ -80,12 +75,6 @@ void TranslatorHLSL::translate(TIntermNode *root, ShCompileOptions compileOption sh::RewriteElseBlocks(root, getTemporaryIndex()); } - // Work around an HLSL compiler frontend aliasing optimization bug. - // TODO(cwallez) The date is 2016-08-25, Microsoft said the bug would be fixed - // in the next release of d3dcompiler.dll, it would be nice to detect the DLL - // version and only apply the workaround if it is too old. - sh::BreakVariableAliasingInInnerLoops(root); - bool precisionEmulation = getResources().WEBGL_debug_shader_precision && getPragma().debugShaderPrecision; @@ -105,13 +94,8 @@ void TranslatorHLSL::translate(TIntermNode *root, ShCompileOptions compileOption if ((compileOptions & SH_REWRITE_TEXELFETCHOFFSET_TO_TEXELFETCH) != 0) { - sh::RewriteTexelFetchOffset(root, getSymbolTable(), getShaderVersion()); - } - - if (((compileOptions & SH_REWRITE_INTEGER_UNARY_MINUS_OPERATOR) != 0) && - getShaderType() == GL_VERTEX_SHADER) - { - sh::RewriteUnaryMinusOperatorInt(root); + sh::RewriteTexelFetchOffset(root, getTemporaryIndex(), getSymbolTable(), + getShaderVersion()); } sh::OutputHLSL outputHLSL(getShaderType(), getShaderVersion(), getExtensionBehavior(), @@ -144,5 +128,3 @@ const std::map *TranslatorHLSL::getUniformRegisterMap { return &mUniformRegisterMap; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/TranslatorHLSL.h b/gfx/angle/src/compiler/translator/TranslatorHLSL.h index 3bf64b2e6..f96c18dff 100755 --- a/gfx/angle/src/compiler/translator/TranslatorHLSL.h +++ b/gfx/angle/src/compiler/translator/TranslatorHLSL.h @@ -9,9 +9,6 @@ #include "compiler/translator/Compiler.h" -namespace sh -{ - class TranslatorHLSL : public TCompiler { public: @@ -24,16 +21,14 @@ class TranslatorHLSL : public TCompiler const std::map *getUniformRegisterMap() const; protected: - void translate(TIntermNode *root, ShCompileOptions compileOptions) override; + void translate(TIntermNode *root, int compileOptions) override; bool shouldFlattenPragmaStdglInvariantAll() override; // collectVariables needs to be run always so registers can be assigned. - bool shouldCollectVariables(ShCompileOptions compileOptions) override { return true; } + bool shouldCollectVariables(int compileOptions) override { return true; } std::map mInterfaceBlockRegisterMap; std::map mUniformRegisterMap; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_TRANSLATORHLSL_H_ diff --git a/gfx/angle/src/compiler/translator/Types.cpp b/gfx/angle/src/compiler/translator/Types.cpp index af79d3eea..be1f9822c 100755 --- a/gfx/angle/src/compiler/translator/Types.cpp +++ b/gfx/angle/src/compiler/translator/Types.cpp @@ -11,86 +11,49 @@ #include "compiler/translator/Types.h" #include "compiler/translator/InfoSink.h" #include "compiler/translator/IntermNode.h" -#include "compiler/translator/SymbolTable.h" #include #include -namespace sh -{ - const char* getBasicString(TBasicType t) { switch (t) { - case EbtVoid: return "void"; - case EbtFloat: return "float"; - case EbtInt: return "int"; - case EbtUInt: return "uint"; - case EbtBool: return "bool"; - case EbtSampler2D: return "sampler2D"; - case EbtSampler3D: return "sampler3D"; - case EbtSamplerCube: return "samplerCube"; - case EbtSamplerExternalOES: return "samplerExternalOES"; - case EbtSampler2DRect: return "sampler2DRect"; - case EbtSampler2DArray: return "sampler2DArray"; - case EbtISampler2D: return "isampler2D"; - case EbtISampler3D: return "isampler3D"; - case EbtISamplerCube: return "isamplerCube"; - case EbtISampler2DArray: return "isampler2DArray"; - case EbtUSampler2D: return "usampler2D"; - case EbtUSampler3D: return "usampler3D"; - case EbtUSamplerCube: return "usamplerCube"; - case EbtUSampler2DArray: return "usampler2DArray"; - case EbtSampler2DShadow: return "sampler2DShadow"; - case EbtSamplerCubeShadow: return "samplerCubeShadow"; - case EbtSampler2DArrayShadow: return "sampler2DArrayShadow"; - case EbtStruct: return "structure"; - case EbtInterfaceBlock: return "interface block"; - case EbtImage2D: - return "image2D"; - case EbtIImage2D: - return "iimage2D"; - case EbtUImage2D: - return "uimage2D"; - case EbtImage3D: - return "image3D"; - case EbtIImage3D: - return "iimage3D"; - case EbtUImage3D: - return "uimage3D"; - case EbtImage2DArray: - return "image2DArray"; - case EbtIImage2DArray: - return "iimage2DArray"; - case EbtUImage2DArray: - return "uimage2DArray"; - case EbtImageCube: - return "imageCube"; - case EbtIImageCube: - return "iimageCube"; - case EbtUImageCube: - return "uimageCube"; - default: UNREACHABLE(); return "unknown type"; + case EbtVoid: return "void"; break; + case EbtFloat: return "float"; break; + case EbtInt: return "int"; break; + case EbtUInt: return "uint"; break; + case EbtBool: return "bool"; break; + case EbtSampler2D: return "sampler2D"; break; + case EbtSampler3D: return "sampler3D"; break; + case EbtSamplerCube: return "samplerCube"; break; + case EbtSamplerExternalOES: return "samplerExternalOES"; break; + case EbtSampler2DRect: return "sampler2DRect"; break; + case EbtSampler2DArray: return "sampler2DArray"; break; + case EbtISampler2D: return "isampler2D"; break; + case EbtISampler3D: return "isampler3D"; break; + case EbtISamplerCube: return "isamplerCube"; break; + case EbtISampler2DArray: return "isampler2DArray"; break; + case EbtUSampler2D: return "usampler2D"; break; + case EbtUSampler3D: return "usampler3D"; break; + case EbtUSamplerCube: return "usamplerCube"; break; + case EbtUSampler2DArray: return "usampler2DArray"; break; + case EbtSampler2DShadow: return "sampler2DShadow"; break; + case EbtSamplerCubeShadow: return "samplerCubeShadow"; break; + case EbtSampler2DArrayShadow: return "sampler2DArrayShadow"; break; + case EbtStruct: return "structure"; break; + case EbtInterfaceBlock: return "interface block"; break; + default: UNREACHABLE(); return "unknown type"; } } TType::TType(const TPublicType &p) - : type(p.getBasicType()), - precision(p.precision), - qualifier(p.qualifier), - invariant(p.invariant), - memoryQualifier(p.memoryQualifier), - layoutQualifier(p.layoutQualifier), - primarySize(p.getPrimarySize()), - secondarySize(p.getSecondarySize()), - array(p.array), - arraySize(p.arraySize), - interfaceBlock(0), - structure(0) + : type(p.type), precision(p.precision), qualifier(p.qualifier), invariant(p.invariant), + layoutQualifier(p.layoutQualifier), primarySize(p.primarySize), secondarySize(p.secondarySize), + array(p.array), arraySize(p.arraySize), interfaceBlock(0), structure(0) { - if (p.getUserDef()) - structure = p.getUserDef()->getStruct(); + if (p.userDef) + structure = p.userDef->getStruct(); } bool TStructure::equals(const TStructure &other) const @@ -311,42 +274,6 @@ TString TType::buildMangledName() const case EbtSampler2DArrayShadow: mangledName += "s2as"; break; - case EbtImage2D: - mangledName += "im2"; - break; - case EbtIImage2D: - mangledName += "iim2"; - break; - case EbtUImage2D: - mangledName += "uim2"; - break; - case EbtImage3D: - mangledName += "im3"; - break; - case EbtIImage3D: - mangledName += "iim3"; - break; - case EbtUImage3D: - mangledName += "uim3"; - break; - case EbtImage2DArray: - mangledName += "im2a"; - break; - case EbtIImage2DArray: - mangledName += "iim2a"; - break; - case EbtUImage2DArray: - mangledName += "uim2a"; - break; - case EbtImageCube: - mangledName += "imc"; - break; - case EbtIImageCube: - mangledName += "iimc"; - break; - case EbtUImageCube: - mangledName += "uimc"; - break; case EbtStruct: mangledName += structure->mangledName(); break; @@ -391,9 +318,6 @@ size_t TType::getObjectSize() const if (isArray()) { - if (totalSize == 0) - return 0; - size_t currentArraySize = getArraySize(); if (currentArraySize > INT_MAX / totalSize) totalSize = INT_MAX; @@ -404,14 +328,6 @@ size_t TType::getObjectSize() const return totalSize; } -TStructure::TStructure(const TString *name, TFieldList *fields) - : TFieldListCollection(name, fields), - mDeepestNesting(0), - mUniqueId(TSymbolTable::nextUniqueId()), - mAtGlobalScope(false) -{ -} - bool TStructure::containsArrays() const { for (size_t i = 0; i < mFields->size(); ++i) @@ -445,17 +361,6 @@ bool TStructure::containsSamplers() const return false; } -bool TStructure::containsImages() const -{ - for (size_t i = 0; i < mFields->size(); ++i) - { - const TType *fieldType = (*mFields)[i]->type(); - if (IsImage(fieldType->getBasicType()) || fieldType->isStructureContainingImages()) - return true; - } - return false; -} - void TStructure::createSamplerSymbols(const TString &structName, const TString &structAPIName, const unsigned int arrayOfStructsSize, @@ -560,5 +465,3 @@ int TStructure::calculateDeepestNesting() const maxNesting = std::max(maxNesting, (*mFields)[i]->type()->getDeepestStructNesting()); return 1 + maxNesting; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/Types.h b/gfx/angle/src/compiler/translator/Types.h index fc26d5f59..2a85e010c 100755 --- a/gfx/angle/src/compiler/translator/Types.h +++ b/gfx/angle/src/compiler/translator/Types.h @@ -13,9 +13,6 @@ #include "compiler/translator/BaseTypes.h" #include "compiler/translator/Common.h" -namespace sh -{ - struct TPublicType; class TType; class TSymbol; @@ -106,7 +103,13 @@ class TStructure : public TFieldListCollection { public: POOL_ALLOCATOR_NEW_DELETE(); - TStructure(const TString *name, TFieldList *fields); + TStructure(const TString *name, TFieldList *fields) + : TFieldListCollection(name, fields), + mDeepestNesting(0), + mUniqueId(0), + mAtGlobalScope(false) + { + } int deepestNesting() const { @@ -117,7 +120,6 @@ class TStructure : public TFieldListCollection bool containsArrays() const; bool containsType(TBasicType t) const; bool containsSamplers() const; - bool containsImages() const; void createSamplerSymbols(const TString &structName, const TString &structAPIName, @@ -233,18 +235,10 @@ class TType public: POOL_ALLOCATOR_NEW_DELETE(); TType() - : type(EbtVoid), - precision(EbpUndefined), - qualifier(EvqGlobal), - invariant(false), - memoryQualifier(TMemoryQualifier::create()), + : type(EbtVoid), precision(EbpUndefined), qualifier(EvqGlobal), invariant(false), layoutQualifier(TLayoutQualifier::create()), - primarySize(0), - secondarySize(0), - array(false), - arraySize(0), - interfaceBlock(nullptr), - structure(nullptr) + primarySize(0), secondarySize(0), array(false), arraySize(0), + interfaceBlock(nullptr), structure(nullptr) { } explicit TType(TBasicType t, unsigned char ps = 1, unsigned char ss = 1) @@ -252,7 +246,6 @@ class TType precision(EbpUndefined), qualifier(EvqGlobal), invariant(false), - memoryQualifier(TMemoryQualifier::create()), layoutQualifier(TLayoutQualifier::create()), primarySize(ps), secondarySize(ss), @@ -262,24 +255,12 @@ class TType structure(0) { } - TType(TBasicType t, - TPrecision p, - TQualifier q = EvqTemporary, - unsigned char ps = 1, - unsigned char ss = 1, - bool a = false) - : type(t), - precision(p), - qualifier(q), - invariant(false), - memoryQualifier(TMemoryQualifier::create()), + TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, + unsigned char ps = 1, unsigned char ss = 1, bool a = false) + : type(t), precision(p), qualifier(q), invariant(false), layoutQualifier(TLayoutQualifier::create()), - primarySize(ps), - secondarySize(ss), - array(a), - arraySize(0), - interfaceBlock(0), - structure(0) + primarySize(ps), secondarySize(ss), array(a), arraySize(0), + interfaceBlock(0), structure(0) { } explicit TType(const TPublicType &p); @@ -288,7 +269,6 @@ class TType precision(p), qualifier(EvqTemporary), invariant(false), - memoryQualifier(TMemoryQualifier::create()), layoutQualifier(TLayoutQualifier::create()), primarySize(1), secondarySize(1), @@ -298,22 +278,12 @@ class TType structure(userDef) { } - TType(TInterfaceBlock *interfaceBlockIn, - TQualifier qualifierIn, - TLayoutQualifier layoutQualifierIn, - int arraySizeIn) - : type(EbtInterfaceBlock), - precision(EbpUndefined), - qualifier(qualifierIn), - invariant(false), - memoryQualifier(TMemoryQualifier::create()), - layoutQualifier(layoutQualifierIn), - primarySize(1), - secondarySize(1), - array(arraySizeIn > 0), - arraySize(arraySizeIn), - interfaceBlock(interfaceBlockIn), - structure(0) + TType(TInterfaceBlock *interfaceBlockIn, TQualifier qualifierIn, + TLayoutQualifier layoutQualifierIn, int arraySizeIn) + : type(EbtInterfaceBlock), precision(EbpUndefined), qualifier(qualifierIn), + invariant(false), layoutQualifier(layoutQualifierIn), + primarySize(1), secondarySize(1), array(arraySizeIn > 0), arraySize(arraySizeIn), + interfaceBlock(interfaceBlockIn), structure(0) { } @@ -358,9 +328,6 @@ class TType void setInvariant(bool i) { invariant = i; } - TMemoryQualifier getMemoryQualifier() const { return memoryQualifier; } - void setMemoryQualifier(const TMemoryQualifier &mq) { memoryQualifier = mq; } - TLayoutQualifier getLayoutQualifier() const { return layoutQualifier; @@ -538,16 +505,16 @@ class TType const char *getBasicString() const { - return sh::getBasicString(type); + return ::getBasicString(type); } const char *getPrecisionString() const { - return sh::getPrecisionString(precision); + return ::getPrecisionString(precision); } const char *getQualifierString() const { - return sh::getQualifierString(qualifier); + return ::getQualifierString(qualifier); } const char *getBuiltInTypeNameString() const; @@ -586,11 +553,6 @@ class TType return structure ? structure->containsSamplers() : false; } - bool isStructureContainingImages() const - { - return structure ? structure->containsImages() : false; - } - void createSamplerSymbols(const TString &structName, const TString &structAPIName, const unsigned int arrayOfStructsSize, @@ -617,7 +579,6 @@ class TType TPrecision precision; TQualifier qualifier; bool invariant; - TMemoryQualifier memoryQualifier; TLayoutQualifier layoutQualifier; unsigned char primarySize; // size of vector or cols matrix unsigned char secondarySize; // rows of a matrix @@ -633,25 +594,44 @@ class TType mutable TString mangled; }; -// TTypeSpecifierNonArray stores all of the necessary fields for type_specifier_nonarray from the -// grammar -struct TTypeSpecifierNonArray +// +// This is a workaround for a problem with the yacc stack, It can't have +// types that it thinks have non-trivial constructors. It should +// just be used while recognizing the grammar, not anything else. Pointers +// could be used, but also trying to avoid lots of memory management overhead. +// +// Not as bad as it looks, there is no actual assumption that the fields +// match up or are name the same or anything like that. +// +struct TPublicType { TBasicType type; + TLayoutQualifier layoutQualifier; + TQualifier qualifier; + bool invariant; + TPrecision precision; unsigned char primarySize; // size of vector or cols of matrix unsigned char secondarySize; // rows of matrix + bool array; + int arraySize; TType *userDef; TSourceLoc line; // true if the type was defined by a struct specifier rather than a reference to a type name. bool isStructSpecifier; - void initialize(TBasicType bt, const TSourceLoc &ln) + void setBasic(TBasicType bt, TQualifier q, const TSourceLoc &ln) { type = bt; + layoutQualifier = TLayoutQualifier::create(); + qualifier = q; + invariant = false; + precision = EbpUndefined; primarySize = 1; secondarySize = 1; - userDef = nullptr; + array = false; + arraySize = 0; + userDef = 0; line = ln; isStructSpecifier = false; } @@ -661,113 +641,79 @@ struct TTypeSpecifierNonArray primarySize = size; } - void setMatrix(unsigned char columns, unsigned char rows) + void setMatrix(unsigned char c, unsigned char r) { - ASSERT(columns > 1 && rows > 1 && columns <= 4 && rows <= 4); - primarySize = columns; - secondarySize = rows; + ASSERT(c > 1 && r > 1 && c <= 4 && r <= 4); + primarySize = c; + secondarySize = r; } - bool isMatrix() const { return primarySize > 1 && secondarySize > 1; } - - bool isVector() const { return primarySize > 1 && secondarySize == 1; } -}; - -// -// This is a workaround for a problem with the yacc stack, It can't have -// types that it thinks have non-trivial constructors. It should -// just be used while recognizing the grammar, not anything else. Pointers -// could be used, but also trying to avoid lots of memory management overhead. -// -// Not as bad as it looks, there is no actual assumption that the fields -// match up or are name the same or anything like that. -// -struct TPublicType -{ - TTypeSpecifierNonArray typeSpecifierNonArray; - TLayoutQualifier layoutQualifier; - TMemoryQualifier memoryQualifier; - TQualifier qualifier; - bool invariant; - TPrecision precision; - bool array; - int arraySize; - - void initialize(const TTypeSpecifierNonArray &typeSpecifier, TQualifier q) + bool isUnsizedArray() const { - typeSpecifierNonArray = typeSpecifier; - layoutQualifier = TLayoutQualifier::create(); - memoryQualifier = TMemoryQualifier::create(); - qualifier = q; - invariant = false; - precision = EbpUndefined; - array = false; - arraySize = 0; + return array && arraySize == 0; } - - void initializeBasicType(TBasicType basicType) + void setArraySize(int s) { - typeSpecifierNonArray.type = basicType; - typeSpecifierNonArray.primarySize = 1; - typeSpecifierNonArray.secondarySize = 1; - layoutQualifier = TLayoutQualifier::create(); - memoryQualifier = TMemoryQualifier::create(); - qualifier = EvqTemporary; - invariant = false; - precision = EbpUndefined; - array = false; - arraySize = 0; + array = true; + arraySize = s; + } + void clearArrayness() + { + array = false; + arraySize = 0; } - - TBasicType getBasicType() const { return typeSpecifierNonArray.type; } - void setBasicType(TBasicType basicType) { typeSpecifierNonArray.type = basicType; } - - unsigned char getPrimarySize() const { return typeSpecifierNonArray.primarySize; } - unsigned char getSecondarySize() const { return typeSpecifierNonArray.secondarySize; } - - const TType *getUserDef() const { return typeSpecifierNonArray.userDef; } - const TSourceLoc &getLine() const { return typeSpecifierNonArray.line; } - - bool isStructSpecifier() const { return typeSpecifierNonArray.isStructSpecifier; } bool isStructureContainingArrays() const { - if (!typeSpecifierNonArray.userDef) + if (!userDef) { return false; } - return typeSpecifierNonArray.userDef->isStructureContainingArrays(); + return userDef->isStructureContainingArrays(); } bool isStructureContainingType(TBasicType t) const { - if (!typeSpecifierNonArray.userDef) + if (!userDef) { return false; } - return typeSpecifierNonArray.userDef->isStructureContainingType(t); + return userDef->isStructureContainingType(t); } - bool isUnsizedArray() const { return array && arraySize == 0; } - void setArraySize(int s) + bool isMatrix() const { - array = true; - arraySize = s; + return primarySize > 1 && secondarySize > 1; } - void clearArrayness() + + bool isVector() const { - array = false; - arraySize = 0; + return primarySize > 1 && secondarySize == 1; + } + + int getCols() const + { + ASSERT(isMatrix()); + return primarySize; + } + + int getRows() const + { + ASSERT(isMatrix()); + return secondarySize; + } + + int getNominalSize() const + { + return primarySize; } bool isAggregate() const { - return array || typeSpecifierNonArray.isMatrix() || typeSpecifierNonArray.isVector(); + return array || isMatrix() || isVector(); } }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_TYPES_H_ diff --git a/gfx/angle/src/compiler/translator/UnfoldShortCircuitAST.cpp b/gfx/angle/src/compiler/translator/UnfoldShortCircuitAST.cpp index b6a355a13..3ef555fc8 100755 --- a/gfx/angle/src/compiler/translator/UnfoldShortCircuitAST.cpp +++ b/gfx/angle/src/compiler/translator/UnfoldShortCircuitAST.cpp @@ -6,37 +6,36 @@ #include "compiler/translator/UnfoldShortCircuitAST.h" -namespace sh -{ - namespace { // "x || y" is equivalent to "x ? true : y". -TIntermTernary *UnfoldOR(TIntermTyped *x, TIntermTyped *y) +TIntermSelection *UnfoldOR(TIntermTyped *x, TIntermTyped *y) { + const TType boolType(EbtBool, EbpUndefined); TConstantUnion *u = new TConstantUnion; u->setBConst(true); TIntermConstantUnion *trueNode = new TIntermConstantUnion( u, TType(EbtBool, EbpUndefined, EvqConst, 1)); - return new TIntermTernary(x, trueNode, y); + return new TIntermSelection(x, trueNode, y, boolType); } // "x && y" is equivalent to "x ? y : false". -TIntermTernary *UnfoldAND(TIntermTyped *x, TIntermTyped *y) +TIntermSelection *UnfoldAND(TIntermTyped *x, TIntermTyped *y) { + const TType boolType(EbtBool, EbpUndefined); TConstantUnion *u = new TConstantUnion; u->setBConst(false); TIntermConstantUnion *falseNode = new TIntermConstantUnion( u, TType(EbtBool, EbpUndefined, EvqConst, 1)); - return new TIntermTernary(x, y, falseNode); + return new TIntermSelection(x, y, falseNode, boolType); } } // namespace anonymous bool UnfoldShortCircuitAST::visitBinary(Visit visit, TIntermBinary *node) { - TIntermTernary *replacement = nullptr; + TIntermSelection *replacement = NULL; switch (node->getOp()) { @@ -55,5 +54,3 @@ bool UnfoldShortCircuitAST::visitBinary(Visit visit, TIntermBinary *node) } return true; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/UnfoldShortCircuitAST.h b/gfx/angle/src/compiler/translator/UnfoldShortCircuitAST.h index ac18bbf99..b92a4e915 100755 --- a/gfx/angle/src/compiler/translator/UnfoldShortCircuitAST.h +++ b/gfx/angle/src/compiler/translator/UnfoldShortCircuitAST.h @@ -13,9 +13,6 @@ #include "common/angleutils.h" #include "compiler/translator/IntermNode.h" -namespace sh -{ - // This traverser identifies all the short circuit binary nodes that need to // be replaced, and creates the corresponding replacement nodes. However, // the actual replacements happen after the traverse through updateTree(). @@ -31,6 +28,4 @@ class UnfoldShortCircuitAST : public TIntermTraverser bool visitBinary(Visit visit, TIntermBinary *) override; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUITAST_H_ diff --git a/gfx/angle/src/compiler/translator/UnfoldShortCircuitToIf.cpp b/gfx/angle/src/compiler/translator/UnfoldShortCircuitToIf.cpp index 22fa54287..4f32d6a7f 100755 --- a/gfx/angle/src/compiler/translator/UnfoldShortCircuitToIf.cpp +++ b/gfx/angle/src/compiler/translator/UnfoldShortCircuitToIf.cpp @@ -13,9 +13,6 @@ #include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNodePatternMatcher.h" -namespace sh -{ - namespace { @@ -26,7 +23,7 @@ class UnfoldShortCircuitTraverser : public TIntermTraverser UnfoldShortCircuitTraverser(); bool visitBinary(Visit visit, TIntermBinary *node) override; - bool visitTernary(Visit visit, TIntermTernary *node) override; + bool visitSelection(Visit visit, TIntermSelection *node) override; void nextIteration(); bool foundShortCircuit() const { return mFoundShortCircuit; } @@ -78,12 +75,13 @@ bool UnfoldShortCircuitTraverser::visitBinary(Visit visit, TIntermBinary *node) ASSERT(node->getLeft()->getType() == boolType); insertions.push_back(createTempInitDeclaration(node->getLeft())); - TIntermBlock *assignRightBlock = new TIntermBlock(); + TIntermAggregate *assignRightBlock = new TIntermAggregate(EOpSequence); ASSERT(node->getRight()->getType() == boolType); assignRightBlock->getSequence()->push_back(createTempAssignment(node->getRight())); - TIntermUnary *notTempSymbol = new TIntermUnary(EOpLogicalNot, createTempSymbol(boolType)); - TIntermIfElse *ifNode = new TIntermIfElse(notTempSymbol, assignRightBlock, nullptr); + TIntermUnary *notTempSymbol = new TIntermUnary(EOpLogicalNot, boolType); + notTempSymbol->setOperand(createTempSymbol(boolType)); + TIntermSelection *ifNode = new TIntermSelection(notTempSymbol, assignRightBlock, nullptr); insertions.push_back(ifNode); insertStatementsInParentBlock(insertions); @@ -102,12 +100,12 @@ bool UnfoldShortCircuitTraverser::visitBinary(Visit visit, TIntermBinary *node) ASSERT(node->getLeft()->getType() == boolType); insertions.push_back(createTempInitDeclaration(node->getLeft())); - TIntermBlock *assignRightBlock = new TIntermBlock(); + TIntermAggregate *assignRightBlock = new TIntermAggregate(EOpSequence); ASSERT(node->getRight()->getType() == boolType); assignRightBlock->getSequence()->push_back(createTempAssignment(node->getRight())); - TIntermIfElse *ifNode = - new TIntermIfElse(createTempSymbol(boolType), assignRightBlock, nullptr); + TIntermSelection *ifNode = + new TIntermSelection(createTempSymbol(boolType), assignRightBlock, nullptr); insertions.push_back(ifNode); insertStatementsInParentBlock(insertions); @@ -121,7 +119,7 @@ bool UnfoldShortCircuitTraverser::visitBinary(Visit visit, TIntermBinary *node) } } -bool UnfoldShortCircuitTraverser::visitTernary(Visit visit, TIntermTernary *node) +bool UnfoldShortCircuitTraverser::visitSelection(Visit visit, TIntermSelection *node) { if (mFoundShortCircuit) return false; @@ -134,22 +132,26 @@ bool UnfoldShortCircuitTraverser::visitTernary(Visit visit, TIntermTernary *node mFoundShortCircuit = true; + ASSERT(node->usesTernaryOperator()); + // Unfold "b ? x : y" into "type s; if(b) s = x; else s = y;" TIntermSequence insertions; - TIntermDeclaration *tempDeclaration = createTempDeclaration(node->getType()); + TIntermSymbol *tempSymbol = createTempSymbol(node->getType()); + TIntermAggregate *tempDeclaration = new TIntermAggregate(EOpDeclaration); + tempDeclaration->getSequence()->push_back(tempSymbol); insertions.push_back(tempDeclaration); - TIntermBlock *trueBlock = new TIntermBlock(); - TIntermBinary *trueAssignment = createTempAssignment(node->getTrueExpression()); + TIntermAggregate *trueBlock = new TIntermAggregate(EOpSequence); + TIntermBinary *trueAssignment = createTempAssignment(node->getTrueBlock()->getAsTyped()); trueBlock->getSequence()->push_back(trueAssignment); - TIntermBlock *falseBlock = new TIntermBlock(); - TIntermBinary *falseAssignment = createTempAssignment(node->getFalseExpression()); + TIntermAggregate *falseBlock = new TIntermAggregate(EOpSequence); + TIntermBinary *falseAssignment = createTempAssignment(node->getFalseBlock()->getAsTyped()); falseBlock->getSequence()->push_back(falseAssignment); - TIntermIfElse *ifNode = - new TIntermIfElse(node->getCondition()->getAsTyped(), trueBlock, falseBlock); + TIntermSelection *ifNode = + new TIntermSelection(node->getCondition()->getAsTyped(), trueBlock, falseBlock); insertions.push_back(ifNode); insertStatementsInParentBlock(insertions); @@ -183,5 +185,3 @@ void UnfoldShortCircuitToIf(TIntermNode *root, unsigned int *temporaryIndex) } while (traverser.foundShortCircuit()); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/UnfoldShortCircuitToIf.h b/gfx/angle/src/compiler/translator/UnfoldShortCircuitToIf.h index 24ff289a3..0fe37b714 100755 --- a/gfx/angle/src/compiler/translator/UnfoldShortCircuitToIf.h +++ b/gfx/angle/src/compiler/translator/UnfoldShortCircuitToIf.h @@ -11,11 +11,8 @@ #ifndef COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUIT_H_ #define COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUIT_H_ -namespace sh -{ class TIntermNode; void UnfoldShortCircuitToIf(TIntermNode *root, unsigned int *temporaryIndex); -} // namespace sh #endif // COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUIT_H_ diff --git a/gfx/angle/src/compiler/translator/UseInterfaceBlockFields.cpp b/gfx/angle/src/compiler/translator/UseInterfaceBlockFields.cpp deleted file mode 100644 index 390e2b092..000000000 --- a/gfx/angle/src/compiler/translator/UseInterfaceBlockFields.cpp +++ /dev/null @@ -1,163 +0,0 @@ -// -// Copyright 2016 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. -// - -// UseInterfaceBlockFields.cpp: insert statements to reference all members in InterfaceBlock list at -// the beginning of main. This is to work around a Mac driver that treats unused standard/shared -// uniform blocks as inactive. - -#include "compiler/translator/UseInterfaceBlockFields.h" - -#include "compiler/translator/IntermNode.h" -#include "compiler/translator/SymbolTable.h" -#include "compiler/translator/util.h" - -namespace sh -{ - -namespace -{ - -class UseUniformBlockMembers : public TIntermTraverser -{ - public: - UseUniformBlockMembers(const InterfaceBlockList &blocks, const TSymbolTable &symbolTable) - : TIntermTraverser(true, false, false), - mBlocks(blocks), - mSymbolTable(symbolTable), - mCodeInserted(false) - { - ASSERT(mSymbolTable.atGlobalLevel()); - } - - protected: - bool visitAggregate(Visit visit, TIntermAggregate *node) override { return !mCodeInserted; } - bool visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) override; - - private: - void insertUseCode(TIntermSequence *sequence); - void AddFieldUseStatements(const ShaderVariable &var, TIntermSequence *sequence); - - const InterfaceBlockList &mBlocks; - const TSymbolTable &mSymbolTable; - bool mCodeInserted; -}; - -bool UseUniformBlockMembers::visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) -{ - ASSERT(visit == PreVisit); - if (node->getFunctionSymbolInfo()->isMain()) - { - TIntermBlock *body = node->getBody(); - ASSERT(body); - insertUseCode(body->getSequence()); - mCodeInserted = true; - return false; - } - return !mCodeInserted; -} - -void UseUniformBlockMembers::AddFieldUseStatements(const ShaderVariable &var, - TIntermSequence *sequence) -{ - TString name = TString(var.name.c_str()); - if (var.isArray()) - { - size_t pos = name.find_last_of('['); - if (pos != TString::npos) - { - name = name.substr(0, pos); - } - } - const TType *type; - TType basicType; - if (var.isStruct()) - { - TVariable *structInfo = reinterpret_cast(mSymbolTable.findGlobal(name)); - ASSERT(structInfo); - const TType &structType = structInfo->getType(); - type = &structType; - } - else - { - basicType = sh::GetShaderVariableBasicType(var); - type = &basicType; - } - ASSERT(type); - - TIntermSymbol *symbol = new TIntermSymbol(0, name, *type); - if (var.isArray()) - { - for (unsigned int i = 0; i < var.arraySize; ++i) - { - TIntermBinary *element = - new TIntermBinary(EOpIndexDirect, symbol, TIntermTyped::CreateIndexNode(i)); - sequence->insert(sequence->begin(), element); - } - } - else - { - sequence->insert(sequence->begin(), symbol); - } -} - -void UseUniformBlockMembers::insertUseCode(TIntermSequence *sequence) -{ - for (const auto &block : mBlocks) - { - if (block.instanceName.empty()) - { - for (const auto &var : block.fields) - { - AddFieldUseStatements(var, sequence); - } - } - else if (block.arraySize > 0) - { - TString name = TString(block.instanceName.c_str()); - TVariable *ubInfo = reinterpret_cast(mSymbolTable.findGlobal(name)); - ASSERT(ubInfo); - TIntermSymbol *arraySymbol = new TIntermSymbol(0, name, ubInfo->getType()); - for (unsigned int i = 0; i < block.arraySize; ++i) - { - TIntermBinary *instanceSymbol = new TIntermBinary(EOpIndexDirect, arraySymbol, - TIntermTyped::CreateIndexNode(i)); - for (unsigned int j = 0; j < block.fields.size(); ++j) - { - TIntermBinary *element = - new TIntermBinary(EOpIndexDirectInterfaceBlock, instanceSymbol, - TIntermTyped::CreateIndexNode(j)); - sequence->insert(sequence->begin(), element); - } - } - } - else - { - TString name = TString(block.instanceName.c_str()); - TVariable *ubInfo = reinterpret_cast(mSymbolTable.findGlobal(name)); - ASSERT(ubInfo); - TIntermSymbol *blockSymbol = new TIntermSymbol(0, name, ubInfo->getType()); - for (unsigned int i = 0; i < block.fields.size(); ++i) - { - TIntermBinary *element = new TIntermBinary( - EOpIndexDirectInterfaceBlock, blockSymbol, TIntermTyped::CreateIndexNode(i)); - - sequence->insert(sequence->begin(), element); - } - } - } -} - -} // namespace anonymous - -void UseInterfaceBlockFields(TIntermNode *root, - const InterfaceBlockList &blocks, - const TSymbolTable &symbolTable) -{ - UseUniformBlockMembers useUniformBlock(blocks, symbolTable); - root->traverse(&useUniformBlock); -} - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/UseInterfaceBlockFields.h b/gfx/angle/src/compiler/translator/UseInterfaceBlockFields.h deleted file mode 100644 index a789bb7e9..000000000 --- a/gfx/angle/src/compiler/translator/UseInterfaceBlockFields.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2016 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. -// - -// UseInterfaceBlockFields.h: insert statements to reference all members in InterfaceBlock list at -// the beginning of main. This is to work around a Mac driver that treats unused standard/shared -// uniform blocks as inactive. - -#ifndef COMPILER_TRANSLATOR_USEINTERFACEBLOCKFIELDS_H_ -#define COMPILER_TRANSLATOR_USEINTERFACEBLOCKFIELDS_H_ - -#include - -class TIntermNode; -namespace sh -{ - -class TSymbolTable; - -using InterfaceBlockList = std::vector; - -void UseInterfaceBlockFields(TIntermNode *root, - const InterfaceBlockList &blocks, - const TSymbolTable &symbolTable); - -} // namespace sh - -#endif // COMPILER_TRANSLATOR_USEINTERFACEBLOCKFIELDS_H_ diff --git a/gfx/angle/src/compiler/translator/UtilsHLSL.cpp b/gfx/angle/src/compiler/translator/UtilsHLSL.cpp index 221d5d9b5..b3a065f19 100755 --- a/gfx/angle/src/compiler/translator/UtilsHLSL.cpp +++ b/gfx/angle/src/compiler/translator/UtilsHLSL.cpp @@ -173,8 +173,6 @@ TString TextureTypeSuffix(const TBasicType type) return "Cube_int4_"; case EbtUSamplerCube: return "Cube_uint4_"; - case EbtSamplerExternalOES: - return "_External"; default: // All other types are identified by their group suffix return TextureGroupSuffix(type); diff --git a/gfx/angle/src/compiler/translator/ValidateGlobalInitializer.cpp b/gfx/angle/src/compiler/translator/ValidateGlobalInitializer.cpp index d5b1b3be4..2461b6a43 100755 --- a/gfx/angle/src/compiler/translator/ValidateGlobalInitializer.cpp +++ b/gfx/angle/src/compiler/translator/ValidateGlobalInitializer.cpp @@ -8,9 +8,6 @@ #include "compiler/translator/ParseContext.h" -namespace sh -{ - namespace { @@ -113,4 +110,3 @@ bool ValidateGlobalInitializer(TIntermTyped *initializer, const TParseContext *c return validate.isValid(); } -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/ValidateGlobalInitializer.h b/gfx/angle/src/compiler/translator/ValidateGlobalInitializer.h index 89b4b1176..c3d2a47eb 100755 --- a/gfx/angle/src/compiler/translator/ValidateGlobalInitializer.h +++ b/gfx/angle/src/compiler/translator/ValidateGlobalInitializer.h @@ -7,15 +7,10 @@ #ifndef COMPILER_TRANSLATOR_VALIDATEGLOBALINITIALIZER_H_ #define COMPILER_TRANSLATOR_VALIDATEGLOBALINITIALIZER_H_ -namespace sh -{ - class TIntermTyped; class TParseContext; // Returns true if the initializer is valid. bool ValidateGlobalInitializer(TIntermTyped *initializer, const TParseContext *context, bool *warning); -} // namespace sh - #endif // COMPILER_TRANSLATOR_VALIDATEGLOBALINITIALIZER_H_ diff --git a/gfx/angle/src/compiler/translator/ValidateLimitations.cpp b/gfx/angle/src/compiler/translator/ValidateLimitations.cpp index 75a0c5156..ba8cdd0aa 100755 --- a/gfx/angle/src/compiler/translator/ValidateLimitations.cpp +++ b/gfx/angle/src/compiler/translator/ValidateLimitations.cpp @@ -10,9 +10,6 @@ #include "compiler/translator/ParseContext.h" #include "angle_gl.h" -namespace sh -{ - namespace { @@ -216,8 +213,8 @@ int ValidateLimitations::validateForLoopInit(TIntermLoop *node) // init-declaration has the form: // type-specifier identifier = constant-expression // - TIntermDeclaration *decl = init->getAsDeclarationNode(); - if (decl == nullptr) + TIntermAggregate *decl = init->getAsAggregate(); + if ((decl == NULL) || (decl->getOp() != EOpDeclaration)) { error(init->getLine(), "Invalid init declaration", "for"); return -1; @@ -426,8 +423,7 @@ bool ValidateLimitations::validateFunctionCall(TIntermAggregate *node) bool valid = true; TSymbolTable& symbolTable = GetGlobalParseContext()->symbolTable; - TSymbol *symbol = symbolTable.find(node->getFunctionSymbolInfo()->getName(), - GetGlobalParseContext()->getShaderVersion()); + TSymbol* symbol = symbolTable.find(node->getName(), GetGlobalParseContext()->getShaderVersion()); ASSERT(symbol && symbol->isFunction()); TFunction *function = static_cast(symbol); for (ParamIndex::const_iterator i = pIndex.begin(); @@ -499,4 +495,3 @@ bool ValidateLimitations::validateIndexing(TIntermBinary *node) return valid; } -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/ValidateLimitations.h b/gfx/angle/src/compiler/translator/ValidateLimitations.h index 4c84f9db7..666e38ff5 100755 --- a/gfx/angle/src/compiler/translator/ValidateLimitations.h +++ b/gfx/angle/src/compiler/translator/ValidateLimitations.h @@ -10,9 +10,6 @@ #include "compiler/translator/IntermNode.h" #include "compiler/translator/LoopInfo.h" -namespace sh -{ - class TInfoSinkBase; // Traverses intermediate tree to ensure that the shader does not exceed the @@ -63,6 +60,4 @@ class ValidateLimitations : public TIntermTraverser bool mValidateInnerLoops; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_VALIDATELIMITATIONS_H_ diff --git a/gfx/angle/src/compiler/translator/ValidateMaxParameters.cpp b/gfx/angle/src/compiler/translator/ValidateMaxParameters.cpp index f97f7a907..00b3c9b45 100755 --- a/gfx/angle/src/compiler/translator/ValidateMaxParameters.cpp +++ b/gfx/angle/src/compiler/translator/ValidateMaxParameters.cpp @@ -7,9 +7,6 @@ #include "compiler/translator/ValidateMaxParameters.h" -namespace sh -{ - ValidateMaxParameters::ValidateMaxParameters(unsigned int maxParameters) : TIntermTraverser(true, false, false), mMaxParameters(maxParameters), mValid(true) { @@ -36,5 +33,3 @@ bool ValidateMaxParameters::validate(TIntermNode *root, unsigned int maxParamete root->traverse(&argsTraverser); return argsTraverser.mValid; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/ValidateMaxParameters.h b/gfx/angle/src/compiler/translator/ValidateMaxParameters.h index fdd0b8d09..87916afef 100755 --- a/gfx/angle/src/compiler/translator/ValidateMaxParameters.h +++ b/gfx/angle/src/compiler/translator/ValidateMaxParameters.h @@ -10,9 +10,6 @@ #include "compiler/translator/IntermNode.h" -namespace sh -{ - class ValidateMaxParameters : public TIntermTraverser { public: @@ -29,6 +26,4 @@ class ValidateMaxParameters : public TIntermTraverser bool mValid; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_VALIDATEMAXPARAMETERS_H_ diff --git a/gfx/angle/src/compiler/translator/ValidateOutputs.cpp b/gfx/angle/src/compiler/translator/ValidateOutputs.cpp index e48da8a79..9f5f8f577 100755 --- a/gfx/angle/src/compiler/translator/ValidateOutputs.cpp +++ b/gfx/angle/src/compiler/translator/ValidateOutputs.cpp @@ -9,9 +9,6 @@ #include "compiler/translator/InitializeParseContext.h" #include "compiler/translator/ParseContext.h" -namespace sh -{ - namespace { void error(int *errorCount, TInfoSinkBase &sink, const TIntermSymbol &symbol, const char *reason) @@ -109,5 +106,3 @@ int ValidateOutputs::validateAndCountErrors(TInfoSinkBase &sink) const } return errorCount; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/ValidateOutputs.h b/gfx/angle/src/compiler/translator/ValidateOutputs.h index 0788f4ed6..0122ca25f 100755 --- a/gfx/angle/src/compiler/translator/ValidateOutputs.h +++ b/gfx/angle/src/compiler/translator/ValidateOutputs.h @@ -12,9 +12,6 @@ #include -namespace sh -{ - class TInfoSinkBase; class ValidateOutputs : public TIntermTraverser @@ -36,6 +33,4 @@ class ValidateOutputs : public TIntermTraverser std::set mVisitedSymbols; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_VALIDATEOUTPUTS_H_ diff --git a/gfx/angle/src/compiler/translator/ValidateSwitch.cpp b/gfx/angle/src/compiler/translator/ValidateSwitch.cpp index 9bcd8f5fe..9a4ed3363 100755 --- a/gfx/angle/src/compiler/translator/ValidateSwitch.cpp +++ b/gfx/angle/src/compiler/translator/ValidateSwitch.cpp @@ -8,13 +8,8 @@ #include "compiler/translator/ParseContext.h" -namespace sh -{ - -bool ValidateSwitch::validate(TBasicType switchType, - TParseContext *context, - TIntermBlock *statementList, - const TSourceLoc &loc) +bool ValidateSwitch::validate(TBasicType switchType, TParseContext *context, + TIntermAggregate *statementList, const TSourceLoc &loc) { ValidateSwitch validate(switchType, context); ASSERT(statementList); @@ -61,14 +56,6 @@ bool ValidateSwitch::visitBinary(Visit, TIntermBinary *) } bool ValidateSwitch::visitUnary(Visit, TIntermUnary *) -{ - if (!mFirstCaseFound) - mStatementBeforeCase = true; - mLastStatementWasCase = false; - return true; -} - -bool ValidateSwitch::visitTernary(Visit, TIntermTernary *) { if (!mFirstCaseFound) mStatementBeforeCase = true; @@ -76,7 +63,7 @@ bool ValidateSwitch::visitTernary(Visit, TIntermTernary *) return true; } -bool ValidateSwitch::visitIfElse(Visit visit, TIntermIfElse *) +bool ValidateSwitch::visitSelection(Visit visit, TIntermSelection *) { if (visit == PreVisit) ++mControlFlowDepth; @@ -211,5 +198,3 @@ bool ValidateSwitch::validateInternal(const TSourceLoc &loc) return !mStatementBeforeCase && !mLastStatementWasCase && !mCaseInsideControlFlow && !mCaseTypeMismatch && mDefaultCount <= 1 && !mDuplicateCases; } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/ValidateSwitch.h b/gfx/angle/src/compiler/translator/ValidateSwitch.h index feffbc03c..ddbefc561 100755 --- a/gfx/angle/src/compiler/translator/ValidateSwitch.h +++ b/gfx/angle/src/compiler/translator/ValidateSwitch.h @@ -9,8 +9,6 @@ #include "compiler/translator/IntermNode.h" -namespace sh -{ class TParseContext; class ValidateSwitch : public TIntermTraverser @@ -18,17 +16,14 @@ class ValidateSwitch : public TIntermTraverser public: // Check for errors and output messages any remaining errors on the context. // Returns true if there are no errors. - static bool validate(TBasicType switchType, - TParseContext *context, - TIntermBlock *statementList, - const TSourceLoc &loc); + static bool validate(TBasicType switchType, TParseContext *context, + TIntermAggregate *statementList, const TSourceLoc &loc); void visitSymbol(TIntermSymbol *) override; void visitConstantUnion(TIntermConstantUnion *) override; bool visitBinary(Visit, TIntermBinary *) override; bool visitUnary(Visit, TIntermUnary *) override; - bool visitTernary(Visit, TIntermTernary *) override; - bool visitIfElse(Visit visit, TIntermIfElse *) override; + bool visitSelection(Visit visit, TIntermSelection *) override; bool visitSwitch(Visit, TIntermSwitch *) override; bool visitCase(Visit, TIntermCase *node) override; bool visitAggregate(Visit, TIntermAggregate *) override; @@ -54,6 +49,4 @@ class ValidateSwitch : public TIntermTraverser bool mDuplicateCases; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_VALIDATESWITCH_H_ diff --git a/gfx/angle/src/compiler/translator/VariableInfo.cpp b/gfx/angle/src/compiler/translator/VariableInfo.cpp index 07fe12e5d..7e1e5cd82 100755 --- a/gfx/angle/src/compiler/translator/VariableInfo.cpp +++ b/gfx/angle/src/compiler/translator/VariableInfo.cpp @@ -559,43 +559,54 @@ void CollectVariables::visitInfoList(const TIntermSequence &sequence, } } -bool CollectVariables::visitDeclaration(Visit, TIntermDeclaration *node) +bool CollectVariables::visitAggregate(Visit, TIntermAggregate *node) { - const TIntermSequence &sequence = *(node->getSequence()); - ASSERT(!sequence.empty()); + bool visitChildren = true; - const TIntermTyped &typedNode = *(sequence.front()->getAsTyped()); - TQualifier qualifier = typedNode.getQualifier(); - - if (typedNode.getBasicType() == EbtInterfaceBlock) + switch (node->getOp()) { - visitInfoList(sequence, mInterfaceBlocks); - return false; - } - else if (qualifier == EvqAttribute || qualifier == EvqVertexIn || qualifier == EvqFragmentOut || - qualifier == EvqUniform || IsVarying(qualifier)) - { - switch (qualifier) + case EOpDeclaration: { - case EvqAttribute: - case EvqVertexIn: - visitInfoList(sequence, mAttribs); - break; - case EvqFragmentOut: - visitInfoList(sequence, mOutputVariables); - break; - case EvqUniform: - visitInfoList(sequence, mUniforms); - break; - default: - visitInfoList(sequence, mVaryings); - break; - } + const TIntermSequence &sequence = *(node->getSequence()); + ASSERT(!sequence.empty()); - return false; + const TIntermTyped &typedNode = *(sequence.front()->getAsTyped()); + TQualifier qualifier = typedNode.getQualifier(); + + if (typedNode.getBasicType() == EbtInterfaceBlock) + { + visitInfoList(sequence, mInterfaceBlocks); + visitChildren = false; + } + else if (qualifier == EvqAttribute || qualifier == EvqVertexIn || + qualifier == EvqFragmentOut || qualifier == EvqUniform || + IsVarying(qualifier)) + { + switch (qualifier) + { + case EvqAttribute: + case EvqVertexIn: + visitInfoList(sequence, mAttribs); + break; + case EvqFragmentOut: + visitInfoList(sequence, mOutputVariables); + break; + case EvqUniform: + visitInfoList(sequence, mUniforms); + break; + default: + visitInfoList(sequence, mVaryings); + break; + } + + visitChildren = false; + } + break; + } + default: break; } - return true; + return visitChildren; } bool CollectVariables::visitBinary(Visit, TIntermBinary *binaryNode) diff --git a/gfx/angle/src/compiler/translator/VariableInfo.h b/gfx/angle/src/compiler/translator/VariableInfo.h index 6b2115656..f79035d38 100755 --- a/gfx/angle/src/compiler/translator/VariableInfo.h +++ b/gfx/angle/src/compiler/translator/VariableInfo.h @@ -31,7 +31,7 @@ class CollectVariables : public TIntermTraverser const TExtensionBehavior &extensionBehavior); void visitSymbol(TIntermSymbol *symbol) override; - bool visitDeclaration(Visit, TIntermDeclaration *node) override; + bool visitAggregate(Visit, TIntermAggregate *node) override; bool visitBinary(Visit visit, TIntermBinary *binaryNode) override; private: diff --git a/gfx/angle/src/compiler/translator/VersionGLSL.cpp b/gfx/angle/src/compiler/translator/VersionGLSL.cpp index 9e593ac76..c8718daa1 100755 --- a/gfx/angle/src/compiler/translator/VersionGLSL.cpp +++ b/gfx/angle/src/compiler/translator/VersionGLSL.cpp @@ -6,9 +6,6 @@ #include "compiler/translator/VersionGLSL.h" -namespace sh -{ - int ShaderOutputTypeToGLSLVersion(ShShaderOutput output) { switch (output) @@ -65,22 +62,25 @@ void TVersionGLSL::visitSymbol(TIntermSymbol *node) } } -bool TVersionGLSL::visitDeclaration(Visit, TIntermDeclaration *node) -{ - const TIntermSequence &sequence = *(node->getSequence()); - if (sequence.front()->getAsTyped()->getType().isInvariant()) - { - ensureVersionIsAtLeast(GLSL_VERSION_120); - } - return true; -} - bool TVersionGLSL::visitAggregate(Visit, TIntermAggregate *node) { bool visitChildren = true; switch (node->getOp()) { + case EOpSequence: + // We need to visit sequence children to get to global or inner scope. + visitChildren = true; + break; + case EOpDeclaration: + { + const TIntermSequence &sequence = *(node->getSequence()); + if (sequence.front()->getAsTyped()->getType().isInvariant()) + { + ensureVersionIsAtLeast(GLSL_VERSION_120); + } + break; + } case EOpInvariantDeclaration: ensureVersionIsAtLeast(GLSL_VERSION_120); break; @@ -138,4 +138,3 @@ void TVersionGLSL::ensureVersionIsAtLeast(int version) mVersion = std::max(version, mVersion); } -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/VersionGLSL.h b/gfx/angle/src/compiler/translator/VersionGLSL.h index 380349be0..c41069d42 100755 --- a/gfx/angle/src/compiler/translator/VersionGLSL.h +++ b/gfx/angle/src/compiler/translator/VersionGLSL.h @@ -11,9 +11,6 @@ #include "compiler/translator/Pragma.h" -namespace sh -{ - static const int GLSL_VERSION_110 = 110; static const int GLSL_VERSION_120 = 120; static const int GLSL_VERSION_130 = 130; @@ -61,7 +58,6 @@ class TVersionGLSL : public TIntermTraverser void visitSymbol(TIntermSymbol *) override; bool visitAggregate(Visit, TIntermAggregate *) override; - bool visitDeclaration(Visit, TIntermDeclaration *node) override; private: void ensureVersionIsAtLeast(int version); @@ -69,6 +65,4 @@ class TVersionGLSL : public TIntermTraverser int mVersion; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_VERSIONGLSL_H_ diff --git a/gfx/angle/src/compiler/translator/blocklayout.h b/gfx/angle/src/compiler/translator/blocklayout.h index 298a72c92..dd5fe0737 100755 --- a/gfx/angle/src/compiler/translator/blocklayout.h +++ b/gfx/angle/src/compiler/translator/blocklayout.h @@ -24,7 +24,7 @@ struct Uniform; struct Varying; struct InterfaceBlock; -struct BlockMemberInfo +struct COMPILER_EXPORT BlockMemberInfo { BlockMemberInfo() : offset(-1), arrayStride(-1), matrixStride(-1), isRowMajorMatrix(false) {} @@ -46,7 +46,7 @@ struct BlockMemberInfo bool isRowMajorMatrix; }; -class BlockLayoutEncoder +class COMPILER_EXPORT BlockLayoutEncoder { public: BlockLayoutEncoder(); @@ -77,7 +77,7 @@ class BlockLayoutEncoder // Block layout according to the std140 block layout // See "Standard Uniform Block Layout" in Section 2.11.6 of the OpenGL ES 3.0 specification -class Std140BlockEncoder : public BlockLayoutEncoder +class COMPILER_EXPORT Std140BlockEncoder : public BlockLayoutEncoder { public: Std140BlockEncoder(); diff --git a/gfx/angle/src/compiler/translator/blocklayoutHLSL.h b/gfx/angle/src/compiler/translator/blocklayoutHLSL.h index 8d98847bd..c61cb1ae5 100755 --- a/gfx/angle/src/compiler/translator/blocklayoutHLSL.h +++ b/gfx/angle/src/compiler/translator/blocklayoutHLSL.h @@ -24,7 +24,7 @@ namespace sh // The strategy should be ENCODE_LOOSE for D3D9 constant blocks, and ENCODE_PACKED // for everything else (D3D10+ constant blocks and all attributes/varyings). -class HLSLBlockEncoder : public BlockLayoutEncoder +class COMPILER_EXPORT HLSLBlockEncoder : public BlockLayoutEncoder { public: enum HLSLBlockEncoderStrategy @@ -54,8 +54,9 @@ class HLSLBlockEncoder : public BlockLayoutEncoder // This method returns the number of used registers for a ShaderVariable. It is dependent on the HLSLBlockEncoder // class to count the number of used registers in a struct (which are individually packed according to the same rules). -unsigned int HLSLVariableRegisterCount(const Varying &variable, bool transposeMatrices); -unsigned int HLSLVariableRegisterCount(const Uniform &variable, ShShaderOutput outputType); +COMPILER_EXPORT unsigned int HLSLVariableRegisterCount(const Varying &variable, bool transposeMatrices); +COMPILER_EXPORT unsigned int HLSLVariableRegisterCount(const Uniform &variable, ShShaderOutput outputType); + } #endif // COMMON_BLOCKLAYOUTHLSL_H_ diff --git a/gfx/angle/src/compiler/translator/depgraph/DependencyGraph.cpp b/gfx/angle/src/compiler/translator/depgraph/DependencyGraph.cpp new file mode 100644 index 000000000..4dee0dbd2 --- /dev/null +++ b/gfx/angle/src/compiler/translator/depgraph/DependencyGraph.cpp @@ -0,0 +1,95 @@ +// +// Copyright (c) 2012 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 "compiler/translator/depgraph/DependencyGraph.h" +#include "compiler/translator/depgraph/DependencyGraphBuilder.h" + +TDependencyGraph::TDependencyGraph(TIntermNode* intermNode) +{ + TDependencyGraphBuilder::build(intermNode, this); +} + +TDependencyGraph::~TDependencyGraph() +{ + for (TGraphNodeVector::const_iterator iter = mAllNodes.begin(); iter != mAllNodes.end(); ++iter) + { + TGraphNode* node = *iter; + delete node; + } +} + +TGraphArgument* TDependencyGraph::createArgument(TIntermAggregate* intermFunctionCall, + int argumentNumber) +{ + TGraphArgument* argument = new TGraphArgument(intermFunctionCall, argumentNumber); + mAllNodes.push_back(argument); + return argument; +} + +TGraphFunctionCall* TDependencyGraph::createFunctionCall(TIntermAggregate* intermFunctionCall) +{ + TGraphFunctionCall* functionCall = new TGraphFunctionCall(intermFunctionCall); + mAllNodes.push_back(functionCall); + if (functionCall->getIntermFunctionCall()->isUserDefined()) + mUserDefinedFunctionCalls.push_back(functionCall); + return functionCall; +} + +TGraphSymbol* TDependencyGraph::getOrCreateSymbol(TIntermSymbol* intermSymbol) +{ + TSymbolIdMap::const_iterator iter = mSymbolIdMap.find(intermSymbol->getId()); + + TGraphSymbol* symbol = NULL; + + if (iter != mSymbolIdMap.end()) { + TSymbolIdPair pair = *iter; + symbol = pair.second; + } else { + symbol = new TGraphSymbol(intermSymbol); + mAllNodes.push_back(symbol); + + TSymbolIdPair pair(intermSymbol->getId(), symbol); + mSymbolIdMap.insert(pair); + + // We save all sampler symbols in a collection, so we can start graph traversals from them quickly. + if (IsSampler(intermSymbol->getBasicType())) + mSamplerSymbols.push_back(symbol); + } + + return symbol; +} + +TGraphSelection* TDependencyGraph::createSelection(TIntermSelection* intermSelection) +{ + TGraphSelection* selection = new TGraphSelection(intermSelection); + mAllNodes.push_back(selection); + return selection; +} + +TGraphLoop* TDependencyGraph::createLoop(TIntermLoop* intermLoop) +{ + TGraphLoop* loop = new TGraphLoop(intermLoop); + mAllNodes.push_back(loop); + return loop; +} + +TGraphLogicalOp* TDependencyGraph::createLogicalOp(TIntermBinary* intermLogicalOp) +{ + TGraphLogicalOp* logicalOp = new TGraphLogicalOp(intermLogicalOp); + mAllNodes.push_back(logicalOp); + return logicalOp; +} + +const char* TGraphLogicalOp::getOpString() const +{ + const char* opString = NULL; + switch (getIntermLogicalOp()->getOp()) { + case EOpLogicalAnd: opString = "and"; break; + case EOpLogicalOr: opString = "or"; break; + default: opString = "unknown"; break; + } + return opString; +} diff --git a/gfx/angle/src/compiler/translator/depgraph/DependencyGraph.h b/gfx/angle/src/compiler/translator/depgraph/DependencyGraph.h new file mode 100644 index 000000000..2f7f7b9ab --- /dev/null +++ b/gfx/angle/src/compiler/translator/depgraph/DependencyGraph.h @@ -0,0 +1,199 @@ +// +// Copyright (c) 2012 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. +// + +#ifndef COMPILER_TRANSLATOR_DEPGRAPH_DEPENDENCYGRAPH_H_ +#define COMPILER_TRANSLATOR_DEPGRAPH_DEPENDENCYGRAPH_H_ + +#include "compiler/translator/IntermNode.h" + +#include +#include + +class TGraphNode; +class TGraphParentNode; +class TGraphArgument; +class TGraphFunctionCall; +class TGraphSymbol; +class TGraphSelection; +class TGraphLoop; +class TGraphLogicalOp; +class TDependencyGraphTraverser; +class TDependencyGraphOutput; + +typedef std::set TGraphNodeSet; +typedef std::vector TGraphNodeVector; +typedef std::vector TGraphSymbolVector; +typedef std::vector TFunctionCallVector; + +// +// Base class for all dependency graph nodes. +// +class TGraphNode { +public: + TGraphNode(TIntermNode* node) : intermNode(node) {} + virtual ~TGraphNode() {} + virtual void traverse(TDependencyGraphTraverser* graphTraverser); +protected: + TIntermNode* intermNode; +}; + +// +// Base class for dependency graph nodes that may have children. +// +class TGraphParentNode : public TGraphNode { +public: + TGraphParentNode(TIntermNode* node) : TGraphNode(node) {} + ~TGraphParentNode() override {} + void addDependentNode(TGraphNode* node) { if (node != this) mDependentNodes.insert(node); } + void traverse(TDependencyGraphTraverser *graphTraverser) override; + +private: + TGraphNodeSet mDependentNodes; +}; + +// +// Handle function call arguments. +// +class TGraphArgument : public TGraphParentNode { +public: + TGraphArgument(TIntermAggregate* intermFunctionCall, int argumentNumber) + : TGraphParentNode(intermFunctionCall) + , mArgumentNumber(argumentNumber) {} + ~TGraphArgument() override {} + const TIntermAggregate* getIntermFunctionCall() const { return intermNode->getAsAggregate(); } + int getArgumentNumber() const { return mArgumentNumber; } + void traverse(TDependencyGraphTraverser *graphTraverser) override; + +private: + int mArgumentNumber; +}; + +// +// Handle function calls. +// +class TGraphFunctionCall : public TGraphParentNode { +public: + TGraphFunctionCall(TIntermAggregate* intermFunctionCall) + : TGraphParentNode(intermFunctionCall) {} + ~TGraphFunctionCall() override {} + const TIntermAggregate* getIntermFunctionCall() const { return intermNode->getAsAggregate(); } + void traverse(TDependencyGraphTraverser *graphTraverser) override; +}; + +// +// Handle symbols. +// +class TGraphSymbol : public TGraphParentNode { +public: + TGraphSymbol(TIntermSymbol* intermSymbol) : TGraphParentNode(intermSymbol) {} + ~TGraphSymbol() override {} + const TIntermSymbol* getIntermSymbol() const { return intermNode->getAsSymbolNode(); } + void traverse(TDependencyGraphTraverser *graphTraverser) override; +}; + +// +// Handle if statements and ternary operators. +// +class TGraphSelection : public TGraphNode { +public: + TGraphSelection(TIntermSelection* intermSelection) : TGraphNode(intermSelection) {} + ~TGraphSelection() override {} + const TIntermSelection* getIntermSelection() const { return intermNode->getAsSelectionNode(); } + void traverse(TDependencyGraphTraverser *graphTraverser) override; +}; + +// +// Handle for, do-while, and while loops. +// +class TGraphLoop : public TGraphNode { +public: + TGraphLoop(TIntermLoop* intermLoop) : TGraphNode(intermLoop) {} + ~TGraphLoop() override {} + const TIntermLoop* getIntermLoop() const { return intermNode->getAsLoopNode(); } + void traverse(TDependencyGraphTraverser *graphTraverser) override; +}; + +// +// Handle logical and, or. +// +class TGraphLogicalOp : public TGraphNode { +public: + TGraphLogicalOp(TIntermBinary* intermLogicalOp) : TGraphNode(intermLogicalOp) {} + ~TGraphLogicalOp() override {} + const TIntermBinary* getIntermLogicalOp() const { return intermNode->getAsBinaryNode(); } + const char* getOpString() const; + void traverse(TDependencyGraphTraverser *graphTraverser) override; +}; + +// +// A dependency graph of symbols, function calls, conditions etc. +// +// This class provides an interface to the entry points of the dependency graph. +// +// Dependency graph nodes should be created by using one of the provided "create..." methods. +// This class (and nobody else) manages the memory of the created nodes. +// Nodes may not be removed after being added, so all created nodes will exist while the +// TDependencyGraph instance exists. +// +class TDependencyGraph { +public: + TDependencyGraph(TIntermNode* intermNode); + ~TDependencyGraph(); + const TGraphNodeVector &allNodes() const { return mAllNodes; } + const TGraphSymbolVector &samplerSymbols() const { return mSamplerSymbols; } + const TFunctionCallVector &userDefinedFunctionCalls() const + { + return mUserDefinedFunctionCalls; + } + + TGraphArgument* createArgument(TIntermAggregate* intermFunctionCall, int argumentNumber); + TGraphFunctionCall* createFunctionCall(TIntermAggregate* intermFunctionCall); + TGraphSymbol* getOrCreateSymbol(TIntermSymbol* intermSymbol); + TGraphSelection* createSelection(TIntermSelection* intermSelection); + TGraphLoop* createLoop(TIntermLoop* intermLoop); + TGraphLogicalOp* createLogicalOp(TIntermBinary* intermLogicalOp); +private: + typedef TMap TSymbolIdMap; + typedef std::pair TSymbolIdPair; + + TGraphNodeVector mAllNodes; + TGraphSymbolVector mSamplerSymbols; + TFunctionCallVector mUserDefinedFunctionCalls; + TSymbolIdMap mSymbolIdMap; +}; + +// +// For traversing the dependency graph. Users should derive from this, +// put their traversal specific data in it, and then pass it to a +// traverse method. +// +// When using this, just fill in the methods for nodes you want visited. +// +class TDependencyGraphTraverser : angle::NonCopyable { +public: + TDependencyGraphTraverser() : mDepth(0) {} + virtual ~TDependencyGraphTraverser() {} + + virtual void visitSymbol(TGraphSymbol* symbol) {}; + virtual void visitArgument(TGraphArgument* selection) {}; + virtual void visitFunctionCall(TGraphFunctionCall* functionCall) {}; + virtual void visitSelection(TGraphSelection* selection) {}; + virtual void visitLoop(TGraphLoop* loop) {}; + virtual void visitLogicalOp(TGraphLogicalOp* logicalOp) {}; + + int getDepth() const { return mDepth; } + void incrementDepth() { ++mDepth; } + void decrementDepth() { --mDepth; } + + void clearVisited() { mVisited.clear(); } + void markVisited(TGraphNode* node) { mVisited.insert(node); } + bool isVisited(TGraphNode* node) const { return mVisited.find(node) != mVisited.end(); } +private: + int mDepth; + TGraphNodeSet mVisited; +}; + +#endif // COMPILER_TRANSLATOR_DEPGRAPH_DEPENDENCYGRAPH_H_ diff --git a/gfx/angle/src/compiler/translator/depgraph/DependencyGraphBuilder.cpp b/gfx/angle/src/compiler/translator/depgraph/DependencyGraphBuilder.cpp new file mode 100644 index 000000000..1aeb822d5 --- /dev/null +++ b/gfx/angle/src/compiler/translator/depgraph/DependencyGraphBuilder.cpp @@ -0,0 +1,255 @@ +// +// Copyright (c) 2012 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 "compiler/translator/depgraph/DependencyGraphBuilder.h" + +void TDependencyGraphBuilder::build(TIntermNode *node, TDependencyGraph *graph) +{ + TDependencyGraphBuilder builder(graph); + builder.build(node); +} + +bool TDependencyGraphBuilder::visitAggregate( + Visit visit, TIntermAggregate *intermAggregate) +{ + switch (intermAggregate->getOp()) + { + case EOpFunction: + visitFunctionDefinition(intermAggregate); + break; + case EOpFunctionCall: + visitFunctionCall(intermAggregate); + break; + default: + visitAggregateChildren(intermAggregate); + break; + } + return false; +} + +void TDependencyGraphBuilder::visitFunctionDefinition( + TIntermAggregate *intermAggregate) +{ + // Currently, we do not support user defined functions. + if (intermAggregate->getName() != "main(") + return; + + visitAggregateChildren(intermAggregate); +} + +// Takes an expression like "f(x)" and creates a dependency graph like +// "x -> argument 0 -> function call". +void TDependencyGraphBuilder::visitFunctionCall( + TIntermAggregate *intermFunctionCall) +{ + TGraphFunctionCall *functionCall = + mGraph->createFunctionCall(intermFunctionCall); + + // Run through the function call arguments. + int argumentNumber = 0; + TIntermSequence *intermArguments = intermFunctionCall->getSequence(); + for (TIntermSequence::const_iterator iter = intermArguments->begin(); + iter != intermArguments->end(); + ++iter, ++argumentNumber) + { + TNodeSetMaintainer nodeSetMaintainer(this); + + TIntermNode *intermArgument = *iter; + intermArgument->traverse(this); + + if (TParentNodeSet *argumentNodes = mNodeSets.getTopSet()) + { + TGraphArgument *argument = mGraph->createArgument( + intermFunctionCall, argumentNumber); + connectMultipleNodesToSingleNode(argumentNodes, argument); + argument->addDependentNode(functionCall); + } + } + + // Push the leftmost symbol of this function call into the current set of + // dependent symbols to represent the result of this function call. + // Thus, an expression like "y = f(x)" will yield a dependency graph like + // "x -> argument 0 -> function call -> y". + // This line essentially passes the function call node back up to an earlier + // visitAssignment call, which will create the connection "function call -> y". + mNodeSets.insertIntoTopSet(functionCall); +} + +void TDependencyGraphBuilder::visitAggregateChildren( + TIntermAggregate *intermAggregate) +{ + TIntermSequence *sequence = intermAggregate->getSequence(); + for (TIntermSequence::const_iterator iter = sequence->begin(); + iter != sequence->end(); ++iter) + { + TIntermNode *intermChild = *iter; + intermChild->traverse(this); + } +} + +void TDependencyGraphBuilder::visitSymbol(TIntermSymbol *intermSymbol) +{ + // Push this symbol into the set of dependent symbols for the current + // assignment or condition that we are traversing. + TGraphSymbol *symbol = mGraph->getOrCreateSymbol(intermSymbol); + mNodeSets.insertIntoTopSet(symbol); + + // If this symbol is the current leftmost symbol under an assignment, replace + // the previous leftmost symbol with this symbol. + if (!mLeftmostSymbols.empty() && mLeftmostSymbols.top() != &mRightSubtree) + { + mLeftmostSymbols.pop(); + mLeftmostSymbols.push(symbol); + } +} + +bool TDependencyGraphBuilder::visitBinary(Visit visit, TIntermBinary *intermBinary) +{ + TOperator op = intermBinary->getOp(); + if (op == EOpInitialize || intermBinary->isAssignment()) + visitAssignment(intermBinary); + else if (op == EOpLogicalAnd || op == EOpLogicalOr) + visitLogicalOp(intermBinary); + else + visitBinaryChildren(intermBinary); + + return false; +} + +void TDependencyGraphBuilder::visitAssignment(TIntermBinary *intermAssignment) +{ + TIntermTyped *intermLeft = intermAssignment->getLeft(); + if (!intermLeft) + return; + + TGraphSymbol *leftmostSymbol = NULL; + + { + TNodeSetMaintainer nodeSetMaintainer(this); + + { + TLeftmostSymbolMaintainer leftmostSymbolMaintainer(this, mLeftSubtree); + intermLeft->traverse(this); + leftmostSymbol = mLeftmostSymbols.top(); + + // After traversing the left subtree of this assignment, we should + // have found a real leftmost symbol, and the leftmost symbol should + // not be a placeholder. + ASSERT(leftmostSymbol != &mLeftSubtree); + ASSERT(leftmostSymbol != &mRightSubtree); + } + + if (TIntermTyped *intermRight = intermAssignment->getRight()) + { + TLeftmostSymbolMaintainer leftmostSymbolMaintainer(this, mRightSubtree); + intermRight->traverse(this); + } + + if (TParentNodeSet *assignmentNodes = mNodeSets.getTopSet()) + connectMultipleNodesToSingleNode(assignmentNodes, leftmostSymbol); + } + + // Push the leftmost symbol of this assignment into the current set of dependent + // symbols to represent the result of this assignment. + // An expression like "a = (b = c)" will yield a dependency graph like + // "c -> b -> a". + // This line essentially passes the leftmost symbol of the nested assignment + // ("b" in this example) back up to the earlier visitAssignment call for the + // outer assignment, which will create the connection "b -> a". + mNodeSets.insertIntoTopSet(leftmostSymbol); +} + +void TDependencyGraphBuilder::visitLogicalOp(TIntermBinary *intermLogicalOp) +{ + if (TIntermTyped *intermLeft = intermLogicalOp->getLeft()) + { + TNodeSetPropagatingMaintainer nodeSetMaintainer(this); + + intermLeft->traverse(this); + if (TParentNodeSet *leftNodes = mNodeSets.getTopSet()) + { + TGraphLogicalOp *logicalOp = mGraph->createLogicalOp(intermLogicalOp); + connectMultipleNodesToSingleNode(leftNodes, logicalOp); + } + } + + if (TIntermTyped *intermRight = intermLogicalOp->getRight()) + { + TLeftmostSymbolMaintainer leftmostSymbolMaintainer(this, mRightSubtree); + intermRight->traverse(this); + } +} + +void TDependencyGraphBuilder::visitBinaryChildren(TIntermBinary *intermBinary) +{ + if (TIntermTyped *intermLeft = intermBinary->getLeft()) + intermLeft->traverse(this); + + if (TIntermTyped *intermRight = intermBinary->getRight()) + { + TLeftmostSymbolMaintainer leftmostSymbolMaintainer(this, mRightSubtree); + intermRight->traverse(this); + } +} + +bool TDependencyGraphBuilder::visitSelection( + Visit visit, TIntermSelection *intermSelection) +{ + if (TIntermNode *intermCondition = intermSelection->getCondition()) + { + TNodeSetMaintainer nodeSetMaintainer(this); + + intermCondition->traverse(this); + if (TParentNodeSet *conditionNodes = mNodeSets.getTopSet()) + { + TGraphSelection *selection = mGraph->createSelection(intermSelection); + connectMultipleNodesToSingleNode(conditionNodes, selection); + } + } + + if (TIntermNode *intermTrueBlock = intermSelection->getTrueBlock()) + intermTrueBlock->traverse(this); + + if (TIntermNode *intermFalseBlock = intermSelection->getFalseBlock()) + intermFalseBlock->traverse(this); + + return false; +} + +bool TDependencyGraphBuilder::visitLoop(Visit visit, TIntermLoop *intermLoop) +{ + if (TIntermTyped *intermCondition = intermLoop->getCondition()) + { + TNodeSetMaintainer nodeSetMaintainer(this); + + intermCondition->traverse(this); + if (TParentNodeSet *conditionNodes = mNodeSets.getTopSet()) + { + TGraphLoop *loop = mGraph->createLoop(intermLoop); + connectMultipleNodesToSingleNode(conditionNodes, loop); + } + } + + if (TIntermNode* intermBody = intermLoop->getBody()) + intermBody->traverse(this); + + if (TIntermTyped *intermExpression = intermLoop->getExpression()) + intermExpression->traverse(this); + + return false; +} + + +void TDependencyGraphBuilder::connectMultipleNodesToSingleNode( + TParentNodeSet *nodes, TGraphNode *node) const +{ + for (TParentNodeSet::const_iterator iter = nodes->begin(); + iter != nodes->end(); ++iter) + { + TGraphParentNode *currentNode = *iter; + currentNode->addDependentNode(node); + } +} diff --git a/gfx/angle/src/compiler/translator/depgraph/DependencyGraphBuilder.h b/gfx/angle/src/compiler/translator/depgraph/DependencyGraphBuilder.h new file mode 100644 index 000000000..c7b54f66b --- /dev/null +++ b/gfx/angle/src/compiler/translator/depgraph/DependencyGraphBuilder.h @@ -0,0 +1,199 @@ +// +// Copyright (c) 2012 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. +// + +#ifndef COMPILER_TRANSLATOR_DEPGRAPH_DEPENDENCYGRAPHBUILDER_H_ +#define COMPILER_TRANSLATOR_DEPGRAPH_DEPENDENCYGRAPHBUILDER_H_ + +#include "compiler/translator/depgraph/DependencyGraph.h" + +// +// Creates a dependency graph of symbols, function calls, conditions etc. by +// traversing a intermediate tree. +// +class TDependencyGraphBuilder : public TIntermTraverser +{ + public: + static void build(TIntermNode *node, TDependencyGraph *graph); + + void visitSymbol(TIntermSymbol *) override; + bool visitBinary(Visit visit, TIntermBinary *) override; + bool visitSelection(Visit visit, TIntermSelection *) override; + bool visitAggregate(Visit visit, TIntermAggregate *) override; + bool visitLoop(Visit visit, TIntermLoop *) override; + + private: + typedef std::stack TSymbolStack; + typedef std::set TParentNodeSet; + + // + // For collecting the dependent nodes of assignments, conditions, etc. + // while traversing the intermediate tree. + // + // This data structure is stack of sets. Each set contains dependency graph + // parent nodes. + // + class TNodeSetStack + { + public: + TNodeSetStack() {}; + ~TNodeSetStack() { clear(); } + + // This should only be called after a pushSet. + // Returns NULL if the top set is empty. + TParentNodeSet *getTopSet() const + { + ASSERT(!mNodeSets.empty()); + TParentNodeSet *topSet = mNodeSets.top(); + return !topSet->empty() ? topSet : NULL; + } + + void pushSet() { mNodeSets.push(new TParentNodeSet()); } + void popSet() + { + ASSERT(!mNodeSets.empty()); + delete mNodeSets.top(); + mNodeSets.pop(); + } + + // Pops the top set and adds its contents to the new top set. + // This should only be called after a pushSet. + // If there is no set below the top set, the top set is just deleted. + void popSetIntoNext() + { + ASSERT(!mNodeSets.empty()); + TParentNodeSet *oldTopSet = mNodeSets.top(); + mNodeSets.pop(); + + if (!mNodeSets.empty()) + { + TParentNodeSet *newTopSet = mNodeSets.top(); + newTopSet->insert(oldTopSet->begin(), oldTopSet->end()); + } + + delete oldTopSet; + } + + // Does nothing if there is no top set. + // This can be called when there is no top set if we are visiting + // symbols that are not under an assignment or condition. + // We don't need to track those symbols. + void insertIntoTopSet(TGraphParentNode *node) + { + if (mNodeSets.empty()) + return; + + mNodeSets.top()->insert(node); + } + + void clear() + { + while (!mNodeSets.empty()) + popSet(); + } + + private: + typedef std::stack TParentNodeSetStack; + + TParentNodeSetStack mNodeSets; + }; + + // + // An instance of this class pushes a new node set when instantiated. + // When the instance goes out of scope, it and pops the node set. + // + class TNodeSetMaintainer : angle::NonCopyable + { + public: + TNodeSetMaintainer(TDependencyGraphBuilder *factory) + : mSets(factory->mNodeSets) + { + mSets.pushSet(); + } + ~TNodeSetMaintainer() { mSets.popSet(); } + protected: + TNodeSetStack &mSets; + }; + + // + // An instance of this class pushes a new node set when instantiated. + // When the instance goes out of scope, it and pops the top node set and adds + // its contents to the new top node set. + // + class TNodeSetPropagatingMaintainer : angle::NonCopyable + { + public: + TNodeSetPropagatingMaintainer(TDependencyGraphBuilder *factory) + : mSets(factory->mNodeSets) + { + mSets.pushSet(); + } + ~TNodeSetPropagatingMaintainer() { mSets.popSetIntoNext(); } + protected: + TNodeSetStack &mSets; + }; + + // + // An instance of this class keeps track of the leftmost symbol while we're + // exploring an assignment. + // It will push the placeholder symbol kLeftSubtree when instantiated under a + // left subtree, and kRightSubtree under a right subtree. + // When it goes out of scope, it will pop the leftmost symbol at the top of the + // scope. + // During traversal, the TDependencyGraphBuilder will replace kLeftSubtree with + // a real symbol. + // kRightSubtree will never be replaced by a real symbol because we are tracking + // the leftmost symbol. + // + class TLeftmostSymbolMaintainer : angle::NonCopyable + { + public: + TLeftmostSymbolMaintainer( + TDependencyGraphBuilder *factory, TGraphSymbol &subtree) + : mLeftmostSymbols(factory->mLeftmostSymbols) + { + mNeedsPlaceholderSymbol = + mLeftmostSymbols.empty() || mLeftmostSymbols.top() != &subtree; + if (mNeedsPlaceholderSymbol) + mLeftmostSymbols.push(&subtree); + } + + ~TLeftmostSymbolMaintainer() + { + if (mNeedsPlaceholderSymbol) + mLeftmostSymbols.pop(); + } + + protected: + TSymbolStack& mLeftmostSymbols; + bool mNeedsPlaceholderSymbol; + }; + + TDependencyGraphBuilder(TDependencyGraph *graph) + : TIntermTraverser(true, false, false), + mLeftSubtree(NULL), + mRightSubtree(NULL), + mGraph(graph) {} + void build(TIntermNode *intermNode) { intermNode->traverse(this); } + + void connectMultipleNodesToSingleNode( + TParentNodeSet *nodes, TGraphNode *node) const; + + void visitAssignment(TIntermBinary *); + void visitLogicalOp(TIntermBinary *); + void visitBinaryChildren(TIntermBinary *); + void visitFunctionDefinition(TIntermAggregate *); + void visitFunctionCall(TIntermAggregate *intermFunctionCall); + void visitAggregateChildren(TIntermAggregate *); + + TGraphSymbol mLeftSubtree; + TGraphSymbol mRightSubtree; + + TDependencyGraph *mGraph; + TNodeSetStack mNodeSets; + TSymbolStack mLeftmostSymbols; +}; + +#endif // COMPILER_TRANSLATOR_DEPGRAPH_DEPENDENCYGRAPHBUILDER_H_ diff --git a/gfx/angle/src/compiler/translator/depgraph/DependencyGraphOutput.cpp b/gfx/angle/src/compiler/translator/depgraph/DependencyGraphOutput.cpp new file mode 100644 index 000000000..32a2f3014 --- /dev/null +++ b/gfx/angle/src/compiler/translator/depgraph/DependencyGraphOutput.cpp @@ -0,0 +1,64 @@ +// +// Copyright (c) 2012 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 "compiler/translator/depgraph/DependencyGraphOutput.h" + +void TDependencyGraphOutput::outputIndentation() +{ + for (int i = 0; i < getDepth(); ++i) + mSink << " "; +} + +void TDependencyGraphOutput::visitArgument(TGraphArgument* parameter) +{ + outputIndentation(); + mSink << "argument " << parameter->getArgumentNumber() << " of call to " + << parameter->getIntermFunctionCall()->getName() << "\n"; +} + +void TDependencyGraphOutput::visitFunctionCall(TGraphFunctionCall* functionCall) +{ + outputIndentation(); + mSink << "function call " << functionCall->getIntermFunctionCall()->getName() << "\n"; +} + +void TDependencyGraphOutput::visitSymbol(TGraphSymbol* symbol) +{ + outputIndentation(); + mSink << symbol->getIntermSymbol()->getSymbol() << " (symbol id: " + << symbol->getIntermSymbol()->getId() << ")\n"; +} + +void TDependencyGraphOutput::visitSelection(TGraphSelection* selection) +{ + outputIndentation(); + mSink << "selection\n"; +} + +void TDependencyGraphOutput::visitLoop(TGraphLoop* loop) +{ + outputIndentation(); + mSink << "loop condition\n"; +} + +void TDependencyGraphOutput::visitLogicalOp(TGraphLogicalOp* logicalOp) +{ + outputIndentation(); + mSink << "logical " << logicalOp->getOpString() << "\n"; +} + +void TDependencyGraphOutput::outputAllSpanningTrees(TDependencyGraph& graph) +{ + mSink << "\n"; + + for (auto symbol : graph.allNodes()) + { + mSink << "--- Dependency graph spanning tree ---\n"; + clearVisited(); + symbol->traverse(this); + mSink << "\n"; + } +} diff --git a/gfx/angle/src/compiler/translator/depgraph/DependencyGraphOutput.h b/gfx/angle/src/compiler/translator/depgraph/DependencyGraphOutput.h new file mode 100644 index 000000000..b201e0a67 --- /dev/null +++ b/gfx/angle/src/compiler/translator/depgraph/DependencyGraphOutput.h @@ -0,0 +1,31 @@ +// +// Copyright (c) 2012 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. +// + +#ifndef COMPILER_TRANSLATOR_DEPGRAPH_DEPENDENCYGRAPHOUTPUT_H_ +#define COMPILER_TRANSLATOR_DEPGRAPH_DEPENDENCYGRAPHOUTPUT_H_ + +#include "compiler/translator/depgraph/DependencyGraph.h" +#include "compiler/translator/InfoSink.h" + +class TDependencyGraphOutput : public TDependencyGraphTraverser +{ + public: + TDependencyGraphOutput(TInfoSinkBase& sink) : mSink(sink) {} + void visitSymbol(TGraphSymbol* symbol) override; + void visitArgument(TGraphArgument* parameter) override; + void visitFunctionCall(TGraphFunctionCall* functionCall) override; + void visitSelection(TGraphSelection* selection) override; + void visitLoop(TGraphLoop* loop) override; + void visitLogicalOp(TGraphLogicalOp* logicalOp) override; + + void outputAllSpanningTrees(TDependencyGraph& graph); + private: + void outputIndentation(); + + TInfoSinkBase& mSink; +}; + +#endif // COMPILER_TRANSLATOR_DEPGRAPH_DEPENDENCYGRAPHOUTPUT_H_ diff --git a/gfx/angle/src/compiler/translator/depgraph/DependencyGraphTraverse.cpp b/gfx/angle/src/compiler/translator/depgraph/DependencyGraphTraverse.cpp new file mode 100644 index 000000000..197fde97e --- /dev/null +++ b/gfx/angle/src/compiler/translator/depgraph/DependencyGraphTraverse.cpp @@ -0,0 +1,69 @@ +// +// Copyright (c) 2012 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 "compiler/translator/depgraph/DependencyGraph.h" + +// These methods do a breadth-first traversal through the graph and mark visited nodes. + +void TGraphNode::traverse(TDependencyGraphTraverser* graphTraverser) +{ + graphTraverser->markVisited(this); +} + +void TGraphParentNode::traverse(TDependencyGraphTraverser* graphTraverser) +{ + TGraphNode::traverse(graphTraverser); + + graphTraverser->incrementDepth(); + + // Visit the parent node's children. + for (TGraphNodeSet::const_iterator iter = mDependentNodes.begin(); + iter != mDependentNodes.end(); + ++iter) + { + TGraphNode* node = *iter; + if (!graphTraverser->isVisited(node)) + node->traverse(graphTraverser); + } + + graphTraverser->decrementDepth(); +} + +void TGraphArgument::traverse(TDependencyGraphTraverser* graphTraverser) +{ + graphTraverser->visitArgument(this); + TGraphParentNode::traverse(graphTraverser); +} + +void TGraphFunctionCall::traverse(TDependencyGraphTraverser* graphTraverser) +{ + graphTraverser->visitFunctionCall(this); + TGraphParentNode::traverse(graphTraverser); +} + +void TGraphSymbol::traverse(TDependencyGraphTraverser* graphTraverser) +{ + graphTraverser->visitSymbol(this); + TGraphParentNode::traverse(graphTraverser); +} + +void TGraphSelection::traverse(TDependencyGraphTraverser* graphTraverser) +{ + graphTraverser->visitSelection(this); + TGraphNode::traverse(graphTraverser); +} + +void TGraphLoop::traverse(TDependencyGraphTraverser* graphTraverser) +{ + graphTraverser->visitLoop(this); + TGraphNode::traverse(graphTraverser); +} + +void TGraphLogicalOp::traverse(TDependencyGraphTraverser* graphTraverser) +{ + graphTraverser->visitLogicalOp(this); + TGraphNode::traverse(graphTraverser); +} diff --git a/gfx/angle/src/compiler/translator/glslang.h b/gfx/angle/src/compiler/translator/glslang.h index aaa5dd119..0555e96d4 100755 --- a/gfx/angle/src/compiler/translator/glslang.h +++ b/gfx/angle/src/compiler/translator/glslang.h @@ -7,18 +7,14 @@ #ifndef COMPILER_TRANSLATOR_GLSLANG_H_ #define COMPILER_TRANSLATOR_GLSLANG_H_ -namespace sh -{ class TParseContext; -} - -extern int glslang_initialize(sh::TParseContext *context); -extern int glslang_finalize(sh::TParseContext *context); +extern int glslang_initialize(TParseContext* context); +extern int glslang_finalize(TParseContext* context); extern int glslang_scan(size_t count, - const char *const string[], + const char* const string[], const int length[], - sh::TParseContext *context); -extern int glslang_parse(sh::TParseContext *context); + TParseContext* context); +extern int glslang_parse(TParseContext* context); #endif // COMPILER_TRANSLATOR_GLSLANG_H_ diff --git a/gfx/angle/src/compiler/translator/glslang.l b/gfx/angle/src/compiler/translator/glslang.l index a30f2c33e..7fe289302 100755 --- a/gfx/angle/src/compiler/translator/glslang.l +++ b/gfx/angle/src/compiler/translator/glslang.l @@ -22,8 +22,6 @@ WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp). // This file is auto-generated by generate_parser.sh. DO NOT EDIT! -/* clang-format off */ - // Ignore errors in auto-generated code. #if defined(__GNUC__) #pragma GCC diagnostic ignored "-Wunused-function" @@ -46,9 +44,6 @@ WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp). #include "compiler/preprocessor/Token.h" #include "compiler/translator/util.h" #include "compiler/translator/length_limits.h" - -using namespace sh; - #include "glslang_tab.h" /* windows only pragma */ @@ -76,8 +71,6 @@ static int reserved_word(yyscan_t yyscanner); static int ES2_reserved_ES3_keyword(TParseContext *context, int token); static int ES2_keyword_ES3_reserved(TParseContext *context, int token); static int ES2_ident_ES3_keyword(TParseContext *context, int token); -static int ES2_ident_ES3_reserved_ES3_1_keyword(TParseContext *context, int token); -static int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token); static int uint_constant(TParseContext *context); static int int_constant(TParseContext *context); static int float_constant(yyscan_t yyscanner); @@ -194,25 +187,11 @@ O [0-7] "layout" { return ES2_ident_ES3_keyword(context, LAYOUT); } -"image2D" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE2D); } -"iimage2D" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE2D); } -"uimage2D" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE2D); } -"image2DArray" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE2DARRAY); } -"iimage2DArray" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE2DARRAY); } -"uimage2DArray" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE2DARRAY); } -"image3D" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE3D); } -"uimage3D" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE3D); } -"iimage3D" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE3D); } -"iimageCube" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGECUBE); } -"uimageCube" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGECUBE); } -"imageCube" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGECUBE); } -"readonly" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, READONLY); } -"writeonly" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, WRITEONLY); } -"coherent" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, COHERENT); } -"restrict" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, RESTRICT); } -"volatile" { return ES2_and_ES3_reserved_ES3_1_keyword(context, VOLATILE); } - /* Reserved keywords for GLSL ES 3.00 that are not reserved for GLSL ES 1.00 */ +"coherent" | +"restrict" | +"readonly" | +"writeonly" | "resource" | "atomic_uint" | "noperspective" | @@ -225,11 +204,23 @@ O [0-7] "filter" | "image1D" | +"image2D" | +"image3D" | +"imageCube" | "iimage1D" | +"iimage2D" | +"iimage3D" | +"iimageCube" | "uimage1D" | +"uimage2D" | +"uimage3D" | +"uimageCube" | "image1DArray" | +"image2DArray" | "iimage1DArray" | +"iimage2DArray" | "uimage1DArray" | +"uimage2DArray" | "image1DShadow" | "image2DShadow" | "image1DArrayShadow" | @@ -287,6 +278,7 @@ O [0-7] "inline" | "noinline" | +"volatile" | "public" | "static" | "extern" | @@ -471,24 +463,6 @@ int ES2_keyword_ES3_reserved(TParseContext *context, int token) return token; } -int ES2_ident_ES3_reserved_ES3_1_keyword(TParseContext *context, int token) -{ - struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); - yyscan_t yyscanner = (yyscan_t) context->getScanner(); - - if (context->getShaderVersion() < 300) - { - yylval->lex.string = NewPoolTString(yytext); - return check_type(yyscanner); - } - else if (context->getShaderVersion() == 300) - { - return reserved_word(yyscanner); - } - - return token; -} - int ES2_ident_ES3_keyword(TParseContext *context, int token) { struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); @@ -504,18 +478,6 @@ int ES2_ident_ES3_keyword(TParseContext *context, int token) return token; } -int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token) -{ - yyscan_t yyscanner = (yyscan_t) context->getScanner(); - - if (context->getShaderVersion() < 310) - { - return reserved_word(yyscanner); - } - - return token; -} - int uint_constant(TParseContext *context) { struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); @@ -617,7 +579,8 @@ int glslang_scan(size_t count, const char* const string[], const int length[], if (context->getFragmentPrecisionHigh()) preprocessor->predefineMacro("GL_FRAGMENT_PRECISION_HIGH", 1); - preprocessor->setMaxTokenSize(sh::GetGlobalMaxTokenSize(context->getShaderSpec())); + preprocessor->setMaxTokenSize(GetGlobalMaxTokenSize(context->getShaderSpec())); return 0; } + diff --git a/gfx/angle/src/compiler/translator/glslang.y b/gfx/angle/src/compiler/translator/glslang.y index c15dd9d6e..8604d8eb6 100755 --- a/gfx/angle/src/compiler/translator/glslang.y +++ b/gfx/angle/src/compiler/translator/glslang.y @@ -46,8 +46,6 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h). #define YYENABLE_NLS 0 -using namespace sh; - %} %expect 1 /* One shift reduce conflict because of if | else */ %parse-param {TParseContext* context} @@ -74,27 +72,22 @@ using namespace sh; struct { TOperator op; union { - TIntermNode *intermNode; + TIntermNode* intermNode; TIntermNodePair nodePair; - TIntermTyped *intermTypedNode; - TIntermAggregate *intermAggregate; - TIntermBlock *intermBlock; - TIntermDeclaration *intermDeclaration; - TIntermSwitch *intermSwitch; - TIntermCase *intermCase; + TIntermTyped* intermTypedNode; + TIntermAggregate* intermAggregate; + TIntermSwitch* intermSwitch; + TIntermCase* intermCase; }; union { - TTypeSpecifierNonArray typeSpecifierNonArray; TPublicType type; TPrecision precision; TLayoutQualifier layoutQualifier; TQualifier qualifier; - TFunction *function; + TFunction* function; TParameter param; - TField *field; - TFieldList *fieldList; - TQualifierWrapperBase *qualifierWrapper; - TTypeQualifierBuilder *typeQualifierBuilder; + TField* field; + TFieldList* fieldList; }; } interm; } @@ -169,14 +162,11 @@ extern void yyerror(YYLTYPE* yylloc, TParseContext* context, void *scanner, cons %token MATRIX2 MATRIX3 MATRIX4 IN_QUAL OUT_QUAL INOUT_QUAL UNIFORM VARYING %token MATRIX2x3 MATRIX3x2 MATRIX2x4 MATRIX4x2 MATRIX3x4 MATRIX4x3 %token CENTROID FLAT SMOOTH -%token READONLY WRITEONLY COHERENT RESTRICT VOLATILE %token STRUCT VOID_TYPE WHILE %token SAMPLER2D SAMPLERCUBE SAMPLER_EXTERNAL_OES SAMPLER2DRECT SAMPLER2DARRAY %token ISAMPLER2D ISAMPLER3D ISAMPLERCUBE ISAMPLER2DARRAY %token USAMPLER2D USAMPLER3D USAMPLERCUBE USAMPLER2DARRAY %token SAMPLER3D SAMPLER3DRECT SAMPLER2DSHADOW SAMPLERCUBESHADOW SAMPLER2DARRAYSHADOW -%token IMAGE2D IIMAGE2D UIMAGE2D IMAGE3D IIMAGE3D UIMAGE3D IMAGE2DARRAY IIMAGE2DARRAY UIMAGE2DARRAY -%token IMAGECUBE IIMAGECUBE UIMAGECUBE %token LAYOUT %token IDENTIFIER TYPE_NAME FLOATCONSTANT INTCONSTANT UINTCONSTANT BOOLCONSTANT @@ -202,9 +192,9 @@ extern void yyerror(YYLTYPE* yylloc, TParseContext* context, void *scanner, cons %type shift_expression and_expression exclusive_or_expression inclusive_or_expression %type function_call initializer condition conditionopt -%type translation_unit -%type function_definition statement simple_statement -%type statement_list compound_statement compound_statement_no_new_scope +%type translation_unit function_definition +%type statement simple_statement +%type statement_list compound_statement compound_statement_no_new_scope %type declaration_statement selection_statement expression_statement %type declaration external_declaration %type for_init_statement @@ -215,18 +205,13 @@ extern void yyerror(YYLTYPE* yylloc, TParseContext* context, void *scanner, cons %type single_declaration init_declarator_list %type parameter_declaration parameter_declarator parameter_type_specifier -%type layout_qualifier_id_list layout_qualifier_id - -%type fully_specified_type type_specifier +%type parameter_qualifier parameter_type_qualifier +%type layout_qualifier layout_qualifier_id_list layout_qualifier_id %type precision_qualifier -%type layout_qualifier -%type interpolation_qualifier -%type storage_qualifier single_type_qualifier invariant_qualifier -%type type_qualifier - -%type type_specifier_nonarray struct_specifier -%type type_specifier_no_prec +%type type_qualifier fully_specified_type type_specifier storage_qualifier interpolation_qualifier +%type type_specifier_no_prec type_specifier_nonarray +%type struct_specifier %type struct_declarator %type struct_declarator_list struct_declaration struct_declaration_list %type function_header function_declarator function_identifier @@ -358,7 +343,7 @@ function_call_header_with_parameters const TType *type = new TType($2->getType()); $1->addParameter(TConstParameter(type)); $$.function = $1; - $$.nodePair.node1 = TIntermediate::MakeAggregate($2, @2); + $$.nodePair.node1 = context->intermediate.makeAggregate($2, @2); } | function_call_header_with_parameters COMMA assignment_expression { const TType *type = new TType($3->getType()); @@ -609,43 +594,41 @@ declaration $$ = context->addFunctionPrototypeDeclaration(*($1.function), @1); } | init_declarator_list SEMICOLON { - $$ = $1.intermDeclaration; + TIntermAggregate *aggNode = $1.intermAggregate; + if (aggNode && aggNode->getOp() == EOpNull) + aggNode->setOp(EOpDeclaration); + $$ = aggNode; } | PRECISION precision_qualifier type_specifier_no_prec SEMICOLON { if (($2 == EbpHigh) && (context->getShaderType() == GL_FRAGMENT_SHADER) && !context->getFragmentPrecisionHigh()) { context->error(@1, "precision is not supported in fragment shader", "highp"); } if (!context->symbolTable.setDefaultPrecision( $3, $2 )) { - context->error(@1, "illegal type argument for default precision qualifier", getBasicString($3.getBasicType())); + context->error(@1, "illegal type argument for default precision qualifier", getBasicString($3.type)); } $$ = 0; } | type_qualifier enter_struct struct_declaration_list RIGHT_BRACE SEMICOLON { - ES3_OR_NEWER($2.string->c_str(), @1, "interface blocks"); - $$ = context->addInterfaceBlock(*$1, @2, *$2.string, $3, NULL, @$, NULL, @$); + ES3_OR_NEWER(getQualifierString($1.qualifier), @1, "interface blocks"); + $$ = context->addInterfaceBlock($1, @2, *$2.string, $3, NULL, @$, NULL, @$); } | type_qualifier enter_struct struct_declaration_list RIGHT_BRACE IDENTIFIER SEMICOLON { - ES3_OR_NEWER($2.string->c_str(), @1, "interface blocks"); - $$ = context->addInterfaceBlock(*$1, @2, *$2.string, $3, $5.string, @5, NULL, @$); + ES3_OR_NEWER(getQualifierString($1.qualifier), @1, "interface blocks"); + $$ = context->addInterfaceBlock($1, @2, *$2.string, $3, $5.string, @5, NULL, @$); } | type_qualifier enter_struct struct_declaration_list RIGHT_BRACE IDENTIFIER LEFT_BRACKET constant_expression RIGHT_BRACKET SEMICOLON { - ES3_OR_NEWER($2.string->c_str(), @1, "interface blocks"); - $$ = context->addInterfaceBlock(*$1, @2, *$2.string, $3, $5.string, @5, $7, @6); + ES3_OR_NEWER(getQualifierString($1.qualifier), @1, "interface blocks"); + $$ = context->addInterfaceBlock($1, @2, *$2.string, $3, $5.string, @5, $7, @6); } | type_qualifier SEMICOLON { - context->parseGlobalLayoutQualifier(*$1); + context->parseGlobalLayoutQualifier($1); $$ = 0; } - | type_qualifier IDENTIFIER SEMICOLON // e.g. to qualify an existing variable as invariant - { - $$ = context->parseInvariantDeclaration(*$1, @2, $2.string, $2.symbol); - } ; function_prototype : function_declarator RIGHT_PAREN { $$.function = context->parseFunctionDeclarator(@2, $1); - context->exitFunctionDeclaration(); } ; @@ -692,14 +675,13 @@ function_header $$ = context->parseFunctionHeader($1, $2.string, @2); context->symbolTable.push(); - context->enterFunctionDeclaration(); } ; parameter_declarator // Type + name : type_specifier identifier { - if ($1.getBasicType() == EbtVoid) { + if ($1.type == EbtVoid) { context->error(@2, "illegal use of type 'void'", $2.string->c_str()); } context->checkIsNotReserved(@2, *$2.string); @@ -731,21 +713,41 @@ parameter_declaration // // Type + name // - : type_qualifier parameter_declarator { + : parameter_type_qualifier parameter_qualifier parameter_declarator { + $$ = $3; + context->checkIsParameterQualifierValid(@3, $1, $2, $$.param.type); + } + | parameter_qualifier parameter_declarator { $$ = $2; - context->checkIsParameterQualifierValid(@2, *$1, $2.param.type); + context->checkOutParameterIsNotSampler(@2, $1, *$2.param.type); + context->checkIsParameterQualifierValid(@2, EvqTemporary, $1, $$.param.type); } - | parameter_declarator { - $$ = $1; - $$.param.type->setQualifier(EvqIn); + // + // Only type + // + | parameter_type_qualifier parameter_qualifier parameter_type_specifier { + $$ = $3; + context->checkIsParameterQualifierValid(@3, $1, $2, $$.param.type); } - | type_qualifier parameter_type_specifier { + | parameter_qualifier parameter_type_specifier { $$ = $2; - context->checkIsParameterQualifierValid(@2, *$1, $2.param.type); + context->checkOutParameterIsNotSampler(@2, $1, *$2.param.type); + context->checkIsParameterQualifierValid(@2, EvqTemporary, $1, $$.param.type); } - | parameter_type_specifier { - $$ = $1; - $$.param.type->setQualifier(EvqIn); + ; + +parameter_qualifier + : /* empty */ { + $$ = EvqIn; + } + | IN_QUAL { + $$ = EvqIn; + } + | OUT_QUAL { + $$ = EvqOut; + } + | INOUT_QUAL { + $$ = EvqInOut; } ; @@ -762,209 +764,209 @@ init_declarator_list } | init_declarator_list COMMA identifier { $$ = $1; - context->parseDeclarator($$.type, @3, *$3.string, $$.intermDeclaration); + $$.intermAggregate = context->parseDeclarator($$.type, $1.intermAggregate, @3, *$3.string); } | init_declarator_list COMMA identifier LEFT_BRACKET constant_expression RIGHT_BRACKET { $$ = $1; - context->parseArrayDeclarator($$.type, @3, *$3.string, @4, $5, $$.intermDeclaration); + $$.intermAggregate = context->parseArrayDeclarator($$.type, $1.intermAggregate, @3, *$3.string, @4, $5); } | init_declarator_list COMMA identifier LEFT_BRACKET RIGHT_BRACKET EQUAL initializer { ES3_OR_NEWER("[]", @3, "implicitly sized array"); $$ = $1; - context->parseArrayInitDeclarator($$.type, @3, *$3.string, @4, nullptr, @6, $7, $$.intermDeclaration); + $$.intermAggregate = context->parseArrayInitDeclarator($$.type, $1.intermAggregate, @3, *$3.string, @4, nullptr, @6, $7); } | init_declarator_list COMMA identifier LEFT_BRACKET constant_expression RIGHT_BRACKET EQUAL initializer { ES3_OR_NEWER("=", @7, "first-class arrays (array initializer)"); $$ = $1; - context->parseArrayInitDeclarator($$.type, @3, *$3.string, @4, $5, @7, $8, $$.intermDeclaration); + $$.intermAggregate = context->parseArrayInitDeclarator($$.type, $1.intermAggregate, @3, *$3.string, @4, $5, @7, $8); } | init_declarator_list COMMA identifier EQUAL initializer { $$ = $1; - context->parseInitDeclarator($$.type, @3, *$3.string, @4, $5, $$.intermDeclaration); + $$.intermAggregate = context->parseInitDeclarator($$.type, $1.intermAggregate, @3, *$3.string, @4, $5); } ; single_declaration : fully_specified_type { $$.type = $1; - $$.intermDeclaration = context->parseSingleDeclaration($$.type, @1, ""); + $$.intermAggregate = context->parseSingleDeclaration($$.type, @1, ""); } | fully_specified_type identifier { $$.type = $1; - $$.intermDeclaration = context->parseSingleDeclaration($$.type, @2, *$2.string); + $$.intermAggregate = context->parseSingleDeclaration($$.type, @2, *$2.string); } | fully_specified_type identifier LEFT_BRACKET constant_expression RIGHT_BRACKET { $$.type = $1; - $$.intermDeclaration = context->parseSingleArrayDeclaration($$.type, @2, *$2.string, @3, $4); + $$.intermAggregate = context->parseSingleArrayDeclaration($$.type, @2, *$2.string, @3, $4); } | fully_specified_type identifier LEFT_BRACKET RIGHT_BRACKET EQUAL initializer { ES3_OR_NEWER("[]", @3, "implicitly sized array"); $$.type = $1; - $$.intermDeclaration = context->parseSingleArrayInitDeclaration($$.type, @2, *$2.string, @3, nullptr, @5, $6); + $$.intermAggregate = context->parseSingleArrayInitDeclaration($$.type, @2, *$2.string, @3, nullptr, @5, $6); } | fully_specified_type identifier LEFT_BRACKET constant_expression RIGHT_BRACKET EQUAL initializer { ES3_OR_NEWER("=", @6, "first-class arrays (array initializer)"); $$.type = $1; - $$.intermDeclaration = context->parseSingleArrayInitDeclaration($$.type, @2, *$2.string, @3, $4, @6, $7); + $$.intermAggregate = context->parseSingleArrayInitDeclaration($$.type, @2, *$2.string, @3, $4, @6, $7); } | fully_specified_type identifier EQUAL initializer { $$.type = $1; - $$.intermDeclaration = context->parseSingleInitDeclaration($$.type, @2, *$2.string, @3, $4); + $$.intermAggregate = context->parseSingleInitDeclaration($$.type, @2, *$2.string, @3, $4); + } + | INVARIANT IDENTIFIER { + // $$.type is not used in invariant declarations. + $$.intermAggregate = context->parseInvariantDeclaration(@1, @2, $2.string, $2.symbol); } ; fully_specified_type : type_specifier { - context->addFullySpecifiedType(&$1); $$ = $1; + + if ($1.array) { + ES3_OR_NEWER("[]", @1, "first-class-array"); + if (context->getShaderVersion() != 300) { + $1.clearArrayness(); + } + } } - | type_qualifier type_specifier { - $$ = context->addFullySpecifiedType(*$1, $2); + | type_qualifier type_specifier { + $$ = context->addFullySpecifiedType($1.qualifier, $1.invariant, $1.layoutQualifier, $2); } ; interpolation_qualifier : SMOOTH { - $$ = EvqSmooth; + $$.qualifier = EvqSmooth; } | FLAT { - $$ = EvqFlat; + $$.qualifier = EvqFlat; } ; -type_qualifier - : single_type_qualifier { - $$ = context->createTypeQualifierBuilder(@1); - $$->appendQualifier($1); - } - | type_qualifier single_type_qualifier { - $$ = $1; - $$->appendQualifier($2); - } - ; - -invariant_qualifier - : INVARIANT { - // empty +parameter_type_qualifier + : CONST_QUAL { + $$ = EvqConst; } ; -single_type_qualifier - : storage_qualifier { - context->checkLocalVariableConstStorageQualifier(*$1); - $$ = $1; - } - | layout_qualifier { - context->checkIsAtGlobalLevel(@1, "layout"); - $$ = new TLayoutQualifierWrapper($1, @1); - } - | precision_qualifier { - $$ = new TPrecisionQualifierWrapper($1, @1); - } - | interpolation_qualifier { - $$ = new TInterpolationQualifierWrapper($1, @1); - } - | invariant_qualifier { - context->checkIsAtGlobalLevel(@1, "invariant"); - $$ = new TInvariantQualifierWrapper(@1); - } - ; - - -storage_qualifier - : - ATTRIBUTE { +type_qualifier + : ATTRIBUTE { VERTEX_ONLY("attribute", @1); ES2_ONLY("attribute", @1); context->checkIsAtGlobalLevel(@1, "attribute"); - $$ = new TStorageQualifierWrapper(EvqAttribute, @1); + $$.setBasic(EbtVoid, EvqAttribute, @1); } | VARYING { ES2_ONLY("varying", @1); context->checkIsAtGlobalLevel(@1, "varying"); if (context->getShaderType() == GL_VERTEX_SHADER) - $$ = new TStorageQualifierWrapper(EvqVaryingOut, @1); + $$.setBasic(EbtVoid, EvqVaryingOut, @1); else - $$ = new TStorageQualifierWrapper(EvqVaryingIn, @1); + $$.setBasic(EbtVoid, EvqVaryingIn, @1); } - | CONST_QUAL { - $$ = new TStorageQualifierWrapper(EvqConst, @1); + | INVARIANT VARYING { + ES2_ONLY("varying", @1); + context->checkIsAtGlobalLevel(@1, "invariant varying"); + if (context->getShaderType() == GL_VERTEX_SHADER) + $$.setBasic(EbtVoid, EvqVaryingOut, @1); + else + $$.setBasic(EbtVoid, EvqVaryingIn, @1); + $$.invariant = true; } - | IN_QUAL { - if (context->declaringFunction()) + | storage_qualifier { + if ($1.qualifier != EvqConst && !context->symbolTable.atGlobalLevel()) { - $$ = new TStorageQualifierWrapper(EvqIn, @1); + context->error(@1, "Local variables can only use the const storage qualifier.", getQualifierString($1.qualifier)); } - else if (context->getShaderType() == GL_FRAGMENT_SHADER) + $$.setBasic(EbtVoid, $1.qualifier, @1); + } + | interpolation_qualifier storage_qualifier { + $$ = context->joinInterpolationQualifiers(@1, $1.qualifier, @2, $2.qualifier); + } + | interpolation_qualifier { + context->error(@1, "interpolation qualifier requires a fragment 'in' or vertex 'out' storage qualifier", getInterpolationString($1.qualifier)); + + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtVoid, qual, @1); + } + | layout_qualifier { + $$.qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.layoutQualifier = $1; + } + | layout_qualifier storage_qualifier { + $$.setBasic(EbtVoid, $2.qualifier, @2); + $$.layoutQualifier = $1; + } + | INVARIANT storage_qualifier { + context->checkInvariantIsOutVariableES3($2.qualifier, @1); + $$.setBasic(EbtVoid, $2.qualifier, @2); + $$.invariant = true; + } + | INVARIANT interpolation_qualifier storage_qualifier { + context->checkInvariantIsOutVariableES3($3.qualifier, @1); + $$ = context->joinInterpolationQualifiers(@2, $2.qualifier, @3, $3.qualifier); + $$.invariant = true; + } + ; + +storage_qualifier + : CONST_QUAL { + $$.qualifier = EvqConst; + } + | IN_QUAL { + if (context->getShaderType() == GL_FRAGMENT_SHADER) { ES3_OR_NEWER("in", @1, "storage qualifier"); - $$ = new TStorageQualifierWrapper(EvqFragmentIn, @1); + $$.qualifier = EvqFragmentIn; } else if (context->getShaderType() == GL_VERTEX_SHADER) { ES3_OR_NEWER("in", @1, "storage qualifier"); - $$ = new TStorageQualifierWrapper(EvqVertexIn, @1); + $$.qualifier = EvqVertexIn; } else { - $$ = new TStorageQualifierWrapper(EvqComputeIn, @1); + $$.qualifier = EvqComputeIn; } } | OUT_QUAL { - if (context->declaringFunction()) - { - $$ = new TStorageQualifierWrapper(EvqOut, @1); - } - else - { - ES3_OR_NEWER("out", @1, "storage qualifier"); - NON_COMPUTE_ONLY("out", @1); - if (context->getShaderType() == GL_FRAGMENT_SHADER) - { - $$ = new TStorageQualifierWrapper(EvqFragmentOut, @1); - } - else - { - $$ = new TStorageQualifierWrapper(EvqVertexOut, @1); - } - } + ES3_OR_NEWER("out", @1, "storage qualifier"); + NON_COMPUTE_ONLY("out", @1); + $$.qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut; } - | INOUT_QUAL { - if (!context->declaringFunction()) - { - context->error(@1, "invalid inout qualifier", "'inout' can be only used with function parameters"); - } - $$ = new TStorageQualifierWrapper(EvqInOut, @1); + | CENTROID IN_QUAL { + ES3_OR_NEWER("centroid in", @1, "storage qualifier"); + FRAG_ONLY("centroid in", @1); + $$.qualifier = EvqCentroidIn; } - | CENTROID { - ES3_OR_NEWER("centroid", @1, "storage qualifier"); - $$ = new TStorageQualifierWrapper(EvqCentroid, @1); + | CENTROID OUT_QUAL { + ES3_OR_NEWER("centroid out", @1, "storage qualifier"); + VERTEX_ONLY("centroid out", @1); + $$.qualifier = EvqCentroidOut; } | UNIFORM { context->checkIsAtGlobalLevel(@1, "uniform"); - $$ = new TStorageQualifierWrapper(EvqUniform, @1); - } - | READONLY { - $$ = new TMemoryQualifierWrapper(EvqReadOnly, @1); - } - | WRITEONLY { - $$ = new TMemoryQualifierWrapper(EvqWriteOnly, @1); - } - | COHERENT { - $$ = new TMemoryQualifierWrapper(EvqCoherent, @1); - } - | RESTRICT { - $$ = new TMemoryQualifierWrapper(EvqRestrict, @1); - } - | VOLATILE { - $$ = new TMemoryQualifierWrapper(EvqVolatile, @1); + $$.qualifier = EvqUniform; } ; type_specifier : type_specifier_no_prec { $$ = $1; - $$.precision = context->symbolTable.getDefaultPrecision($1.getBasicType()); + + if ($$.precision == EbpUndefined) { + $$.precision = context->symbolTable.getDefaultPrecision($1.type); + context->checkPrecisionSpecified(@1, $$.precision, $1.type); + } + } + | precision_qualifier type_specifier_no_prec { + $$ = $2; + $$.precision = $1; + + if (!SupportsPrecision($2.type)) { + context->error(@1, "illegal type for precision qualifier", getBasicString($2.type)); + } } ; @@ -1010,16 +1012,17 @@ layout_qualifier_id type_specifier_no_prec : type_specifier_nonarray { - $$.initialize($1, (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary)); + $$ = $1; } | type_specifier_nonarray LEFT_BRACKET RIGHT_BRACKET { ES3_OR_NEWER("[]", @2, "implicitly sized array"); - $$.initialize($1, (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary)); + $$ = $1; $$.setArraySize(0); } | type_specifier_nonarray LEFT_BRACKET constant_expression RIGHT_BRACKET { - $$.initialize($1, (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary)); - if (context->checkIsValidTypeForArray(@2, $$)) + $$ = $1; + + if (context->checkIsValidTypeForArray(@2, $1)) { unsigned int size = context->checkIsValidArraySize(@2, $3); $$.setArraySize(size); @@ -1029,200 +1032,208 @@ type_specifier_no_prec type_specifier_nonarray : VOID_TYPE { - $$.initialize(EbtVoid, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtVoid, qual, @1); } | FLOAT_TYPE { - $$.initialize(EbtFloat, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtFloat, qual, @1); } | INT_TYPE { - $$.initialize(EbtInt, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtInt, qual, @1); } | UINT_TYPE { - $$.initialize(EbtUInt, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtUInt, qual, @1); } | BOOL_TYPE { - $$.initialize(EbtBool, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtBool, qual, @1); } | VEC2 { - $$.initialize(EbtFloat, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtFloat, qual, @1); $$.setAggregate(2); } | VEC3 { - $$.initialize(EbtFloat, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtFloat, qual, @1); $$.setAggregate(3); } | VEC4 { - $$.initialize(EbtFloat, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtFloat, qual, @1); $$.setAggregate(4); } | BVEC2 { - $$.initialize(EbtBool, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtBool, qual, @1); $$.setAggregate(2); } | BVEC3 { - $$.initialize(EbtBool, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtBool, qual, @1); $$.setAggregate(3); } | BVEC4 { - $$.initialize(EbtBool, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtBool, qual, @1); $$.setAggregate(4); } | IVEC2 { - $$.initialize(EbtInt, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtInt, qual, @1); $$.setAggregate(2); } | IVEC3 { - $$.initialize(EbtInt, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtInt, qual, @1); $$.setAggregate(3); } | IVEC4 { - $$.initialize(EbtInt, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtInt, qual, @1); $$.setAggregate(4); } | UVEC2 { - $$.initialize(EbtUInt, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtUInt, qual, @1); $$.setAggregate(2); } | UVEC3 { - $$.initialize(EbtUInt, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtUInt, qual, @1); $$.setAggregate(3); } | UVEC4 { - $$.initialize(EbtUInt, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtUInt, qual, @1); $$.setAggregate(4); } | MATRIX2 { - $$.initialize(EbtFloat, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtFloat, qual, @1); $$.setMatrix(2, 2); } | MATRIX3 { - $$.initialize(EbtFloat, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtFloat, qual, @1); $$.setMatrix(3, 3); } | MATRIX4 { - $$.initialize(EbtFloat, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtFloat, qual, @1); $$.setMatrix(4, 4); } | MATRIX2x3 { - $$.initialize(EbtFloat, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtFloat, qual, @1); $$.setMatrix(2, 3); } | MATRIX3x2 { - $$.initialize(EbtFloat, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtFloat, qual, @1); $$.setMatrix(3, 2); } | MATRIX2x4 { - $$.initialize(EbtFloat, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtFloat, qual, @1); $$.setMatrix(2, 4); } | MATRIX4x2 { - $$.initialize(EbtFloat, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtFloat, qual, @1); $$.setMatrix(4, 2); } | MATRIX3x4 { - $$.initialize(EbtFloat, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtFloat, qual, @1); $$.setMatrix(3, 4); } | MATRIX4x3 { - $$.initialize(EbtFloat, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtFloat, qual, @1); $$.setMatrix(4, 3); } | SAMPLER2D { - $$.initialize(EbtSampler2D, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtSampler2D, qual, @1); } | SAMPLER3D { - $$.initialize(EbtSampler3D, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtSampler3D, qual, @1); } | SAMPLERCUBE { - $$.initialize(EbtSamplerCube, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtSamplerCube, qual, @1); } | SAMPLER2DARRAY { - $$.initialize(EbtSampler2DArray, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtSampler2DArray, qual, @1); } | ISAMPLER2D { - $$.initialize(EbtISampler2D, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtISampler2D, qual, @1); } | ISAMPLER3D { - $$.initialize(EbtISampler3D, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtISampler3D, qual, @1); } | ISAMPLERCUBE { - $$.initialize(EbtISamplerCube, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtISamplerCube, qual, @1); } | ISAMPLER2DARRAY { - $$.initialize(EbtISampler2DArray, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtISampler2DArray, qual, @1); } | USAMPLER2D { - $$.initialize(EbtUSampler2D, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtUSampler2D, qual, @1); } | USAMPLER3D { - $$.initialize(EbtUSampler3D, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtUSampler3D, qual, @1); } | USAMPLERCUBE { - $$.initialize(EbtUSamplerCube, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtUSamplerCube, qual, @1); } | USAMPLER2DARRAY { - $$.initialize(EbtUSampler2DArray, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtUSampler2DArray, qual, @1); } | SAMPLER2DSHADOW { - $$.initialize(EbtSampler2DShadow, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtSampler2DShadow, qual, @1); } | SAMPLERCUBESHADOW { - $$.initialize(EbtSamplerCubeShadow, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtSamplerCubeShadow, qual, @1); } | SAMPLER2DARRAYSHADOW { - $$.initialize(EbtSampler2DArrayShadow, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtSampler2DArrayShadow, qual, @1); } | SAMPLER_EXTERNAL_OES { if (!context->supportsExtension("GL_OES_EGL_image_external") && !context->supportsExtension("GL_NV_EGL_stream_consumer_external")) { context->error(@1, "unsupported type", "samplerExternalOES"); } - $$.initialize(EbtSamplerExternalOES, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtSamplerExternalOES, qual, @1); } | SAMPLER2DRECT { if (!context->supportsExtension("GL_ARB_texture_rectangle")) { context->error(@1, "unsupported type", "sampler2DRect"); } - $$.initialize(EbtSampler2DRect, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtSampler2DRect, qual, @1); } | struct_specifier { $$ = $1; - } - | IMAGE2D { - $$.initialize(EbtImage2D, @1); - } - | IIMAGE2D { - $$.initialize(EbtIImage2D, @1); - } - | UIMAGE2D { - $$.initialize(EbtUImage2D, @1); - } - | IMAGE3D { - $$.initialize(EbtImage3D, @1); - } - | IIMAGE3D { - $$.initialize(EbtIImage3D, @1); - } - | UIMAGE3D { - $$.initialize(EbtUImage3D, @1); - } - | IMAGE2DARRAY { - $$.initialize(EbtImage2DArray, @1); - } - | IIMAGE2DARRAY { - $$.initialize(EbtIImage2DArray, @1); - } - | UIMAGE2DARRAY { - $$.initialize(EbtUImage2DArray, @1); - } - | IMAGECUBE { - $$.initialize(EbtImageCube, @1); - } - | IIMAGECUBE { - $$.initialize(EbtIImageCube, @1); - } - | UIMAGECUBE { - $$.initialize(EbtUImageCube, @1); + $$.qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; } | TYPE_NAME { // @@ -1230,7 +1241,8 @@ type_specifier_nonarray // type. // TType& structure = static_cast($1.symbol)->getType(); - $$.initialize(EbtStruct, @1); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + $$.setBasic(EbtStruct, qual, @1); $$.userDef = &structure; } ; @@ -1268,7 +1280,9 @@ struct_declaration } | type_qualifier type_specifier struct_declarator_list SEMICOLON { // ES3 Only, but errors should be handled elsewhere - $$ = context->addStructDeclaratorListWithQualifiers(*$1, &$2, $3); + $2.qualifier = $1.qualifier; + $2.layoutQualifier = $1.layoutQualifier; + $$ = context->addStructDeclaratorList($2, $3); } ; @@ -1329,6 +1343,7 @@ compound_statement : LEFT_BRACE RIGHT_BRACE { $$ = 0; } | LEFT_BRACE { context->symbolTable.push(); } statement_list { context->symbolTable.pop(); } RIGHT_BRACE { if ($3 != 0) { + $3->setOp(EOpSequence); $3->setLine(@$); } $$ = $3; @@ -1352,6 +1367,7 @@ compound_statement_no_new_scope } | LEFT_BRACE statement_list RIGHT_BRACE { if ($2) { + $2->setOp(EOpSequence); $2->setLine(@$); } $$ = $2; @@ -1360,13 +1376,10 @@ compound_statement_no_new_scope statement_list : statement { - $$ = new TIntermBlock(); - $$->setLine(@$); - $$->appendStatement($1); + $$ = context->intermediate.makeAggregate($1, @$); } | statement_list statement { - $$ = $1; - $$->appendStatement($2); + $$ = context->intermediate.growAggregate($1, $2, @$); } ; @@ -1378,7 +1391,7 @@ expression_statement selection_statement : IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement { context->checkIsScalarBool(@1, $3); - $$ = context->intermediate.addIfElse($3, $5, @1); + $$ = context->intermediate.addSelection($3, $5, @1); } ; @@ -1416,10 +1429,10 @@ condition context->checkIsScalarBool($1->getLine(), $1); } | fully_specified_type identifier EQUAL initializer { - TIntermBinary *initNode = nullptr; + TIntermNode *intermNode; context->checkIsScalarBool(@2, $1); - if (!context->executeInitializer(@2, *$2.string, $1, $4, &initNode)) + if (!context->executeInitializer(@2, *$2.string, $1, $4, &intermNode)) $$ = $4; else { $$ = 0; @@ -1498,13 +1511,12 @@ jump_statement translation_unit : external_declaration { - $$ = new TIntermBlock(); - $$->setLine(@$); - $$->appendStatement($1); + $$ = $1; context->setTreeRoot($$); } | translation_unit external_declaration { - $$->appendStatement($2); + $$ = context->intermediate.growAggregate($1, $2, @$); + context->setTreeRoot($$); } ; @@ -1519,7 +1531,7 @@ external_declaration function_definition : function_prototype { - context->parseFunctionDefinitionHeader(@1, &($1.function), &$1.intermAggregate); + context->parseFunctionPrototype(@1, $1.function, &$1.intermAggregate); } compound_statement_no_new_scope { $$ = context->addFunctionDefinition(*($1.function), $1.intermAggregate, $3, @1); diff --git a/gfx/angle/src/compiler/translator/glslang_lex.cpp b/gfx/angle/src/compiler/translator/glslang_lex.cpp index 2dcc1bc0f..8ad7b1464 100755 --- a/gfx/angle/src/compiler/translator/glslang_lex.cpp +++ b/gfx/angle/src/compiler/translator/glslang_lex.cpp @@ -1,3 +1,4 @@ +#line 17 "./glslang.l" // // Copyright (c) 2012-2013 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be @@ -6,8 +7,6 @@ // This file is auto-generated by generate_parser.sh. DO NOT EDIT! -/* clang-format off */ - // Ignore errors in auto-generated code. #if defined(__GNUC__) #pragma GCC diagnostic ignored "-Wunused-function" @@ -25,7 +24,7 @@ -#line 30 "./glslang_lex.cpp" +#line 28 "./glslang_lex.cpp" #define YY_INT_ALIGNED short int @@ -221,7 +220,7 @@ typedef size_t yy_size_t; #define YY_LESS_LINENO(n) \ do { \ yy_size_t yyl;\ - for ( yyl = n; yyl < static_cast(yyleng); ++yyl )\ + for ( yyl = n; yyl < yyleng; ++yyl )\ if ( yytext[yyl] == '\n' )\ --yylineno;\ }while(0) @@ -396,7 +395,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; @@ -429,7 +428,7 @@ static yyconst flex_int16_t yy_accept[820] = 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 199, 203, 235, 0, 189, 185, 0, 188, 182, - 0, 184, 178, 195, 196, 177, 137, 177, 177, 177, + 0, 184, 178, 195, 196, 177, 136, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 13, 177, 177, 177, 177, 177, 177, 177, 177, 177, @@ -441,67 +440,67 @@ static yyconst flex_int16_t yy_accept[820] = 177, 177, 177, 177, 177, 177, 177, 177, 0, 186, 0, 185, 187, 181, 177, 177, 177, 30, 177, 177, 18, 174, 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 16, 140, 177, 177, 177, 177, 21, 177, - 177, 144, 155, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 16, 139, 177, 177, 177, 177, 21, 177, + 177, 143, 155, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 152, 4, 35, 36, 37, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 143, 31, 177, 177, 28, 177, + 177, 177, 177, 177, 142, 31, 177, 177, 28, 177, 177, 177, 177, 177, 177, 177, 47, 48, 49, 29, 177, 177, 177, 177, 177, 177, 10, 53, 54, 55, - 177, 138, 177, 177, 7, 177, 177, 177, 177, 164, + 177, 137, 177, 177, 7, 177, 177, 177, 177, 164, 165, 166, 177, 32, 177, 156, 26, 167, 168, 169, 2, 161, 162, 163, 177, 177, 177, 25, 159, 177, 177, 177, 50, 51, 52, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 99, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 86, 177, 177, 177, 177, 177, 177, 177, 153, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 139, 177, 177, 176, - 56, 57, 58, 177, 177, 14, 177, 104, 177, 177, - 177, 177, 102, 177, 177, 177, 154, 149, 105, 177, - 177, 177, 177, 177, 177, 145, 177, 177, 177, 78, + 177, 177, 177, 177, 177, 177, 138, 177, 177, 176, + 56, 57, 58, 177, 177, 14, 177, 91, 177, 177, + 177, 177, 89, 177, 177, 177, 154, 149, 92, 177, + 177, 177, 177, 177, 177, 144, 177, 177, 177, 78, 38, 41, 43, 42, 39, 45, 44, 46, 40, 177, - 177, 177, 177, 160, 136, 177, 177, 147, 177, 177, - 177, 34, 100, 173, 22, 148, 77, 177, 158, 17, + 177, 177, 177, 160, 135, 177, 177, 147, 177, 177, + 177, 34, 87, 173, 22, 148, 77, 177, 158, 17, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 19, 33, 177, 177, 177, 177, - 177, 177, 106, 79, 85, 177, 177, 177, 177, 177, + 177, 177, 93, 94, 95, 177, 177, 177, 177, 177, 3, 177, 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 141, 177, 177, 177, 177, 177, 8, 177, - 177, 9, 177, 177, 177, 177, 20, 93, 11, 150, - 107, 80, 87, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 146, 177, 177, 177, 91, - 96, 94, 177, 177, 177, 177, 177, 177, 177, 142, - 108, 81, 86, 177, 177, 157, 177, 95, 177, 177, + 177, 177, 140, 177, 177, 177, 177, 177, 8, 177, + 177, 9, 177, 177, 177, 177, 20, 79, 11, 150, + 97, 98, 99, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 145, 177, 177, 177, 81, + 83, 80, 177, 177, 177, 177, 177, 177, 177, 141, + 101, 102, 103, 177, 177, 157, 177, 146, 177, 177, 6, 177, 177, 177, 177, 177, 177, 177, 177, 177, - 90, 151, 1, 177, 177, 177, 177, 177, 175, 177, + 96, 151, 1, 177, 177, 177, 177, 177, 175, 177, - 103, 5, 170, 59, 62, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, 92, 177, - 177, 177, 177, 88, 177, 177, 177, 177, 177, 121, + 90, 5, 170, 59, 62, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 82, 177, + 177, 177, 177, 100, 177, 177, 177, 177, 177, 120, 66, 67, 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 101, 177, 177, 177, 89, - 123, 70, 71, 177, 177, 97, 177, 177, 177, 177, - 177, 177, 177, 116, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 130, 177, 177, 177, 177, 60, + 177, 177, 177, 177, 177, 88, 177, 177, 177, 104, + 122, 70, 71, 177, 177, 84, 177, 177, 177, 177, + 177, 177, 177, 115, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 129, 177, 177, 177, 177, 60, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 117, 109, 177, 82, 177, 177, 177, 131, + 177, 177, 116, 105, 177, 106, 177, 177, 177, 130, 177, 177, 68, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 118, 177, 177, 132, - 177, 177, 72, 110, 83, 177, 112, 177, 113, 177, - 177, 177, 177, 177, 98, 177, 177, 177, 177, 64, - 177, 63, 127, 177, 177, 111, 84, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 125, 128, 119, + 177, 177, 177, 177, 177, 177, 117, 177, 177, 131, + 177, 177, 72, 107, 108, 177, 111, 177, 112, 177, + 177, 177, 177, 177, 85, 177, 177, 177, 177, 64, + 177, 63, 126, 177, 177, 109, 110, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 124, 127, 118, 177, 65, 177, 177, 177, 177, 177, 177, 177, 177, - 126, 129, 177, 177, 122, 69, 177, 177, 171, 177, - 177, 177, 74, 177, 177, 124, 73, 177, 177, 177, - 177, 177, 177, 133, 177, 177, 177, 177, 177, 177, + 125, 128, 177, 177, 121, 69, 177, 177, 171, 177, + 177, 177, 74, 177, 177, 123, 73, 177, 177, 177, + 177, 177, 177, 132, 177, 177, 177, 177, 177, 177, - 134, 177, 177, 177, 75, 177, 135, 114, 115, 177, - 177, 177, 61, 177, 177, 172, 120, 76, 0 + 133, 177, 177, 177, 75, 177, 134, 113, 114, 177, + 177, 177, 61, 177, 177, 172, 119, 76, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -1028,9 +1027,6 @@ WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp). #include "compiler/preprocessor/Token.h" #include "compiler/translator/util.h" #include "compiler/translator/length_limits.h" - -using namespace sh; - #include "glslang_tab.h" /* windows only pragma */ @@ -1058,8 +1054,6 @@ static int reserved_word(yyscan_t yyscanner); static int ES2_reserved_ES3_keyword(TParseContext *context, int token); static int ES2_keyword_ES3_reserved(TParseContext *context, int token); static int ES2_ident_ES3_keyword(TParseContext *context, int token); -static int ES2_ident_ES3_reserved_ES3_1_keyword(TParseContext *context, int token); -static int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token); static int uint_constant(TParseContext *context); static int int_constant(TParseContext *context); static int float_constant(yyscan_t yyscanner); @@ -1374,7 +1368,7 @@ yy_find_action: if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { yy_size_t yyl; - for ( yyl = 0; yyl < static_cast(yyleng); ++yyl ) + for ( yyl = 0; yyl < yyleng; ++yyl ) if ( yytext[yyl] == '\n' ) do{ yylineno++; @@ -1706,75 +1700,24 @@ case 78: YY_RULE_SETUP { return ES2_ident_ES3_keyword(context, LAYOUT); } YY_BREAK +/* Reserved keywords for GLSL ES 3.00 that are not reserved for GLSL ES 1.00 */ case 79: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE2D); } - YY_BREAK case 80: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE2D); } - YY_BREAK case 81: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE2D); } - YY_BREAK case 82: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE2DARRAY); } - YY_BREAK case 83: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE2DARRAY); } - YY_BREAK case 84: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE2DARRAY); } - YY_BREAK case 85: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE3D); } - YY_BREAK case 86: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE3D); } - YY_BREAK case 87: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE3D); } - YY_BREAK case 88: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGECUBE); } - YY_BREAK case 89: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGECUBE); } - YY_BREAK case 90: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGECUBE); } - YY_BREAK case 91: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, READONLY); } - YY_BREAK case 92: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, WRITEONLY); } - YY_BREAK case 93: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, COHERENT); } - YY_BREAK case 94: -YY_RULE_SETUP -{ return ES2_ident_ES3_reserved_ES3_1_keyword(context, RESTRICT); } - YY_BREAK case 95: -YY_RULE_SETUP -{ return ES2_and_ES3_reserved_ES3_1_keyword(context, VOLATILE); } - YY_BREAK -/* Reserved keywords for GLSL ES 3.00 that are not reserved for GLSL ES 1.00 */ case 96: case 97: case 98: @@ -1814,7 +1757,6 @@ case 131: case 132: case 133: case 134: -case 135: YY_RULE_SETUP { if (context->getShaderVersion() < 300) { @@ -1825,7 +1767,7 @@ YY_RULE_SETUP } YY_BREAK /* Reserved keywords in GLSL ES 1.00 that are not reserved in GLSL ES 3.00 */ -case 136: +case 135: YY_RULE_SETUP { if (context->getShaderVersion() >= 300) @@ -1838,6 +1780,7 @@ YY_RULE_SETUP } YY_BREAK /* Reserved keywords */ +case 136: case 137: case 138: case 139: @@ -2338,7 +2281,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -2374,7 +2317,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - static_cast(number_to_move) - 1; + number_to_move - 1; } @@ -2382,10 +2325,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ - size_t result = 0; YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - result, num_to_read ); - yyg->yy_n_chars = static_cast(result); + yyg->yy_n_chars, num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } @@ -2826,7 +2767,7 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; - num_to_alloc = static_cast(yyg->yy_buffer_stack_max + grow_size); + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc (yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state*) @@ -2860,7 +2801,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - b->yy_buf_size = static_cast(size) - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; @@ -2909,7 +2850,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - for ( i = 0; i < static_cast(_yybytes_len); ++i ) + for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; @@ -3360,24 +3301,6 @@ int ES2_keyword_ES3_reserved(TParseContext *context, int token) return token; } -int ES2_ident_ES3_reserved_ES3_1_keyword(TParseContext *context, int token) -{ - struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); - yyscan_t yyscanner = (yyscan_t) context->getScanner(); - - if (context->getShaderVersion() < 300) - { - yylval->lex.string = NewPoolTString(yytext); - return check_type(yyscanner); - } - else if (context->getShaderVersion() == 300) - { - return reserved_word(yyscanner); - } - - return token; -} - int ES2_ident_ES3_keyword(TParseContext *context, int token) { struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); @@ -3393,18 +3316,6 @@ int ES2_ident_ES3_keyword(TParseContext *context, int token) return token; } -int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token) -{ - yyscan_t yyscanner = (yyscan_t) context->getScanner(); - - if (context->getShaderVersion() < 310) - { - return reserved_word(yyscanner); - } - - return token; -} - int uint_constant(TParseContext *context) { struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner(); @@ -3506,7 +3417,7 @@ int glslang_scan(size_t count, const char* const string[], const int length[], if (context->getFragmentPrecisionHigh()) preprocessor->predefineMacro("GL_FRAGMENT_PRECISION_HIGH", 1); - preprocessor->setMaxTokenSize(sh::GetGlobalMaxTokenSize(context->getShaderSpec())); + preprocessor->setMaxTokenSize(GetGlobalMaxTokenSize(context->getShaderSpec())); return 0; } diff --git a/gfx/angle/src/compiler/translator/glslang_tab.cpp b/gfx/angle/src/compiler/translator/glslang_tab.cpp index 63a3371dc..ada392497 100755 --- a/gfx/angle/src/compiler/translator/glslang_tab.cpp +++ b/gfx/angle/src/compiler/translator/glslang_tab.cpp @@ -96,8 +96,6 @@ #define YYENABLE_NLS 0 -using namespace sh; - @@ -192,97 +190,80 @@ extern int yydebug; CENTROID = 306, FLAT = 307, SMOOTH = 308, - READONLY = 309, - WRITEONLY = 310, - COHERENT = 311, - RESTRICT = 312, - VOLATILE = 313, - STRUCT = 314, - VOID_TYPE = 315, - WHILE = 316, - SAMPLER2D = 317, - SAMPLERCUBE = 318, - SAMPLER_EXTERNAL_OES = 319, - SAMPLER2DRECT = 320, - SAMPLER2DARRAY = 321, - ISAMPLER2D = 322, - ISAMPLER3D = 323, - ISAMPLERCUBE = 324, - ISAMPLER2DARRAY = 325, - USAMPLER2D = 326, - USAMPLER3D = 327, - USAMPLERCUBE = 328, - USAMPLER2DARRAY = 329, - SAMPLER3D = 330, - SAMPLER3DRECT = 331, - SAMPLER2DSHADOW = 332, - SAMPLERCUBESHADOW = 333, - SAMPLER2DARRAYSHADOW = 334, - IMAGE2D = 335, - IIMAGE2D = 336, - UIMAGE2D = 337, - IMAGE3D = 338, - IIMAGE3D = 339, - UIMAGE3D = 340, - IMAGE2DARRAY = 341, - IIMAGE2DARRAY = 342, - UIMAGE2DARRAY = 343, - IMAGECUBE = 344, - IIMAGECUBE = 345, - UIMAGECUBE = 346, - LAYOUT = 347, - IDENTIFIER = 348, - TYPE_NAME = 349, - FLOATCONSTANT = 350, - INTCONSTANT = 351, - UINTCONSTANT = 352, - BOOLCONSTANT = 353, - FIELD_SELECTION = 354, - LEFT_OP = 355, - RIGHT_OP = 356, - INC_OP = 357, - DEC_OP = 358, - LE_OP = 359, - GE_OP = 360, - EQ_OP = 361, - NE_OP = 362, - AND_OP = 363, - OR_OP = 364, - XOR_OP = 365, - MUL_ASSIGN = 366, - DIV_ASSIGN = 367, - ADD_ASSIGN = 368, - MOD_ASSIGN = 369, - LEFT_ASSIGN = 370, - RIGHT_ASSIGN = 371, - AND_ASSIGN = 372, - XOR_ASSIGN = 373, - OR_ASSIGN = 374, - SUB_ASSIGN = 375, - LEFT_PAREN = 376, - RIGHT_PAREN = 377, - LEFT_BRACKET = 378, - RIGHT_BRACKET = 379, - LEFT_BRACE = 380, - RIGHT_BRACE = 381, - DOT = 382, - COMMA = 383, - COLON = 384, - EQUAL = 385, - SEMICOLON = 386, - BANG = 387, - DASH = 388, - TILDE = 389, - PLUS = 390, - STAR = 391, - SLASH = 392, - PERCENT = 393, - LEFT_ANGLE = 394, - RIGHT_ANGLE = 395, - VERTICAL_BAR = 396, - CARET = 397, - AMPERSAND = 398, - QUESTION = 399 + STRUCT = 309, + VOID_TYPE = 310, + WHILE = 311, + SAMPLER2D = 312, + SAMPLERCUBE = 313, + SAMPLER_EXTERNAL_OES = 314, + SAMPLER2DRECT = 315, + SAMPLER2DARRAY = 316, + ISAMPLER2D = 317, + ISAMPLER3D = 318, + ISAMPLERCUBE = 319, + ISAMPLER2DARRAY = 320, + USAMPLER2D = 321, + USAMPLER3D = 322, + USAMPLERCUBE = 323, + USAMPLER2DARRAY = 324, + SAMPLER3D = 325, + SAMPLER3DRECT = 326, + SAMPLER2DSHADOW = 327, + SAMPLERCUBESHADOW = 328, + SAMPLER2DARRAYSHADOW = 329, + LAYOUT = 330, + IDENTIFIER = 331, + TYPE_NAME = 332, + FLOATCONSTANT = 333, + INTCONSTANT = 334, + UINTCONSTANT = 335, + BOOLCONSTANT = 336, + FIELD_SELECTION = 337, + LEFT_OP = 338, + RIGHT_OP = 339, + INC_OP = 340, + DEC_OP = 341, + LE_OP = 342, + GE_OP = 343, + EQ_OP = 344, + NE_OP = 345, + AND_OP = 346, + OR_OP = 347, + XOR_OP = 348, + MUL_ASSIGN = 349, + DIV_ASSIGN = 350, + ADD_ASSIGN = 351, + MOD_ASSIGN = 352, + LEFT_ASSIGN = 353, + RIGHT_ASSIGN = 354, + AND_ASSIGN = 355, + XOR_ASSIGN = 356, + OR_ASSIGN = 357, + SUB_ASSIGN = 358, + LEFT_PAREN = 359, + RIGHT_PAREN = 360, + LEFT_BRACKET = 361, + RIGHT_BRACKET = 362, + LEFT_BRACE = 363, + RIGHT_BRACE = 364, + DOT = 365, + COMMA = 366, + COLON = 367, + EQUAL = 368, + SEMICOLON = 369, + BANG = 370, + DASH = 371, + TILDE = 372, + PLUS = 373, + STAR = 374, + SLASH = 375, + PERCENT = 376, + LEFT_ANGLE = 377, + RIGHT_ANGLE = 378, + VERTICAL_BAR = 379, + CARET = 380, + AMPERSAND = 381, + QUESTION = 382 }; #endif @@ -306,27 +287,22 @@ union YYSTYPE struct { TOperator op; union { - TIntermNode *intermNode; + TIntermNode* intermNode; TIntermNodePair nodePair; - TIntermTyped *intermTypedNode; - TIntermAggregate *intermAggregate; - TIntermBlock *intermBlock; - TIntermDeclaration *intermDeclaration; - TIntermSwitch *intermSwitch; - TIntermCase *intermCase; + TIntermTyped* intermTypedNode; + TIntermAggregate* intermAggregate; + TIntermSwitch* intermSwitch; + TIntermCase* intermCase; }; union { - TTypeSpecifierNonArray typeSpecifierNonArray; TPublicType type; TPrecision precision; TLayoutQualifier layoutQualifier; TQualifier qualifier; - TFunction *function; + TFunction* function; TParameter param; - TField *field; - TFieldList *fieldList; - TQualifierWrapperBase *qualifierWrapper; - TTypeQualifierBuilder *typeQualifierBuilder; + TField* field; + TFieldList* fieldList; }; } interm; @@ -664,23 +640,23 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 126 +#define YYFINAL 116 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 2825 +#define YYLAST 2516 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 145 +#define YYNTOKENS 128 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 94 /* YYNRULES -- Number of rules. */ -#define YYNRULES 286 +#define YYNRULES 275 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 422 +#define YYNSTATES 417 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 399 +#define YYMAXUTOK 382 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -727,43 +703,41 @@ static const yytype_uint8 yytranslate[] = 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144 + 125, 126, 127 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 243, 243, 244, 247, 257, 260, 265, 270, 275, - 280, 286, 289, 292, 295, 298, 301, 307, 314, 325, - 329, 337, 340, 346, 350, 357, 363, 372, 380, 386, - 392, 401, 404, 407, 410, 420, 421, 422, 423, 431, - 432, 435, 438, 445, 446, 449, 455, 456, 460, 467, - 468, 471, 474, 477, 483, 484, 487, 493, 494, 501, - 502, 509, 510, 517, 518, 524, 525, 531, 532, 538, - 539, 545, 546, 553, 554, 555, 556, 560, 561, 562, - 566, 570, 574, 578, 585, 588, 594, 601, 608, 611, - 614, 623, 627, 631, 635, 639, 646, 653, 656, 663, - 671, 691, 701, 709, 734, 738, 742, 746, 753, 760, - 763, 767, 771, 776, 781, 788, 792, 796, 800, 805, - 810, 817, 821, 827, 830, 836, 840, 847, 853, 857, - 861, 864, 867, 876, 882, 890, 893, 913, 932, 939, - 943, 947, 950, 953, 956, 959, 965, 972, 975, 978, - 984, 991, 994, 1000, 1003, 1006, 1012, 1015, 1020, 1031, - 1034, 1037, 1040, 1043, 1046, 1050, 1054, 1058, 1062, 1066, - 1070, 1074, 1078, 1082, 1086, 1090, 1094, 1098, 1102, 1106, - 1110, 1114, 1118, 1122, 1126, 1130, 1133, 1136, 1139, 1142, - 1145, 1148, 1151, 1154, 1157, 1160, 1163, 1166, 1169, 1172, - 1175, 1182, 1188, 1191, 1194, 1197, 1200, 1203, 1206, 1209, - 1212, 1215, 1218, 1221, 1224, 1227, 1239, 1239, 1242, 1242, - 1248, 1251, 1266, 1269, 1276, 1280, 1286, 1292, 1304, 1308, - 1312, 1313, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1329, - 1330, 1330, 1330, 1339, 1340, 1344, 1344, 1345, 1345, 1350, - 1353, 1362, 1367, 1374, 1375, 1379, 1386, 1390, 1397, 1397, - 1404, 1407, 1414, 1418, 1431, 1431, 1436, 1436, 1442, 1442, - 1450, 1453, 1459, 1462, 1468, 1472, 1479, 1482, 1485, 1488, - 1491, 1500, 1506, 1512, 1515, 1521, 1521 + 0, 228, 228, 229, 232, 242, 245, 250, 255, 260, + 265, 271, 274, 277, 280, 283, 286, 292, 299, 310, + 314, 322, 325, 331, 335, 342, 348, 357, 365, 371, + 377, 386, 389, 392, 395, 405, 406, 407, 408, 416, + 417, 420, 423, 430, 431, 434, 440, 441, 445, 452, + 453, 456, 459, 462, 468, 469, 472, 478, 479, 486, + 487, 494, 495, 502, 503, 509, 510, 516, 517, 523, + 524, 530, 531, 538, 539, 540, 541, 545, 546, 547, + 551, 555, 559, 563, 570, 573, 579, 586, 593, 596, + 602, 611, 615, 619, 623, 630, 636, 639, 646, 654, + 674, 683, 691, 716, 720, 728, 732, 740, 743, 746, + 749, 755, 762, 765, 769, 773, 778, 783, 790, 794, + 798, 802, 807, 812, 816, 823, 833, 839, 842, 848, + 854, 860, 868, 877, 884, 887, 893, 897, 901, 906, + 914, 917, 933, 938, 943, 948, 955, 963, 974, 977, + 980, 986, 993, 996, 1002, 1005, 1008, 1014, 1017, 1022, + 1034, 1038, 1042, 1046, 1050, 1054, 1059, 1064, 1069, 1074, + 1079, 1084, 1089, 1094, 1099, 1104, 1109, 1114, 1119, 1124, + 1129, 1134, 1139, 1144, 1149, 1154, 1159, 1163, 1167, 1171, + 1175, 1179, 1183, 1187, 1191, 1195, 1199, 1203, 1207, 1211, + 1215, 1219, 1227, 1234, 1238, 1251, 1251, 1254, 1254, 1260, + 1263, 1278, 1281, 1290, 1294, 1300, 1306, 1318, 1322, 1326, + 1327, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1343, 1344, + 1344, 1344, 1354, 1355, 1359, 1359, 1360, 1360, 1365, 1368, + 1378, 1381, 1387, 1388, 1392, 1399, 1403, 1410, 1410, 1417, + 1420, 1427, 1431, 1444, 1444, 1449, 1449, 1455, 1455, 1463, + 1466, 1472, 1475, 1481, 1485, 1492, 1495, 1498, 1501, 1504, + 1513, 1517, 1524, 1527, 1533, 1533 }; #endif @@ -780,28 +754,24 @@ static const char *const yytname[] = "IVEC4", "VEC2", "VEC3", "VEC4", "UVEC2", "UVEC3", "UVEC4", "MATRIX2", "MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM", "VARYING", "MATRIX2x3", "MATRIX3x2", "MATRIX2x4", "MATRIX4x2", - "MATRIX3x4", "MATRIX4x3", "CENTROID", "FLAT", "SMOOTH", "READONLY", - "WRITEONLY", "COHERENT", "RESTRICT", "VOLATILE", "STRUCT", "VOID_TYPE", - "WHILE", "SAMPLER2D", "SAMPLERCUBE", "SAMPLER_EXTERNAL_OES", + "MATRIX3x4", "MATRIX4x3", "CENTROID", "FLAT", "SMOOTH", "STRUCT", + "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE", "SAMPLER_EXTERNAL_OES", "SAMPLER2DRECT", "SAMPLER2DARRAY", "ISAMPLER2D", "ISAMPLER3D", "ISAMPLERCUBE", "ISAMPLER2DARRAY", "USAMPLER2D", "USAMPLER3D", "USAMPLERCUBE", "USAMPLER2DARRAY", "SAMPLER3D", "SAMPLER3DRECT", - "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER2DARRAYSHADOW", - "IMAGE2D", "IIMAGE2D", "UIMAGE2D", "IMAGE3D", "IIMAGE3D", "UIMAGE3D", - "IMAGE2DARRAY", "IIMAGE2DARRAY", "UIMAGE2DARRAY", "IMAGECUBE", - "IIMAGECUBE", "UIMAGECUBE", "LAYOUT", "IDENTIFIER", "TYPE_NAME", - "FLOATCONSTANT", "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT", - "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP", - "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN", - "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", - "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", - "RIGHT_PAREN", "LEFT_BRACKET", "RIGHT_BRACKET", "LEFT_BRACE", - "RIGHT_BRACE", "DOT", "COMMA", "COLON", "EQUAL", "SEMICOLON", "BANG", - "DASH", "TILDE", "PLUS", "STAR", "SLASH", "PERCENT", "LEFT_ANGLE", - "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", "AMPERSAND", "QUESTION", - "$accept", "identifier", "variable_identifier", "primary_expression", - "postfix_expression", "integer_expression", "function_call", - "function_call_or_method", "function_call_generic", + "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER2DARRAYSHADOW", "LAYOUT", + "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT", + "UINTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP", + "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", + "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN", + "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", + "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET", + "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON", + "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH", + "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", + "AMPERSAND", "QUESTION", "$accept", "identifier", "variable_identifier", + "primary_expression", "postfix_expression", "integer_expression", + "function_call", "function_call_or_method", "function_call_generic", "function_call_header_no_parameters", "function_call_header_with_parameters", "function_call_header", "function_identifier", "unary_expression", "unary_operator", @@ -814,10 +784,10 @@ static const char *const yytname[] = "constant_expression", "enter_struct", "declaration", "function_prototype", "function_declarator", "function_header_with_parameters", "function_header", - "parameter_declarator", "parameter_declaration", + "parameter_declarator", "parameter_declaration", "parameter_qualifier", "parameter_type_specifier", "init_declarator_list", "single_declaration", - "fully_specified_type", "interpolation_qualifier", "type_qualifier", - "invariant_qualifier", "single_type_qualifier", "storage_qualifier", + "fully_specified_type", "interpolation_qualifier", + "parameter_type_qualifier", "type_qualifier", "storage_qualifier", "type_specifier", "precision_qualifier", "layout_qualifier", "layout_qualifier_id_list", "layout_qualifier_id", "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier", @@ -852,18 +822,16 @@ static const yytype_uint16 yytoknum[] = 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399 + 375, 376, 377, 378, 379, 380, 381, 382 }; # endif -#define YYPACT_NINF -363 +#define YYPACT_NINF -361 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-363))) + (!!((Yystate) == (-361))) -#define YYTABLE_NINF -246 +#define YYTABLE_NINF -235 #define yytable_value_is_error(Yytable_value) \ 0 @@ -872,49 +840,48 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 2469, -363, -363, -363, -363, 101, -363, -363, -363, -363, - -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, - -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, - -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, - -363, -363, -363, -363, -363, -363, -68, -363, -363, -363, - -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, - -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, - -363, -363, -363, -363, -363, -363, -363, -88, -363, -363, - -77, -35, -13, 2561, -51, -363, 27, -363, 1301, -363, - -363, -363, -363, -363, -363, -363, 12, -363, 2377, -363, - -363, 2731, -363, -363, -363, 15, 49, -363, 22, -363, - 2561, -363, -363, -363, 2561, 51, 51, -363, 16, -103, - -87, -363, 2561, -363, -363, 1388, -363, -363, 20, 2561, - -363, 19, -82, -363, 408, -363, -363, -363, -363, 39, - -91, -363, 1503, 1845, -363, -363, 2561, 51, 2071, -363, - 47, -363, -363, -363, -363, -363, 1845, 1845, 1845, -363, - -363, -363, -363, -363, -363, -363, -41, -363, -363, -363, - 55, -55, 1957, 59, -363, 1845, -5, -90, 64, -81, - -42, 33, 45, 48, 78, 80, -93, -363, 71, -363, - -363, 2173, 2561, 70, -363, 49, 57, 63, -363, 79, - 81, 68, 1618, 83, 1845, 72, 84, 82, -363, -363, - 41, -363, -363, -36, -363, -77, 85, -363, -363, -363, - -363, 541, -363, -363, -363, -363, -363, -363, 1845, 1730, - 1845, 77, 88, -363, -363, 51, 86, -34, -363, -78, - -363, -363, -363, -50, -363, -363, 1845, 2646, -363, -363, - 1845, 92, -363, -363, -363, 1845, 1845, 1845, 1845, 1845, - 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, - 1845, 1845, 1845, 1845, 1845, -363, -363, 2275, -363, -363, - -363, -363, -363, 90, -363, 1845, -363, -363, -29, 1845, - 87, -363, -363, -363, 674, -363, -363, -363, -363, -363, - -363, -363, -363, -363, -363, -363, 1845, 1845, -363, -363, - -363, 93, 89, 94, -363, 1845, 95, -1, 1845, 51, - -363, -94, -363, -363, 96, 98, -363, 102, -363, -363, - -363, -363, -363, -5, -5, -90, -90, 64, 64, 64, - 64, -81, -81, -42, 33, 45, 48, 78, 80, 44, - -363, 161, 22, 940, 1073, -47, -363, -37, -363, 1187, - 674, -363, -363, -363, 1845, 103, -363, 1845, -363, 100, - -363, 1845, -363, -363, 1845, 107, -363, -363, -363, -363, - 1187, 90, -363, 98, 51, 2561, 109, 106, -363, 1845, - -363, -363, 111, -363, 1845, -363, 105, 116, 222, -363, - 115, 112, 807, -363, -363, 110, -32, 1845, 807, 90, - -363, 1845, -363, -363, -363, -363, 113, 98, -363, -363, - -363, -363 + 2154, 224, -361, -361, -361, 130, -361, -361, -361, -361, + -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, + -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, + -361, -361, -361, -361, -361, -361, -361, 145, -361, -361, + -46, -361, -361, -361, -361, -361, -361, -361, -361, -361, + -361, -361, -361, -361, -361, -361, -361, -361, -361, -82, + -361, -361, -68, -41, -45, 9, 7, -361, 117, 16, + 1173, -361, -361, 2439, 16, -361, -9, -361, 2079, -361, + -361, -361, -361, 16, -361, 2439, -361, -361, -361, -361, + -361, -31, 23, -361, 11, -361, 63, -361, -361, -361, + -361, -361, 2303, 168, 120, -361, 13, -66, -361, 31, + -361, 2229, -361, -361, -361, 1243, -361, -361, -361, 56, + 2229, -361, 17, -50, -361, 401, -361, -361, -361, -361, + 120, 2303, -18, -361, 1341, 1632, -361, 179, 2303, 120, + 1824, -361, 70, -361, -361, -361, -361, -361, 1632, 1632, + 1632, -361, -361, -361, -361, -361, -361, -361, 22, -361, + -361, -361, 101, -29, 1727, 114, -361, 1632, 96, -97, + 128, -54, 111, 118, 102, 115, 154, 153, -69, -361, + 140, -361, -361, 1909, 2229, 124, -361, 23, 134, 136, + -361, 147, 149, 143, 1439, 155, 1632, 148, 157, 160, + -361, -361, 184, -361, -361, 52, -361, -68, 158, -361, + -361, -361, -361, 517, -361, -361, -361, -361, -361, -361, + 166, -361, -361, 1534, 1632, 150, 159, -361, -361, 120, + 167, 61, -361, -62, -361, -361, -361, -5, -361, -361, + 1632, 2371, -361, -361, 1632, 185, -361, -361, -361, 1632, + 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, + 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, -361, + -361, 1994, -361, -361, -361, -361, -361, 181, -361, 1632, + -361, -361, 67, 1632, 180, -361, -361, -361, 633, -361, + -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, + 1632, 1632, -361, -361, -361, 1632, 178, 186, -361, 1632, + 182, 68, 1632, 120, -361, -71, -361, -361, 187, 188, + -361, 192, -361, -361, -361, -361, -361, 96, 96, -97, + -97, 128, 128, 128, 128, -54, -54, 111, 118, 102, + 115, 154, 153, 113, -361, 242, 11, 865, 981, 4, + -361, 18, -361, 1078, 633, -361, -361, 194, 1632, 189, + -361, 1632, -361, 196, -361, 1632, -361, -361, 1632, 200, + -361, -361, -361, -361, 1078, 181, -361, 188, 120, 2303, + 201, 198, -361, -361, 1632, -361, -361, 202, -361, 1632, + -361, 191, 203, 293, -361, 204, 205, 749, -361, -361, + 197, 60, 1632, 749, 181, -361, 1632, -361, -361, -361, + -361, 199, 188, -361, -361, -361, -361 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -922,79 +889,78 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 0, 127, 147, 148, 149, 0, 133, 135, 163, 160, - 161, 162, 167, 168, 169, 170, 171, 172, 164, 165, - 166, 173, 174, 175, 176, 177, 178, 136, 137, 138, - 140, 134, 179, 180, 181, 182, 183, 184, 139, 124, - 123, 141, 142, 143, 144, 145, 0, 159, 185, 187, - 200, 201, 188, 189, 190, 191, 192, 193, 194, 195, - 196, 186, 197, 198, 199, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 0, 215, 284, - 285, 0, 98, 97, 0, 109, 115, 131, 0, 132, - 125, 128, 121, 130, 129, 146, 156, 202, 0, 281, - 283, 0, 2, 3, 218, 0, 0, 88, 0, 96, - 0, 105, 99, 107, 0, 108, 0, 89, 2, 116, - 0, 94, 0, 126, 122, 0, 1, 282, 0, 0, - 216, 153, 0, 151, 0, 286, 100, 104, 106, 102, - 110, 101, 0, 0, 87, 95, 0, 0, 0, 220, - 4, 8, 6, 7, 9, 30, 0, 0, 0, 157, - 37, 36, 38, 35, 5, 11, 31, 13, 18, 19, - 0, 0, 24, 0, 39, 0, 43, 46, 49, 54, - 57, 59, 61, 63, 65, 67, 69, 86, 0, 28, - 90, 0, 0, 0, 150, 0, 0, 0, 266, 0, - 0, 0, 0, 0, 0, 0, 0, 240, 249, 253, - 39, 71, 84, 0, 229, 0, 146, 232, 251, 231, - 230, 0, 233, 234, 235, 236, 237, 238, 0, 0, - 0, 0, 0, 228, 120, 0, 226, 0, 224, 0, - 221, 32, 33, 0, 15, 16, 0, 0, 22, 21, - 0, 159, 25, 27, 34, 0, 0, 0, 0, 0, + 0, 0, 148, 149, 150, 0, 130, 140, 164, 161, + 162, 163, 168, 169, 170, 171, 172, 173, 165, 166, + 167, 174, 175, 176, 177, 178, 179, 141, 142, 145, + 131, 180, 181, 182, 183, 184, 185, 0, 128, 127, + 0, 160, 186, 188, 201, 202, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 187, 198, 199, 200, 0, + 204, 273, 274, 0, 97, 107, 0, 112, 118, 135, + 0, 133, 125, 0, 136, 146, 157, 203, 0, 270, + 272, 132, 124, 0, 138, 0, 143, 144, 2, 3, + 207, 0, 0, 88, 0, 95, 107, 129, 108, 109, + 110, 98, 0, 107, 0, 89, 2, 119, 134, 0, + 94, 0, 126, 147, 137, 0, 1, 271, 139, 0, + 0, 205, 154, 0, 152, 0, 275, 99, 104, 106, + 111, 0, 113, 100, 0, 0, 87, 0, 0, 0, + 0, 209, 4, 8, 6, 7, 9, 30, 0, 0, + 0, 158, 37, 36, 38, 35, 5, 11, 31, 13, + 18, 19, 0, 0, 24, 0, 39, 0, 43, 46, + 49, 54, 57, 59, 61, 63, 65, 67, 69, 86, + 0, 28, 90, 0, 0, 0, 151, 0, 0, 0, + 255, 0, 0, 0, 0, 0, 0, 0, 0, 229, + 238, 242, 39, 71, 84, 0, 218, 0, 146, 221, + 240, 220, 219, 0, 222, 223, 224, 225, 226, 227, + 101, 103, 105, 0, 0, 0, 0, 217, 123, 0, + 215, 0, 213, 0, 210, 32, 33, 0, 15, 16, + 0, 0, 22, 21, 0, 160, 25, 27, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 158, 219, 0, 154, 155, - 152, 277, 276, 247, 268, 0, 280, 278, 0, 0, - 0, 261, 264, 239, 0, 74, 75, 77, 76, 79, - 80, 81, 82, 83, 78, 73, 0, 0, 254, 250, - 252, 0, 0, 0, 114, 0, 117, 0, 0, 0, - 222, 0, 91, 10, 0, 17, 29, 14, 20, 26, - 40, 41, 42, 45, 44, 47, 48, 52, 53, 50, - 51, 55, 56, 58, 60, 62, 64, 66, 68, 0, - 217, 0, 0, 0, 0, 0, 279, 0, 260, 0, - 241, 72, 85, 103, 0, 111, 118, 0, 223, 0, - 225, 0, 92, 12, 0, 0, 246, 248, 271, 270, - 273, 247, 258, 262, 0, 0, 0, 0, 112, 0, - 119, 227, 0, 70, 0, 272, 0, 0, 257, 255, - 0, 0, 0, 242, 113, 0, 0, 274, 0, 247, - 259, 0, 244, 265, 243, 93, 0, 275, 269, 256, - 263, 267 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 159, + 208, 0, 155, 156, 153, 266, 265, 236, 257, 0, + 269, 267, 0, 0, 0, 250, 253, 228, 0, 74, + 75, 77, 76, 79, 80, 81, 82, 83, 78, 73, + 0, 0, 243, 239, 241, 0, 0, 0, 117, 0, + 120, 0, 0, 0, 211, 0, 91, 10, 0, 17, + 29, 14, 20, 26, 40, 41, 42, 45, 44, 47, + 48, 52, 53, 50, 51, 55, 56, 58, 60, 62, + 64, 66, 68, 0, 206, 0, 0, 0, 0, 0, + 268, 0, 249, 0, 230, 72, 85, 0, 0, 114, + 121, 0, 212, 0, 214, 0, 92, 12, 0, 0, + 235, 237, 260, 259, 262, 236, 247, 251, 0, 0, + 0, 0, 102, 115, 0, 122, 216, 0, 70, 0, + 261, 0, 0, 246, 244, 0, 0, 0, 231, 116, + 0, 0, 263, 0, 236, 248, 0, 233, 254, 232, + 93, 0, 264, 258, 245, 252, 256 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -363, -45, -363, -363, -363, -363, -363, -363, -4, -363, - -363, -363, -363, 54, -363, -84, -79, -139, -83, -23, - -22, -21, -18, -17, -16, -363, -120, -137, -363, -146, - -125, -363, 18, 21, -363, -363, -363, 136, 146, 145, - -363, -363, -328, -363, -74, -363, -86, -363, -80, 255, - -363, -363, 67, 0, -363, -363, -363, -363, -116, -141, - 28, -54, -226, -85, -210, -339, -136, -363, -363, -142, - -362, -363, -363, -98, -27, -76, -363, -363, -363, -363, - -363, -112, -363, -363, -363, -363, -363, -363, -363, -363, - -363, 172, -363, -363 + -361, -39, -361, -361, -361, -361, -361, -361, 73, -361, + -361, -361, -361, -107, -361, -15, -20, -67, -19, 53, + 54, 55, 51, 57, 58, -361, -110, -132, -361, -146, + -125, -361, 6, 12, -361, -361, -361, 190, 228, 217, + 195, -361, -361, -336, 25, -361, -104, 27, -57, 322, + -361, -361, 141, 0, -361, -361, -361, -361, -109, -130, + 100, 19, -185, -17, -193, -310, -65, -361, -361, -70, + -360, -361, -361, -92, 46, -13, -361, -361, -361, -361, + -361, -38, -361, -361, -361, -361, -361, -361, -361, -361, + -361, 259, -361, -361 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 236, 164, 165, 166, 324, 167, 168, 169, 170, - 171, 172, 173, 210, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 185, 186, 211, 212, 306, 213, - 188, 122, 214, 215, 81, 82, 83, 111, 112, 113, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 132, 133, 189, 96, 97, 192, 129, 148, 149, - 237, 238, 234, 217, 218, 219, 220, 294, 387, 413, - 351, 352, 353, 414, 221, 222, 223, 399, 224, 400, - 225, 386, 226, 359, 283, 354, 380, 396, 397, 227, - 98, 99, 100, 108 + -1, 230, 156, 157, 158, 318, 159, 160, 161, 162, + 163, 164, 165, 202, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 203, 204, 300, 205, + 180, 111, 206, 207, 63, 64, 65, 128, 101, 102, + 129, 66, 67, 68, 69, 103, 70, 71, 72, 73, + 74, 123, 124, 181, 76, 77, 184, 120, 140, 141, + 231, 232, 228, 209, 210, 211, 212, 288, 381, 408, + 345, 346, 347, 409, 213, 214, 215, 394, 216, 395, + 217, 380, 218, 353, 277, 348, 374, 391, 392, 219, + 78, 79, 80, 94 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1002,576 +968,514 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 95, 105, 123, 115, 314, 187, 233, 240, 124, 114, - 135, 310, 243, 191, 377, 321, 273, 232, 79, 398, - 142, 80, 187, 262, 263, 102, 103, 143, 123, 371, - 115, 384, 229, 106, 115, 252, 114, 372, 144, 230, - 194, 119, 147, 258, 145, 259, 195, 419, 146, 147, - 240, 274, 384, 322, 107, 146, 288, 104, 264, 265, - 123, 244, 245, 412, 266, 267, 235, 249, 147, 412, - 139, 140, 323, 250, 146, 381, 277, 116, 307, 290, - 117, 307, 246, 95, 187, 382, 247, 109, 95, 366, - 416, 307, 307, 233, 319, 308, 307, 320, 95, 307, - 325, 128, 356, 311, 313, 2, 3, 4, 187, 187, - 95, 147, 147, 329, 95, 110, 79, 146, 146, 80, - 118, 103, 95, 337, 338, 339, 340, 319, 349, 95, - 368, 255, 256, 257, 216, 125, 240, 141, 388, 355, - 130, 390, 131, 357, 102, 103, 95, 134, 95, 193, - 310, 190, 295, 296, 297, 298, 299, 300, 301, 302, - 303, 304, 228, 404, 260, 261, 278, 279, -29, 361, - 362, 305, 307, 374, 333, 334, 268, 248, 233, 174, - 253, 335, 336, 341, 342, 420, 271, 269, 281, 270, - 272, 95, 95, 369, 282, 275, 174, 147, 187, 286, - 284, 291, 285, 146, 289, 292, -28, 315, 293, 318, - 241, 242, 316, 383, -23, -245, 358, 363, 365, 364, - 373, 216, 375, -30, 391, 367, 307, 233, 394, 254, - 233, 402, 403, 389, 383, 405, 407, 393, 408, 409, - 207, 415, 411, 328, 421, 343, 392, 344, 406, 345, - 137, 187, 233, 346, 376, 347, 136, 348, 174, 138, - 101, 417, 280, 317, 410, 370, 418, 360, 395, 378, - 127, 0, 0, 0, 233, 0, 0, 95, 379, 0, - 0, 0, 174, 174, 0, 385, 0, 0, 0, 0, - 0, 0, 0, 0, 216, 0, 0, 0, 0, 123, - 0, 0, 0, 0, 0, 124, 385, 0, 0, 330, - 331, 332, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 401, + 75, 91, 126, 227, 237, 179, 61, 138, 166, 226, + 234, 183, 62, 112, 315, 393, 138, 378, 97, 252, + 304, 253, 92, 267, 179, 7, 83, 166, 84, 107, + 88, 89, 246, 256, 257, 365, 138, 371, 378, 308, + 134, 235, 236, 366, 414, 130, 93, 135, 282, 98, + 99, 100, 316, 234, 139, 186, 27, 28, 268, 29, + 248, 187, 90, 139, 95, 132, 96, 37, 258, 259, + 75, 284, 97, 113, 130, 271, 243, 121, 75, 138, + 138, 229, 244, 139, 61, 119, 179, 407, 223, 166, + 62, 220, 227, 407, 319, 224, 108, 115, 307, 122, + 317, 114, 75, 98, 99, 100, 301, 238, 239, 375, + 118, 75, 323, 179, -96, 301, 166, 133, 104, 125, + 75, 105, 343, 376, 360, 208, 139, 139, 240, 301, + 185, 75, 241, 349, 2, 3, 4, 351, 75, 136, + 75, 234, 324, 325, 326, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, + 166, 304, 83, 301, 84, 411, 302, 138, 355, 356, + 182, 301, 313, 383, -29, 314, 385, 227, 301, 313, + 357, 350, 362, 75, 75, 86, 87, 363, 7, 331, + 332, 333, 334, 106, 89, 179, 88, 89, 166, 399, + 260, 261, 179, 272, 273, 166, 242, 377, 98, 99, + 100, 254, 255, 208, 139, 249, 250, 251, 247, 27, + 28, 415, 29, 81, 301, 368, 227, 263, 377, 227, + 37, 38, 39, 7, 329, 330, 388, 327, 328, 264, + 387, 335, 336, 401, 262, 265, 266, 269, 275, 379, + 276, 278, 227, 279, 370, 179, 412, 280, 166, 283, + 285, 286, -28, 309, 27, 28, 310, 29, 81, 287, + 379, 75, 305, 312, 227, 37, 38, 39, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 208, -234, + -23, 358, 352, 359, 367, 361, -30, 299, 369, 301, + 82, 382, 384, 386, 389, 402, 397, 398, 403, 400, + 404, 410, 199, 416, 322, 337, 340, 338, 406, 339, + 131, 221, 112, 341, 127, 342, 222, 85, 274, 311, + 405, 372, 364, 413, 354, 373, 390, 117, 0, 396, + 0, 0, 0, 0, 0, 0, 0, 208, 208, 0, + 0, 0, 0, 208, 208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 216, 216, 0, 0, 0, 0, 216, - 216, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 174, 0, 0, 0, 0, 0, 0, 0, - 216, 0, 0, 0, 0, 95, 0, 0, 0, 0, + 0, 0, 0, 0, 208, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 216, 0, 0, 0, 0, 0, 216, 0, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 196, 197, 198, 174, 199, 200, 201, 202, - 203, 204, 205, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 206, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 0, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 150, 78, 151, 152, 153, 154, 155, 0, 0, - 156, 157, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, - 0, 0, 0, 207, 208, 0, 0, 0, 0, 209, - 160, 161, 162, 163, 1, 2, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 196, 197, 198, 0, 199, - 200, 201, 202, 203, 204, 205, 12, 13, 14, 15, + 0, 0, 0, 0, 0, 0, 0, 208, 0, 0, + 0, 0, 0, 208, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 188, 189, 190, 0, 191, + 192, 193, 194, 195, 196, 197, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 206, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 0, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 150, 78, 151, 152, 153, 154, - 155, 0, 0, 156, 157, 0, 0, 0, 0, 0, + 26, 27, 28, 0, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 198, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 0, 56, 57, 58, 59, 142, 60, 143, + 144, 145, 146, 147, 0, 0, 148, 149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 158, 0, 0, 0, 207, 309, 0, 0, - 0, 0, 209, 160, 161, 162, 163, 1, 2, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 196, 197, - 198, 0, 199, 200, 201, 202, 203, 204, 205, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 206, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 0, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 150, 78, 151, - 152, 153, 154, 155, 0, 0, 156, 157, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 158, 0, 0, 0, 207, - 0, 0, 0, 0, 0, 209, 160, 161, 162, 163, + 0, 0, 0, 0, 0, 150, 0, 0, 0, 199, + 200, 0, 0, 0, 0, 201, 152, 153, 154, 155, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 196, 197, 198, 0, 199, 200, 201, 202, 203, - 204, 205, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 206, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 0, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 150, 78, 151, 152, 153, 154, 155, 0, 0, 156, - 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 158, 0, - 0, 0, 134, 0, 0, 0, 0, 0, 209, 160, - 161, 162, 163, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 196, 197, 198, 0, 199, 200, - 201, 202, 203, 204, 205, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 206, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 0, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 150, 78, 151, 152, 153, 154, 155, - 0, 0, 156, 157, 0, 0, 0, 0, 0, 0, + 11, 188, 189, 190, 0, 191, 192, 193, 194, 195, + 196, 197, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 0, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 198, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 0, 56, + 57, 58, 59, 142, 60, 143, 144, 145, 146, 147, + 0, 0, 148, 149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 158, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 209, 160, 161, 162, 163, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 12, 13, + 0, 150, 0, 0, 0, 199, 303, 0, 0, 0, + 0, 201, 152, 153, 154, 155, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 188, 189, 190, + 0, 191, 192, 193, 194, 195, 196, 197, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 0, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 150, 78, 151, 152, - 153, 154, 155, 0, 0, 156, 157, 0, 0, 0, + 24, 25, 26, 27, 28, 0, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 198, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 0, 56, 57, 58, 59, 142, + 60, 143, 144, 145, 146, 147, 0, 0, 148, 149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 2, 3, 4, 158, 6, 7, 8, 9, 10, - 11, 0, 0, 0, 209, 160, 161, 162, 163, 0, - 0, 0, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 0, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 0, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 150, 78, 151, 152, 153, 154, 155, 0, 0, 156, - 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 4, 158, 6, - 7, 8, 9, 10, 11, 0, 0, 0, 0, 160, - 161, 162, 163, 0, 0, 0, 12, 13, 14, 15, + 0, 0, 0, 0, 0, 0, 0, 150, 0, 0, + 0, 199, 0, 0, 0, 0, 0, 201, 152, 153, + 154, 155, 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 188, 189, 190, 0, 191, 192, 193, + 194, 195, 196, 197, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 0, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 198, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 0, 56, 57, 58, 59, 142, 60, 143, 144, 145, + 146, 147, 0, 0, 148, 149, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 150, 0, 0, 0, 125, 0, 0, + 0, 0, 0, 201, 152, 153, 154, 155, 1, 2, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 188, + 189, 190, 0, 191, 192, 193, 194, 195, 196, 197, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 0, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 198, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 0, 56, 57, 58, + 59, 142, 60, 143, 144, 145, 146, 147, 0, 0, + 148, 149, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 150, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, + 152, 153, 154, 155, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 0, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 0, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 120, 78, 0, 0, 8, 9, - 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, + 26, 27, 28, 0, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 0, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 0, 56, 57, 58, 59, 142, 60, 143, + 144, 145, 146, 147, 0, 0, 148, 149, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 137, 2, 3, 4, 150, 6, 7, 8, 9, + 10, 11, 0, 0, 0, 201, 152, 153, 154, 155, 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 0, 0, - 0, 0, 121, 32, 33, 34, 35, 36, 37, 0, - 0, 0, 0, 0, 0, 0, 0, 46, 47, 0, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 0, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 0, 150, 78, 151, 152, 153, 154, 155, 0, 0, - 156, 157, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, - 0, 0, 159, 8, 9, 10, 11, 0, 0, 0, - 160, 161, 162, 163, 0, 0, 0, 0, 12, 13, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 0, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 0, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 0, + 56, 57, 58, 59, 142, 60, 143, 144, 145, 146, + 147, 0, 0, 148, 149, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, + 0, 0, 150, 8, 9, 10, 11, 0, 0, 0, + 0, 0, 0, 152, 153, 154, 155, 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 0, 0, 0, 0, 0, 32, 33, - 34, 35, 36, 37, 0, 0, 0, 0, 0, 0, - 0, 0, 46, 47, 0, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 0, 150, 78, 151, 152, - 153, 154, 155, 0, 0, 156, 157, 0, 0, 0, + 24, 25, 26, 0, 0, 0, 0, 0, 31, 32, + 33, 34, 35, 36, 0, 0, 0, 40, 41, 0, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 0, 56, 57, 58, 0, 109, + 60, 0, 0, 8, 9, 10, 11, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 0, 0, 0, 0, 110, 31, 32, + 33, 34, 35, 36, 0, 0, 0, 40, 41, 0, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 0, 56, 57, 58, 0, 142, + 60, 143, 144, 145, 146, 147, 0, 0, 148, 149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 158, 0, 0, 231, 8, 9, - 10, 11, 0, 0, 0, 160, 161, 162, 163, 0, - 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 0, 0, - 0, 0, 0, 32, 33, 34, 35, 36, 37, 0, - 0, 0, 0, 0, 0, 0, 0, 46, 47, 0, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 0, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 0, 150, 78, 151, 152, 153, 154, 155, 0, 0, - 156, 157, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, - 8, 9, 10, 11, 0, 0, 0, 0, 0, 287, - 160, 161, 162, 163, 0, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 0, 0, 0, 0, 0, 32, 33, 34, 35, 36, - 37, 0, 0, 0, 0, 0, 0, 0, 0, 46, - 47, 0, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 0, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 0, 150, 78, 151, 152, 153, 154, 155, - 0, 0, 156, 157, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 150, 0, 0, + 151, 8, 9, 10, 11, 0, 0, 0, 152, 153, + 154, 155, 0, 0, 0, 0, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 0, 0, 0, 0, 0, 31, 32, 33, 34, + 35, 36, 0, 0, 0, 40, 41, 0, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 0, 56, 57, 58, 0, 142, 60, 143, + 144, 145, 146, 147, 0, 0, 148, 149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 158, 0, 0, 312, 8, 9, 10, 11, 0, - 0, 0, 160, 161, 162, 163, 0, 0, 0, 0, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 0, 0, 0, 0, 0, - 32, 33, 34, 35, 36, 37, 0, 0, 0, 0, - 0, 0, 0, 0, 46, 47, 0, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 0, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 0, 150, 78, - 151, 152, 153, 154, 155, 0, 0, 156, 157, 0, + 0, 0, 0, 0, 0, 150, 0, 0, 225, 8, + 9, 10, 11, 0, 0, 0, 152, 153, 154, 155, + 0, 0, 0, 0, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 0, + 0, 0, 0, 0, 31, 32, 33, 34, 35, 36, + 0, 0, 0, 40, 41, 0, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 0, 56, 57, 58, 0, 142, 60, 143, 144, 145, + 146, 147, 0, 0, 148, 149, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 150, 8, 9, 10, 11, 0, 0, + 0, 0, 0, 281, 152, 153, 154, 155, 0, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 0, 0, 0, 0, 0, 31, + 32, 33, 34, 35, 36, 0, 0, 0, 40, 41, + 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 0, 56, 57, 58, 0, + 142, 60, 143, 144, 145, 146, 147, 0, 0, 148, + 149, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 150, 0, + 0, 306, 8, 9, 10, 11, 0, 0, 0, 152, + 153, 154, 155, 0, 0, 0, 0, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 0, 0, 0, 0, 0, 31, 32, 33, + 34, 35, 36, 0, 0, 0, 40, 41, 0, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 0, 56, 57, 58, 0, 142, 60, + 143, 144, 145, 146, 147, 0, 0, 148, 149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 158, 8, 9, 10, - 11, 0, 0, 0, 0, 0, 0, 160, 161, 162, - 163, 0, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 0, 0, 0, 0, 0, 150, 8, 9, 10, + 11, 0, 0, 0, 0, 0, 0, 152, 153, 154, + 155, 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 0, 0, 0, - 0, 0, 32, 33, 34, 35, 36, 37, 0, 0, - 0, 0, 0, 0, 0, 0, 46, 251, 0, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 0, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 0, - 150, 78, 151, 152, 153, 154, 155, 0, 0, 156, - 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 4, 158, 6, - 7, 8, 9, 10, 11, 0, 0, 0, 0, 160, - 161, 162, 163, 0, 0, 0, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 0, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 0, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 0, 78, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, - 0, 6, 7, 8, 9, 10, 11, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 239, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 0, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 0, 78, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, - 3, 4, 0, 6, 7, 8, 9, 10, 11, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 276, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 0, 0, 31, 32, 33, 34, 35, 36, 0, 0, + 0, 40, 245, 0, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 0, 56, + 57, 58, 0, 142, 60, 143, 144, 145, 146, 147, + 0, 0, 148, 149, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 137, 2, 3, + 4, 150, 6, 7, 8, 9, 10, 11, 0, 0, + 0, 0, 152, 153, 154, 155, 0, 0, 0, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 0, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 0, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 0, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 0, 78, - 0, 0, 0, 0, 0, 0, 0, 126, 0, 0, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 350, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 0, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 0, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 0, 78, 1, 2, 3, 4, 5, 6, 7, 8, + 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 0, 56, 57, 58, 59, + 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 137, 2, 3, 4, 0, 6, 7, 8, + 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 233, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 0, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 0, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 0, 56, 57, 58, 59, 0, 60, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 137, 2, 3, + 4, 0, 6, 7, 8, 9, 10, 11, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 270, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 0, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 0, 56, 57, 58, 59, + 0, 60, 0, 0, 0, 0, 0, 0, 0, 116, + 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 344, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 0, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 0, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 0, 56, 57, 58, 59, 0, 60, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 0, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 0, 56, 57, 58, 59, + 0, 60, 137, 2, 3, 4, 0, 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 0, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 0, 78, 1, 2, 3, 4, 0, 6, - 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 0, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 0, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 0, 78, 8, 9, 10, 11, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 0, 0, 0, 0, - 0, 32, 33, 34, 35, 36, 37, 0, 0, 0, - 0, 0, 0, 0, 0, 46, 47, 0, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 0, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 0, 326, - 78, 8, 9, 10, 11, 327, 0, 0, 0, 0, + 28, 0, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 0, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 0, 56, 57, 58, 59, 0, 60, 2, 3, 4, + 0, 0, 0, 8, 9, 10, 11, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 0, 0, 0, 0, 0, 31, 32, + 33, 34, 35, 36, 0, 0, 0, 40, 41, 0, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 0, 56, 57, 58, 0, 0, + 60, 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 0, 0, 0, 0, 0, 32, 33, 34, 35, - 36, 37, 0, 0, 0, 0, 0, 0, 0, 0, - 46, 47, 0, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 0, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 0, 0, 78 + 26, 0, 0, 0, 0, 0, 31, 32, 33, 34, + 35, 36, 0, 0, 0, 40, 41, 0, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 0, 56, 57, 58, 0, 320, 60, 8, + 9, 10, 11, 321, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 0, + 0, 0, 0, 0, 31, 32, 33, 34, 35, 36, + 0, 0, 0, 40, 41, 0, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 0, 56, 57, 58, 0, 0, 60 }; static const yytype_int16 yycheck[] = { - 0, 46, 88, 83, 230, 125, 143, 148, 88, 83, - 108, 221, 158, 129, 353, 93, 109, 142, 0, 381, - 123, 0, 142, 104, 105, 93, 94, 130, 114, 123, - 110, 359, 123, 121, 114, 172, 110, 131, 125, 130, - 122, 86, 122, 133, 131, 135, 128, 409, 122, 129, - 191, 144, 380, 131, 131, 129, 202, 125, 139, 140, - 146, 102, 103, 402, 106, 107, 146, 122, 148, 408, - 115, 116, 122, 128, 148, 122, 192, 128, 128, 204, - 131, 128, 123, 83, 204, 122, 127, 122, 88, 315, - 122, 128, 128, 230, 128, 131, 128, 131, 98, 128, - 246, 101, 131, 228, 229, 4, 5, 6, 228, 229, - 110, 191, 192, 250, 114, 128, 98, 191, 192, 98, - 93, 94, 122, 262, 263, 264, 265, 128, 274, 129, - 131, 136, 137, 138, 134, 123, 277, 121, 364, 285, - 125, 367, 93, 289, 93, 94, 146, 125, 148, 130, - 360, 131, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 123, 389, 100, 101, 96, 97, 121, 306, - 307, 130, 128, 129, 258, 259, 143, 122, 315, 125, - 121, 260, 261, 266, 267, 411, 108, 142, 131, 141, - 110, 191, 192, 318, 131, 124, 142, 277, 318, 131, - 121, 129, 121, 277, 121, 121, 121, 130, 126, 123, - 156, 157, 124, 359, 122, 125, 129, 124, 124, 130, - 124, 221, 61, 121, 124, 130, 128, 364, 121, 175, - 367, 122, 126, 130, 380, 124, 131, 374, 122, 17, - 125, 131, 130, 247, 131, 268, 371, 269, 394, 270, - 114, 371, 389, 271, 352, 272, 110, 273, 204, 114, - 5, 407, 195, 235, 400, 319, 408, 294, 380, 354, - 98, -1, -1, -1, 411, -1, -1, 277, 354, -1, - -1, -1, 228, 229, -1, 359, -1, -1, -1, -1, - -1, -1, -1, -1, 294, -1, -1, -1, -1, 385, - -1, -1, -1, -1, -1, 385, 380, -1, -1, 255, - 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, - 266, 267, 268, 269, 270, 271, 272, 273, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 384, + 0, 40, 94, 135, 150, 115, 0, 111, 115, 134, + 140, 120, 0, 70, 76, 375, 120, 353, 9, 116, + 213, 118, 104, 92, 134, 9, 1, 134, 1, 68, + 76, 77, 164, 87, 88, 106, 140, 347, 374, 224, + 106, 148, 149, 114, 404, 102, 114, 113, 194, 40, + 41, 42, 114, 183, 111, 105, 40, 41, 127, 43, + 167, 111, 108, 120, 105, 104, 111, 51, 122, 123, + 70, 196, 9, 73, 131, 184, 105, 108, 78, 183, + 184, 138, 111, 140, 78, 85, 196, 397, 106, 196, + 78, 130, 224, 403, 240, 113, 69, 106, 223, 76, + 105, 74, 102, 40, 41, 42, 111, 85, 86, 105, + 83, 111, 244, 223, 105, 111, 223, 104, 111, 108, + 120, 114, 268, 105, 309, 125, 183, 184, 106, 111, + 113, 131, 110, 279, 4, 5, 6, 283, 138, 108, + 140, 271, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 354, 137, 111, 137, 105, 114, 271, 300, 301, + 114, 111, 111, 358, 104, 114, 361, 309, 111, 111, + 305, 114, 114, 183, 184, 40, 41, 312, 9, 256, + 257, 258, 259, 76, 77, 305, 76, 77, 305, 384, + 89, 90, 312, 79, 80, 312, 105, 353, 40, 41, + 42, 83, 84, 213, 271, 119, 120, 121, 104, 40, + 41, 406, 43, 44, 111, 112, 358, 125, 374, 361, + 51, 52, 53, 9, 254, 255, 368, 252, 253, 124, + 365, 260, 261, 389, 126, 91, 93, 107, 114, 353, + 114, 104, 384, 104, 346, 365, 402, 114, 365, 104, + 112, 104, 104, 113, 40, 41, 107, 43, 44, 109, + 374, 271, 106, 106, 406, 51, 52, 53, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 288, 108, + 105, 113, 112, 107, 107, 113, 104, 113, 56, 111, + 76, 107, 113, 107, 104, 114, 105, 109, 105, 107, + 17, 114, 108, 114, 241, 262, 265, 263, 113, 264, + 103, 131, 379, 266, 96, 267, 131, 5, 187, 229, + 395, 348, 313, 403, 288, 348, 374, 78, -1, 378, + -1, -1, -1, -1, -1, -1, -1, 347, 348, -1, + -1, -1, -1, 353, 354, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 353, 354, -1, -1, -1, -1, 359, - 360, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 318, -1, -1, -1, -1, -1, -1, -1, - 380, -1, -1, -1, -1, 385, -1, -1, -1, -1, + -1, -1, -1, -1, 374, -1, -1, -1, -1, 379, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 402, -1, -1, -1, -1, -1, 408, -1, - -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 371, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, -1, -1, - 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 121, - -1, -1, -1, 125, 126, -1, -1, -1, -1, 131, - 132, 133, 134, 135, 3, 4, 5, 6, 7, 8, + -1, -1, -1, -1, -1, -1, -1, 397, -1, -1, + -1, -1, -1, 403, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 39, 40, 41, -1, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, -1, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, -1, -1, 102, 103, -1, -1, -1, -1, -1, + 69, 70, -1, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, -1, -1, 85, 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 121, -1, -1, -1, 125, 126, -1, -1, - -1, -1, 131, 132, 133, 134, 135, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, -1, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - -1, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, -1, -1, 102, 103, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 121, -1, -1, -1, 125, - -1, -1, -1, -1, -1, 131, 132, 133, 134, 135, + -1, -1, -1, -1, -1, 104, -1, -1, -1, 108, + 109, -1, -1, -1, -1, 114, 115, 116, 117, 118, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, -1, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, -1, -1, 102, - 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 121, -1, - -1, -1, 125, -1, -1, -1, -1, -1, 131, 132, - 133, 134, 135, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, -1, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, -1, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - -1, -1, 102, 103, -1, -1, -1, -1, -1, -1, + 63, 64, 65, 66, 67, 68, 69, 70, -1, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + -1, -1, 85, 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 121, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 131, 132, 133, 134, 135, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 25, 26, + -1, 104, -1, -1, -1, 108, 109, -1, -1, -1, + -1, 114, 115, 116, 117, 118, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + -1, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 37, 38, 39, 40, 41, -1, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, -1, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, -1, -1, 102, 103, -1, -1, -1, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, -1, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 3, 4, 5, 6, 121, 8, 9, 10, 11, 12, - 13, -1, -1, -1, 131, 132, 133, 134, 135, -1, - -1, -1, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, -1, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, -1, -1, 102, - 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 3, 4, 5, 6, 121, 8, - 9, 10, 11, 12, 13, -1, -1, -1, -1, 132, - 133, 134, 135, -1, -1, -1, 25, 26, 27, 28, + -1, -1, -1, -1, -1, -1, -1, 104, -1, -1, + -1, 108, -1, -1, -1, -1, -1, 114, 115, 116, + 117, 118, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, -1, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, -1, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + -1, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, -1, -1, 85, 86, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 104, -1, -1, -1, 108, -1, -1, + -1, -1, -1, 114, 115, 116, 117, 118, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, -1, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, -1, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, -1, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, -1, -1, + 85, 86, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 104, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 114, + 115, 116, 117, 118, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, -1, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, -1, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, -1, -1, 10, 11, - 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, + 39, 40, 41, -1, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, -1, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, -1, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, -1, -1, 85, 86, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 3, 4, 5, 6, 104, 8, 9, 10, 11, + 12, 13, -1, -1, -1, 114, 115, 116, 117, 118, -1, -1, -1, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, - -1, -1, 131, 45, 46, 47, 48, 49, 50, -1, - -1, -1, -1, -1, -1, -1, -1, 59, 60, -1, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - -1, 93, 94, 95, 96, 97, 98, 99, -1, -1, - 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 121, - -1, -1, 124, 10, 11, 12, 13, -1, -1, -1, - 132, 133, 134, 135, -1, -1, -1, -1, 25, 26, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + -1, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, -1, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, -1, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, -1, -1, 85, 86, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 4, 5, 6, + -1, -1, 104, 10, 11, 12, 13, -1, -1, -1, + -1, -1, -1, 115, 116, 117, 118, -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, 45, 46, - 47, 48, 49, 50, -1, -1, -1, -1, -1, -1, - -1, -1, 59, 60, -1, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, -1, 93, 94, 95, 96, - 97, 98, 99, -1, -1, 102, 103, -1, -1, -1, + 47, 48, 49, 50, -1, -1, -1, 54, 55, -1, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, -1, 72, 73, 74, -1, 76, + 77, -1, -1, 10, 11, 12, 13, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, -1, -1, -1, -1, 114, 45, 46, + 47, 48, 49, 50, -1, -1, -1, 54, 55, -1, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, -1, 72, 73, 74, -1, 76, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 121, -1, -1, 124, 10, 11, - 12, 13, -1, -1, -1, 132, 133, 134, 135, -1, - -1, -1, -1, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, - -1, -1, -1, 45, 46, 47, 48, 49, 50, -1, - -1, -1, -1, -1, -1, -1, -1, 59, 60, -1, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - -1, 93, 94, 95, 96, 97, 98, 99, -1, -1, - 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 121, - 10, 11, 12, 13, -1, -1, -1, -1, -1, 131, - 132, 133, 134, 135, -1, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, - 50, -1, -1, -1, -1, -1, -1, -1, -1, 59, - 60, -1, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, -1, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, -1, 93, 94, 95, 96, 97, 98, 99, - -1, -1, 102, 103, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 104, -1, -1, + 107, 10, 11, 12, 13, -1, -1, -1, 115, 116, + 117, 118, -1, -1, -1, -1, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, + 49, 50, -1, -1, -1, 54, 55, -1, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, -1, 72, 73, 74, -1, 76, 77, 78, + 79, 80, 81, 82, -1, -1, 85, 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 121, -1, -1, 124, 10, 11, 12, 13, -1, - -1, -1, 132, 133, 134, 135, -1, -1, -1, -1, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, - 45, 46, 47, 48, 49, 50, -1, -1, -1, -1, - -1, -1, -1, -1, 59, 60, -1, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, -1, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, -1, 93, 94, - 95, 96, 97, 98, 99, -1, -1, 102, 103, -1, + -1, -1, -1, -1, -1, 104, -1, -1, 107, 10, + 11, 12, 13, -1, -1, -1, 115, 116, 117, 118, + -1, -1, -1, -1, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, + -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, + -1, -1, -1, 54, 55, -1, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + -1, 72, 73, 74, -1, 76, 77, 78, 79, 80, + 81, 82, -1, -1, 85, 86, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 104, 10, 11, 12, 13, -1, -1, + -1, -1, -1, 114, 115, 116, 117, 118, -1, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, -1, -1, -1, -1, -1, 45, + 46, 47, 48, 49, 50, -1, -1, -1, 54, 55, + -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, -1, 72, 73, 74, -1, + 76, 77, 78, 79, 80, 81, 82, -1, -1, 85, + 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 104, -1, + -1, 107, 10, 11, 12, 13, -1, -1, -1, 115, + 116, 117, 118, -1, -1, -1, -1, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, + 48, 49, 50, -1, -1, -1, 54, 55, -1, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, -1, 72, 73, 74, -1, 76, 77, + 78, 79, 80, 81, 82, -1, -1, 85, 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 121, 10, 11, 12, - 13, -1, -1, -1, -1, -1, -1, 132, 133, 134, - 135, -1, 25, 26, 27, 28, 29, 30, 31, 32, + -1, -1, -1, -1, -1, -1, 104, 10, 11, 12, + 13, -1, -1, -1, -1, -1, -1, 115, 116, 117, + 118, -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, -1, -1, - -1, -1, -1, -1, -1, -1, 59, 60, -1, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, -1, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, - 93, 94, 95, 96, 97, 98, 99, -1, -1, 102, - 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 3, 4, 5, 6, 121, 8, - 9, 10, 11, 12, 13, -1, -1, -1, -1, 132, - 133, 134, 135, -1, -1, -1, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, -1, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, -1, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, -1, 94, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, - -1, 8, 9, 10, 11, 12, 13, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 126, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, -1, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, -1, 94, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, - 5, 6, -1, 8, 9, 10, 11, 12, 13, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 126, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, -1, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, -1, 94, - -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 126, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, -1, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - -1, 94, 3, 4, 5, 6, 7, 8, 9, 10, + -1, 54, 55, -1, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, -1, 72, + 73, 74, -1, 76, 77, 78, 79, 80, 81, 82, + -1, -1, 85, 86, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, + 6, 104, 8, 9, 10, 11, 12, 13, -1, -1, + -1, -1, 115, 116, 117, 118, -1, -1, -1, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, -1, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, -1, 72, 73, 74, 75, + -1, 77, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 3, 4, 5, 6, -1, 8, 9, 10, + 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 109, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, -1, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, -1, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + -1, 72, 73, 74, 75, -1, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, + 6, -1, 8, 9, 10, 11, 12, 13, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 109, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, -1, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, -1, 72, 73, 74, 75, + -1, 77, -1, -1, -1, -1, -1, -1, -1, 0, + -1, -1, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 109, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, -1, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, -1, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + -1, 72, 73, 74, 75, -1, 77, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, -1, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, -1, 72, 73, 74, 75, + -1, 77, 3, 4, 5, 6, -1, 8, 9, 10, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - -1, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, -1, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, -1, 94, 3, 4, 5, 6, -1, 8, - 9, 10, 11, 12, 13, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, -1, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, -1, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, -1, 94, 10, 11, 12, 13, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, - -1, 45, 46, 47, 48, 49, 50, -1, -1, -1, - -1, -1, -1, -1, -1, 59, 60, -1, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, - 94, 10, 11, 12, 13, 99, -1, -1, -1, -1, + 41, -1, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, -1, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + -1, 72, 73, 74, 75, -1, 77, 4, 5, 6, + -1, -1, -1, 10, 11, 12, 13, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, -1, -1, -1, -1, -1, 45, 46, + 47, 48, 49, 50, -1, -1, -1, 54, 55, -1, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, -1, 72, 73, 74, -1, -1, + 77, 10, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, - 49, 50, -1, -1, -1, -1, -1, -1, -1, -1, - 59, 60, -1, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, -1, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, -1, -1, 94 + 49, 50, -1, -1, -1, 54, 55, -1, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, -1, 72, 73, 74, -1, 76, 77, 10, + 11, 12, 13, 82, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, + -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, + -1, -1, -1, 54, 55, -1, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + -1, 72, 73, 74, -1, -1, 77 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1580,81 +1484,79 @@ static const yytype_uint8 yystos[] = { 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 94, 177, - 178, 179, 180, 181, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 198, 199, 200, 235, 236, - 237, 194, 93, 94, 125, 146, 121, 131, 238, 122, - 128, 182, 183, 184, 189, 193, 128, 131, 93, 146, - 93, 131, 176, 191, 193, 123, 0, 236, 198, 202, - 125, 93, 196, 197, 125, 218, 183, 182, 184, 146, - 146, 121, 123, 130, 125, 131, 189, 193, 203, 204, - 93, 95, 96, 97, 98, 99, 102, 103, 121, 124, - 132, 133, 134, 135, 147, 148, 149, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 175, 198, - 131, 203, 201, 130, 122, 128, 14, 15, 16, 18, - 19, 20, 21, 22, 23, 24, 61, 125, 126, 131, - 158, 171, 172, 174, 177, 178, 198, 208, 209, 210, - 211, 219, 220, 221, 223, 225, 227, 234, 123, 123, - 130, 124, 175, 172, 207, 193, 146, 205, 206, 126, - 204, 158, 158, 174, 102, 103, 123, 127, 122, 122, - 128, 60, 172, 121, 158, 136, 137, 138, 133, 135, - 100, 101, 104, 105, 139, 140, 106, 107, 143, 142, - 141, 108, 110, 109, 144, 124, 126, 203, 96, 97, - 197, 131, 131, 229, 121, 121, 131, 131, 174, 121, - 175, 129, 121, 126, 212, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 130, 173, 128, 131, 126, - 209, 175, 124, 175, 207, 130, 124, 205, 123, 128, - 131, 93, 131, 122, 150, 174, 93, 99, 153, 172, - 158, 158, 158, 160, 160, 161, 161, 162, 162, 162, - 162, 163, 163, 164, 165, 166, 167, 168, 169, 174, - 126, 215, 216, 217, 230, 174, 131, 174, 129, 228, - 219, 172, 172, 124, 130, 124, 207, 130, 131, 175, - 206, 123, 131, 124, 129, 61, 218, 210, 208, 220, - 231, 122, 122, 174, 187, 189, 226, 213, 207, 130, - 207, 124, 175, 172, 121, 226, 232, 233, 215, 222, - 224, 146, 122, 126, 207, 124, 174, 131, 122, 17, - 211, 130, 210, 214, 218, 131, 122, 174, 214, 215, - 207, 131 + 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, + 77, 160, 161, 162, 163, 164, 169, 170, 171, 172, + 174, 175, 176, 177, 178, 181, 182, 183, 218, 219, + 220, 44, 76, 172, 175, 177, 40, 41, 76, 77, + 108, 129, 104, 114, 221, 105, 111, 9, 40, 41, + 42, 166, 167, 173, 111, 114, 76, 129, 175, 76, + 114, 159, 176, 181, 175, 106, 0, 219, 175, 181, + 185, 108, 76, 179, 180, 108, 201, 166, 165, 168, + 176, 167, 129, 104, 106, 113, 108, 3, 174, 176, + 186, 187, 76, 78, 79, 80, 81, 82, 85, 86, + 104, 107, 115, 116, 117, 118, 130, 131, 132, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 158, 181, 114, 186, 184, 113, 105, 111, 14, 15, + 16, 18, 19, 20, 21, 22, 23, 24, 56, 108, + 109, 114, 141, 154, 155, 157, 160, 161, 181, 191, + 192, 193, 194, 202, 203, 204, 206, 208, 210, 217, + 129, 165, 168, 106, 113, 107, 158, 155, 190, 176, + 129, 188, 189, 109, 187, 141, 141, 157, 85, 86, + 106, 110, 105, 105, 111, 55, 155, 104, 141, 119, + 120, 121, 116, 118, 83, 84, 87, 88, 122, 123, + 89, 90, 126, 125, 124, 91, 93, 92, 127, 107, + 109, 186, 79, 80, 180, 114, 114, 212, 104, 104, + 114, 114, 157, 104, 158, 112, 104, 109, 195, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 113, + 156, 111, 114, 109, 192, 106, 107, 158, 190, 113, + 107, 188, 106, 111, 114, 76, 114, 105, 133, 157, + 76, 82, 136, 155, 141, 141, 141, 143, 143, 144, + 144, 145, 145, 145, 145, 146, 146, 147, 148, 149, + 150, 151, 152, 157, 109, 198, 199, 200, 213, 157, + 114, 157, 112, 211, 202, 155, 155, 158, 113, 107, + 190, 113, 114, 158, 189, 106, 114, 107, 112, 56, + 201, 193, 191, 203, 214, 105, 105, 157, 171, 174, + 209, 196, 107, 190, 113, 190, 107, 158, 155, 104, + 209, 215, 216, 198, 205, 207, 129, 105, 109, 190, + 107, 157, 114, 105, 17, 194, 113, 193, 197, 201, + 114, 105, 157, 197, 198, 190, 114 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 145, 146, 146, 147, 148, 148, 148, 148, 148, - 148, 149, 149, 149, 149, 149, 149, 150, 151, 152, - 152, 153, 153, 154, 154, 155, 155, 156, 157, 157, - 157, 158, 158, 158, 158, 159, 159, 159, 159, 160, - 160, 160, 160, 161, 161, 161, 162, 162, 162, 163, - 163, 163, 163, 163, 164, 164, 164, 165, 165, 166, - 166, 167, 167, 168, 168, 169, 169, 170, 170, 171, - 171, 172, 172, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 174, 174, 175, 176, 177, 177, - 177, 177, 177, 177, 177, 177, 178, 179, 179, 180, - 180, 181, 182, 182, 183, 183, 183, 183, 184, 185, - 185, 185, 185, 185, 185, 186, 186, 186, 186, 186, - 186, 187, 187, 188, 188, 189, 189, 190, 191, 191, - 191, 191, 191, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 193, 194, 194, 194, - 195, 196, 196, 197, 197, 197, 198, 198, 198, 199, - 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, - 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, - 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, - 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, - 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, - 199, 199, 199, 199, 199, 199, 201, 200, 202, 200, - 203, 203, 204, 204, 205, 205, 206, 206, 207, 208, - 209, 209, 210, 210, 210, 210, 210, 210, 210, 211, - 212, 213, 211, 214, 214, 216, 215, 217, 215, 218, - 218, 219, 219, 220, 220, 221, 222, 222, 224, 223, - 225, 225, 226, 226, 228, 227, 229, 227, 230, 227, - 231, 231, 232, 232, 233, 233, 234, 234, 234, 234, - 234, 235, 235, 236, 236, 238, 237 + 0, 128, 129, 129, 130, 131, 131, 131, 131, 131, + 131, 132, 132, 132, 132, 132, 132, 133, 134, 135, + 135, 136, 136, 137, 137, 138, 138, 139, 140, 140, + 140, 141, 141, 141, 141, 142, 142, 142, 142, 143, + 143, 143, 143, 144, 144, 144, 145, 145, 145, 146, + 146, 146, 146, 146, 147, 147, 147, 148, 148, 149, + 149, 150, 150, 151, 151, 152, 152, 153, 153, 154, + 154, 155, 155, 156, 156, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 157, 157, 158, 159, 160, 160, + 160, 160, 160, 160, 160, 161, 162, 162, 163, 163, + 164, 165, 165, 166, 166, 166, 166, 167, 167, 167, + 167, 168, 169, 169, 169, 169, 169, 169, 170, 170, + 170, 170, 170, 170, 170, 171, 171, 172, 172, 173, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 175, 175, 175, 175, 175, 175, 176, 176, 177, 177, + 177, 178, 179, 179, 180, 180, 180, 181, 181, 181, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 184, 183, 185, 183, 186, + 186, 187, 187, 188, 188, 189, 189, 190, 191, 192, + 192, 193, 193, 193, 193, 193, 193, 193, 194, 195, + 196, 194, 197, 197, 199, 198, 200, 198, 201, 201, + 202, 202, 203, 203, 204, 205, 205, 207, 206, 208, + 208, 209, 209, 211, 210, 212, 210, 213, 210, 214, + 214, 215, 215, 216, 216, 217, 217, 217, 217, 217, + 218, 218, 219, 219, 221, 220 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1669,26 +1571,25 @@ static const yytype_uint8 yyr2[] = 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 5, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, 2, 2, - 4, 5, 6, 9, 2, 3, 2, 1, 1, 2, - 3, 3, 2, 5, 2, 1, 2, 1, 1, 1, - 3, 6, 7, 8, 5, 1, 2, 5, 6, 7, - 4, 1, 2, 1, 1, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 4, 1, 3, 1, 3, 3, 1, 3, 4, 1, + 4, 5, 6, 9, 2, 2, 1, 1, 2, 3, + 3, 2, 5, 3, 2, 3, 2, 0, 1, 1, + 1, 1, 1, 3, 6, 7, 8, 5, 1, 2, + 5, 6, 7, 4, 2, 1, 2, 1, 1, 1, + 1, 1, 2, 1, 2, 1, 1, 2, 2, 3, + 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, + 1, 4, 1, 3, 1, 3, 3, 1, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 6, 0, 5, - 1, 2, 3, 4, 1, 3, 1, 4, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 0, 0, 5, 1, 1, 0, 2, 0, 2, 2, - 3, 1, 2, 1, 2, 5, 3, 1, 0, 6, - 3, 2, 1, 4, 0, 6, 0, 8, 0, 7, - 1, 1, 1, 0, 2, 3, 2, 2, 2, 3, - 2, 1, 2, 1, 1, 0, 3 + 1, 1, 1, 1, 1, 0, 6, 0, 5, 1, + 2, 3, 4, 1, 3, 1, 4, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, + 0, 5, 1, 1, 0, 2, 0, 2, 2, 3, + 1, 2, 1, 2, 5, 3, 1, 0, 6, 3, + 2, 1, 4, 0, 6, 0, 8, 0, 7, 1, + 1, 1, 0, 2, 3, 2, 2, 2, 3, 2, + 1, 2, 1, 1, 0, 3 }; @@ -2664,7 +2565,7 @@ yyreduce: const TType *type = new TType((yyvsp[0].interm.intermTypedNode)->getType()); (yyvsp[-1].interm.function)->addParameter(TConstParameter(type)); (yyval.interm).function = (yyvsp[-1].interm.function); - (yyval.interm).nodePair.node1 = TIntermediate::MakeAggregate((yyvsp[0].interm.intermTypedNode), (yylsp[0])); + (yyval.interm).nodePair.node1 = context->intermediate.makeAggregate((yyvsp[0].interm.intermTypedNode), (yylsp[0])); } break; @@ -3165,7 +3066,10 @@ yyreduce: case 89: { - (yyval.interm.intermNode) = (yyvsp[-1].interm).intermDeclaration; + TIntermAggregate *aggNode = (yyvsp[-1].interm).intermAggregate; + if (aggNode && aggNode->getOp() == EOpNull) + aggNode->setOp(EOpDeclaration); + (yyval.interm.intermNode) = aggNode; } break; @@ -3177,7 +3081,7 @@ yyreduce: context->error((yylsp[-3]), "precision is not supported in fragment shader", "highp"); } if (!context->symbolTable.setDefaultPrecision( (yyvsp[-1].interm.type), (yyvsp[-2].interm.precision) )) { - context->error((yylsp[-3]), "illegal type argument for default precision qualifier", getBasicString((yyvsp[-1].interm.type).getBasicType())); + context->error((yylsp[-3]), "illegal type argument for default precision qualifier", getBasicString((yyvsp[-1].interm.type).type)); } (yyval.interm.intermNode) = 0; } @@ -3187,8 +3091,8 @@ yyreduce: case 91: { - ES3_OR_NEWER((yyvsp[-3].lex).string->c_str(), (yylsp[-4]), "interface blocks"); - (yyval.interm.intermNode) = context->addInterfaceBlock(*(yyvsp[-4].interm.typeQualifierBuilder), (yylsp[-3]), *(yyvsp[-3].lex).string, (yyvsp[-2].interm.fieldList), NULL, (yyloc), NULL, (yyloc)); + ES3_OR_NEWER(getQualifierString((yyvsp[-4].interm.type).qualifier), (yylsp[-4]), "interface blocks"); + (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[-4].interm.type), (yylsp[-3]), *(yyvsp[-3].lex).string, (yyvsp[-2].interm.fieldList), NULL, (yyloc), NULL, (yyloc)); } break; @@ -3196,8 +3100,8 @@ yyreduce: case 92: { - ES3_OR_NEWER((yyvsp[-4].lex).string->c_str(), (yylsp[-5]), "interface blocks"); - (yyval.interm.intermNode) = context->addInterfaceBlock(*(yyvsp[-5].interm.typeQualifierBuilder), (yylsp[-4]), *(yyvsp[-4].lex).string, (yyvsp[-3].interm.fieldList), (yyvsp[-1].lex).string, (yylsp[-1]), NULL, (yyloc)); + ES3_OR_NEWER(getQualifierString((yyvsp[-5].interm.type).qualifier), (yylsp[-5]), "interface blocks"); + (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[-5].interm.type), (yylsp[-4]), *(yyvsp[-4].lex).string, (yyvsp[-3].interm.fieldList), (yyvsp[-1].lex).string, (yylsp[-1]), NULL, (yyloc)); } break; @@ -3205,8 +3109,8 @@ yyreduce: case 93: { - ES3_OR_NEWER((yyvsp[-7].lex).string->c_str(), (yylsp[-8]), "interface blocks"); - (yyval.interm.intermNode) = context->addInterfaceBlock(*(yyvsp[-8].interm.typeQualifierBuilder), (yylsp[-7]), *(yyvsp[-7].lex).string, (yyvsp[-6].interm.fieldList), (yyvsp[-4].lex).string, (yylsp[-4]), (yyvsp[-2].interm.intermTypedNode), (yylsp[-3])); + ES3_OR_NEWER(getQualifierString((yyvsp[-8].interm.type).qualifier), (yylsp[-8]), "interface blocks"); + (yyval.interm.intermNode) = context->addInterfaceBlock((yyvsp[-8].interm.type), (yylsp[-7]), *(yyvsp[-7].lex).string, (yyvsp[-6].interm.fieldList), (yyvsp[-4].lex).string, (yylsp[-4]), (yyvsp[-2].interm.intermTypedNode), (yylsp[-3])); } break; @@ -3214,7 +3118,7 @@ yyreduce: case 94: { - context->parseGlobalLayoutQualifier(*(yyvsp[-1].interm.typeQualifierBuilder)); + context->parseGlobalLayoutQualifier((yyvsp[-1].interm.type)); (yyval.interm.intermNode) = 0; } @@ -3223,7 +3127,7 @@ yyreduce: case 95: { - (yyval.interm.intermNode) = context->parseInvariantDeclaration(*(yyvsp[-2].interm.typeQualifierBuilder), (yylsp[-1]), (yyvsp[-1].lex).string, (yyvsp[-1].lex).symbol); + (yyval.interm).function = context->parseFunctionDeclarator((yylsp[0]), (yyvsp[-1].interm.function)); } break; @@ -3231,8 +3135,7 @@ yyreduce: case 96: { - (yyval.interm).function = context->parseFunctionDeclarator((yylsp[0]), (yyvsp[-1].interm.function)); - context->exitFunctionDeclaration(); + (yyval.interm.function) = (yyvsp[0].interm.function); } break; @@ -3247,14 +3150,6 @@ yyreduce: case 98: - { - (yyval.interm.function) = (yyvsp[0].interm.function); - } - - break; - - case 99: - { // Add the parameter (yyval.interm.function) = (yyvsp[-1].interm.function); @@ -3266,7 +3161,7 @@ yyreduce: break; - case 100: + case 99: { // @@ -3288,21 +3183,20 @@ yyreduce: break; - case 101: + case 100: { (yyval.interm.function) = context->parseFunctionHeader((yyvsp[-2].interm.type), (yyvsp[-1].lex).string, (yylsp[-1])); context->symbolTable.push(); - context->enterFunctionDeclaration(); } break; - case 102: + case 101: { - if ((yyvsp[-1].interm.type).getBasicType() == EbtVoid) { + if ((yyvsp[-1].interm.type).type == EbtVoid) { context->error((yylsp[0]), "illegal use of type 'void'", (yyvsp[0].lex).string->c_str()); } context->checkIsNotReserved((yylsp[0]), *(yyvsp[0].lex).string); @@ -3312,7 +3206,7 @@ yyreduce: break; - case 103: + case 102: { // Check that we can make an array out of this type @@ -3331,11 +3225,21 @@ yyreduce: break; + case 103: + + { + (yyval.interm) = (yyvsp[0].interm); + context->checkIsParameterQualifierValid((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type); + } + + break; + case 104: { (yyval.interm) = (yyvsp[0].interm); - context->checkIsParameterQualifierValid((yylsp[0]), *(yyvsp[-1].interm.typeQualifierBuilder), (yyvsp[0].interm).param.type); + context->checkOutParameterIsNotSampler((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type); + context->checkIsParameterQualifierValid((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type); } break; @@ -3344,7 +3248,7 @@ yyreduce: { (yyval.interm) = (yyvsp[0].interm); - (yyval.interm).param.type->setQualifier(EvqIn); + context->checkIsParameterQualifierValid((yylsp[0]), (yyvsp[-2].interm.qualifier), (yyvsp[-1].interm.qualifier), (yyval.interm).param.type); } break; @@ -3353,7 +3257,8 @@ yyreduce: { (yyval.interm) = (yyvsp[0].interm); - context->checkIsParameterQualifierValid((yylsp[0]), *(yyvsp[-1].interm.typeQualifierBuilder), (yyvsp[0].interm).param.type); + context->checkOutParameterIsNotSampler((yylsp[0]), (yyvsp[-1].interm.qualifier), *(yyvsp[0].interm).param.type); + context->checkIsParameterQualifierValid((yylsp[0]), EvqTemporary, (yyvsp[-1].interm.qualifier), (yyval.interm).param.type); } break; @@ -3361,8 +3266,7 @@ yyreduce: case 107: { - (yyval.interm) = (yyvsp[0].interm); - (yyval.interm).param.type->setQualifier(EvqIn); + (yyval.interm.qualifier) = EvqIn; } break; @@ -3370,8 +3274,7 @@ yyreduce: case 108: { - TParameter param = { 0, new TType((yyvsp[0].interm.type)) }; - (yyval.interm).param = param; + (yyval.interm.qualifier) = EvqIn; } break; @@ -3379,7 +3282,7 @@ yyreduce: case 109: { - (yyval.interm) = (yyvsp[0].interm); + (yyval.interm.qualifier) = EvqOut; } break; @@ -3387,8 +3290,7 @@ yyreduce: case 110: { - (yyval.interm) = (yyvsp[-2].interm); - context->parseDeclarator((yyval.interm).type, (yylsp[0]), *(yyvsp[0].lex).string, (yyval.interm).intermDeclaration); + (yyval.interm.qualifier) = EvqInOut; } break; @@ -3396,8 +3298,8 @@ yyreduce: case 111: { - (yyval.interm) = (yyvsp[-5].interm); - context->parseArrayDeclarator((yyval.interm).type, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), (yyval.interm).intermDeclaration); + TParameter param = { 0, new TType((yyvsp[0].interm.type)) }; + (yyval.interm).param = param; } break; @@ -3405,9 +3307,7 @@ yyreduce: case 112: { - ES3_OR_NEWER("[]", (yylsp[-4]), "implicitly sized array"); - (yyval.interm) = (yyvsp[-6].interm); - context->parseArrayInitDeclarator((yyval.interm).type, (yylsp[-4]), *(yyvsp[-4].lex).string, (yylsp[-3]), nullptr, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode), (yyval.interm).intermDeclaration); + (yyval.interm) = (yyvsp[0].interm); } break; @@ -3415,9 +3315,8 @@ yyreduce: case 113: { - ES3_OR_NEWER("=", (yylsp[-1]), "first-class arrays (array initializer)"); - (yyval.interm) = (yyvsp[-7].interm); - context->parseArrayInitDeclarator((yyval.interm).type, (yylsp[-5]), *(yyvsp[-5].lex).string, (yylsp[-4]), (yyvsp[-3].interm.intermTypedNode), (yylsp[-1]), (yyvsp[0].interm.intermTypedNode), (yyval.interm).intermDeclaration); + (yyval.interm) = (yyvsp[-2].interm); + (yyval.interm).intermAggregate = context->parseDeclarator((yyval.interm).type, (yyvsp[-2].interm).intermAggregate, (yylsp[0]), *(yyvsp[0].lex).string); } break; @@ -3425,8 +3324,8 @@ yyreduce: case 114: { - (yyval.interm) = (yyvsp[-4].interm); - context->parseInitDeclarator((yyval.interm).type, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode), (yyval.interm).intermDeclaration); + (yyval.interm) = (yyvsp[-5].interm); + (yyval.interm).intermAggregate = context->parseArrayDeclarator((yyval.interm).type, (yyvsp[-5].interm).intermAggregate, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); } break; @@ -3434,8 +3333,9 @@ yyreduce: case 115: { - (yyval.interm).type = (yyvsp[0].interm.type); - (yyval.interm).intermDeclaration = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), ""); + ES3_OR_NEWER("[]", (yylsp[-4]), "implicitly sized array"); + (yyval.interm) = (yyvsp[-6].interm); + (yyval.interm).intermAggregate = context->parseArrayInitDeclarator((yyval.interm).type, (yyvsp[-6].interm).intermAggregate, (yylsp[-4]), *(yyvsp[-4].lex).string, (yylsp[-3]), nullptr, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); } break; @@ -3443,8 +3343,9 @@ yyreduce: case 116: { - (yyval.interm).type = (yyvsp[-1].interm.type); - (yyval.interm).intermDeclaration = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), *(yyvsp[0].lex).string); + ES3_OR_NEWER("=", (yylsp[-1]), "first-class arrays (array initializer)"); + (yyval.interm) = (yyvsp[-7].interm); + (yyval.interm).intermAggregate = context->parseArrayInitDeclarator((yyval.interm).type, (yyvsp[-7].interm).intermAggregate, (yylsp[-5]), *(yyvsp[-5].lex).string, (yylsp[-4]), (yyvsp[-3].interm.intermTypedNode), (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); } break; @@ -3452,8 +3353,8 @@ yyreduce: case 117: { - (yyval.interm).type = (yyvsp[-4].interm.type); - (yyval.interm).intermDeclaration = context->parseSingleArrayDeclaration((yyval.interm).type, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); + (yyval.interm) = (yyvsp[-4].interm); + (yyval.interm).intermAggregate = context->parseInitDeclarator((yyval.interm).type, (yyvsp[-4].interm).intermAggregate, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); } break; @@ -3461,9 +3362,8 @@ yyreduce: case 118: { - ES3_OR_NEWER("[]", (yylsp[-3]), "implicitly sized array"); - (yyval.interm).type = (yyvsp[-5].interm.type); - (yyval.interm).intermDeclaration = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[-4]), *(yyvsp[-4].lex).string, (yylsp[-3]), nullptr, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm).type = (yyvsp[0].interm.type); + (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), ""); } break; @@ -3471,9 +3371,8 @@ yyreduce: case 119: { - ES3_OR_NEWER("=", (yylsp[-1]), "first-class arrays (array initializer)"); - (yyval.interm).type = (yyvsp[-6].interm.type); - (yyval.interm).intermDeclaration = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[-5]), *(yyvsp[-5].lex).string, (yylsp[-4]), (yyvsp[-3].interm.intermTypedNode), (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm).type = (yyvsp[-1].interm.type); + (yyval.interm).intermAggregate = context->parseSingleDeclaration((yyval.interm).type, (yylsp[0]), *(yyvsp[0].lex).string); } break; @@ -3481,8 +3380,8 @@ yyreduce: case 120: { - (yyval.interm).type = (yyvsp[-3].interm.type); - (yyval.interm).intermDeclaration = context->parseSingleInitDeclaration((yyval.interm).type, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); + (yyval.interm).type = (yyvsp[-4].interm.type); + (yyval.interm).intermAggregate = context->parseSingleArrayDeclaration((yyval.interm).type, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); } break; @@ -3490,8 +3389,9 @@ yyreduce: case 121: { - context->addFullySpecifiedType(&(yyvsp[0].interm.type)); - (yyval.interm.type) = (yyvsp[0].interm.type); + ES3_OR_NEWER("[]", (yylsp[-3]), "implicitly sized array"); + (yyval.interm).type = (yyvsp[-5].interm.type); + (yyval.interm).intermAggregate = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[-4]), *(yyvsp[-4].lex).string, (yylsp[-3]), nullptr, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); } break; @@ -3499,7 +3399,9 @@ yyreduce: case 122: { - (yyval.interm.type) = context->addFullySpecifiedType(*(yyvsp[-1].interm.typeQualifierBuilder), (yyvsp[0].interm.type)); + ES3_OR_NEWER("=", (yylsp[-1]), "first-class arrays (array initializer)"); + (yyval.interm).type = (yyvsp[-6].interm.type); + (yyval.interm).intermAggregate = context->parseSingleArrayInitDeclaration((yyval.interm).type, (yylsp[-5]), *(yyvsp[-5].lex).string, (yylsp[-4]), (yyvsp[-3].interm.intermTypedNode), (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); } break; @@ -3507,7 +3409,8 @@ yyreduce: case 123: { - (yyval.interm.qualifier) = EvqSmooth; + (yyval.interm).type = (yyvsp[-3].interm.type); + (yyval.interm).intermAggregate = context->parseSingleInitDeclaration((yyval.interm).type, (yylsp[-2]), *(yyvsp[-2].lex).string, (yylsp[-1]), (yyvsp[0].interm.intermTypedNode)); } break; @@ -3515,7 +3418,8 @@ yyreduce: case 124: { - (yyval.interm.qualifier) = EvqFlat; + // $$.type is not used in invariant declarations. + (yyval.interm).intermAggregate = context->parseInvariantDeclaration((yylsp[-1]), (yylsp[0]), (yyvsp[0].lex).string, (yyvsp[0].lex).symbol); } break; @@ -3523,8 +3427,14 @@ yyreduce: case 125: { - (yyval.interm.typeQualifierBuilder) = context->createTypeQualifierBuilder((yylsp[0])); - (yyval.interm.typeQualifierBuilder)->appendQualifier((yyvsp[0].interm.qualifierWrapper)); + (yyval.interm.type) = (yyvsp[0].interm.type); + + if ((yyvsp[0].interm.type).array) { + ES3_OR_NEWER("[]", (yylsp[0]), "first-class-array"); + if (context->getShaderVersion() != 300) { + (yyvsp[0].interm.type).clearArrayness(); + } + } } break; @@ -3532,8 +3442,7 @@ yyreduce: case 126: { - (yyval.interm.typeQualifierBuilder) = (yyvsp[-1].interm.typeQualifierBuilder); - (yyval.interm.typeQualifierBuilder)->appendQualifier((yyvsp[0].interm.qualifierWrapper)); + (yyval.interm.type) = context->addFullySpecifiedType((yyvsp[-1].interm.type).qualifier, (yyvsp[-1].interm.type).invariant, (yyvsp[-1].interm.type).layoutQualifier, (yyvsp[0].interm.type)); } break; @@ -3541,7 +3450,7 @@ yyreduce: case 127: { - // empty + (yyval.interm.type).qualifier = EvqSmooth; } break; @@ -3549,8 +3458,7 @@ yyreduce: case 128: { - context->checkLocalVariableConstStorageQualifier(*(yyvsp[0].interm.qualifierWrapper)); - (yyval.interm.qualifierWrapper) = (yyvsp[0].interm.qualifierWrapper); + (yyval.interm.type).qualifier = EvqFlat; } break; @@ -3558,8 +3466,7 @@ yyreduce: case 129: { - context->checkIsAtGlobalLevel((yylsp[0]), "layout"); - (yyval.interm.qualifierWrapper) = new TLayoutQualifierWrapper((yyvsp[0].interm.layoutQualifier), (yylsp[0])); + (yyval.interm.qualifier) = EvqConst; } break; @@ -3567,7 +3474,10 @@ yyreduce: case 130: { - (yyval.interm.qualifierWrapper) = new TPrecisionQualifierWrapper((yyvsp[0].interm.precision), (yylsp[0])); + VERTEX_ONLY("attribute", (yylsp[0])); + ES2_ONLY("attribute", (yylsp[0])); + context->checkIsAtGlobalLevel((yylsp[0]), "attribute"); + (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yylsp[0])); } break; @@ -3575,7 +3485,12 @@ yyreduce: case 131: { - (yyval.interm.qualifierWrapper) = new TInterpolationQualifierWrapper((yyvsp[0].interm.qualifier), (yylsp[0])); + ES2_ONLY("varying", (yylsp[0])); + context->checkIsAtGlobalLevel((yylsp[0]), "varying"); + if (context->getShaderType() == GL_VERTEX_SHADER) + (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[0])); + else + (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[0])); } break; @@ -3583,8 +3498,13 @@ yyreduce: case 132: { - context->checkIsAtGlobalLevel((yylsp[0]), "invariant"); - (yyval.interm.qualifierWrapper) = new TInvariantQualifierWrapper((yylsp[0])); + ES2_ONLY("varying", (yylsp[-1])); + context->checkIsAtGlobalLevel((yylsp[-1]), "invariant varying"); + if (context->getShaderType() == GL_VERTEX_SHADER) + (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yylsp[-1])); + else + (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yylsp[-1])); + (yyval.interm.type).invariant = true; } break; @@ -3592,10 +3512,11 @@ yyreduce: case 133: { - VERTEX_ONLY("attribute", (yylsp[0])); - ES2_ONLY("attribute", (yylsp[0])); - context->checkIsAtGlobalLevel((yylsp[0]), "attribute"); - (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqAttribute, (yylsp[0])); + if ((yyvsp[0].interm.type).qualifier != EvqConst && !context->symbolTable.atGlobalLevel()) + { + context->error((yylsp[0]), "Local variables can only use the const storage qualifier.", getQualifierString((yyvsp[0].interm.type).qualifier)); + } + (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0])); } break; @@ -3603,12 +3524,7 @@ yyreduce: case 134: { - ES2_ONLY("varying", (yylsp[0])); - context->checkIsAtGlobalLevel((yylsp[0]), "varying"); - if (context->getShaderType() == GL_VERTEX_SHADER) - (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqVaryingOut, (yylsp[0])); - else - (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqVaryingIn, (yylsp[0])); + (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[-1]), (yyvsp[-1].interm.type).qualifier, (yylsp[0]), (yyvsp[0].interm.type).qualifier); } break; @@ -3616,7 +3532,10 @@ yyreduce: case 135: { - (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqConst, (yylsp[0])); + context->error((yylsp[0]), "interpolation qualifier requires a fragment 'in' or vertex 'out' storage qualifier", getInterpolationString((yyvsp[0].interm.type).qualifier)); + + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0])); } break; @@ -3624,24 +3543,8 @@ yyreduce: case 136: { - if (context->declaringFunction()) - { - (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqIn, (yylsp[0])); - } - else if (context->getShaderType() == GL_FRAGMENT_SHADER) - { - ES3_OR_NEWER("in", (yylsp[0]), "storage qualifier"); - (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqFragmentIn, (yylsp[0])); - } - else if (context->getShaderType() == GL_VERTEX_SHADER) - { - ES3_OR_NEWER("in", (yylsp[0]), "storage qualifier"); - (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqVertexIn, (yylsp[0])); - } - else - { - (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqComputeIn, (yylsp[0])); - } + (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).layoutQualifier = (yyvsp[0].interm.layoutQualifier); } break; @@ -3649,23 +3552,8 @@ yyreduce: case 137: { - if (context->declaringFunction()) - { - (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqOut, (yylsp[0])); - } - else - { - ES3_OR_NEWER("out", (yylsp[0]), "storage qualifier"); - NON_COMPUTE_ONLY("out", (yylsp[0])); - if (context->getShaderType() == GL_FRAGMENT_SHADER) - { - (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqFragmentOut, (yylsp[0])); - } - else - { - (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqVertexOut, (yylsp[0])); - } - } + (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0])); + (yyval.interm.type).layoutQualifier = (yyvsp[-1].interm.layoutQualifier); } break; @@ -3673,11 +3561,9 @@ yyreduce: case 138: { - if (!context->declaringFunction()) - { - context->error((yylsp[0]), "invalid inout qualifier", "'inout' can be only used with function parameters"); - } - (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqInOut, (yylsp[0])); + context->checkInvariantIsOutVariableES3((yyvsp[0].interm.type).qualifier, (yylsp[-1])); + (yyval.interm.type).setBasic(EbtVoid, (yyvsp[0].interm.type).qualifier, (yylsp[0])); + (yyval.interm.type).invariant = true; } break; @@ -3685,8 +3571,9 @@ yyreduce: case 139: { - ES3_OR_NEWER("centroid", (yylsp[0]), "storage qualifier"); - (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqCentroid, (yylsp[0])); + context->checkInvariantIsOutVariableES3((yyvsp[0].interm.type).qualifier, (yylsp[-2])); + (yyval.interm.type) = context->joinInterpolationQualifiers((yylsp[-1]), (yyvsp[-1].interm.type).qualifier, (yylsp[0]), (yyvsp[0].interm.type).qualifier); + (yyval.interm.type).invariant = true; } break; @@ -3694,8 +3581,7 @@ yyreduce: case 140: { - context->checkIsAtGlobalLevel((yylsp[0]), "uniform"); - (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqUniform, (yylsp[0])); + (yyval.interm.type).qualifier = EvqConst; } break; @@ -3703,15 +3589,30 @@ yyreduce: case 141: { - (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqReadOnly, (yylsp[0])); - } - - break; - - case 142: + if (context->getShaderType() == GL_FRAGMENT_SHADER) + { + ES3_OR_NEWER("in", (yylsp[0]), "storage qualifier"); + (yyval.interm.type).qualifier = EvqFragmentIn; + } + else if (context->getShaderType() == GL_VERTEX_SHADER) + { + ES3_OR_NEWER("in", (yylsp[0]), "storage qualifier"); + (yyval.interm.type).qualifier = EvqVertexIn; + } + else + { + (yyval.interm.type).qualifier = EvqComputeIn; + } + } + + break; + + case 142: { - (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqWriteOnly, (yylsp[0])); + ES3_OR_NEWER("out", (yylsp[0]), "storage qualifier"); + NON_COMPUTE_ONLY("out", (yylsp[0])); + (yyval.interm.type).qualifier = (context->getShaderType() == GL_FRAGMENT_SHADER) ? EvqFragmentOut : EvqVertexOut; } break; @@ -3719,7 +3620,9 @@ yyreduce: case 143: { - (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqCoherent, (yylsp[0])); + ES3_OR_NEWER("centroid in", (yylsp[-1]), "storage qualifier"); + FRAG_ONLY("centroid in", (yylsp[-1])); + (yyval.interm.type).qualifier = EvqCentroidIn; } break; @@ -3727,7 +3630,9 @@ yyreduce: case 144: { - (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqRestrict, (yylsp[0])); + ES3_OR_NEWER("centroid out", (yylsp[-1]), "storage qualifier"); + VERTEX_ONLY("centroid out", (yylsp[-1])); + (yyval.interm.type).qualifier = EvqCentroidOut; } break; @@ -3735,7 +3640,8 @@ yyreduce: case 145: { - (yyval.interm.qualifierWrapper) = new TMemoryQualifierWrapper(EvqVolatile, (yylsp[0])); + context->checkIsAtGlobalLevel((yylsp[0]), "uniform"); + (yyval.interm.type).qualifier = EvqUniform; } break; @@ -3744,7 +3650,11 @@ yyreduce: { (yyval.interm.type) = (yyvsp[0].interm.type); - (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[0].interm.type).getBasicType()); + + if ((yyval.interm.type).precision == EbpUndefined) { + (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[0].interm.type).type); + context->checkPrecisionSpecified((yylsp[0]), (yyval.interm.type).precision, (yyvsp[0].interm.type).type); + } } break; @@ -3752,7 +3662,12 @@ yyreduce: case 147: { - (yyval.interm.precision) = EbpHigh; + (yyval.interm.type) = (yyvsp[0].interm.type); + (yyval.interm.type).precision = (yyvsp[-1].interm.precision); + + if (!SupportsPrecision((yyvsp[0].interm.type).type)) { + context->error((yylsp[-1]), "illegal type for precision qualifier", getBasicString((yyvsp[0].interm.type).type)); + } } break; @@ -3760,7 +3675,7 @@ yyreduce: case 148: { - (yyval.interm.precision) = EbpMedium; + (yyval.interm.precision) = EbpHigh; } break; @@ -3768,7 +3683,7 @@ yyreduce: case 149: { - (yyval.interm.precision) = EbpLow; + (yyval.interm.precision) = EbpMedium; } break; @@ -3776,8 +3691,7 @@ yyreduce: case 150: { - ES3_OR_NEWER("layout", (yylsp[-3]), "qualifier"); - (yyval.interm.layoutQualifier) = (yyvsp[-1].interm.layoutQualifier); + (yyval.interm.precision) = EbpLow; } break; @@ -3785,7 +3699,8 @@ yyreduce: case 151: { - (yyval.interm.layoutQualifier) = (yyvsp[0].interm.layoutQualifier); + ES3_OR_NEWER("layout", (yylsp[-3]), "qualifier"); + (yyval.interm.layoutQualifier) = (yyvsp[-1].interm.layoutQualifier); } break; @@ -3793,7 +3708,7 @@ yyreduce: case 152: { - (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[-2].interm.layoutQualifier), (yyvsp[0].interm.layoutQualifier), (yylsp[0])); + (yyval.interm.layoutQualifier) = (yyvsp[0].interm.layoutQualifier); } break; @@ -3801,7 +3716,7 @@ yyreduce: case 153: { - (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[0].lex).string, (yylsp[0])); + (yyval.interm.layoutQualifier) = context->joinLayoutQualifiers((yyvsp[-2].interm.layoutQualifier), (yyvsp[0].interm.layoutQualifier), (yylsp[0])); } break; @@ -3809,7 +3724,7 @@ yyreduce: case 154: { - (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), (yyvsp[0].lex).i, (yylsp[0])); + (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[0].lex).string, (yylsp[0])); } break; @@ -3825,7 +3740,7 @@ yyreduce: case 156: { - (yyval.interm.type).initialize((yyvsp[0].interm.typeSpecifierNonArray), (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary)); + (yyval.interm.layoutQualifier) = context->parseLayoutQualifier(*(yyvsp[-2].lex).string, (yylsp[-2]), (yyvsp[0].lex).i, (yylsp[0])); } break; @@ -3833,9 +3748,7 @@ yyreduce: case 157: { - ES3_OR_NEWER("[]", (yylsp[-1]), "implicitly sized array"); - (yyval.interm.type).initialize((yyvsp[-2].interm.typeSpecifierNonArray), (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary)); - (yyval.interm.type).setArraySize(0); + (yyval.interm.type) = (yyvsp[0].interm.type); } break; @@ -3843,12 +3756,9 @@ yyreduce: case 158: { - (yyval.interm.type).initialize((yyvsp[-3].interm.typeSpecifierNonArray), (context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary)); - if (context->checkIsValidTypeForArray((yylsp[-2]), (yyval.interm.type))) - { - unsigned int size = context->checkIsValidArraySize((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); - (yyval.interm.type).setArraySize(size); - } + ES3_OR_NEWER("[]", (yylsp[-1]), "implicitly sized array"); + (yyval.interm.type) = (yyvsp[-2].interm.type); + (yyval.interm.type).setArraySize(0); } break; @@ -3856,7 +3766,13 @@ yyreduce: case 159: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtVoid, (yylsp[0])); + (yyval.interm.type) = (yyvsp[-3].interm.type); + + if (context->checkIsValidTypeForArray((yylsp[-2]), (yyvsp[-3].interm.type))) + { + unsigned int size = context->checkIsValidArraySize((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); + (yyval.interm.type).setArraySize(size); + } } break; @@ -3864,7 +3780,8 @@ yyreduce: case 160: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtVoid, qual, (yylsp[0])); } break; @@ -3872,7 +3789,8 @@ yyreduce: case 161: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); } break; @@ -3880,7 +3798,8 @@ yyreduce: case 162: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0])); } break; @@ -3888,7 +3807,8 @@ yyreduce: case 163: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0])); } break; @@ -3896,8 +3816,8 @@ yyreduce: case 164: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setAggregate(2); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0])); } break; @@ -3905,8 +3825,9 @@ yyreduce: case 165: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setAggregate(3); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); + (yyval.interm.type).setAggregate(2); } break; @@ -3914,8 +3835,9 @@ yyreduce: case 166: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setAggregate(4); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); + (yyval.interm.type).setAggregate(3); } break; @@ -3923,8 +3845,9 @@ yyreduce: case 167: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setAggregate(2); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); + (yyval.interm.type).setAggregate(4); } break; @@ -3932,8 +3855,9 @@ yyreduce: case 168: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setAggregate(3); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0])); + (yyval.interm.type).setAggregate(2); } break; @@ -3941,8 +3865,9 @@ yyreduce: case 169: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtBool, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setAggregate(4); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0])); + (yyval.interm.type).setAggregate(3); } break; @@ -3950,8 +3875,9 @@ yyreduce: case 170: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setAggregate(2); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtBool, qual, (yylsp[0])); + (yyval.interm.type).setAggregate(4); } break; @@ -3959,8 +3885,9 @@ yyreduce: case 171: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setAggregate(3); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0])); + (yyval.interm.type).setAggregate(2); } break; @@ -3968,8 +3895,9 @@ yyreduce: case 172: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtInt, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setAggregate(4); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0])); + (yyval.interm.type).setAggregate(3); } break; @@ -3977,8 +3905,9 @@ yyreduce: case 173: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setAggregate(2); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtInt, qual, (yylsp[0])); + (yyval.interm.type).setAggregate(4); } break; @@ -3986,8 +3915,9 @@ yyreduce: case 174: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setAggregate(3); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0])); + (yyval.interm.type).setAggregate(2); } break; @@ -3995,8 +3925,9 @@ yyreduce: case 175: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtUInt, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setAggregate(4); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0])); + (yyval.interm.type).setAggregate(3); } break; @@ -4004,8 +3935,9 @@ yyreduce: case 176: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setMatrix(2, 2); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtUInt, qual, (yylsp[0])); + (yyval.interm.type).setAggregate(4); } break; @@ -4013,8 +3945,9 @@ yyreduce: case 177: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setMatrix(3, 3); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); + (yyval.interm.type).setMatrix(2, 2); } break; @@ -4022,8 +3955,9 @@ yyreduce: case 178: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setMatrix(4, 4); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); + (yyval.interm.type).setMatrix(3, 3); } break; @@ -4031,8 +3965,9 @@ yyreduce: case 179: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setMatrix(2, 3); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); + (yyval.interm.type).setMatrix(4, 4); } break; @@ -4040,8 +3975,9 @@ yyreduce: case 180: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setMatrix(3, 2); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); + (yyval.interm.type).setMatrix(2, 3); } break; @@ -4049,8 +3985,9 @@ yyreduce: case 181: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setMatrix(2, 4); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); + (yyval.interm.type).setMatrix(3, 2); } break; @@ -4058,8 +3995,9 @@ yyreduce: case 182: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setMatrix(4, 2); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); + (yyval.interm.type).setMatrix(2, 4); } break; @@ -4067,8 +4005,9 @@ yyreduce: case 183: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setMatrix(3, 4); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); + (yyval.interm.type).setMatrix(4, 2); } break; @@ -4076,8 +4015,9 @@ yyreduce: case 184: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtFloat, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).setMatrix(4, 3); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); + (yyval.interm.type).setMatrix(3, 4); } break; @@ -4085,7 +4025,9 @@ yyreduce: case 185: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2D, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtFloat, qual, (yylsp[0])); + (yyval.interm.type).setMatrix(4, 3); } break; @@ -4093,7 +4035,8 @@ yyreduce: case 186: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler3D, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtSampler2D, qual, (yylsp[0])); } break; @@ -4101,7 +4044,8 @@ yyreduce: case 187: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCube, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtSampler3D, qual, (yylsp[0])); } break; @@ -4109,7 +4053,8 @@ yyreduce: case 188: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DArray, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yylsp[0])); } break; @@ -4117,7 +4062,8 @@ yyreduce: case 189: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2D, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtSampler2DArray, qual, (yylsp[0])); } break; @@ -4125,7 +4071,8 @@ yyreduce: case 190: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler3D, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtISampler2D, qual, (yylsp[0])); } break; @@ -4133,7 +4080,8 @@ yyreduce: case 191: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtISamplerCube, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtISampler3D, qual, (yylsp[0])); } break; @@ -4141,7 +4089,8 @@ yyreduce: case 192: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtISampler2DArray, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtISamplerCube, qual, (yylsp[0])); } break; @@ -4149,7 +4098,8 @@ yyreduce: case 193: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2D, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtISampler2DArray, qual, (yylsp[0])); } break; @@ -4157,7 +4107,8 @@ yyreduce: case 194: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler3D, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtUSampler2D, qual, (yylsp[0])); } break; @@ -4165,7 +4116,8 @@ yyreduce: case 195: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtUSamplerCube, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtUSampler3D, qual, (yylsp[0])); } break; @@ -4173,7 +4125,8 @@ yyreduce: case 196: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtUSampler2DArray, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtUSamplerCube, qual, (yylsp[0])); } break; @@ -4181,7 +4134,8 @@ yyreduce: case 197: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DShadow, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtUSampler2DArray, qual, (yylsp[0])); } break; @@ -4189,7 +4143,8 @@ yyreduce: case 198: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerCubeShadow, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtSampler2DShadow, qual, (yylsp[0])); } break; @@ -4197,7 +4152,8 @@ yyreduce: case 199: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DArrayShadow, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtSamplerCubeShadow, qual, (yylsp[0])); } break; @@ -4205,11 +4161,8 @@ yyreduce: case 200: { - if (!context->supportsExtension("GL_OES_EGL_image_external") && - !context->supportsExtension("GL_NV_EGL_stream_consumer_external")) { - context->error((yylsp[0]), "unsupported type", "samplerExternalOES"); - } - (yyval.interm.typeSpecifierNonArray).initialize(EbtSamplerExternalOES, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtSampler2DArrayShadow, qual, (yylsp[0])); } break; @@ -4217,10 +4170,12 @@ yyreduce: case 201: { - if (!context->supportsExtension("GL_ARB_texture_rectangle")) { - context->error((yylsp[0]), "unsupported type", "sampler2DRect"); + if (!context->supportsExtension("GL_OES_EGL_image_external") && + !context->supportsExtension("GL_NV_EGL_stream_consumer_external")) { + context->error((yylsp[0]), "unsupported type", "samplerExternalOES"); } - (yyval.interm.typeSpecifierNonArray).initialize(EbtSampler2DRect, (yylsp[0])); + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yylsp[0])); } break; @@ -4228,7 +4183,11 @@ yyreduce: case 202: { - (yyval.interm.typeSpecifierNonArray) = (yyvsp[0].interm.typeSpecifierNonArray); + if (!context->supportsExtension("GL_ARB_texture_rectangle")) { + context->error((yylsp[0]), "unsupported type", "sampler2DRect"); + } + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtSampler2DRect, qual, (yylsp[0])); } break; @@ -4236,142 +4195,56 @@ yyreduce: case 203: { - (yyval.interm.typeSpecifierNonArray).initialize(EbtImage2D, (yylsp[0])); + (yyval.interm.type) = (yyvsp[0].interm.type); + (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; } break; case 204: - { - (yyval.interm.typeSpecifierNonArray).initialize(EbtIImage2D, (yylsp[0])); - } - - break; - - case 205: - - { - (yyval.interm.typeSpecifierNonArray).initialize(EbtUImage2D, (yylsp[0])); - } - - break; - - case 206: - - { - (yyval.interm.typeSpecifierNonArray).initialize(EbtImage3D, (yylsp[0])); - } - - break; - - case 207: - - { - (yyval.interm.typeSpecifierNonArray).initialize(EbtIImage3D, (yylsp[0])); - } - - break; - - case 208: - - { - (yyval.interm.typeSpecifierNonArray).initialize(EbtUImage3D, (yylsp[0])); - } - - break; - - case 209: - - { - (yyval.interm.typeSpecifierNonArray).initialize(EbtImage2DArray, (yylsp[0])); - } - - break; - - case 210: - - { - (yyval.interm.typeSpecifierNonArray).initialize(EbtIImage2DArray, (yylsp[0])); - } - - break; - - case 211: - - { - (yyval.interm.typeSpecifierNonArray).initialize(EbtUImage2DArray, (yylsp[0])); - } - - break; - - case 212: - - { - (yyval.interm.typeSpecifierNonArray).initialize(EbtImageCube, (yylsp[0])); - } - - break; - - case 213: - - { - (yyval.interm.typeSpecifierNonArray).initialize(EbtIImageCube, (yylsp[0])); - } - - break; - - case 214: - - { - (yyval.interm.typeSpecifierNonArray).initialize(EbtUImageCube, (yylsp[0])); - } - - break; - - case 215: - { // // This is for user defined type names. The lexical phase looked up the // type. // TType& structure = static_cast((yyvsp[0].lex).symbol)->getType(); - (yyval.interm.typeSpecifierNonArray).initialize(EbtStruct, (yylsp[0])); - (yyval.interm.typeSpecifierNonArray).userDef = &structure; + TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + (yyval.interm.type).setBasic(EbtStruct, qual, (yylsp[0])); + (yyval.interm.type).userDef = &structure; } break; - case 216: + case 205: { context->enterStructDeclaration((yylsp[-1]), *(yyvsp[-1].lex).string); } break; - case 217: + case 206: { - (yyval.interm.typeSpecifierNonArray) = context->addStructure((yylsp[-5]), (yylsp[-4]), (yyvsp[-4].lex).string, (yyvsp[-1].interm.fieldList)); + (yyval.interm.type) = context->addStructure((yylsp[-5]), (yylsp[-4]), (yyvsp[-4].lex).string, (yyvsp[-1].interm.fieldList)); } break; - case 218: + case 207: { context->enterStructDeclaration((yylsp[0]), *(yyvsp[0].lex).string); } break; - case 219: + case 208: { - (yyval.interm.typeSpecifierNonArray) = context->addStructure((yylsp[-4]), (yyloc), NewPoolTString(""), (yyvsp[-1].interm.fieldList)); + (yyval.interm.type) = context->addStructure((yylsp[-4]), (yyloc), NewPoolTString(""), (yyvsp[-1].interm.fieldList)); } break; - case 220: + case 209: { (yyval.interm.fieldList) = (yyvsp[0].interm.fieldList); @@ -4379,7 +4252,7 @@ yyreduce: break; - case 221: + case 210: { (yyval.interm.fieldList) = (yyvsp[-1].interm.fieldList); @@ -4396,7 +4269,7 @@ yyreduce: break; - case 222: + case 211: { (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList)); @@ -4404,16 +4277,18 @@ yyreduce: break; - case 223: + case 212: { // ES3 Only, but errors should be handled elsewhere - (yyval.interm.fieldList) = context->addStructDeclaratorListWithQualifiers(*(yyvsp[-3].interm.typeQualifierBuilder), &(yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList)); + (yyvsp[-2].interm.type).qualifier = (yyvsp[-3].interm.type).qualifier; + (yyvsp[-2].interm.type).layoutQualifier = (yyvsp[-3].interm.type).layoutQualifier; + (yyval.interm.fieldList) = context->addStructDeclaratorList((yyvsp[-2].interm.type), (yyvsp[-1].interm.fieldList)); } break; - case 224: + case 213: { (yyval.interm.fieldList) = NewPoolTFieldList(); @@ -4422,7 +4297,7 @@ yyreduce: break; - case 225: + case 214: { (yyval.interm.fieldList)->push_back((yyvsp[0].interm.field)); @@ -4430,7 +4305,7 @@ yyreduce: break; - case 226: + case 215: { context->checkIsNotReserved((yylsp[0]), *(yyvsp[0].lex).string); @@ -4441,7 +4316,7 @@ yyreduce: break; - case 227: + case 216: { context->checkIsNotReserved((yylsp[-3]), *(yyvsp[-3].lex).string); @@ -4455,197 +4330,196 @@ yyreduce: break; - case 228: + case 217: { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } break; - case 229: + case 218: { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } break; - case 230: + case 219: - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); } + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); } break; - case 231: + case 220: { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } break; - case 232: + case 221: { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } break; - case 233: + case 222: { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } break; - case 234: + case 223: { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } break; - case 235: + case 224: { (yyval.interm.intermNode) = (yyvsp[0].interm.intermSwitch); } break; - case 236: + case 225: { (yyval.interm.intermNode) = (yyvsp[0].interm.intermCase); } break; - case 237: + case 226: { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } break; - case 238: + case 227: { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } break; - case 239: + case 228: - { (yyval.interm.intermBlock) = 0; } + { (yyval.interm.intermAggregate) = 0; } break; - case 240: + case 229: { context->symbolTable.push(); } break; - case 241: + case 230: { context->symbolTable.pop(); } break; - case 242: + case 231: { - if ((yyvsp[-2].interm.intermBlock) != 0) { - (yyvsp[-2].interm.intermBlock)->setLine((yyloc)); + if ((yyvsp[-2].interm.intermAggregate) != 0) { + (yyvsp[-2].interm.intermAggregate)->setOp(EOpSequence); + (yyvsp[-2].interm.intermAggregate)->setLine((yyloc)); } - (yyval.interm.intermBlock) = (yyvsp[-2].interm.intermBlock); + (yyval.interm.intermAggregate) = (yyvsp[-2].interm.intermAggregate); } break; - case 243: + case 232: - { (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); } + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); } break; - case 244: + case 233: { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } break; - case 245: + case 234: { context->symbolTable.push(); } break; - case 246: + case 235: - { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermBlock); } + { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermAggregate); } break; - case 247: + case 236: { context->symbolTable.push(); } break; - case 248: + case 237: { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } break; - case 249: + case 238: { - (yyval.interm.intermBlock) = 0; + (yyval.interm.intermAggregate) = 0; } break; - case 250: + case 239: { - if ((yyvsp[-1].interm.intermBlock)) { - (yyvsp[-1].interm.intermBlock)->setLine((yyloc)); + if ((yyvsp[-1].interm.intermAggregate)) { + (yyvsp[-1].interm.intermAggregate)->setOp(EOpSequence); + (yyvsp[-1].interm.intermAggregate)->setLine((yyloc)); } - (yyval.interm.intermBlock) = (yyvsp[-1].interm.intermBlock); + (yyval.interm.intermAggregate) = (yyvsp[-1].interm.intermAggregate); } break; - case 251: + case 240: { - (yyval.interm.intermBlock) = new TIntermBlock(); - (yyval.interm.intermBlock)->setLine((yyloc)); - (yyval.interm.intermBlock)->appendStatement((yyvsp[0].interm.intermNode)); + (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[0].interm.intermNode), (yyloc)); } break; - case 252: + case 241: { - (yyval.interm.intermBlock) = (yyvsp[-1].interm.intermBlock); - (yyval.interm.intermBlock)->appendStatement((yyvsp[0].interm.intermNode)); + (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[-1].interm.intermAggregate), (yyvsp[0].interm.intermNode), (yyloc)); } break; - case 253: + case 242: { (yyval.interm.intermNode) = 0; } break; - case 254: + case 243: { (yyval.interm.intermNode) = static_cast((yyvsp[-1].interm.intermTypedNode)); } break; - case 255: + case 244: { context->checkIsScalarBool((yylsp[-4]), (yyvsp[-2].interm.intermTypedNode)); - (yyval.interm.intermNode) = context->intermediate.addIfElse((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yylsp[-4])); + (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yylsp[-4])); } break; - case 256: + case 245: { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); @@ -4654,7 +4528,7 @@ yyreduce: break; - case 257: + case 246: { (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode); @@ -4663,22 +4537,22 @@ yyreduce: break; - case 258: + case 247: { context->incrSwitchNestingLevel(); } break; - case 259: + case 248: { - (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermBlock), (yylsp[-5])); + (yyval.interm.intermSwitch) = context->addSwitch((yyvsp[-3].interm.intermTypedNode), (yyvsp[0].interm.intermAggregate), (yylsp[-5])); context->decrSwitchNestingLevel(); } break; - case 260: + case 249: { (yyval.interm.intermCase) = context->addCase((yyvsp[-1].interm.intermTypedNode), (yylsp[-2])); @@ -4686,7 +4560,7 @@ yyreduce: break; - case 261: + case 250: { (yyval.interm.intermCase) = context->addDefault((yylsp[-1])); @@ -4694,7 +4568,7 @@ yyreduce: break; - case 262: + case 251: { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); @@ -4703,13 +4577,13 @@ yyreduce: break; - case 263: + case 252: { - TIntermBinary *initNode = nullptr; + TIntermNode *intermNode; context->checkIsScalarBool((yylsp[-2]), (yyvsp[-3].interm.type)); - if (!context->executeInitializer((yylsp[-2]), *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), (yyvsp[0].interm.intermTypedNode), &initNode)) + if (!context->executeInitializer((yylsp[-2]), *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), (yyvsp[0].interm.intermTypedNode), &intermNode)) (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); else { (yyval.interm.intermTypedNode) = 0; @@ -4718,13 +4592,13 @@ yyreduce: break; - case 264: + case 253: { context->symbolTable.push(); context->incrLoopNestingLevel(); } break; - case 265: + case 254: { context->symbolTable.pop(); @@ -4734,13 +4608,13 @@ yyreduce: break; - case 266: + case 255: { context->incrLoopNestingLevel(); } break; - case 267: + case 256: { context->checkIsScalarBool((yylsp[0]), (yyvsp[-2].interm.intermTypedNode)); @@ -4751,13 +4625,13 @@ yyreduce: break; - case 268: + case 257: { context->symbolTable.push(); context->incrLoopNestingLevel(); } break; - case 269: + case 258: { context->symbolTable.pop(); @@ -4767,7 +4641,7 @@ yyreduce: break; - case 270: + case 259: { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); @@ -4775,7 +4649,7 @@ yyreduce: break; - case 271: + case 260: { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); @@ -4783,7 +4657,7 @@ yyreduce: break; - case 272: + case 261: { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); @@ -4791,7 +4665,7 @@ yyreduce: break; - case 273: + case 262: { (yyval.interm.intermTypedNode) = 0; @@ -4799,7 +4673,7 @@ yyreduce: break; - case 274: + case 263: { (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode); @@ -4808,7 +4682,7 @@ yyreduce: break; - case 275: + case 264: { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode); @@ -4817,7 +4691,7 @@ yyreduce: break; - case 276: + case 265: { (yyval.interm.intermNode) = context->addBranch(EOpContinue, (yylsp[-1])); @@ -4825,7 +4699,7 @@ yyreduce: break; - case 277: + case 266: { (yyval.interm.intermNode) = context->addBranch(EOpBreak, (yylsp[-1])); @@ -4833,7 +4707,7 @@ yyreduce: break; - case 278: + case 267: { (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yylsp[-1])); @@ -4841,7 +4715,7 @@ yyreduce: break; - case 279: + case 268: { (yyval.interm.intermNode) = context->addBranch(EOpReturn, (yyvsp[-1].interm.intermTypedNode), (yylsp[-2])); @@ -4849,7 +4723,7 @@ yyreduce: break; - case 280: + case 269: { FRAG_ONLY("discard", (yylsp[-1])); @@ -4858,26 +4732,25 @@ yyreduce: break; - case 281: + case 270: { - (yyval.interm.intermBlock) = new TIntermBlock(); - (yyval.interm.intermBlock)->setLine((yyloc)); - (yyval.interm.intermBlock)->appendStatement((yyvsp[0].interm.intermNode)); - context->setTreeRoot((yyval.interm.intermBlock)); + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + context->setTreeRoot((yyval.interm.intermNode)); } break; - case 282: + case 271: { - (yyval.interm.intermBlock)->appendStatement((yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode), (yyloc)); + context->setTreeRoot((yyval.interm.intermNode)); } break; - case 283: + case 272: { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); @@ -4885,7 +4758,7 @@ yyreduce: break; - case 284: + case 273: { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); @@ -4893,18 +4766,18 @@ yyreduce: break; - case 285: + case 274: { - context->parseFunctionDefinitionHeader((yylsp[0]), &((yyvsp[0].interm).function), &(yyvsp[0].interm).intermAggregate); + context->parseFunctionPrototype((yylsp[0]), (yyvsp[0].interm).function, &(yyvsp[0].interm).intermAggregate); } break; - case 286: + case 275: { - (yyval.interm.intermNode) = context->addFunctionDefinition(*((yyvsp[-2].interm).function), (yyvsp[-2].interm).intermAggregate, (yyvsp[0].interm.intermBlock), (yylsp[-2])); + (yyval.interm.intermNode) = context->addFunctionDefinition(*((yyvsp[-2].interm).function), (yyvsp[-2].interm).intermAggregate, (yyvsp[0].interm.intermAggregate), (yylsp[-2])); } break; diff --git a/gfx/angle/src/compiler/translator/glslang_tab.h b/gfx/angle/src/compiler/translator/glslang_tab.h index 8b043c01d..7331594a4 100755 --- a/gfx/angle/src/compiler/translator/glslang_tab.h +++ b/gfx/angle/src/compiler/translator/glslang_tab.h @@ -50,151 +50,134 @@ extern int yydebug; /* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE -enum yytokentype -{ - INVARIANT = 258, - HIGH_PRECISION = 259, - MEDIUM_PRECISION = 260, - LOW_PRECISION = 261, - PRECISION = 262, - ATTRIBUTE = 263, - CONST_QUAL = 264, - BOOL_TYPE = 265, - FLOAT_TYPE = 266, - INT_TYPE = 267, - UINT_TYPE = 268, - BREAK = 269, - CONTINUE = 270, - DO = 271, - ELSE = 272, - FOR = 273, - IF = 274, - DISCARD = 275, - RETURN = 276, - SWITCH = 277, - CASE = 278, - DEFAULT = 279, - BVEC2 = 280, - BVEC3 = 281, - BVEC4 = 282, - IVEC2 = 283, - IVEC3 = 284, - IVEC4 = 285, - VEC2 = 286, - VEC3 = 287, - VEC4 = 288, - UVEC2 = 289, - UVEC3 = 290, - UVEC4 = 291, - MATRIX2 = 292, - MATRIX3 = 293, - MATRIX4 = 294, - IN_QUAL = 295, - OUT_QUAL = 296, - INOUT_QUAL = 297, - UNIFORM = 298, - VARYING = 299, - MATRIX2x3 = 300, - MATRIX3x2 = 301, - MATRIX2x4 = 302, - MATRIX4x2 = 303, - MATRIX3x4 = 304, - MATRIX4x3 = 305, - CENTROID = 306, - FLAT = 307, - SMOOTH = 308, - READONLY = 309, - WRITEONLY = 310, - COHERENT = 311, - RESTRICT = 312, - VOLATILE = 313, - STRUCT = 314, - VOID_TYPE = 315, - WHILE = 316, - SAMPLER2D = 317, - SAMPLERCUBE = 318, - SAMPLER_EXTERNAL_OES = 319, - SAMPLER2DRECT = 320, - SAMPLER2DARRAY = 321, - ISAMPLER2D = 322, - ISAMPLER3D = 323, - ISAMPLERCUBE = 324, - ISAMPLER2DARRAY = 325, - USAMPLER2D = 326, - USAMPLER3D = 327, - USAMPLERCUBE = 328, - USAMPLER2DARRAY = 329, - SAMPLER3D = 330, - SAMPLER3DRECT = 331, - SAMPLER2DSHADOW = 332, - SAMPLERCUBESHADOW = 333, - SAMPLER2DARRAYSHADOW = 334, - IMAGE2D = 335, - IIMAGE2D = 336, - UIMAGE2D = 337, - IMAGE3D = 338, - IIMAGE3D = 339, - UIMAGE3D = 340, - IMAGE2DARRAY = 341, - IIMAGE2DARRAY = 342, - UIMAGE2DARRAY = 343, - IMAGECUBE = 344, - IIMAGECUBE = 345, - UIMAGECUBE = 346, - LAYOUT = 347, - IDENTIFIER = 348, - TYPE_NAME = 349, - FLOATCONSTANT = 350, - INTCONSTANT = 351, - UINTCONSTANT = 352, - BOOLCONSTANT = 353, - FIELD_SELECTION = 354, - LEFT_OP = 355, - RIGHT_OP = 356, - INC_OP = 357, - DEC_OP = 358, - LE_OP = 359, - GE_OP = 360, - EQ_OP = 361, - NE_OP = 362, - AND_OP = 363, - OR_OP = 364, - XOR_OP = 365, - MUL_ASSIGN = 366, - DIV_ASSIGN = 367, - ADD_ASSIGN = 368, - MOD_ASSIGN = 369, - LEFT_ASSIGN = 370, - RIGHT_ASSIGN = 371, - AND_ASSIGN = 372, - XOR_ASSIGN = 373, - OR_ASSIGN = 374, - SUB_ASSIGN = 375, - LEFT_PAREN = 376, - RIGHT_PAREN = 377, - LEFT_BRACKET = 378, - RIGHT_BRACKET = 379, - LEFT_BRACE = 380, - RIGHT_BRACE = 381, - DOT = 382, - COMMA = 383, - COLON = 384, - EQUAL = 385, - SEMICOLON = 386, - BANG = 387, - DASH = 388, - TILDE = 389, - PLUS = 390, - STAR = 391, - SLASH = 392, - PERCENT = 393, - LEFT_ANGLE = 394, - RIGHT_ANGLE = 395, - VERTICAL_BAR = 396, - CARET = 397, - AMPERSAND = 398, - QUESTION = 399 -}; + enum yytokentype + { + INVARIANT = 258, + HIGH_PRECISION = 259, + MEDIUM_PRECISION = 260, + LOW_PRECISION = 261, + PRECISION = 262, + ATTRIBUTE = 263, + CONST_QUAL = 264, + BOOL_TYPE = 265, + FLOAT_TYPE = 266, + INT_TYPE = 267, + UINT_TYPE = 268, + BREAK = 269, + CONTINUE = 270, + DO = 271, + ELSE = 272, + FOR = 273, + IF = 274, + DISCARD = 275, + RETURN = 276, + SWITCH = 277, + CASE = 278, + DEFAULT = 279, + BVEC2 = 280, + BVEC3 = 281, + BVEC4 = 282, + IVEC2 = 283, + IVEC3 = 284, + IVEC4 = 285, + VEC2 = 286, + VEC3 = 287, + VEC4 = 288, + UVEC2 = 289, + UVEC3 = 290, + UVEC4 = 291, + MATRIX2 = 292, + MATRIX3 = 293, + MATRIX4 = 294, + IN_QUAL = 295, + OUT_QUAL = 296, + INOUT_QUAL = 297, + UNIFORM = 298, + VARYING = 299, + MATRIX2x3 = 300, + MATRIX3x2 = 301, + MATRIX2x4 = 302, + MATRIX4x2 = 303, + MATRIX3x4 = 304, + MATRIX4x3 = 305, + CENTROID = 306, + FLAT = 307, + SMOOTH = 308, + STRUCT = 309, + VOID_TYPE = 310, + WHILE = 311, + SAMPLER2D = 312, + SAMPLERCUBE = 313, + SAMPLER_EXTERNAL_OES = 314, + SAMPLER2DRECT = 315, + SAMPLER2DARRAY = 316, + ISAMPLER2D = 317, + ISAMPLER3D = 318, + ISAMPLERCUBE = 319, + ISAMPLER2DARRAY = 320, + USAMPLER2D = 321, + USAMPLER3D = 322, + USAMPLERCUBE = 323, + USAMPLER2DARRAY = 324, + SAMPLER3D = 325, + SAMPLER3DRECT = 326, + SAMPLER2DSHADOW = 327, + SAMPLERCUBESHADOW = 328, + SAMPLER2DARRAYSHADOW = 329, + LAYOUT = 330, + IDENTIFIER = 331, + TYPE_NAME = 332, + FLOATCONSTANT = 333, + INTCONSTANT = 334, + UINTCONSTANT = 335, + BOOLCONSTANT = 336, + FIELD_SELECTION = 337, + LEFT_OP = 338, + RIGHT_OP = 339, + INC_OP = 340, + DEC_OP = 341, + LE_OP = 342, + GE_OP = 343, + EQ_OP = 344, + NE_OP = 345, + AND_OP = 346, + OR_OP = 347, + XOR_OP = 348, + MUL_ASSIGN = 349, + DIV_ASSIGN = 350, + ADD_ASSIGN = 351, + MOD_ASSIGN = 352, + LEFT_ASSIGN = 353, + RIGHT_ASSIGN = 354, + AND_ASSIGN = 355, + XOR_ASSIGN = 356, + OR_ASSIGN = 357, + SUB_ASSIGN = 358, + LEFT_PAREN = 359, + RIGHT_PAREN = 360, + LEFT_BRACKET = 361, + RIGHT_BRACKET = 362, + LEFT_BRACE = 363, + RIGHT_BRACE = 364, + DOT = 365, + COMMA = 366, + COLON = 367, + EQUAL = 368, + SEMICOLON = 369, + BANG = 370, + DASH = 371, + TILDE = 372, + PLUS = 373, + STAR = 374, + SLASH = 375, + PERCENT = 376, + LEFT_ANGLE = 377, + RIGHT_ANGLE = 378, + VERTICAL_BAR = 379, + CARET = 380, + AMPERSAND = 381, + QUESTION = 382 + }; #endif /* Value type. */ @@ -217,27 +200,22 @@ union YYSTYPE struct { TOperator op; union { - TIntermNode *intermNode; + TIntermNode* intermNode; TIntermNodePair nodePair; - TIntermTyped *intermTypedNode; - TIntermAggregate *intermAggregate; - TIntermBlock *intermBlock; - TIntermDeclaration *intermDeclaration; - TIntermSwitch *intermSwitch; - TIntermCase *intermCase; + TIntermTyped* intermTypedNode; + TIntermAggregate* intermAggregate; + TIntermSwitch* intermSwitch; + TIntermCase* intermCase; }; union { - TTypeSpecifierNonArray typeSpecifierNonArray; TPublicType type; TPrecision precision; TLayoutQualifier layoutQualifier; TQualifier qualifier; - TFunction *function; + TFunction* function; TParameter param; - TField *field; - TFieldList *fieldList; - TQualifierWrapperBase *qualifierWrapper; - TTypeQualifierBuilder *typeQualifierBuilder; + TField* field; + TFieldList* fieldList; }; } interm; diff --git a/gfx/angle/src/compiler/translator/intermOut.cpp b/gfx/angle/src/compiler/translator/intermOut.cpp index 53ee1d02a..6dca547f0 100755 --- a/gfx/angle/src/compiler/translator/intermOut.cpp +++ b/gfx/angle/src/compiler/translator/intermOut.cpp @@ -7,17 +7,13 @@ #include "compiler/translator/Intermediate.h" #include "compiler/translator/SymbolTable.h" -namespace sh -{ - namespace { -void OutputFunction(TInfoSinkBase &out, const char *str, TFunctionSymbolInfo *info) +void OutputFunction(TInfoSinkBase &out, const char *str, TIntermAggregate *node) { - const char *internal = info->getNameObj().isInternal() ? " (internal function)" : ""; - out << str << internal << ": " << info->getNameObj().getString() << " (symbol id " - << info->getId() << ")"; + const char *internal = node->getNameObj().isInternal() ? " (internal function)" : ""; + out << str << internal << ": " << node->getNameObj().getString(); } // @@ -46,17 +42,10 @@ class TOutputTraverser : public TIntermTraverser protected: void visitSymbol(TIntermSymbol *) override; void visitConstantUnion(TIntermConstantUnion *) override; - bool visitSwizzle(Visit visit, TIntermSwizzle *node) override; bool visitBinary(Visit visit, TIntermBinary *) override; bool visitUnary(Visit visit, TIntermUnary *) override; - bool visitTernary(Visit visit, TIntermTernary *node) override; - bool visitIfElse(Visit visit, TIntermIfElse *node) override; - bool visitSwitch(Visit visit, TIntermSwitch *node) override; - bool visitCase(Visit visit, TIntermCase *node) override; - bool visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) override; + bool visitSelection(Visit visit, TIntermSelection *) override; bool visitAggregate(Visit visit, TIntermAggregate *) override; - bool visitBlock(Visit visit, TIntermBlock *) override; - bool visitDeclaration(Visit visit, TIntermDeclaration *node) override; bool visitLoop(Visit visit, TIntermLoop *) override; bool visitBranch(Visit visit, TIntermBranch *) override; }; @@ -93,14 +82,6 @@ void TOutputTraverser::visitSymbol(TIntermSymbol *node) sink << "(" << node->getCompleteString() << ")\n"; } -bool TOutputTraverser::visitSwizzle(Visit visit, TIntermSwizzle *node) -{ - TInfoSinkBase &out = sink; - OutputTreeText(out, node, mDepth); - out << "vector swizzle"; - return true; -} - bool TOutputTraverser::visitBinary(Visit visit, TIntermBinary *node) { TInfoSinkBase& out = sink; @@ -109,148 +90,148 @@ bool TOutputTraverser::visitBinary(Visit visit, TIntermBinary *node) switch (node->getOp()) { - case EOpComma: - out << "comma"; - break; - case EOpAssign: - out << "move second child to first child"; - break; - case EOpInitialize: - out << "initialize first child with second child"; - break; - case EOpAddAssign: - out << "add second child into first child"; - break; - case EOpSubAssign: - out << "subtract second child into first child"; - break; - case EOpMulAssign: - out << "multiply second child into first child"; - break; - case EOpVectorTimesMatrixAssign: - out << "matrix mult second child into first child"; - break; - case EOpVectorTimesScalarAssign: - out << "vector scale second child into first child"; - break; - case EOpMatrixTimesScalarAssign: - out << "matrix scale second child into first child"; - break; - case EOpMatrixTimesMatrixAssign: - out << "matrix mult second child into first child"; - break; - case EOpDivAssign: - out << "divide second child into first child"; - break; - case EOpIModAssign: - out << "modulo second child into first child"; - break; - case EOpBitShiftLeftAssign: - out << "bit-wise shift first child left by second child"; - break; - case EOpBitShiftRightAssign: - out << "bit-wise shift first child right by second child"; - break; - case EOpBitwiseAndAssign: - out << "bit-wise and second child into first child"; - break; - case EOpBitwiseXorAssign: - out << "bit-wise xor second child into first child"; - break; - case EOpBitwiseOrAssign: - out << "bit-wise or second child into first child"; - break; - - case EOpIndexDirect: - out << "direct index"; - break; - case EOpIndexIndirect: - out << "indirect index"; - break; - case EOpIndexDirectStruct: - out << "direct index for structure"; - break; - case EOpIndexDirectInterfaceBlock: - out << "direct index for interface block"; - break; - - case EOpAdd: - out << "add"; - break; - case EOpSub: - out << "subtract"; - break; - case EOpMul: - out << "component-wise multiply"; - break; - case EOpDiv: - out << "divide"; - break; - case EOpIMod: - out << "modulo"; - break; - case EOpBitShiftLeft: - out << "bit-wise shift left"; - break; - case EOpBitShiftRight: - out << "bit-wise shift right"; - break; - case EOpBitwiseAnd: - out << "bit-wise and"; - break; - case EOpBitwiseXor: - out << "bit-wise xor"; - break; - case EOpBitwiseOr: - out << "bit-wise or"; - break; - - case EOpEqual: - out << "Compare Equal"; - break; - case EOpNotEqual: - out << "Compare Not Equal"; - break; - case EOpLessThan: - out << "Compare Less Than"; - break; - case EOpGreaterThan: - out << "Compare Greater Than"; - break; - case EOpLessThanEqual: - out << "Compare Less Than or Equal"; - break; - case EOpGreaterThanEqual: - out << "Compare Greater Than or Equal"; - break; - - case EOpVectorTimesScalar: - out << "vector-scale"; - break; - case EOpVectorTimesMatrix: - out << "vector-times-matrix"; - break; - case EOpMatrixTimesVector: - out << "matrix-times-vector"; - break; - case EOpMatrixTimesScalar: - out << "matrix-scale"; - break; - case EOpMatrixTimesMatrix: - out << "matrix-multiply"; - break; - - case EOpLogicalOr: - out << "logical-or"; - break; - case EOpLogicalXor: - out << "logical-xor"; - break; - case EOpLogicalAnd: - out << "logical-and"; - break; - default: - out << ""; + case EOpAssign: + out << "move second child to first child"; + break; + case EOpInitialize: + out << "initialize first child with second child"; + break; + case EOpAddAssign: + out << "add second child into first child"; + break; + case EOpSubAssign: + out << "subtract second child into first child"; + break; + case EOpMulAssign: + out << "multiply second child into first child"; + break; + case EOpVectorTimesMatrixAssign: + out << "matrix mult second child into first child"; + break; + case EOpVectorTimesScalarAssign: + out << "vector scale second child into first child"; + break; + case EOpMatrixTimesScalarAssign: + out << "matrix scale second child into first child"; + break; + case EOpMatrixTimesMatrixAssign: + out << "matrix mult second child into first child"; + break; + case EOpDivAssign: + out << "divide second child into first child"; + break; + case EOpIModAssign: + out << "modulo second child into first child"; + break; + case EOpBitShiftLeftAssign: + out << "bit-wise shift first child left by second child"; + break; + case EOpBitShiftRightAssign: + out << "bit-wise shift first child right by second child"; + break; + case EOpBitwiseAndAssign: + out << "bit-wise and second child into first child"; + break; + case EOpBitwiseXorAssign: + out << "bit-wise xor second child into first child"; + break; + case EOpBitwiseOrAssign: + out << "bit-wise or second child into first child"; + break; + + case EOpIndexDirect: + out << "direct index"; + break; + case EOpIndexIndirect: + out << "indirect index"; + break; + case EOpIndexDirectStruct: + out << "direct index for structure"; + break; + case EOpIndexDirectInterfaceBlock: + out << "direct index for interface block"; + break; + case EOpVectorSwizzle: + out << "vector swizzle"; + break; + + case EOpAdd: + out << "add"; + break; + case EOpSub: + out << "subtract"; + break; + case EOpMul: + out << "component-wise multiply"; + break; + case EOpDiv: + out << "divide"; + break; + case EOpIMod: + out << "modulo"; + break; + case EOpBitShiftLeft: + out << "bit-wise shift left"; + break; + case EOpBitShiftRight: + out << "bit-wise shift right"; + break; + case EOpBitwiseAnd: + out << "bit-wise and"; + break; + case EOpBitwiseXor: + out << "bit-wise xor"; + break; + case EOpBitwiseOr: + out << "bit-wise or"; + break; + + case EOpEqual: + out << "Compare Equal"; + break; + case EOpNotEqual: + out << "Compare Not Equal"; + break; + case EOpLessThan: + out << "Compare Less Than"; + break; + case EOpGreaterThan: + out << "Compare Greater Than"; + break; + case EOpLessThanEqual: + out << "Compare Less Than or Equal"; + break; + case EOpGreaterThanEqual: + out << "Compare Greater Than or Equal"; + break; + + case EOpVectorTimesScalar: + out << "vector-scale"; + break; + case EOpVectorTimesMatrix: + out << "vector-times-matrix"; + break; + case EOpMatrixTimesVector: + out << "matrix-times-vector"; + break; + case EOpMatrixTimesScalar: + out << "matrix-scale"; + break; + case EOpMatrixTimesMatrix: + out << "matrix-multiply"; + break; + + case EOpLogicalOr: + out << "logical-or"; + break; + case EOpLogicalXor: + out << "logical-xor"; + break; + case EOpLogicalAnd: + out << "logical-and"; + break; + default: + out << ""; } out << " (" << node->getCompleteString() << ")"; @@ -381,38 +362,27 @@ bool TOutputTraverser::visitUnary(Visit visit, TIntermUnary *node) return true; } -bool TOutputTraverser::visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) -{ - TInfoSinkBase &out = sink; - OutputTreeText(out, node, mDepth); - OutputFunction(out, "Function Definition", node->getFunctionSymbolInfo()); - out << "\n"; - return true; -} - bool TOutputTraverser::visitAggregate(Visit visit, TIntermAggregate *node) { TInfoSinkBase &out = sink; - OutputTreeText(out, node, mDepth); - if (node->getOp() == EOpNull) { out.prefix(EPrefixError); - out << "node is still EOpNull!\n"; + out << "node is still EOpNull!"; return true; } + OutputTreeText(out, node, mDepth); switch (node->getOp()) { - case EOpFunctionCall: - OutputFunction(out, "Function Call", node->getFunctionSymbolInfo()); - break; + case EOpSequence: out << "Sequence\n"; return true; + case EOpComma: out << "Comma\n"; return true; + case EOpFunction: OutputFunction(out, "Function Definition", node); break; + case EOpFunctionCall: OutputFunction(out, "Function Call", node); break; case EOpParameters: out << "Function Parameters: "; break; - case EOpPrototype: - OutputFunction(out, "Function Prototype", node->getFunctionSymbolInfo()); - break; + case EOpPrototype: OutputFunction(out, "Function Prototype", node); break; case EOpConstructFloat: out << "Construct float"; break; case EOpConstructVec2: out << "Construct vec2"; break; @@ -471,6 +441,7 @@ bool TOutputTraverser::visitAggregate(Visit visit, TIntermAggregate *node) case EOpOuterProduct: out << "outer product"; break; + case EOpDeclaration: out << "Declaration: "; break; case EOpInvariantDeclaration: out << "Invariant Declaration: "; break; default: @@ -478,7 +449,7 @@ bool TOutputTraverser::visitAggregate(Visit visit, TIntermAggregate *node) out << "Bad aggregation op"; } - if (node->getOp() != EOpParameters) + if (node->getOp() != EOpSequence && node->getOp() != EOpParameters) out << " (" << node->getCompleteString() << ")"; out << "\n"; @@ -486,33 +457,13 @@ bool TOutputTraverser::visitAggregate(Visit visit, TIntermAggregate *node) return true; } -bool TOutputTraverser::visitBlock(Visit visit, TIntermBlock *node) -{ - TInfoSinkBase &out = sink; - - OutputTreeText(out, node, mDepth); - out << "Code block\n"; - - return true; -} - -bool TOutputTraverser::visitDeclaration(Visit visit, TIntermDeclaration *node) -{ - TInfoSinkBase &out = sink; - - OutputTreeText(out, node, mDepth); - out << "Declaration\n"; - - return true; -} - -bool TOutputTraverser::visitTernary(Visit visit, TIntermTernary *node) +bool TOutputTraverser::visitSelection(Visit visit, TIntermSelection *node) { TInfoSinkBase &out = sink; OutputTreeText(out, node, mDepth); - out << "Ternary selection"; + out << "Test condition and select"; out << " (" << node->getCompleteString() << ")\n"; ++mDepth; @@ -521,38 +472,6 @@ bool TOutputTraverser::visitTernary(Visit visit, TIntermTernary *node) out << "Condition\n"; node->getCondition()->traverse(this); - OutputTreeText(sink, node, mDepth); - if (node->getTrueExpression()) - { - out << "true case\n"; - node->getTrueExpression()->traverse(this); - } - if (node->getFalseExpression()) - { - OutputTreeText(sink, node, mDepth); - out << "false case\n"; - node->getFalseExpression()->traverse(this); - } - - --mDepth; - - return false; -} - -bool TOutputTraverser::visitIfElse(Visit visit, TIntermIfElse *node) -{ - TInfoSinkBase &out = sink; - - OutputTreeText(out, node, mDepth); - - out << "If test\n"; - - ++mDepth; - - OutputTreeText(sink, node, mDepth); - out << "Condition\n"; - node->getCondition()->traverse(this); - OutputTreeText(sink, node, mDepth); if (node->getTrueBlock()) { @@ -576,35 +495,6 @@ bool TOutputTraverser::visitIfElse(Visit visit, TIntermIfElse *node) return false; } -bool TOutputTraverser::visitSwitch(Visit visit, TIntermSwitch *node) -{ - TInfoSinkBase &out = sink; - - OutputTreeText(out, node, mDepth); - - out << "Switch\n"; - - return true; -} - -bool TOutputTraverser::visitCase(Visit visit, TIntermCase *node) -{ - TInfoSinkBase &out = sink; - - OutputTreeText(out, node, mDepth); - - if (node->getCondition() == nullptr) - { - out << "Default\n"; - } - else - { - out << "Case\n"; - } - - return true; -} - void TOutputTraverser::visitConstantUnion(TIntermConstantUnion *node) { TInfoSinkBase &out = sink; @@ -734,5 +624,3 @@ void TIntermediate::outputTree(TIntermNode *root, TInfoSinkBase &infoSink) root->traverse(&it); } - -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/length_limits.h b/gfx/angle/src/compiler/translator/length_limits.h index 607157f4a..88634381f 100755 --- a/gfx/angle/src/compiler/translator/length_limits.h +++ b/gfx/angle/src/compiler/translator/length_limits.h @@ -16,11 +16,6 @@ // These constants are factored out from the rest of the headers to // make it easier to reference them from the compiler sources. -namespace sh -{ - size_t GetGlobalMaxTokenSize(ShShaderSpec spec); -} // namespace sh - #endif // COMPILER_TRANSLATOR_LENGTHLIMITS_H_ diff --git a/gfx/angle/src/compiler/translator/timing/RestrictFragmentShaderTiming.cpp b/gfx/angle/src/compiler/translator/timing/RestrictFragmentShaderTiming.cpp new file mode 100644 index 000000000..790974a2b --- /dev/null +++ b/gfx/angle/src/compiler/translator/timing/RestrictFragmentShaderTiming.cpp @@ -0,0 +1,130 @@ +// +// Copyright (c) 2012 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 "compiler/translator/InfoSink.h" +#include "compiler/translator/ParseContext.h" +#include "compiler/translator/depgraph/DependencyGraphOutput.h" +#include "compiler/translator/timing/RestrictFragmentShaderTiming.h" + +RestrictFragmentShaderTiming::RestrictFragmentShaderTiming(TInfoSinkBase& sink) + : mSink(sink) + , mNumErrors(0) +{ + // Sampling ops found only in fragment shaders. + mSamplingOps.insert("texture2D(s21;vf2;f1;"); + mSamplingOps.insert("texture2DProj(s21;vf3;f1;"); + mSamplingOps.insert("texture2DProj(s21;vf4;f1;"); + mSamplingOps.insert("textureCube(sC1;vf3;f1;"); + // Sampling ops found in both vertex and fragment shaders. + mSamplingOps.insert("texture2D(s21;vf2;"); + mSamplingOps.insert("texture2DProj(s21;vf3;"); + mSamplingOps.insert("texture2DProj(s21;vf4;"); + mSamplingOps.insert("textureCube(sC1;vf3;"); + // Sampling ops provided by OES_EGL_image_external. + mSamplingOps.insert("texture2D(1;vf2;"); + mSamplingOps.insert("texture2DProj(1;vf3;"); + mSamplingOps.insert("texture2DProj(1;vf4;"); + // Sampling ops provided by ARB_texture_rectangle. + mSamplingOps.insert("texture2DRect(1;vf2;"); + mSamplingOps.insert("texture2DRectProj(1;vf3;"); + mSamplingOps.insert("texture2DRectProj(1;vf4;"); + // Sampling ops provided by EXT_shader_texture_lod. + mSamplingOps.insert("texture2DLodEXT(1;vf2;f1;"); + mSamplingOps.insert("texture2DProjLodEXT(1;vf3;f1;"); + mSamplingOps.insert("texture2DProjLodEXT(1;vf4;f1;"); + mSamplingOps.insert("textureCubeLodEXT(1;vf4;f1;"); + mSamplingOps.insert("texture2DGradEXT(1;vf2;vf2;vf2;"); + mSamplingOps.insert("texture2DProjGradEXT(1;vf3;vf2;vf2;"); + mSamplingOps.insert("texture2DProjGradEXT(1;vf4;vf2;vf2;"); + mSamplingOps.insert("textureCubeGradEXT(1;vf3;vf3;vf3;"); +} + +// FIXME(mvujovic): We do not know if the execution time of built-in operations like sin, pow, etc. +// can vary based on the value of the input arguments. If so, we should restrict those as well. +void RestrictFragmentShaderTiming::enforceRestrictions(const TDependencyGraph& graph) +{ + mNumErrors = 0; + + // FIXME(mvujovic): The dependency graph does not support user defined function calls right now, + // so we generate errors for them. + validateUserDefinedFunctionCallUsage(graph); + + // Starting from each sampler, traverse the dependency graph and generate an error each time we + // hit a node where sampler dependent values are not allowed. + for (auto samplerSymbol : graph.samplerSymbols()) + { + clearVisited(); + samplerSymbol->traverse(this); + } +} + +void RestrictFragmentShaderTiming::validateUserDefinedFunctionCallUsage(const TDependencyGraph& graph) +{ + for (const auto* functionCall : graph.userDefinedFunctionCalls()) + { + beginError(functionCall->getIntermFunctionCall()); + mSink << "A call to a user defined function is not permitted.\n"; + } +} + +void RestrictFragmentShaderTiming::beginError(const TIntermNode* node) +{ + ++mNumErrors; + mSink.prefix(EPrefixError); + mSink.location(node->getLine()); +} + +bool RestrictFragmentShaderTiming::isSamplingOp(const TIntermAggregate* intermFunctionCall) const +{ + return !intermFunctionCall->isUserDefined() && + mSamplingOps.find(intermFunctionCall->getName()) != mSamplingOps.end(); +} + +void RestrictFragmentShaderTiming::visitArgument(TGraphArgument* parameter) +{ + // Texture cache access time might leak sensitive information. + // Thus, we restrict sampler dependent values from affecting the coordinate or LOD bias of a + // sampling operation. + if (isSamplingOp(parameter->getIntermFunctionCall())) { + switch (parameter->getArgumentNumber()) { + case 1: + // Second argument (coord) + beginError(parameter->getIntermFunctionCall()); + mSink << "An expression dependent on a sampler is not permitted to be the" + << " coordinate argument of a sampling operation.\n"; + break; + case 2: + // Third argument (bias) + beginError(parameter->getIntermFunctionCall()); + mSink << "An expression dependent on a sampler is not permitted to be the" + << " bias argument of a sampling operation.\n"; + break; + default: + // First argument (sampler) + break; + } + } +} + +void RestrictFragmentShaderTiming::visitSelection(TGraphSelection* selection) +{ + beginError(selection->getIntermSelection()); + mSink << "An expression dependent on a sampler is not permitted in a conditional statement.\n"; +} + +void RestrictFragmentShaderTiming::visitLoop(TGraphLoop* loop) +{ + beginError(loop->getIntermLoop()); + mSink << "An expression dependent on a sampler is not permitted in a loop condition.\n"; +} + +void RestrictFragmentShaderTiming::visitLogicalOp(TGraphLogicalOp* logicalOp) +{ + beginError(logicalOp->getIntermLogicalOp()); + mSink << "An expression dependent on a sampler is not permitted on the left hand side of a logical " + << logicalOp->getOpString() + << " operator.\n"; +} diff --git a/gfx/angle/src/compiler/translator/timing/RestrictFragmentShaderTiming.h b/gfx/angle/src/compiler/translator/timing/RestrictFragmentShaderTiming.h new file mode 100644 index 000000000..b8c7e8295 --- /dev/null +++ b/gfx/angle/src/compiler/translator/timing/RestrictFragmentShaderTiming.h @@ -0,0 +1,39 @@ +// +// Copyright (c) 2012 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. +// + +#ifndef COMPILER_TRANSLATOR_TIMING_RESTRICTFRAGMENTSHADERTIMING_H_ +#define COMPILER_TRANSLATOR_TIMING_RESTRICTFRAGMENTSHADERTIMING_H_ + +#include "compiler/translator/IntermNode.h" +#include "compiler/translator/depgraph/DependencyGraph.h" + +class TInfoSinkBase; + +class RestrictFragmentShaderTiming : TDependencyGraphTraverser +{ + public: + RestrictFragmentShaderTiming(TInfoSinkBase &sink); + void enforceRestrictions(const TDependencyGraph &graph); + int numErrors() const { return mNumErrors; } + + void visitArgument(TGraphArgument *parameter) override; + void visitSelection(TGraphSelection *selection) override; + void visitLoop(TGraphLoop *loop) override; + void visitLogicalOp(TGraphLogicalOp *logicalOp) override; + + private: + void beginError(const TIntermNode *node); + void validateUserDefinedFunctionCallUsage(const TDependencyGraph &graph); + bool isSamplingOp(const TIntermAggregate *intermFunctionCall) const; + + TInfoSinkBase &mSink; + int mNumErrors; + + typedef std::set StringSet; + StringSet mSamplingOps; +}; + +#endif // COMPILER_TRANSLATOR_TIMING_RESTRICTFRAGMENTSHADERTIMING_H_ diff --git a/gfx/angle/src/compiler/translator/timing/RestrictVertexShaderTiming.cpp b/gfx/angle/src/compiler/translator/timing/RestrictVertexShaderTiming.cpp new file mode 100644 index 000000000..7c1208a29 --- /dev/null +++ b/gfx/angle/src/compiler/translator/timing/RestrictVertexShaderTiming.cpp @@ -0,0 +1,17 @@ +// +// Copyright (c) 2012 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 "compiler/translator/timing/RestrictVertexShaderTiming.h" + +void RestrictVertexShaderTiming::visitSymbol(TIntermSymbol* node) +{ + if (IsSampler(node->getBasicType())) { + ++mNumErrors; + mSink.message(EPrefixError, + node->getLine(), + "Samplers are not permitted in vertex shaders.\n"); + } +} diff --git a/gfx/angle/src/compiler/translator/timing/RestrictVertexShaderTiming.h b/gfx/angle/src/compiler/translator/timing/RestrictVertexShaderTiming.h new file mode 100644 index 000000000..23a821772 --- /dev/null +++ b/gfx/angle/src/compiler/translator/timing/RestrictVertexShaderTiming.h @@ -0,0 +1,32 @@ +// +// Copyright (c) 2012 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. +// + +#ifndef COMPILER_TRANSLATOR_TIMING_RESTRICTVERTEXSHADERTIMING_H_ +#define COMPILER_TRANSLATOR_TIMING_RESTRICTVERTEXSHADERTIMING_H_ + +#include "compiler/translator/IntermNode.h" +#include "compiler/translator/InfoSink.h" + +class TInfoSinkBase; + +class RestrictVertexShaderTiming : public TIntermTraverser { +public: + RestrictVertexShaderTiming(TInfoSinkBase& sink) + : TIntermTraverser(true, false, false) + , mSink(sink) + , mNumErrors(0) {} + + void enforceRestrictions(TIntermNode* root) { root->traverse(this); } + int numErrors() { return mNumErrors; } + + void visitSymbol(TIntermSymbol *) override; + +private: + TInfoSinkBase& mSink; + int mNumErrors; +}; + +#endif // COMPILER_TRANSLATOR_TIMING_RESTRICTVERTEXSHADERTIMING_H_ diff --git a/gfx/angle/src/compiler/translator/util.cpp b/gfx/angle/src/compiler/translator/util.cpp index 89f237ceb..bd3e484eb 100755 --- a/gfx/angle/src/compiler/translator/util.cpp +++ b/gfx/angle/src/compiler/translator/util.cpp @@ -159,30 +159,6 @@ GLenum GLVariableType(const TType &type) case EbtSampler2DShadow: return GL_SAMPLER_2D_SHADOW; case EbtSamplerCubeShadow: return GL_SAMPLER_CUBE_SHADOW; case EbtSampler2DArrayShadow: return GL_SAMPLER_2D_ARRAY_SHADOW; - case EbtImage2D: - return GL_IMAGE_2D; - case EbtIImage2D: - return GL_INT_IMAGE_2D; - case EbtUImage2D: - return GL_UNSIGNED_INT_IMAGE_2D; - case EbtImage2DArray: - return GL_IMAGE_2D_ARRAY; - case EbtIImage2DArray: - return GL_INT_IMAGE_2D_ARRAY; - case EbtUImage2DArray: - return GL_UNSIGNED_INT_IMAGE_2D_ARRAY; - case EbtImage3D: - return GL_IMAGE_3D; - case EbtIImage3D: - return GL_INT_IMAGE_3D; - case EbtUImage3D: - return GL_UNSIGNED_INT_IMAGE_3D; - case EbtImageCube: - return GL_IMAGE_CUBE; - case EbtIImageCube: - return GL_INT_IMAGE_CUBE; - case EbtUImageCube: - return GL_UNSIGNED_INT_IMAGE_CUBE; default: UNREACHABLE(); } @@ -302,18 +278,10 @@ InterpolationType GetInterpolationType(TQualifier qualifier) } } -TType GetShaderVariableBasicType(const sh::ShaderVariable &var) +TType ConvertShaderVariableTypeToTType(sh::GLenum type) { - switch (var.type) + switch (type) { - case GL_BOOL: - return TType(EbtBool); - case GL_BOOL_VEC2: - return TType(EbtBool, 2); - case GL_BOOL_VEC3: - return TType(EbtBool, 3); - case GL_BOOL_VEC4: - return TType(EbtBool, 4); case GL_FLOAT: return TType(EbtFloat); case GL_FLOAT_VEC2: @@ -569,52 +537,4 @@ template void GetVariableTraverser::traverse(const TType &, const TString &, std template void GetVariableTraverser::traverse(const TType &, const TString &, std::vector *); template void GetVariableTraverser::traverse(const TType &, const TString &, std::vector *); -// GLSL ES 1.0.17 4.6.1 The Invariant Qualifier -bool CanBeInvariantESSL1(TQualifier qualifier) -{ - return IsVaryingIn(qualifier) || IsVaryingOut(qualifier) || - IsBuiltinOutputVariable(qualifier) || - (IsBuiltinFragmentInputVariable(qualifier) && qualifier != EvqFrontFacing); -} - -// GLSL ES 3.00 Revision 6, 4.6.1 The Invariant Qualifier -// GLSL ES 3.10 Revision 4, 4.8.1 The Invariant Qualifier -bool CanBeInvariantESSL3OrGreater(TQualifier qualifier) -{ - return IsVaryingOut(qualifier) || qualifier == EvqFragmentOut || - IsBuiltinOutputVariable(qualifier); -} - -bool IsBuiltinOutputVariable(TQualifier qualifier) -{ - switch (qualifier) - { - case EvqPosition: - case EvqPointSize: - case EvqFragDepth: - case EvqFragDepthEXT: - case EvqFragColor: - case EvqSecondaryFragColorEXT: - case EvqFragData: - case EvqSecondaryFragDataEXT: - return true; - default: - break; - } - return false; -} - -bool IsBuiltinFragmentInputVariable(TQualifier qualifier) -{ - switch (qualifier) - { - case EvqFragCoord: - case EvqPointCoord: - case EvqFrontFacing: - return true; - default: - break; - } - return false; } -} // namespace sh diff --git a/gfx/angle/src/compiler/translator/util.h b/gfx/angle/src/compiler/translator/util.h index bfad5fb4c..4e577b111 100755 --- a/gfx/angle/src/compiler/translator/util.h +++ b/gfx/angle/src/compiler/translator/util.h @@ -25,9 +25,10 @@ bool strtof_clamp(const std::string &str, float *value); // Return false if overflow happens. bool atoi_clamp(const char *str, unsigned int *value); +class TSymbolTable; + namespace sh { -class TSymbolTable; GLenum GLVariableType(const TType &type); GLenum GLVariablePrecision(const TType &type); @@ -36,8 +37,8 @@ bool IsVaryingOut(TQualifier qualifier); bool IsVarying(TQualifier qualifier); InterpolationType GetInterpolationType(TQualifier qualifier); TString ArrayString(const TType &type); - -TType GetShaderVariableBasicType(const sh::ShaderVariable &var); +// Handles only basic output variable types. +TType ConvertShaderVariableTypeToTType(sh::GLenum type); TOperator TypeToConstructorOperator(const TType &type); @@ -64,10 +65,6 @@ class GetVariableTraverser : angle::NonCopyable const TSymbolTable &mSymbolTable; }; -bool IsBuiltinOutputVariable(TQualifier qualifier); -bool IsBuiltinFragmentInputVariable(TQualifier qualifier); -bool CanBeInvariantESSL1(TQualifier qualifier); -bool CanBeInvariantESSL3OrGreater(TQualifier qualifier); -} // namespace sh +} #endif // COMPILER_TRANSLATOR_UTIL_H_ diff --git a/gfx/angle/src/image_util/loadimage_etc.cpp b/gfx/angle/src/image_util/loadimage_etc.cpp index b0881f728..39cdef20f 100755 --- a/gfx/angle/src/image_util/loadimage_etc.cpp +++ b/gfx/angle/src/image_util/loadimage_etc.cpp @@ -891,10 +891,10 @@ struct ETC2Block std::swap(dxEnd, dyEnd); } - for (size_t j = dyBegin; j < dyEnd; j++) + for (size_t j = dyBegin; j < dyEnd && (y + j) < h; j++) { int *row = &pixelIndices[j * 4]; - for (size_t i = dxBegin; i < dxEnd; i++) + for (size_t i = dxBegin; i < dxEnd && (x + i) < w; i++) { const size_t pixelIndex = subblockIdx * 4 + getIndex(i, j); row[i] = static_cast(pixelIndex); diff --git a/gfx/angle/src/libANGLE/Buffer.cpp b/gfx/angle/src/libANGLE/Buffer.cpp index c69d1c671..3523b32ac 100755 --- a/gfx/angle/src/libANGLE/Buffer.cpp +++ b/gfx/angle/src/libANGLE/Buffer.cpp @@ -10,95 +10,99 @@ #include "libANGLE/Buffer.h" #include "libANGLE/renderer/BufferImpl.h" -#include "libANGLE/renderer/GLImplFactory.h" namespace gl { -BufferState::BufferState() - : mLabel(), +Buffer::Buffer(rx::BufferImpl *impl, GLuint id) + : RefCountObject(id), + mBuffer(impl), + mLabel(), mUsage(GL_STATIC_DRAW), mSize(0), mAccessFlags(0), mAccess(GL_WRITE_ONLY_OES), mMapped(GL_FALSE), - mMapPointer(nullptr), + mMapPointer(NULL), mMapOffset(0), mMapLength(0) { } -BufferState::~BufferState() -{ -} - -Buffer::Buffer(rx::GLImplFactory *factory, GLuint id) - : RefCountObject(id), mImpl(factory->createBuffer(mState)) -{ -} - Buffer::~Buffer() { - SafeDelete(mImpl); + SafeDelete(mBuffer); } void Buffer::setLabel(const std::string &label) { - mState.mLabel = label; + mLabel = label; } const std::string &Buffer::getLabel() const { - return mState.mLabel; + return mLabel; } -Error Buffer::bufferData(GLenum target, const void *data, GLsizeiptr size, GLenum usage) +Error Buffer::bufferData(const void *data, GLsizeiptr size, GLenum usage) { - ANGLE_TRY(mImpl->setData(target, data, size, usage)); + gl::Error error = mBuffer->setData(data, size, usage); + if (error.isError()) + { + return error; + } mIndexRangeCache.clear(); - mState.mUsage = usage; - mState.mSize = size; + mUsage = usage; + mSize = size; - return NoError(); + return error; } -Error Buffer::bufferSubData(GLenum target, const void *data, GLsizeiptr size, GLintptr offset) +Error Buffer::bufferSubData(const void *data, GLsizeiptr size, GLintptr offset) { - ANGLE_TRY(mImpl->setSubData(target, data, size, offset)); + gl::Error error = mBuffer->setSubData(data, size, offset); + if (error.isError()) + { + return error; + } mIndexRangeCache.invalidateRange(static_cast(offset), static_cast(size)); - return NoError(); + return error; } Error Buffer::copyBufferSubData(Buffer* source, GLintptr sourceOffset, GLintptr destOffset, GLsizeiptr size) { - ANGLE_TRY(mImpl->copySubData(source->getImplementation(), sourceOffset, destOffset, size)); + gl::Error error = mBuffer->copySubData(source->getImplementation(), sourceOffset, destOffset, size); + if (error.isError()) + { + return error; + } mIndexRangeCache.invalidateRange(static_cast(destOffset), static_cast(size)); - return NoError(); + return error; } Error Buffer::map(GLenum access) { - ASSERT(!mState.mMapped); + ASSERT(!mMapped); - Error error = mImpl->map(access, &mState.mMapPointer); + Error error = mBuffer->map(access, &mMapPointer); if (error.isError()) { - mState.mMapPointer = nullptr; + mMapPointer = NULL; return error; } ASSERT(access == GL_WRITE_ONLY_OES); - mState.mMapped = GL_TRUE; - mState.mMapOffset = 0; - mState.mMapLength = mState.mSize; - mState.mAccess = access; - mState.mAccessFlags = GL_MAP_WRITE_BIT; + mMapped = GL_TRUE; + mMapOffset = 0; + mMapLength = mSize; + mAccess = access; + mAccessFlags = GL_MAP_WRITE_BIT; mIndexRangeCache.clear(); return error; @@ -106,21 +110,21 @@ Error Buffer::map(GLenum access) Error Buffer::mapRange(GLintptr offset, GLsizeiptr length, GLbitfield access) { - ASSERT(!mState.mMapped); - ASSERT(offset + length <= mState.mSize); + ASSERT(!mMapped); + ASSERT(offset + length <= mSize); - Error error = mImpl->mapRange(offset, length, access, &mState.mMapPointer); + Error error = mBuffer->mapRange(offset, length, access, &mMapPointer); if (error.isError()) { - mState.mMapPointer = nullptr; + mMapPointer = NULL; return error; } - mState.mMapped = GL_TRUE; - mState.mMapOffset = static_cast(offset); - mState.mMapLength = static_cast(length); - mState.mAccess = GL_WRITE_ONLY_OES; - mState.mAccessFlags = access; + mMapped = GL_TRUE; + mMapOffset = static_cast(offset); + mMapLength = static_cast(length); + mAccess = GL_WRITE_ONLY_OES; + mAccessFlags = access; // The OES_mapbuffer extension states that GL_WRITE_ONLY_OES is the only valid // value for GL_BUFFER_ACCESS_OES because it was written against ES2. Since there is @@ -137,21 +141,21 @@ Error Buffer::mapRange(GLintptr offset, GLsizeiptr length, GLbitfield access) Error Buffer::unmap(GLboolean *result) { - ASSERT(mState.mMapped); + ASSERT(mMapped); - Error error = mImpl->unmap(result); + Error error = mBuffer->unmap(result); if (error.isError()) { *result = GL_FALSE; return error; } - mState.mMapped = GL_FALSE; - mState.mMapPointer = nullptr; - mState.mMapOffset = 0; - mState.mMapLength = 0; - mState.mAccess = GL_WRITE_ONLY_OES; - mState.mAccessFlags = 0; + mMapped = GL_FALSE; + mMapPointer = NULL; + mMapOffset = 0; + mMapLength = 0; + mAccess = GL_WRITE_ONLY_OES; + mAccessFlags = 0; return error; } @@ -174,14 +178,18 @@ Error Buffer::getIndexRange(GLenum type, { if (mIndexRangeCache.findRange(type, offset, count, primitiveRestartEnabled, outRange)) { - return NoError(); + return gl::Error(GL_NO_ERROR); } - ANGLE_TRY(mImpl->getIndexRange(type, offset, count, primitiveRestartEnabled, outRange)); + Error error = mBuffer->getIndexRange(type, offset, count, primitiveRestartEnabled, outRange); + if (error.isError()) + { + return error; + } mIndexRangeCache.addRange(type, offset, count, primitiveRestartEnabled, *outRange); - return NoError(); + return Error(GL_NO_ERROR); } } // namespace gl diff --git a/gfx/angle/src/libANGLE/Buffer.h b/gfx/angle/src/libANGLE/Buffer.h index dba4d5adf..6c951ef58 100755 --- a/gfx/angle/src/libANGLE/Buffer.h +++ b/gfx/angle/src/libANGLE/Buffer.h @@ -20,20 +20,35 @@ namespace rx { class BufferImpl; -class GLImplFactory; }; namespace gl { -class Buffer; -class BufferState final : angle::NonCopyable +class Buffer final : public RefCountObject, public LabeledObject { public: - BufferState(); - ~BufferState(); + Buffer(rx::BufferImpl *impl, GLuint id); + virtual ~Buffer(); + + void setLabel(const std::string &label) override; + const std::string &getLabel() const override; + + Error bufferData(const void *data, GLsizeiptr size, GLenum usage); + Error bufferSubData(const void *data, GLsizeiptr size, GLintptr offset); + Error copyBufferSubData(Buffer* source, GLintptr sourceOffset, GLintptr destOffset, GLsizeiptr size); + Error map(GLenum access); + Error mapRange(GLintptr offset, GLsizeiptr length, GLbitfield access); + Error unmap(GLboolean *result); + + void onTransformFeedback(); + void onPixelUnpack(); - const std::string &getLabel(); + Error getIndexRange(GLenum type, + size_t offset, + size_t count, + bool primitiveRestartEnabled, + IndexRange *outRange) const; GLenum getUsage() const { return mUsage; } GLbitfield getAccessFlags() const { return mAccessFlags; } @@ -44,8 +59,10 @@ class BufferState final : angle::NonCopyable GLint64 getMapLength() const { return mMapLength; } GLint64 getSize() const { return mSize; } + rx::BufferImpl *getImplementation() const { return mBuffer; } + private: - friend class Buffer; + rx::BufferImpl *mBuffer; std::string mLabel; @@ -57,47 +74,6 @@ class BufferState final : angle::NonCopyable GLvoid *mMapPointer; GLint64 mMapOffset; GLint64 mMapLength; -}; - -class Buffer final : public RefCountObject, public LabeledObject -{ - public: - Buffer(rx::GLImplFactory *factory, GLuint id); - ~Buffer() override; - - void setLabel(const std::string &label) override; - const std::string &getLabel() const override; - - Error bufferData(GLenum target, const void *data, GLsizeiptr size, GLenum usage); - Error bufferSubData(GLenum target, const void *data, GLsizeiptr size, GLintptr offset); - Error copyBufferSubData(Buffer* source, GLintptr sourceOffset, GLintptr destOffset, GLsizeiptr size); - Error map(GLenum access); - Error mapRange(GLintptr offset, GLsizeiptr length, GLbitfield access); - Error unmap(GLboolean *result); - - void onTransformFeedback(); - void onPixelUnpack(); - - Error getIndexRange(GLenum type, - size_t offset, - size_t count, - bool primitiveRestartEnabled, - IndexRange *outRange) const; - - GLenum getUsage() const { return mState.mUsage; } - GLbitfield getAccessFlags() const { return mState.mAccessFlags; } - GLenum getAccess() const { return mState.mAccess; } - GLboolean isMapped() const { return mState.mMapped; } - GLvoid *getMapPointer() const { return mState.mMapPointer; } - GLint64 getMapOffset() const { return mState.mMapOffset; } - GLint64 getMapLength() const { return mState.mMapLength; } - GLint64 getSize() const { return mState.mSize; } - - rx::BufferImpl *getImplementation() const { return mImpl; } - - private: - BufferState mState; - rx::BufferImpl *mImpl; mutable IndexRangeCache mIndexRangeCache; }; diff --git a/gfx/angle/src/libANGLE/Caps.cpp b/gfx/angle/src/libANGLE/Caps.cpp index d8e486d3d..985d79867 100755 --- a/gfx/angle/src/libANGLE/Caps.cpp +++ b/gfx/angle/src/libANGLE/Caps.cpp @@ -70,11 +70,6 @@ void TextureCapsMap::remove(GLenum internalFormat) } } -void TextureCapsMap::clear() -{ - mCapsMap.clear(); -} - const TextureCaps &TextureCapsMap::get(GLenum internalFormat) const { static TextureCaps defaultUnsupportedTexture; @@ -166,12 +161,6 @@ Extensions::Extensions() bindUniformLocation(false), syncQuery(false), copyTexture(false), - copyCompressedTexture(false), - webglCompatibility(false), - bindGeneratesResource(false), - robustClientMemory(false), - textureSRGBDecode(false), - sRGBWriteControl(false), colorBufferFloat(false), multisampleCompatibility(false), framebufferMixedSamples(false), @@ -184,13 +173,78 @@ std::vector Extensions::getStrings() const { std::vector extensionStrings; - for (const auto &extensionInfo : GetExtensionInfoMap()) - { - if (this->*(extensionInfo.second.ExtensionsMember)) - { - extensionStrings.push_back(extensionInfo.first); - } - } + // clang-format off + // | Extension name | Supported flag | Output vector | + InsertExtensionString("GL_OES_element_index_uint", elementIndexUint, &extensionStrings); + InsertExtensionString("GL_OES_packed_depth_stencil", packedDepthStencil, &extensionStrings); + InsertExtensionString("GL_OES_get_program_binary", getProgramBinary, &extensionStrings); + InsertExtensionString("GL_OES_rgb8_rgba8", rgb8rgba8, &extensionStrings); + InsertExtensionString("GL_EXT_texture_format_BGRA8888", textureFormatBGRA8888, &extensionStrings); + InsertExtensionString("GL_EXT_read_format_bgra", readFormatBGRA, &extensionStrings); + InsertExtensionString("GL_NV_pixel_buffer_object", pixelBufferObject, &extensionStrings); + InsertExtensionString("GL_OES_mapbuffer", mapBuffer, &extensionStrings); + InsertExtensionString("GL_EXT_map_buffer_range", mapBufferRange, &extensionStrings); + InsertExtensionString("GL_EXT_color_buffer_half_float", colorBufferHalfFloat, &extensionStrings); + InsertExtensionString("GL_OES_texture_half_float", textureHalfFloat, &extensionStrings); + InsertExtensionString("GL_OES_texture_half_float_linear", textureHalfFloatLinear, &extensionStrings); + InsertExtensionString("GL_OES_texture_float", textureFloat, &extensionStrings); + InsertExtensionString("GL_OES_texture_float_linear", textureFloatLinear, &extensionStrings); + InsertExtensionString("GL_EXT_texture_rg", textureRG, &extensionStrings); + InsertExtensionString("GL_EXT_texture_compression_dxt1", textureCompressionDXT1, &extensionStrings); + InsertExtensionString("GL_ANGLE_texture_compression_dxt3", textureCompressionDXT3, &extensionStrings); + InsertExtensionString("GL_ANGLE_texture_compression_dxt5", textureCompressionDXT5, &extensionStrings); + InsertExtensionString("GL_KHR_texture_compression_astc_hdr", textureCompressionASTCHDR, &extensionStrings); + InsertExtensionString("GL_KHR_texture_compression_astc_ldr", textureCompressionASTCLDR, &extensionStrings); + InsertExtensionString("GL_OES_compressed_ETC1_RGB8_texture", compressedETC1RGB8Texture, &extensionStrings); + InsertExtensionString("GL_EXT_sRGB", sRGB, &extensionStrings); + InsertExtensionString("GL_ANGLE_depth_texture", depthTextures, &extensionStrings); + InsertExtensionString("GL_OES_depth32", depth32, &extensionStrings); + InsertExtensionString("GL_EXT_texture_storage", textureStorage, &extensionStrings); + InsertExtensionString("GL_OES_texture_npot", textureNPOT, &extensionStrings); + InsertExtensionString("GL_EXT_draw_buffers", drawBuffers, &extensionStrings); + InsertExtensionString("GL_EXT_texture_filter_anisotropic", textureFilterAnisotropic, &extensionStrings); + InsertExtensionString("GL_EXT_occlusion_query_boolean", occlusionQueryBoolean, &extensionStrings); + InsertExtensionString("GL_NV_fence", fence, &extensionStrings); + InsertExtensionString("GL_ANGLE_timer_query", timerQuery, &extensionStrings); + InsertExtensionString("GL_EXT_disjoint_timer_query", disjointTimerQuery, &extensionStrings); + InsertExtensionString("GL_EXT_robustness", robustness, &extensionStrings); + InsertExtensionString("GL_EXT_blend_minmax", blendMinMax, &extensionStrings); + InsertExtensionString("GL_ANGLE_framebuffer_blit", framebufferBlit, &extensionStrings); + InsertExtensionString("GL_ANGLE_framebuffer_multisample", framebufferMultisample, &extensionStrings); + InsertExtensionString("GL_ANGLE_instanced_arrays", instancedArrays, &extensionStrings); + InsertExtensionString("GL_ANGLE_pack_reverse_row_order", packReverseRowOrder, &extensionStrings); + InsertExtensionString("GL_OES_standard_derivatives", standardDerivatives, &extensionStrings); + InsertExtensionString("GL_EXT_shader_texture_lod", shaderTextureLOD, &extensionStrings); + InsertExtensionString("GL_NV_shader_framebuffer_fetch", NVshaderFramebufferFetch, &extensionStrings); + InsertExtensionString("GL_ARM_shader_framebuffer_fetch", ARMshaderFramebufferFetch, &extensionStrings); + InsertExtensionString("GL_EXT_shader_framebuffer_fetch", shaderFramebufferFetch, &extensionStrings); + InsertExtensionString("GL_EXT_frag_depth", fragDepth, &extensionStrings); + InsertExtensionString("GL_ANGLE_texture_usage", textureUsage, &extensionStrings); + InsertExtensionString("GL_ANGLE_translated_shader_source", translatedShaderSource, &extensionStrings); + InsertExtensionString("GL_OES_fbo_render_mipmap", fboRenderMipmap, &extensionStrings); + InsertExtensionString("GL_EXT_discard_framebuffer", discardFramebuffer, &extensionStrings); + InsertExtensionString("GL_EXT_debug_marker", debugMarker, &extensionStrings); + InsertExtensionString("GL_OES_EGL_image", eglImage, &extensionStrings); + InsertExtensionString("GL_OES_EGL_image_external", eglImageExternal, &extensionStrings); + InsertExtensionString("GL_OES_EGL_image_external_essl3", eglImageExternalEssl3, &extensionStrings); + InsertExtensionString("GL_NV_EGL_stream_consumer_external", eglStreamConsumerExternal, &extensionStrings); + InsertExtensionString("GL_EXT_unpack_subimage", unpackSubimage, &extensionStrings); + InsertExtensionString("GL_NV_pack_subimage", packSubimage, &extensionStrings); + InsertExtensionString("GL_EXT_color_buffer_float", colorBufferFloat, &extensionStrings); + InsertExtensionString("GL_OES_vertex_array_object", vertexArrayObject, &extensionStrings); + InsertExtensionString("GL_KHR_debug", debug, &extensionStrings); + // TODO(jmadill): Enable this when complete. + //InsertExtensionString("GL_KHR_no_error", noError, &extensionStrings); + + InsertExtensionString("GL_ANGLE_lossy_etc_decode", lossyETCDecode, &extensionStrings); + InsertExtensionString("GL_CHROMIUM_bind_uniform_location", bindUniformLocation, &extensionStrings); + InsertExtensionString("GL_CHROMIUM_sync_query", syncQuery, &extensionStrings); + InsertExtensionString("GL_CHROMIUM_copy_texture", copyTexture, &extensionStrings); + InsertExtensionString("GL_EXT_multisample_compatibility", multisampleCompatibility, &extensionStrings); + InsertExtensionString("GL_CHROMIUM_framebuffer_mixed_samples", framebufferMixedSamples, &extensionStrings); + InsertExtensionString("GL_EXT_texture_norm16", textureNorm16, &extensionStrings); + InsertExtensionString("GL_CHROMIUM_path_rendering", pathRendering, &extensionStrings); + // clang-format on return extensionStrings; } @@ -501,107 +555,6 @@ void Extensions::setTextureExtensionSupport(const TextureCapsMap &textureCaps) textureNorm16 = DetermineTextureNorm16Support(textureCaps); } -const ExtensionInfoMap &GetExtensionInfoMap() -{ - auto buildExtensionInfoMap = []() { - auto enableableExtension = [](ExtensionInfo::ExtensionBool member) { - ExtensionInfo info; - info.Enableable = true; - info.ExtensionsMember = member; - return info; - }; - - auto esOnlyExtension = [](ExtensionInfo::ExtensionBool member) { - ExtensionInfo info; - info.ExtensionsMember = member; - return info; - }; - - // clang-format off - ExtensionInfoMap map; - map["GL_OES_element_index_uint"] = enableableExtension(&Extensions::elementIndexUint); - map["GL_OES_packed_depth_stencil"] = esOnlyExtension(&Extensions::packedDepthStencil); - map["GL_OES_get_program_binary"] = esOnlyExtension(&Extensions::getProgramBinary); - map["GL_OES_rgb8_rgba8"] = esOnlyExtension(&Extensions::rgb8rgba8); - map["GL_EXT_texture_format_BGRA8888"] = esOnlyExtension(&Extensions::textureFormatBGRA8888); - map["GL_EXT_read_format_bgra"] = esOnlyExtension(&Extensions::readFormatBGRA); - map["GL_NV_pixel_buffer_object"] = esOnlyExtension(&Extensions::pixelBufferObject); - map["GL_OES_mapbuffer"] = esOnlyExtension(&Extensions::mapBuffer); - map["GL_EXT_map_buffer_range"] = esOnlyExtension(&Extensions::mapBufferRange); - map["GL_EXT_color_buffer_half_float"] = esOnlyExtension(&Extensions::colorBufferHalfFloat); - map["GL_OES_texture_half_float"] = esOnlyExtension(&Extensions::textureHalfFloat); - map["GL_OES_texture_half_float_linear"] = esOnlyExtension(&Extensions::textureHalfFloatLinear); - map["GL_OES_texture_float"] = esOnlyExtension(&Extensions::textureFloat); - map["GL_OES_texture_float_linear"] = esOnlyExtension(&Extensions::textureFloatLinear); - map["GL_EXT_texture_rg"] = esOnlyExtension(&Extensions::textureRG); - map["GL_EXT_texture_compression_dxt1"] = esOnlyExtension(&Extensions::textureCompressionDXT1); - map["GL_ANGLE_texture_compression_dxt3"] = esOnlyExtension(&Extensions::textureCompressionDXT3); - map["GL_ANGLE_texture_compression_dxt5"] = esOnlyExtension(&Extensions::textureCompressionDXT5); - map["GL_KHR_texture_compression_astc_hdr"] = esOnlyExtension(&Extensions::textureCompressionASTCHDR); - map["GL_KHR_texture_compression_astc_ldr"] = esOnlyExtension(&Extensions::textureCompressionASTCLDR); - map["GL_OES_compressed_ETC1_RGB8_texture"] = esOnlyExtension(&Extensions::compressedETC1RGB8Texture); - map["GL_EXT_sRGB"] = esOnlyExtension(&Extensions::sRGB); - map["GL_ANGLE_depth_texture"] = esOnlyExtension(&Extensions::depthTextures); - map["GL_OES_depth32"] = esOnlyExtension(&Extensions::depth32); - map["GL_EXT_texture_storage"] = esOnlyExtension(&Extensions::textureStorage); - map["GL_OES_texture_npot"] = esOnlyExtension(&Extensions::textureNPOT); - map["GL_EXT_draw_buffers"] = esOnlyExtension(&Extensions::drawBuffers); - map["GL_EXT_texture_filter_anisotropic"] = esOnlyExtension(&Extensions::textureFilterAnisotropic); - map["GL_EXT_occlusion_query_boolean"] = esOnlyExtension(&Extensions::occlusionQueryBoolean); - map["GL_NV_fence"] = esOnlyExtension(&Extensions::fence); - map["GL_ANGLE_timer_query"] = esOnlyExtension(&Extensions::timerQuery); - map["GL_EXT_disjoint_timer_query"] = esOnlyExtension(&Extensions::disjointTimerQuery); - map["GL_EXT_robustness"] = esOnlyExtension(&Extensions::robustness); - map["GL_EXT_blend_minmax"] = esOnlyExtension(&Extensions::blendMinMax); - map["GL_ANGLE_framebuffer_blit"] = esOnlyExtension(&Extensions::framebufferBlit); - map["GL_ANGLE_framebuffer_multisample"] = esOnlyExtension(&Extensions::framebufferMultisample); - map["GL_ANGLE_instanced_arrays"] = esOnlyExtension(&Extensions::instancedArrays); - map["GL_ANGLE_pack_reverse_row_order"] = esOnlyExtension(&Extensions::packReverseRowOrder); - map["GL_OES_standard_derivatives"] = esOnlyExtension(&Extensions::standardDerivatives); - map["GL_EXT_shader_texture_lod"] = esOnlyExtension(&Extensions::shaderTextureLOD); - map["GL_NV_shader_framebuffer_fetch"] = esOnlyExtension(&Extensions::NVshaderFramebufferFetch); - map["GL_ARM_shader_framebuffer_fetch"] = esOnlyExtension(&Extensions::ARMshaderFramebufferFetch); - map["GL_EXT_shader_framebuffer_fetch"] = esOnlyExtension(&Extensions::shaderFramebufferFetch); - map["GL_EXT_frag_depth"] = esOnlyExtension(&Extensions::fragDepth); - map["GL_ANGLE_texture_usage"] = esOnlyExtension(&Extensions::textureUsage); - map["GL_ANGLE_translated_shader_source"] = esOnlyExtension(&Extensions::translatedShaderSource); - map["GL_OES_fbo_render_mipmap"] = esOnlyExtension(&Extensions::fboRenderMipmap); - map["GL_EXT_discard_framebuffer"] = esOnlyExtension(&Extensions::discardFramebuffer); - map["GL_EXT_debug_marker"] = esOnlyExtension(&Extensions::debugMarker); - map["GL_OES_EGL_image"] = esOnlyExtension(&Extensions::eglImage); - map["GL_OES_EGL_image_external"] = esOnlyExtension(&Extensions::eglImageExternal); - map["GL_OES_EGL_image_external_essl3"] = esOnlyExtension(&Extensions::eglImageExternalEssl3); - map["GL_NV_EGL_stream_consumer_external"] = esOnlyExtension(&Extensions::eglStreamConsumerExternal); - map["GL_EXT_unpack_subimage"] = esOnlyExtension(&Extensions::unpackSubimage); - map["GL_NV_pack_subimage"] = esOnlyExtension(&Extensions::packSubimage); - map["GL_EXT_color_buffer_float"] = esOnlyExtension(&Extensions::colorBufferFloat); - map["GL_OES_vertex_array_object"] = esOnlyExtension(&Extensions::vertexArrayObject); - map["GL_KHR_debug"] = esOnlyExtension(&Extensions::debug); - // TODO(jmadill): Enable this when complete. - //map["GL_KHR_no_error"] = esOnlyExtension(&Extensions::noError); - map["GL_ANGLE_lossy_etc_decode"] = esOnlyExtension(&Extensions::lossyETCDecode); - map["GL_CHROMIUM_bind_uniform_location"] = esOnlyExtension(&Extensions::bindUniformLocation); - map["GL_CHROMIUM_sync_query"] = esOnlyExtension(&Extensions::syncQuery); - map["GL_CHROMIUM_copy_texture"] = esOnlyExtension(&Extensions::copyTexture); - map["GL_CHROMIUM_copy_compressed_texture"] = esOnlyExtension(&Extensions::copyCompressedTexture); - map["GL_ANGLE_webgl_compatibility"] = esOnlyExtension(&Extensions::webglCompatibility); - map["GL_CHROMIUM_bind_generates_resource"] = esOnlyExtension(&Extensions::bindGeneratesResource); - map["GL_ANGLE_robust_client_memory"] = esOnlyExtension(&Extensions::robustClientMemory); - map["GL_EXT_texture_sRGB_decode"] = esOnlyExtension(&Extensions::textureSRGBDecode); - map["GL_EXT_sRGB_write_control"] = esOnlyExtension(&Extensions::sRGBWriteControl); - map["GL_EXT_multisample_compatibility"] = esOnlyExtension(&Extensions::multisampleCompatibility); - map["GL_CHROMIUM_framebuffer_mixed_samples"] = esOnlyExtension(&Extensions::framebufferMixedSamples); - map["GL_EXT_texture_norm16"] = esOnlyExtension(&Extensions::textureNorm16); - map["GL_CHROMIUM_path_rendering"] = esOnlyExtension(&Extensions::pathRendering); - // clang-format on - - return map; - }; - - static const ExtensionInfoMap extensionInfo = buildExtensionInfoMap(); - return extensionInfo; -} - TypePrecision::TypePrecision() { range[0] = 0; @@ -764,7 +717,6 @@ Caps::Caps() DisplayExtensions::DisplayExtensions() : createContextRobustness(false), d3dShareHandleClientBuffer(false), - d3dTextureClientBuffer(false), surfaceD3DTexture2DShareHandle(false), querySurfacePointer(false), windowFixedSize(false), @@ -787,10 +739,7 @@ DisplayExtensions::DisplayExtensions() stream(false), streamConsumerGLTexture(false), streamConsumerGLTextureYUV(false), - streamProducerD3DTextureNV12(false), - createContextWebGLCompatibility(false), - createContextBindGeneratesResource(false), - swapBuffersWithDamage(false) + streamProducerD3DTextureNV12(false) { } @@ -799,37 +748,33 @@ std::vector DisplayExtensions::getStrings() const std::vector extensionStrings; // clang-format off - // | Extension name | Supported flag | Output vector | - InsertExtensionString("EGL_EXT_create_context_robustness", createContextRobustness, &extensionStrings); - InsertExtensionString("EGL_ANGLE_d3d_share_handle_client_buffer", d3dShareHandleClientBuffer, &extensionStrings); - InsertExtensionString("EGL_ANGLE_d3d_texture_client_buffer", d3dTextureClientBuffer, &extensionStrings); - InsertExtensionString("EGL_ANGLE_surface_d3d_texture_2d_share_handle", surfaceD3DTexture2DShareHandle, &extensionStrings); - InsertExtensionString("EGL_ANGLE_query_surface_pointer", querySurfacePointer, &extensionStrings); - InsertExtensionString("EGL_ANGLE_window_fixed_size", windowFixedSize, &extensionStrings); - InsertExtensionString("EGL_ANGLE_keyed_mutex", keyedMutex, &extensionStrings); - InsertExtensionString("EGL_ANGLE_surface_orientation", surfaceOrientation, &extensionStrings); - InsertExtensionString("EGL_ANGLE_direct_composition", directComposition, &extensionStrings); - InsertExtensionString("EGL_NV_post_sub_buffer", postSubBuffer, &extensionStrings); - InsertExtensionString("EGL_KHR_create_context", createContext, &extensionStrings); - InsertExtensionString("EGL_EXT_device_query", deviceQuery, &extensionStrings); - InsertExtensionString("EGL_KHR_image", image, &extensionStrings); - InsertExtensionString("EGL_KHR_image_base", imageBase, &extensionStrings); - InsertExtensionString("EGL_KHR_image_pixmap", imagePixmap, &extensionStrings); - InsertExtensionString("EGL_KHR_gl_texture_2D_image", glTexture2DImage, &extensionStrings); - InsertExtensionString("EGL_KHR_gl_texture_cubemap_image", glTextureCubemapImage, &extensionStrings); - InsertExtensionString("EGL_KHR_gl_texture_3D_image", glTexture3DImage, &extensionStrings); - InsertExtensionString("EGL_KHR_gl_renderbuffer_image", glRenderbufferImage, &extensionStrings); - InsertExtensionString("EGL_KHR_get_all_proc_addresses", getAllProcAddresses, &extensionStrings); - InsertExtensionString("EGL_KHR_stream", stream, &extensionStrings); - InsertExtensionString("EGL_KHR_stream_consumer_gltexture", streamConsumerGLTexture, &extensionStrings); - InsertExtensionString("EGL_NV_stream_consumer_gltexture_yuv", streamConsumerGLTextureYUV, &extensionStrings); - InsertExtensionString("EGL_ANGLE_flexible_surface_compatibility", flexibleSurfaceCompatibility, &extensionStrings); - InsertExtensionString("EGL_ANGLE_stream_producer_d3d_texture_nv12", streamProducerD3DTextureNV12, &extensionStrings); - InsertExtensionString("EGL_ANGLE_create_context_webgl_compatibility", createContextWebGLCompatibility, &extensionStrings); - InsertExtensionString("EGL_CHROMIUM_create_context_bind_generates_resource", createContextBindGeneratesResource, &extensionStrings); - InsertExtensionString("EGL_EXT_swap_buffers_with_damage", swapBuffersWithDamage, &extensionStrings); + // | Extension name | Supported flag | Output vector | + InsertExtensionString("EGL_EXT_create_context_robustness", createContextRobustness, &extensionStrings); + InsertExtensionString("EGL_ANGLE_d3d_share_handle_client_buffer", d3dShareHandleClientBuffer, &extensionStrings); + InsertExtensionString("EGL_ANGLE_surface_d3d_texture_2d_share_handle", surfaceD3DTexture2DShareHandle, &extensionStrings); + InsertExtensionString("EGL_ANGLE_query_surface_pointer", querySurfacePointer, &extensionStrings); + InsertExtensionString("EGL_ANGLE_window_fixed_size", windowFixedSize, &extensionStrings); + InsertExtensionString("EGL_ANGLE_keyed_mutex", keyedMutex, &extensionStrings); + InsertExtensionString("EGL_ANGLE_surface_orientation", surfaceOrientation, &extensionStrings); + InsertExtensionString("EGL_ANGLE_direct_composition", directComposition, &extensionStrings); + InsertExtensionString("EGL_NV_post_sub_buffer", postSubBuffer, &extensionStrings); + InsertExtensionString("EGL_KHR_create_context", createContext, &extensionStrings); + InsertExtensionString("EGL_EXT_device_query", deviceQuery, &extensionStrings); + InsertExtensionString("EGL_KHR_image", image, &extensionStrings); + InsertExtensionString("EGL_KHR_image_base", imageBase, &extensionStrings); + InsertExtensionString("EGL_KHR_image_pixmap", imagePixmap, &extensionStrings); + InsertExtensionString("EGL_KHR_gl_texture_2D_image", glTexture2DImage, &extensionStrings); + InsertExtensionString("EGL_KHR_gl_texture_cubemap_image", glTextureCubemapImage, &extensionStrings); + InsertExtensionString("EGL_KHR_gl_texture_3D_image", glTexture3DImage, &extensionStrings); + InsertExtensionString("EGL_KHR_gl_renderbuffer_image", glRenderbufferImage, &extensionStrings); + InsertExtensionString("EGL_KHR_get_all_proc_addresses", getAllProcAddresses, &extensionStrings); + InsertExtensionString("EGL_KHR_stream", stream, &extensionStrings); + InsertExtensionString("EGL_KHR_stream_consumer_gltexture", streamConsumerGLTexture, &extensionStrings); + InsertExtensionString("EGL_NV_stream_consumer_gltexture_yuv", streamConsumerGLTextureYUV, &extensionStrings); + InsertExtensionString("EGL_ANGLE_flexible_surface_compatibility", flexibleSurfaceCompatibility, &extensionStrings); + InsertExtensionString("EGL_ANGLE_stream_producer_d3d_texture_nv12", streamProducerD3DTextureNV12, &extensionStrings); // TODO(jmadill): Enable this when complete. - //InsertExtensionString("KHR_create_context_no_error", createContextNoError, &extensionStrings); + //InsertExtensionString("KHR_create_context_no_error", createContextNoError, &extensionStrings); // clang-format on return extensionStrings; @@ -877,7 +822,6 @@ std::vector ClientExtensions::getStrings() const InsertExtensionString("EGL_ANGLE_platform_angle", platformANGLE, &extensionStrings); InsertExtensionString("EGL_ANGLE_platform_angle_d3d", platformANGLED3D, &extensionStrings); InsertExtensionString("EGL_ANGLE_platform_angle_opengl", platformANGLEOpenGL, &extensionStrings); - InsertExtensionString("EGL_ANGLE_platform_angle_null", platformANGLENULL, &extensionStrings); InsertExtensionString("EGL_ANGLE_device_creation", deviceCreation, &extensionStrings); InsertExtensionString("EGL_ANGLE_device_creation_d3d11", deviceCreationD3D11, &extensionStrings); InsertExtensionString("EGL_ANGLE_x11_visual", x11Visual, &extensionStrings); diff --git a/gfx/angle/src/libANGLE/Caps.h b/gfx/angle/src/libANGLE/Caps.h index 277b4a490..6382830eb 100755 --- a/gfx/angle/src/libANGLE/Caps.h +++ b/gfx/angle/src/libANGLE/Caps.h @@ -52,7 +52,6 @@ class TextureCapsMap void insert(GLenum internalFormat, const TextureCaps &caps); void remove(GLenum internalFormat); - void clear(); const TextureCaps &get(GLenum internalFormat) const; @@ -293,24 +292,6 @@ struct Extensions // GL_CHROMIUM_copy_texture bool copyTexture; - // GL_CHROMIUM_copy_compressed_texture - bool copyCompressedTexture; - - // GL_ANGLE_webgl_compatibility - bool webglCompatibility; - - // GL_CHROMIUM_bind_generates_resource - bool bindGeneratesResource; - - // GL_ANGLE_robust_client_memory - bool robustClientMemory; - - // GL_EXT_texture_sRGB_decode - bool textureSRGBDecode; - - // GL_EXT_sRGB_write_control - bool sRGBWriteControl; - // ES3 Extension support // GL_EXT_color_buffer_float @@ -331,19 +312,6 @@ struct Extensions bool pathRendering; }; -struct ExtensionInfo -{ - // If this extension can be enabled with glEnableExtension (GL_ANGLE_webgl_compatibility) - bool Enableable = false; - - // Pointer to a boolean member of the Extensions struct - typedef bool(Extensions::*ExtensionBool); - ExtensionBool ExtensionsMember = nullptr; -}; - -using ExtensionInfoMap = std::map; -const ExtensionInfoMap &GetExtensionInfoMap(); - struct Limitations { Limitations(); @@ -536,9 +504,6 @@ struct DisplayExtensions // EGL_ANGLE_d3d_share_handle_client_buffer bool d3dShareHandleClientBuffer; - // EGL_ANGLE_d3d_texture_client_buffer - bool d3dTextureClientBuffer; - // EGL_ANGLE_surface_d3d_texture_2d_share_handle bool surfaceD3DTexture2DShareHandle; @@ -607,15 +572,6 @@ struct DisplayExtensions // EGL_ANGLE_stream_producer_d3d_texture_nv12 bool streamProducerD3DTextureNV12; - - // EGL_ANGLE_create_context_webgl_compatibility - bool createContextWebGLCompatibility; - - // EGL_CHROMIUM_create_context_bind_generates_resource - bool createContextBindGeneratesResource; - - // EGL_EXT_swap_buffers_with_damage - bool swapBuffersWithDamage; }; struct DeviceExtensions @@ -654,9 +610,6 @@ struct ClientExtensions // EGL_ANGLE_platform_angle_opengl bool platformANGLEOpenGL; - // EGL_ANGLE_platform_angle_null - bool platformANGLENULL; - // EGL_ANGLE_device_creation bool deviceCreation; diff --git a/gfx/angle/src/libANGLE/Compiler.cpp b/gfx/angle/src/libANGLE/Compiler.cpp index 078491284..b745888f2 100755 --- a/gfx/angle/src/libANGLE/Compiler.cpp +++ b/gfx/angle/src/libANGLE/Compiler.cpp @@ -19,33 +19,31 @@ namespace gl namespace { -// Global count of active shader compiler handles. Needed to know when to call sh::Initialize and -// sh::Finalize. +// Global count of active shader compiler handles. Needed to know when to call ShInitialize and +// ShFinalize. size_t activeCompilerHandles = 0; -ShShaderSpec SelectShaderSpec(GLint majorVersion, GLint minorVersion, bool isWebGL) +ShShaderSpec SelectShaderSpec(GLint majorVersion, GLint minorVersion) { if (majorVersion >= 3) { if (minorVersion == 1) { - return isWebGL ? SH_WEBGL3_SPEC : SH_GLES3_1_SPEC; + return SH_GLES3_1_SPEC; } else { - return isWebGL ? SH_WEBGL2_SPEC : SH_GLES3_SPEC; + return SH_GLES3_SPEC; } } - return isWebGL ? SH_WEBGL_SPEC : SH_GLES2_SPEC; + return SH_GLES2_SPEC; } } // anonymous namespace Compiler::Compiler(rx::GLImplFactory *implFactory, const ContextState &state) : mImplementation(implFactory->createCompiler()), - mSpec(SelectShaderSpec(state.getClientMajorVersion(), - state.getClientMinorVersion(), - state.getExtensions().webglCompatibility)), + mSpec(SelectShaderSpec(state.getClientMajorVersion(), state.getClientMinorVersion())), mOutputType(mImplementation->getTranslatorOutputType()), mResources(), mFragmentCompiler(nullptr), @@ -57,7 +55,7 @@ Compiler::Compiler(rx::GLImplFactory *implFactory, const ContextState &state) const gl::Caps &caps = state.getCaps(); const gl::Extensions &extensions = state.getExtensions(); - sh::InitBuiltInResources(&mResources); + ShInitBuiltInResources(&mResources); mResources.MaxVertexAttribs = caps.maxVertexAttributes; mResources.MaxVertexUniformVectors = caps.maxVertexUniformVectors; mResources.MaxVaryingVectors = caps.maxVaryingVectors; @@ -122,7 +120,7 @@ Error Compiler::release() { if (mFragmentCompiler) { - sh::Destruct(mFragmentCompiler); + ShDestruct(mFragmentCompiler); mFragmentCompiler = nullptr; ASSERT(activeCompilerHandles > 0); @@ -131,7 +129,7 @@ Error Compiler::release() if (mVertexCompiler) { - sh::Destruct(mVertexCompiler); + ShDestruct(mVertexCompiler); mVertexCompiler = nullptr; ASSERT(activeCompilerHandles > 0); @@ -140,7 +138,7 @@ Error Compiler::release() if (mComputeCompiler) { - sh::Destruct(mComputeCompiler); + ShDestruct(mComputeCompiler); mComputeCompiler = nullptr; ASSERT(activeCompilerHandles > 0); @@ -149,7 +147,7 @@ Error Compiler::release() if (activeCompilerHandles == 0) { - sh::Finalize(); + ShFinalize(); } mImplementation->release(); @@ -181,10 +179,10 @@ ShHandle Compiler::getCompilerHandle(GLenum type) { if (activeCompilerHandles == 0) { - sh::Initialize(); + ShInitialize(); } - *compiler = sh::ConstructCompiler(type, mSpec, mOutputType, &mResources); + *compiler = ShConstructCompiler(type, mSpec, mOutputType, &mResources); activeCompilerHandles++; } diff --git a/gfx/angle/src/libANGLE/Context.cpp b/gfx/angle/src/libANGLE/Context.cpp index d74f33057..c79f3b7b7 100755 --- a/gfx/angle/src/libANGLE/Context.cpp +++ b/gfx/angle/src/libANGLE/Context.cpp @@ -35,11 +35,9 @@ #include "libANGLE/VertexArray.h" #include "libANGLE/formatutils.h" #include "libANGLE/validationES.h" -#include "libANGLE/Workarounds.h" #include "libANGLE/renderer/ContextImpl.h" #include "libANGLE/renderer/EGLImplFactory.h" #include "libANGLE/queryconversions.h" -#include "libANGLE/queryutils.h" namespace { @@ -97,21 +95,22 @@ std::vector GatherPaths(gl::ResourceManager &resourceManager, } template -gl::Error GetQueryObjectParameter(gl::Query *query, GLenum pname, T *params) +gl::Error GetQueryObjectParameter(gl::Context *context, GLuint id, GLenum pname, T *params) { - ASSERT(query != nullptr); + gl::Query *queryObject = context->getQuery(id, false, GL_NONE); + ASSERT(queryObject != nullptr); switch (pname) { case GL_QUERY_RESULT_EXT: - return query->getResult(params); + return queryObject->getResult(params); case GL_QUERY_RESULT_AVAILABLE_EXT: { bool available; - gl::Error error = query->isResultAvailable(&available); + gl::Error error = queryObject->isResultAvailable(&available); if (!error.isError()) { - *params = gl::ConvertFromGLboolean(available); + *params = static_cast(available ? GL_TRUE : GL_FALSE); } return error; } @@ -149,11 +148,6 @@ EGLint GetClientMinorVersion(const egl::AttributeMap &attribs) return static_cast(attribs.get(EGL_CONTEXT_MINOR_VERSION, 0)); } -gl::Version GetClientVersion(const egl::AttributeMap &attribs) -{ - return gl::Version(GetClientMajorVersion(attribs), GetClientMinorVersion(attribs)); -} - GLenum GetResetStrategy(const egl::AttributeMap &attribs) { EGLAttrib attrib = attribs.get(EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT, @@ -172,15 +166,12 @@ GLenum GetResetStrategy(const egl::AttributeMap &attribs) bool GetRobustAccess(const egl::AttributeMap &attribs) { - return (attribs.get(EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT, EGL_FALSE) == EGL_TRUE) || - ((attribs.get(EGL_CONTEXT_FLAGS_KHR, 0) & EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR) != - 0); + return (attribs.get(EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT, EGL_FALSE) == EGL_TRUE); } bool GetDebug(const egl::AttributeMap &attribs) { - return (attribs.get(EGL_CONTEXT_OPENGL_DEBUG, EGL_FALSE) == EGL_TRUE) || - ((attribs.get(EGL_CONTEXT_FLAGS_KHR, 0) & EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR) != 0); + return (attribs.get(EGL_CONTEXT_OPENGL_DEBUG, EGL_FALSE) == EGL_TRUE); } bool GetNoError(const egl::AttributeMap &attribs) @@ -188,16 +179,6 @@ bool GetNoError(const egl::AttributeMap &attribs) return (attribs.get(EGL_CONTEXT_OPENGL_NO_ERROR_KHR, EGL_FALSE) == EGL_TRUE); } -bool GetWebGLContext(const egl::AttributeMap &attribs) -{ - return (attribs.get(EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE, EGL_FALSE) == EGL_TRUE); -} - -bool GetBindGeneratesResource(const egl::AttributeMap &attribs) -{ - return (attribs.get(EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM, EGL_TRUE) == EGL_TRUE); -} - std::string GetObjectLabelFromPointer(GLsizei length, const GLchar *label) { std::string labelName; @@ -238,38 +219,34 @@ Context::Context(rx::EGLImplFactory *implFactory, const Context *shareContext, const egl::AttributeMap &attribs) - : ValidationContext(GetClientVersion(attribs), + : ValidationContext(GetClientMajorVersion(attribs), + GetClientMinorVersion(attribs), &mGLState, mCaps, mTextureCaps, mExtensions, nullptr, mLimitations, - mFramebufferMap, GetNoError(attribs)), mImplementation(implFactory->createContext(mState)), mCompiler(nullptr), + mClientMajorVersion(GetClientMajorVersion(attribs)), + mClientMinorVersion(GetClientMinorVersion(attribs)), mConfig(config), mClientType(EGL_OPENGL_ES_API), mHasBeenCurrent(false), mContextLost(false), mResetStatus(GL_NO_ERROR), - mContextLostForced(false), mResetStrategy(GetResetStrategy(attribs)), mRobustAccess(GetRobustAccess(attribs)), mCurrentSurface(nullptr), mResourceManager(nullptr) { - if (mRobustAccess) - { - UNIMPLEMENTED(); - } + ASSERT(!mRobustAccess); // Unimplemented - initCaps(GetWebGLContext(attribs)); - initWorkarounds(); + initCaps(); - mGLState.initialize(mCaps, mExtensions, getClientVersion(), GetDebug(attribs), - GetBindGeneratesResource(attribs)); + mGLState.initialize(mCaps, mExtensions, mClientMajorVersion, GetDebug(attribs)); mFenceNVHandleAllocator.setBaseHandle(0); @@ -297,7 +274,7 @@ Context::Context(rx::EGLImplFactory *implFactory, Texture *zeroTextureCube = new Texture(mImplementation.get(), 0, GL_TEXTURE_CUBE_MAP); mZeroTextures[GL_TEXTURE_CUBE_MAP].set(zeroTextureCube); - if (getClientVersion() >= Version(3, 0)) + if (mClientMajorVersion >= 3) { // TODO: These could also be enabled via extension Texture *zeroTexture3D = new Texture(mImplementation.get(), 0, GL_TEXTURE_3D); @@ -320,7 +297,7 @@ Context::Context(rx::EGLImplFactory *implFactory, bindArrayBuffer(0); bindElementArrayBuffer(0); - bindRenderbuffer(GL_RENDERBUFFER, 0); + bindRenderbuffer(0); bindGenericUniformBuffer(0); for (unsigned int i = 0; i < mCaps.maxCombinedUniformBlocks; i++) @@ -333,7 +310,7 @@ Context::Context(rx::EGLImplFactory *implFactory, bindPixelPackBuffer(0); bindPixelUnpackBuffer(0); - if (getClientVersion() >= Version(3, 0)) + if (mClientMajorVersion >= 3) { // [OpenGL ES 3.0.2] section 2.14.1 pg 85: // In the initial state, a default transform feedback object is bound and treated as @@ -379,7 +356,6 @@ Context::Context(rx::EGLImplFactory *implFactory, mBlitDirtyBits.set(State::DIRTY_BIT_SCISSOR_TEST_ENABLED); mBlitDirtyBits.set(State::DIRTY_BIT_SCISSOR); - mBlitDirtyBits.set(State::DIRTY_BIT_FRAMEBUFFER_SRGB); mBlitDirtyObjects.set(State::DIRTY_OBJECT_READ_FRAMEBUFFER); mBlitDirtyObjects.set(State::DIRTY_OBJECT_DRAW_FRAMEBUFFER); @@ -830,6 +806,16 @@ Buffer *Context::getBuffer(GLuint handle) const return mResourceManager->getBuffer(handle); } +Shader *Context::getShader(GLuint handle) const +{ + return mResourceManager->getShader(handle); +} + +Program *Context::getProgram(GLuint handle) const +{ + return mResourceManager->getProgram(handle); +} + Texture *Context::getTexture(GLuint handle) const { return mResourceManager->getTexture(handle); @@ -986,6 +972,13 @@ void Context::bindDrawFramebuffer(GLuint framebufferHandle) mGLState.setDrawFramebufferBinding(framebuffer); } +void Context::bindRenderbuffer(GLuint renderbufferHandle) +{ + Renderbuffer *renderbuffer = + mResourceManager->checkRenderbufferAllocation(mImplementation.get(), renderbufferHandle); + mGLState.setRenderbufferBinding(renderbuffer); +} + void Context::bindVertexArray(GLuint vertexArrayHandle) { VertexArray *vertexArray = checkVertexArrayAllocation(vertexArrayHandle); @@ -1135,24 +1128,24 @@ void Context::getQueryiv(GLenum target, GLenum pname, GLint *params) } } -void Context::getQueryObjectiv(GLuint id, GLenum pname, GLint *params) +Error Context::getQueryObjectiv(GLuint id, GLenum pname, GLint *params) { - handleError(GetQueryObjectParameter(getQuery(id), pname, params)); + return GetQueryObjectParameter(this, id, pname, params); } -void Context::getQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) +Error Context::getQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) { - handleError(GetQueryObjectParameter(getQuery(id), pname, params)); + return GetQueryObjectParameter(this, id, pname, params); } -void Context::getQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params) +Error Context::getQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params) { - handleError(GetQueryObjectParameter(getQuery(id), pname, params)); + return GetQueryObjectParameter(this, id, pname, params); } -void Context::getQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params) +Error Context::getQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params) { - handleError(GetQueryObjectParameter(getQuery(id), pname, params)); + return GetQueryObjectParameter(this, id, pname, params); } Framebuffer *Context::getFramebuffer(unsigned int handle) const @@ -1301,10 +1294,10 @@ void Context::getIntegerv(GLenum pname, GLint *params) case GL_MIN_PROGRAM_TEXEL_OFFSET: *params = mCaps.minProgramTexelOffset; break; case GL_MAX_PROGRAM_TEXEL_OFFSET: *params = mCaps.maxProgramTexelOffset; break; case GL_MAJOR_VERSION: - *params = getClientVersion().major; + *params = mClientMajorVersion; break; case GL_MINOR_VERSION: - *params = getClientVersion().minor; + *params = mClientMinorVersion; break; case GL_MAX_ELEMENTS_INDICES: *params = mCaps.maxElementsIndices; break; case GL_MAX_ELEMENTS_VERTICES: *params = mCaps.maxElementsVertices; break; @@ -1539,6 +1532,7 @@ void Context::getIntegeri_v(GLenum target, GLuint index, GLint *data) GLenum nativeType; unsigned int numParams; bool queryStatus = getIndexedQueryParameterInfo(target, &nativeType, &numParams); + UNUSED_ASSERTION_VARIABLE(queryStatus); ASSERT(queryStatus); if (nativeType == GL_INT) @@ -1571,6 +1565,7 @@ void Context::getInteger64i_v(GLenum target, GLuint index, GLint64 *data) GLenum nativeType; unsigned int numParams; bool queryStatus = getIndexedQueryParameterInfo(target, &nativeType, &numParams); + UNUSED_ASSERTION_VARIABLE(queryStatus); ASSERT(queryStatus); if (nativeType == GL_INT_64_ANGLEX) @@ -1591,6 +1586,7 @@ void Context::getBooleani_v(GLenum target, GLuint index, GLboolean *data) GLenum nativeType; unsigned int numParams; bool queryStatus = getIndexedQueryParameterInfo(target, &nativeType, &numParams); + UNUSED_ASSERTION_VARIABLE(queryStatus); ASSERT(queryStatus); if (nativeType == GL_BOOL) @@ -1919,12 +1915,7 @@ void Context::handleError(const Error &error) { if (error.isError()) { - GLenum code = error.getCode(); - mErrors.insert(code); - if (code == GL_OUT_OF_MEMORY && getWorkarounds().loseContextOnOutOfMemory) - { - markContextLost(); - } + mErrors.insert(error.getCode()); if (!error.getMessage().empty()) { @@ -1955,10 +1946,7 @@ GLenum Context::getError() void Context::markContextLost() { if (mResetStrategy == GL_LOSE_CONTEXT_ON_RESET_EXT) - { mResetStatus = GL_UNKNOWN_CONTEXT_RESET_EXT; - mContextLostForced = true; - } mContextLost = true; } @@ -1997,11 +1985,8 @@ GLenum Context::getResetStatus() mContextLost = true; } } - else if (!mContextLostForced && mResetStatus != GL_NO_ERROR) + else if (mResetStatus != GL_NO_ERROR) { - // If markContextLost was used to mark the context lost then - // assume that is not recoverable, and continue to report the - // lost reset status for the lifetime of this context. mResetStatus = mImplementation->getResetStatus(); } @@ -2092,13 +2077,11 @@ Framebuffer *Context::checkFramebufferAllocation(GLuint framebuffer) bool Context::isVertexArrayGenerated(GLuint vertexArray) { - ASSERT(mVertexArrayMap.find(0) != mVertexArrayMap.end()); return mVertexArrayMap.find(vertexArray) != mVertexArrayMap.end(); } bool Context::isTransformFeedbackGenerated(GLuint transformFeedback) { - ASSERT(mTransformFeedbackMap.find(0) != mTransformFeedbackMap.end()); return mTransformFeedbackMap.find(transformFeedback) != mTransformFeedbackMap.end(); } @@ -2192,44 +2175,102 @@ void Context::setVertexAttribDivisor(GLuint index, GLuint divisor) void Context::samplerParameteri(GLuint sampler, GLenum pname, GLint param) { - Sampler *samplerObject = - mResourceManager->checkSamplerAllocation(mImplementation.get(), sampler); - SetSamplerParameteri(samplerObject, pname, param); -} + mResourceManager->checkSamplerAllocation(mImplementation.get(), sampler); -void Context::samplerParameteriv(GLuint sampler, GLenum pname, const GLint *param) -{ - Sampler *samplerObject = - mResourceManager->checkSamplerAllocation(mImplementation.get(), sampler); - SetSamplerParameteriv(samplerObject, pname, param); + Sampler *samplerObject = getSampler(sampler); + ASSERT(samplerObject); + + // clang-format off + switch (pname) + { + case GL_TEXTURE_MIN_FILTER: samplerObject->setMinFilter(static_cast(param)); break; + case GL_TEXTURE_MAG_FILTER: samplerObject->setMagFilter(static_cast(param)); break; + case GL_TEXTURE_WRAP_S: samplerObject->setWrapS(static_cast(param)); break; + case GL_TEXTURE_WRAP_T: samplerObject->setWrapT(static_cast(param)); break; + case GL_TEXTURE_WRAP_R: samplerObject->setWrapR(static_cast(param)); break; + case GL_TEXTURE_MAX_ANISOTROPY_EXT: samplerObject->setMaxAnisotropy(std::min(static_cast(param), getExtensions().maxTextureAnisotropy)); break; + case GL_TEXTURE_MIN_LOD: samplerObject->setMinLod(static_cast(param)); break; + case GL_TEXTURE_MAX_LOD: samplerObject->setMaxLod(static_cast(param)); break; + case GL_TEXTURE_COMPARE_MODE: samplerObject->setCompareMode(static_cast(param)); break; + case GL_TEXTURE_COMPARE_FUNC: samplerObject->setCompareFunc(static_cast(param)); break; + default: UNREACHABLE(); break; + } + // clang-format on } void Context::samplerParameterf(GLuint sampler, GLenum pname, GLfloat param) { - Sampler *samplerObject = - mResourceManager->checkSamplerAllocation(mImplementation.get(), sampler); - SetSamplerParameterf(samplerObject, pname, param); -} + mResourceManager->checkSamplerAllocation(mImplementation.get(), sampler); -void Context::samplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param) -{ - Sampler *samplerObject = - mResourceManager->checkSamplerAllocation(mImplementation.get(), sampler); - SetSamplerParameterfv(samplerObject, pname, param); + Sampler *samplerObject = getSampler(sampler); + ASSERT(samplerObject); + + // clang-format off + switch (pname) + { + case GL_TEXTURE_MIN_FILTER: samplerObject->setMinFilter(uiround(param)); break; + case GL_TEXTURE_MAG_FILTER: samplerObject->setMagFilter(uiround(param)); break; + case GL_TEXTURE_WRAP_S: samplerObject->setWrapS(uiround(param)); break; + case GL_TEXTURE_WRAP_T: samplerObject->setWrapT(uiround(param)); break; + case GL_TEXTURE_WRAP_R: samplerObject->setWrapR(uiround(param)); break; + case GL_TEXTURE_MAX_ANISOTROPY_EXT: samplerObject->setMaxAnisotropy(std::min(param, getExtensions().maxTextureAnisotropy)); break; + case GL_TEXTURE_MIN_LOD: samplerObject->setMinLod(param); break; + case GL_TEXTURE_MAX_LOD: samplerObject->setMaxLod(param); break; + case GL_TEXTURE_COMPARE_MODE: samplerObject->setCompareMode(uiround(param)); break; + case GL_TEXTURE_COMPARE_FUNC: samplerObject->setCompareFunc(uiround(param)); break; + default: UNREACHABLE(); break; + } + // clang-format on } -void Context::getSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params) +GLint Context::getSamplerParameteri(GLuint sampler, GLenum pname) { - const Sampler *samplerObject = - mResourceManager->checkSamplerAllocation(mImplementation.get(), sampler); - QuerySamplerParameteriv(samplerObject, pname, params); + mResourceManager->checkSamplerAllocation(mImplementation.get(), sampler); + + Sampler *samplerObject = getSampler(sampler); + ASSERT(samplerObject); + + // clang-format off + switch (pname) + { + case GL_TEXTURE_MIN_FILTER: return static_cast(samplerObject->getMinFilter()); + case GL_TEXTURE_MAG_FILTER: return static_cast(samplerObject->getMagFilter()); + case GL_TEXTURE_WRAP_S: return static_cast(samplerObject->getWrapS()); + case GL_TEXTURE_WRAP_T: return static_cast(samplerObject->getWrapT()); + case GL_TEXTURE_WRAP_R: return static_cast(samplerObject->getWrapR()); + case GL_TEXTURE_MAX_ANISOTROPY_EXT: return static_cast(samplerObject->getMaxAnisotropy()); + case GL_TEXTURE_MIN_LOD: return iround(samplerObject->getMinLod()); + case GL_TEXTURE_MAX_LOD: return iround(samplerObject->getMaxLod()); + case GL_TEXTURE_COMPARE_MODE: return static_cast(samplerObject->getCompareMode()); + case GL_TEXTURE_COMPARE_FUNC: return static_cast(samplerObject->getCompareFunc()); + default: UNREACHABLE(); return 0; + } + // clang-format on } -void Context::getSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params) +GLfloat Context::getSamplerParameterf(GLuint sampler, GLenum pname) { - const Sampler *samplerObject = - mResourceManager->checkSamplerAllocation(mImplementation.get(), sampler); - QuerySamplerParameterfv(samplerObject, pname, params); + mResourceManager->checkSamplerAllocation(mImplementation.get(), sampler); + + Sampler *samplerObject = getSampler(sampler); + ASSERT(samplerObject); + + // clang-format off + switch (pname) + { + case GL_TEXTURE_MIN_FILTER: return static_cast(samplerObject->getMinFilter()); + case GL_TEXTURE_MAG_FILTER: return static_cast(samplerObject->getMagFilter()); + case GL_TEXTURE_WRAP_S: return static_cast(samplerObject->getWrapS()); + case GL_TEXTURE_WRAP_T: return static_cast(samplerObject->getWrapT()); + case GL_TEXTURE_WRAP_R: return static_cast(samplerObject->getWrapR()); + case GL_TEXTURE_MAX_ANISOTROPY_EXT: return samplerObject->getMaxAnisotropy(); + case GL_TEXTURE_MIN_LOD: return samplerObject->getMinLod(); + case GL_TEXTURE_MAX_LOD: return samplerObject->getMaxLod(); + case GL_TEXTURE_COMPARE_MODE: return static_cast(samplerObject->getCompareMode()); + case GL_TEXTURE_COMPARE_FUNC: return static_cast(samplerObject->getCompareFunc()); + default: UNREACHABLE(); return 0; + } + // clang-format on } void Context::programParameteri(GLuint program, GLenum pname, GLint value) @@ -2251,30 +2292,26 @@ void Context::initRendererString() mRendererString = MakeStaticString(rendererString.str()); } -const char *Context::getRendererString() const +const std::string &Context::getRendererString() const { return mRendererString; } void Context::initExtensionStrings() { - for (const auto &extensionString : mExtensions.getStrings()) - { - mExtensionStrings.push_back(MakeStaticString(extensionString)); - } + mExtensionStrings = mExtensions.getStrings(); std::ostringstream combinedStringStream; - std::copy(mExtensionStrings.begin(), mExtensionStrings.end(), - std::ostream_iterator(combinedStringStream, " ")); - mExtensionString = MakeStaticString(combinedStringStream.str()); + std::copy(mExtensionStrings.begin(), mExtensionStrings.end(), std::ostream_iterator(combinedStringStream, " ")); + mExtensionString = combinedStringStream.str(); } -const char *Context::getExtensionString() const +const std::string &Context::getExtensionString() const { return mExtensionString; } -const char *Context::getExtensionString(size_t idx) const +const std::string &Context::getExtensionString(size_t idx) const { return mExtensionStrings[idx]; } @@ -2305,7 +2342,7 @@ bool Context::hasActiveTransformFeedback(GLuint program) const return false; } -void Context::initCaps(bool webGLContext) +void Context::initCaps() { mCaps = mImplementation->getNativeCaps(); @@ -2313,7 +2350,7 @@ void Context::initCaps(bool webGLContext) mLimitations = mImplementation->getNativeLimitations(); - if (getClientVersion() < Version(3, 0)) + if (mClientMajorVersion < 3) { // Disable ES3+ extensions mExtensions.colorBufferFloat = false; @@ -2321,7 +2358,7 @@ void Context::initCaps(bool webGLContext) mExtensions.textureNorm16 = false; } - if (getClientVersion() > Version(2, 0)) + if (mClientMajorVersion > 2) { // FIXME(geofflang): Don't support EXT_sRGB in non-ES2 contexts //mExtensions.sRGB = false; @@ -2330,7 +2367,6 @@ void Context::initCaps(bool webGLContext) // Some extensions are always available because they are implemented in the GL layer. mExtensions.bindUniformLocation = true; mExtensions.vertexArrayObject = true; - mExtensions.bindGeneratesResource = true; // Enable the no error extension if the context was created with the flag. mExtensions.noError = mSkipValidation; @@ -2342,9 +2378,6 @@ void Context::initCaps(bool webGLContext) mExtensions.maxDebugGroupStackDepth = 1024; mExtensions.maxLabelLength = 1024; - // Explicitly enable GL_ANGLE_robust_client_memory - mExtensions.robustClientMemory = true; - // Apply implementation limits mCaps.maxVertexAttributes = std::min(mCaps.maxVertexAttributes, MAX_VERTEX_ATTRIBS); mCaps.maxVertexUniformBlocks = std::min(mCaps.maxVertexUniformBlocks, IMPLEMENTATION_MAX_VERTEX_SHADER_UNIFORM_BUFFERS); @@ -2352,25 +2385,7 @@ void Context::initCaps(bool webGLContext) mCaps.maxFragmentInputComponents = std::min(mCaps.maxFragmentInputComponents, IMPLEMENTATION_MAX_VARYING_VECTORS * 4); - // WebGL compatibility - mExtensions.webglCompatibility = webGLContext; - for (const auto &extensionInfo : GetExtensionInfoMap()) - { - // If this context is for WebGL, disable all enableable extensions - if (webGLContext && extensionInfo.second.Enableable) - { - mExtensions.*(extensionInfo.second.ExtensionsMember) = false; - } - } - - // Generate texture caps - updateCaps(); -} - -void Context::updateCaps() -{ mCaps.compressedTextureFormats.clear(); - mTextureCaps.clear(); const TextureCapsMap &rendererFormats = mImplementation->getNativeTextureCaps(); for (TextureCapsMap::const_iterator i = rendererFormats.begin(); i != rendererFormats.end(); i++) @@ -2384,11 +2399,11 @@ void Context::updateCaps() // Caps are AND'd with the renderer caps because some core formats are still unsupported in // ES3. formatCaps.texturable = - formatCaps.texturable && formatInfo.textureSupport(getClientVersion(), mExtensions); + formatCaps.texturable && formatInfo.textureSupport(mClientMajorVersion, mExtensions); formatCaps.renderable = - formatCaps.renderable && formatInfo.renderSupport(getClientVersion(), mExtensions); + formatCaps.renderable && formatInfo.renderSupport(mClientMajorVersion, mExtensions); formatCaps.filterable = - formatCaps.filterable && formatInfo.filterSupport(getClientVersion(), mExtensions); + formatCaps.filterable && formatInfo.filterSupport(mClientMajorVersion, mExtensions); // OpenGL ES does not support multisampling with integer formats if (!formatInfo.renderSupport || formatInfo.componentType == GL_INT || formatInfo.componentType == GL_UNSIGNED_INT) @@ -2405,13 +2420,6 @@ void Context::updateCaps() } } -void Context::initWorkarounds() -{ - // Lose the context upon out of memory error if the application is - // expecting to watch for those events. - mWorkarounds.loseContextOnOutOfMemory = (mResetStrategy == GL_LOSE_CONTEXT_ON_RESET_EXT); -} - void Context::syncRendererState() { const State::DirtyBits &dirtyBits = mGLState.getDirtyBits(); @@ -2504,11 +2512,6 @@ void Context::readPixels(GLint x, GLenum type, GLvoid *pixels) { - if (width == 0 || height == 0) - { - return; - } - syncStateForReadPixels(); Framebuffer *framebufferObject = mGLState.getReadFramebuffer(); @@ -2547,11 +2550,6 @@ void Context::copyTexSubImage2D(GLenum target, GLsizei width, GLsizei height) { - if (width == 0 || height == 0) - { - return; - } - // Only sync the read FBO mGLState.syncDirtyObject(GL_READ_FRAMEBUFFER); @@ -2574,11 +2572,6 @@ void Context::copyTexSubImage3D(GLenum target, GLsizei width, GLsizei height) { - if (width == 0 || height == 0) - { - return; - } - // Only sync the read FBO mGLState.syncDirtyObject(GL_READ_FRAMEBUFFER); @@ -2931,32 +2924,6 @@ void Context::generateMipmap(GLenum target) handleError(texture->generateMipmap()); } -GLboolean Context::enableExtension(const char *name) -{ - const ExtensionInfoMap &extensionInfos = GetExtensionInfoMap(); - ASSERT(extensionInfos.find(name) != extensionInfos.end()); - const auto &extension = extensionInfos.at(name); - ASSERT(extension.Enableable); - - if (mExtensions.*(extension.ExtensionsMember)) - { - // Extension already enabled - return GL_TRUE; - } - - const auto &nativeExtensions = mImplementation->getNativeExtensions(); - if (!(nativeExtensions.*(extension.ExtensionsMember))) - { - // Underlying implementation does not support this valid extension - return GL_FALSE; - } - - mExtensions.*(extension.ExtensionsMember) = true; - updateCaps(); - initExtensionStrings(); - return GL_TRUE; -} - void Context::copyTextureCHROMIUM(GLuint sourceId, GLuint destId, GLint internalFormat, @@ -3003,21 +2970,19 @@ void Context::copySubTextureCHROMIUM(GLuint sourceId, unpackUnmultiplyAlpha == GL_TRUE, sourceTexture)); } -void Context::compressedCopyTextureCHROMIUM(GLuint sourceId, GLuint destId) -{ - syncStateForTexImage(); - - gl::Texture *sourceTexture = getTexture(sourceId); - gl::Texture *destTexture = getTexture(destId); - handleError(destTexture->copyCompressedTexture(sourceTexture)); -} - -void Context::getBufferPointerv(GLenum target, GLenum pname, void **params) +void Context::getBufferPointerv(GLenum target, GLenum /*pname*/, void **params) { Buffer *buffer = mGLState.getTargetBuffer(target); ASSERT(buffer); - QueryBufferPointerv(buffer, pname, params); + if (!buffer->isMapped()) + { + *params = nullptr; + } + else + { + *params = buffer->getMapPointer(); + } } GLvoid *Context::mapBuffer(GLenum target, GLenum access) @@ -3104,21 +3069,11 @@ void Context::blendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf a mGLState.setBlendColor(clamp01(red), clamp01(green), clamp01(blue), clamp01(alpha)); } -void Context::blendEquation(GLenum mode) -{ - mGLState.setBlendEquation(mode, mode); -} - void Context::blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) { mGLState.setBlendEquation(modeRGB, modeAlpha); } -void Context::blendFunc(GLenum sfactor, GLenum dfactor) -{ - mGLState.setBlendFactors(sfactor, dfactor, sfactor, dfactor); -} - void Context::blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { mGLState.setBlendFactors(srcRGB, dstRGB, srcAlpha, dstAlpha); @@ -3475,119 +3430,4 @@ void Context::popDebugGroup() mGLState.getDebug().popGroup(); } -void Context::bufferData(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) -{ - Buffer *buffer = mGLState.getTargetBuffer(target); - ASSERT(buffer); - handleError(buffer->bufferData(target, data, size, usage)); -} - -void Context::bufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data) -{ - if (data == nullptr) - { - return; - } - - Buffer *buffer = mGLState.getTargetBuffer(target); - ASSERT(buffer); - handleError(buffer->bufferSubData(target, data, size, offset)); -} - -void Context::attachShader(GLuint program, GLuint shader) -{ - auto programObject = mResourceManager->getProgram(program); - auto shaderObject = mResourceManager->getShader(shader); - ASSERT(programObject && shaderObject); - programObject->attachShader(shaderObject); -} - -const Workarounds &Context::getWorkarounds() const -{ - return mWorkarounds; -} - -void Context::copyBufferSubData(GLenum readTarget, - GLenum writeTarget, - GLintptr readOffset, - GLintptr writeOffset, - GLsizeiptr size) -{ - // if size is zero, the copy is a successful no-op - if (size == 0) - { - return; - } - - // TODO(jmadill): cache these. - Buffer *readBuffer = mGLState.getTargetBuffer(readTarget); - Buffer *writeBuffer = mGLState.getTargetBuffer(writeTarget); - - handleError(writeBuffer->copyBufferSubData(readBuffer, readOffset, writeOffset, size)); -} - -void Context::bindAttribLocation(GLuint program, GLuint index, const GLchar *name) -{ - Program *programObject = getProgram(program); - // TODO(jmadill): Re-use this from the validation if possible. - ASSERT(programObject); - programObject->bindAttributeLocation(index, name); -} - -void Context::bindBuffer(GLenum target, GLuint buffer) -{ - switch (target) - { - case GL_ARRAY_BUFFER: - bindArrayBuffer(buffer); - break; - case GL_ELEMENT_ARRAY_BUFFER: - bindElementArrayBuffer(buffer); - break; - case GL_COPY_READ_BUFFER: - bindCopyReadBuffer(buffer); - break; - case GL_COPY_WRITE_BUFFER: - bindCopyWriteBuffer(buffer); - break; - case GL_PIXEL_PACK_BUFFER: - bindPixelPackBuffer(buffer); - break; - case GL_PIXEL_UNPACK_BUFFER: - bindPixelUnpackBuffer(buffer); - break; - case GL_UNIFORM_BUFFER: - bindGenericUniformBuffer(buffer); - break; - case GL_TRANSFORM_FEEDBACK_BUFFER: - bindGenericTransformFeedbackBuffer(buffer); - break; - - default: - UNREACHABLE(); - break; - } -} - -void Context::bindFramebuffer(GLenum target, GLuint framebuffer) -{ - if (target == GL_READ_FRAMEBUFFER || target == GL_FRAMEBUFFER) - { - bindReadFramebuffer(framebuffer); - } - - if (target == GL_DRAW_FRAMEBUFFER || target == GL_FRAMEBUFFER) - { - bindDrawFramebuffer(framebuffer); - } -} - -void Context::bindRenderbuffer(GLenum target, GLuint renderbuffer) -{ - ASSERT(target == GL_RENDERBUFFER); - Renderbuffer *object = - mResourceManager->checkRenderbufferAllocation(mImplementation.get(), renderbuffer); - mGLState.setRenderbufferBinding(object); -} - } // namespace gl diff --git a/gfx/angle/src/libANGLE/Context.h b/gfx/angle/src/libANGLE/Context.h index 26c5d98e2..26182802f 100755 --- a/gfx/angle/src/libANGLE/Context.h +++ b/gfx/angle/src/libANGLE/Context.h @@ -22,7 +22,6 @@ #include "libANGLE/Error.h" #include "libANGLE/HandleAllocator.h" #include "libANGLE/VertexAttribute.h" -#include "libANGLE/Workarounds.h" #include "libANGLE/angletypes.h" namespace rx @@ -125,6 +124,7 @@ class Context final : public ValidationContext void bindTexture(GLenum target, GLuint handle); void bindReadFramebuffer(GLuint framebufferHandle); void bindDrawFramebuffer(GLuint framebufferHandle); + void bindRenderbuffer(GLuint renderbufferHandle); void bindVertexArray(GLuint vertexArrayHandle); void bindSampler(GLuint textureUnit, GLuint samplerHandle); void bindGenericUniformBuffer(GLuint bufferHandle); @@ -148,26 +148,25 @@ class Context final : public ValidationContext Error endQuery(GLenum target); Error queryCounter(GLuint id, GLenum target); void getQueryiv(GLenum target, GLenum pname, GLint *params); - void getQueryObjectiv(GLuint id, GLenum pname, GLint *params); - void getQueryObjectuiv(GLuint id, GLenum pname, GLuint *params); - void getQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params); - void getQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params); + Error getQueryObjectiv(GLuint id, GLenum pname, GLint *params); + Error getQueryObjectuiv(GLuint id, GLenum pname, GLuint *params); + Error getQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params); + Error getQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params); void setVertexAttribDivisor(GLuint index, GLuint divisor); void samplerParameteri(GLuint sampler, GLenum pname, GLint param); - void samplerParameteriv(GLuint sampler, GLenum pname, const GLint *param); void samplerParameterf(GLuint sampler, GLenum pname, GLfloat param); - void samplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param); - - void getSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params); - void getSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params); + GLint getSamplerParameteri(GLuint sampler, GLenum pname); + GLfloat getSamplerParameterf(GLuint sampler, GLenum pname); void programParameteri(GLuint program, GLenum pname, GLint value); Buffer *getBuffer(GLuint handle) const; FenceNV *getFenceNV(GLuint handle); FenceSync *getFenceSync(GLsync handle) const; + Shader *getShader(GLuint handle) const; + Program *getProgram(GLuint handle) const; Texture *getTexture(GLuint handle) const; Framebuffer *getFramebuffer(GLuint handle) const; Renderbuffer *getRenderbuffer(GLuint handle) const; @@ -206,9 +205,7 @@ class Context final : public ValidationContext void activeTexture(GLenum texture); void blendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); - void blendEquation(GLenum mode); void blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); - void blendFunc(GLenum sfactor, GLenum dfactor); void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); void clearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); void clearDepthf(GLclampf depth); @@ -481,12 +478,9 @@ class Context final : public ValidationContext GLboolean unpackFlipY, GLboolean unpackPremultiplyAlpha, GLboolean unpackUnmultiplyAlpha); - void compressedCopyTextureCHROMIUM(GLuint sourceId, GLuint destId); void generateMipmap(GLenum target); - GLboolean enableExtension(const char *name); - Error flush(); Error finish(); @@ -573,20 +567,6 @@ class Context final : public ValidationContext GLint components, const GLfloat *coeffs); - void bufferData(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); - void bufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); - void attachShader(GLuint program, GLuint shader); - void bindAttribLocation(GLuint program, GLuint index, const GLchar *name); - void bindBuffer(GLenum target, GLuint buffer); - void bindFramebuffer(GLenum target, GLuint framebuffer); - void bindRenderbuffer(GLenum target, GLuint renderbuffer); - - void copyBufferSubData(GLenum readTarget, - GLenum writeTarget, - GLintptr readOffset, - GLintptr writeOffset, - GLsizeiptr size); - void handleError(const Error &error) override; GLenum getError(); @@ -599,14 +579,13 @@ class Context final : public ValidationContext EGLenum getClientType() const; EGLenum getRenderBuffer() const; - const char *getRendererString() const; + const std::string &getRendererString() const; - const char *getExtensionString() const; - const char *getExtensionString(size_t idx) const; + const std::string &getExtensionString() const; + const std::string &getExtensionString(size_t idx) const; size_t getExtensionStringCount() const; rx::ContextImpl *getImplementation() const { return mImplementation.get(); } - const Workarounds &getWorkarounds() const; private: void syncRendererState(); @@ -630,9 +609,7 @@ class Context final : public ValidationContext void initRendererString(); void initExtensionStrings(); - void initCaps(bool webGLContext); - void updateCaps(); - void initWorkarounds(); + void initCaps(); LabeledObject *getLabeledObject(GLenum identifier, GLuint name) const; LabeledObject *getLabeledObjectFromPtr(const void *ptr) const; @@ -650,6 +627,9 @@ class Context final : public ValidationContext State mGLState; + int mClientMajorVersion; + int mClientMinorVersion; + const egl::Config *mConfig; EGLenum mClientType; @@ -670,9 +650,9 @@ class Context final : public ValidationContext ResourceMap mTransformFeedbackMap; HandleAllocator mTransformFeedbackAllocator; - const char *mRendererString; - const char *mExtensionString; - std::vector mExtensionStrings; + std::string mRendererString; + std::string mExtensionString; + std::vector mExtensionStrings; // Recorded errors typedef std::set ErrorSet; @@ -682,7 +662,6 @@ class Context final : public ValidationContext bool mHasBeenCurrent; bool mContextLost; GLenum mResetStatus; - bool mContextLostForced; GLenum mResetStrategy; bool mRobustAccess; egl::Surface *mCurrentSurface; @@ -697,8 +676,6 @@ class Context final : public ValidationContext State::DirtyObjects mClearDirtyObjects; State::DirtyBits mBlitDirtyBits; State::DirtyObjects mBlitDirtyObjects; - - Workarounds mWorkarounds; }; } // namespace gl diff --git a/gfx/angle/src/libANGLE/ContextState.cpp b/gfx/angle/src/libANGLE/ContextState.cpp index dbf867909..375893c72 100755 --- a/gfx/angle/src/libANGLE/ContextState.cpp +++ b/gfx/angle/src/libANGLE/ContextState.cpp @@ -15,23 +15,22 @@ namespace gl { ContextState::ContextState(uintptr_t contextIn, - const Version &clientVersion, + GLint clientMajorVersionIn, + GLint clientMinorVersionIn, State *stateIn, const Caps &capsIn, const TextureCapsMap &textureCapsIn, const Extensions &extensionsIn, const ResourceManager *resourceManagerIn, - const Limitations &limitationsIn, - const ResourceMap &framebufferMap) - : mClientVersion(clientVersion), + const Limitations &limitationsIn) + : mGLVersion(clientMajorVersionIn, clientMinorVersionIn), mContext(contextIn), mState(stateIn), mCaps(capsIn), mTextureCaps(textureCapsIn), mExtensions(extensionsIn), mResourceManager(resourceManagerIn), - mLimitations(limitationsIn), - mFramebufferMap(framebufferMap) + mLimitations(limitationsIn) { } @@ -44,24 +43,24 @@ const TextureCaps &ContextState::getTextureCap(GLenum internalFormat) const return mTextureCaps.get(internalFormat); } -ValidationContext::ValidationContext(const Version &clientVersion, +ValidationContext::ValidationContext(GLint clientMajorVersion, + GLint clientMinorVersion, State *state, const Caps &caps, const TextureCapsMap &textureCaps, const Extensions &extensions, const ResourceManager *resourceManager, const Limitations &limitations, - const ResourceMap &framebufferMap, bool skipValidation) : mState(reinterpret_cast(this), - clientVersion, + clientMajorVersion, + clientMinorVersion, state, caps, textureCaps, extensions, resourceManager, - limitations, - framebufferMap), + limitations), mSkipValidation(skipValidation) { } @@ -279,14 +278,6 @@ bool ValidationContext::getQueryParameterInfo(GLenum pname, GLenum *type, unsign *type = GL_INT; *numParams = 1; return true; - case GL_TEXTURE_BINDING_EXTERNAL_OES: - if (!getExtensions().eglStreamConsumerExternal && !getExtensions().eglImageExternal) - { - return false; - } - *type = GL_INT; - *numParams = 1; - return true; } if (getExtensions().debug) @@ -336,28 +327,6 @@ bool ValidationContext::getQueryParameterInfo(GLenum pname, GLenum *type, unsign } } - if (getExtensions().bindGeneratesResource) - { - switch (pname) - { - case GL_BIND_GENERATES_RESOURCE_CHROMIUM: - *type = GL_BOOL; - *numParams = 1; - return true; - } - } - - if (getExtensions().sRGBWriteControl) - { - switch (pname) - { - case GL_FRAMEBUFFER_SRGB_EXT: - *type = GL_BOOL; - *numParams = 1; - return true; - } - } - // Check for ES3.0+ parameter names which are also exposed as ES2 extensions switch (pname) { @@ -400,7 +369,9 @@ bool ValidationContext::getQueryParameterInfo(GLenum pname, GLenum *type, unsign return true; } - if (getClientVersion() < Version(3, 0)) + const GLVersion &glVersion = mState.getGLVersion(); + + if (!glVersion.isES3OrGreater()) { return false; } @@ -476,7 +447,7 @@ bool ValidationContext::getQueryParameterInfo(GLenum pname, GLenum *type, unsign } } - if (getClientVersion() < Version(3, 1)) + if (!glVersion.isES31()) { return false; } @@ -540,7 +511,9 @@ bool ValidationContext::getIndexedQueryParameterInfo(GLenum target, GLenum *type, unsigned int *numParams) { - if (getClientVersion() < Version(3, 0)) + + const GLVersion &glVersion = mState.getGLVersion(); + if (!glVersion.isES3OrGreater()) { return false; } @@ -565,7 +538,7 @@ bool ValidationContext::getIndexedQueryParameterInfo(GLenum target, } } - if (getClientVersion() < Version(3, 1)) + if (!glVersion.isES31()) { return false; } @@ -584,35 +557,4 @@ bool ValidationContext::getIndexedQueryParameterInfo(GLenum target, return false; } -Program *ValidationContext::getProgram(GLuint handle) const -{ - return mState.mResourceManager->getProgram(handle); -} - -Shader *ValidationContext::getShader(GLuint handle) const -{ - return mState.mResourceManager->getShader(handle); -} - -bool ValidationContext::isTextureGenerated(GLuint texture) const -{ - return mState.mResourceManager->isTextureGenerated(texture); -} - -bool ValidationContext::isBufferGenerated(GLuint buffer) const -{ - return mState.mResourceManager->isBufferGenerated(buffer); -} - -bool ValidationContext::isRenderbufferGenerated(GLuint renderbuffer) const -{ - return mState.mResourceManager->isRenderbufferGenerated(renderbuffer); -} - -bool ValidationContext::isFramebufferGenerated(GLuint framebuffer) const -{ - ASSERT(mState.mFramebufferMap.find(0) != mState.mFramebufferMap.end()); - return mState.mFramebufferMap.find(framebuffer) != mState.mFramebufferMap.end(); -} - } // namespace gl diff --git a/gfx/angle/src/libANGLE/ContextState.h b/gfx/angle/src/libANGLE/ContextState.h index 494c1a3da..ecb3759f4 100755 --- a/gfx/angle/src/libANGLE/ContextState.h +++ b/gfx/angle/src/libANGLE/ContextState.h @@ -11,35 +11,51 @@ #include "common/angleutils.h" #include "libANGLE/State.h" -#include "libANGLE/Version.h" namespace gl { class ValidationContext; class ContextState; -static constexpr Version ES_2_0 = Version(2, 0); -static constexpr Version ES_3_0 = Version(3, 0); -static constexpr Version ES_3_1 = Version(3, 1); +class GLVersion final : angle::NonCopyable +{ + public: + GLVersion(GLint clientMajorVersion, GLint clientMinorVersion) + : mClientMajorVersion(clientMajorVersion), mClientMinorVersion(clientMinorVersion) + { + } + + GLint getClientMajorVersion() const { return mClientMajorVersion; } + GLint getClientMinorVersion() const { return mClientMinorVersion; } + + bool isES2() const { return mClientMajorVersion == 2; } + bool isES3() const { return mClientMajorVersion == 3 && mClientMinorVersion == 0; } + bool isES31() const { return mClientMajorVersion == 3 && mClientMinorVersion == 1; } + bool isES3OrGreater() const { return mClientMajorVersion >= 3; } + + private: + GLint mClientMajorVersion; + GLint mClientMinorVersion; +}; class ContextState final : public angle::NonCopyable { public: ContextState(uintptr_t context, - const Version &clientVersion, + GLint clientMajorVersion, + GLint clientMinorVersion, State *state, const Caps &caps, const TextureCapsMap &textureCaps, const Extensions &extensions, const ResourceManager *resourceManager, - const Limitations &limitations, - const ResourceMap &framebufferMap); + const Limitations &limitations); ~ContextState(); uintptr_t getContext() const { return mContext; } - GLint getClientMajorVersion() const { return mClientVersion.major; } - GLint getClientMinorVersion() const { return mClientVersion.minor; } - const Version &getClientVersion() const { return mClientVersion; } + GLint getClientMajorVersion() const { return mGLVersion.getClientMajorVersion(); } + GLint getClientMinorVersion() const { return mGLVersion.getClientMinorVersion(); } + const GLVersion &getGLVersion() const { return mGLVersion; } const State &getState() const { return *mState; } const Caps &getCaps() const { return mCaps; } const TextureCapsMap &getTextureCaps() const { return mTextureCaps; } @@ -53,7 +69,7 @@ class ContextState final : public angle::NonCopyable friend class Context; friend class ValidationContext; - Version mClientVersion; + GLVersion mGLVersion; uintptr_t mContext; State *mState; const Caps &mCaps; @@ -61,29 +77,28 @@ class ContextState final : public angle::NonCopyable const Extensions &mExtensions; const ResourceManager *mResourceManager; const Limitations &mLimitations; - const ResourceMap &mFramebufferMap; }; class ValidationContext : angle::NonCopyable { public: - ValidationContext(const Version &clientVersion, + ValidationContext(GLint clientMajorVersion, + GLint clientMinorVersion, State *state, const Caps &caps, const TextureCapsMap &textureCaps, const Extensions &extensions, const ResourceManager *resourceManager, const Limitations &limitations, - const ResourceMap &framebufferMap, bool skipValidation); virtual ~ValidationContext() {} virtual void handleError(const Error &error) = 0; const ContextState &getContextState() const { return mState; } - GLint getClientMajorVersion() const { return mState.getClientMajorVersion(); } - GLint getClientMinorVersion() const { return mState.getClientMinorVersion(); } - const Version &getClientVersion() const { return mState.getClientVersion(); } + int getClientMajorVersion() const { return mState.getClientMajorVersion(); } + int getClientMinorVersion() const { return mState.getClientMinorVersion(); } + const GLVersion &getGLVersion() const { return mState.mGLVersion; } const State &getGLState() const { return mState.getState(); } const Caps &getCaps() const { return mState.getCaps(); } const TextureCapsMap &getTextureCaps() const { return mState.getTextureCaps(); } @@ -95,14 +110,6 @@ class ValidationContext : angle::NonCopyable bool getQueryParameterInfo(GLenum pname, GLenum *type, unsigned int *numParams); bool getIndexedQueryParameterInfo(GLenum target, GLenum *type, unsigned int *numParams); - Program *getProgram(GLuint handle) const; - Shader *getShader(GLuint handle) const; - - bool isTextureGenerated(GLuint texture) const; - bool isBufferGenerated(GLuint buffer) const; - bool isRenderbufferGenerated(GLuint renderbuffer) const; - bool isFramebufferGenerated(GLuint framebuffer) const; - protected: ContextState mState; bool mSkipValidation; diff --git a/gfx/angle/src/libANGLE/Display.cpp b/gfx/angle/src/libANGLE/Display.cpp index 39851f9f8..26bd0d28f 100755 --- a/gfx/angle/src/libANGLE/Display.cpp +++ b/gfx/angle/src/libANGLE/Display.cpp @@ -53,10 +53,6 @@ # endif #endif -#if defined(ANGLE_ENABLE_NULL) -#include "libANGLE/renderer/null/DisplayNULL.h" -#endif - namespace egl { @@ -213,12 +209,6 @@ rx::DisplayImpl *CreateDisplayFromAttribs(const AttributeMap &attribMap) break; #endif -#if defined(ANGLE_ENABLE_NULL) - case EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE: - impl = new rx::DisplayNULL(); - break; -#endif - default: UNREACHABLE(); break; @@ -587,11 +577,8 @@ Error Display::createPbufferSurface(const Config *configuration, const Attribute return egl::Error(EGL_SUCCESS); } -Error Display::createPbufferFromClientBuffer(const Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, - const AttributeMap &attribs, - Surface **outSurface) +Error Display::createPbufferFromClientBuffer(const Config *configuration, EGLClientBuffer shareHandle, + const AttributeMap &attribs, Surface **outSurface) { ASSERT(isInitialized()); @@ -601,7 +588,7 @@ Error Display::createPbufferFromClientBuffer(const Config *configuration, } std::unique_ptr surface( - new PbufferSurface(mImplementation, configuration, buftype, clientBuffer, attribs)); + new PbufferSurface(mImplementation, configuration, shareHandle, attribs)); ANGLE_TRY(surface->initialize()); ASSERT(outSurface != nullptr); @@ -758,6 +745,7 @@ void Display::destroySurface(Surface *surface) } ASSERT(surfaceRemoved); + UNUSED_ASSERTION_VARIABLE(surfaceRemoved); } mImplementation->destroySurface(surface); @@ -841,15 +829,14 @@ bool Display::isValidConfig(const Config *config) const return mConfigSet.contains(config); } -bool Display::isValidContext(const gl::Context *context) const +bool Display::isValidContext(gl::Context *context) const { - return mContextSet.find(const_cast(context)) != mContextSet.end(); + return mContextSet.find(context) != mContextSet.end(); } -bool Display::isValidSurface(const Surface *surface) const +bool Display::isValidSurface(Surface *surface) const { - return mImplementation->getSurfaceSet().find(const_cast(surface)) != - mImplementation->getSurfaceSet().end(); + return mImplementation->getSurfaceSet().find(surface) != mImplementation->getSurfaceSet().end(); } bool Display::isValidImage(const Image *image) const @@ -887,10 +874,6 @@ static ClientExtensions GenerateClientExtensions() extensions.platformANGLEOpenGL = true; #endif -#if defined(ANGLE_ENABLE_NULL) - extensions.platformANGLENULL = true; -#endif - #if defined(ANGLE_ENABLE_D3D11) extensions.deviceCreation = true; extensions.deviceCreationD3D11 = true; @@ -935,8 +918,6 @@ void Display::initDisplayExtensions() // Some extensions are always available because they are implemented in the EGL layer. mDisplayExtensions.createContext = true; mDisplayExtensions.createContextNoError = true; - mDisplayExtensions.createContextWebGLCompatibility = true; - mDisplayExtensions.createContextBindGeneratesResource = true; // Force EGL_KHR_get_all_proc_addresses on. mDisplayExtensions.getAllProcAddresses = true; @@ -949,14 +930,6 @@ bool Display::isValidNativeWindow(EGLNativeWindowType window) const return mImplementation->isValidNativeWindow(window); } -Error Display::validateClientBuffer(const Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, - const AttributeMap &attribs) -{ - return mImplementation->validateClientBuffer(configuration, buftype, clientBuffer, attribs); -} - bool Display::isValidDisplay(const egl::Display *display) { const ANGLEPlatformDisplayMap *anglePlatformDisplayMap = GetANGLEPlatformDisplayMap(); diff --git a/gfx/angle/src/libANGLE/Display.h b/gfx/angle/src/libANGLE/Display.h index 15754ac37..c0dafb90f 100755 --- a/gfx/angle/src/libANGLE/Display.h +++ b/gfx/angle/src/libANGLE/Display.h @@ -57,10 +57,7 @@ class Display final : angle::NonCopyable Error createWindowSurface(const Config *configuration, EGLNativeWindowType window, const AttributeMap &attribs, Surface **outSurface); Error createPbufferSurface(const Config *configuration, const AttributeMap &attribs, Surface **outSurface); - Error createPbufferFromClientBuffer(const Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, - const AttributeMap &attribs, + Error createPbufferFromClientBuffer(const Config *configuration, EGLClientBuffer shareHandle, const AttributeMap &attribs, Surface **outSurface); Error createPixmapSurface(const Config *configuration, NativePixmapType nativePixmap, const AttributeMap &attribs, Surface **outSurface); @@ -85,17 +82,12 @@ class Display final : angle::NonCopyable bool isInitialized() const; bool isValidConfig(const Config *config) const; - bool isValidContext(const gl::Context *context) const; - bool isValidSurface(const egl::Surface *surface) const; + bool isValidContext(gl::Context *context) const; + bool isValidSurface(egl::Surface *surface) const; bool isValidImage(const Image *image) const; bool isValidStream(const Stream *stream) const; bool isValidNativeWindow(EGLNativeWindowType window) const; - Error validateClientBuffer(const Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, - const AttributeMap &attribs); - static bool isValidDisplay(const egl::Display *display); static bool isValidNativeDisplay(EGLNativeDisplayType display); static bool hasExistingWindowSurface(EGLNativeWindowType window); diff --git a/gfx/angle/src/libANGLE/HandleAllocator.cpp b/gfx/angle/src/libANGLE/HandleAllocator.cpp index c090b3dfc..4815855d5 100755 --- a/gfx/angle/src/libANGLE/HandleAllocator.cpp +++ b/gfx/angle/src/libANGLE/HandleAllocator.cpp @@ -63,14 +63,11 @@ GLuint HandleAllocator::allocate() GLuint freeListHandle = listIt->begin; ASSERT(freeListHandle > 0); + listIt->begin++; if (listIt->begin == listIt->end) { mUnallocatedList.erase(listIt); } - else - { - listIt->begin++; - } return freeListHandle; } @@ -104,7 +101,7 @@ void HandleAllocator::reserve(GLuint handle) if (handle == begin || handle == end) { - if (begin == end) + if (begin + 1 == end) { mUnallocatedList.erase(boundIt); } @@ -120,12 +117,18 @@ void HandleAllocator::reserve(GLuint handle) return; } - ASSERT(begin < handle && handle < end); - // need to split the range auto placementIt = mUnallocatedList.erase(boundIt); - placementIt = mUnallocatedList.insert(placementIt, HandleRange(handle + 1, end)); - mUnallocatedList.insert(placementIt, HandleRange(begin, handle - 1)); + + if (handle + 1 != end) + { + placementIt = mUnallocatedList.insert(placementIt, HandleRange(handle + 1, end)); + } + if (begin != handle) + { + ASSERT(begin < handle); + mUnallocatedList.insert(placementIt, HandleRange(begin, handle)); + } } } // namespace gl diff --git a/gfx/angle/src/libANGLE/HandleAllocator.h b/gfx/angle/src/libANGLE/HandleAllocator.h index c7e0a0d85..1888d57cf 100755 --- a/gfx/angle/src/libANGLE/HandleAllocator.h +++ b/gfx/angle/src/libANGLE/HandleAllocator.h @@ -41,7 +41,6 @@ class HandleAllocator final : angle::NonCopyable typedef std::vector HandleList; HandleList mFreeValues; - // Represents an inclusive range [begin, end] struct HandleRange { HandleRange(GLuint beginIn, GLuint endIn) : begin(beginIn), end(endIn) {} diff --git a/gfx/angle/src/libANGLE/HandleAllocator_unittest.cpp b/gfx/angle/src/libANGLE/HandleAllocator_unittest.cpp index bfcbd8f01..726b64bab 100755 --- a/gfx/angle/src/libANGLE/HandleAllocator_unittest.cpp +++ b/gfx/angle/src/libANGLE/HandleAllocator_unittest.cpp @@ -90,7 +90,8 @@ TEST(HandleAllocatorTest, Reallocation) EXPECT_EQ(finalResult, 1); } -// The following test covers reserving a handle with max uint value. See http://anglebug.com/1052 +// The following test covers reserving a handle with max uint value. +// See http://anglebug.com/1052 TEST(HandleAllocatorTest, ReserveMaxUintHandle) { gl::HandleAllocator allocator; @@ -102,19 +103,6 @@ TEST(HandleAllocatorTest, ReserveMaxUintHandle) EXPECT_EQ(1u, normalHandle); } -// The following test covers reserving a handle with max uint value minus one then max uint value. -TEST(HandleAllocatorTest, ReserveMaxUintHandle2) -{ - gl::HandleAllocator allocator; - - GLuint maxUintHandle = std::numeric_limits::max(); - allocator.reserve(maxUintHandle - 1); - allocator.reserve(maxUintHandle); - - GLuint normalHandle = allocator.allocate(); - EXPECT_EQ(1u, normalHandle); -} - // To test if the allocator keep the handle in a sorted order. TEST(HandleAllocatorTest, SortedOrderHandle) { diff --git a/gfx/angle/src/libANGLE/HandleRangeAllocator.cpp b/gfx/angle/src/libANGLE/HandleRangeAllocator.cpp index 500a79629..f219f954f 100755 --- a/gfx/angle/src/libANGLE/HandleRangeAllocator.cpp +++ b/gfx/angle/src/libANGLE/HandleRangeAllocator.cpp @@ -49,6 +49,7 @@ GLuint HandleRangeAllocator::allocateAtOrAbove(GLuint wanted) } GLuint firstId = current->first; + UNUSED_ASSERTION_VARIABLE(firstId); GLuint lastId = current->second; ASSERT(wanted >= firstId); diff --git a/gfx/angle/src/libANGLE/ImageIndex.cpp b/gfx/angle/src/libANGLE/ImageIndex.cpp index f74ce19d9..38c1941a3 100755 --- a/gfx/angle/src/libANGLE/ImageIndex.cpp +++ b/gfx/angle/src/libANGLE/ImageIndex.cpp @@ -135,12 +135,7 @@ ImageIndexIterator::ImageIndexIterator(GLenum type, const Range &mipRange GLint ImageIndexIterator::maxLayer() const { - if (mLayerCounts) - { - ASSERT(mCurrentMip >= 0); - return (mCurrentMip < mMipRange.end) ? mLayerCounts[mCurrentMip] : 0; - } - return mLayerRange.end; + return (mLayerCounts ? static_cast(mLayerCounts[mCurrentMip]) : mLayerRange.end); } ImageIndex ImageIndexIterator::next() @@ -154,29 +149,21 @@ ImageIndex ImageIndexIterator::next() if (mCurrentLayer != ImageIndex::ENTIRE_LEVEL) { - if (mCurrentLayer < maxLayer() - 1) + if (mCurrentLayer < maxLayer()-1) { mCurrentLayer++; } - else if (mCurrentMip < mMipRange.end - 1) + else if (mCurrentMip < mMipRange.end-1) { mCurrentMip++; mCurrentLayer = mLayerRange.start; } - else - { - done(); - } } - else if (mCurrentMip < mMipRange.end - 1) + else if (mCurrentMip < mMipRange.end-1) { mCurrentMip++; mCurrentLayer = mLayerRange.start; } - else - { - done(); - } return value; } @@ -198,10 +185,4 @@ bool ImageIndexIterator::hasNext() const return (mCurrentMip < mMipRange.end || mCurrentLayer < maxLayer()); } -void ImageIndexIterator::done() -{ - mCurrentMip = mMipRange.end; - mCurrentLayer = maxLayer(); } - -} // namespace gl diff --git a/gfx/angle/src/libANGLE/ImageIndex.h b/gfx/angle/src/libANGLE/ImageIndex.h index 5961f0cb0..52ac40c45 100755 --- a/gfx/angle/src/libANGLE/ImageIndex.h +++ b/gfx/angle/src/libANGLE/ImageIndex.h @@ -68,7 +68,6 @@ class ImageIndexIterator const Range &layerRange, const GLsizei *layerCounts); GLint maxLayer() const; - void done(); GLenum mType; Range mMipRange; diff --git a/gfx/angle/src/libANGLE/ImageIndexIterator_unittest.cpp b/gfx/angle/src/libANGLE/ImageIndexIterator_unittest.cpp index 2f97e8eba..2dc0b2ab7 100755 --- a/gfx/angle/src/libANGLE/ImageIndexIterator_unittest.cpp +++ b/gfx/angle/src/libANGLE/ImageIndexIterator_unittest.cpp @@ -41,8 +41,6 @@ TEST(ImageIndexTest, Iterator2D) EXPECT_EQ(current.mipIndex, nextIndex.mipIndex); EXPECT_EQ(current.layerIndex, nextIndex.layerIndex); } - - EXPECT_FALSE(iter.hasNext()); } TEST(ImageIndexTest, IteratorCube) @@ -66,8 +64,6 @@ TEST(ImageIndexTest, IteratorCube) EXPECT_TRUE(nextIndex.hasLayer()); } } - - EXPECT_FALSE(iter.hasNext()); } TEST(ImageIndexTest, Iterator3D) @@ -89,8 +85,6 @@ TEST(ImageIndexTest, Iterator3D) EXPECT_TRUE(nextIndex.hasLayer()); } } - - EXPECT_FALSE(iter.hasNext()); } TEST(ImageIndexTest, Iterator2DArray) @@ -115,8 +109,6 @@ TEST(ImageIndexTest, Iterator2DArray) EXPECT_TRUE(nextIndex.hasLayer()); } } - - EXPECT_FALSE(iter.hasNext()); } } // namespace diff --git a/gfx/angle/src/libANGLE/Path.h b/gfx/angle/src/libANGLE/Path.h index b103c8460..40e2cf289 100755 --- a/gfx/angle/src/libANGLE/Path.h +++ b/gfx/angle/src/libANGLE/Path.h @@ -49,7 +49,9 @@ class Path final : angle::NonCopyable bool hasPathData() const { return mHasData; } - rx::PathImpl *getImplementation() const { return mPath; } + const rx::PathImpl *getImplementation() const { return mPath; } + + rx::PathImpl *getImplementation() { return mPath; } private: rx::PathImpl *mPath; diff --git a/gfx/angle/src/libANGLE/Program.cpp b/gfx/angle/src/libANGLE/Program.cpp index 06d8d1534..7f4226da1 100755 --- a/gfx/angle/src/libANGLE/Program.cpp +++ b/gfx/angle/src/libANGLE/Program.cpp @@ -377,27 +377,39 @@ const std::string &Program::getLabel() const return mState.mLabel; } -void Program::attachShader(Shader *shader) +bool Program::attachShader(Shader *shader) { switch (shader->getType()) { case GL_VERTEX_SHADER: { - ASSERT(!mState.mAttachedVertexShader); + if (mState.mAttachedVertexShader) + { + return false; + } + mState.mAttachedVertexShader = shader; mState.mAttachedVertexShader->addRef(); break; } case GL_FRAGMENT_SHADER: { - ASSERT(!mState.mAttachedFragmentShader); + if (mState.mAttachedFragmentShader) + { + return false; + } + mState.mAttachedFragmentShader = shader; mState.mAttachedFragmentShader->addRef(); break; } case GL_COMPUTE_SHADER: { - ASSERT(!mState.mAttachedComputeShader); + if (mState.mAttachedComputeShader) + { + return false; + } + mState.mAttachedComputeShader = shader; mState.mAttachedComputeShader->addRef(); break; @@ -405,6 +417,8 @@ void Program::attachShader(Shader *shader) default: UNREACHABLE(); } + + return true; } bool Program::detachShader(Shader *shader) @@ -509,7 +523,7 @@ BindingInfo Program::getFragmentInputBindingInfo(GLint index) const if (arrayIndex == GL_INVALID_INDEX) arrayIndex = 0; - ret.name = in.mappedName + "[" + ToString(arrayIndex) + "]"; + ret.name = in.mappedName + "[" + std::to_string(arrayIndex) + "]"; } else { @@ -597,10 +611,11 @@ Error Program::link(const ContextState &data) return NoError(); } - ANGLE_TRY_RESULT(mProgram->link(data, mInfoLog), mLinked); - if (!mLinked) + rx::LinkResult result = mProgram->link(data, mInfoLog); + + if (result.error.isError() || !result.linkSuccess) { - return NoError(); + return result.error; } } else @@ -653,10 +668,10 @@ Error Program::link(const ContextState &data) linkOutputVariables(); - ANGLE_TRY_RESULT(mProgram->link(data, mInfoLog), mLinked); - if (!mLinked) + rx::LinkResult result = mProgram->link(data, mInfoLog); + if (result.error.isError() || !result.linkSuccess) { - return NoError(); + return result.error; } gatherTransformFeedbackVaryings(mergedVaryings); @@ -664,6 +679,7 @@ Error Program::link(const ContextState &data) gatherInterfaceBlockInfo(); + mLinked = true; return NoError(); } @@ -843,9 +859,14 @@ Error Program::loadBinary(GLenum binaryFormat, const void *binary, GLsizei lengt stream.readInt(&mSamplerUniformRange.start); stream.readInt(&mSamplerUniformRange.end); - ANGLE_TRY_RESULT(mProgram->load(mInfoLog, &stream), mLinked); + rx::LinkResult result = mProgram->load(mInfoLog, &stream); + if (result.error.isError() || !result.linkSuccess) + { + return result.error; + } - return NoError(); + mLinked = true; + return Error(GL_NO_ERROR); #endif // #if ANGLE_PROGRAM_BINARY_LOAD == ANGLE_ENABLED } @@ -1336,128 +1357,128 @@ GLuint Program::getUniformIndex(const std::string &name) const void Program::setUniform1fv(GLint location, GLsizei count, const GLfloat *v) { - GLsizei clampedCount = setUniformInternal(location, count, 1, v); - mProgram->setUniform1fv(location, clampedCount, v); + setUniformInternal(location, count * 1, v); + mProgram->setUniform1fv(location, count, v); } void Program::setUniform2fv(GLint location, GLsizei count, const GLfloat *v) { - GLsizei clampedCount = setUniformInternal(location, count, 2, v); - mProgram->setUniform2fv(location, clampedCount, v); + setUniformInternal(location, count * 2, v); + mProgram->setUniform2fv(location, count, v); } void Program::setUniform3fv(GLint location, GLsizei count, const GLfloat *v) { - GLsizei clampedCount = setUniformInternal(location, count, 3, v); - mProgram->setUniform3fv(location, clampedCount, v); + setUniformInternal(location, count * 3, v); + mProgram->setUniform3fv(location, count, v); } void Program::setUniform4fv(GLint location, GLsizei count, const GLfloat *v) { - GLsizei clampedCount = setUniformInternal(location, count, 4, v); - mProgram->setUniform4fv(location, clampedCount, v); + setUniformInternal(location, count * 4, v); + mProgram->setUniform4fv(location, count, v); } void Program::setUniform1iv(GLint location, GLsizei count, const GLint *v) { - GLsizei clampedCount = setUniformInternal(location, count, 1, v); - mProgram->setUniform1iv(location, clampedCount, v); + setUniformInternal(location, count * 1, v); + mProgram->setUniform1iv(location, count, v); } void Program::setUniform2iv(GLint location, GLsizei count, const GLint *v) { - GLsizei clampedCount = setUniformInternal(location, count, 2, v); - mProgram->setUniform2iv(location, clampedCount, v); + setUniformInternal(location, count * 2, v); + mProgram->setUniform2iv(location, count, v); } void Program::setUniform3iv(GLint location, GLsizei count, const GLint *v) { - GLsizei clampedCount = setUniformInternal(location, count, 3, v); - mProgram->setUniform3iv(location, clampedCount, v); + setUniformInternal(location, count * 3, v); + mProgram->setUniform3iv(location, count, v); } void Program::setUniform4iv(GLint location, GLsizei count, const GLint *v) { - GLsizei clampedCount = setUniformInternal(location, count, 4, v); - mProgram->setUniform4iv(location, clampedCount, v); + setUniformInternal(location, count * 4, v); + mProgram->setUniform4iv(location, count, v); } void Program::setUniform1uiv(GLint location, GLsizei count, const GLuint *v) { - GLsizei clampedCount = setUniformInternal(location, count, 1, v); - mProgram->setUniform1uiv(location, clampedCount, v); + setUniformInternal(location, count * 1, v); + mProgram->setUniform1uiv(location, count, v); } void Program::setUniform2uiv(GLint location, GLsizei count, const GLuint *v) { - GLsizei clampedCount = setUniformInternal(location, count, 2, v); - mProgram->setUniform2uiv(location, clampedCount, v); + setUniformInternal(location, count * 2, v); + mProgram->setUniform2uiv(location, count, v); } void Program::setUniform3uiv(GLint location, GLsizei count, const GLuint *v) { - GLsizei clampedCount = setUniformInternal(location, count, 3, v); - mProgram->setUniform3uiv(location, clampedCount, v); + setUniformInternal(location, count * 3, v); + mProgram->setUniform3uiv(location, count, v); } void Program::setUniform4uiv(GLint location, GLsizei count, const GLuint *v) { - GLsizei clampedCount = setUniformInternal(location, count, 4, v); - mProgram->setUniform4uiv(location, clampedCount, v); + setUniformInternal(location, count * 4, v); + mProgram->setUniform4uiv(location, count, v); } void Program::setUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *v) { - GLsizei clampedCount = setMatrixUniformInternal<2, 2>(location, count, transpose, v); - mProgram->setUniformMatrix2fv(location, clampedCount, transpose, v); + setMatrixUniformInternal<2, 2>(location, count, transpose, v); + mProgram->setUniformMatrix2fv(location, count, transpose, v); } void Program::setUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *v) { - GLsizei clampedCount = setMatrixUniformInternal<3, 3>(location, count, transpose, v); - mProgram->setUniformMatrix3fv(location, clampedCount, transpose, v); + setMatrixUniformInternal<3, 3>(location, count, transpose, v); + mProgram->setUniformMatrix3fv(location, count, transpose, v); } void Program::setUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *v) { - GLsizei clampedCount = setMatrixUniformInternal<4, 4>(location, count, transpose, v); - mProgram->setUniformMatrix4fv(location, clampedCount, transpose, v); + setMatrixUniformInternal<4, 4>(location, count, transpose, v); + mProgram->setUniformMatrix4fv(location, count, transpose, v); } void Program::setUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *v) { - GLsizei clampedCount = setMatrixUniformInternal<2, 3>(location, count, transpose, v); - mProgram->setUniformMatrix2x3fv(location, clampedCount, transpose, v); + setMatrixUniformInternal<2, 3>(location, count, transpose, v); + mProgram->setUniformMatrix2x3fv(location, count, transpose, v); } void Program::setUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *v) { - GLsizei clampedCount = setMatrixUniformInternal<2, 4>(location, count, transpose, v); - mProgram->setUniformMatrix2x4fv(location, clampedCount, transpose, v); + setMatrixUniformInternal<2, 4>(location, count, transpose, v); + mProgram->setUniformMatrix2x4fv(location, count, transpose, v); } void Program::setUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *v) { - GLsizei clampedCount = setMatrixUniformInternal<3, 2>(location, count, transpose, v); - mProgram->setUniformMatrix3x2fv(location, clampedCount, transpose, v); + setMatrixUniformInternal<3, 2>(location, count, transpose, v); + mProgram->setUniformMatrix3x2fv(location, count, transpose, v); } void Program::setUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *v) { - GLsizei clampedCount = setMatrixUniformInternal<3, 4>(location, count, transpose, v); - mProgram->setUniformMatrix3x4fv(location, clampedCount, transpose, v); + setMatrixUniformInternal<3, 4>(location, count, transpose, v); + mProgram->setUniformMatrix3x4fv(location, count, transpose, v); } void Program::setUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *v) { - GLsizei clampedCount = setMatrixUniformInternal<4, 2>(location, count, transpose, v); - mProgram->setUniformMatrix4x2fv(location, clampedCount, transpose, v); + setMatrixUniformInternal<4, 2>(location, count, transpose, v); + mProgram->setUniformMatrix4x2fv(location, count, transpose, v); } void Program::setUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *v) { - GLsizei clampedCount = setMatrixUniformInternal<4, 3>(location, count, transpose, v); - mProgram->setUniformMatrix4x3fv(location, clampedCount, transpose, v); + setMatrixUniformInternal<4, 3>(location, count, transpose, v); + mProgram->setUniformMatrix4x3fv(location, count, transpose, v); } void Program::getUniformfv(GLint location, GLfloat *v) const @@ -1612,6 +1633,44 @@ void Program::getActiveUniformBlockName(GLuint uniformBlockIndex, GLsizei bufSiz } } +void Program::getActiveUniformBlockiv(GLuint uniformBlockIndex, GLenum pname, GLint *params) const +{ + ASSERT( + uniformBlockIndex < + mState.mUniformBlocks.size()); // index must be smaller than getActiveUniformBlockCount() + + const UniformBlock &uniformBlock = mState.mUniformBlocks[uniformBlockIndex]; + + switch (pname) + { + case GL_UNIFORM_BLOCK_DATA_SIZE: + *params = static_cast(uniformBlock.dataSize); + break; + case GL_UNIFORM_BLOCK_NAME_LENGTH: + *params = + static_cast(uniformBlock.name.size() + 1 + (uniformBlock.isArray ? 3 : 0)); + break; + case GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS: + *params = static_cast(uniformBlock.memberUniformIndexes.size()); + break; + case GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: + { + for (unsigned int blockMemberIndex = 0; blockMemberIndex < uniformBlock.memberUniformIndexes.size(); blockMemberIndex++) + { + params[blockMemberIndex] = static_cast(uniformBlock.memberUniformIndexes[blockMemberIndex]); + } + } + break; + case GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: + *params = static_cast(uniformBlock.vertexStaticUse); + break; + case GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: + *params = static_cast(uniformBlock.fragmentStaticUse); + break; + default: UNREACHABLE(); + } +} + GLint Program::getActiveUniformBlockMaxLength() const { int maxLength = 0; @@ -2401,6 +2460,7 @@ bool Program::linkValidateTransformFeedback(InfoLog &infoLog, // All transform feedback varyings are expected to exist since packVaryings checks for them. ASSERT(found); + UNUSED_ASSERTION_VARIABLE(found); } if (mState.mTransformFeedbackBufferMode == GL_INTERLEAVED_ATTRIBS && @@ -2751,13 +2811,7 @@ void Program::defineUniformBlock(const sh::InterfaceBlock &interfaceBlock, GLenu size_t blockSize = 0; // Don't define this block at all if it's not active in the implementation. - std::stringstream blockNameStr; - blockNameStr << interfaceBlock.name; - if (interfaceBlock.arraySize > 0) - { - blockNameStr << "[0]"; - } - if (!mProgram->getUniformBlockSize(blockNameStr.str(), &blockSize)) + if (!mProgram->getUniformBlockSize(interfaceBlock.name, &blockSize)) { return; } @@ -2803,10 +2857,15 @@ void Program::defineUniformBlock(const sh::InterfaceBlock &interfaceBlock, GLenu UNREACHABLE(); } - // Since all block elements in an array share the same active uniforms, they will all be - // active once any uniform member is used. So, since interfaceBlock.name[0] was active, - // here we will add every block element in the array. - block.dataSize = static_cast(blockSize); + // TODO(jmadill): Determine if we can ever have an inactive array element block. + size_t blockElementSize = 0; + if (!mProgram->getUniformBlockSize(block.nameWithArrayIndex(), &blockElementSize)) + { + continue; + } + + ASSERT(blockElementSize == blockSize); + block.dataSize = static_cast(blockElementSize); mState.mUniformBlocks.push_back(block); } } @@ -2842,32 +2901,18 @@ void Program::defineUniformBlock(const sh::InterfaceBlock &interfaceBlock, GLenu } template -GLsizei Program::setUniformInternal(GLint location, GLsizei countIn, int vectorSize, const T *v) +void Program::setUniformInternal(GLint location, GLsizei count, const T *v) { const VariableLocation &locationInfo = mState.mUniformLocations[location]; LinkedUniform *linkedUniform = &mState.mUniforms[locationInfo.index]; uint8_t *destPointer = linkedUniform->getDataPtrToElement(locationInfo.element); - // OpenGL ES 3.0.4 spec pg 67: "Values for any array element that exceeds the highest array - // element index used, as reported by GetActiveUniform, will be ignored by the GL." - unsigned int remainingElements = linkedUniform->elementCount() - locationInfo.element; - GLsizei maxElementCount = - static_cast(remainingElements * linkedUniform->getElementComponents()); - - GLsizei count = countIn; - GLsizei clampedCount = count * vectorSize; - if (clampedCount > maxElementCount) - { - clampedCount = maxElementCount; - count = maxElementCount / vectorSize; - } - if (VariableComponentType(linkedUniform->type) == GL_BOOL) { // Do a cast conversion for boolean types. From the spec: // "The uniform is set to FALSE if the input value is 0 or 0.0f, and set to TRUE otherwise." GLint *destAsInt = reinterpret_cast(destPointer); - for (GLsizei component = 0; component < clampedCount; ++component) + for (GLsizei component = 0; component < count; ++component) { destAsInt[component] = (v[component] != static_cast(0) ? GL_TRUE : GL_FALSE); } @@ -2875,39 +2920,32 @@ GLsizei Program::setUniformInternal(GLint location, GLsizei countIn, int vectorS else { // Invalide the validation cache if we modify the sampler data. - if (linkedUniform->isSampler() && memcmp(destPointer, v, sizeof(T) * clampedCount) != 0) + if (linkedUniform->isSampler() && memcmp(destPointer, v, sizeof(T) * count) != 0) { mCachedValidateSamplersResult.reset(); } - memcpy(destPointer, v, sizeof(T) * clampedCount); + memcpy(destPointer, v, sizeof(T) * count); } - - return count; } template -GLsizei Program::setMatrixUniformInternal(GLint location, - GLsizei count, - GLboolean transpose, - const T *v) +void Program::setMatrixUniformInternal(GLint location, + GLsizei count, + GLboolean transpose, + const T *v) { if (!transpose) { - return setUniformInternal(location, count, cols * rows, v); + setUniformInternal(location, count * cols * rows, v); + return; } // Perform a transposing copy. const VariableLocation &locationInfo = mState.mUniformLocations[location]; LinkedUniform *linkedUniform = &mState.mUniforms[locationInfo.index]; T *destPtr = reinterpret_cast(linkedUniform->getDataPtrToElement(locationInfo.element)); - - // OpenGL ES 3.0.4 spec pg 67: "Values for any array element that exceeds the highest array - // element index used, as reported by GetActiveUniform, will be ignored by the GL." - unsigned int remainingElements = linkedUniform->elementCount() - locationInfo.element; - GLsizei clampedCount = std::min(count, static_cast(remainingElements)); - - for (GLsizei element = 0; element < clampedCount; ++element) + for (GLsizei element = 0; element < count; ++element) { size_t elementOffset = element * rows * cols; @@ -2919,8 +2957,6 @@ GLsizei Program::setMatrixUniformInternal(GLint location, } } } - - return clampedCount; } template diff --git a/gfx/angle/src/libANGLE/Program.h b/gfx/angle/src/libANGLE/Program.h index 18bec495f..03212a5cd 100755 --- a/gfx/angle/src/libANGLE/Program.h +++ b/gfx/angle/src/libANGLE/Program.h @@ -241,16 +241,13 @@ class Program final : angle::NonCopyable, public LabeledObject void setLabel(const std::string &label) override; const std::string &getLabel() const override; - rx::ProgramImpl *getImplementation() const { return mProgram; } + rx::ProgramImpl *getImplementation() { return mProgram; } + const rx::ProgramImpl *getImplementation() const { return mProgram; } - void attachShader(Shader *shader); + bool attachShader(Shader *shader); bool detachShader(Shader *shader); int getAttachedShadersCount() const; - const Shader *getAttachedVertexShader() const { return mState.mAttachedVertexShader; } - const Shader *getAttachedFragmentShader() const { return mState.mAttachedFragmentShader; } - const Shader *getAttachedComputeShader() const { return mState.mAttachedComputeShader; } - void bindAttributeLocation(GLuint index, const char *name); void bindUniformLocation(GLuint index, const char *name); @@ -327,6 +324,7 @@ class Program final : angle::NonCopyable, public LabeledObject void getUniformuiv(GLint location, GLuint *params) const; void getActiveUniformBlockName(GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName) const; + void getActiveUniformBlockiv(GLuint uniformBlockIndex, GLenum pname, GLint *params) const; GLuint getActiveUniformBlockCount() const; GLint getActiveUniformBlockMaxLength() const; @@ -460,15 +458,11 @@ class Program final : angle::NonCopyable, public LabeledObject void defineUniformBlock(const sh::InterfaceBlock &interfaceBlock, GLenum shaderType); - // Both these function update the cached uniform values and return a modified "count" - // so that the uniform update doesn't overflow the uniform. template - GLsizei setUniformInternal(GLint location, GLsizei count, int vectorSize, const T *v); + void setUniformInternal(GLint location, GLsizei count, const T *v); + template - GLsizei setMatrixUniformInternal(GLint location, - GLsizei count, - GLboolean transpose, - const T *v); + void setMatrixUniformInternal(GLint location, GLsizei count, GLboolean transpose, const T *v); template void getUniformInternal(GLint location, DestT *dataOut) const; diff --git a/gfx/angle/src/libANGLE/Renderbuffer.cpp b/gfx/angle/src/libANGLE/Renderbuffer.cpp index 7b30a46be..977117d24 100755 --- a/gfx/angle/src/libANGLE/Renderbuffer.cpp +++ b/gfx/angle/src/libANGLE/Renderbuffer.cpp @@ -95,12 +95,17 @@ Error Renderbuffer::setStorageEGLImageTarget(egl::Image *image) return NoError(); } -rx::RenderbufferImpl *Renderbuffer::getImplementation() const +rx::RenderbufferImpl *Renderbuffer::getImplementation() { ASSERT(mRenderbuffer); return mRenderbuffer; } +const rx::RenderbufferImpl *Renderbuffer::getImplementation() const +{ + return mRenderbuffer; +} + GLsizei Renderbuffer::getWidth() const { return mWidth; diff --git a/gfx/angle/src/libANGLE/Renderbuffer.h b/gfx/angle/src/libANGLE/Renderbuffer.h index 57cc08279..eceda70bc 100755 --- a/gfx/angle/src/libANGLE/Renderbuffer.h +++ b/gfx/angle/src/libANGLE/Renderbuffer.h @@ -42,7 +42,8 @@ class Renderbuffer final : public egl::ImageSibling, Error setStorageMultisample(size_t samples, GLenum internalformat, size_t width, size_t height); Error setStorageEGLImageTarget(egl::Image *imageTarget); - rx::RenderbufferImpl *getImplementation() const; + rx::RenderbufferImpl *getImplementation(); + const rx::RenderbufferImpl *getImplementation() const; GLsizei getWidth() const; GLsizei getHeight() const; diff --git a/gfx/angle/src/libANGLE/ResourceManager.cpp b/gfx/angle/src/libANGLE/ResourceManager.cpp index cfb965d92..3fdfe47d9 100755 --- a/gfx/angle/src/libANGLE/ResourceManager.cpp +++ b/gfx/angle/src/libANGLE/ResourceManager.cpp @@ -309,7 +309,7 @@ Buffer *ResourceManager::getBuffer(unsigned int handle) } } -Shader *ResourceManager::getShader(unsigned int handle) const +Shader *ResourceManager::getShader(unsigned int handle) { auto shader = mShaderMap.find(handle); @@ -438,7 +438,7 @@ Buffer *ResourceManager::checkBufferAllocation(rx::GLImplFactory *factory, GLuin return bufferMapIt->second; } - Buffer *buffer = new Buffer(factory, handle); + Buffer *buffer = new Buffer(factory->createBuffer(), handle); buffer->addRef(); if (handleAllocated) @@ -544,19 +544,4 @@ bool ResourceManager::isSampler(GLuint sampler) return mSamplerMap.find(sampler) != mSamplerMap.end(); } -bool ResourceManager::isTextureGenerated(GLuint texture) const -{ - return texture == 0 || mTextureMap.find(texture) != mTextureMap.end(); -} - -bool ResourceManager::isBufferGenerated(GLuint buffer) const -{ - return buffer == 0 || mBufferMap.find(buffer) != mBufferMap.end(); -} - -bool ResourceManager::isRenderbufferGenerated(GLuint renderbuffer) const -{ - return renderbuffer == 0 || mRenderbufferMap.find(renderbuffer) != mRenderbufferMap.end(); -} - } // namespace gl diff --git a/gfx/angle/src/libANGLE/ResourceManager.h b/gfx/angle/src/libANGLE/ResourceManager.h index f6a0002ed..a673257e1 100755 --- a/gfx/angle/src/libANGLE/ResourceManager.h +++ b/gfx/angle/src/libANGLE/ResourceManager.h @@ -64,7 +64,7 @@ class ResourceManager : angle::NonCopyable void deletePaths(GLuint first, GLsizei range); Buffer *getBuffer(GLuint handle); - Shader *getShader(GLuint handle) const; + Shader *getShader(GLuint handle); Program *getProgram(GLuint handle) const; Texture *getTexture(GLuint handle); Renderbuffer *getRenderbuffer(GLuint handle); @@ -85,11 +85,6 @@ class ResourceManager : angle::NonCopyable bool isSampler(GLuint sampler); - // GL_CHROMIUM_bind_generates_resource - bool isTextureGenerated(GLuint texture) const; - bool isBufferGenerated(GLuint buffer) const; - bool isRenderbufferGenerated(GLuint renderbuffer) const; - private: void createTextureInternal(GLuint handle); diff --git a/gfx/angle/src/libANGLE/ResourceManager_unittest.cpp b/gfx/angle/src/libANGLE/ResourceManager_unittest.cpp index a9dff145b..ded2dc538 100755 --- a/gfx/angle/src/libANGLE/ResourceManager_unittest.cpp +++ b/gfx/angle/src/libANGLE/ResourceManager_unittest.cpp @@ -48,7 +48,7 @@ TEST_F(ResourceManagerTest, ReallocateBoundTexture) TEST_F(ResourceManagerTest, ReallocateBoundBuffer) { - EXPECT_CALL(mMockFactory, createBuffer(_)).Times(1).RetiresOnSaturation(); + EXPECT_CALL(mMockFactory, createBuffer()).Times(1).RetiresOnSaturation(); mResourceManager->checkBufferAllocation(&mMockFactory, 1); GLuint newBuffer = mResourceManager->createBuffer(); diff --git a/gfx/angle/src/libANGLE/Sampler.cpp b/gfx/angle/src/libANGLE/Sampler.cpp index 369c3cbaa..dc1d7c94a 100755 --- a/gfx/angle/src/libANGLE/Sampler.cpp +++ b/gfx/angle/src/libANGLE/Sampler.cpp @@ -135,24 +135,18 @@ GLenum Sampler::getCompareFunc() const return mSamplerState.compareFunc; } -void Sampler::setSRGBDecode(GLenum sRGBDecode) -{ - mSamplerState.sRGBDecode = sRGBDecode; -} - -GLenum Sampler::getSRGBDecode() const -{ - return mSamplerState.sRGBDecode; -} - const SamplerState &Sampler::getSamplerState() const { return mSamplerState; } -rx::SamplerImpl *Sampler::getImplementation() const +const rx::SamplerImpl *Sampler::getImplementation() const { return mImpl; } +rx::SamplerImpl *Sampler::getImplementation() +{ + return mImpl; +} } diff --git a/gfx/angle/src/libANGLE/Sampler.h b/gfx/angle/src/libANGLE/Sampler.h index 156d61f66..f950bc04e 100755 --- a/gfx/angle/src/libANGLE/Sampler.h +++ b/gfx/angle/src/libANGLE/Sampler.h @@ -62,12 +62,10 @@ class Sampler final : public RefCountObject, public LabeledObject void setCompareFunc(GLenum compareFunc); GLenum getCompareFunc() const; - void setSRGBDecode(GLenum sRGBDecode); - GLenum getSRGBDecode() const; - const SamplerState &getSamplerState() const; - rx::SamplerImpl *getImplementation() const; + const rx::SamplerImpl *getImplementation() const; + rx::SamplerImpl *getImplementation(); private: rx::SamplerImpl *mImpl; diff --git a/gfx/angle/src/libANGLE/Shader.cpp b/gfx/angle/src/libANGLE/Shader.cpp index a4c68950b..904345d58 100755 --- a/gfx/angle/src/libANGLE/Shader.cpp +++ b/gfx/angle/src/libANGLE/Shader.cpp @@ -20,7 +20,6 @@ #include "libANGLE/renderer/GLImplFactory.h" #include "libANGLE/renderer/ShaderImpl.h" #include "libANGLE/ResourceManager.h" -#include "libANGLE/Context.h" namespace gl { @@ -228,7 +227,7 @@ void Shader::getTranslatedSourceWithDebugInfo(GLsizei bufSize, GLsizei *length, getSourceImpl(debugInfo, bufSize, length, buffer); } -void Shader::compile(const Context *context) +void Shader::compile(Compiler *compiler) { mState.mTranslatedSource.clear(); mInfoLog.clear(); @@ -239,23 +238,14 @@ void Shader::compile(const Context *context) mState.mActiveAttributes.clear(); mState.mActiveOutputVariables.clear(); - Compiler *compiler = context->getCompiler(); ShHandle compilerHandle = compiler->getCompilerHandle(mState.mShaderType); std::stringstream sourceStream; std::string sourcePath; - ShCompileOptions additionalOptions = + int additionalOptions = mImplementation->prepareSourceAndReturnOptions(&sourceStream, &sourcePath); - ShCompileOptions compileOptions = (SH_OBJECT_CODE | SH_VARIABLES | additionalOptions); - - // Add default options to WebGL shaders to prevent unexpected behavior during compilation. - if (context->getExtensions().webglCompatibility) - { - compileOptions |= SH_LIMIT_CALL_STACK_DEPTH; - compileOptions |= SH_LIMIT_EXPRESSION_COMPLEXITY; - compileOptions |= SH_ENFORCE_PACKING_RESTRICTIONS; - } + int compileOptions = (SH_OBJECT_CODE | SH_VARIABLES | additionalOptions); // Some targets (eg D3D11 Feature Level 9_3 and below) do not support non-constant loop indexes // in fragment shaders. Shader compilation will fail. To provide a better error message we can @@ -276,17 +266,17 @@ void Shader::compile(const Context *context) sourceCStrings.push_back(sourceString.c_str()); bool result = - sh::Compile(compilerHandle, &sourceCStrings[0], sourceCStrings.size(), compileOptions); + ShCompile(compilerHandle, &sourceCStrings[0], sourceCStrings.size(), compileOptions); if (!result) { - mInfoLog = sh::GetInfoLog(compilerHandle); + mInfoLog = ShGetInfoLog(compilerHandle); TRACE("\n%s", mInfoLog.c_str()); mCompiled = false; return; } - mState.mTranslatedSource = sh::GetObjectCode(compilerHandle); + mState.mTranslatedSource = ShGetObjectCode(compilerHandle); #ifndef NDEBUG // Prefix translated shader with commented out un-translated shader. @@ -311,22 +301,22 @@ void Shader::compile(const Context *context) #endif // Gather the shader information - mState.mShaderVersion = sh::GetShaderVersion(compilerHandle); + mState.mShaderVersion = ShGetShaderVersion(compilerHandle); - mState.mVaryings = GetShaderVariables(sh::GetVaryings(compilerHandle)); - mState.mUniforms = GetShaderVariables(sh::GetUniforms(compilerHandle)); - mState.mInterfaceBlocks = GetShaderVariables(sh::GetInterfaceBlocks(compilerHandle)); + mState.mVaryings = GetShaderVariables(ShGetVaryings(compilerHandle)); + mState.mUniforms = GetShaderVariables(ShGetUniforms(compilerHandle)); + mState.mInterfaceBlocks = GetShaderVariables(ShGetInterfaceBlocks(compilerHandle)); switch (mState.mShaderType) { case GL_COMPUTE_SHADER: { - mState.mLocalSize = sh::GetComputeShaderLocalGroupSize(compilerHandle); + mState.mLocalSize = ShGetComputeShaderLocalGroupSize(compilerHandle); break; } case GL_VERTEX_SHADER: { - mState.mActiveAttributes = GetActiveShaderVariables(sh::GetAttributes(compilerHandle)); + mState.mActiveAttributes = GetActiveShaderVariables(ShGetAttributes(compilerHandle)); break; } case GL_FRAGMENT_SHADER: @@ -334,7 +324,7 @@ void Shader::compile(const Context *context) // TODO(jmadill): Figure out why we only sort in the FS, and if we need to. std::sort(mState.mVaryings.begin(), mState.mVaryings.end(), CompareShaderVar); mState.mActiveOutputVariables = - GetActiveShaderVariables(sh::GetOutputVariables(compilerHandle)); + GetActiveShaderVariables(ShGetOutputVariables(compilerHandle)); break; } default: diff --git a/gfx/angle/src/libANGLE/Shader.h b/gfx/angle/src/libANGLE/Shader.h index ee42a80a3..d73400a80 100755 --- a/gfx/angle/src/libANGLE/Shader.h +++ b/gfx/angle/src/libANGLE/Shader.h @@ -36,7 +36,6 @@ class Compiler; class ContextState; struct Limitations; class ResourceManager; -class Context; class ShaderState final : angle::NonCopyable { @@ -97,7 +96,7 @@ class Shader final : angle::NonCopyable, public LabeledObject GLenum getType() const { return mType; } GLuint getHandle() const; - rx::ShaderImpl *getImplementation() const { return mImplementation; } + const rx::ShaderImpl *getImplementation() const { return mImplementation; } void deleteSource(); void setSource(GLsizei count, const char *const *string, const GLint *length); @@ -111,7 +110,7 @@ class Shader final : angle::NonCopyable, public LabeledObject void getTranslatedSource(GLsizei bufSize, GLsizei *length, char *buffer) const; void getTranslatedSourceWithDebugInfo(GLsizei bufSize, GLsizei *length, char *buffer) const; - void compile(const Context *context); + void compile(Compiler *compiler); bool isCompiled() const { return mCompiled; } void addRef(); diff --git a/gfx/angle/src/libANGLE/State.cpp b/gfx/angle/src/libANGLE/State.cpp index a56bb1c5d..6c3f04ded 100755 --- a/gfx/angle/src/libANGLE/State.cpp +++ b/gfx/angle/src/libANGLE/State.cpp @@ -50,7 +50,6 @@ State::State() mLineWidth(0), mGenerateMipmapHint(GL_NONE), mFragmentShaderDerivativeHint(GL_NONE), - mBindGeneratesResource(true), mNearZ(0), mFarZ(0), mReadFramebuffer(nullptr), @@ -60,8 +59,7 @@ State::State() mActiveSampler(0), mPrimitiveRestart(false), mMultiSampling(false), - mSampleAlphaToOne(false), - mFramebufferSRGB(true) + mSampleAlphaToOne(false) { } @@ -72,9 +70,8 @@ State::~State() void State::initialize(const Caps &caps, const Extensions &extensions, - const Version &clientVersion, - bool debug, - bool bindGeneratesResource) + GLuint clientVersion, + bool debug) { mMaxDrawBuffers = caps.maxDrawBuffers; mMaxCombinedTextureImageUnits = caps.maxCombinedTextureImageUnits; @@ -140,8 +137,6 @@ void State::initialize(const Caps &caps, mGenerateMipmapHint = GL_DONT_CARE; mFragmentShaderDerivativeHint = GL_DONT_CARE; - mBindGeneratesResource = bindGeneratesResource; - mLineWidth = 1.0f; mViewport.x = 0; @@ -164,7 +159,7 @@ void State::initialize(const Caps &caps, mSamplerTextures[GL_TEXTURE_2D].resize(caps.maxCombinedTextureImageUnits); mSamplerTextures[GL_TEXTURE_CUBE_MAP].resize(caps.maxCombinedTextureImageUnits); - if (clientVersion >= Version(3, 0)) + if (clientVersion >= 3) { // TODO: These could also be enabled via extension mSamplerTextures[GL_TEXTURE_2D_ARRAY].resize(caps.maxCombinedTextureImageUnits); @@ -638,9 +633,6 @@ void State::setEnableFeature(GLenum feature, bool enabled) case GL_DEBUG_OUTPUT: mDebug.setOutputEnabled(enabled); break; - case GL_FRAMEBUFFER_SRGB_EXT: - setFramebufferSRGB(enabled); - break; default: UNREACHABLE(); } } @@ -666,10 +658,6 @@ bool State::getEnableFeature(GLenum feature) const return mDebug.isOutputSynchronous(); case GL_DEBUG_OUTPUT: return mDebug.isOutputEnabled(); - case GL_BIND_GENERATES_RESOURCE_CHROMIUM: - return isBindGeneratesResourceEnabled(); - case GL_FRAMEBUFFER_SRGB_EXT: - return getFramebufferSRGB(); default: UNREACHABLE(); return false; } } @@ -700,11 +688,6 @@ void State::setFragmentShaderDerivativeHint(GLenum hint) // Ignore for now. It is valid for implementations to ignore hint. } -bool State::isBindGeneratesResourceEnabled() const -{ - return mBindGeneratesResource; -} - void State::setViewportParams(GLint x, GLint y, GLsizei width, GLsizei height) { mViewport.x = x; @@ -1462,17 +1445,6 @@ GLuint State::getPathStencilMask() const return mPathStencilMask; } -void State::setFramebufferSRGB(bool sRGB) -{ - mFramebufferSRGB = sRGB; - mDirtyBits.set(DIRTY_BIT_FRAMEBUFFER_SRGB); -} - -bool State::getFramebufferSRGB() const -{ - return mFramebufferSRGB; -} - void State::getBooleanv(GLenum pname, GLboolean *params) { switch (pname) @@ -1514,12 +1486,6 @@ void State::getBooleanv(GLenum pname, GLboolean *params) case GL_SAMPLE_ALPHA_TO_ONE_EXT: *params = mSampleAlphaToOne; break; - case GL_BIND_GENERATES_RESOURCE_CHROMIUM: - *params = isBindGeneratesResourceEnabled() ? GL_TRUE : GL_FALSE; - break; - case GL_FRAMEBUFFER_SRGB_EXT: - *params = getFramebufferSRGB() ? GL_TRUE : GL_FALSE; - break; default: UNREACHABLE(); break; @@ -1764,11 +1730,6 @@ void State::getIntegerv(const ContextState &data, GLenum pname, GLint *params) *params = getSamplerTextureId(static_cast(mActiveSampler), GL_TEXTURE_2D_ARRAY); break; - case GL_TEXTURE_BINDING_EXTERNAL_OES: - ASSERT(mActiveSampler < mMaxCombinedTextureImageUnits); - *params = getSamplerTextureId(static_cast(mActiveSampler), - GL_TEXTURE_EXTERNAL_OES); - break; case GL_UNIFORM_BUFFER_BINDING: *params = mGenericUniformBuffer.id(); break; diff --git a/gfx/angle/src/libANGLE/State.h b/gfx/angle/src/libANGLE/State.h index 160a7abd8..e91affe53 100755 --- a/gfx/angle/src/libANGLE/State.h +++ b/gfx/angle/src/libANGLE/State.h @@ -21,7 +21,6 @@ #include "libANGLE/Sampler.h" #include "libANGLE/Texture.h" #include "libANGLE/TransformFeedback.h" -#include "libANGLE/Version.h" #include "libANGLE/VertexAttribute.h" #include "libANGLE/angletypes.h" @@ -42,9 +41,8 @@ class State : angle::NonCopyable void initialize(const Caps &caps, const Extensions &extensions, - const Version &clientVersion, - bool debug, - bool bindGeneratesResource); + GLuint clientVersion, + bool debug); void reset(); // State chunk getters @@ -149,9 +147,6 @@ class State : angle::NonCopyable void setGenerateMipmapHint(GLenum hint); void setFragmentShaderDerivativeHint(GLenum hint); - // GL_CHROMIUM_bind_generates_resource - bool isBindGeneratesResourceEnabled() const; - // Viewport state setter/getter void setViewportParams(GLint x, GLint y, GLsizei width, GLsizei height); const Rectangle &getViewport() const; @@ -291,10 +286,6 @@ class State : angle::NonCopyable GLint getPathStencilRef() const; GLuint getPathStencilMask() const; - // GL_EXT_sRGB_write_control - void setFramebufferSRGB(bool sRGB); - bool getFramebufferSRGB() const; - // State query functions void getBooleanv(GLenum pname, GLboolean *params); void getFloatv(GLenum pname, GLfloat *params); @@ -368,7 +359,6 @@ class State : angle::NonCopyable DIRTY_BIT_PATH_RENDERING_MATRIX_MV, // CHROMIUM_path_rendering path model view matrix DIRTY_BIT_PATH_RENDERING_MATRIX_PROJ, // CHROMIUM_path_rendering path projection matrix DIRTY_BIT_PATH_RENDERING_STENCIL_STATE, - DIRTY_BIT_FRAMEBUFFER_SRGB, // GL_EXT_sRGB_write_control DIRTY_BIT_CURRENT_VALUE_0, DIRTY_BIT_CURRENT_VALUE_MAX = DIRTY_BIT_CURRENT_VALUE_0 + MAX_VERTEX_ATTRIBS, DIRTY_BIT_INVALID = DIRTY_BIT_CURRENT_VALUE_MAX, @@ -428,8 +418,6 @@ class State : angle::NonCopyable GLenum mGenerateMipmapHint; GLenum mFragmentShaderDerivativeHint; - bool mBindGeneratesResource; - Rectangle mViewport; float mNearZ; float mFarZ; @@ -485,9 +473,6 @@ class State : angle::NonCopyable GLint mPathStencilRef; GLuint mPathStencilMask; - // GL_EXT_sRGB_write_control - bool mFramebufferSRGB; - DirtyBits mDirtyBits; DirtyObjects mDirtyObjects; }; diff --git a/gfx/angle/src/libANGLE/Surface.cpp b/gfx/angle/src/libANGLE/Surface.cpp index 43e71df31..6028b7f67 100755 --- a/gfx/angle/src/libANGLE/Surface.cpp +++ b/gfx/angle/src/libANGLE/Surface.cpp @@ -138,11 +138,6 @@ Error Surface::swap() return mImplementation->swap(); } -Error Surface::swapWithDamage(EGLint *rects, EGLint n_rects) -{ - return mImplementation->swapWithDamage(rects, n_rects); -} - Error Surface::postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height) { return mImplementation->postSubBuffer(x, y, width, height); @@ -211,23 +206,19 @@ EGLint Surface::getHeight() const Error Surface::bindTexImage(gl::Texture *texture, EGLint buffer) { ASSERT(!mTexture.get()); - ANGLE_TRY(mImplementation->bindTexImage(texture, buffer)); texture->bindTexImageFromSurface(this); mTexture.set(texture); - - return Error(EGL_SUCCESS); + return mImplementation->bindTexImage(texture, buffer); } Error Surface::releaseTexImage(EGLint buffer) { - ANGLE_TRY(mImplementation->releaseTexImage(buffer)); - ASSERT(mTexture.get()); mTexture->releaseTexImageFromSurface(); mTexture.set(nullptr); - return Error(EGL_SUCCESS); + return mImplementation->releaseTexImage(buffer); } void Surface::releaseTexImageFromTexture() @@ -307,13 +298,12 @@ PbufferSurface::PbufferSurface(rx::EGLImplFactory *implFactory, PbufferSurface::PbufferSurface(rx::EGLImplFactory *implFactory, const Config *config, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const AttributeMap &attribs) : Surface(EGL_PBUFFER_BIT, config, attribs) { mImplementation = - implFactory->createPbufferFromClientBuffer(mState, config, buftype, clientBuffer, attribs); + implFactory->createPbufferFromClientBuffer(mState, config, shareHandle, attribs); } PbufferSurface::~PbufferSurface() diff --git a/gfx/angle/src/libANGLE/Surface.h b/gfx/angle/src/libANGLE/Surface.h index fc6cc6ae7..4e60771af 100755 --- a/gfx/angle/src/libANGLE/Surface.h +++ b/gfx/angle/src/libANGLE/Surface.h @@ -55,7 +55,6 @@ class Surface : public gl::FramebufferAttachmentObject Error initialize(); Error swap(); - Error swapWithDamage(EGLint *rects, EGLint n_rects); Error postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height); Error querySurfacePointerANGLE(EGLint attribute, void **value); Error bindTexImage(gl::Texture *texture, EGLint buffer); @@ -162,8 +161,7 @@ class PbufferSurface final : public Surface const AttributeMap &attribs); PbufferSurface(rx::EGLImplFactory *implFactory, const Config *config, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const AttributeMap &attribs); ~PbufferSurface() override; }; diff --git a/gfx/angle/src/libANGLE/Surface_unittest.cpp b/gfx/angle/src/libANGLE/Surface_unittest.cpp index 7f361eedd..e4fe782ee 100755 --- a/gfx/angle/src/libANGLE/Surface_unittest.cpp +++ b/gfx/angle/src/libANGLE/Surface_unittest.cpp @@ -31,7 +31,6 @@ class MockSurfaceImpl : public rx::SurfaceImpl MOCK_METHOD0(initialize, egl::Error()); MOCK_METHOD1(createDefaultFramebuffer, rx::FramebufferImpl *(const gl::FramebufferState &data)); MOCK_METHOD0(swap, egl::Error()); - MOCK_METHOD2(swapWithDamage, egl::Error(EGLint *, EGLint)); MOCK_METHOD4(postSubBuffer, egl::Error(EGLint, EGLint, EGLint, EGLint)); MOCK_METHOD2(querySurfacePointerANGLE, egl::Error(EGLint, void**)); MOCK_METHOD2(bindTexImage, egl::Error(gl::Texture*, EGLint)); diff --git a/gfx/angle/src/libANGLE/Texture.cpp b/gfx/angle/src/libANGLE/Texture.cpp index edba11bd4..ae46973d0 100755 --- a/gfx/angle/src/libANGLE/Texture.cpp +++ b/gfx/angle/src/libANGLE/Texture.cpp @@ -301,13 +301,9 @@ bool TextureState::computeSamplerCompleteness(const SamplerState &samplerState, // depth and stencil format (see table 3.13), the value of TEXTURE_COMPARE_- // MODE is NONE, and either the magnification filter is not NEAREST or the mini- // fication filter is neither NEAREST nor NEAREST_MIPMAP_NEAREST. - if (baseImageDesc.format.info->depthBits > 0 && data.getClientMajorVersion() >= 3) + if (baseImageDesc.format.info->depthBits > 0 && data.getClientMajorVersion() > 2) { - // Note: we restrict this validation to sized types. For the OES_depth_textures - // extension, due to some underspecification problems, we must allow linear filtering - // for legacy compatibility with WebGL 1. - // See http://crbug.com/649200 - if (samplerState.compareMode == GL_NONE && baseImageDesc.format.sized) + if (samplerState.compareMode == GL_NONE) { if ((samplerState.minFilter != GL_NEAREST && samplerState.minFilter != GL_NEAREST_MIPMAP_NEAREST) || @@ -516,7 +512,6 @@ Texture::~Texture() void Texture::setLabel(const std::string &label) { mLabel = label; - mDirtyBits.set(DIRTY_BIT_LABEL); } const std::string &Texture::getLabel() const @@ -532,7 +527,6 @@ GLenum Texture::getTarget() const void Texture::setSwizzleRed(GLenum swizzleRed) { mState.mSwizzleState.swizzleRed = swizzleRed; - mDirtyBits.set(DIRTY_BIT_SWIZZLE_RED); } GLenum Texture::getSwizzleRed() const @@ -543,7 +537,6 @@ GLenum Texture::getSwizzleRed() const void Texture::setSwizzleGreen(GLenum swizzleGreen) { mState.mSwizzleState.swizzleGreen = swizzleGreen; - mDirtyBits.set(DIRTY_BIT_SWIZZLE_GREEN); } GLenum Texture::getSwizzleGreen() const @@ -554,7 +547,6 @@ GLenum Texture::getSwizzleGreen() const void Texture::setSwizzleBlue(GLenum swizzleBlue) { mState.mSwizzleState.swizzleBlue = swizzleBlue; - mDirtyBits.set(DIRTY_BIT_SWIZZLE_BLUE); } GLenum Texture::getSwizzleBlue() const @@ -565,7 +557,6 @@ GLenum Texture::getSwizzleBlue() const void Texture::setSwizzleAlpha(GLenum swizzleAlpha) { mState.mSwizzleState.swizzleAlpha = swizzleAlpha; - mDirtyBits.set(DIRTY_BIT_SWIZZLE_ALPHA); } GLenum Texture::getSwizzleAlpha() const @@ -576,7 +567,6 @@ GLenum Texture::getSwizzleAlpha() const void Texture::setMinFilter(GLenum minFilter) { mState.mSamplerState.minFilter = minFilter; - mDirtyBits.set(DIRTY_BIT_MIN_FILTER); } GLenum Texture::getMinFilter() const @@ -587,7 +577,6 @@ GLenum Texture::getMinFilter() const void Texture::setMagFilter(GLenum magFilter) { mState.mSamplerState.magFilter = magFilter; - mDirtyBits.set(DIRTY_BIT_MAG_FILTER); } GLenum Texture::getMagFilter() const @@ -598,7 +587,6 @@ GLenum Texture::getMagFilter() const void Texture::setWrapS(GLenum wrapS) { mState.mSamplerState.wrapS = wrapS; - mDirtyBits.set(DIRTY_BIT_WRAP_S); } GLenum Texture::getWrapS() const @@ -609,7 +597,6 @@ GLenum Texture::getWrapS() const void Texture::setWrapT(GLenum wrapT) { mState.mSamplerState.wrapT = wrapT; - mDirtyBits.set(DIRTY_BIT_WRAP_T); } GLenum Texture::getWrapT() const @@ -620,7 +607,6 @@ GLenum Texture::getWrapT() const void Texture::setWrapR(GLenum wrapR) { mState.mSamplerState.wrapR = wrapR; - mDirtyBits.set(DIRTY_BIT_WRAP_R); } GLenum Texture::getWrapR() const @@ -631,7 +617,6 @@ GLenum Texture::getWrapR() const void Texture::setMaxAnisotropy(float maxAnisotropy) { mState.mSamplerState.maxAnisotropy = maxAnisotropy; - mDirtyBits.set(DIRTY_BIT_MAX_ANISOTROPY); } float Texture::getMaxAnisotropy() const @@ -642,7 +627,6 @@ float Texture::getMaxAnisotropy() const void Texture::setMinLod(GLfloat minLod) { mState.mSamplerState.minLod = minLod; - mDirtyBits.set(DIRTY_BIT_MIN_LOD); } GLfloat Texture::getMinLod() const @@ -653,7 +637,6 @@ GLfloat Texture::getMinLod() const void Texture::setMaxLod(GLfloat maxLod) { mState.mSamplerState.maxLod = maxLod; - mDirtyBits.set(DIRTY_BIT_MAX_LOD); } GLfloat Texture::getMaxLod() const @@ -664,7 +647,6 @@ GLfloat Texture::getMaxLod() const void Texture::setCompareMode(GLenum compareMode) { mState.mSamplerState.compareMode = compareMode; - mDirtyBits.set(DIRTY_BIT_COMPARE_MODE); } GLenum Texture::getCompareMode() const @@ -675,7 +657,6 @@ GLenum Texture::getCompareMode() const void Texture::setCompareFunc(GLenum compareFunc) { mState.mSamplerState.compareFunc = compareFunc; - mDirtyBits.set(DIRTY_BIT_COMPARE_FUNC); } GLenum Texture::getCompareFunc() const @@ -683,17 +664,6 @@ GLenum Texture::getCompareFunc() const return mState.mSamplerState.compareFunc; } -void Texture::setSRGBDecode(GLenum sRGBDecode) -{ - mState.mSamplerState.sRGBDecode = sRGBDecode; - mDirtyBits.set(DIRTY_BIT_SRGB_DECODE); -} - -GLenum Texture::getSRGBDecode() const -{ - return mState.mSamplerState.sRGBDecode; -} - const SamplerState &Texture::getSamplerState() const { return mState.mSamplerState; @@ -704,7 +674,6 @@ void Texture::setBaseLevel(GLuint baseLevel) if (mState.setBaseLevel(baseLevel)) { mTexture->setBaseLevel(mState.getEffectiveBaseLevel()); - mDirtyBits.set(DIRTY_BIT_BASE_LEVEL); } } @@ -716,7 +685,6 @@ GLuint Texture::getBaseLevel() const void Texture::setMaxLevel(GLuint maxLevel) { mState.setMaxLevel(maxLevel); - mDirtyBits.set(DIRTY_BIT_MAX_LEVEL); } GLuint Texture::getMaxLevel() const @@ -737,7 +705,6 @@ GLuint Texture::getImmutableLevels() const void Texture::setUsage(GLenum usage) { mState.mUsage = usage; - mDirtyBits.set(DIRTY_BIT_USAGE); } GLenum Texture::getUsage() const @@ -932,21 +899,6 @@ Error Texture::copySubTexture(const Offset &destOffset, unpackUnmultiplyAlpha, source); } -Error Texture::copyCompressedTexture(const Texture *source) -{ - // Release from previous calls to eglBindTexImage, to avoid calling the Impl after - releaseTexImageInternal(); - orphanImages(); - - ANGLE_TRY(mTexture->copyCompressedTexture(source)); - - ASSERT(source->getTarget() != GL_TEXTURE_CUBE_MAP && getTarget() != GL_TEXTURE_CUBE_MAP); - const auto &sourceDesc = source->mState.getImageDesc(source->getTarget(), 0); - mState.setImageDesc(getTarget(), 0, sourceDesc); - - return NoError(); -} - Error Texture::setStorage(GLenum target, GLsizei levels, GLenum internalFormat, const Extents &size) { ASSERT(target == mState.mTarget); @@ -961,14 +913,6 @@ Error Texture::setStorage(GLenum target, GLsizei levels, GLenum internalFormat, mState.mImmutableLevels = static_cast(levels); mState.clearImageDescs(); mState.setImageDescChain(0, static_cast(levels - 1), size, Format(internalFormat)); - - // Changing the texture to immutable can trigger a change in the base and max levels: - // GLES 3.0.4 section 3.8.10 pg 158: - // "For immutable-format textures, levelbase is clamped to the range[0;levels],levelmax is then - // clamped to the range[levelbase;levels]. - mDirtyBits.set(DIRTY_BIT_BASE_LEVEL); - mDirtyBits.set(DIRTY_BIT_MAX_LEVEL); - mDirtyChannel.signal(); return NoError(); @@ -991,7 +935,6 @@ Error Texture::generateMipmap() if (maxLevel > baseLevel) { - syncImplState(); ANGLE_TRY(mTexture->generateMipmap()); const ImageDesc &baseImageInfo = @@ -1140,12 +1083,6 @@ GLuint Texture::getId() const return id(); } -void Texture::syncImplState() -{ - mTexture->syncState(mDirtyBits); - mDirtyBits.reset(); -} - rx::FramebufferAttachmentObjectImpl *Texture::getAttachmentImpl() const { return mTexture; diff --git a/gfx/angle/src/libANGLE/Texture.h b/gfx/angle/src/libANGLE/Texture.h index 583a69a7b..36cef52cd 100755 --- a/gfx/angle/src/libANGLE/Texture.h +++ b/gfx/angle/src/libANGLE/Texture.h @@ -217,9 +217,6 @@ class Texture final : public egl::ImageSibling, void setCompareFunc(GLenum compareFunc); GLenum getCompareFunc() const; - void setSRGBDecode(GLenum sRGBDecode); - GLenum getSRGBDecode() const; - const SamplerState &getSamplerState() const; void setBaseLevel(GLuint baseLevel); @@ -298,7 +295,6 @@ class Texture final : public egl::ImageSibling, bool unpackPremultiplyAlpha, bool unpackUnmultiplyAlpha, const Texture *source); - Error copyCompressedTexture(const Texture *source); Error setStorage(GLenum target, GLsizei levels, GLenum internalFormat, const Extents &size); @@ -309,7 +305,8 @@ class Texture final : public egl::ImageSibling, egl::Surface *getBoundSurface() const; egl::Stream *getBoundStream() const; - rx::TextureImpl *getImplementation() const { return mTexture; } + rx::TextureImpl *getImplementation() { return mTexture; } + const rx::TextureImpl *getImplementation() const { return mTexture; } // FramebufferAttachmentObject implementation Extents getAttachmentSize(const FramebufferAttachment::Target &target) const override; @@ -320,40 +317,6 @@ class Texture final : public egl::ImageSibling, void onDetach() override; GLuint getId() const override; - enum DirtyBitType - { - // Sampler state - DIRTY_BIT_MIN_FILTER, - DIRTY_BIT_MAG_FILTER, - DIRTY_BIT_WRAP_S, - DIRTY_BIT_WRAP_T, - DIRTY_BIT_WRAP_R, - DIRTY_BIT_MAX_ANISOTROPY, - DIRTY_BIT_MIN_LOD, - DIRTY_BIT_MAX_LOD, - DIRTY_BIT_COMPARE_MODE, - DIRTY_BIT_COMPARE_FUNC, - DIRTY_BIT_SRGB_DECODE, - - // Texture state - DIRTY_BIT_SWIZZLE_RED, - DIRTY_BIT_SWIZZLE_GREEN, - DIRTY_BIT_SWIZZLE_BLUE, - DIRTY_BIT_SWIZZLE_ALPHA, - DIRTY_BIT_BASE_LEVEL, - DIRTY_BIT_MAX_LEVEL, - - // Misc - DIRTY_BIT_LABEL, - DIRTY_BIT_USAGE, - - DIRTY_BIT_COUNT, - }; - using DirtyBits = std::bitset; - - void syncImplState(); - bool hasAnyDirtyBit() const { return mDirtyBits.any(); } - private: rx::FramebufferAttachmentObjectImpl *getAttachmentImpl() const override; @@ -370,7 +333,6 @@ class Texture final : public egl::ImageSibling, void releaseImageFromStream(); TextureState mState; - DirtyBits mDirtyBits; rx::TextureImpl *mTexture; std::string mLabel; diff --git a/gfx/angle/src/libANGLE/Thread.cpp b/gfx/angle/src/libANGLE/Thread.cpp deleted file mode 100644 index 1abf449ce..000000000 --- a/gfx/angle/src/libANGLE/Thread.cpp +++ /dev/null @@ -1,88 +0,0 @@ -// -// Copyright(c) 2016 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. -// - -// Thread.cpp : Defines the Thread class which represents a global EGL thread. - -#include "libANGLE/Thread.h" - -#include "libANGLE/Context.h" -#include "libANGLE/Error.h" - -namespace egl -{ -Thread::Thread() - : mError(EGL_SUCCESS), - mAPI(EGL_OPENGL_ES_API), - mDisplay(static_cast(EGL_NO_DISPLAY)), - mDrawSurface(static_cast(EGL_NO_SURFACE)), - mReadSurface(static_cast(EGL_NO_SURFACE)), - mContext(static_cast(EGL_NO_CONTEXT)) -{ -} - -void Thread::setError(const Error &error) -{ - mError = error.getCode(); -} - -EGLint Thread::getError() const -{ - return mError; -} - -void Thread::setAPI(EGLenum api) -{ - mAPI = api; -} - -EGLenum Thread::getAPI() const -{ - return mAPI; -} - -void Thread::setCurrent(Display *display, - Surface *drawSurface, - Surface *readSurface, - gl::Context *context) -{ - mDisplay = display; - mDrawSurface = drawSurface; - mReadSurface = readSurface; - mContext = context; -} - -Display *Thread::getDisplay() const -{ - return mDisplay; -} - -Surface *Thread::getDrawSurface() const -{ - return mDrawSurface; -} - -Surface *Thread::getReadSurface() const -{ - return mReadSurface; -} - -gl::Context *Thread::getContext() const -{ - return mContext; -} - -gl::Context *Thread::getValidContext() const -{ - if (mContext && mContext->isContextLost()) - { - mContext->handleError(gl::Error(GL_OUT_OF_MEMORY, "Context has been lost.")); - return nullptr; - } - - return mContext; -} - -} // namespace egl diff --git a/gfx/angle/src/libANGLE/Thread.h b/gfx/angle/src/libANGLE/Thread.h deleted file mode 100644 index 7a67dc62b..000000000 --- a/gfx/angle/src/libANGLE/Thread.h +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright(c) 2016 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. -// - -// Thread.h : Defines the Thread class which represents a global EGL thread. - -#ifndef LIBANGLE_THREAD_H_ -#define LIBANGLE_THREAD_H_ - -#include - -namespace gl -{ -class Context; -} // namespace gl - -namespace egl -{ -class Error; -class Display; -class Surface; - -class Thread -{ - public: - Thread(); - - void setError(const Error &error); - EGLint getError() const; - - void setAPI(EGLenum api); - EGLenum getAPI() const; - - void setCurrent(Display *display, - Surface *drawSurface, - Surface *readSurface, - gl::Context *context); - Display *getDisplay() const; - Surface *getDrawSurface() const; - Surface *getReadSurface() const; - gl::Context *getContext() const; - gl::Context *getValidContext() const; - - private: - EGLint mError; - EGLenum mAPI; - egl::Display *mDisplay; - egl::Surface *mDrawSurface; - egl::Surface *mReadSurface; - gl::Context *mContext; -}; - -} // namespace egl - -#endif // LIBANGLE_THREAD_H_ diff --git a/gfx/angle/src/libANGLE/TransformFeedback_unittest.cpp b/gfx/angle/src/libANGLE/TransformFeedback_unittest.cpp index aa464d105..07a0959e2 100755 --- a/gfx/angle/src/libANGLE/TransformFeedback_unittest.cpp +++ b/gfx/angle/src/libANGLE/TransformFeedback_unittest.cpp @@ -101,16 +101,9 @@ TEST_F(TransformFeedbackTest, SideEffectsOfPauseAndResume) TEST_F(TransformFeedbackTest, BufferBinding) { rx::MockBufferImpl *bufferImpl = new rx::MockBufferImpl; + gl::Buffer *buffer = new gl::Buffer(bufferImpl, 1); EXPECT_CALL(*bufferImpl, destructor()).Times(1).RetiresOnSaturation(); - rx::MockGLFactory mockGLFactory; - EXPECT_CALL(mockGLFactory, createBuffer(_)) - .Times(1) - .WillOnce(Return(bufferImpl)) - .RetiresOnSaturation(); - - gl::Buffer *buffer = new gl::Buffer(&mockGLFactory, 1); - static const size_t bindIndex = 0; EXPECT_EQ(mFeedback->getIndexedBufferCount(), mCaps.maxTransformFeedbackSeparateAttributes); diff --git a/gfx/angle/src/libANGLE/Uniform.cpp b/gfx/angle/src/libANGLE/Uniform.cpp index 3caa3f5e2..9b4b47aa2 100755 --- a/gfx/angle/src/libANGLE/Uniform.cpp +++ b/gfx/angle/src/libANGLE/Uniform.cpp @@ -109,11 +109,6 @@ size_t LinkedUniform::getElementSize() const return VariableExternalSize(type); } -size_t LinkedUniform::getElementComponents() const -{ - return VariableComponentCount(type); -} - uint8_t *LinkedUniform::getDataPtrToElement(size_t elementIndex) { ASSERT((!isArray() && elementIndex == 0) || (isArray() && elementIndex < arraySize)); diff --git a/gfx/angle/src/libANGLE/Uniform.h b/gfx/angle/src/libANGLE/Uniform.h index 3b822e52b..4d7d24e3b 100755 --- a/gfx/angle/src/libANGLE/Uniform.h +++ b/gfx/angle/src/libANGLE/Uniform.h @@ -36,7 +36,6 @@ struct LinkedUniform : public sh::Uniform bool isInDefaultBlock() const; bool isField() const; size_t getElementSize() const; - size_t getElementComponents() const; uint8_t *getDataPtrToElement(size_t elementIndex); const uint8_t *getDataPtrToElement(size_t elementIndex) const; diff --git a/gfx/angle/src/libANGLE/Version.h b/gfx/angle/src/libANGLE/Version.h index 4c9730c7b..62985d0da 100755 --- a/gfx/angle/src/libANGLE/Version.h +++ b/gfx/angle/src/libANGLE/Version.h @@ -16,8 +16,8 @@ namespace gl struct Version { - constexpr Version(); - constexpr Version(GLuint major, GLuint minor); + Version(); + Version(GLuint major, GLuint minor); GLuint major; GLuint minor; @@ -26,9 +26,8 @@ struct Version bool operator==(const Version &a, const Version &b); bool operator!=(const Version &a, const Version &b); bool operator>=(const Version &a, const Version &b); -bool operator<=(const Version &a, const Version &b); bool operator<(const Version &a, const Version &b); -bool operator>(const Version &a, const Version &b); + } #include "Version.inl" diff --git a/gfx/angle/src/libANGLE/Version.inl b/gfx/angle/src/libANGLE/Version.inl index 495209720..427f6ca17 100755 --- a/gfx/angle/src/libANGLE/Version.inl +++ b/gfx/angle/src/libANGLE/Version.inl @@ -6,54 +6,38 @@ // Version.inl: Encapsulation of a GL version. -#include - namespace gl { -constexpr Version::Version() +inline Version::Version() : Version(0, 0) { } -// Avoid conflicts with linux system defines -#undef major -#undef minor - -constexpr Version::Version(GLuint major_, GLuint minor_) - : major(major_), - minor(minor_) +inline Version::Version(GLuint major_, GLuint minor_) { + major = major_; + minor = minor_; } inline bool operator==(const Version &a, const Version &b) { - return std::tie(a.major, a.minor) == std::tie(b.major, b.minor); + return a.major == b.major && a.minor == b.minor; } inline bool operator!=(const Version &a, const Version &b) { - return std::tie(a.major, a.minor) != std::tie(b.major, b.minor); + return !(a == b); } inline bool operator>=(const Version &a, const Version &b) { - return std::tie(a.major, a.minor) >= std::tie(b.major, b.minor); -} - -inline bool operator<=(const Version &a, const Version &b) -{ - return std::tie(a.major, a.minor) <= std::tie(b.major, b.minor); + return a.major > b.major || (a.major == b.major && a.minor >= b.minor); } inline bool operator<(const Version &a, const Version &b) { - return std::tie(a.major, a.minor) < std::tie(b.major, b.minor); -} - -inline bool operator>(const Version &a, const Version &b) -{ - return std::tie(a.major, a.minor) > std::tie(b.major, b.minor); + return !(a >= b); } } diff --git a/gfx/angle/src/libANGLE/VertexArray.h b/gfx/angle/src/libANGLE/VertexArray.h index 65c62f1ba..da660e040 100755 --- a/gfx/angle/src/libANGLE/VertexArray.h +++ b/gfx/angle/src/libANGLE/VertexArray.h @@ -87,7 +87,8 @@ class VertexArray final : public LabeledObject return mState.getVertexAttributes(); } - rx::VertexArrayImpl *getImplementation() const { return mVertexArray; } + rx::VertexArrayImpl *getImplementation() { return mVertexArray; } + const rx::VertexArrayImpl *getImplementation() const { return mVertexArray; } size_t getMaxEnabledAttribute() const { return mState.getMaxEnabledAttribute(); } diff --git a/gfx/angle/src/libANGLE/VertexAttribute.h b/gfx/angle/src/libANGLE/VertexAttribute.h index a8cc8573b..d1ee1b47a 100755 --- a/gfx/angle/src/libANGLE/VertexAttribute.h +++ b/gfx/angle/src/libANGLE/VertexAttribute.h @@ -39,6 +39,9 @@ struct VertexAttribute bool operator==(const VertexAttribute &a, const VertexAttribute &b); bool operator!=(const VertexAttribute &a, const VertexAttribute &b); +template +T QuerySingleVertexAttributeParameter(const VertexAttribute& attrib, GLenum pname); + size_t ComputeVertexAttributeTypeSize(const VertexAttribute& attrib); size_t ComputeVertexAttributeStride(const VertexAttribute& attrib); size_t ComputeVertexAttributeElementCount(const VertexAttribute &attrib, diff --git a/gfx/angle/src/libANGLE/VertexAttribute.inl b/gfx/angle/src/libANGLE/VertexAttribute.inl index a1f88f317..0cd31f676 100755 --- a/gfx/angle/src/libANGLE/VertexAttribute.inl +++ b/gfx/angle/src/libANGLE/VertexAttribute.inl @@ -27,6 +27,33 @@ inline bool operator!=(const VertexAttribute &a, const VertexAttribute &b) return !(a == b); } +template +T QuerySingleVertexAttributeParameter(const VertexAttribute& attrib, GLenum pname) +{ + switch (pname) + { + case GL_VERTEX_ATTRIB_ARRAY_ENABLED: + return static_cast(attrib.enabled ? GL_TRUE : GL_FALSE); + case GL_VERTEX_ATTRIB_ARRAY_SIZE: + return static_cast(attrib.size); + case GL_VERTEX_ATTRIB_ARRAY_STRIDE: + return static_cast(attrib.stride); + case GL_VERTEX_ATTRIB_ARRAY_TYPE: + return static_cast(attrib.type); + case GL_VERTEX_ATTRIB_ARRAY_NORMALIZED: + return static_cast(attrib.normalized ? GL_TRUE : GL_FALSE); + case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: + return static_cast(attrib.buffer.id()); + case GL_VERTEX_ATTRIB_ARRAY_DIVISOR: + return static_cast(attrib.divisor); + case GL_VERTEX_ATTRIB_ARRAY_INTEGER: + return static_cast(attrib.pureInteger ? GL_TRUE : GL_FALSE); + default: + UNREACHABLE(); + return static_cast(0); + } +} + inline VertexAttribCurrentValueData::VertexAttribCurrentValueData() : Type(GL_FLOAT) { diff --git a/gfx/angle/src/libANGLE/Workarounds.h b/gfx/angle/src/libANGLE/Workarounds.h deleted file mode 100644 index c5533c1c8..000000000 --- a/gfx/angle/src/libANGLE/Workarounds.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright (c) 2016 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. -// - -// Workarounds.h: Workarounds for driver bugs and other behaviors seen -// on all platforms. - -#ifndef LIBANGLE_WORKAROUNDS_H_ -#define LIBANGLE_WORKAROUNDS_H_ - -namespace gl -{ - -struct Workarounds -{ - // Force the context to be lost (via KHR_robustness) if a GL_OUT_OF_MEMORY error occurs. The - // driver may be in an inconsistent state if this happens, and some users of ANGLE rely on this - // notification to prevent further execution. - bool loseContextOnOutOfMemory = false; -}; -} // namespace gl - -#endif // LIBANGLE_WORKAROUNDS_H_ diff --git a/gfx/angle/src/libANGLE/angletypes.cpp b/gfx/angle/src/libANGLE/angletypes.cpp index 70a3ae645..0cd69963e 100755 --- a/gfx/angle/src/libANGLE/angletypes.cpp +++ b/gfx/angle/src/libANGLE/angletypes.cpp @@ -49,8 +49,7 @@ SamplerState::SamplerState() minLod(-1000.0f), maxLod(1000.0f), compareMode(GL_NONE), - compareFunc(GL_LEQUAL), - sRGBDecode(GL_DECODE_EXT) + compareFunc(GL_LEQUAL) { } diff --git a/gfx/angle/src/libANGLE/angletypes.h b/gfx/angle/src/libANGLE/angletypes.h index 4c345c3d0..e6923c8ad 100755 --- a/gfx/angle/src/libANGLE/angletypes.h +++ b/gfx/angle/src/libANGLE/angletypes.h @@ -192,46 +192,64 @@ struct SamplerState GLenum compareMode; GLenum compareFunc; - - GLenum sRGBDecode; }; bool operator==(const SamplerState &a, const SamplerState &b); bool operator!=(const SamplerState &a, const SamplerState &b); -struct PixelStoreStateBase +struct PixelUnpackState { BindingPointer pixelBuffer; - GLint alignment = 4; - GLint rowLength = 0; - GLint skipRows = 0; - GLint skipPixels = 0; - GLint imageHeight = 0; - GLint skipImages = 0; -}; - -struct PixelUnpackState : PixelStoreStateBase -{ - PixelUnpackState() {} + GLint alignment; + GLint rowLength; + GLint skipRows; + GLint skipPixels; + GLint imageHeight; + GLint skipImages; + + PixelUnpackState() + : alignment(4), + rowLength(0), + skipRows(0), + skipPixels(0), + imageHeight(0), + skipImages(0) + {} PixelUnpackState(GLint alignmentIn, GLint rowLengthIn) - { - alignment = alignmentIn; - rowLength = rowLengthIn; - } + : alignment(alignmentIn), + rowLength(rowLengthIn), + skipRows(0), + skipPixels(0), + imageHeight(0), + skipImages(0) + {} }; -struct PixelPackState : PixelStoreStateBase +struct PixelPackState { - PixelPackState() {} - - PixelPackState(GLint alignmentIn, bool reverseRowOrderIn) - : reverseRowOrder(reverseRowOrderIn) - { - alignment = alignmentIn; - } - - bool reverseRowOrder = false; + BindingPointer pixelBuffer; + GLint alignment; + bool reverseRowOrder; + GLint rowLength; + GLint skipRows; + GLint skipPixels; + + PixelPackState() + : alignment(4), + reverseRowOrder(false), + rowLength(0), + skipRows(0), + skipPixels(0) + {} + + explicit PixelPackState(GLint alignmentIn, bool reverseRowOrderIn) + : alignment(alignmentIn), + reverseRowOrder(reverseRowOrderIn), + rowLength(0), + skipRows(0), + skipPixels(0) + {} }; // Used in Program and VertexArray. @@ -248,6 +266,17 @@ using ResourceMap = std::unordered_map; namespace rx { +enum VendorID : uint32_t +{ + VENDOR_ID_UNKNOWN = 0x0, + VENDOR_ID_AMD = 0x1002, + VENDOR_ID_INTEL = 0x8086, + VENDOR_ID_NVIDIA = 0x10DE, + // This is Qualcomm PCI Vendor ID. + // Android doesn't have a PCI bus, but all we need is a unique id. + VENDOR_ID_QUALCOMM = 0x5143, +}; + // A macro that determines whether an object has a given runtime type. #if defined(__clang__) #if __has_feature(cxx_rtti) @@ -288,6 +317,12 @@ inline DestT *GetImplAs(SrcT *src) return GetAs(src->getImplementation()); } +template +inline const DestT *GetImplAs(const SrcT *src) +{ + return GetAs(src->getImplementation()); +} + } #include "angletypes.inl" diff --git a/gfx/angle/src/libANGLE/es3_copy_conversion_formats.json b/gfx/angle/src/libANGLE/es3_copy_conversion_formats.json deleted file mode 100644 index 39b71fd93..000000000 --- a/gfx/angle/src/libANGLE/es3_copy_conversion_formats.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "From ES 3.0.1 spec, table 3.15": - [ - [ "GL_ALPHA", "GL_RGBA" ], - [ "GL_LUMINANCE", "GL_RED" ], - [ "GL_LUMINANCE", "GL_RG" ], - [ "GL_LUMINANCE", "GL_RGB" ], - [ "GL_LUMINANCE", "GL_RGBA" ], - [ "GL_LUMINANCE_ALPHA", "GL_RGBA" ], - [ "GL_RED", "GL_RED" ], - [ "GL_RED", "GL_RG" ], - [ "GL_RED", "GL_RGB" ], - [ "GL_RED", "GL_RGBA" ], - [ "GL_RG", "GL_RG" ], - [ "GL_RG", "GL_RGB" ], - [ "GL_RG", "GL_RGBA" ], - [ "GL_RGB", "GL_RGB" ], - [ "GL_RGB", "GL_RGBA" ], - [ "GL_RGBA", "GL_RGBA" ] - ], - - "Necessary for ANGLE back-buffers": - [ - [ "GL_ALPHA", "GL_BGRA_EXT" ], - [ "GL_LUMINANCE", "GL_BGRA_EXT" ], - [ "GL_LUMINANCE_ALPHA", "GL_BGRA_EXT" ], - [ "GL_RED", "GL_BGRA_EXT" ], - [ "GL_RG", "GL_BGRA_EXT" ], - [ "GL_RGB", "GL_BGRA_EXT" ], - [ "GL_RGBA", "GL_BGRA_EXT" ], - [ "GL_BGRA_EXT", "GL_BGRA_EXT" ], - - [ "GL_RED_INTEGER", "GL_RED_INTEGER" ], - [ "GL_RED_INTEGER", "GL_RG_INTEGER" ], - [ "GL_RED_INTEGER", "GL_RGB_INTEGER" ], - [ "GL_RED_INTEGER", "GL_RGBA_INTEGER" ], - [ "GL_RG_INTEGER", "GL_RG_INTEGER" ], - [ "GL_RG_INTEGER", "GL_RGB_INTEGER" ], - [ "GL_RG_INTEGER", "GL_RGBA_INTEGER" ], - [ "GL_RGB_INTEGER", "GL_RGB_INTEGER" ], - [ "GL_RGB_INTEGER", "GL_RGBA_INTEGER" ], - [ "GL_RGBA_INTEGER", "GL_RGBA_INTEGER" ] - ] -} diff --git a/gfx/angle/src/libANGLE/es3_copy_conversion_table_autogen.cpp b/gfx/angle/src/libANGLE/es3_copy_conversion_table_autogen.cpp deleted file mode 100644 index 3647445c5..000000000 --- a/gfx/angle/src/libANGLE/es3_copy_conversion_table_autogen.cpp +++ /dev/null @@ -1,171 +0,0 @@ -// GENERATED FILE - DO NOT EDIT. -// Generated by gen_copy_conversion_table.py using data from es3_copy_conversion_formats.json. -// -// Copyright 2016 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. -// -// format_map: -// Determining the sized internal format from a (format,type) pair. -// Also check es3 format combinations for validity. - -#include "angle_gl.h" -#include "common/debug.h" - -namespace gl -{ - -bool ValidES3CopyConversion(GLenum textureFormat, GLenum framebufferFormat) -{ - switch (textureFormat) - { - case GL_ALPHA: - switch (framebufferFormat) - { - case GL_BGRA_EXT: - case GL_RGBA: - return true; - default: - break; - } - break; - - case GL_BGRA_EXT: - switch (framebufferFormat) - { - case GL_BGRA_EXT: - return true; - default: - break; - } - break; - - case GL_LUMINANCE: - switch (framebufferFormat) - { - case GL_BGRA_EXT: - case GL_RED: - case GL_RG: - case GL_RGB: - case GL_RGBA: - return true; - default: - break; - } - break; - - case GL_LUMINANCE_ALPHA: - switch (framebufferFormat) - { - case GL_BGRA_EXT: - case GL_RGBA: - return true; - default: - break; - } - break; - - case GL_RED: - switch (framebufferFormat) - { - case GL_BGRA_EXT: - case GL_RED: - case GL_RG: - case GL_RGB: - case GL_RGBA: - return true; - default: - break; - } - break; - - case GL_RED_INTEGER: - switch (framebufferFormat) - { - case GL_RED_INTEGER: - case GL_RGBA_INTEGER: - case GL_RGB_INTEGER: - case GL_RG_INTEGER: - return true; - default: - break; - } - break; - - case GL_RG: - switch (framebufferFormat) - { - case GL_BGRA_EXT: - case GL_RG: - case GL_RGB: - case GL_RGBA: - return true; - default: - break; - } - break; - - case GL_RGB: - switch (framebufferFormat) - { - case GL_BGRA_EXT: - case GL_RGB: - case GL_RGBA: - return true; - default: - break; - } - break; - - case GL_RGBA: - switch (framebufferFormat) - { - case GL_BGRA_EXT: - case GL_RGBA: - return true; - default: - break; - } - break; - - case GL_RGBA_INTEGER: - switch (framebufferFormat) - { - case GL_RGBA_INTEGER: - return true; - default: - break; - } - break; - - case GL_RGB_INTEGER: - switch (framebufferFormat) - { - case GL_RGBA_INTEGER: - case GL_RGB_INTEGER: - return true; - default: - break; - } - break; - - case GL_RG_INTEGER: - switch (framebufferFormat) - { - case GL_RGBA_INTEGER: - case GL_RGB_INTEGER: - case GL_RG_INTEGER: - return true; - default: - break; - } - break; - - default: - break; - } - - return false; -} - -} // namespace gl diff --git a/gfx/angle/src/libANGLE/es3_format_type_combinations.json b/gfx/angle/src/libANGLE/es3_format_type_combinations.json deleted file mode 100644 index fb12242e7..000000000 --- a/gfx/angle/src/libANGLE/es3_format_type_combinations.json +++ /dev/null @@ -1,171 +0,0 @@ -{ - "Format combinations from ES 3.0.1 spec, table 3.2": - [ - [ "GL_RGBA8", "GL_RGBA", "GL_UNSIGNED_BYTE" ], - [ "GL_RGB5_A1", "GL_RGBA", "GL_UNSIGNED_BYTE" ], - [ "GL_RGBA4", "GL_RGBA", "GL_UNSIGNED_BYTE" ], - [ "GL_SRGB8_ALPHA8", "GL_RGBA", "GL_UNSIGNED_BYTE" ], - [ "GL_RGBA8_SNORM", "GL_RGBA", "GL_BYTE" ], - [ "GL_RGBA4", "GL_RGBA", "GL_UNSIGNED_SHORT_4_4_4_4" ], - [ "GL_RGB10_A2", "GL_RGBA", "GL_UNSIGNED_INT_2_10_10_10_REV" ], - [ "GL_RGB5_A1", "GL_RGBA", "GL_UNSIGNED_INT_2_10_10_10_REV" ], - [ "GL_RGB5_A1", "GL_RGBA", "GL_UNSIGNED_SHORT_5_5_5_1" ], - [ "GL_RGBA16F", "GL_RGBA", "GL_HALF_FLOAT" ], - [ "GL_RGBA16F", "GL_RGBA", "GL_HALF_FLOAT_OES" ], - [ "GL_RGBA32F", "GL_RGBA", "GL_FLOAT" ], - [ "GL_RGBA16F", "GL_RGBA", "GL_FLOAT" ], - [ "GL_RGBA8UI", "GL_RGBA_INTEGER", "GL_UNSIGNED_BYTE" ], - [ "GL_RGBA8I", "GL_RGBA_INTEGER", "GL_BYTE" ], - [ "GL_RGBA16UI", "GL_RGBA_INTEGER", "GL_UNSIGNED_SHORT" ], - [ "GL_RGBA16I", "GL_RGBA_INTEGER", "GL_SHORT" ], - [ "GL_RGBA32UI", "GL_RGBA_INTEGER", "GL_UNSIGNED_INT" ], - [ "GL_RGBA32I", "GL_RGBA_INTEGER", "GL_INT" ], - [ "GL_RGB10_A2UI", "GL_RGBA_INTEGER", "GL_UNSIGNED_INT_2_10_10_10_REV" ], - [ "GL_RGB8", "GL_RGB", "GL_UNSIGNED_BYTE" ], - [ "GL_RGB565", "GL_RGB", "GL_UNSIGNED_BYTE" ], - [ "GL_SRGB8", "GL_RGB", "GL_UNSIGNED_BYTE" ], - [ "GL_RGB8_SNORM", "GL_RGB", "GL_BYTE" ], - [ "GL_RGB565", "GL_RGB", "GL_UNSIGNED_SHORT_5_6_5" ], - [ "GL_R11F_G11F_B10F", "GL_RGB", "GL_UNSIGNED_INT_10F_11F_11F_REV" ], - [ "GL_RGB9_E5", "GL_RGB", "GL_UNSIGNED_INT_5_9_9_9_REV" ], - [ "GL_RGB16F", "GL_RGB", "GL_HALF_FLOAT" ], - [ "GL_RGB16F", "GL_RGB", "GL_HALF_FLOAT_OES" ], - [ "GL_R11F_G11F_B10F", "GL_RGB", "GL_HALF_FLOAT" ], - [ "GL_R11F_G11F_B10F", "GL_RGB", "GL_HALF_FLOAT_OES" ], - [ "GL_RGB9_E5", "GL_RGB", "GL_HALF_FLOAT" ], - [ "GL_RGB9_E5", "GL_RGB", "GL_HALF_FLOAT_OES" ], - [ "GL_RGB32F", "GL_RGB", "GL_FLOAT" ], - [ "GL_RGB16F", "GL_RGB", "GL_FLOAT" ], - [ "GL_R11F_G11F_B10F", "GL_RGB", "GL_FLOAT" ], - [ "GL_RGB9_E5", "GL_RGB", "GL_FLOAT" ], - [ "GL_RGB8UI", "GL_RGB_INTEGER", "GL_UNSIGNED_BYTE" ], - [ "GL_RGB8I", "GL_RGB_INTEGER", "GL_BYTE" ], - [ "GL_RGB16UI", "GL_RGB_INTEGER", "GL_UNSIGNED_SHORT" ], - [ "GL_RGB16I", "GL_RGB_INTEGER", "GL_SHORT" ], - [ "GL_RGB32UI", "GL_RGB_INTEGER", "GL_UNSIGNED_INT" ], - [ "GL_RGB32I", "GL_RGB_INTEGER", "GL_INT" ], - [ "GL_RG8", "GL_RG", "GL_UNSIGNED_BYTE" ], - [ "GL_RG8_SNORM", "GL_RG", "GL_BYTE" ], - [ "GL_RG16F", "GL_RG", "GL_HALF_FLOAT" ], - [ "GL_RG16F", "GL_RG", "GL_HALF_FLOAT_OES" ], - [ "GL_RG32F", "GL_RG", "GL_FLOAT" ], - [ "GL_RG16F", "GL_RG", "GL_FLOAT" ], - [ "GL_RG8UI", "GL_RG_INTEGER", "GL_UNSIGNED_BYTE" ], - [ "GL_RG8I", "GL_RG_INTEGER", "GL_BYTE" ], - [ "GL_RG16UI", "GL_RG_INTEGER", "GL_UNSIGNED_SHORT" ], - [ "GL_RG16I", "GL_RG_INTEGER", "GL_SHORT" ], - [ "GL_RG32UI", "GL_RG_INTEGER", "GL_UNSIGNED_INT" ], - [ "GL_RG32I", "GL_RG_INTEGER", "GL_INT" ], - [ "GL_R8", "GL_RED", "GL_UNSIGNED_BYTE" ], - [ "GL_R8_SNORM", "GL_RED", "GL_BYTE" ], - [ "GL_R16F", "GL_RED", "GL_HALF_FLOAT" ], - [ "GL_R16F", "GL_RED", "GL_HALF_FLOAT_OES" ], - [ "GL_R32F", "GL_RED", "GL_FLOAT" ], - [ "GL_R16F", "GL_RED", "GL_FLOAT" ], - [ "GL_R8UI", "GL_RED_INTEGER", "GL_UNSIGNED_BYTE" ], - [ "GL_R8I", "GL_RED_INTEGER", "GL_BYTE" ], - [ "GL_R16UI", "GL_RED_INTEGER", "GL_UNSIGNED_SHORT" ], - [ "GL_R16I", "GL_RED_INTEGER", "GL_SHORT" ], - [ "GL_R32UI", "GL_RED_INTEGER", "GL_UNSIGNED_INT" ], - [ "GL_R32I", "GL_RED_INTEGER", "GL_INT" ] - ], - "Unsized formats": - [ - [ "GL_RGBA", "GL_RGBA", "GL_UNSIGNED_BYTE" ], - [ "GL_RGBA", "GL_RGBA", "GL_UNSIGNED_SHORT_4_4_4_4" ], - [ "GL_RGBA", "GL_RGBA", "GL_UNSIGNED_SHORT_5_5_5_1" ], - [ "GL_RGB", "GL_RGB", "GL_UNSIGNED_BYTE" ], - [ "GL_RGB", "GL_RGB", "GL_UNSIGNED_SHORT_5_6_5" ], - [ "GL_LUMINANCE_ALPHA", "GL_LUMINANCE_ALPHA", "GL_UNSIGNED_BYTE" ], - [ "GL_LUMINANCE", "GL_LUMINANCE", "GL_UNSIGNED_BYTE" ], - [ "GL_ALPHA", "GL_ALPHA", "GL_UNSIGNED_BYTE" ], - [ "GL_SRGB_ALPHA_EXT", "GL_SRGB_ALPHA_EXT", "GL_UNSIGNED_BYTE" ], - [ "GL_SRGB_EXT", "GL_SRGB_EXT", "GL_UNSIGNED_BYTE" ], - [ "GL_RG", "GL_RG", "GL_UNSIGNED_BYTE" ], - [ "GL_RG", "GL_RG", "GL_FLOAT" ], - [ "GL_RG", "GL_RG", "GL_HALF_FLOAT" ], - [ "GL_RG", "GL_RG", "GL_HALF_FLOAT_OES" ], - [ "GL_RED", "GL_RED", "GL_UNSIGNED_BYTE" ], - [ "GL_RED", "GL_RED", "GL_FLOAT" ], - [ "GL_RED", "GL_RED", "GL_HALF_FLOAT" ], - [ "GL_RED", "GL_RED", "GL_HALF_FLOAT_OES" ], - [ "GL_DEPTH_STENCIL", "GL_DEPTH_STENCIL", "GL_UNSIGNED_INT_24_8" ] - ], - "Depth stencil formats": - [ - [ "GL_DEPTH_COMPONENT16", "GL_DEPTH_COMPONENT", "GL_UNSIGNED_SHORT" ], - [ "GL_DEPTH_COMPONENT24", "GL_DEPTH_COMPONENT", "GL_UNSIGNED_INT" ], - [ "GL_DEPTH_COMPONENT16", "GL_DEPTH_COMPONENT", "GL_UNSIGNED_INT" ], - [ "GL_DEPTH_COMPONENT32F", "GL_DEPTH_COMPONENT", "GL_FLOAT" ], - [ "GL_DEPTH24_STENCIL8", "GL_DEPTH_STENCIL", "GL_UNSIGNED_INT_24_8" ], - [ "GL_DEPTH32F_STENCIL8", "GL_DEPTH_STENCIL", "GL_FLOAT_32_UNSIGNED_INT_24_8_REV" ] - ], - "From GL_EXT_sRGB": - [ - [ "GL_SRGB8_ALPHA8_EXT", "GL_SRGB_ALPHA_EXT", "GL_UNSIGNED_BYTE" ], - [ "GL_SRGB8", "GL_SRGB_EXT", "GL_UNSIGNED_BYTE" ] - ], - "From GL_OES_texture_float": - [ - [ "GL_RGBA", "GL_RGBA", "GL_FLOAT" ], - [ "GL_RGB", "GL_RGB", "GL_FLOAT" ], - [ "GL_LUMINANCE_ALPHA", "GL_LUMINANCE_ALPHA", "GL_FLOAT" ], - [ "GL_LUMINANCE", "GL_LUMINANCE", "GL_FLOAT" ], - [ "GL_ALPHA", "GL_ALPHA", "GL_FLOAT" ] - ], - "From GL_OES_texture_half_float": - [ - [ "GL_RGBA", "GL_RGBA", "GL_HALF_FLOAT_OES" ], - [ "GL_RGB", "GL_RGB", "GL_HALF_FLOAT_OES" ], - [ "GL_LUMINANCE_ALPHA", "GL_LUMINANCE_ALPHA", "GL_HALF_FLOAT" ], - [ "GL_LUMINANCE_ALPHA", "GL_LUMINANCE_ALPHA", "GL_HALF_FLOAT_OES" ], - [ "GL_LUMINANCE", "GL_LUMINANCE", "GL_HALF_FLOAT" ], - [ "GL_LUMINANCE", "GL_LUMINANCE", "GL_HALF_FLOAT_OES" ], - [ "GL_ALPHA", "GL_ALPHA", "GL_HALF_FLOAT" ], - [ "GL_ALPHA", "GL_ALPHA", "GL_HALF_FLOAT_OES" ] - ], - "From GL_EXT_texture_format_BGRA8888": - [ - [ "GL_BGRA_EXT", "GL_BGRA_EXT", "GL_UNSIGNED_BYTE" ] - ], - "From GL_EXT_texture_storage": - [ - [ "GL_ALPHA8_EXT", "GL_ALPHA", "GL_UNSIGNED_BYTE" ], - [ "GL_LUMINANCE8_EXT", "GL_LUMINANCE", "GL_UNSIGNED_BYTE" ], - [ "GL_LUMINANCE8_ALPHA8_EXT", "GL_LUMINANCE_ALPHA", "GL_UNSIGNED_BYTE" ], - [ "GL_ALPHA32F_EXT", "GL_ALPHA", "GL_FLOAT" ], - [ "GL_LUMINANCE32F_EXT", "GL_LUMINANCE", "GL_FLOAT" ], - [ "GL_LUMINANCE_ALPHA32F_EXT", "GL_LUMINANCE_ALPHA", "GL_FLOAT" ], - [ "GL_ALPHA16F_EXT", "GL_ALPHA", "GL_HALF_FLOAT" ], - [ "GL_ALPHA16F_EXT", "GL_ALPHA", "GL_HALF_FLOAT_OES" ], - [ "GL_LUMINANCE16F_EXT", "GL_LUMINANCE", "GL_HALF_FLOAT" ], - [ "GL_LUMINANCE16F_EXT", "GL_LUMINANCE", "GL_HALF_FLOAT_OES" ], - [ "GL_LUMINANCE_ALPHA16F_EXT", "GL_LUMINANCE_ALPHA", "GL_HALF_FLOAT" ], - [ "GL_LUMINANCE_ALPHA16F_EXT", "GL_LUMINANCE_ALPHA", "GL_HALF_FLOAT_OES" ] - ], - "From GL_EXT_texture_storage and GL_EXT_texture_format_BGRA8888": - [ - [ "GL_BGRA8_EXT", "GL_BGRA_EXT", "GL_UNSIGNED_BYTE" ], - [ "GL_BGRA4_ANGLEX", "GL_BGRA_EXT", "GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT" ], - [ "GL_BGRA4_ANGLEX", "GL_BGRA_EXT", "GL_UNSIGNED_BYTE" ], - [ "GL_BGR5_A1_ANGLEX", "GL_BGRA_EXT", "GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT" ], - [ "GL_BGR5_A1_ANGLEX", "GL_BGRA_EXT", "GL_UNSIGNED_BYTE" ] - ], - "From GL_ANGLE_depth_texture and OES_depth_texture": - [ - [ "GL_DEPTH_COMPONENT32_OES", "GL_DEPTH_COMPONENT", "GL_UNSIGNED_INT_24_8" ], - [ "GL_DEPTH_COMPONENT", "GL_DEPTH_COMPONENT", "GL_UNSIGNED_SHORT" ], - [ "GL_DEPTH_COMPONENT", "GL_DEPTH_COMPONENT", "GL_UNSIGNED_INT" ] - ], - "From GL_EXT_texture_norm16": - [ - [ "GL_R16_EXT", "GL_RED", "GL_UNSIGNED_SHORT" ], - [ "GL_RG16_EXT", "GL_RG", "GL_UNSIGNED_SHORT" ], - [ "GL_RGB16_EXT", "GL_RGB", "GL_UNSIGNED_SHORT" ], - [ "GL_RGBA16_EXT", "GL_RGBA", "GL_UNSIGNED_SHORT" ], - [ "GL_R16_SNORM_EXT", "GL_RED", "GL_SHORT" ], - [ "GL_RG16_SNORM_EXT", "GL_RG", "GL_SHORT" ], - [ "GL_RGB16_SNORM_EXT", "GL_RGB", "GL_SHORT" ], - [ "GL_RGBA16_SNORM_EXT", "GL_RGBA", "GL_SHORT" ] - ] -} diff --git a/gfx/angle/src/libANGLE/format_map_autogen.cpp b/gfx/angle/src/libANGLE/format_map_autogen.cpp deleted file mode 100644 index 707d38426..000000000 --- a/gfx/angle/src/libANGLE/format_map_autogen.cpp +++ /dev/null @@ -1,1530 +0,0 @@ -// GENERATED FILE - DO NOT EDIT. -// Generated by gen_format_map.py using data from format_map_data.json. -// ES3 format info from es3_format_type_combinations.json. -// -// Copyright 2016 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. -// -// format_map: -// Determining the sized internal format from a (format,type) pair. -// Also check es3 format combinations for validity. - -#include "angle_gl.h" -#include "common/debug.h" - -namespace gl -{ - -GLenum GetSizedFormatInternal(GLenum format, GLenum type) -{ - switch (format) - { - case GL_ALPHA: - switch (type) - { - case GL_FLOAT: - return GL_ALPHA32F_EXT; - case GL_HALF_FLOAT: - return GL_ALPHA16F_EXT; - case GL_HALF_FLOAT_OES: - return GL_ALPHA16F_EXT; - case GL_UNSIGNED_BYTE: - return GL_ALPHA8_EXT; - default: - break; - } - break; - - case GL_BGRA_EXT: - switch (type) - { - case GL_UNSIGNED_BYTE: - return GL_BGRA8_EXT; - case GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT: - return GL_BGR5_A1_ANGLEX; - case GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT: - return GL_BGRA4_ANGLEX; - case GL_UNSIGNED_SHORT_5_6_5: - return GL_BGR565_ANGLEX; - default: - break; - } - break; - - case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: - switch (type) - { - case GL_UNSIGNED_BYTE: - return GL_COMPRESSED_RGBA_S3TC_DXT1_EXT; - default: - break; - } - break; - - case GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE: - switch (type) - { - case GL_UNSIGNED_BYTE: - return GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE; - default: - break; - } - break; - - case GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE: - switch (type) - { - case GL_UNSIGNED_BYTE: - return GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE; - default: - break; - } - break; - - case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: - switch (type) - { - case GL_UNSIGNED_BYTE: - return GL_COMPRESSED_RGB_S3TC_DXT1_EXT; - default: - break; - } - break; - - case GL_DEPTH_COMPONENT: - switch (type) - { - case GL_FLOAT: - return GL_DEPTH_COMPONENT32F; - case GL_UNSIGNED_INT: - return GL_DEPTH_COMPONENT32_OES; - case GL_UNSIGNED_SHORT: - return GL_DEPTH_COMPONENT16; - default: - break; - } - break; - - case GL_DEPTH_STENCIL: - switch (type) - { - case GL_FLOAT_32_UNSIGNED_INT_24_8_REV: - return GL_DEPTH32F_STENCIL8; - case GL_UNSIGNED_INT_24_8: - return GL_DEPTH24_STENCIL8; - default: - break; - } - break; - - case GL_LUMINANCE: - switch (type) - { - case GL_FLOAT: - return GL_LUMINANCE32F_EXT; - case GL_HALF_FLOAT: - return GL_LUMINANCE16F_EXT; - case GL_HALF_FLOAT_OES: - return GL_LUMINANCE16F_EXT; - case GL_UNSIGNED_BYTE: - return GL_LUMINANCE8_EXT; - default: - break; - } - break; - - case GL_LUMINANCE_ALPHA: - switch (type) - { - case GL_FLOAT: - return GL_LUMINANCE_ALPHA32F_EXT; - case GL_HALF_FLOAT: - return GL_LUMINANCE_ALPHA16F_EXT; - case GL_HALF_FLOAT_OES: - return GL_LUMINANCE_ALPHA16F_EXT; - case GL_UNSIGNED_BYTE: - return GL_LUMINANCE8_ALPHA8_EXT; - default: - break; - } - break; - - case GL_RED: - switch (type) - { - case GL_BYTE: - return GL_R8_SNORM; - case GL_FLOAT: - return GL_R32F; - case GL_HALF_FLOAT: - return GL_R16F; - case GL_HALF_FLOAT_OES: - return GL_R16F; - case GL_SHORT: - return GL_R16_SNORM_EXT; - case GL_UNSIGNED_BYTE: - return GL_R8; - case GL_UNSIGNED_SHORT: - return GL_R16_EXT; - default: - break; - } - break; - - case GL_RED_INTEGER: - switch (type) - { - case GL_BYTE: - return GL_R8I; - case GL_INT: - return GL_R32I; - case GL_SHORT: - return GL_R16I; - case GL_UNSIGNED_BYTE: - return GL_R8UI; - case GL_UNSIGNED_INT: - return GL_R32UI; - case GL_UNSIGNED_SHORT: - return GL_R16UI; - default: - break; - } - break; - - case GL_RG: - switch (type) - { - case GL_BYTE: - return GL_RG8_SNORM; - case GL_FLOAT: - return GL_RG32F; - case GL_HALF_FLOAT: - return GL_RG16F; - case GL_HALF_FLOAT_OES: - return GL_RG16F; - case GL_SHORT: - return GL_RG16_SNORM_EXT; - case GL_UNSIGNED_BYTE: - return GL_RG8; - case GL_UNSIGNED_SHORT: - return GL_RG16_EXT; - default: - break; - } - break; - - case GL_RGB: - switch (type) - { - case GL_BYTE: - return GL_RGB8_SNORM; - case GL_FLOAT: - return GL_RGB32F; - case GL_HALF_FLOAT: - return GL_RGB16F; - case GL_HALF_FLOAT_OES: - return GL_RGB16F; - case GL_SHORT: - return GL_RGB16_SNORM_EXT; - case GL_UNSIGNED_BYTE: - return GL_RGB8; - case GL_UNSIGNED_INT_10F_11F_11F_REV: - return GL_R11F_G11F_B10F; - case GL_UNSIGNED_INT_5_9_9_9_REV: - return GL_RGB9_E5; - case GL_UNSIGNED_SHORT: - return GL_RGB16_EXT; - case GL_UNSIGNED_SHORT_5_6_5: - return GL_RGB565; - default: - break; - } - break; - - case GL_RGBA: - switch (type) - { - case GL_BYTE: - return GL_RGBA8_SNORM; - case GL_FLOAT: - return GL_RGBA32F; - case GL_HALF_FLOAT: - return GL_RGBA16F; - case GL_HALF_FLOAT_OES: - return GL_RGBA16F; - case GL_SHORT: - return GL_RGBA16_SNORM_EXT; - case GL_UNSIGNED_BYTE: - return GL_RGBA8; - case GL_UNSIGNED_INT_2_10_10_10_REV: - return GL_RGB10_A2; - case GL_UNSIGNED_SHORT: - return GL_RGBA16_EXT; - case GL_UNSIGNED_SHORT_4_4_4_4: - return GL_RGBA4; - case GL_UNSIGNED_SHORT_5_5_5_1: - return GL_RGB5_A1; - default: - break; - } - break; - - case GL_RGBA_INTEGER: - switch (type) - { - case GL_BYTE: - return GL_RGBA8I; - case GL_INT: - return GL_RGBA32I; - case GL_SHORT: - return GL_RGBA16I; - case GL_UNSIGNED_BYTE: - return GL_RGBA8UI; - case GL_UNSIGNED_INT: - return GL_RGBA32UI; - case GL_UNSIGNED_INT_2_10_10_10_REV: - return GL_RGB10_A2UI; - case GL_UNSIGNED_SHORT: - return GL_RGBA16UI; - default: - break; - } - break; - - case GL_RGB_INTEGER: - switch (type) - { - case GL_BYTE: - return GL_RGB8I; - case GL_INT: - return GL_RGB32I; - case GL_SHORT: - return GL_RGB16I; - case GL_UNSIGNED_BYTE: - return GL_RGB8UI; - case GL_UNSIGNED_INT: - return GL_RGB32UI; - case GL_UNSIGNED_SHORT: - return GL_RGB16UI; - default: - break; - } - break; - - case GL_RG_INTEGER: - switch (type) - { - case GL_BYTE: - return GL_RG8I; - case GL_INT: - return GL_RG32I; - case GL_SHORT: - return GL_RG16I; - case GL_UNSIGNED_BYTE: - return GL_RG8UI; - case GL_UNSIGNED_INT: - return GL_RG32UI; - case GL_UNSIGNED_SHORT: - return GL_RG16UI; - default: - break; - } - break; - - case GL_SRGB_ALPHA_EXT: - switch (type) - { - case GL_UNSIGNED_BYTE: - return GL_SRGB8_ALPHA8; - default: - break; - } - break; - - case GL_SRGB_EXT: - switch (type) - { - case GL_UNSIGNED_BYTE: - return GL_SRGB8; - default: - break; - } - break; - - case GL_STENCIL: - switch (type) - { - case GL_UNSIGNED_BYTE: - return GL_STENCIL_INDEX8; - default: - break; - } - break; - - case GL_NONE: - return GL_NONE; - - default: - break; - } - - return GL_NONE; -} - -bool ValidES3Format(GLenum format) -{ - switch (format) - { - case GL_ALPHA: - case GL_BGRA_EXT: - case GL_DEPTH_COMPONENT: - case GL_DEPTH_STENCIL: - case GL_LUMINANCE: - case GL_LUMINANCE_ALPHA: - case GL_RED: - case GL_RED_INTEGER: - case GL_RG: - case GL_RGB: - case GL_RGBA: - case GL_RGBA_INTEGER: - case GL_RGB_INTEGER: - case GL_RG_INTEGER: - case GL_SRGB_ALPHA_EXT: - case GL_SRGB_EXT: - return true; - - default: - return false; - } -} - -bool ValidES3Type(GLenum type) -{ - switch (type) - { - case GL_BYTE: - case GL_FLOAT: - case GL_FLOAT_32_UNSIGNED_INT_24_8_REV: - case GL_HALF_FLOAT: - case GL_HALF_FLOAT_OES: - case GL_INT: - case GL_SHORT: - case GL_UNSIGNED_BYTE: - case GL_UNSIGNED_INT: - case GL_UNSIGNED_INT_10F_11F_11F_REV: - case GL_UNSIGNED_INT_24_8: - case GL_UNSIGNED_INT_2_10_10_10_REV: - case GL_UNSIGNED_INT_5_9_9_9_REV: - case GL_UNSIGNED_SHORT: - case GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_5_6_5: - return true; - - default: - return false; - } -} - -bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat) -{ - ASSERT(ValidES3Format(format) && ValidES3Type(type)); - - switch (format) - { - case GL_RGB_INTEGER: - switch (type) - { - case GL_INT: - { - switch (internalFormat) - { - case GL_RGB32I: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_SHORT: - { - switch (internalFormat) - { - case GL_RGB16UI: - return true; - default: - break; - } - break; - } - case GL_SHORT: - { - switch (internalFormat) - { - case GL_RGB16I: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_BYTE: - { - switch (internalFormat) - { - case GL_RGB8UI: - return true; - default: - break; - } - break; - } - case GL_BYTE: - { - switch (internalFormat) - { - case GL_RGB8I: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_INT: - { - switch (internalFormat) - { - case GL_RGB32UI: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - case GL_RGBA_INTEGER: - switch (type) - { - case GL_INT: - { - switch (internalFormat) - { - case GL_RGBA32I: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_SHORT: - { - switch (internalFormat) - { - case GL_RGBA16UI: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_INT_2_10_10_10_REV: - { - switch (internalFormat) - { - case GL_RGB10_A2UI: - return true; - default: - break; - } - break; - } - case GL_SHORT: - { - switch (internalFormat) - { - case GL_RGBA16I: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_BYTE: - { - switch (internalFormat) - { - case GL_RGBA8UI: - return true; - default: - break; - } - break; - } - case GL_BYTE: - { - switch (internalFormat) - { - case GL_RGBA8I: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_INT: - { - switch (internalFormat) - { - case GL_RGBA32UI: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - case GL_RGB: - switch (type) - { - case GL_UNSIGNED_INT_10F_11F_11F_REV: - { - switch (internalFormat) - { - case GL_R11F_G11F_B10F: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_SHORT: - { - switch (internalFormat) - { - case GL_RGB16_EXT: - return true; - default: - break; - } - break; - } - case GL_SHORT: - { - switch (internalFormat) - { - case GL_RGB16_SNORM_EXT: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_BYTE: - { - switch (internalFormat) - { - case GL_RGB: - case GL_RGB8: - case GL_RGB565: - case GL_SRGB8: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_SHORT_5_6_5: - { - switch (internalFormat) - { - case GL_RGB: - case GL_RGB565: - return true; - default: - break; - } - break; - } - case GL_HALF_FLOAT_OES: - { - switch (internalFormat) - { - case GL_RGB: - case GL_RGB16F: - case GL_R11F_G11F_B10F: - case GL_RGB9_E5: - return true; - default: - break; - } - break; - } - case GL_HALF_FLOAT: - { - switch (internalFormat) - { - case GL_RGB16F: - case GL_R11F_G11F_B10F: - case GL_RGB9_E5: - return true; - default: - break; - } - break; - } - case GL_FLOAT: - { - switch (internalFormat) - { - case GL_RGB: - case GL_RGB32F: - case GL_RGB16F: - case GL_R11F_G11F_B10F: - case GL_RGB9_E5: - return true; - default: - break; - } - break; - } - case GL_BYTE: - { - switch (internalFormat) - { - case GL_RGB8_SNORM: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_INT_5_9_9_9_REV: - { - switch (internalFormat) - { - case GL_RGB9_E5: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - case GL_LUMINANCE_ALPHA: - switch (type) - { - case GL_HALF_FLOAT: - { - switch (internalFormat) - { - case GL_LUMINANCE_ALPHA: - case GL_LUMINANCE_ALPHA16F_EXT: - return true; - default: - break; - } - break; - } - case GL_FLOAT: - { - switch (internalFormat) - { - case GL_LUMINANCE_ALPHA: - case GL_LUMINANCE_ALPHA32F_EXT: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_BYTE: - { - switch (internalFormat) - { - case GL_LUMINANCE_ALPHA: - case GL_LUMINANCE8_ALPHA8_EXT: - return true; - default: - break; - } - break; - } - case GL_HALF_FLOAT_OES: - { - switch (internalFormat) - { - case GL_LUMINANCE_ALPHA: - case GL_LUMINANCE_ALPHA16F_EXT: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - case GL_ALPHA: - switch (type) - { - case GL_HALF_FLOAT: - { - switch (internalFormat) - { - case GL_ALPHA: - case GL_ALPHA16F_EXT: - return true; - default: - break; - } - break; - } - case GL_FLOAT: - { - switch (internalFormat) - { - case GL_ALPHA: - case GL_ALPHA32F_EXT: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_BYTE: - { - switch (internalFormat) - { - case GL_ALPHA: - case GL_ALPHA8_EXT: - return true; - default: - break; - } - break; - } - case GL_HALF_FLOAT_OES: - { - switch (internalFormat) - { - case GL_ALPHA: - case GL_ALPHA16F_EXT: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - case GL_RGBA: - switch (type) - { - case GL_UNSIGNED_SHORT: - { - switch (internalFormat) - { - case GL_RGBA16_EXT: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_INT_2_10_10_10_REV: - { - switch (internalFormat) - { - case GL_RGB10_A2: - case GL_RGB5_A1: - return true; - default: - break; - } - break; - } - case GL_SHORT: - { - switch (internalFormat) - { - case GL_RGBA16_SNORM_EXT: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_SHORT_4_4_4_4: - { - switch (internalFormat) - { - case GL_RGBA: - case GL_RGBA4: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_BYTE: - { - switch (internalFormat) - { - case GL_RGBA: - case GL_RGBA8: - case GL_RGB5_A1: - case GL_RGBA4: - case GL_SRGB8_ALPHA8: - return true; - default: - break; - } - break; - } - case GL_HALF_FLOAT_OES: - { - switch (internalFormat) - { - case GL_RGBA: - case GL_RGBA16F: - return true; - default: - break; - } - break; - } - case GL_HALF_FLOAT: - { - switch (internalFormat) - { - case GL_RGBA16F: - return true; - default: - break; - } - break; - } - case GL_FLOAT: - { - switch (internalFormat) - { - case GL_RGBA: - case GL_RGBA32F: - case GL_RGBA16F: - return true; - default: - break; - } - break; - } - case GL_BYTE: - { - switch (internalFormat) - { - case GL_RGBA8_SNORM: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_SHORT_5_5_5_1: - { - switch (internalFormat) - { - case GL_RGBA: - case GL_RGB5_A1: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - case GL_LUMINANCE: - switch (type) - { - case GL_HALF_FLOAT: - { - switch (internalFormat) - { - case GL_LUMINANCE: - case GL_LUMINANCE16F_EXT: - return true; - default: - break; - } - break; - } - case GL_FLOAT: - { - switch (internalFormat) - { - case GL_LUMINANCE: - case GL_LUMINANCE32F_EXT: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_BYTE: - { - switch (internalFormat) - { - case GL_LUMINANCE: - case GL_LUMINANCE8_EXT: - return true; - default: - break; - } - break; - } - case GL_HALF_FLOAT_OES: - { - switch (internalFormat) - { - case GL_LUMINANCE: - case GL_LUMINANCE16F_EXT: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - case GL_RG_INTEGER: - switch (type) - { - case GL_INT: - { - switch (internalFormat) - { - case GL_RG32I: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_SHORT: - { - switch (internalFormat) - { - case GL_RG16UI: - return true; - default: - break; - } - break; - } - case GL_SHORT: - { - switch (internalFormat) - { - case GL_RG16I: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_BYTE: - { - switch (internalFormat) - { - case GL_RG8UI: - return true; - default: - break; - } - break; - } - case GL_BYTE: - { - switch (internalFormat) - { - case GL_RG8I: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_INT: - { - switch (internalFormat) - { - case GL_RG32UI: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - case GL_RED_INTEGER: - switch (type) - { - case GL_INT: - { - switch (internalFormat) - { - case GL_R32I: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_SHORT: - { - switch (internalFormat) - { - case GL_R16UI: - return true; - default: - break; - } - break; - } - case GL_SHORT: - { - switch (internalFormat) - { - case GL_R16I: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_BYTE: - { - switch (internalFormat) - { - case GL_R8UI: - return true; - default: - break; - } - break; - } - case GL_BYTE: - { - switch (internalFormat) - { - case GL_R8I: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_INT: - { - switch (internalFormat) - { - case GL_R32UI: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - case GL_RED: - switch (type) - { - case GL_UNSIGNED_SHORT: - { - switch (internalFormat) - { - case GL_R16_EXT: - return true; - default: - break; - } - break; - } - case GL_SHORT: - { - switch (internalFormat) - { - case GL_R16_SNORM_EXT: - return true; - default: - break; - } - break; - } - case GL_FLOAT: - { - switch (internalFormat) - { - case GL_RED: - case GL_R32F: - case GL_R16F: - return true; - default: - break; - } - break; - } - case GL_HALF_FLOAT_OES: - { - switch (internalFormat) - { - case GL_RED: - case GL_R16F: - return true; - default: - break; - } - break; - } - case GL_HALF_FLOAT: - { - switch (internalFormat) - { - case GL_RED: - case GL_R16F: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_BYTE: - { - switch (internalFormat) - { - case GL_RED: - case GL_R8: - return true; - default: - break; - } - break; - } - case GL_BYTE: - { - switch (internalFormat) - { - case GL_R8_SNORM: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - case GL_DEPTH_COMPONENT: - switch (type) - { - case GL_UNSIGNED_INT: - { - switch (internalFormat) - { - case GL_DEPTH_COMPONENT: - case GL_DEPTH_COMPONENT24: - case GL_DEPTH_COMPONENT16: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_INT_24_8: - { - switch (internalFormat) - { - case GL_DEPTH_COMPONENT32_OES: - return true; - default: - break; - } - break; - } - case GL_FLOAT: - { - switch (internalFormat) - { - case GL_DEPTH_COMPONENT32F: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_SHORT: - { - switch (internalFormat) - { - case GL_DEPTH_COMPONENT: - case GL_DEPTH_COMPONENT16: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - case GL_DEPTH_STENCIL: - switch (type) - { - case GL_UNSIGNED_INT_24_8: - { - switch (internalFormat) - { - case GL_DEPTH_STENCIL: - case GL_DEPTH24_STENCIL8: - return true; - default: - break; - } - break; - } - case GL_FLOAT_32_UNSIGNED_INT_24_8_REV: - { - switch (internalFormat) - { - case GL_DEPTH32F_STENCIL8: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - case GL_SRGB_EXT: - switch (type) - { - case GL_UNSIGNED_BYTE: - { - switch (internalFormat) - { - case GL_SRGB_EXT: - case GL_SRGB8: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - case GL_SRGB_ALPHA_EXT: - switch (type) - { - case GL_UNSIGNED_BYTE: - { - switch (internalFormat) - { - case GL_SRGB_ALPHA_EXT: - case GL_SRGB8_ALPHA8_EXT: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - case GL_RG: - switch (type) - { - case GL_UNSIGNED_SHORT: - { - switch (internalFormat) - { - case GL_RG16_EXT: - return true; - default: - break; - } - break; - } - case GL_SHORT: - { - switch (internalFormat) - { - case GL_RG16_SNORM_EXT: - return true; - default: - break; - } - break; - } - case GL_FLOAT: - { - switch (internalFormat) - { - case GL_RG: - case GL_RG32F: - case GL_RG16F: - return true; - default: - break; - } - break; - } - case GL_HALF_FLOAT_OES: - { - switch (internalFormat) - { - case GL_RG: - case GL_RG16F: - return true; - default: - break; - } - break; - } - case GL_HALF_FLOAT: - { - switch (internalFormat) - { - case GL_RG: - case GL_RG16F: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_BYTE: - { - switch (internalFormat) - { - case GL_RG: - case GL_RG8: - return true; - default: - break; - } - break; - } - case GL_BYTE: - { - switch (internalFormat) - { - case GL_RG8_SNORM: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - case GL_BGRA_EXT: - switch (type) - { - case GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT: - { - switch (internalFormat) - { - case GL_BGRA4_ANGLEX: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_BYTE: - { - switch (internalFormat) - { - case GL_BGRA8_EXT: - case GL_BGRA4_ANGLEX: - case GL_BGR5_A1_ANGLEX: - case GL_BGRA_EXT: - return true; - default: - break; - } - break; - } - case GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT: - { - switch (internalFormat) - { - case GL_BGR5_A1_ANGLEX: - return true; - default: - break; - } - break; - } - default: - break; - } - break; - - default: - UNREACHABLE(); - break; - } - - return false; -} - -} // namespace gl diff --git a/gfx/angle/src/libANGLE/format_map_data.json b/gfx/angle/src/libANGLE/format_map_data.json deleted file mode 100644 index 3d6ad6c3c..000000000 --- a/gfx/angle/src/libANGLE/format_map_data.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "GL_RGBA": { - "GL_UNSIGNED_BYTE": "GL_RGBA8", - "GL_UNSIGNED_SHORT": "GL_RGBA16_EXT", - "GL_BYTE": "GL_RGBA8_SNORM", - "GL_SHORT": "GL_RGBA16_SNORM_EXT", - "GL_UNSIGNED_SHORT_4_4_4_4": "GL_RGBA4", - "GL_UNSIGNED_SHORT_5_5_5_1": "GL_RGB5_A1", - "GL_UNSIGNED_INT_2_10_10_10_REV": "GL_RGB10_A2", - "GL_FLOAT": "GL_RGBA32F", - "GL_HALF_FLOAT": "GL_RGBA16F", - "GL_HALF_FLOAT_OES": "GL_RGBA16F" - }, - "GL_RGBA_INTEGER": { - "GL_UNSIGNED_BYTE": "GL_RGBA8UI", - "GL_BYTE": "GL_RGBA8I", - "GL_UNSIGNED_SHORT": "GL_RGBA16UI", - "GL_SHORT": "GL_RGBA16I", - "GL_UNSIGNED_INT": "GL_RGBA32UI", - "GL_INT": "GL_RGBA32I", - "GL_UNSIGNED_INT_2_10_10_10_REV": "GL_RGB10_A2UI" - }, - "GL_RGB": { - "GL_UNSIGNED_BYTE": "GL_RGB8", - "GL_UNSIGNED_SHORT": "GL_RGB16_EXT", - "GL_BYTE": "GL_RGB8_SNORM", - "GL_SHORT": "GL_RGB16_SNORM_EXT", - "GL_UNSIGNED_SHORT_5_6_5": "GL_RGB565", - "GL_UNSIGNED_INT_10F_11F_11F_REV": "GL_R11F_G11F_B10F", - "GL_UNSIGNED_INT_5_9_9_9_REV": "GL_RGB9_E5", - "GL_FLOAT": "GL_RGB32F", - "GL_HALF_FLOAT": "GL_RGB16F", - "GL_HALF_FLOAT_OES": "GL_RGB16F" - }, - "GL_RGB_INTEGER": { - "GL_UNSIGNED_BYTE": "GL_RGB8UI", - "GL_BYTE": "GL_RGB8I", "GL_UNSIGNED_SHORT": "GL_RGB16UI", - "GL_SHORT": "GL_RGB16I", - "GL_UNSIGNED_INT": "GL_RGB32UI", - "GL_INT": "GL_RGB32I" - }, - "GL_RG": { - "GL_UNSIGNED_BYTE": "GL_RG8", - "GL_UNSIGNED_SHORT": "GL_RG16_EXT", - "GL_BYTE": "GL_RG8_SNORM", - "GL_SHORT": "GL_RG16_SNORM_EXT", - "GL_FLOAT": "GL_RG32F", - "GL_HALF_FLOAT": "GL_RG16F", - "GL_HALF_FLOAT_OES": "GL_RG16F" - }, - "GL_RG_INTEGER": { - "GL_UNSIGNED_BYTE": "GL_RG8UI", - "GL_BYTE": "GL_RG8I", - "GL_UNSIGNED_SHORT": "GL_RG16UI", - "GL_SHORT": "GL_RG16I", - "GL_UNSIGNED_INT": "GL_RG32UI", - "GL_INT": "GL_RG32I" - }, - "GL_RED": { - "GL_UNSIGNED_BYTE": "GL_R8", - "GL_UNSIGNED_SHORT": "GL_R16_EXT", - "GL_BYTE": "GL_R8_SNORM", - "GL_SHORT": "GL_R16_SNORM_EXT", - "GL_FLOAT": "GL_R32F", - "GL_HALF_FLOAT": "GL_R16F", - "GL_HALF_FLOAT_OES": "GL_R16F" - }, - "GL_RED_INTEGER": { - "GL_UNSIGNED_BYTE": "GL_R8UI", - "GL_BYTE": "GL_R8I", - "GL_UNSIGNED_SHORT": "GL_R16UI", - "GL_SHORT": "GL_R16I", - "GL_UNSIGNED_INT": "GL_R32UI", - "GL_INT": "GL_R32I" - }, - "GL_LUMINANCE_ALPHA": { - "GL_UNSIGNED_BYTE": "GL_LUMINANCE8_ALPHA8_EXT", - "GL_FLOAT": "GL_LUMINANCE_ALPHA32F_EXT", - "GL_HALF_FLOAT": "GL_LUMINANCE_ALPHA16F_EXT", - "GL_HALF_FLOAT_OES": "GL_LUMINANCE_ALPHA16F_EXT" - }, - "GL_LUMINANCE": { - "GL_UNSIGNED_BYTE": "GL_LUMINANCE8_EXT", - "GL_FLOAT": "GL_LUMINANCE32F_EXT", - "GL_HALF_FLOAT": "GL_LUMINANCE16F_EXT", - "GL_HALF_FLOAT_OES": "GL_LUMINANCE16F_EXT" - }, - "GL_ALPHA": { - "GL_UNSIGNED_BYTE": "GL_ALPHA8_EXT", - "GL_FLOAT": "GL_ALPHA32F_EXT", - "GL_HALF_FLOAT": "GL_ALPHA16F_EXT", - "GL_HALF_FLOAT_OES": "GL_ALPHA16F_EXT" - }, - "GL_BGRA_EXT": { - "GL_UNSIGNED_BYTE": "GL_BGRA8_EXT", - "GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT": "GL_BGRA4_ANGLEX", - "GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT": "GL_BGR5_A1_ANGLEX", - "GL_UNSIGNED_SHORT_5_6_5": "GL_BGR565_ANGLEX" - }, - "GL_SRGB_EXT": { - "GL_UNSIGNED_BYTE": "GL_SRGB8" - }, - "GL_SRGB_ALPHA_EXT": { - "GL_UNSIGNED_BYTE": "GL_SRGB8_ALPHA8" - }, - "GL_COMPRESSED_RGB_S3TC_DXT1_EXT": { - "GL_UNSIGNED_BYTE": "GL_COMPRESSED_RGB_S3TC_DXT1_EXT" - }, - "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT": { - "GL_UNSIGNED_BYTE": "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT" - }, - "GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE": { - "GL_UNSIGNED_BYTE": "GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE" - }, - "GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE": { - "GL_UNSIGNED_BYTE": "GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE" - }, - "GL_DEPTH_COMPONENT": { - "GL_UNSIGNED_SHORT": "GL_DEPTH_COMPONENT16", - "GL_UNSIGNED_INT": "GL_DEPTH_COMPONENT32_OES", - "GL_FLOAT": "GL_DEPTH_COMPONENT32F" - }, - "GL_STENCIL": { - "GL_UNSIGNED_BYTE": "GL_STENCIL_INDEX8" - }, - "GL_DEPTH_STENCIL": { - "GL_UNSIGNED_INT_24_8": "GL_DEPTH24_STENCIL8", - "GL_FLOAT_32_UNSIGNED_INT_24_8_REV": "GL_DEPTH32F_STENCIL8" - } -} diff --git a/gfx/angle/src/libANGLE/formatutils.cpp b/gfx/angle/src/libANGLE/formatutils.cpp index 2aa2e75d4..9a8c1b790 100755 --- a/gfx/angle/src/libANGLE/formatutils.cpp +++ b/gfx/angle/src/libANGLE/formatutils.cpp @@ -16,13 +16,154 @@ using namespace angle; namespace gl { +namespace +{ // ES2 requires that format is equal to internal format at all glTex*Image2D entry points and the implementation // can decide the true, sized, internal format. The ES2FormatMap determines the internal format for all valid // format and type combinations. -GLenum GetSizedFormatInternal(GLenum format, GLenum type); -namespace +typedef std::pair FormatPair; +typedef std::map FormatMap; + +// A helper function to insert data into the format map with fewer characters. +void InsertFormatMapping(FormatMap *map, GLenum format, GLenum type, GLenum internalFormat) +{ + map->insert(FormatPair(FormatType(format, type), internalFormat)); +} + +FormatMap BuildFormatMap() +{ + FormatMap map; + + // clang-format off + // | Format | Type | Internal format | + InsertFormatMapping(&map, GL_RGBA, GL_UNSIGNED_BYTE, GL_RGBA8); + InsertFormatMapping(&map, GL_RGBA, GL_BYTE, GL_RGBA8_SNORM); + InsertFormatMapping(&map, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, GL_RGBA4); + InsertFormatMapping(&map, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, GL_RGB5_A1); + InsertFormatMapping(&map, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, GL_RGB10_A2); + InsertFormatMapping(&map, GL_RGBA, GL_FLOAT, GL_RGBA32F); + InsertFormatMapping(&map, GL_RGBA, GL_HALF_FLOAT, GL_RGBA16F); + InsertFormatMapping(&map, GL_RGBA, GL_HALF_FLOAT_OES, GL_RGBA16F); + + InsertFormatMapping(&map, GL_RGBA_INTEGER, GL_UNSIGNED_BYTE, GL_RGBA8UI); + InsertFormatMapping(&map, GL_RGBA_INTEGER, GL_BYTE, GL_RGBA8I); + InsertFormatMapping(&map, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT, GL_RGBA16UI); + InsertFormatMapping(&map, GL_RGBA_INTEGER, GL_SHORT, GL_RGBA16I); + InsertFormatMapping(&map, GL_RGBA_INTEGER, GL_UNSIGNED_INT, GL_RGBA32UI); + InsertFormatMapping(&map, GL_RGBA_INTEGER, GL_INT, GL_RGBA32I); + InsertFormatMapping(&map, GL_RGBA_INTEGER, GL_UNSIGNED_INT_2_10_10_10_REV, GL_RGB10_A2UI); + + InsertFormatMapping(&map, GL_RGB, GL_UNSIGNED_BYTE, GL_RGB8); + InsertFormatMapping(&map, GL_RGB, GL_BYTE, GL_RGB8_SNORM); + InsertFormatMapping(&map, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, GL_RGB565); + InsertFormatMapping(&map, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_R11F_G11F_B10F); + InsertFormatMapping(&map, GL_RGB, GL_UNSIGNED_INT_5_9_9_9_REV, GL_RGB9_E5); + InsertFormatMapping(&map, GL_RGB, GL_FLOAT, GL_RGB32F); + InsertFormatMapping(&map, GL_RGB, GL_HALF_FLOAT, GL_RGB16F); + InsertFormatMapping(&map, GL_RGB, GL_HALF_FLOAT_OES, GL_RGB16F); + + InsertFormatMapping(&map, GL_RGB_INTEGER, GL_UNSIGNED_BYTE, GL_RGB8UI); + InsertFormatMapping(&map, GL_RGB_INTEGER, GL_BYTE, GL_RGB8I); + InsertFormatMapping(&map, GL_RGB_INTEGER, GL_UNSIGNED_SHORT, GL_RGB16UI); + InsertFormatMapping(&map, GL_RGB_INTEGER, GL_SHORT, GL_RGB16I); + InsertFormatMapping(&map, GL_RGB_INTEGER, GL_UNSIGNED_INT, GL_RGB32UI); + InsertFormatMapping(&map, GL_RGB_INTEGER, GL_INT, GL_RGB32I); + + InsertFormatMapping(&map, GL_RG, GL_UNSIGNED_BYTE, GL_RG8); + InsertFormatMapping(&map, GL_RG, GL_BYTE, GL_RG8_SNORM); + InsertFormatMapping(&map, GL_RG, GL_FLOAT, GL_RG32F); + InsertFormatMapping(&map, GL_RG, GL_HALF_FLOAT, GL_RG16F); + InsertFormatMapping(&map, GL_RG, GL_HALF_FLOAT_OES, GL_RG16F); + + InsertFormatMapping(&map, GL_RG_INTEGER, GL_UNSIGNED_BYTE, GL_RG8UI); + InsertFormatMapping(&map, GL_RG_INTEGER, GL_BYTE, GL_RG8I); + InsertFormatMapping(&map, GL_RG_INTEGER, GL_UNSIGNED_SHORT, GL_RG16UI); + InsertFormatMapping(&map, GL_RG_INTEGER, GL_SHORT, GL_RG16I); + InsertFormatMapping(&map, GL_RG_INTEGER, GL_UNSIGNED_INT, GL_RG32UI); + InsertFormatMapping(&map, GL_RG_INTEGER, GL_INT, GL_RG32I); + + InsertFormatMapping(&map, GL_RED, GL_UNSIGNED_BYTE, GL_R8); + InsertFormatMapping(&map, GL_RED, GL_BYTE, GL_R8_SNORM); + InsertFormatMapping(&map, GL_RED, GL_FLOAT, GL_R32F); + InsertFormatMapping(&map, GL_RED, GL_HALF_FLOAT, GL_R16F); + InsertFormatMapping(&map, GL_RED, GL_HALF_FLOAT_OES, GL_R16F); + + InsertFormatMapping(&map, GL_RED_INTEGER, GL_UNSIGNED_BYTE, GL_R8UI); + InsertFormatMapping(&map, GL_RED_INTEGER, GL_BYTE, GL_R8I); + InsertFormatMapping(&map, GL_RED_INTEGER, GL_UNSIGNED_SHORT, GL_R16UI); + InsertFormatMapping(&map, GL_RED_INTEGER, GL_SHORT, GL_R16I); + InsertFormatMapping(&map, GL_RED_INTEGER, GL_UNSIGNED_INT, GL_R32UI); + InsertFormatMapping(&map, GL_RED_INTEGER, GL_INT, GL_R32I); + + InsertFormatMapping(&map, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, GL_LUMINANCE8_ALPHA8_EXT); + InsertFormatMapping(&map, GL_LUMINANCE, GL_UNSIGNED_BYTE, GL_LUMINANCE8_EXT); + InsertFormatMapping(&map, GL_ALPHA, GL_UNSIGNED_BYTE, GL_ALPHA8_EXT); + InsertFormatMapping(&map, GL_LUMINANCE_ALPHA, GL_FLOAT, GL_LUMINANCE_ALPHA32F_EXT); + InsertFormatMapping(&map, GL_LUMINANCE, GL_FLOAT, GL_LUMINANCE32F_EXT); + InsertFormatMapping(&map, GL_ALPHA, GL_FLOAT, GL_ALPHA32F_EXT); + InsertFormatMapping(&map, GL_LUMINANCE_ALPHA, GL_HALF_FLOAT, GL_LUMINANCE_ALPHA16F_EXT); + InsertFormatMapping(&map, GL_LUMINANCE_ALPHA, GL_HALF_FLOAT_OES, GL_LUMINANCE_ALPHA16F_EXT); + InsertFormatMapping(&map, GL_LUMINANCE, GL_HALF_FLOAT, GL_LUMINANCE16F_EXT); + InsertFormatMapping(&map, GL_LUMINANCE, GL_HALF_FLOAT_OES, GL_LUMINANCE16F_EXT); + InsertFormatMapping(&map, GL_ALPHA, GL_HALF_FLOAT, GL_ALPHA16F_EXT); + InsertFormatMapping(&map, GL_ALPHA, GL_HALF_FLOAT_OES, GL_ALPHA16F_EXT); + + InsertFormatMapping(&map, GL_BGRA_EXT, GL_UNSIGNED_BYTE, GL_BGRA8_EXT); + InsertFormatMapping(&map, GL_BGRA_EXT, GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT, GL_BGRA4_ANGLEX); + InsertFormatMapping(&map, GL_BGRA_EXT, GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT, GL_BGR5_A1_ANGLEX); + + InsertFormatMapping(&map, GL_SRGB_EXT, GL_UNSIGNED_BYTE, GL_SRGB8); + InsertFormatMapping(&map, GL_SRGB_ALPHA_EXT, GL_UNSIGNED_BYTE, GL_SRGB8_ALPHA8); + + InsertFormatMapping(&map, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_UNSIGNED_BYTE, GL_COMPRESSED_RGB_S3TC_DXT1_EXT); + InsertFormatMapping(&map, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_UNSIGNED_BYTE, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT); + InsertFormatMapping(&map, GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE, GL_UNSIGNED_BYTE, GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE); + InsertFormatMapping(&map, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, GL_UNSIGNED_BYTE, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE); + + InsertFormatMapping(&map, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, GL_DEPTH_COMPONENT16); + InsertFormatMapping(&map, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_DEPTH_COMPONENT32_OES); + InsertFormatMapping(&map, GL_DEPTH_COMPONENT, GL_FLOAT, GL_DEPTH_COMPONENT32F); + + InsertFormatMapping(&map, GL_STENCIL, GL_UNSIGNED_BYTE, GL_STENCIL_INDEX8); + + InsertFormatMapping(&map, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); + InsertFormatMapping(&map, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, GL_DEPTH32F_STENCIL8); + + // From GL_EXT_texture_norm16 + InsertFormatMapping(&map, GL_RED, GL_UNSIGNED_SHORT, GL_R16_EXT); + InsertFormatMapping(&map, GL_RED, GL_SHORT, GL_R16_SNORM_EXT); + InsertFormatMapping(&map, GL_RG, GL_UNSIGNED_SHORT, GL_RG16_EXT); + InsertFormatMapping(&map, GL_RG, GL_SHORT, GL_RG16_SNORM_EXT); + InsertFormatMapping(&map, GL_RGB, GL_UNSIGNED_SHORT, GL_RGB16_EXT); + InsertFormatMapping(&map, GL_RGB, GL_SHORT, GL_RGB16_SNORM_EXT); + InsertFormatMapping(&map, GL_RGBA, GL_UNSIGNED_SHORT, GL_RGBA16_EXT); + InsertFormatMapping(&map, GL_RGBA, GL_SHORT, GL_RGBA16_SNORM_EXT); + // clang-format on + + return map; +} + +GLenum GetSizedFormatInternal(GLenum format, GLenum type) { + static const FormatMap formatMap = BuildFormatMap(); + auto iter = formatMap.find(FormatType(format, type)); + if (iter != formatMap.end()) + { + return iter->second; + } + + // TODO(jmadill): Fix this hack. + if (format == GL_BGRA_EXT && type == GL_UNSIGNED_SHORT_5_6_5) + return GL_BGR565_ANGLEX; + + if (format == GL_NONE) + return GL_NONE; + + UNREACHABLE(); + return GL_NONE; +} + typedef std::pair InternalFormatInfoPair; typedef std::map InternalFormatInfoMap; @@ -71,20 +212,20 @@ bool operator<(const Type& a, const Type& b) } // Information about internal formats -static bool AlwaysSupported(const Version &, const Extensions &) +static bool AlwaysSupported(GLuint, const Extensions &) { return true; } -static bool NeverSupported(const Version &, const Extensions &) +static bool NeverSupported(GLuint, const Extensions &) { return false; } -template -static bool RequireES(const Version &clientVersion, const Extensions &) +template +static bool RequireES(GLuint clientVersion, const Extensions &) { - return clientVersion >= Version(minCoreGLMajorVersion, minCoreGLMinorVersion); + return clientVersion >= minCoreGLVersion; } // Pointer to a boolean memeber of the Extensions struct @@ -92,101 +233,92 @@ typedef bool(Extensions::*ExtensionBool); // Check support for a single extension template -static bool RequireExt(const Version &, const Extensions &extensions) +static bool RequireExt(GLuint, const Extensions & extensions) { return extensions.*bool1; } // Check for a minimum client version or a single extension -template -static bool RequireESOrExt(const Version &clientVersion, const Extensions &extensions) +template +static bool RequireESOrExt(GLuint clientVersion, const Extensions &extensions) { - return clientVersion >= Version(minCoreGLMajorVersion, minCoreGLMinorVersion) || - extensions.*bool1; + return clientVersion >= minCoreGLVersion || extensions.*bool1; } // Check for a minimum client version or two extensions -template -static bool RequireESOrExtAndExt(const Version &clientVersion, const Extensions &extensions) +template +static bool RequireESOrExtAndExt(GLuint clientVersion, const Extensions &extensions) { - return clientVersion >= Version(minCoreGLMajorVersion, minCoreGLMinorVersion) || - (extensions.*bool1 && extensions.*bool2); + return clientVersion >= minCoreGLVersion || (extensions.*bool1 && extensions.*bool2); } // Check for a minimum client version or at least one of two extensions -template -static bool RequireESOrExtOrExt(const Version &clientVersion, const Extensions &extensions) +template +static bool RequireESOrExtOrExt(GLuint clientVersion, const Extensions &extensions) { - return clientVersion >= Version(minCoreGLMajorVersion, minCoreGLMinorVersion) || - extensions.*bool1 || extensions.*bool2; + return clientVersion >= minCoreGLVersion || extensions.*bool1 || extensions.*bool2; } // Check support for two extensions template -static bool RequireExtAndExt(const Version &, const Extensions &extensions) +static bool RequireExtAndExt(GLuint, const Extensions &extensions) { return extensions.*bool1 && extensions.*bool2; } // Check support for either of two extensions template -static bool RequireExtOrExt(const Version &, const Extensions &extensions) +static bool RequireExtOrExt(GLuint, const Extensions &extensions) { return extensions.*bool1 || extensions.*bool2; } // Special function for half float formats with three or four channels. -static bool HalfFloatSupport(const Version &clientVersion, const Extensions &extensions) +static bool HalfFloatSupport(GLuint clientVersion, const Extensions &extensions) { - return clientVersion >= Version(3, 0) || extensions.textureHalfFloat; + return clientVersion >= 3 || extensions.textureHalfFloat; } -static bool HalfFloatRenderableSupport(const Version &clientVersion, const Extensions &extensions) +static bool HalfFloatRenderableSupport(GLuint clientVersion, const Extensions &extensions) { return HalfFloatSupport(clientVersion, extensions) && extensions.colorBufferHalfFloat; } // Special function for half float formats with one or two channels. -static bool HalfFloatSupportRG(const Version &clientVersion, const Extensions &extensions) +static bool HalfFloatSupportRG(GLuint clientVersion, const Extensions &extensions) { - return clientVersion >= Version(3, 0) || (extensions.textureHalfFloat && extensions.textureRG); + return clientVersion >= 3 || (extensions.textureHalfFloat && extensions.textureRG); } -static bool HalfFloatRenderableSupportRG(const Version &clientVersion, const Extensions &extensions) +static bool HalfFloatRenderableSupportRG(GLuint clientVersion, const Extensions &extensions) { return HalfFloatSupportRG(clientVersion, extensions) && extensions.colorBufferHalfFloat; } // Special function for float formats with three or four channels. -static bool FloatSupport(const Version &clientVersion, const Extensions &extensions) +static bool FloatSupport(GLuint clientVersion, const Extensions &extensions) { - return clientVersion >= Version(3, 0) || extensions.textureFloat; + return clientVersion >= 3 || extensions.textureFloat; } -static bool FloatRenderableSupport(const Version &clientVersion, const Extensions &extensions) +static bool FloatRenderableSupport(GLuint clientVersion, const Extensions &extensions) { // We don't expose colorBufferFloat in ES2, but we silently support rendering to float. return FloatSupport(clientVersion, extensions) && - (extensions.colorBufferFloat || clientVersion == Version(2, 0)); + (extensions.colorBufferFloat || clientVersion == 2); } // Special function for float formats with one or two channels. -static bool FloatSupportRG(const Version &clientVersion, const Extensions &extensions) +static bool FloatSupportRG(GLuint clientVersion, const Extensions &extensions) { - return clientVersion >= Version(3, 0) || (extensions.textureFloat && extensions.textureRG); + return clientVersion >= 3 || (extensions.textureFloat && extensions.textureRG); } -static bool FloatRenderableSupportRG(const Version &clientVersion, const Extensions &extensions) +static bool FloatRenderableSupportRG(GLuint clientVersion, const Extensions &extensions) { // We don't expose colorBufferFloat in ES2, but we silently support rendering to float. return FloatSupportRG(clientVersion, extensions) && - (extensions.colorBufferFloat || clientVersion == Version(2, 0)); + (extensions.colorBufferFloat || clientVersion == 2); } InternalFormat::InternalFormat() @@ -220,26 +352,6 @@ bool InternalFormat::isLUMA() const (luminanceBits + alphaBits) > 0); } -GLenum InternalFormat::getReadPixelsFormat() const -{ - return format; -} - -GLenum InternalFormat::getReadPixelsType() const -{ - switch (type) - { - case GL_HALF_FLOAT: - // The internal format may have a type of GL_HALF_FLOAT but when exposing this type as - // the IMPLEMENTATION_READ_TYPE, only HALF_FLOAT_OES is allowed by - // OES_texture_half_float - return GL_HALF_FLOAT_OES; - - default: - return type; - } -} - Format::Format(GLenum internalFormat) : Format(GetInternalFormatInfo(internalFormat)) { } @@ -434,48 +546,48 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap() // clang-format off - // | Internal format | R | G | B | A |S | Format | Type | Component type | SRGB | Texture supported | Renderable | Filterable | - AddRGBAFormat(&map, GL_R8, 8, 0, 0, 0, 0, GL_RED, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, 0, &Extensions::textureRG>, RequireESOrExt<3, 0, &Extensions::textureRG>, AlwaysSupported); - AddRGBAFormat(&map, GL_R8_SNORM, 8, 0, 0, 0, 0, GL_RED, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3, 0>, NeverSupported, AlwaysSupported); - AddRGBAFormat(&map, GL_RG8, 8, 8, 0, 0, 0, GL_RG, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, 0, &Extensions::textureRG>, RequireESOrExt<3, 0, &Extensions::textureRG>, AlwaysSupported); - AddRGBAFormat(&map, GL_RG8_SNORM, 8, 8, 0, 0, 0, GL_RG, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3, 0>, NeverSupported, AlwaysSupported); - AddRGBAFormat(&map, GL_RGB8, 8, 8, 8, 0, 0, GL_RGB, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, 0, &Extensions::rgb8rgba8>, RequireESOrExt<3, 0, &Extensions::rgb8rgba8>, AlwaysSupported); - AddRGBAFormat(&map, GL_RGB8_SNORM, 8, 8, 8, 0, 0, GL_RGB, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3, 0>, NeverSupported, AlwaysSupported); - AddRGBAFormat(&map, GL_RGB565, 5, 6, 5, 0, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_NORMALIZED, false, RequireES<2, 0>, RequireES<2, 0>, AlwaysSupported); - AddRGBAFormat(&map, GL_RGBA4, 4, 4, 4, 4, 0, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_NORMALIZED, false, RequireES<2, 0>, RequireES<2, 0>, AlwaysSupported); - AddRGBAFormat(&map, GL_RGB5_A1, 5, 5, 5, 1, 0, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_NORMALIZED, false, RequireES<2, 0>, RequireES<2, 0>, AlwaysSupported); - AddRGBAFormat(&map, GL_RGBA8, 8, 8, 8, 8, 0, GL_RGBA, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, 0, &Extensions::rgb8rgba8>, RequireESOrExt<3, 0, &Extensions::rgb8rgba8>, AlwaysSupported); - AddRGBAFormat(&map, GL_RGBA8_SNORM, 8, 8, 8, 8, 0, GL_RGBA, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3, 0>, NeverSupported, AlwaysSupported); - AddRGBAFormat(&map, GL_RGB10_A2, 10, 10, 10, 2, 0, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_NORMALIZED, false, RequireES<3, 0>, RequireES<3, 0>, AlwaysSupported); - AddRGBAFormat(&map, GL_RGB10_A2UI, 10, 10, 10, 2, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_SRGB8, 8, 8, 8, 0, 0, GL_RGB, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, true, RequireESOrExt<3, 0, &Extensions::sRGB>, NeverSupported, AlwaysSupported); - AddRGBAFormat(&map, GL_SRGB8_ALPHA8, 8, 8, 8, 8, 0, GL_RGBA, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, true, RequireESOrExt<3, 0, &Extensions::sRGB>, RequireESOrExt<3, 0, &Extensions::sRGB>, AlwaysSupported); - AddRGBAFormat(&map, GL_RGB9_E5, 9, 9, 9, 0, 5, GL_RGB, GL_UNSIGNED_INT_5_9_9_9_REV, GL_FLOAT, false, RequireES<3, 0>, NeverSupported, AlwaysSupported); - AddRGBAFormat(&map, GL_R8I, 8, 0, 0, 0, 0, GL_RED_INTEGER, GL_BYTE, GL_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_R8UI, 8, 0, 0, 0, 0, GL_RED_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_R16I, 16, 0, 0, 0, 0, GL_RED_INTEGER, GL_SHORT, GL_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_R16UI, 16, 0, 0, 0, 0, GL_RED_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_R32I, 32, 0, 0, 0, 0, GL_RED_INTEGER, GL_INT, GL_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_R32UI, 32, 0, 0, 0, 0, GL_RED_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RG8I, 8, 8, 0, 0, 0, GL_RG_INTEGER, GL_BYTE, GL_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RG8UI, 8, 8, 0, 0, 0, GL_RG_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RG16I, 16, 16, 0, 0, 0, GL_RG_INTEGER, GL_SHORT, GL_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RG16UI, 16, 16, 0, 0, 0, GL_RG_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RG32I, 32, 32, 0, 0, 0, GL_RG_INTEGER, GL_INT, GL_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_R11F_G11F_B10F, 11, 11, 10, 0, 0, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_FLOAT, false, RequireES<3, 0>, RequireExt<&Extensions::colorBufferFloat>, AlwaysSupported); - AddRGBAFormat(&map, GL_RG32UI, 32, 32, 0, 0, 0, GL_RG_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RGB8I, 8, 8, 8, 0, 0, GL_RGB_INTEGER, GL_BYTE, GL_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB8UI, 8, 8, 8, 0, 0, GL_RGB_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB16I, 16, 16, 16, 0, 0, GL_RGB_INTEGER, GL_SHORT, GL_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB16UI, 16, 16, 16, 0, 0, GL_RGB_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB32I, 32, 32, 32, 0, 0, GL_RGB_INTEGER, GL_INT, GL_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGB32UI, 32, 32, 32, 0, 0, GL_RGB_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3, 0>, NeverSupported, NeverSupported); - AddRGBAFormat(&map, GL_RGBA8I, 8, 8, 8, 8, 0, GL_RGBA_INTEGER, GL_BYTE, GL_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RGBA8UI, 8, 8, 8, 8, 0, GL_RGBA_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RGBA16I, 16, 16, 16, 16, 0, GL_RGBA_INTEGER, GL_SHORT, GL_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RGBA16UI, 16, 16, 16, 16, 0, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RGBA32I, 32, 32, 32, 32, 0, GL_RGBA_INTEGER, GL_INT, GL_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); - AddRGBAFormat(&map, GL_RGBA32UI, 32, 32, 32, 32, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3, 0>, RequireES<3, 0>, NeverSupported); + // | Internal format | R | G | B | A |S | Format | Type | Component type | SRGB | Texture supported | Renderable | Filterable | + AddRGBAFormat(&map, GL_R8, 8, 0, 0, 0, 0, GL_RED, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, &Extensions::textureRG>, RequireESOrExt<3, &Extensions::textureRG>, AlwaysSupported); + AddRGBAFormat(&map, GL_R8_SNORM, 8, 0, 0, 0, 0, GL_RED, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3>, NeverSupported, AlwaysSupported); + AddRGBAFormat(&map, GL_RG8, 8, 8, 0, 0, 0, GL_RG, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, &Extensions::textureRG>, RequireESOrExt<3, &Extensions::textureRG>, AlwaysSupported); + AddRGBAFormat(&map, GL_RG8_SNORM, 8, 8, 0, 0, 0, GL_RG, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3>, NeverSupported, AlwaysSupported); + AddRGBAFormat(&map, GL_RGB8, 8, 8, 8, 0, 0, GL_RGB, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, &Extensions::rgb8rgba8>, RequireESOrExt<3, &Extensions::rgb8rgba8>, AlwaysSupported); + AddRGBAFormat(&map, GL_RGB8_SNORM, 8, 8, 8, 0, 0, GL_RGB, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3>, NeverSupported, AlwaysSupported); + AddRGBAFormat(&map, GL_RGB565, 5, 6, 5, 0, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_NORMALIZED, false, RequireES<2>, RequireES<2>, AlwaysSupported); + AddRGBAFormat(&map, GL_RGBA4, 4, 4, 4, 4, 0, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_NORMALIZED, false, RequireES<2>, RequireES<2>, AlwaysSupported); + AddRGBAFormat(&map, GL_RGB5_A1, 5, 5, 5, 1, 0, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_NORMALIZED, false, RequireES<2>, RequireES<2>, AlwaysSupported); + AddRGBAFormat(&map, GL_RGBA8, 8, 8, 8, 8, 0, GL_RGBA, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireESOrExt<3, &Extensions::rgb8rgba8>, RequireESOrExt<3, &Extensions::rgb8rgba8>, AlwaysSupported); + AddRGBAFormat(&map, GL_RGBA8_SNORM, 8, 8, 8, 8, 0, GL_RGBA, GL_BYTE, GL_SIGNED_NORMALIZED, false, RequireES<3>, NeverSupported, AlwaysSupported); + AddRGBAFormat(&map, GL_RGB10_A2, 10, 10, 10, 2, 0, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_NORMALIZED, false, RequireES<3>, RequireES<3>, AlwaysSupported); + AddRGBAFormat(&map, GL_RGB10_A2UI, 10, 10, 10, 2, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_SRGB8, 8, 8, 8, 0, 0, GL_RGB, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, true, RequireESOrExt<3, &Extensions::sRGB>, NeverSupported, AlwaysSupported); + AddRGBAFormat(&map, GL_SRGB8_ALPHA8, 8, 8, 8, 8, 0, GL_RGBA, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, true, RequireESOrExt<3, &Extensions::sRGB>, RequireESOrExt<3, &Extensions::sRGB>, AlwaysSupported); + AddRGBAFormat(&map, GL_RGB9_E5, 9, 9, 9, 0, 5, GL_RGB, GL_UNSIGNED_INT_5_9_9_9_REV, GL_FLOAT, false, RequireES<3>, NeverSupported, AlwaysSupported); + AddRGBAFormat(&map, GL_R8I, 8, 0, 0, 0, 0, GL_RED_INTEGER, GL_BYTE, GL_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_R8UI, 8, 0, 0, 0, 0, GL_RED_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_R16I, 16, 0, 0, 0, 0, GL_RED_INTEGER, GL_SHORT, GL_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_R16UI, 16, 0, 0, 0, 0, GL_RED_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_R32I, 32, 0, 0, 0, 0, GL_RED_INTEGER, GL_INT, GL_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_R32UI, 32, 0, 0, 0, 0, GL_RED_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_RG8I, 8, 8, 0, 0, 0, GL_RG_INTEGER, GL_BYTE, GL_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_RG8UI, 8, 8, 0, 0, 0, GL_RG_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_RG16I, 16, 16, 0, 0, 0, GL_RG_INTEGER, GL_SHORT, GL_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_RG16UI, 16, 16, 0, 0, 0, GL_RG_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_RG32I, 32, 32, 0, 0, 0, GL_RG_INTEGER, GL_INT, GL_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_R11F_G11F_B10F, 11, 11, 10, 0, 0, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_FLOAT, false, RequireES<3>, RequireExt<&Extensions::colorBufferFloat>, AlwaysSupported); + AddRGBAFormat(&map, GL_RG32UI, 32, 32, 0, 0, 0, GL_RG_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_RGB8I, 8, 8, 8, 0, 0, GL_RGB_INTEGER, GL_BYTE, GL_INT, false, RequireES<3>, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB8UI, 8, 8, 8, 0, 0, GL_RGB_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3>, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB16I, 16, 16, 16, 0, 0, GL_RGB_INTEGER, GL_SHORT, GL_INT, false, RequireES<3>, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB16UI, 16, 16, 16, 0, 0, GL_RGB_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3>, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB32I, 32, 32, 32, 0, 0, GL_RGB_INTEGER, GL_INT, GL_INT, false, RequireES<3>, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGB32UI, 32, 32, 32, 0, 0, GL_RGB_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3>, NeverSupported, NeverSupported); + AddRGBAFormat(&map, GL_RGBA8I, 8, 8, 8, 8, 0, GL_RGBA_INTEGER, GL_BYTE, GL_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_RGBA8UI, 8, 8, 8, 8, 0, GL_RGBA_INTEGER, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_RGBA16I, 16, 16, 16, 16, 0, GL_RGBA_INTEGER, GL_SHORT, GL_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_RGBA16UI, 16, 16, 16, 16, 0, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_RGBA32I, 32, 32, 32, 32, 0, GL_RGBA_INTEGER, GL_INT, GL_INT, false, RequireES<3>, RequireES<3>, NeverSupported); + AddRGBAFormat(&map, GL_RGBA32UI, 32, 32, 32, 32, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT, GL_UNSIGNED_INT, false, RequireES<3>, RequireES<3>, NeverSupported); AddRGBAFormat(&map, GL_BGRA8_EXT, 8, 8, 8, 8, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::textureFormatBGRA8888>, RequireExt<&Extensions::textureFormatBGRA8888>, AlwaysSupported); AddRGBAFormat(&map, GL_BGRA4_ANGLEX, 4, 4, 4, 4, 0, GL_BGRA_EXT, GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::textureFormatBGRA8888>, RequireExt<&Extensions::textureFormatBGRA8888>, AlwaysSupported); @@ -497,13 +609,13 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap() AddRGBAFormat(&map, GL_RGBA32F, 32, 32, 32, 32, 0, GL_RGBA, GL_FLOAT, GL_FLOAT, false, FloatSupport, FloatRenderableSupport, RequireExt<&Extensions::textureFloatLinear> ); // Depth stencil formats - // | Internal format | D |S | X | Format | Type | Component type | Supported | Renderable | Filterable | - AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT16, 16, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, GL_UNSIGNED_NORMALIZED, RequireES<2, 0>, RequireES<2, 0>, RequireESOrExt<3, 0, &Extensions::depthTextures>); - AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT24, 24, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_UNSIGNED_NORMALIZED, RequireES<3, 0>, RequireES<3, 0>, RequireESOrExt<3, 0, &Extensions::depthTextures>); - AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT32F, 32, 0, 0, GL_DEPTH_COMPONENT, GL_FLOAT, GL_FLOAT, RequireES<3, 0>, RequireES<3, 0>, RequireESOrExt<3, 0, &Extensions::depthTextures>); - AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT32_OES, 32, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_UNSIGNED_NORMALIZED, RequireExtOrExt<&Extensions::depthTextures, &Extensions::depth32>, RequireExtOrExt<&Extensions::depthTextures, &Extensions::depth32>, AlwaysSupported ); - AddDepthStencilFormat(&map, GL_DEPTH24_STENCIL8, 24, 8, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_UNSIGNED_NORMALIZED, RequireESOrExt<3, 0, &Extensions::depthTextures>, RequireESOrExtOrExt<3, 0, &Extensions::depthTextures, &Extensions::packedDepthStencil>, AlwaysSupported ); - AddDepthStencilFormat(&map, GL_DEPTH32F_STENCIL8, 32, 8, 24, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, GL_FLOAT, RequireES<3, 0>, RequireES<3, 0>, AlwaysSupported ); + // | Internal format | D |S | X | Format | Type | Component type | Supported | Renderable | Filterable | + AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT16, 16, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, GL_UNSIGNED_NORMALIZED, RequireES<2>, RequireES<2>, RequireESOrExt<3, &Extensions::depthTextures>); + AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT24, 24, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_UNSIGNED_NORMALIZED, RequireES<3>, RequireES<3>, RequireESOrExt<3, &Extensions::depthTextures>); + AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT32F, 32, 0, 0, GL_DEPTH_COMPONENT, GL_FLOAT, GL_FLOAT, RequireES<3>, RequireES<3>, RequireESOrExt<3, &Extensions::depthTextures>); + AddDepthStencilFormat(&map, GL_DEPTH_COMPONENT32_OES, 32, 0, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_UNSIGNED_NORMALIZED, RequireExtOrExt<&Extensions::depthTextures, &Extensions::depth32>, RequireExtOrExt<&Extensions::depthTextures, &Extensions::depth32>, AlwaysSupported ); + AddDepthStencilFormat(&map, GL_DEPTH24_STENCIL8, 24, 8, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_UNSIGNED_NORMALIZED, RequireESOrExt<3, &Extensions::depthTextures>, RequireESOrExtOrExt<3, &Extensions::depthTextures, &Extensions::packedDepthStencil>, AlwaysSupported ); + AddDepthStencilFormat(&map, GL_DEPTH32F_STENCIL8, 32, 8, 24, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, GL_FLOAT, RequireES<3>, RequireES<3>, AlwaysSupported ); // STENCIL_INDEX8 is special-cased, see around the bottom of the list. // Luminance alpha formats @@ -519,36 +631,36 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap() map.insert(InternalFormatInfoPair(GL_LUMINANCE_ALPHA16F_EXT, LUMAFormat(16, 16, GL_LUMINANCE_ALPHA, GL_HALF_FLOAT, GL_FLOAT, RequireExtAndExt<&Extensions::textureStorage, &Extensions::textureHalfFloat>, NeverSupported, AlwaysSupported))); // Unsized formats - // | Internal format | Format | Supported | Renderable | Filterable | - AddUnsizedFormat(&map, GL_ALPHA, GL_ALPHA, RequireES<2, 0>, NeverSupported, AlwaysSupported); - AddUnsizedFormat(&map, GL_LUMINANCE, GL_LUMINANCE, RequireES<2, 0>, NeverSupported, AlwaysSupported); - AddUnsizedFormat(&map, GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, RequireES<2, 0>, NeverSupported, AlwaysSupported); - AddUnsizedFormat(&map, GL_RED, GL_RED, RequireESOrExt<3, 0, &Extensions::textureRG>, NeverSupported, AlwaysSupported); - AddUnsizedFormat(&map, GL_RG, GL_RG, RequireESOrExt<3, 0, &Extensions::textureRG>, NeverSupported, AlwaysSupported); - AddUnsizedFormat(&map, GL_RGB, GL_RGB, RequireES<2, 0>, RequireES<2, 0>, AlwaysSupported); - AddUnsizedFormat(&map, GL_RGBA, GL_RGBA, RequireES<2, 0>, RequireES<2, 0>, AlwaysSupported); - AddUnsizedFormat(&map, GL_RED_INTEGER, GL_RED_INTEGER, RequireES<3, 0>, NeverSupported, NeverSupported ); - AddUnsizedFormat(&map, GL_RG_INTEGER, GL_RG_INTEGER, RequireES<3, 0>, NeverSupported, NeverSupported ); - AddUnsizedFormat(&map, GL_RGB_INTEGER, GL_RGB_INTEGER, RequireES<3, 0>, NeverSupported, NeverSupported ); - AddUnsizedFormat(&map, GL_RGBA_INTEGER, GL_RGBA_INTEGER, RequireES<3, 0>, NeverSupported, NeverSupported ); - AddUnsizedFormat(&map, GL_BGRA_EXT, GL_BGRA_EXT, RequireExt<&Extensions::textureFormatBGRA8888>, RequireExt<&Extensions::textureFormatBGRA8888>, AlwaysSupported); - AddUnsizedFormat(&map, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, RequireES<2, 0>, RequireES<2, 0>, AlwaysSupported); - AddUnsizedFormat(&map, GL_DEPTH_STENCIL, GL_DEPTH_STENCIL, RequireESOrExt<3, 0, &Extensions::packedDepthStencil>, RequireESOrExt<3, 0, &Extensions::packedDepthStencil>, AlwaysSupported); - AddUnsizedFormat(&map, GL_SRGB_EXT, GL_RGB, RequireESOrExt<3, 0, &Extensions::sRGB>, NeverSupported, AlwaysSupported); - AddUnsizedFormat(&map, GL_SRGB_ALPHA_EXT, GL_RGBA, RequireESOrExt<3, 0, &Extensions::sRGB>, RequireESOrExt<3, 0, &Extensions::sRGB>, AlwaysSupported); + // | Internal format | Format | Supported | Renderable | Filterable | + AddUnsizedFormat(&map, GL_ALPHA, GL_ALPHA, RequireES<2>, NeverSupported, AlwaysSupported); + AddUnsizedFormat(&map, GL_LUMINANCE, GL_LUMINANCE, RequireES<2>, NeverSupported, AlwaysSupported); + AddUnsizedFormat(&map, GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, RequireES<2>, NeverSupported, AlwaysSupported); + AddUnsizedFormat(&map, GL_RED, GL_RED, RequireESOrExt<3, &Extensions::textureRG>, NeverSupported, AlwaysSupported); + AddUnsizedFormat(&map, GL_RG, GL_RG, RequireESOrExt<3, &Extensions::textureRG>, NeverSupported, AlwaysSupported); + AddUnsizedFormat(&map, GL_RGB, GL_RGB, RequireES<2>, RequireES<2>, AlwaysSupported); + AddUnsizedFormat(&map, GL_RGBA, GL_RGBA, RequireES<2>, RequireES<2>, AlwaysSupported); + AddUnsizedFormat(&map, GL_RED_INTEGER, GL_RED_INTEGER, RequireES<3>, NeverSupported, NeverSupported ); + AddUnsizedFormat(&map, GL_RG_INTEGER, GL_RG_INTEGER, RequireES<3>, NeverSupported, NeverSupported ); + AddUnsizedFormat(&map, GL_RGB_INTEGER, GL_RGB_INTEGER, RequireES<3>, NeverSupported, NeverSupported ); + AddUnsizedFormat(&map, GL_RGBA_INTEGER, GL_RGBA_INTEGER, RequireES<3>, NeverSupported, NeverSupported ); + AddUnsizedFormat(&map, GL_BGRA_EXT, GL_BGRA_EXT, RequireExt<&Extensions::textureFormatBGRA8888>, RequireExt<&Extensions::textureFormatBGRA8888>, AlwaysSupported); + AddUnsizedFormat(&map, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, RequireES<2>, RequireES<2>, AlwaysSupported); + AddUnsizedFormat(&map, GL_DEPTH_STENCIL, GL_DEPTH_STENCIL, RequireESOrExt<3, &Extensions::packedDepthStencil>, RequireESOrExt<3, &Extensions::packedDepthStencil>, AlwaysSupported); + AddUnsizedFormat(&map, GL_SRGB_EXT, GL_RGB, RequireESOrExt<3, &Extensions::sRGB>, NeverSupported, AlwaysSupported); + AddUnsizedFormat(&map, GL_SRGB_ALPHA_EXT, GL_RGBA, RequireESOrExt<3, &Extensions::sRGB>, RequireESOrExt<3, &Extensions::sRGB>, AlwaysSupported); // Compressed formats, From ES 3.0.1 spec, table 3.16 - // | Internal format | |W |H | BS |CC| Format | Type | SRGB | Supported | Renderable | Filterable | - map.insert(InternalFormatInfoPair(GL_COMPRESSED_R11_EAC, CompressedFormat(4, 4, 64, 1, GL_COMPRESSED_R11_EAC, GL_UNSIGNED_BYTE, false, RequireES<3, 0>, NeverSupported, AlwaysSupported))); - map.insert(InternalFormatInfoPair(GL_COMPRESSED_SIGNED_R11_EAC, CompressedFormat(4, 4, 64, 1, GL_COMPRESSED_SIGNED_R11_EAC, GL_UNSIGNED_BYTE, false, RequireES<3, 0>, NeverSupported, AlwaysSupported))); - map.insert(InternalFormatInfoPair(GL_COMPRESSED_RG11_EAC, CompressedFormat(4, 4, 128, 2, GL_COMPRESSED_RG11_EAC, GL_UNSIGNED_BYTE, false, RequireES<3, 0>, NeverSupported, AlwaysSupported))); - map.insert(InternalFormatInfoPair(GL_COMPRESSED_SIGNED_RG11_EAC, CompressedFormat(4, 4, 128, 2, GL_COMPRESSED_SIGNED_RG11_EAC, GL_UNSIGNED_BYTE, false, RequireES<3, 0>, NeverSupported, AlwaysSupported))); - map.insert(InternalFormatInfoPair(GL_COMPRESSED_RGB8_ETC2, CompressedFormat(4, 4, 64, 3, GL_COMPRESSED_RGB8_ETC2, GL_UNSIGNED_BYTE, false, RequireES<3, 0>, NeverSupported, AlwaysSupported))); - map.insert(InternalFormatInfoPair(GL_COMPRESSED_SRGB8_ETC2, CompressedFormat(4, 4, 64, 3, GL_COMPRESSED_SRGB8_ETC2, GL_UNSIGNED_BYTE, true, RequireES<3, 0>, NeverSupported, AlwaysSupported))); - map.insert(InternalFormatInfoPair(GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, CompressedFormat(4, 4, 64, 3, GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_UNSIGNED_BYTE, false, RequireES<3, 0>, NeverSupported, AlwaysSupported))); - map.insert(InternalFormatInfoPair(GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, CompressedFormat(4, 4, 64, 3, GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_UNSIGNED_BYTE, true, RequireES<3, 0>, NeverSupported, AlwaysSupported))); - map.insert(InternalFormatInfoPair(GL_COMPRESSED_RGBA8_ETC2_EAC, CompressedFormat(4, 4, 128, 4, GL_COMPRESSED_RGBA8_ETC2_EAC, GL_UNSIGNED_BYTE, false, RequireES<3, 0>, NeverSupported, AlwaysSupported))); - map.insert(InternalFormatInfoPair(GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, CompressedFormat(4, 4, 128, 4, GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, GL_UNSIGNED_BYTE, true, RequireES<3, 0>, NeverSupported, AlwaysSupported))); + // | Internal format | |W |H | BS |CC| Format | Type | SRGB | Supported | Renderable | Filterable | + map.insert(InternalFormatInfoPair(GL_COMPRESSED_R11_EAC, CompressedFormat(4, 4, 64, 1, GL_COMPRESSED_R11_EAC, GL_UNSIGNED_BYTE, false, RequireES<3>, NeverSupported, AlwaysSupported))); + map.insert(InternalFormatInfoPair(GL_COMPRESSED_SIGNED_R11_EAC, CompressedFormat(4, 4, 64, 1, GL_COMPRESSED_SIGNED_R11_EAC, GL_UNSIGNED_BYTE, false, RequireES<3>, NeverSupported, AlwaysSupported))); + map.insert(InternalFormatInfoPair(GL_COMPRESSED_RG11_EAC, CompressedFormat(4, 4, 128, 2, GL_COMPRESSED_RG11_EAC, GL_UNSIGNED_BYTE, false, RequireES<3>, NeverSupported, AlwaysSupported))); + map.insert(InternalFormatInfoPair(GL_COMPRESSED_SIGNED_RG11_EAC, CompressedFormat(4, 4, 128, 2, GL_COMPRESSED_SIGNED_RG11_EAC, GL_UNSIGNED_BYTE, false, RequireES<3>, NeverSupported, AlwaysSupported))); + map.insert(InternalFormatInfoPair(GL_COMPRESSED_RGB8_ETC2, CompressedFormat(4, 4, 64, 3, GL_COMPRESSED_RGB8_ETC2, GL_UNSIGNED_BYTE, false, RequireES<3>, NeverSupported, AlwaysSupported))); + map.insert(InternalFormatInfoPair(GL_COMPRESSED_SRGB8_ETC2, CompressedFormat(4, 4, 64, 3, GL_COMPRESSED_SRGB8_ETC2, GL_UNSIGNED_BYTE, true, RequireES<3>, NeverSupported, AlwaysSupported))); + map.insert(InternalFormatInfoPair(GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, CompressedFormat(4, 4, 64, 3, GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_UNSIGNED_BYTE, false, RequireES<3>, NeverSupported, AlwaysSupported))); + map.insert(InternalFormatInfoPair(GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, CompressedFormat(4, 4, 64, 3, GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_UNSIGNED_BYTE, true, RequireES<3>, NeverSupported, AlwaysSupported))); + map.insert(InternalFormatInfoPair(GL_COMPRESSED_RGBA8_ETC2_EAC, CompressedFormat(4, 4, 128, 4, GL_COMPRESSED_RGBA8_ETC2_EAC, GL_UNSIGNED_BYTE, false, RequireES<3>, NeverSupported, AlwaysSupported))); + map.insert(InternalFormatInfoPair(GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, CompressedFormat(4, 4, 128, 4, GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, GL_UNSIGNED_BYTE, true, RequireES<3>, NeverSupported, AlwaysSupported))); // From GL_EXT_texture_compression_dxt1 // | Internal format | |W |H | BS |CC| Format | Type | SRGB | Supported | Renderable | Filterable | @@ -600,11 +712,11 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap() // - Multisampled buffer are disallowed for non-normalized integer component types and we want to support it for STENCIL_INDEX8 // - All other stencil formats (all depth-stencil) are either float or normalized // - It affects only validation of internalformat in RenderbufferStorageMultisample. - // | Internal format |D |S |X | Format | Type | Component type | Supported | Renderable | Filterable | - AddDepthStencilFormat(&map, GL_STENCIL_INDEX8, 0, 8, 0, GL_STENCIL, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, RequireES<2, 0>, RequireES<2, 0>, NeverSupported); + // | Internal format |D |S |X | Format | Type | Component type | Supported | Renderable | Filterable | + AddDepthStencilFormat(&map, GL_STENCIL_INDEX8, 0, 8, 0, GL_STENCIL, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, RequireES<2>, RequireES<2>, NeverSupported); // From GL_ANGLE_lossy_etc_decode - map.insert(InternalFormatInfoPair(GL_ETC1_RGB8_LOSSY_DECODE_ANGLE, CompressedFormat(4, 4, 64, 3, GL_ETC1_RGB8_LOSSY_DECODE_ANGLE, GL_UNSIGNED_BYTE, false, RequireExt<&Extensions::lossyETCDecode>, NeverSupported, AlwaysSupported))); + map.insert(InternalFormatInfoPair(GL_ETC1_RGB8_LOSSY_DECODE_ANGLE, CompressedFormat(4, 4, 64, 3, GL_ETC1_RGB8_OES, GL_UNSIGNED_BYTE, false, RequireExt<&Extensions::lossyETCDecode>, NeverSupported, AlwaysSupported))); // From GL_EXT_texture_norm16 // | Internal format | R | G | B | A |S | Format | Type | Component type | SRGB | Texture supported | Renderable | Filterable | @@ -714,23 +826,28 @@ const InternalFormat &GetInternalFormatInfo(GLenum internalFormat) else { static const InternalFormat defaultInternalFormat; + UNREACHABLE(); return defaultInternalFormat; } } -ErrorOrResult InternalFormat::computeRowPitch(GLsizei width, - GLint alignment, - GLint rowLength) const +gl::ErrorOrResult InternalFormat::computeRowPitch(GLenum formatType, + GLsizei width, + GLint alignment, + GLint rowLength) const { // Compressed images do not use pack/unpack parameters. if (compressed) { ASSERT(rowLength == 0); - return computeCompressedImageSize(Extents(width, 1, 1)); + return computeCompressedImageSize(formatType, gl::Extents(width, 1, 1)); } + const auto &typeInfo = GetTypeInfo(formatType); + CheckedNumeric checkedComponents(typeInfo.specialInterpretation ? 1u : componentCount); + CheckedNumeric checkedTypeBytes(typeInfo.bytes); CheckedNumeric checkedWidth(rowLength > 0 ? rowLength : width); - CheckedNumeric checkedRowBytes = checkedWidth * pixelBytes; + CheckedNumeric checkedRowBytes = checkedWidth * checkedComponents * checkedTypeBytes; ASSERT(alignment > 0 && isPow2(alignment)); CheckedNumeric checkedAlignment(alignment); @@ -739,31 +856,26 @@ ErrorOrResult InternalFormat::computeRowPitch(GLsizei width, return aligned.ValueOrDie(); } -ErrorOrResult InternalFormat::computeDepthPitch(GLsizei height, - GLint imageHeight, - GLuint rowPitch) +gl::ErrorOrResult InternalFormat::computeDepthPitch(GLenum formatType, + GLsizei width, + GLsizei height, + GLint alignment, + GLint rowLength, + GLint imageHeight) const { GLuint rows = (imageHeight > 0 ? static_cast(imageHeight) : static_cast(height)); - CheckedNumeric checkedRowPitch(rowPitch); + GLuint rowPitch = 0; + ANGLE_TRY_RESULT(computeRowPitch(formatType, width, alignment, rowLength), rowPitch); + CheckedNumeric checkedRowPitch(rowPitch); auto depthPitch = checkedRowPitch * rows; ANGLE_TRY_CHECKED_MATH(depthPitch); return depthPitch.ValueOrDie(); } -ErrorOrResult InternalFormat::computeDepthPitch(GLsizei width, - GLsizei height, - GLint alignment, - GLint rowLength, - GLint imageHeight) const -{ - GLuint rowPitch = 0; - ANGLE_TRY_RESULT(computeRowPitch(width, alignment, rowLength), rowPitch); - return computeDepthPitch(height, imageHeight, rowPitch); -} - -ErrorOrResult InternalFormat::computeCompressedImageSize(const Extents &size) const +gl::ErrorOrResult InternalFormat::computeCompressedImageSize(GLenum formatType, + const gl::Extents &size) const { CheckedNumeric checkedWidth(size.width); CheckedNumeric checkedHeight(size.height); @@ -779,19 +891,21 @@ ErrorOrResult InternalFormat::computeCompressedImageSize(const Extents & return bytes.ValueOrDie(); } -ErrorOrResult InternalFormat::computeSkipBytes(GLuint rowPitch, - GLuint depthPitch, - const PixelStoreStateBase &state, - bool is3D) const +gl::ErrorOrResult InternalFormat::computeSkipBytes(GLuint rowPitch, + GLuint depthPitch, + GLint skipImages, + GLint skipRows, + GLint skipPixels, + bool applySkipImages) const { CheckedNumeric checkedRowPitch(rowPitch); CheckedNumeric checkedDepthPitch(depthPitch); - CheckedNumeric checkedSkipImages(static_cast(state.skipImages)); - CheckedNumeric checkedSkipRows(static_cast(state.skipRows)); - CheckedNumeric checkedSkipPixels(static_cast(state.skipPixels)); + CheckedNumeric checkedSkipImages(static_cast(skipImages)); + CheckedNumeric checkedSkipRows(static_cast(skipRows)); + CheckedNumeric checkedSkipPixels(static_cast(skipPixels)); CheckedNumeric checkedPixelBytes(pixelBytes); auto checkedSkipImagesBytes = checkedSkipImages * checkedDepthPitch; - if (!is3D) + if (!applySkipImages) { checkedSkipImagesBytes = 0; } @@ -801,48 +915,34 @@ ErrorOrResult InternalFormat::computeSkipBytes(GLuint rowPitch, return skipBytes.ValueOrDie(); } -ErrorOrResult InternalFormat::computePackUnpackEndByte(const Extents &size, - const PixelStoreStateBase &state, - bool is3D) const +gl::ErrorOrResult InternalFormat::computeUnpackSize( + GLenum formatType, + const gl::Extents &size, + const gl::PixelUnpackState &unpack) const { - GLuint rowPitch = 0; - ANGLE_TRY_RESULT(computeRowPitch(size.width, state.alignment, state.rowLength), - rowPitch); - - GLuint depthPitch = 0; - if (is3D) - { - ANGLE_TRY_RESULT(computeDepthPitch(size.height, state.imageHeight, rowPitch), depthPitch); - } - - CheckedNumeric checkedCopyBytes = 0; + // Compressed images do not use unpack parameters. if (compressed) { - ANGLE_TRY_RESULT(computeCompressedImageSize(size), checkedCopyBytes); + return computeCompressedImageSize(formatType, size); } - else if (size.height != 0 && (!is3D || size.depth != 0)) - { - CheckedNumeric bytes = pixelBytes; - checkedCopyBytes += size.width * bytes; - CheckedNumeric heightMinusOne = size.height - 1; - checkedCopyBytes += heightMinusOne * rowPitch; + base::CheckedNumeric checkedGroups(unpack.rowLength > 0 ? unpack.rowLength + : size.width); + base::CheckedNumeric checkedRows(unpack.imageHeight > 0 ? unpack.imageHeight + : size.height); - if (is3D) - { - CheckedNumeric depthMinusOne = size.depth - 1; - checkedCopyBytes += depthMinusOne * depthPitch; - } - } + // Compute the groups of all the layers in (0,depth-1) + auto layerGroups = checkedGroups * checkedRows * (size.depth - 1); + + // Compute the groups in the last layer (for non-3D textures, the only one) + auto lastLayerGroups = checkedGroups * (size.height - 1) + size.width; - CheckedNumeric checkedSkipBytes = 0; - ANGLE_TRY_RESULT(computeSkipBytes(rowPitch, depthPitch, state, is3D), - checkedSkipBytes); + // The total size is the sum times the bytes per pixel. + auto totalSize = (layerGroups + lastLayerGroups) * pixelBytes; - CheckedNumeric endByte = checkedCopyBytes + checkedSkipBytes; + ANGLE_TRY_CHECKED_MATH(totalSize); - ANGLE_TRY_CHECKED_MATH(endByte); - return endByte.ValueOrDie(); + return totalSize.ValueOrDie(); } GLenum GetSizedInternalFormat(GLenum internalFormat, GLenum type) diff --git a/gfx/angle/src/libANGLE/formatutils.h b/gfx/angle/src/libANGLE/formatutils.h index d6f9402d4..0ad5bd0ab 100755 --- a/gfx/angle/src/libANGLE/formatutils.h +++ b/gfx/angle/src/libANGLE/formatutils.h @@ -15,7 +15,6 @@ #include "angle_gl.h" #include "libANGLE/Caps.h" #include "libANGLE/Error.h" -#include "libANGLE/Version.h" #include "libANGLE/angletypes.h" namespace gl @@ -48,32 +47,29 @@ struct InternalFormat { InternalFormat(); - ErrorOrResult computeRowPitch(GLsizei width, - GLint alignment, - GLint rowLength) const; - static ErrorOrResult computeDepthPitch(GLsizei height, - GLint imageHeight, - GLuint rowPitch); - ErrorOrResult computeDepthPitch(GLsizei width, - GLsizei height, - GLint alignment, - GLint rowLength, - GLint imageHeight) const; - - ErrorOrResult computeCompressedImageSize(const Extents &size) const; - - ErrorOrResult computeSkipBytes(GLuint rowPitch, - GLuint depthPitch, - const PixelStoreStateBase &state, - bool is3D) const; - - ErrorOrResult computePackUnpackEndByte(const Extents &size, - const PixelStoreStateBase &state, - bool is3D) const; + gl::ErrorOrResult computeRowPitch(GLenum formatType, + GLsizei width, + GLint alignment, + GLint rowLength) const; + gl::ErrorOrResult computeDepthPitch(GLenum formatType, + GLsizei width, + GLsizei height, + GLint alignment, + GLint rowLength, + GLint imageHeight) const; + gl::ErrorOrResult computeCompressedImageSize(GLenum formatType, + const gl::Extents &size) const; + gl::ErrorOrResult computeSkipBytes(GLuint rowPitch, + GLuint depthPitch, + GLint skipImages, + GLint skipRows, + GLint skipPixels, + bool applySkipImages) const; + gl::ErrorOrResult computeUnpackSize(GLenum formatType, + const gl::Extents &size, + const gl::PixelUnpackState &unpack) const; bool isLUMA() const; - GLenum getReadPixelsFormat() const; - GLenum getReadPixelsType() const; bool operator==(const InternalFormat &other) const; bool operator!=(const InternalFormat &other) const; @@ -106,7 +102,7 @@ struct InternalFormat GLenum componentType; GLenum colorEncoding; - typedef bool (*SupportCheckFunction)(const Version &, const Extensions &); + typedef bool (*SupportCheckFunction)(GLuint, const Extensions &); SupportCheckFunction textureSupport; SupportCheckFunction renderSupport; SupportCheckFunction filterSupport; @@ -271,7 +267,7 @@ enum VertexFormatType VERTEX_FORMAT_UINT210_INT, }; -typedef std::vector InputLayout; +typedef std::vector InputLayout; struct VertexFormat : angle::NonCopyable { @@ -288,14 +284,6 @@ VertexFormatType GetVertexFormatType(const VertexAttribute &attrib); VertexFormatType GetVertexFormatType(const VertexAttribute &attrib, GLenum currentValueType); const VertexFormat &GetVertexFormatFromType(VertexFormatType vertexFormatType); -// Implemented in format_map_autogen.cpp -bool ValidES3Format(GLenum format); -bool ValidES3Type(GLenum type); -bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat); - -// Implemented in es3_copy_conversion_table_autogen.cpp -bool ValidES3CopyConversion(GLenum textureFormat, GLenum framebufferFormat); - } // namespace gl #endif // LIBANGLE_FORMATUTILS_H_ diff --git a/gfx/angle/src/libANGLE/gen_copy_conversion_table.py b/gfx/angle/src/libANGLE/gen_copy_conversion_table.py deleted file mode 100644 index f2c9603d5..000000000 --- a/gfx/angle/src/libANGLE/gen_copy_conversion_table.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/python -# Copyright 2016 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. -# -# gen_copy_conversion_table.py: -# Code generation for ES3 valid copy conversions table format map. - -from datetime import date -import sys - -sys.path.append('renderer') -import angle_format - -template_cpp = """// GENERATED FILE - DO NOT EDIT. -// Generated by {script_name} using data from {data_source_name}. -// -// Copyright {copyright_year} 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. -// -// format_map: -// Determining the sized internal format from a (format,type) pair. -// Also check es3 format combinations for validity. - -#include "angle_gl.h" -#include "common/debug.h" - -namespace gl -{{ - -bool ValidES3CopyConversion(GLenum textureFormat, GLenum framebufferFormat) -{{ - switch (textureFormat) - {{ -{texture_format_cases} default: - break; - }} - - return false; -}} - -}} // namespace gl -""" - -template_format_case = """ case {texture_format}: - switch (framebufferFormat) - {{ -{framebuffer_format_cases} return true; - default: - break; - }} - break; - -""" - -template_simple_case = """ case {key}: -""" - -def parse_texture_format_case(texture_format, framebuffer_formats): - framebuffer_format_cases = "" - for framebuffer_format in sorted(framebuffer_formats): - framebuffer_format_cases += template_simple_case.format(key = framebuffer_format) - return template_format_case.format( - texture_format = texture_format, framebuffer_format_cases = framebuffer_format_cases) - -data_source_name = 'es3_copy_conversion_formats.json' - -json_data = angle_format.load_json(data_source_name) - -format_map = {} - -for description, data in json_data.iteritems(): - for texture_format, framebuffer_format in data: - if texture_format not in format_map: - format_map[texture_format] = [] - format_map[texture_format] += [ framebuffer_format ] - -texture_format_cases = "" - -for texture_format, framebuffer_formats in sorted(format_map.iteritems()): - texture_format_cases += parse_texture_format_case(texture_format, framebuffer_formats) - -with open('es3_copy_conversion_table_autogen.cpp', 'wt') as out_file: - output_cpp = template_cpp.format( - script_name = sys.argv[0], - data_source_name = data_source_name, - copyright_year = date.today().year, - texture_format_cases = texture_format_cases) - out_file.write(output_cpp) - out_file.close() diff --git a/gfx/angle/src/libANGLE/gen_format_map.py b/gfx/angle/src/libANGLE/gen_format_map.py deleted file mode 100644 index b67f42784..000000000 --- a/gfx/angle/src/libANGLE/gen_format_map.py +++ /dev/null @@ -1,187 +0,0 @@ -#!/usr/bin/python -# Copyright 2016 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. -# -# gen_format_map.py: -# Code generation for GL format map. The format map matches between -# {format,type} and internal format. - -from datetime import date -import sys - -sys.path.append('renderer') -import angle_format - -template_cpp = """// GENERATED FILE - DO NOT EDIT. -// Generated by {script_name} using data from {data_source_name}. -// ES3 format info from {es3_data_source_name}. -// -// Copyright {copyright_year} 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. -// -// format_map: -// Determining the sized internal format from a (format,type) pair. -// Also check es3 format combinations for validity. - -#include "angle_gl.h" -#include "common/debug.h" - -namespace gl -{{ - -GLenum GetSizedFormatInternal(GLenum format, GLenum type) -{{ - switch (format) - {{ -{format_cases} case GL_NONE: - return GL_NONE; - - default: - break; - }} - - return GL_NONE; -}} - -bool ValidES3Format(GLenum format) -{{ - switch (format) - {{ -{es3_format_cases} return true; - - default: - return false; - }} -}} - -bool ValidES3Type(GLenum type) -{{ - switch (type) - {{ -{es3_type_cases} return true; - - default: - return false; - }} -}} - -bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat) -{{ - ASSERT(ValidES3Format(format) && ValidES3Type(type)); - - switch (format) - {{ -{es3_combo_cases} default: - UNREACHABLE(); - break; - }} - - return false; -}} - -}} // namespace gl -""" - -template_format_case = """ case {format}: - switch (type) - {{ -{type_cases} default: - break; - }} - break; - -""" - -template_simple_case = """ case {key}: - return {result}; -""" - -template_es3_combo_type_case = """ case {type}: - {{ - switch (internalFormat) - {{ -{internal_format_cases} return true; - default: - break; - }} - break; - }} -""" - -def parse_type_case(type, result): - return template_simple_case.format( - key = type, result = result) - -def parse_format_case(format, type_map): - type_cases = "" - for type, internal_format in sorted(type_map.iteritems()): - type_cases += parse_type_case(type, internal_format) - return template_format_case.format( - format = format, type_cases = type_cases) - -input_script = 'format_map_data.json' - -format_map = angle_format.load_json(input_script) - -format_cases = "" - -for format, type_map in sorted(format_map.iteritems()): - format_cases += parse_format_case(format, type_map) - -combo_data_file = 'es3_format_type_combinations.json' -es3_combo_data = angle_format.load_json(combo_data_file) -combo_data = [combo for sublist in es3_combo_data.values() for combo in sublist] - -types = set() -formats = set() -combos = {} - -for internal_format, format, type in combo_data: - types.update([type]) - formats.update([format]) - if format not in combos: - combos[format] = {} - if type not in combos[format]: - combos[format][type] = [internal_format] - else: - combos[format][type] += [internal_format] - -es3_format_cases = "" - -for format in sorted(formats): - es3_format_cases += " case " + format + ":\n" - -es3_type_cases = "" - -for type in sorted(types): - es3_type_cases += " case " + type + ":\n" - -es3_combo_cases = "" - -for format, type_combos in combos.iteritems(): - this_type_cases = "" - for type, combos in type_combos.iteritems(): - internal_format_cases = "" - for internal_format in combos: - internal_format_cases += " case " + internal_format + ":\n" - - this_type_cases += template_es3_combo_type_case.format( - type = type, internal_format_cases = internal_format_cases) - - es3_combo_cases += template_format_case.format( - format = format, type_cases = this_type_cases) - -with open('format_map_autogen.cpp', 'wt') as out_file: - output_cpp = template_cpp.format( - script_name = sys.argv[0], - data_source_name = input_script, - es3_data_source_name = combo_data_file, - copyright_year = date.today().year, - format_cases = format_cases, - es3_format_cases = es3_format_cases, - es3_type_cases = es3_type_cases, - es3_combo_cases = es3_combo_cases) - out_file.write(output_cpp) - out_file.close() diff --git a/gfx/angle/src/libANGLE/moz.build b/gfx/angle/src/libANGLE/moz.build index e127ccce1..7d12a1ca6 100755 --- a/gfx/angle/src/libANGLE/moz.build +++ b/gfx/angle/src/libANGLE/moz.build @@ -29,13 +29,11 @@ UNIFIED_SOURCES += [ '../compiler/preprocessor/Preprocessor.cpp', '../compiler/preprocessor/Token.cpp', '../compiler/preprocessor/Tokenizer.cpp', - '../compiler/translator/AddAndTrueToLoopCondition.cpp', '../compiler/translator/AddDefaultReturnStatements.cpp', '../compiler/translator/ArrayReturnValueToOutParameter.cpp', '../compiler/translator/ASTMetadataHLSL.cpp', '../compiler/translator/blocklayout.cpp', '../compiler/translator/blocklayoutHLSL.cpp', - '../compiler/translator/BreakVariableAliasingInInnerLoops.cpp', '../compiler/translator/BuiltInFunctionEmulator.cpp', '../compiler/translator/BuiltInFunctionEmulatorGLSL.cpp', '../compiler/translator/BuiltInFunctionEmulatorHLSL.cpp', @@ -43,8 +41,11 @@ UNIFIED_SOURCES += [ '../compiler/translator/CallDAG.cpp', '../compiler/translator/CodeGen.cpp', '../compiler/translator/Compiler.cpp', - '../compiler/translator/ConstantUnion.cpp', '../compiler/translator/DeferGlobalInitializers.cpp', + '../compiler/translator/depgraph/DependencyGraph.cpp', + '../compiler/translator/depgraph/DependencyGraphBuilder.cpp', + '../compiler/translator/depgraph/DependencyGraphOutput.cpp', + '../compiler/translator/depgraph/DependencyGraphTraverse.cpp', '../compiler/translator/Diagnostics.cpp', '../compiler/translator/DirectiveHandler.cpp', '../compiler/translator/EmulatePrecision.cpp', @@ -71,27 +72,28 @@ UNIFIED_SOURCES += [ '../compiler/translator/ParseContext.cpp', '../compiler/translator/PoolAlloc.cpp', '../compiler/translator/PruneEmptyDeclarations.cpp', - '../compiler/translator/QualifierTypes.cpp', '../compiler/translator/RecordConstantPrecision.cpp', '../compiler/translator/RegenerateStructNames.cpp', '../compiler/translator/RemoveDynamicIndexing.cpp', - '../compiler/translator/RemoveInvariantDeclaration.cpp', '../compiler/translator/RemovePow.cpp', '../compiler/translator/RemoveSwitchFallThrough.cpp', '../compiler/translator/RewriteDoWhile.cpp', '../compiler/translator/RewriteElseBlocks.cpp', - '../compiler/translator/RewriteUnaryMinusOperatorInt.cpp', + '../compiler/translator/RewriteTexelFetchOffset.cpp', '../compiler/translator/ScalarizeVecAndMatConstructorArgs.cpp', '../compiler/translator/SearchSymbol.cpp', '../compiler/translator/SeparateArrayInitialization.cpp', '../compiler/translator/SeparateDeclarations.cpp', '../compiler/translator/SeparateExpressionsReturningArrays.cpp', + '../compiler/translator/ShaderLang.cpp', '../compiler/translator/ShaderVars.cpp', '../compiler/translator/SimplifyLoopConditions.cpp', '../compiler/translator/SplitSequenceOperator.cpp', '../compiler/translator/StructureHLSL.cpp', '../compiler/translator/SymbolTable.cpp', '../compiler/translator/TextureFunctionHLSL.cpp', + '../compiler/translator/timing/RestrictFragmentShaderTiming.cpp', + '../compiler/translator/timing/RestrictVertexShaderTiming.cpp', '../compiler/translator/TranslatorESSL.cpp', '../compiler/translator/TranslatorGLSL.cpp', '../compiler/translator/TranslatorHLSL.cpp', @@ -99,7 +101,6 @@ UNIFIED_SOURCES += [ '../compiler/translator/UnfoldShortCircuitAST.cpp', '../compiler/translator/UnfoldShortCircuitToIf.cpp', '../compiler/translator/UniformHLSL.cpp', - '../compiler/translator/UseInterfaceBlockFields.cpp', '../compiler/translator/util.cpp', '../compiler/translator/UtilsHLSL.cpp', '../compiler/translator/ValidateGlobalInitializer.cpp', @@ -128,9 +129,7 @@ UNIFIED_SOURCES += [ 'Debug.cpp', 'Device.cpp', 'Error.cpp', - 'es3_copy_conversion_table_autogen.cpp', 'Fence.cpp', - 'format_map_autogen.cpp', 'formatutils.cpp', 'Framebuffer.cpp', 'FramebufferAttachment.cpp', @@ -144,7 +143,6 @@ UNIFIED_SOURCES += [ 'Program.cpp', 'Query.cpp', 'queryconversions.cpp', - 'queryutils.cpp', 'Renderbuffer.cpp', 'renderer/ContextImpl.cpp', 'renderer/d3d/BufferD3D.cpp', @@ -184,15 +182,14 @@ UNIFIED_SOURCES += [ 'renderer/d3d/ShaderD3D.cpp', 'renderer/d3d/ShaderExecutableD3D.cpp', 'renderer/d3d/SurfaceD3D.cpp', - 'renderer/d3d/SwapChainD3D.cpp', 'renderer/d3d/TextureD3D.cpp', 'renderer/d3d/VaryingPacking.cpp', 'renderer/d3d/VertexBuffer.cpp', 'renderer/d3d/VertexDataManager.cpp', 'renderer/DeviceImpl.cpp', 'renderer/DisplayImpl.cpp', - 'renderer/driver_utils.cpp', - 'renderer/Format_table_autogen.cpp', + 'renderer/Format.cpp', + 'renderer/Format_autogen.cpp', 'renderer/gl/BlitGL.cpp', 'renderer/gl/BufferGL.cpp', 'renderer/gl/CompilerGL.cpp', @@ -216,7 +213,6 @@ UNIFIED_SOURCES += [ 'renderer/gl/TextureGL.cpp', 'renderer/gl/TransformFeedbackGL.cpp', 'renderer/gl/VertexArrayGL.cpp', - 'renderer/gl/wgl/D3DTextureSurfaceWGL.cpp', 'renderer/gl/wgl/DisplayWGL.cpp', 'renderer/gl/wgl/DXGISwapChainWindowSurfaceWGL.cpp', 'renderer/gl/wgl/FunctionsWGL.cpp', @@ -224,25 +220,6 @@ UNIFIED_SOURCES += [ 'renderer/gl/wgl/wgl_utils.cpp', 'renderer/gl/wgl/WindowSurfaceWGL.cpp', 'renderer/load_functions_table_autogen.cpp', - 'renderer/null/BufferNULL.cpp', - 'renderer/null/CompilerNULL.cpp', - 'renderer/null/ContextNULL.cpp', - 'renderer/null/DeviceNULL.cpp', - 'renderer/null/DisplayNULL.cpp', - 'renderer/null/FenceNVNULL.cpp', - 'renderer/null/FenceSyncNULL.cpp', - 'renderer/null/FramebufferNULL.cpp', - 'renderer/null/ImageNULL.cpp', - 'renderer/null/PathNULL.cpp', - 'renderer/null/ProgramNULL.cpp', - 'renderer/null/QueryNULL.cpp', - 'renderer/null/RenderbufferNULL.cpp', - 'renderer/null/SamplerNULL.cpp', - 'renderer/null/ShaderNULL.cpp', - 'renderer/null/SurfaceNULL.cpp', - 'renderer/null/TextureNULL.cpp', - 'renderer/null/TransformFeedbackNULL.cpp', - 'renderer/null/VertexArrayNULL.cpp', 'renderer/renderer_utils.cpp', 'renderer/SurfaceImpl.cpp', 'renderer/TextureImpl.cpp', @@ -273,7 +250,6 @@ UNIFIED_SOURCES += [ 'Stream.cpp', 'Surface.cpp', 'Texture.cpp', - 'Thread.cpp', 'TransformFeedback.cpp', 'Uniform.cpp', 'validationEGL.cpp', @@ -288,8 +264,6 @@ SOURCES += [ '../compiler/translator/EmulateGLFragColorBroadcast.cpp', '../compiler/translator/glslang_lex.cpp', '../compiler/translator/glslang_tab.cpp', - '../compiler/translator/RewriteTexelFetchOffset.cpp', - '../compiler/translator/ShaderLang.cpp', 'Display.cpp', 'renderer/d3d/DisplayD3D.cpp', 'renderer/d3d/HLSLCompiler.cpp', @@ -301,7 +275,6 @@ if CONFIG['MOZ_HAS_WINSDK_WITH_D3D']: 'renderer/d3d/d3d11/Clear11.cpp', 'renderer/d3d/d3d11/Context11.cpp', 'renderer/d3d/d3d11/DebugAnnotator11.cpp', - 'renderer/d3d/d3d11/dxgi_format_map_autogen.cpp', 'renderer/d3d/d3d11/dxgi_support_table.cpp', 'renderer/d3d/d3d11/Fence11.cpp', 'renderer/d3d/d3d11/formatutils11.cpp', @@ -332,7 +305,6 @@ if CONFIG['MOZ_HAS_WINSDK_WITH_D3D']: 'renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp', ] -CXXFLAGS += CONFIG['SSE2_FLAGS'] if CONFIG['GNU_CXX']: CXXFLAGS += [ @@ -353,6 +325,9 @@ if CONFIG['GNU_CXX']: '-Wno-shadow-local', ] +if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']: + LOCAL_INCLUDES += ['%' + '%s/include/' % CONFIG['MOZ_DIRECTX_SDK_PATH']] + DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True DEFINES['_HAS_EXCEPTIONS'] = 0 @@ -385,6 +360,11 @@ DEFINES['ANGLE_DEFAULT_D3D11'] = "0" if CONFIG['MOZ_HAS_WINSDK_WITH_D3D']: OS_LIBS += [ 'd3d9', 'dxguid' ] +else: + EXTRA_DSO_LDOPTS += [ + '\'%s/lib/%s/d3d9.lib\'' % (CONFIG['MOZ_DIRECTX_SDK_PATH'], CONFIG['MOZ_D3D_CPU_SUFFIX']), + '\'%s/lib/%s/dxguid.lib\'' % (CONFIG['MOZ_DIRECTX_SDK_PATH'], CONFIG['MOZ_D3D_CPU_SUFFIX']), + ] Library('libANGLE') diff --git a/gfx/angle/src/libANGLE/queryconversions.cpp b/gfx/angle/src/libANGLE/queryconversions.cpp index 611fbc4ba..83ee35f93 100755 --- a/gfx/angle/src/libANGLE/queryconversions.cpp +++ b/gfx/angle/src/libANGLE/queryconversions.cpp @@ -86,6 +86,17 @@ QueryT CastStateValue(GLenum pname, NativeT value) } // anonymous namespace +template <> +GLenum GLTypeToGLenum::value = GL_INT; +template <> +GLenum GLTypeToGLenum::value = GL_UNSIGNED_INT; +template <> +GLenum GLTypeToGLenum::value = GL_BOOL; +template <> +GLenum GLTypeToGLenum::value = GL_INT_64_ANGLEX; +template <> +GLenum GLTypeToGLenum::value = GL_FLOAT; + template void CastStateValues(Context *context, GLenum nativeType, GLenum pname, unsigned int numParams, QueryT *outParams) diff --git a/gfx/angle/src/libANGLE/queryconversions.h b/gfx/angle/src/libANGLE/queryconversions.h index 5b96a3e15..7b6be3592 100755 --- a/gfx/angle/src/libANGLE/queryconversions.h +++ b/gfx/angle/src/libANGLE/queryconversions.h @@ -23,33 +23,7 @@ class Context; template struct GLTypeToGLenum { - // static constexpr GLenum value; -}; - -template <> -struct GLTypeToGLenum -{ - static constexpr GLenum value = GL_INT; -}; -template <> -struct GLTypeToGLenum -{ - static constexpr GLenum value = GL_UNSIGNED_INT; -}; -template <> -struct GLTypeToGLenum -{ - static constexpr GLenum value = GL_BOOL; -}; -template <> -struct GLTypeToGLenum -{ - static constexpr GLenum value = GL_INT_64_ANGLEX; -}; -template <> -struct GLTypeToGLenum -{ - static constexpr GLenum value = GL_FLOAT; + static GLenum value; }; // The GL state query API types are: bool, int, uint, float, int64 diff --git a/gfx/angle/src/libANGLE/queryutils.cpp b/gfx/angle/src/libANGLE/queryutils.cpp deleted file mode 100644 index fdd2980e2..000000000 --- a/gfx/angle/src/libANGLE/queryutils.cpp +++ /dev/null @@ -1,772 +0,0 @@ -// -// Copyright (c) 2016 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. -// - -// queryutils.cpp: Utilities for querying values from GL objects - -#include "libANGLE/queryutils.h" - -#include "common/utilities.h" - -#include "libANGLE/Buffer.h" -#include "libANGLE/Framebuffer.h" -#include "libANGLE/Program.h" -#include "libANGLE/Renderbuffer.h" -#include "libANGLE/Sampler.h" -#include "libANGLE/Shader.h" -#include "libANGLE/Texture.h" -#include "libANGLE/Uniform.h" -#include "libANGLE/VertexAttribute.h" - -namespace gl -{ - -namespace -{ -template -void QueryTexParameterBase(const Texture *texture, GLenum pname, ParamType *params) -{ - ASSERT(texture != nullptr); - - switch (pname) - { - case GL_TEXTURE_MAG_FILTER: - *params = ConvertFromGLenum(texture->getMagFilter()); - break; - case GL_TEXTURE_MIN_FILTER: - *params = ConvertFromGLenum(texture->getMinFilter()); - break; - case GL_TEXTURE_WRAP_S: - *params = ConvertFromGLenum(texture->getWrapS()); - break; - case GL_TEXTURE_WRAP_T: - *params = ConvertFromGLenum(texture->getWrapT()); - break; - case GL_TEXTURE_WRAP_R: - *params = ConvertFromGLenum(texture->getWrapR()); - break; - case GL_TEXTURE_IMMUTABLE_FORMAT: - *params = ConvertFromGLboolean(texture->getImmutableFormat()); - break; - case GL_TEXTURE_IMMUTABLE_LEVELS: - *params = ConvertFromGLuint(texture->getImmutableLevels()); - break; - case GL_TEXTURE_USAGE_ANGLE: - *params = ConvertFromGLenum(texture->getUsage()); - break; - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - *params = ConvertFromGLfloat(texture->getMaxAnisotropy()); - break; - case GL_TEXTURE_SWIZZLE_R: - *params = ConvertFromGLenum(texture->getSwizzleRed()); - break; - case GL_TEXTURE_SWIZZLE_G: - *params = ConvertFromGLenum(texture->getSwizzleGreen()); - break; - case GL_TEXTURE_SWIZZLE_B: - *params = ConvertFromGLenum(texture->getSwizzleBlue()); - break; - case GL_TEXTURE_SWIZZLE_A: - *params = ConvertFromGLenum(texture->getSwizzleAlpha()); - break; - case GL_TEXTURE_BASE_LEVEL: - *params = ConvertFromGLuint(texture->getBaseLevel()); - break; - case GL_TEXTURE_MAX_LEVEL: - *params = ConvertFromGLuint(texture->getMaxLevel()); - break; - case GL_TEXTURE_MIN_LOD: - *params = ConvertFromGLfloat(texture->getSamplerState().minLod); - break; - case GL_TEXTURE_MAX_LOD: - *params = ConvertFromGLfloat(texture->getSamplerState().maxLod); - break; - case GL_TEXTURE_COMPARE_MODE: - *params = ConvertFromGLenum(texture->getCompareMode()); - break; - case GL_TEXTURE_COMPARE_FUNC: - *params = ConvertFromGLenum(texture->getCompareFunc()); - break; - case GL_TEXTURE_SRGB_DECODE_EXT: - *params = ConvertFromGLenum(texture->getSRGBDecode()); - break; - default: - UNREACHABLE(); - break; - } -} - -template -void SetTexParameterBase(Texture *texture, GLenum pname, const ParamType *params) -{ - ASSERT(texture != nullptr); - - switch (pname) - { - case GL_TEXTURE_WRAP_S: - texture->setWrapS(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_WRAP_T: - texture->setWrapT(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_WRAP_R: - texture->setWrapR(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_MIN_FILTER: - texture->setMinFilter(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_MAG_FILTER: - texture->setMagFilter(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_USAGE_ANGLE: - texture->setUsage(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - texture->setMaxAnisotropy(ConvertToGLfloat(params[0])); - break; - case GL_TEXTURE_COMPARE_MODE: - texture->setCompareMode(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_COMPARE_FUNC: - texture->setCompareFunc(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_SWIZZLE_R: - texture->setSwizzleRed(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_SWIZZLE_G: - texture->setSwizzleGreen(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_SWIZZLE_B: - texture->setSwizzleBlue(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_SWIZZLE_A: - texture->setSwizzleAlpha(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_BASE_LEVEL: - texture->setBaseLevel(ConvertToGLuint(params[0])); - break; - case GL_TEXTURE_MAX_LEVEL: - texture->setMaxLevel(ConvertToGLuint(params[0])); - break; - case GL_TEXTURE_MIN_LOD: - texture->setMinLod(ConvertToGLfloat(params[0])); - break; - case GL_TEXTURE_MAX_LOD: - texture->setMaxLod(ConvertToGLfloat(params[0])); - break; - case GL_TEXTURE_SRGB_DECODE_EXT: - texture->setSRGBDecode(ConvertToGLenum(params[0])); - break; - default: - UNREACHABLE(); - break; - } -} - -template -void QuerySamplerParameterBase(const Sampler *sampler, GLenum pname, ParamType *params) -{ - switch (pname) - { - case GL_TEXTURE_MIN_FILTER: - *params = ConvertFromGLenum(sampler->getMinFilter()); - break; - case GL_TEXTURE_MAG_FILTER: - *params = ConvertFromGLenum(sampler->getMagFilter()); - break; - case GL_TEXTURE_WRAP_S: - *params = ConvertFromGLenum(sampler->getWrapS()); - break; - case GL_TEXTURE_WRAP_T: - *params = ConvertFromGLenum(sampler->getWrapT()); - break; - case GL_TEXTURE_WRAP_R: - *params = ConvertFromGLenum(sampler->getWrapR()); - break; - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - *params = ConvertFromGLfloat(sampler->getMaxAnisotropy()); - break; - case GL_TEXTURE_MIN_LOD: - *params = ConvertFromGLfloat(sampler->getMinLod()); - break; - case GL_TEXTURE_MAX_LOD: - *params = ConvertFromGLfloat(sampler->getMaxLod()); - break; - case GL_TEXTURE_COMPARE_MODE: - *params = ConvertFromGLenum(sampler->getCompareMode()); - break; - case GL_TEXTURE_COMPARE_FUNC: - *params = ConvertFromGLenum(sampler->getCompareFunc()); - break; - case GL_TEXTURE_SRGB_DECODE_EXT: - *params = ConvertFromGLenum(sampler->getSRGBDecode()); - break; - default: - UNREACHABLE(); - break; - } -} - -template -void SetSamplerParameterBase(Sampler *sampler, GLenum pname, const ParamType *params) -{ - switch (pname) - { - case GL_TEXTURE_WRAP_S: - sampler->setWrapS(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_WRAP_T: - sampler->setWrapT(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_WRAP_R: - sampler->setWrapR(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_MIN_FILTER: - sampler->setMinFilter(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_MAG_FILTER: - sampler->setMagFilter(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - sampler->setMaxAnisotropy(ConvertToGLfloat(params[0])); - break; - case GL_TEXTURE_COMPARE_MODE: - sampler->setCompareMode(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_COMPARE_FUNC: - sampler->setCompareFunc(ConvertToGLenum(params[0])); - break; - case GL_TEXTURE_MIN_LOD: - sampler->setMinLod(ConvertToGLfloat(params[0])); - break; - case GL_TEXTURE_MAX_LOD: - sampler->setMaxLod(ConvertToGLfloat(params[0])); - break; - case GL_TEXTURE_SRGB_DECODE_EXT: - sampler->setSRGBDecode(ConvertToGLenum(params[0])); - break; - default: - UNREACHABLE(); - break; - } -} - -template -ParamType ConvertCurrentValue(CurrentDataType currentValue) -{ - return static_cast(currentValue); -} - -template <> -GLint ConvertCurrentValue(GLfloat currentValue) -{ - return iround(currentValue); -} - -template -void QueryVertexAttribBase(const VertexAttribute &attrib, - const CurrentDataType (¤tValueData)[CurrentValueCount], - GLenum pname, - ParamType *params) -{ - switch (pname) - { - case GL_CURRENT_VERTEX_ATTRIB: - for (size_t i = 0; i < CurrentValueCount; ++i) - { - params[i] = ConvertCurrentValue(currentValueData[i]); - } - break; - case GL_VERTEX_ATTRIB_ARRAY_ENABLED: - *params = ConvertFromGLboolean(attrib.enabled); - break; - case GL_VERTEX_ATTRIB_ARRAY_SIZE: - *params = ConvertFromGLuint(attrib.size); - break; - case GL_VERTEX_ATTRIB_ARRAY_STRIDE: - *params = ConvertFromGLuint(attrib.stride); - break; - case GL_VERTEX_ATTRIB_ARRAY_TYPE: - *params = ConvertFromGLenum(attrib.type); - break; - case GL_VERTEX_ATTRIB_ARRAY_NORMALIZED: - *params = ConvertFromGLboolean(attrib.normalized); - break; - case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: - *params = ConvertFromGLuint(attrib.buffer.id()); - break; - case GL_VERTEX_ATTRIB_ARRAY_DIVISOR: - *params = ConvertFromGLuint(attrib.divisor); - break; - case GL_VERTEX_ATTRIB_ARRAY_INTEGER: - *params = ConvertFromGLboolean(attrib.pureInteger); - break; - default: - UNREACHABLE(); - break; - } -} - -template -void QueryBufferParameterBase(const Buffer *buffer, GLenum pname, ParamType *params) -{ - ASSERT(buffer != nullptr); - - switch (pname) - { - case GL_BUFFER_USAGE: - *params = ConvertFromGLenum(buffer->getUsage()); - break; - case GL_BUFFER_SIZE: - *params = ConvertFromGLint64(buffer->getSize()); - break; - case GL_BUFFER_ACCESS_FLAGS: - *params = ConvertFromGLuint(buffer->getAccessFlags()); - break; - case GL_BUFFER_ACCESS_OES: - *params = ConvertFromGLenum(buffer->getAccess()); - break; - case GL_BUFFER_MAPPED: - *params = ConvertFromGLboolean(buffer->isMapped()); - break; - case GL_BUFFER_MAP_OFFSET: - *params = ConvertFromGLint64(buffer->getMapOffset()); - break; - case GL_BUFFER_MAP_LENGTH: - *params = ConvertFromGLint64(buffer->getMapLength()); - break; - default: - UNREACHABLE(); - break; - } -} - -} // anonymous namespace - -void QueryFramebufferAttachmentParameteriv(const Framebuffer *framebuffer, - GLenum attachment, - GLenum pname, - GLint *params) -{ - ASSERT(framebuffer); - - const FramebufferAttachment *attachmentObject = framebuffer->getAttachment(attachment); - if (attachmentObject == nullptr) - { - // ES 2.0.25 spec pg 127 states that if the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE - // is NONE, then querying any other pname will generate INVALID_ENUM. - - // ES 3.0.2 spec pg 235 states that if the attachment type is none, - // GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME will return zero and be an - // INVALID_OPERATION for all other pnames - - switch (pname) - { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: - *params = GL_NONE; - break; - - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: - *params = 0; - break; - - default: - UNREACHABLE(); - break; - } - - return; - } - - switch (pname) - { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: - *params = attachmentObject->type(); - break; - - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: - *params = attachmentObject->id(); - break; - - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: - *params = attachmentObject->mipLevel(); - break; - - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: - *params = attachmentObject->cubeMapFace(); - break; - - case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE: - *params = attachmentObject->getRedSize(); - break; - - case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: - *params = attachmentObject->getGreenSize(); - break; - - case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: - *params = attachmentObject->getBlueSize(); - break; - - case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: - *params = attachmentObject->getAlphaSize(); - break; - - case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: - *params = attachmentObject->getDepthSize(); - break; - - case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: - *params = attachmentObject->getStencilSize(); - break; - - case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: - *params = attachmentObject->getComponentType(); - break; - - case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: - *params = attachmentObject->getColorEncoding(); - break; - - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: - *params = attachmentObject->layer(); - break; - - default: - UNREACHABLE(); - break; - } -} - -void QueryBufferParameteriv(const Buffer *buffer, GLenum pname, GLint *params) -{ - QueryBufferParameterBase(buffer, pname, params); -} - -void QueryBufferParameteri64v(const Buffer *buffer, GLenum pname, GLint64 *params) -{ - QueryBufferParameterBase(buffer, pname, params); -} - -void QueryBufferPointerv(const Buffer *buffer, GLenum pname, void **params) -{ - switch (pname) - { - case GL_BUFFER_MAP_POINTER: - *params = buffer->getMapPointer(); - break; - - default: - UNREACHABLE(); - break; - } -} - -void QueryProgramiv(const Program *program, GLenum pname, GLint *params) -{ - ASSERT(program != nullptr); - - switch (pname) - { - case GL_DELETE_STATUS: - *params = program->isFlaggedForDeletion(); - return; - case GL_LINK_STATUS: - *params = program->isLinked(); - return; - case GL_VALIDATE_STATUS: - *params = program->isValidated(); - return; - case GL_INFO_LOG_LENGTH: - *params = program->getInfoLogLength(); - return; - case GL_ATTACHED_SHADERS: - *params = program->getAttachedShadersCount(); - return; - case GL_ACTIVE_ATTRIBUTES: - *params = program->getActiveAttributeCount(); - return; - case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: - *params = program->getActiveAttributeMaxLength(); - return; - case GL_ACTIVE_UNIFORMS: - *params = program->getActiveUniformCount(); - return; - case GL_ACTIVE_UNIFORM_MAX_LENGTH: - *params = program->getActiveUniformMaxLength(); - return; - case GL_PROGRAM_BINARY_LENGTH_OES: - *params = program->getBinaryLength(); - return; - case GL_ACTIVE_UNIFORM_BLOCKS: - *params = program->getActiveUniformBlockCount(); - return; - case GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH: - *params = program->getActiveUniformBlockMaxLength(); - break; - case GL_TRANSFORM_FEEDBACK_BUFFER_MODE: - *params = program->getTransformFeedbackBufferMode(); - break; - case GL_TRANSFORM_FEEDBACK_VARYINGS: - *params = program->getTransformFeedbackVaryingCount(); - break; - case GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH: - *params = program->getTransformFeedbackVaryingMaxLength(); - break; - case GL_PROGRAM_BINARY_RETRIEVABLE_HINT: - *params = program->getBinaryRetrievableHint(); - break; - default: - UNREACHABLE(); - break; - } -} - -void QueryRenderbufferiv(const Renderbuffer *renderbuffer, GLenum pname, GLint *params) -{ - ASSERT(renderbuffer != nullptr); - - switch (pname) - { - case GL_RENDERBUFFER_WIDTH: - *params = renderbuffer->getWidth(); - break; - case GL_RENDERBUFFER_HEIGHT: - *params = renderbuffer->getHeight(); - break; - case GL_RENDERBUFFER_INTERNAL_FORMAT: - *params = renderbuffer->getFormat().info->internalFormat; - break; - case GL_RENDERBUFFER_RED_SIZE: - *params = renderbuffer->getRedSize(); - break; - case GL_RENDERBUFFER_GREEN_SIZE: - *params = renderbuffer->getGreenSize(); - break; - case GL_RENDERBUFFER_BLUE_SIZE: - *params = renderbuffer->getBlueSize(); - break; - case GL_RENDERBUFFER_ALPHA_SIZE: - *params = renderbuffer->getAlphaSize(); - break; - case GL_RENDERBUFFER_DEPTH_SIZE: - *params = renderbuffer->getDepthSize(); - break; - case GL_RENDERBUFFER_STENCIL_SIZE: - *params = renderbuffer->getStencilSize(); - break; - case GL_RENDERBUFFER_SAMPLES_ANGLE: - *params = renderbuffer->getSamples(); - break; - default: - UNREACHABLE(); - break; - } -} - -void QueryShaderiv(const Shader *shader, GLenum pname, GLint *params) -{ - ASSERT(shader != nullptr); - - switch (pname) - { - case GL_SHADER_TYPE: - *params = shader->getType(); - return; - case GL_DELETE_STATUS: - *params = shader->isFlaggedForDeletion(); - return; - case GL_COMPILE_STATUS: - *params = shader->isCompiled() ? GL_TRUE : GL_FALSE; - return; - case GL_INFO_LOG_LENGTH: - *params = shader->getInfoLogLength(); - return; - case GL_SHADER_SOURCE_LENGTH: - *params = shader->getSourceLength(); - return; - case GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE: - *params = shader->getTranslatedSourceWithDebugInfoLength(); - return; - default: - UNREACHABLE(); - break; - } -} - -void QueryTexParameterfv(const Texture *texture, GLenum pname, GLfloat *params) -{ - QueryTexParameterBase(texture, pname, params); -} - -void QueryTexParameteriv(const Texture *texture, GLenum pname, GLint *params) -{ - QueryTexParameterBase(texture, pname, params); -} - -void QuerySamplerParameterfv(const Sampler *sampler, GLenum pname, GLfloat *params) -{ - QuerySamplerParameterBase(sampler, pname, params); -} - -void QuerySamplerParameteriv(const Sampler *sampler, GLenum pname, GLint *params) -{ - QuerySamplerParameterBase(sampler, pname, params); -} - -void QueryVertexAttribfv(const VertexAttribute &attrib, - const VertexAttribCurrentValueData ¤tValueData, - GLenum pname, - GLfloat *params) -{ - QueryVertexAttribBase(attrib, currentValueData.FloatValues, pname, params); -} - -void QueryVertexAttribiv(const VertexAttribute &attrib, - const VertexAttribCurrentValueData ¤tValueData, - GLenum pname, - GLint *params) -{ - QueryVertexAttribBase(attrib, currentValueData.FloatValues, pname, params); -} - -void QueryVertexAttribPointerv(const VertexAttribute &attrib, GLenum pname, GLvoid **pointer) -{ - switch (pname) - { - case GL_VERTEX_ATTRIB_ARRAY_POINTER: - *pointer = const_cast(attrib.pointer); - break; - - default: - UNREACHABLE(); - break; - } -} - -void QueryVertexAttribIiv(const VertexAttribute &attrib, - const VertexAttribCurrentValueData ¤tValueData, - GLenum pname, - GLint *params) -{ - QueryVertexAttribBase(attrib, currentValueData.IntValues, pname, params); -} - -void QueryVertexAttribIuiv(const VertexAttribute &attrib, - const VertexAttribCurrentValueData ¤tValueData, - GLenum pname, - GLuint *params) -{ - QueryVertexAttribBase(attrib, currentValueData.UnsignedIntValues, pname, params); -} - -void QueryActiveUniformBlockiv(const Program *program, - GLuint uniformBlockIndex, - GLenum pname, - GLint *params) -{ - const UniformBlock &uniformBlock = program->getUniformBlockByIndex(uniformBlockIndex); - switch (pname) - { - case GL_UNIFORM_BLOCK_BINDING: - *params = ConvertToGLint(program->getUniformBlockBinding(uniformBlockIndex)); - break; - case GL_UNIFORM_BLOCK_DATA_SIZE: - *params = ConvertToGLint(uniformBlock.dataSize); - break; - case GL_UNIFORM_BLOCK_NAME_LENGTH: - *params = ConvertToGLint(uniformBlock.nameWithArrayIndex().size() + 1); - break; - case GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS: - *params = ConvertToGLint(uniformBlock.memberUniformIndexes.size()); - break; - case GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: - for (size_t blockMemberIndex = 0; - blockMemberIndex < uniformBlock.memberUniformIndexes.size(); blockMemberIndex++) - { - params[blockMemberIndex] = - ConvertToGLint(uniformBlock.memberUniformIndexes[blockMemberIndex]); - } - break; - case GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: - *params = ConvertToGLint(uniformBlock.vertexStaticUse); - break; - case GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: - *params = ConvertToGLint(uniformBlock.fragmentStaticUse); - break; - default: - UNREACHABLE(); - break; - } -} - -void QueryInternalFormativ(const TextureCaps &format, GLenum pname, GLsizei bufSize, GLint *params) -{ - switch (pname) - { - case GL_NUM_SAMPLE_COUNTS: - if (bufSize != 0) - { - *params = static_cast(format.sampleCounts.size()); - } - break; - - case GL_SAMPLES: - { - size_t returnCount = std::min(bufSize, format.sampleCounts.size()); - auto sampleReverseIt = format.sampleCounts.rbegin(); - for (size_t sampleIndex = 0; sampleIndex < returnCount; ++sampleIndex) - { - params[sampleIndex] = *sampleReverseIt++; - } - } - break; - - default: - UNREACHABLE(); - break; - } -} - -void SetTexParameterf(Texture *texture, GLenum pname, GLfloat param) -{ - SetTexParameterBase(texture, pname, ¶m); -} - -void SetTexParameterfv(Texture *texture, GLenum pname, const GLfloat *params) -{ - SetTexParameterBase(texture, pname, params); -} - -void SetTexParameteri(Texture *texture, GLenum pname, GLint param) -{ - SetTexParameterBase(texture, pname, ¶m); -} - -void SetTexParameteriv(Texture *texture, GLenum pname, const GLint *params) -{ - SetTexParameterBase(texture, pname, params); -} - -void SetSamplerParameterf(Sampler *sampler, GLenum pname, GLfloat param) -{ - SetSamplerParameterBase(sampler, pname, ¶m); -} - -void SetSamplerParameterfv(Sampler *sampler, GLenum pname, const GLfloat *params) -{ - SetSamplerParameterBase(sampler, pname, params); -} - -void SetSamplerParameteri(Sampler *sampler, GLenum pname, GLint param) -{ - SetSamplerParameterBase(sampler, pname, ¶m); -} - -void SetSamplerParameteriv(Sampler *sampler, GLenum pname, const GLint *params) -{ - SetSamplerParameterBase(sampler, pname, params); -} -} diff --git a/gfx/angle/src/libANGLE/queryutils.h b/gfx/angle/src/libANGLE/queryutils.h deleted file mode 100644 index 28a84b3bd..000000000 --- a/gfx/angle/src/libANGLE/queryutils.h +++ /dev/null @@ -1,79 +0,0 @@ -// -// Copyright (c) 2016 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. -// - -// queryutils.h: Utilities for querying values from GL objects - -#ifndef LIBANGLE_QUERYUTILS_H_ -#define LIBANGLE_QUERYUTILS_H_ - -#include "angle_gl.h" -#include "common/angleutils.h" - -namespace gl -{ -class Buffer; -class Framebuffer; -class Program; -class Renderbuffer; -class Sampler; -class Shader; -class Texture; -struct TextureCaps; -struct UniformBlock; -struct VertexAttribute; -struct VertexAttribCurrentValueData; - -void QueryFramebufferAttachmentParameteriv(const Framebuffer *framebuffer, - GLenum attachment, - GLenum pname, - GLint *params); -void QueryBufferParameteriv(const Buffer *buffer, GLenum pname, GLint *params); -void QueryBufferParameteri64v(const Buffer *buffer, GLenum pname, GLint64 *params); -void QueryBufferPointerv(const Buffer *buffer, GLenum pname, void **params); -void QueryProgramiv(const Program *program, GLenum pname, GLint *params); -void QueryRenderbufferiv(const Renderbuffer *renderbuffer, GLenum pname, GLint *params); -void QueryShaderiv(const Shader *shader, GLenum pname, GLint *params); -void QueryTexParameterfv(const Texture *texture, GLenum pname, GLfloat *params); -void QueryTexParameteriv(const Texture *texture, GLenum pname, GLint *params); -void QuerySamplerParameterfv(const Sampler *sampler, GLenum pname, GLfloat *params); -void QuerySamplerParameteriv(const Sampler *sampler, GLenum pname, GLint *params); -void QueryVertexAttribfv(const VertexAttribute &attrib, - const VertexAttribCurrentValueData ¤tValueData, - GLenum pname, - GLfloat *params); -void QueryVertexAttribiv(const VertexAttribute &attrib, - const VertexAttribCurrentValueData ¤tValueData, - GLenum pname, - GLint *params); -void QueryVertexAttribPointerv(const VertexAttribute &attrib, GLenum pname, GLvoid **pointer); -void QueryVertexAttribIiv(const VertexAttribute &attrib, - const VertexAttribCurrentValueData ¤tValueData, - GLenum pname, - GLint *params); -void QueryVertexAttribIuiv(const VertexAttribute &attrib, - const VertexAttribCurrentValueData ¤tValueData, - GLenum pname, - GLuint *params); - -void QueryActiveUniformBlockiv(const Program *program, - GLuint uniformBlockIndex, - GLenum pname, - GLint *params); - -void QueryInternalFormativ(const TextureCaps &format, GLenum pname, GLsizei bufSize, GLint *params); - -void SetTexParameterf(Texture *texture, GLenum pname, GLfloat param); -void SetTexParameterfv(Texture *texture, GLenum pname, const GLfloat *params); -void SetTexParameteri(Texture *texture, GLenum pname, GLint param); -void SetTexParameteriv(Texture *texture, GLenum pname, const GLint *params); - -void SetSamplerParameterf(Sampler *sampler, GLenum pname, GLfloat param); -void SetSamplerParameterfv(Sampler *sampler, GLenum pname, const GLfloat *params); -void SetSamplerParameteri(Sampler *sampler, GLenum pname, GLint param); -void SetSamplerParameteriv(Sampler *sampler, GLenum pname, const GLint *params); -} - -#endif // LIBANGLE_QUERYUTILS_H_ diff --git a/gfx/angle/src/libANGLE/renderer/BufferImpl.h b/gfx/angle/src/libANGLE/renderer/BufferImpl.h index 10d371541..cdb3cfe88 100755 --- a/gfx/angle/src/libANGLE/renderer/BufferImpl.h +++ b/gfx/angle/src/libANGLE/renderer/BufferImpl.h @@ -15,22 +15,16 @@ #include -namespace gl -{ -class BufferState; -} - namespace rx { class BufferImpl : angle::NonCopyable { public: - BufferImpl(const gl::BufferState &state) : mState(state) {} virtual ~BufferImpl() { } - virtual gl::Error setData(GLenum target, const void *data, size_t size, GLenum usage) = 0; - virtual gl::Error setSubData(GLenum target, const void *data, size_t size, size_t offset) = 0; + virtual gl::Error setData(const void *data, size_t size, GLenum usage) = 0; + virtual gl::Error setSubData(const void *data, size_t size, size_t offset) = 0; virtual gl::Error copySubData(BufferImpl *source, GLintptr sourceOffset, GLintptr destOffset, @@ -44,9 +38,6 @@ class BufferImpl : angle::NonCopyable size_t count, bool primitiveRestartEnabled, gl::IndexRange *outRange) = 0; - - protected: - const gl::BufferState &mState; }; } diff --git a/gfx/angle/src/libANGLE/renderer/BufferImpl_mock.h b/gfx/angle/src/libANGLE/renderer/BufferImpl_mock.h index 7e45c01b7..a6387661c 100755 --- a/gfx/angle/src/libANGLE/renderer/BufferImpl_mock.h +++ b/gfx/angle/src/libANGLE/renderer/BufferImpl_mock.h @@ -19,11 +19,10 @@ namespace rx class MockBufferImpl : public BufferImpl { public: - MockBufferImpl() : BufferImpl(mMockState) {} ~MockBufferImpl() { destructor(); } - MOCK_METHOD4(setData, gl::Error(GLenum, const void *, size_t, GLenum)); - MOCK_METHOD4(setSubData, gl::Error(GLenum, const void *, size_t, size_t)); + MOCK_METHOD3(setData, gl::Error(const void*, size_t, GLenum)); + MOCK_METHOD3(setSubData, gl::Error(const void*, size_t, size_t)); MOCK_METHOD4(copySubData, gl::Error(BufferImpl *, GLintptr, GLintptr, GLsizeiptr)); MOCK_METHOD2(map, gl::Error(GLenum, GLvoid **)); MOCK_METHOD4(mapRange, gl::Error(size_t, size_t, GLbitfield, GLvoid **)); @@ -32,9 +31,6 @@ class MockBufferImpl : public BufferImpl MOCK_METHOD5(getIndexRange, gl::Error(GLenum, size_t, size_t, bool, gl::IndexRange *)); MOCK_METHOD0(destructor, void()); - - protected: - gl::BufferState mMockState; }; } diff --git a/gfx/angle/src/libANGLE/renderer/DisplayImpl.cpp b/gfx/angle/src/libANGLE/renderer/DisplayImpl.cpp index fc2f2c5ce..8061189f0 100755 --- a/gfx/angle/src/libANGLE/renderer/DisplayImpl.cpp +++ b/gfx/angle/src/libANGLE/renderer/DisplayImpl.cpp @@ -41,15 +41,6 @@ const egl::DisplayExtensions &DisplayImpl::getExtensions() const return mExtensions; } -egl::Error DisplayImpl::validateClientBuffer(const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, - const egl::AttributeMap &attribs) const -{ - UNREACHABLE(); - return egl::Error(EGL_BAD_DISPLAY, "DisplayImpl::validateClientBuffer unimplemented."); -} - const egl::Caps &DisplayImpl::getCaps() const { if (!mCapsInitialized) diff --git a/gfx/angle/src/libANGLE/renderer/DisplayImpl.h b/gfx/angle/src/libANGLE/renderer/DisplayImpl.h index ec603e85b..652486edb 100755 --- a/gfx/angle/src/libANGLE/renderer/DisplayImpl.h +++ b/gfx/angle/src/libANGLE/renderer/DisplayImpl.h @@ -59,10 +59,6 @@ class DisplayImpl : public EGLImplFactory virtual egl::Error restoreLostDevice() = 0; virtual bool isValidNativeWindow(EGLNativeWindowType window) const = 0; - virtual egl::Error validateClientBuffer(const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, - const egl::AttributeMap &attribs) const; virtual std::string getVendorString() const = 0; diff --git a/gfx/angle/src/libANGLE/renderer/EGLImplFactory.h b/gfx/angle/src/libANGLE/renderer/EGLImplFactory.h index 2ddbb7625..b2c8771cc 100755 --- a/gfx/angle/src/libANGLE/renderer/EGLImplFactory.h +++ b/gfx/angle/src/libANGLE/renderer/EGLImplFactory.h @@ -47,8 +47,7 @@ class EGLImplFactory : angle::NonCopyable const egl::AttributeMap &attribs) = 0; virtual SurfaceImpl *createPbufferFromClientBuffer(const egl::SurfaceState &state, const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) = 0; virtual SurfaceImpl *createPixmapSurface(const egl::SurfaceState &state, const egl::Config *configuration, diff --git a/gfx/angle/src/libANGLE/renderer/Format.cpp b/gfx/angle/src/libANGLE/renderer/Format.cpp new file mode 100644 index 000000000..e8883c6f3 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/Format.cpp @@ -0,0 +1,60 @@ +// +// Copyright 2016 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. +// +// Format: +// A universal description of texture storage. Across multiple +// renderer back-ends, there are common formats and some distinct +// permutations, this enum encapsulates them all. + +#include "libANGLE/renderer/Format.h" + +#include "image_util/copyimage.h" + +using namespace rx; + +namespace angle +{ + +namespace +{ + +const FastCopyFunctionMap &GetFastCopyFunctionsMap(Format::ID formatID) +{ + switch (formatID) + { + case Format::ID::B8G8R8A8_UNORM: + { + static FastCopyFunctionMap fastCopyMap; + if (fastCopyMap.empty()) + { + fastCopyMap[gl::FormatType(GL_RGBA, GL_UNSIGNED_BYTE)] = CopyBGRA8ToRGBA8; + } + return fastCopyMap; + } + default: + { + static FastCopyFunctionMap emptyMap; + return emptyMap; + } + } +} + +} // anonymous namespace + +Format::Format(ID id, + GLenum glFormat, + GLenum fboFormat, + MipGenerationFunction mipGen, + ColorReadFunction colorRead) + : id(id), + glInternalFormat(glFormat), + fboImplementationInternalFormat(fboFormat), + mipGenerationFunction(mipGen), + colorReadFunction(colorRead), + fastCopyFunctions(GetFastCopyFunctionsMap(id)) +{ +} + +} // namespace angle diff --git a/gfx/angle/src/libANGLE/renderer/Format.h b/gfx/angle/src/libANGLE/renderer/Format.h index 5c6e7e1fe..65608a7a6 100755 --- a/gfx/angle/src/libANGLE/renderer/Format.h +++ b/gfx/angle/src/libANGLE/renderer/Format.h @@ -22,19 +22,11 @@ struct Format final : angle::NonCopyable { enum class ID; - constexpr Format(ID id, - GLenum glFormat, - GLenum fboFormat, - rx::MipGenerationFunction mipGen, - const rx::FastCopyFunctionMap &fastCopyFunctions, - rx::ColorReadFunction colorRead, - GLenum componentType, - GLuint redBits, - GLuint greenBits, - GLuint blueBits, - GLuint alphaBits, - GLuint depthBits, - GLuint stencilBits); + Format(ID id, + GLenum glFormat, + GLenum fboFormat, + rx::MipGenerationFunction mipGen, + rx::ColorReadFunction colorRead); static const Format &Get(ID id); @@ -53,47 +45,9 @@ struct Format final : angle::NonCopyable rx::ColorReadFunction colorReadFunction; // A map from a gl::FormatType to a fast pixel copy function for this format. - const rx::FastCopyFunctionMap &fastCopyFunctions; - - GLenum componentType; - - GLuint redBits; - GLuint greenBits; - GLuint blueBits; - GLuint alphaBits; - GLuint depthBits; - GLuint stencilBits; + rx::FastCopyFunctionMap fastCopyFunctions; }; -constexpr Format::Format(ID id, - GLenum glFormat, - GLenum fboFormat, - rx::MipGenerationFunction mipGen, - const rx::FastCopyFunctionMap &fastCopyFunctions, - rx::ColorReadFunction colorRead, - GLenum componentType, - GLuint redBits, - GLuint greenBits, - GLuint blueBits, - GLuint alphaBits, - GLuint depthBits, - GLuint stencilBits) - : id(id), - glInternalFormat(glFormat), - fboImplementationInternalFormat(fboFormat), - mipGenerationFunction(mipGen), - colorReadFunction(colorRead), - fastCopyFunctions(fastCopyFunctions), - componentType(componentType), - redBits(redBits), - greenBits(greenBits), - blueBits(blueBits), - alphaBits(alphaBits), - depthBits(depthBits), - stencilBits(stencilBits) -{ -} - } // namespace angle #include "libANGLE/renderer/Format_ID_autogen.inl" diff --git a/gfx/angle/src/libANGLE/renderer/Format_autogen.cpp b/gfx/angle/src/libANGLE/renderer/Format_autogen.cpp new file mode 100644 index 000000000..d6b6762e7 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/Format_autogen.cpp @@ -0,0 +1,1126 @@ +// GENERATED FILE - DO NOT EDIT. +// Generated by gen_angle_format_table.py using data from angle_format_data.json +// +// Copyright 2016 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. +// +// ANGLE Format table: +// Queries for typed format information from the ANGLE format enum. + +#include "libANGLE/renderer/Format.h" + +#include "image_util/copyimage.h" +#include "image_util/generatemip.h" +#include "image_util/loadimage.h" + +namespace angle +{ + +// static +const Format &Format::Get(ID id) +{ + // clang-format off + switch (id) + { + case ID::A16_FLOAT: + { + static const Format info(ID::A16_FLOAT, + GL_ALPHA16F_EXT, + GL_ALPHA16F_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::A32_FLOAT: + { + static const Format info(ID::A32_FLOAT, + GL_ALPHA32F_EXT, + GL_ALPHA32F_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::A8_UNORM: + { + static const Format info(ID::A8_UNORM, + GL_ALPHA8_EXT, + GL_ALPHA8_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::ASTC_10x10_SRGB_BLOCK: + { + static const Format info(ID::ASTC_10x10_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_10x10_UNORM_BLOCK: + { + static const Format info(ID::ASTC_10x10_UNORM_BLOCK, + GL_COMPRESSED_RGBA_ASTC_10x10_KHR, + GL_COMPRESSED_RGBA_ASTC_10x10_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_10x5_SRGB_BLOCK: + { + static const Format info(ID::ASTC_10x5_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_10x5_UNORM_BLOCK: + { + static const Format info(ID::ASTC_10x5_UNORM_BLOCK, + GL_COMPRESSED_RGBA_ASTC_10x5_KHR, + GL_COMPRESSED_RGBA_ASTC_10x5_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_10x6_SRGB_BLOCK: + { + static const Format info(ID::ASTC_10x6_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_10x6_UNORM_BLOCK: + { + static const Format info(ID::ASTC_10x6_UNORM_BLOCK, + GL_COMPRESSED_RGBA_ASTC_10x6_KHR, + GL_COMPRESSED_RGBA_ASTC_10x6_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_10x8_SRGB_BLOCK: + { + static const Format info(ID::ASTC_10x8_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_10x8_UNORM_BLOCK: + { + static const Format info(ID::ASTC_10x8_UNORM_BLOCK, + GL_COMPRESSED_RGBA_ASTC_10x8_KHR, + GL_COMPRESSED_RGBA_ASTC_10x8_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_12x10_SRGB_BLOCK: + { + static const Format info(ID::ASTC_12x10_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_12x10_UNORM_BLOCK: + { + static const Format info(ID::ASTC_12x10_UNORM_BLOCK, + GL_COMPRESSED_RGBA_ASTC_12x10_KHR, + GL_COMPRESSED_RGBA_ASTC_12x10_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_12x12_SRGB_BLOCK: + { + static const Format info(ID::ASTC_12x12_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_12x12_UNORM_BLOCK: + { + static const Format info(ID::ASTC_12x12_UNORM_BLOCK, + GL_COMPRESSED_RGBA_ASTC_12x12_KHR, + GL_COMPRESSED_RGBA_ASTC_12x12_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_4x4_SRGB_BLOCK: + { + static const Format info(ID::ASTC_4x4_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_4x4_UNORM_BLOCK: + { + static const Format info(ID::ASTC_4x4_UNORM_BLOCK, + GL_COMPRESSED_RGBA_ASTC_4x4_KHR, + GL_COMPRESSED_RGBA_ASTC_4x4_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_5x4_SRGB_BLOCK: + { + static const Format info(ID::ASTC_5x4_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_5x4_UNORM_BLOCK: + { + static const Format info(ID::ASTC_5x4_UNORM_BLOCK, + GL_COMPRESSED_RGBA_ASTC_5x4_KHR, + GL_COMPRESSED_RGBA_ASTC_5x4_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_5x5_SRGB_BLOCK: + { + static const Format info(ID::ASTC_5x5_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_5x5_UNORM_BLOCK: + { + static const Format info(ID::ASTC_5x5_UNORM_BLOCK, + GL_COMPRESSED_RGBA_ASTC_5x5_KHR, + GL_COMPRESSED_RGBA_ASTC_5x5_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_6x5_SRGB_BLOCK: + { + static const Format info(ID::ASTC_6x5_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_6x5_UNORM_BLOCK: + { + static const Format info(ID::ASTC_6x5_UNORM_BLOCK, + GL_COMPRESSED_RGBA_ASTC_6x5_KHR, + GL_COMPRESSED_RGBA_ASTC_6x5_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_6x6_SRGB_BLOCK: + { + static const Format info(ID::ASTC_6x6_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_6x6_UNORM_BLOCK: + { + static const Format info(ID::ASTC_6x6_UNORM_BLOCK, + GL_COMPRESSED_RGBA_ASTC_6x6_KHR, + GL_COMPRESSED_RGBA_ASTC_6x6_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_8x5_SRGB_BLOCK: + { + static const Format info(ID::ASTC_8x5_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_8x5_UNORM_BLOCK: + { + static const Format info(ID::ASTC_8x5_UNORM_BLOCK, + GL_COMPRESSED_RGBA_ASTC_8x5_KHR, + GL_COMPRESSED_RGBA_ASTC_8x5_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_8x6_SRGB_BLOCK: + { + static const Format info(ID::ASTC_8x6_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_8x6_UNORM_BLOCK: + { + static const Format info(ID::ASTC_8x6_UNORM_BLOCK, + GL_COMPRESSED_RGBA_ASTC_8x6_KHR, + GL_COMPRESSED_RGBA_ASTC_8x6_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_8x8_SRGB_BLOCK: + { + static const Format info(ID::ASTC_8x8_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, + nullptr, + nullptr); + return info; + } + case ID::ASTC_8x8_UNORM_BLOCK: + { + static const Format info(ID::ASTC_8x8_UNORM_BLOCK, + GL_COMPRESSED_RGBA_ASTC_8x8_KHR, + GL_COMPRESSED_RGBA_ASTC_8x8_KHR, + nullptr, + nullptr); + return info; + } + case ID::B4G4R4A4_UNORM: + { + static const Format info(ID::B4G4R4A4_UNORM, + GL_BGRA4_ANGLEX, + GL_RGBA4, + GenerateMip, + ReadColor); + return info; + } + case ID::B5G5R5A1_UNORM: + { + static const Format info(ID::B5G5R5A1_UNORM, + GL_BGR5_A1_ANGLEX, + GL_RGB5_A1, + GenerateMip, + ReadColor); + return info; + } + case ID::B5G6R5_UNORM: + { + static const Format info(ID::B5G6R5_UNORM, + GL_BGR565_ANGLEX, + GL_RGB565, + GenerateMip, + ReadColor); + return info; + } + case ID::B8G8R8A8_UNORM: + { + static const Format info(ID::B8G8R8A8_UNORM, + GL_BGRA8_EXT, + GL_BGRA8_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::B8G8R8X8_UNORM: + { + static const Format info(ID::B8G8R8X8_UNORM, + GL_BGRA8_EXT, + GL_BGRA8_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::BC1_RGBA_UNORM_BLOCK: + { + static const Format info(ID::BC1_RGBA_UNORM_BLOCK, + GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, + GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, + nullptr, + nullptr); + return info; + } + case ID::BC1_RGB_UNORM_BLOCK: + { + static const Format info(ID::BC1_RGB_UNORM_BLOCK, + GL_COMPRESSED_RGB_S3TC_DXT1_EXT, + GL_COMPRESSED_RGB_S3TC_DXT1_EXT, + nullptr, + nullptr); + return info; + } + case ID::BC2_RGBA_UNORM_BLOCK: + { + static const Format info(ID::BC2_RGBA_UNORM_BLOCK, + GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE, + GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE, + nullptr, + nullptr); + return info; + } + case ID::BC3_RGBA_UNORM_BLOCK: + { + static const Format info(ID::BC3_RGBA_UNORM_BLOCK, + GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, + GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, + nullptr, + nullptr); + return info; + } + case ID::D16_UNORM: + { + static const Format info(ID::D16_UNORM, + GL_DEPTH_COMPONENT16, + GL_DEPTH_COMPONENT16, + nullptr, + nullptr); + return info; + } + case ID::D24_UNORM: + { + static const Format info(ID::D24_UNORM, + GL_DEPTH_COMPONENT24, + GL_DEPTH_COMPONENT24, + nullptr, + nullptr); + return info; + } + case ID::D24_UNORM_S8_UINT: + { + static const Format info(ID::D24_UNORM_S8_UINT, + GL_DEPTH24_STENCIL8, + GL_DEPTH24_STENCIL8, + nullptr, + nullptr); + return info; + } + case ID::D32_FLOAT: + { + static const Format info(ID::D32_FLOAT, + GL_DEPTH_COMPONENT32F, + GL_DEPTH_COMPONENT32F, + nullptr, + nullptr); + return info; + } + case ID::D32_FLOAT_S8X24_UINT: + { + static const Format info(ID::D32_FLOAT_S8X24_UINT, + GL_DEPTH32F_STENCIL8, + GL_DEPTH32F_STENCIL8, + nullptr, + nullptr); + return info; + } + case ID::D32_UNORM: + { + static const Format info(ID::D32_UNORM, + GL_DEPTH_COMPONENT32_OES, + GL_DEPTH_COMPONENT32_OES, + nullptr, + nullptr); + return info; + } + case ID::EAC_R11G11_SNORM_BLOCK: + { + static const Format info(ID::EAC_R11G11_SNORM_BLOCK, + GL_COMPRESSED_SIGNED_RG11_EAC, + GL_COMPRESSED_SIGNED_RG11_EAC, + nullptr, + nullptr); + return info; + } + case ID::EAC_R11G11_UNORM_BLOCK: + { + static const Format info(ID::EAC_R11G11_UNORM_BLOCK, + GL_COMPRESSED_RG11_EAC, + GL_COMPRESSED_RG11_EAC, + nullptr, + nullptr); + return info; + } + case ID::EAC_R11_SNORM_BLOCK: + { + static const Format info(ID::EAC_R11_SNORM_BLOCK, + GL_COMPRESSED_SIGNED_R11_EAC, + GL_COMPRESSED_SIGNED_R11_EAC, + nullptr, + nullptr); + return info; + } + case ID::EAC_R11_UNORM_BLOCK: + { + static const Format info(ID::EAC_R11_UNORM_BLOCK, + GL_COMPRESSED_R11_EAC, + GL_COMPRESSED_R11_EAC, + nullptr, + nullptr); + return info; + } + case ID::ETC2_R8G8B8A1_SRGB_BLOCK: + { + static const Format info(ID::ETC2_R8G8B8A1_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, + GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, + nullptr, + nullptr); + return info; + } + case ID::ETC2_R8G8B8A1_UNORM_BLOCK: + { + static const Format info(ID::ETC2_R8G8B8A1_UNORM_BLOCK, + GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, + GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, + nullptr, + nullptr); + return info; + } + case ID::ETC2_R8G8B8A8_SRGB_BLOCK: + { + static const Format info(ID::ETC2_R8G8B8A8_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, + GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, + nullptr, + nullptr); + return info; + } + case ID::ETC2_R8G8B8A8_UNORM_BLOCK: + { + static const Format info(ID::ETC2_R8G8B8A8_UNORM_BLOCK, + GL_COMPRESSED_RGBA8_ETC2_EAC, + GL_COMPRESSED_RGBA8_ETC2_EAC, + nullptr, + nullptr); + return info; + } + case ID::ETC2_R8G8B8_SRGB_BLOCK: + { + static const Format info(ID::ETC2_R8G8B8_SRGB_BLOCK, + GL_COMPRESSED_SRGB8_ETC2, + GL_COMPRESSED_SRGB8_ETC2, + nullptr, + nullptr); + return info; + } + case ID::ETC2_R8G8B8_UNORM_BLOCK: + { + static const Format info(ID::ETC2_R8G8B8_UNORM_BLOCK, + GL_COMPRESSED_RGB8_ETC2, + GL_COMPRESSED_RGB8_ETC2, + nullptr, + nullptr); + return info; + } + case ID::L16A16_FLOAT: + { + static const Format info(ID::L16A16_FLOAT, + GL_LUMINANCE_ALPHA16F_EXT, + GL_LUMINANCE_ALPHA16F_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::L16_FLOAT: + { + static const Format info(ID::L16_FLOAT, + GL_LUMINANCE16F_EXT, + GL_LUMINANCE16F_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::L32A32_FLOAT: + { + static const Format info(ID::L32A32_FLOAT, + GL_LUMINANCE_ALPHA32F_EXT, + GL_LUMINANCE_ALPHA32F_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::L32_FLOAT: + { + static const Format info(ID::L32_FLOAT, + GL_LUMINANCE32F_EXT, + GL_LUMINANCE32F_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::L8A8_UNORM: + { + static const Format info(ID::L8A8_UNORM, + GL_LUMINANCE8_ALPHA8_EXT, + GL_LUMINANCE8_ALPHA8_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::L8_UNORM: + { + static const Format info(ID::L8_UNORM, + GL_LUMINANCE8_EXT, + GL_LUMINANCE8_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::NONE: + { + static const Format info(ID::NONE, + GL_NONE, + GL_NONE, + nullptr, + nullptr); + return info; + } + case ID::R10G10B10A2_UINT: + { + static const Format info(ID::R10G10B10A2_UINT, + GL_RGB10_A2UI, + GL_RGB10_A2UI, + GenerateMip, + ReadColor); + return info; + } + case ID::R10G10B10A2_UNORM: + { + static const Format info(ID::R10G10B10A2_UNORM, + GL_RGB10_A2, + GL_RGB10_A2, + GenerateMip, + ReadColor); + return info; + } + case ID::R11G11B10_FLOAT: + { + static const Format info(ID::R11G11B10_FLOAT, + GL_R11F_G11F_B10F, + GL_R11F_G11F_B10F, + GenerateMip, + ReadColor); + return info; + } + case ID::R16G16B16A16_FLOAT: + { + static const Format info(ID::R16G16B16A16_FLOAT, + GL_RGBA16F, + GL_RGBA16F, + GenerateMip, + ReadColor); + return info; + } + case ID::R16G16B16A16_SINT: + { + static const Format info(ID::R16G16B16A16_SINT, + GL_RGBA16I, + GL_RGBA16I, + GenerateMip, + ReadColor); + return info; + } + case ID::R16G16B16A16_SNORM: + { + static const Format info(ID::R16G16B16A16_SNORM, + GL_RGBA16_SNORM_EXT, + GL_RGBA16_SNORM_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::R16G16B16A16_UINT: + { + static const Format info(ID::R16G16B16A16_UINT, + GL_RGBA16UI, + GL_RGBA16UI, + GenerateMip, + ReadColor); + return info; + } + case ID::R16G16B16A16_UNORM: + { + static const Format info(ID::R16G16B16A16_UNORM, + GL_RGBA16_EXT, + GL_RGBA16_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::R16G16B16_FLOAT: + { + static const Format info(ID::R16G16B16_FLOAT, + GL_RGB16F, + GL_RGB16F, + GenerateMip, + ReadColor); + return info; + } + case ID::R16G16B16_SINT: + { + static const Format info(ID::R16G16B16_SINT, + GL_RGB16I, + GL_RGB16I, + GenerateMip, + ReadColor); + return info; + } + case ID::R16G16B16_SNORM: + { + static const Format info(ID::R16G16B16_SNORM, + GL_RGB16_SNORM_EXT, + GL_RGB16_SNORM_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::R16G16B16_UINT: + { + static const Format info(ID::R16G16B16_UINT, + GL_RGB16UI, + GL_RGB16UI, + GenerateMip, + ReadColor); + return info; + } + case ID::R16G16B16_UNORM: + { + static const Format info(ID::R16G16B16_UNORM, + GL_RGB16_EXT, + GL_RGB16_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::R16G16_FLOAT: + { + static const Format info(ID::R16G16_FLOAT, + GL_RG16F, + GL_RG16F, + GenerateMip, + ReadColor); + return info; + } + case ID::R16G16_SINT: + { + static const Format info(ID::R16G16_SINT, + GL_RG16I, + GL_RG16I, + GenerateMip, + ReadColor); + return info; + } + case ID::R16G16_SNORM: + { + static const Format info(ID::R16G16_SNORM, + GL_RG16_SNORM_EXT, + GL_RG16_SNORM_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::R16G16_UINT: + { + static const Format info(ID::R16G16_UINT, + GL_RG16UI, + GL_RG16UI, + GenerateMip, + ReadColor); + return info; + } + case ID::R16G16_UNORM: + { + static const Format info(ID::R16G16_UNORM, + GL_RG16_EXT, + GL_RG16_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::R16_FLOAT: + { + static const Format info(ID::R16_FLOAT, + GL_R16F, + GL_R16F, + GenerateMip, + ReadColor); + return info; + } + case ID::R16_SINT: + { + static const Format info(ID::R16_SINT, + GL_R16I, + GL_R16I, + GenerateMip, + ReadColor); + return info; + } + case ID::R16_SNORM: + { + static const Format info(ID::R16_SNORM, + GL_R16_SNORM_EXT, + GL_R16_SNORM_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::R16_UINT: + { + static const Format info(ID::R16_UINT, + GL_R16UI, + GL_R16UI, + GenerateMip, + ReadColor); + return info; + } + case ID::R16_UNORM: + { + static const Format info(ID::R16_UNORM, + GL_R16_EXT, + GL_R16_EXT, + GenerateMip, + ReadColor); + return info; + } + case ID::R32G32B32A32_FLOAT: + { + static const Format info(ID::R32G32B32A32_FLOAT, + GL_RGBA32F, + GL_RGBA32F, + GenerateMip, + ReadColor); + return info; + } + case ID::R32G32B32A32_SINT: + { + static const Format info(ID::R32G32B32A32_SINT, + GL_RGBA32I, + GL_RGBA32I, + GenerateMip, + ReadColor); + return info; + } + case ID::R32G32B32A32_UINT: + { + static const Format info(ID::R32G32B32A32_UINT, + GL_RGBA32UI, + GL_RGBA32UI, + GenerateMip, + ReadColor); + return info; + } + case ID::R32G32B32_FLOAT: + { + static const Format info(ID::R32G32B32_FLOAT, + GL_RGB32F, + GL_RGB32F, + GenerateMip, + ReadColor); + return info; + } + case ID::R32G32B32_SINT: + { + static const Format info(ID::R32G32B32_SINT, + GL_RGB32I, + GL_RGB32I, + GenerateMip, + ReadColor); + return info; + } + case ID::R32G32B32_UINT: + { + static const Format info(ID::R32G32B32_UINT, + GL_RGB32UI, + GL_RGB32UI, + GenerateMip, + ReadColor); + return info; + } + case ID::R32G32_FLOAT: + { + static const Format info(ID::R32G32_FLOAT, + GL_RG32F, + GL_RG32F, + GenerateMip, + ReadColor); + return info; + } + case ID::R32G32_SINT: + { + static const Format info(ID::R32G32_SINT, + GL_RG32I, + GL_RG32I, + GenerateMip, + ReadColor); + return info; + } + case ID::R32G32_UINT: + { + static const Format info(ID::R32G32_UINT, + GL_RG32UI, + GL_RG32UI, + GenerateMip, + ReadColor); + return info; + } + case ID::R32_FLOAT: + { + static const Format info(ID::R32_FLOAT, + GL_R32F, + GL_R32F, + GenerateMip, + ReadColor); + return info; + } + case ID::R32_SINT: + { + static const Format info(ID::R32_SINT, + GL_R32I, + GL_R32I, + GenerateMip, + ReadColor); + return info; + } + case ID::R32_UINT: + { + static const Format info(ID::R32_UINT, + GL_R32UI, + GL_R32UI, + GenerateMip, + ReadColor); + return info; + } + case ID::R4G4B4A4_UNORM: + { + static const Format info(ID::R4G4B4A4_UNORM, + GL_RGBA4, + GL_RGBA4, + GenerateMip, + ReadColor); + return info; + } + case ID::R5G5B5A1_UNORM: + { + static const Format info(ID::R5G5B5A1_UNORM, + GL_RGB5_A1, + GL_RGB5_A1, + GenerateMip, + ReadColor); + return info; + } + case ID::R5G6B5_UNORM: + { + static const Format info(ID::R5G6B5_UNORM, + GL_RGB565, + GL_RGB565, + GenerateMip, + ReadColor); + return info; + } + case ID::R8G8B8A8_SINT: + { + static const Format info(ID::R8G8B8A8_SINT, + GL_RGBA8I, + GL_RGBA8I, + GenerateMip, + ReadColor); + return info; + } + case ID::R8G8B8A8_SNORM: + { + static const Format info(ID::R8G8B8A8_SNORM, + GL_RGBA8_SNORM, + GL_RGBA8_SNORM, + GenerateMip, + ReadColor); + return info; + } + case ID::R8G8B8A8_UINT: + { + static const Format info(ID::R8G8B8A8_UINT, + GL_RGBA8UI, + GL_RGBA8UI, + GenerateMip, + ReadColor); + return info; + } + case ID::R8G8B8A8_UNORM: + { + static const Format info(ID::R8G8B8A8_UNORM, + GL_RGBA8, + GL_RGBA8, + GenerateMip, + ReadColor); + return info; + } + case ID::R8G8B8A8_UNORM_SRGB: + { + static const Format info(ID::R8G8B8A8_UNORM_SRGB, + GL_SRGB8_ALPHA8, + GL_SRGB8_ALPHA8, + GenerateMip, + ReadColor); + return info; + } + case ID::R8G8B8_SINT: + { + static const Format info(ID::R8G8B8_SINT, + GL_RGB8I, + GL_RGB8I, + GenerateMip, + ReadColor); + return info; + } + case ID::R8G8B8_SNORM: + { + static const Format info(ID::R8G8B8_SNORM, + GL_RGB8_SNORM, + GL_RGB8_SNORM, + GenerateMip, + ReadColor); + return info; + } + case ID::R8G8B8_UINT: + { + static const Format info(ID::R8G8B8_UINT, + GL_RGB8UI, + GL_RGB8UI, + GenerateMip, + ReadColor); + return info; + } + case ID::R8G8B8_UNORM: + { + static const Format info(ID::R8G8B8_UNORM, + GL_RGB8, + GL_RGB8, + GenerateMip, + ReadColor); + return info; + } + case ID::R8G8B8_UNORM_SRGB: + { + static const Format info(ID::R8G8B8_UNORM_SRGB, + GL_SRGB8, + GL_SRGB8, + GenerateMip, + ReadColor); + return info; + } + case ID::R8G8_SINT: + { + static const Format info(ID::R8G8_SINT, + GL_RG8I, + GL_RG8I, + GenerateMip, + ReadColor); + return info; + } + case ID::R8G8_SNORM: + { + static const Format info(ID::R8G8_SNORM, + GL_RG8_SNORM, + GL_RG8_SNORM, + GenerateMip, + ReadColor); + return info; + } + case ID::R8G8_UINT: + { + static const Format info(ID::R8G8_UINT, + GL_RG8UI, + GL_RG8UI, + GenerateMip, + ReadColor); + return info; + } + case ID::R8G8_UNORM: + { + static const Format info(ID::R8G8_UNORM, + GL_RG8, + GL_RG8, + GenerateMip, + ReadColor); + return info; + } + case ID::R8_SINT: + { + static const Format info(ID::R8_SINT, + GL_R8I, + GL_R8I, + GenerateMip, + ReadColor); + return info; + } + case ID::R8_SNORM: + { + static const Format info(ID::R8_SNORM, + GL_R8_SNORM, + GL_R8_SNORM, + GenerateMip, + ReadColor); + return info; + } + case ID::R8_UINT: + { + static const Format info(ID::R8_UINT, + GL_R8UI, + GL_R8UI, + GenerateMip, + ReadColor); + return info; + } + case ID::R8_UNORM: + { + static const Format info(ID::R8_UNORM, + GL_R8, + GL_R8, + GenerateMip, + ReadColor); + return info; + } + case ID::R9G9B9E5_SHAREDEXP: + { + static const Format info(ID::R9G9B9E5_SHAREDEXP, + GL_RGB9_E5, + GL_RGB9_E5, + GenerateMip, + ReadColor); + return info; + } + case ID::S8_UINT: + { + static const Format info(ID::S8_UINT, + GL_STENCIL_INDEX8, + GL_STENCIL_INDEX8, + nullptr, + nullptr); + return info; + } + + default: + UNREACHABLE(); + break; + } + // clang-format on + + static const Format noneInfo(ID::NONE, GL_NONE, GL_NONE, nullptr, nullptr); + return noneInfo; +} + +} // namespace angle diff --git a/gfx/angle/src/libANGLE/renderer/Format_table_autogen.cpp b/gfx/angle/src/libANGLE/renderer/Format_table_autogen.cpp deleted file mode 100644 index 507827ff1..000000000 --- a/gfx/angle/src/libANGLE/renderer/Format_table_autogen.cpp +++ /dev/null @@ -1,157 +0,0 @@ -// GENERATED FILE - DO NOT EDIT. -// Generated by gen_angle_format_table.py using data from angle_format_data.json -// -// Copyright 2016 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. -// -// ANGLE Format table: -// Queries for typed format information from the ANGLE format enum. - -#include "libANGLE/renderer/Format.h" - -#include "image_util/copyimage.h" -#include "image_util/generatemip.h" -#include "image_util/loadimage.h" - -namespace angle -{ - -static constexpr rx::FastCopyFunctionMap::Entry BGRAEntry = {GL_RGBA, GL_UNSIGNED_BYTE, - CopyBGRA8ToRGBA8}; -static constexpr rx::FastCopyFunctionMap BGRACopyFunctions = {&BGRAEntry, 1}; -static constexpr rx::FastCopyFunctionMap NoCopyFunctions; - -constexpr Format g_formatInfoTable[] = { - // clang-format off - { Format::ID::NONE, GL_NONE, GL_NONE, nullptr, NoCopyFunctions, nullptr, GL_NONE, 0, 0, 0, 0, 0, 0 }, - { Format::ID::A16_FLOAT, GL_ALPHA16F_EXT, GL_ALPHA16F_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 0, 0, 0, 16, 0, 0 }, - { Format::ID::A32_FLOAT, GL_ALPHA32F_EXT, GL_ALPHA32F_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 0, 0, 0, 32, 0, 0 }, - { Format::ID::A8_UNORM, GL_ALPHA8_EXT, GL_ALPHA8_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 8, 0, 0 }, - { Format::ID::ASTC_10x10_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_10x10_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_10x10_KHR, GL_COMPRESSED_RGBA_ASTC_10x10_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_10x5_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_10x5_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_10x5_KHR, GL_COMPRESSED_RGBA_ASTC_10x5_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_10x6_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_10x6_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_10x6_KHR, GL_COMPRESSED_RGBA_ASTC_10x6_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_10x8_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_10x8_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_10x8_KHR, GL_COMPRESSED_RGBA_ASTC_10x8_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_12x10_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_12x10_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_12x10_KHR, GL_COMPRESSED_RGBA_ASTC_12x10_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_12x12_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_12x12_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_12x12_KHR, GL_COMPRESSED_RGBA_ASTC_12x12_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_4x4_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_4x4_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_4x4_KHR, GL_COMPRESSED_RGBA_ASTC_4x4_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_5x4_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_5x4_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_5x4_KHR, GL_COMPRESSED_RGBA_ASTC_5x4_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_5x5_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_5x5_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_5x5_KHR, GL_COMPRESSED_RGBA_ASTC_5x5_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_6x5_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_6x5_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_6x5_KHR, GL_COMPRESSED_RGBA_ASTC_6x5_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_6x6_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_6x6_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_6x6_KHR, GL_COMPRESSED_RGBA_ASTC_6x6_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_8x5_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_8x5_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_8x5_KHR, GL_COMPRESSED_RGBA_ASTC_8x5_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_8x6_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_8x6_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_8x6_KHR, GL_COMPRESSED_RGBA_ASTC_8x6_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_8x8_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::ASTC_8x8_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_8x8_KHR, GL_COMPRESSED_RGBA_ASTC_8x8_KHR, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::B4G4R4A4_UNORM, GL_BGRA4_ANGLEX, GL_RGBA4, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 4, 4, 4, 4, 0, 0 }, - { Format::ID::B5G5R5A1_UNORM, GL_BGR5_A1_ANGLEX, GL_RGB5_A1, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 5, 5, 5, 1, 0, 0 }, - { Format::ID::B5G6R5_UNORM, GL_BGR565_ANGLEX, GL_RGB565, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 5, 6, 5, 0, 0, 0 }, - { Format::ID::B8G8R8A8_UNORM, GL_BGRA8_EXT, GL_BGRA8_EXT, GenerateMip, BGRACopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0 }, - { Format::ID::B8G8R8X8_UNORM, GL_BGRA8_EXT, GL_BGRA8_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0 }, - { Format::ID::BC1_RGBA_UNORM_BLOCK, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::BC1_RGB_UNORM_BLOCK, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::BC2_RGBA_UNORM_BLOCK, GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE, GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::BC3_RGBA_UNORM_BLOCK, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::D16_UNORM, GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT16, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 16, 0 }, - { Format::ID::D24_UNORM, GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT24, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 24, 0 }, - { Format::ID::D24_UNORM_S8_UINT, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 24, 8 }, - { Format::ID::D32_FLOAT, GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT32F, nullptr, NoCopyFunctions, nullptr, GL_FLOAT, 0, 0, 0, 0, 32, 0 }, - { Format::ID::D32_FLOAT_S8X24_UINT, GL_DEPTH32F_STENCIL8, GL_DEPTH32F_STENCIL8, nullptr, NoCopyFunctions, nullptr, GL_FLOAT, 0, 0, 0, 0, 32, 8 }, - { Format::ID::D32_UNORM, GL_DEPTH_COMPONENT32_OES, GL_DEPTH_COMPONENT32_OES, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 32, 0 }, - { Format::ID::EAC_R11G11_SNORM_BLOCK, GL_COMPRESSED_SIGNED_RG11_EAC, GL_COMPRESSED_SIGNED_RG11_EAC, nullptr, NoCopyFunctions, nullptr, GL_SIGNED_NORMALIZED, 11, 11, 0, 0, 0, 0 }, - { Format::ID::EAC_R11G11_UNORM_BLOCK, GL_COMPRESSED_RG11_EAC, GL_COMPRESSED_RG11_EAC, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 11, 11, 0, 0, 0, 0 }, - { Format::ID::EAC_R11_SNORM_BLOCK, GL_COMPRESSED_SIGNED_R11_EAC, GL_COMPRESSED_SIGNED_R11_EAC, nullptr, NoCopyFunctions, nullptr, GL_SIGNED_NORMALIZED, 11, 0, 0, 0, 0, 0 }, - { Format::ID::EAC_R11_UNORM_BLOCK, GL_COMPRESSED_R11_EAC, GL_COMPRESSED_R11_EAC, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 11, 0, 0, 0, 0, 0 }, - { Format::ID::ETC2_R8G8B8A1_SRGB_BLOCK, GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 1, 0, 0 }, - { Format::ID::ETC2_R8G8B8A1_UNORM_BLOCK, GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 1, 0, 0 }, - { Format::ID::ETC2_R8G8B8A8_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0 }, - { Format::ID::ETC2_R8G8B8A8_UNORM_BLOCK, GL_COMPRESSED_RGBA8_ETC2_EAC, GL_COMPRESSED_RGBA8_ETC2_EAC, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0 }, - { Format::ID::ETC2_R8G8B8_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ETC2, GL_COMPRESSED_SRGB8_ETC2, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0 }, - { Format::ID::ETC2_R8G8B8_UNORM_BLOCK, GL_COMPRESSED_RGB8_ETC2, GL_COMPRESSED_RGB8_ETC2, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0 }, - { Format::ID::L16A16_FLOAT, GL_LUMINANCE_ALPHA16F_EXT, GL_LUMINANCE_ALPHA16F_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 0, 0, 0, 16, 0, 0 }, - { Format::ID::L16_FLOAT, GL_LUMINANCE16F_EXT, GL_LUMINANCE16F_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 0, 0, 0, 0, 0, 0 }, - { Format::ID::L32A32_FLOAT, GL_LUMINANCE_ALPHA32F_EXT, GL_LUMINANCE_ALPHA32F_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 0, 0, 0, 32, 0, 0 }, - { Format::ID::L32_FLOAT, GL_LUMINANCE32F_EXT, GL_LUMINANCE32F_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 0, 0, 0, 0, 0, 0 }, - { Format::ID::L8A8_UNORM, GL_LUMINANCE8_ALPHA8_EXT, GL_LUMINANCE8_ALPHA8_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 8, 0, 0 }, - { Format::ID::L8_UNORM, GL_LUMINANCE8_EXT, GL_LUMINANCE8_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0 }, - { Format::ID::R10G10B10A2_UINT, GL_RGB10_A2UI, GL_RGB10_A2UI, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_INT, 10, 10, 10, 2, 0, 0 }, - { Format::ID::R10G10B10A2_UNORM, GL_RGB10_A2, GL_RGB10_A2, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 10, 10, 10, 2, 0, 0 }, - { Format::ID::R11G11B10_FLOAT, GL_R11F_G11F_B10F, GL_R11F_G11F_B10F, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 11, 11, 10, 0, 0, 0 }, - { Format::ID::R16G16B16A16_FLOAT, GL_RGBA16F, GL_RGBA16F, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 16, 16, 16, 16, 0, 0 }, - { Format::ID::R16G16B16A16_SINT, GL_RGBA16I, GL_RGBA16I, GenerateMip, NoCopyFunctions, ReadColor, GL_INT, 16, 16, 16, 16, 0, 0 }, - { Format::ID::R16G16B16A16_SNORM, GL_RGBA16_SNORM_EXT, GL_RGBA16_SNORM_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_SIGNED_NORMALIZED, 16, 16, 16, 16, 0, 0 }, - { Format::ID::R16G16B16A16_UINT, GL_RGBA16UI, GL_RGBA16UI, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_INT, 16, 16, 16, 16, 0, 0 }, - { Format::ID::R16G16B16A16_UNORM, GL_RGBA16_EXT, GL_RGBA16_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 16, 16, 16, 16, 0, 0 }, - { Format::ID::R16G16B16_FLOAT, GL_RGB16F, GL_RGB16F, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 16, 16, 16, 0, 0, 0 }, - { Format::ID::R16G16B16_SINT, GL_RGB16I, GL_RGB16I, GenerateMip, NoCopyFunctions, ReadColor, GL_INT, 16, 16, 16, 0, 0, 0 }, - { Format::ID::R16G16B16_SNORM, GL_RGB16_SNORM_EXT, GL_RGB16_SNORM_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_SIGNED_NORMALIZED, 16, 16, 16, 0, 0, 0 }, - { Format::ID::R16G16B16_UINT, GL_RGB16UI, GL_RGB16UI, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_INT, 16, 16, 16, 0, 0, 0 }, - { Format::ID::R16G16B16_UNORM, GL_RGB16_EXT, GL_RGB16_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 16, 16, 16, 0, 0, 0 }, - { Format::ID::R16G16_FLOAT, GL_RG16F, GL_RG16F, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 16, 16, 0, 0, 0, 0 }, - { Format::ID::R16G16_SINT, GL_RG16I, GL_RG16I, GenerateMip, NoCopyFunctions, ReadColor, GL_INT, 16, 16, 0, 0, 0, 0 }, - { Format::ID::R16G16_SNORM, GL_RG16_SNORM_EXT, GL_RG16_SNORM_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_SIGNED_NORMALIZED, 16, 16, 0, 0, 0, 0 }, - { Format::ID::R16G16_UINT, GL_RG16UI, GL_RG16UI, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_INT, 16, 16, 0, 0, 0, 0 }, - { Format::ID::R16G16_UNORM, GL_RG16_EXT, GL_RG16_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 16, 16, 0, 0, 0, 0 }, - { Format::ID::R16_FLOAT, GL_R16F, GL_R16F, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 16, 0, 0, 0, 0, 0 }, - { Format::ID::R16_SINT, GL_R16I, GL_R16I, GenerateMip, NoCopyFunctions, ReadColor, GL_INT, 16, 0, 0, 0, 0, 0 }, - { Format::ID::R16_SNORM, GL_R16_SNORM_EXT, GL_R16_SNORM_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_SIGNED_NORMALIZED, 16, 0, 0, 0, 0, 0 }, - { Format::ID::R16_UINT, GL_R16UI, GL_R16UI, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_INT, 16, 0, 0, 0, 0, 0 }, - { Format::ID::R16_UNORM, GL_R16_EXT, GL_R16_EXT, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 16, 0, 0, 0, 0, 0 }, - { Format::ID::R32G32B32A32_FLOAT, GL_RGBA32F, GL_RGBA32F, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 32, 32, 32, 32, 0, 0 }, - { Format::ID::R32G32B32A32_SINT, GL_RGBA32I, GL_RGBA32I, GenerateMip, NoCopyFunctions, ReadColor, GL_INT, 32, 32, 32, 32, 0, 0 }, - { Format::ID::R32G32B32A32_UINT, GL_RGBA32UI, GL_RGBA32UI, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_INT, 32, 32, 32, 32, 0, 0 }, - { Format::ID::R32G32B32_FLOAT, GL_RGB32F, GL_RGB32F, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 32, 32, 32, 0, 0, 0 }, - { Format::ID::R32G32B32_SINT, GL_RGB32I, GL_RGB32I, GenerateMip, NoCopyFunctions, ReadColor, GL_INT, 32, 32, 32, 0, 0, 0 }, - { Format::ID::R32G32B32_UINT, GL_RGB32UI, GL_RGB32UI, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_INT, 32, 32, 32, 0, 0, 0 }, - { Format::ID::R32G32_FLOAT, GL_RG32F, GL_RG32F, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 32, 32, 0, 0, 0, 0 }, - { Format::ID::R32G32_SINT, GL_RG32I, GL_RG32I, GenerateMip, NoCopyFunctions, ReadColor, GL_INT, 32, 32, 0, 0, 0, 0 }, - { Format::ID::R32G32_UINT, GL_RG32UI, GL_RG32UI, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_INT, 32, 32, 0, 0, 0, 0 }, - { Format::ID::R32_FLOAT, GL_R32F, GL_R32F, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 32, 0, 0, 0, 0, 0 }, - { Format::ID::R32_SINT, GL_R32I, GL_R32I, GenerateMip, NoCopyFunctions, ReadColor, GL_INT, 32, 0, 0, 0, 0, 0 }, - { Format::ID::R32_UINT, GL_R32UI, GL_R32UI, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_INT, 32, 0, 0, 0, 0, 0 }, - { Format::ID::R4G4B4A4_UNORM, GL_RGBA4, GL_RGBA4, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 4, 4, 4, 4, 0, 0 }, - { Format::ID::R5G5B5A1_UNORM, GL_RGB5_A1, GL_RGB5_A1, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 5, 5, 5, 1, 0, 0 }, - { Format::ID::R5G6B5_UNORM, GL_RGB565, GL_RGB565, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 5, 6, 5, 0, 0, 0 }, - { Format::ID::R8G8B8A8_SINT, GL_RGBA8I, GL_RGBA8I, GenerateMip, NoCopyFunctions, ReadColor, GL_INT, 8, 8, 8, 8, 0, 0 }, - { Format::ID::R8G8B8A8_SNORM, GL_RGBA8_SNORM, GL_RGBA8_SNORM, GenerateMip, NoCopyFunctions, ReadColor, GL_SIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0 }, - { Format::ID::R8G8B8A8_UINT, GL_RGBA8UI, GL_RGBA8UI, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_INT, 8, 8, 8, 8, 0, 0 }, - { Format::ID::R8G8B8A8_UNORM, GL_RGBA8, GL_RGBA8, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0 }, - { Format::ID::R8G8B8A8_UNORM_SRGB, GL_SRGB8_ALPHA8, GL_SRGB8_ALPHA8, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0 }, - { Format::ID::R8G8B8_SINT, GL_RGB8I, GL_RGB8I, GenerateMip, NoCopyFunctions, ReadColor, GL_INT, 8, 8, 8, 0, 0, 0 }, - { Format::ID::R8G8B8_SNORM, GL_RGB8_SNORM, GL_RGB8_SNORM, GenerateMip, NoCopyFunctions, ReadColor, GL_SIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0 }, - { Format::ID::R8G8B8_UINT, GL_RGB8UI, GL_RGB8UI, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_INT, 8, 8, 8, 0, 0, 0 }, - { Format::ID::R8G8B8_UNORM, GL_RGB8, GL_RGB8, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0 }, - { Format::ID::R8G8B8_UNORM_SRGB, GL_SRGB8, GL_SRGB8, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0 }, - { Format::ID::R8G8_SINT, GL_RG8I, GL_RG8I, GenerateMip, NoCopyFunctions, ReadColor, GL_INT, 8, 8, 0, 0, 0, 0 }, - { Format::ID::R8G8_SNORM, GL_RG8_SNORM, GL_RG8_SNORM, GenerateMip, NoCopyFunctions, ReadColor, GL_SIGNED_NORMALIZED, 8, 8, 0, 0, 0, 0 }, - { Format::ID::R8G8_UINT, GL_RG8UI, GL_RG8UI, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_INT, 8, 8, 0, 0, 0, 0 }, - { Format::ID::R8G8_UNORM, GL_RG8, GL_RG8, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 8, 8, 0, 0, 0, 0 }, - { Format::ID::R8_SINT, GL_R8I, GL_R8I, GenerateMip, NoCopyFunctions, ReadColor, GL_INT, 8, 0, 0, 0, 0, 0 }, - { Format::ID::R8_SNORM, GL_R8_SNORM, GL_R8_SNORM, GenerateMip, NoCopyFunctions, ReadColor, GL_SIGNED_NORMALIZED, 8, 0, 0, 0, 0, 0 }, - { Format::ID::R8_UINT, GL_R8UI, GL_R8UI, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_INT, 8, 0, 0, 0, 0, 0 }, - { Format::ID::R8_UNORM, GL_R8, GL_R8, GenerateMip, NoCopyFunctions, ReadColor, GL_UNSIGNED_NORMALIZED, 8, 0, 0, 0, 0, 0 }, - { Format::ID::R9G9B9E5_SHAREDEXP, GL_RGB9_E5, GL_RGB9_E5, GenerateMip, NoCopyFunctions, ReadColor, GL_FLOAT, 9, 9, 9, 0, 0, 0 }, - { Format::ID::S8_UINT, GL_STENCIL_INDEX8, GL_STENCIL_INDEX8, nullptr, NoCopyFunctions, nullptr, GL_UNSIGNED_INT, 0, 0, 0, 0, 0, 8 }, - // clang-format on -}; - -// static -const Format &Format::Get(ID id) -{ - return g_formatInfoTable[static_cast(id)]; -} - -} // namespace angle diff --git a/gfx/angle/src/libANGLE/renderer/FramebufferAttachmentObjectImpl.h b/gfx/angle/src/libANGLE/renderer/FramebufferAttachmentObjectImpl.h index 5139ee5fd..a5aa65e55 100755 --- a/gfx/angle/src/libANGLE/renderer/FramebufferAttachmentObjectImpl.h +++ b/gfx/angle/src/libANGLE/renderer/FramebufferAttachmentObjectImpl.h @@ -23,11 +23,7 @@ class FramebufferAttachmentObjectImpl : angle::NonCopyable virtual ~FramebufferAttachmentObjectImpl() {} virtual gl::Error getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target, - FramebufferAttachmentRenderTarget **rtOut) - { - UNIMPLEMENTED(); - return gl::Error(GL_OUT_OF_MEMORY, "getAttachmentRenderTarget not supported."); - } + FramebufferAttachmentRenderTarget **rtOut) = 0; }; } // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/GLImplFactory.h b/gfx/angle/src/libANGLE/renderer/GLImplFactory.h index 20a48fc72..09f14d727 100755 --- a/gfx/angle/src/libANGLE/renderer/GLImplFactory.h +++ b/gfx/angle/src/libANGLE/renderer/GLImplFactory.h @@ -63,7 +63,7 @@ class GLImplFactory : angle::NonCopyable virtual RenderbufferImpl *createRenderbuffer() = 0; // Buffer creation - virtual BufferImpl *createBuffer(const gl::BufferState &state) = 0; + virtual BufferImpl *createBuffer() = 0; // Vertex Array creation virtual VertexArrayImpl *createVertexArray(const gl::VertexArrayState &data) = 0; diff --git a/gfx/angle/src/libANGLE/renderer/ProgramImpl.h b/gfx/angle/src/libANGLE/renderer/ProgramImpl.h index 065f6a338..45ff0a05a 100755 --- a/gfx/angle/src/libANGLE/renderer/ProgramImpl.h +++ b/gfx/angle/src/libANGLE/renderer/ProgramImpl.h @@ -24,7 +24,14 @@ struct BlockMemberInfo; namespace rx { -using LinkResult = gl::ErrorOrResult; + +struct LinkResult +{ + LinkResult(bool linkSuccess, const gl::Error &error) : linkSuccess(linkSuccess), error(error) {} + + bool linkSuccess; + gl::Error error; +}; class ProgramImpl : angle::NonCopyable { diff --git a/gfx/angle/src/libANGLE/renderer/ShaderImpl.h b/gfx/angle/src/libANGLE/renderer/ShaderImpl.h index 77e02d023..2ade19a06 100755 --- a/gfx/angle/src/libANGLE/renderer/ShaderImpl.h +++ b/gfx/angle/src/libANGLE/renderer/ShaderImpl.h @@ -21,9 +21,9 @@ class ShaderImpl : angle::NonCopyable ShaderImpl(const gl::ShaderState &data) : mData(data) {} virtual ~ShaderImpl() { } - // Returns additional sh::Compile options. - virtual ShCompileOptions prepareSourceAndReturnOptions(std::stringstream *sourceStream, - std::string *sourcePath) = 0; + // Returns additional ShCompile options. + virtual int prepareSourceAndReturnOptions(std::stringstream *sourceStream, + std::string *sourcePath) = 0; // Returns success for compiling on the driver. Returns success. virtual bool postTranslateCompile(gl::Compiler *compiler, std::string *infoLog) = 0; diff --git a/gfx/angle/src/libANGLE/renderer/SurfaceImpl.cpp b/gfx/angle/src/libANGLE/renderer/SurfaceImpl.cpp index e4b3d7c8b..517214b36 100755 --- a/gfx/angle/src/libANGLE/renderer/SurfaceImpl.cpp +++ b/gfx/angle/src/libANGLE/renderer/SurfaceImpl.cpp @@ -19,10 +19,4 @@ SurfaceImpl::~SurfaceImpl() { } -egl::Error SurfaceImpl::swapWithDamage(EGLint *rects, EGLint n_rects) -{ - UNREACHABLE(); - return egl::Error(EGL_BAD_SURFACE, "swapWithDamage implementation missing."); -} - } // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/SurfaceImpl.h b/gfx/angle/src/libANGLE/renderer/SurfaceImpl.h index 177e788d8..5efe2fc87 100755 --- a/gfx/angle/src/libANGLE/renderer/SurfaceImpl.h +++ b/gfx/angle/src/libANGLE/renderer/SurfaceImpl.h @@ -39,7 +39,6 @@ class SurfaceImpl : public FramebufferAttachmentObjectImpl virtual egl::Error initialize() = 0; virtual FramebufferImpl *createDefaultFramebuffer(const gl::FramebufferState &state) = 0; virtual egl::Error swap() = 0; - virtual egl::Error swapWithDamage(EGLint *rects, EGLint n_rects); virtual egl::Error postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height) = 0; virtual egl::Error querySurfacePointerANGLE(EGLint attribute, void **value) = 0; virtual egl::Error bindTexImage(gl::Texture *texture, EGLint buffer) = 0; diff --git a/gfx/angle/src/libANGLE/renderer/TextureImpl.cpp b/gfx/angle/src/libANGLE/renderer/TextureImpl.cpp index af4796371..465d4e3e7 100755 --- a/gfx/angle/src/libANGLE/renderer/TextureImpl.cpp +++ b/gfx/angle/src/libANGLE/renderer/TextureImpl.cpp @@ -40,11 +40,4 @@ gl::Error TextureImpl::copySubTexture(const gl::Offset &destOffset, UNREACHABLE(); return gl::Error(GL_INVALID_OPERATION, "CHROMIUM_copy_texture exposed but not implemented."); } - -gl::Error TextureImpl::copyCompressedTexture(const gl::Texture *source) -{ - UNREACHABLE(); - return gl::Error(GL_INVALID_OPERATION, - "CHROMIUM_copy_compressed_texture exposed but not implemented."); -} } diff --git a/gfx/angle/src/libANGLE/renderer/TextureImpl.h b/gfx/angle/src/libANGLE/renderer/TextureImpl.h index 7d0ebe2f1..45c230729 100755 --- a/gfx/angle/src/libANGLE/renderer/TextureImpl.h +++ b/gfx/angle/src/libANGLE/renderer/TextureImpl.h @@ -16,7 +16,6 @@ #include "libANGLE/Error.h" #include "libANGLE/ImageIndex.h" #include "libANGLE/Stream.h" -#include "libANGLE/Texture.h" #include "libANGLE/renderer/FramebufferAttachmentObjectImpl.h" namespace egl @@ -73,8 +72,6 @@ class TextureImpl : public FramebufferAttachmentObjectImpl bool unpackUnmultiplyAlpha, const gl::Texture *source); - virtual gl::Error copyCompressedTexture(const gl::Texture *source); - virtual gl::Error setStorage(GLenum target, size_t levels, GLenum internalFormat, const gl::Extents &size) = 0; virtual gl::Error setEGLImageTarget(GLenum target, egl::Image *image) = 0; @@ -90,8 +87,6 @@ class TextureImpl : public FramebufferAttachmentObjectImpl virtual void bindTexImage(egl::Surface *surface) = 0; virtual void releaseTexImage() = 0; - virtual void syncState(const gl::Texture::DirtyBits &dirtyBits) = 0; - protected: const gl::TextureState &mState; }; diff --git a/gfx/angle/src/libANGLE/renderer/TextureImpl_mock.h b/gfx/angle/src/libANGLE/renderer/TextureImpl_mock.h index c8d05d202..8b8f397ac 100755 --- a/gfx/angle/src/libANGLE/renderer/TextureImpl_mock.h +++ b/gfx/angle/src/libANGLE/renderer/TextureImpl_mock.h @@ -19,7 +19,7 @@ namespace rx class MockTextureImpl : public TextureImpl { public: - MockTextureImpl() : TextureImpl(mMockState), mMockState(GL_TEXTURE_2D) {} + MockTextureImpl() : TextureImpl(gl::TextureState(GL_TEXTURE_2D)) {} virtual ~MockTextureImpl() { destructor(); } MOCK_METHOD8(setImage, gl::Error(GLenum, size_t, GLenum, const gl::Extents &, GLenum, GLenum, const gl::PixelUnpackState &, const uint8_t *)); MOCK_METHOD7(setSubImage, gl::Error(GLenum, size_t, const gl::Box &, GLenum, GLenum, const gl::PixelUnpackState &, const uint8_t *)); @@ -35,7 +35,6 @@ class MockTextureImpl : public TextureImpl bool, bool, const gl::Texture *)); - MOCK_METHOD1(copyCompressedTexture, gl::Error(const gl::Texture *source)); MOCK_METHOD4(setStorage, gl::Error(GLenum, size_t, GLenum, const gl::Extents &)); MOCK_METHOD3(setImageExternal, gl::Error(GLenum, egl::Stream *, const egl::Stream::GLTextureDescription &)); @@ -48,12 +47,7 @@ class MockTextureImpl : public TextureImpl MOCK_METHOD1(setBaseLevel, void(GLuint)); - MOCK_METHOD1(syncState, void(const gl::Texture::DirtyBits &)); - MOCK_METHOD0(destructor, void()); - - protected: - gl::TextureState mMockState; }; } diff --git a/gfx/angle/src/libANGLE/renderer/d3d/BufferD3D.cpp b/gfx/angle/src/libANGLE/renderer/d3d/BufferD3D.cpp index 250162726..5e89c5bf4 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/BufferD3D.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/BufferD3D.cpp @@ -19,8 +19,8 @@ namespace rx unsigned int BufferD3D::mNextSerial = 1; -BufferD3D::BufferD3D(const gl::BufferState &state, BufferFactoryD3D *factory) - : BufferImpl(state), +BufferD3D::BufferD3D(BufferFactoryD3D *factory) + : BufferImpl(), mFactory(factory), mStaticIndexBuffer(nullptr), mStaticBufferCacheTotalSize(0), @@ -179,7 +179,11 @@ gl::Error BufferD3D::getIndexRange(GLenum type, gl::IndexRange *outRange) { const uint8_t *data = nullptr; - ANGLE_TRY(getData(&data)); + gl::Error error = getData(&data); + if (error.isError()) + { + return error; + } *outRange = gl::ComputeIndexRange(type, data + offset, count, primitiveRestartEnabled); return gl::Error(GL_NO_ERROR); diff --git a/gfx/angle/src/libANGLE/renderer/d3d/BufferD3D.h b/gfx/angle/src/libANGLE/renderer/d3d/BufferD3D.h index fdabe7b7e..3c43c0164 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/BufferD3D.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/BufferD3D.h @@ -30,7 +30,7 @@ enum class D3DBufferUsage class BufferD3D : public BufferImpl { public: - BufferD3D(const gl::BufferState &state, BufferFactoryD3D *factory); + BufferD3D(BufferFactoryD3D *factory); virtual ~BufferD3D(); unsigned int getSerial() const { return mSerial; } diff --git a/gfx/angle/src/libANGLE/renderer/d3d/DisplayD3D.cpp b/gfx/angle/src/libANGLE/renderer/d3d/DisplayD3D.cpp index 474a08c65..f5cc97e95 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/DisplayD3D.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/DisplayD3D.cpp @@ -29,6 +29,10 @@ # include "libANGLE/renderer/d3d/d3d11/Renderer11.h" #endif // ANGLE_ENABLE_D3D11 +#if defined (ANGLE_TEST_CONFIG) +# define ANGLE_DEFAULT_D3D11 1 +#endif + #if !defined(ANGLE_DEFAULT_D3D11) // Enables use of the Direct3D 11 API for a default display, when available # define ANGLE_DEFAULT_D3D11 1 @@ -172,18 +176,16 @@ SurfaceImpl *DisplayD3D::createPbufferSurface(const egl::SurfaceState &state, const egl::AttributeMap &attribs) { ASSERT(mRenderer != nullptr); - return new PbufferSurfaceD3D(state, mRenderer, mDisplay, configuration, 0, nullptr, attribs); + return new PbufferSurfaceD3D(state, mRenderer, mDisplay, configuration, nullptr, attribs); } SurfaceImpl *DisplayD3D::createPbufferFromClientBuffer(const egl::SurfaceState &state, const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) { ASSERT(mRenderer != nullptr); - return new PbufferSurfaceD3D(state, mRenderer, mDisplay, configuration, buftype, clientBuffer, - attribs); + return new PbufferSurfaceD3D(state, mRenderer, mDisplay, configuration, shareHandle, attribs); } SurfaceImpl *DisplayD3D::createPixmapSurface(const egl::SurfaceState &state, @@ -289,26 +291,6 @@ bool DisplayD3D::isValidNativeWindow(EGLNativeWindowType window) const return mRenderer->isValidNativeWindow(window); } -egl::Error DisplayD3D::validateClientBuffer(const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, - const egl::AttributeMap &attribs) const -{ - switch (buftype) - { - case EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE: - return mRenderer->validateShareHandle(configuration, static_cast(clientBuffer), - attribs); - - case EGL_D3D_TEXTURE_ANGLE: - return mRenderer->getD3DTextureInfo(static_cast(clientBuffer), nullptr, - nullptr, nullptr); - - default: - return DisplayImpl::validateClientBuffer(configuration, buftype, clientBuffer, attribs); - } -} - void DisplayD3D::generateExtensions(egl::DisplayExtensions *outExtensions) const { mRenderer->generateDisplayExtensions(outExtensions); diff --git a/gfx/angle/src/libANGLE/renderer/d3d/DisplayD3D.h b/gfx/angle/src/libANGLE/renderer/d3d/DisplayD3D.h index 3801a8eb1..1bd6f1160 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/DisplayD3D.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/DisplayD3D.h @@ -34,8 +34,7 @@ class DisplayD3D : public DisplayImpl const egl::AttributeMap &attribs) override; SurfaceImpl *createPbufferFromClientBuffer(const egl::SurfaceState &state, const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) override; SurfaceImpl *createPixmapSurface(const egl::SurfaceState &state, const egl::Config *configuration, @@ -60,10 +59,6 @@ class DisplayD3D : public DisplayImpl egl::Error restoreLostDevice() override; bool isValidNativeWindow(EGLNativeWindowType window) const override; - egl::Error validateClientBuffer(const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, - const egl::AttributeMap &attribs) const override; egl::Error getDevice(DeviceImpl **device) override; diff --git a/gfx/angle/src/libANGLE/renderer/d3d/DynamicHLSL.cpp b/gfx/angle/src/libANGLE/renderer/d3d/DynamicHLSL.cpp index 1946585c1..cb3e582d1 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/DynamicHLSL.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/DynamicHLSL.cpp @@ -117,8 +117,8 @@ void WriteArrayString(std::stringstream &strstr, unsigned int i) strstr << "]"; } -constexpr const char *VERTEX_ATTRIBUTE_STUB_STRING = "@@ VERTEX ATTRIBUTES @@"; -constexpr const char *PIXEL_OUTPUT_STUB_STRING = "@@ PIXEL OUTPUT @@"; +const std::string VERTEX_ATTRIBUTE_STUB_STRING = "@@ VERTEX ATTRIBUTES @@"; +const std::string PIXEL_OUTPUT_STUB_STRING = "@@ PIXEL OUTPUT @@"; } // anonymous namespace std::string GetVaryingSemantic(int majorShaderModel, bool programUsesPointSize) @@ -295,7 +295,7 @@ std::string DynamicHLSL::generateVertexShaderForInputLayout( std::string vertexHLSL(sourceShader); size_t copyInsertionPos = vertexHLSL.find(VERTEX_ATTRIBUTE_STUB_STRING); - vertexHLSL.replace(copyInsertionPos, strlen(VERTEX_ATTRIBUTE_STUB_STRING), structStream.str()); + vertexHLSL.replace(copyInsertionPos, VERTEX_ATTRIBUTE_STUB_STRING.length(), structStream.str()); return vertexHLSL; } @@ -360,7 +360,7 @@ std::string DynamicHLSL::generatePixelShaderForOutputSignature( std::string pixelHLSL(sourceShader); size_t outputInsertionPos = pixelHLSL.find(PIXEL_OUTPUT_STUB_STRING); - pixelHLSL.replace(outputInsertionPos, strlen(PIXEL_OUTPUT_STUB_STRING), + pixelHLSL.replace(outputInsertionPos, PIXEL_OUTPUT_STUB_STRING.length(), declarationStream.str()); return pixelHLSL; @@ -440,7 +440,7 @@ bool DynamicHLSL::generateShaderLinkHLSL(const gl::ContextState &data, } // Add stub string to be replaced when shader is dynamically defined by its layout - vertexStream << "\n" << std::string(VERTEX_ATTRIBUTE_STUB_STRING) << "\n"; + vertexStream << "\n" << VERTEX_ATTRIBUTE_STUB_STRING + "\n"; // Write the HLSL input/output declarations vertexStream << "struct VS_OUTPUT\n"; @@ -597,7 +597,7 @@ bool DynamicHLSL::generateShaderLinkHLSL(const gl::ContextState &data, generateVaryingLinkHLSL(SHADER_PIXEL, varyingPacking, pixelStream); pixelStream << "\n"; - pixelStream << std::string(PIXEL_OUTPUT_STUB_STRING) << "\n"; + pixelStream << PIXEL_OUTPUT_STUB_STRING + "\n"; if (fragmentShader->usesFrontFacing()) { diff --git a/gfx/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp b/gfx/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp index cc8bb0ea7..a45c94538 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp @@ -207,7 +207,7 @@ GLenum FramebufferD3D::getImplementationColorReadFormat() const GLenum implementationFormat = getRenderTargetImplementationFormat(attachmentRenderTarget); const gl::InternalFormat &implementationFormatInfo = gl::GetInternalFormatInfo(implementationFormat); - return implementationFormatInfo.getReadPixelsFormat(); + return implementationFormatInfo.format; } GLenum FramebufferD3D::getImplementationColorReadType() const @@ -229,7 +229,7 @@ GLenum FramebufferD3D::getImplementationColorReadType() const GLenum implementationFormat = getRenderTargetImplementationFormat(attachmentRenderTarget); const gl::InternalFormat &implementationFormatInfo = gl::GetInternalFormatInfo(implementationFormat); - return implementationFormatInfo.getReadPixelsType(); + return implementationFormatInfo.type; } gl::Error FramebufferD3D::readPixels(ContextImpl *context, @@ -240,13 +240,15 @@ gl::Error FramebufferD3D::readPixels(ContextImpl *context, { const gl::PixelPackState &packState = context->getGLState().getPackState(); - const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(gl::GetSizedInternalFormat(format, type)); - - GLuint outputPitch = 0; - ANGLE_TRY_RESULT(formatInfo.computeRowPitch(area.width, packState.alignment, packState.rowLength), - outputPitch); + GLenum sizedInternalFormat = gl::GetSizedInternalFormat(format, type); + const gl::InternalFormat &sizedFormatInfo = gl::GetInternalFormatInfo(sizedInternalFormat); + GLuint outputPitch = 0; + ANGLE_TRY_RESULT( + sizedFormatInfo.computeRowPitch(type, area.width, packState.alignment, packState.rowLength), + outputPitch); GLuint outputSkipBytes = 0; - ANGLE_TRY_RESULT(formatInfo.computeSkipBytes(outputPitch, 0, packState, false), + ANGLE_TRY_RESULT(sizedFormatInfo.computeSkipBytes(outputPitch, 0, 0, packState.skipRows, + packState.skipPixels, false), outputSkipBytes); return readPixelsImpl(area, format, type, outputPitch, packState, diff --git a/gfx/angle/src/libANGLE/renderer/d3d/HLSLCompiler.cpp b/gfx/angle/src/libANGLE/renderer/d3d/HLSLCompiler.cpp index 305b6c4e4..e8b1af312 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/HLSLCompiler.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/HLSLCompiler.cpp @@ -136,8 +136,7 @@ gl::Error HLSLCompiler::initialize() if (!mD3DCompilerModule) { - ERR("D3D compiler module not found."); - return gl::Error(GL_OUT_OF_MEMORY, "D3D compiler module not found."); + return gl::Error(GL_INVALID_OPERATION, "No D3D compiler module found - aborting!\n"); } mD3DCompileFunc = reinterpret_cast(GetProcAddress(mD3DCompilerModule, "D3DCompile")); @@ -156,7 +155,7 @@ gl::Error HLSLCompiler::initialize() if (mD3DCompileFunc == nullptr) { - return gl::Error(GL_OUT_OF_MEMORY, "Error finding D3DCompile entry point."); + return gl::Error(GL_INVALID_OPERATION, "Error finding D3DCompile entry point"); } mInitialized = true; diff --git a/gfx/angle/src/libANGLE/renderer/d3d/ImageD3D.cpp b/gfx/angle/src/libANGLE/renderer/d3d/ImageD3D.cpp index c9581ccaa..ead5db645 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/ImageD3D.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/ImageD3D.cpp @@ -10,7 +10,6 @@ #include "libANGLE/renderer/d3d/ImageD3D.h" -#include "libANGLE/formatutils.h" #include "libANGLE/Framebuffer.h" #include "libANGLE/FramebufferAttachment.h" #include "libANGLE/renderer/d3d/FramebufferD3D.h" @@ -30,13 +29,4 @@ ImageD3D::ImageD3D() { } -GLenum -ImageD3D::getSizedInputFormat(GLenum inputType) const -{ - const auto &internalFormat = gl::GetInternalFormatInfo(mInternalFormat); - const auto &unsizedInternalFormat = internalFormat.format; - const auto &sizedInputFormat = gl::GetSizedInternalFormat(unsizedInternalFormat, inputType); - return sizedInputFormat; -} - } // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/d3d/ImageD3D.h b/gfx/angle/src/libANGLE/renderer/d3d/ImageD3D.h index 79840c15b..947a8328f 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/ImageD3D.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/ImageD3D.h @@ -51,8 +51,6 @@ class ImageD3D : angle::NonCopyable virtual bool redefine(GLenum target, GLenum internalformat, const gl::Extents &size, bool forceRelease) = 0; - GLenum getSizedInputFormat(GLenum inputType) const; - virtual gl::Error loadData(const gl::Box &area, const gl::PixelUnpackState &unpack, GLenum type, diff --git a/gfx/angle/src/libANGLE/renderer/d3d/ProgramD3D.cpp b/gfx/angle/src/libANGLE/renderer/d3d/ProgramD3D.cpp index d00a8738e..3ac82d941 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/ProgramD3D.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/ProgramD3D.cpp @@ -739,14 +739,14 @@ LinkResult ProgramD3D::load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream) if (memcmp(&identifier, &binaryDeviceIdentifier, sizeof(DeviceIdentifier)) != 0) { infoLog << "Invalid program binary, device configuration has changed."; - return false; + return LinkResult(false, gl::Error(GL_NO_ERROR)); } int compileFlags = stream->readInt(); if (compileFlags != ANGLE_COMPILE_OPTIMIZATION_LEVEL) { infoLog << "Mismatched compilation flags."; - return false; + return LinkResult(false, gl::Error(GL_NO_ERROR)); } for (int &index : mAttribLocationToD3DSemantic) @@ -780,7 +780,7 @@ LinkResult ProgramD3D::load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream) if (stream->error()) { infoLog << "Invalid program binary."; - return false; + return LinkResult(false, gl::Error(GL_NO_ERROR)); } const auto &linkedUniforms = mState.getUniforms(); @@ -804,7 +804,7 @@ LinkResult ProgramD3D::load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream) if (stream->error()) { infoLog << "Invalid program binary."; - return false; + return LinkResult(false, gl::Error(GL_NO_ERROR)); } ASSERT(mD3DUniformBlocks.empty()); @@ -853,8 +853,6 @@ LinkResult ProgramD3D::load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream) const unsigned char *binary = reinterpret_cast(stream->data()); - bool separateAttribs = (mState.getTransformFeedbackBufferMode() == GL_SEPARATE_ATTRIBS); - const unsigned int vertexShaderCount = stream->readInt(); for (unsigned int vertexShaderIndex = 0; vertexShaderIndex < vertexShaderCount; vertexShaderIndex++) @@ -872,14 +870,18 @@ LinkResult ProgramD3D::load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream) ShaderExecutableD3D *shaderExecutable = nullptr; - ANGLE_TRY(mRenderer->loadExecutable(vertexShaderFunction, vertexShaderSize, SHADER_VERTEX, - mStreamOutVaryings, separateAttribs, - &shaderExecutable)); + gl::Error error = mRenderer->loadExecutable( + vertexShaderFunction, vertexShaderSize, SHADER_VERTEX, mStreamOutVaryings, + (mState.getTransformFeedbackBufferMode() == GL_SEPARATE_ATTRIBS), &shaderExecutable); + if (error.isError()) + { + return LinkResult(false, error); + } if (!shaderExecutable) { infoLog << "Could not create vertex shader."; - return false; + return LinkResult(false, gl::Error(GL_NO_ERROR)); } // generated converted input layout @@ -907,14 +909,18 @@ LinkResult ProgramD3D::load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream) const unsigned char *pixelShaderFunction = binary + stream->offset(); ShaderExecutableD3D *shaderExecutable = nullptr; - ANGLE_TRY(mRenderer->loadExecutable(pixelShaderFunction, pixelShaderSize, SHADER_PIXEL, - mStreamOutVaryings, separateAttribs, - &shaderExecutable)); + gl::Error error = mRenderer->loadExecutable( + pixelShaderFunction, pixelShaderSize, SHADER_PIXEL, mStreamOutVaryings, + (mState.getTransformFeedbackBufferMode() == GL_SEPARATE_ATTRIBS), &shaderExecutable); + if (error.isError()) + { + return LinkResult(false, error); + } if (!shaderExecutable) { infoLog << "Could not create pixel shader."; - return false; + return LinkResult(false, gl::Error(GL_NO_ERROR)); } // add new binary @@ -934,22 +940,27 @@ LinkResult ProgramD3D::load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream) } const unsigned char *geometryShaderFunction = binary + stream->offset(); + bool splitAttribs = (mState.getTransformFeedbackBufferMode() == GL_SEPARATE_ATTRIBS); - ANGLE_TRY(mRenderer->loadExecutable(geometryShaderFunction, geometryShaderSize, - SHADER_GEOMETRY, mStreamOutVaryings, separateAttribs, - &mGeometryExecutables[geometryExeIndex])); + gl::Error error = mRenderer->loadExecutable( + geometryShaderFunction, geometryShaderSize, SHADER_GEOMETRY, mStreamOutVaryings, + splitAttribs, &mGeometryExecutables[geometryExeIndex]); + if (error.isError()) + { + return LinkResult(false, error); + } if (!mGeometryExecutables[geometryExeIndex]) { infoLog << "Could not create geometry shader."; - return false; + return LinkResult(false, gl::Error(GL_NO_ERROR)); } stream->skip(geometryShaderSize); } initializeUniformStorage(); - return true; + return LinkResult(true, gl::Error(GL_NO_ERROR)); } gl::Error ProgramD3D::save(gl::BinaryOutputStream *stream) @@ -1278,14 +1289,22 @@ LinkResult ProgramD3D::compileProgramExecutables(const gl::ContextState &data, g { const gl::InputLayout &defaultInputLayout = GetDefaultInputLayoutFromShader(mState.getAttachedVertexShader()); - ShaderExecutableD3D *defaultVertexExecutable = nullptr; - ANGLE_TRY( - getVertexExecutableForInputLayout(defaultInputLayout, &defaultVertexExecutable, &infoLog)); + ShaderExecutableD3D *defaultVertexExecutable = NULL; + gl::Error error = + getVertexExecutableForInputLayout(defaultInputLayout, &defaultVertexExecutable, &infoLog); + if (error.isError()) + { + return LinkResult(false, error); + } std::vector defaultPixelOutput = GetDefaultOutputLayoutFromShader(getPixelShaderKey()); - ShaderExecutableD3D *defaultPixelExecutable = nullptr; - ANGLE_TRY( - getPixelExecutableForOutputLayout(defaultPixelOutput, &defaultPixelExecutable, &infoLog)); + ShaderExecutableD3D *defaultPixelExecutable = NULL; + error = + getPixelExecutableForOutputLayout(defaultPixelOutput, &defaultPixelExecutable, &infoLog); + if (error.isError()) + { + return LinkResult(false, error); + } // Auto-generate the geometry shader here, if we expect to be using point rendering in D3D11. ShaderExecutableD3D *pointGS = nullptr; @@ -1318,8 +1337,9 @@ LinkResult ProgramD3D::compileProgramExecutables(const gl::ContextState &data, g fragmentShaderD3D->appendDebugInfo(defaultPixelExecutable->getDebugInfo()); } - return (defaultVertexExecutable && defaultPixelExecutable && - (!usesGeometryShader(GL_POINTS) || pointGS)); + bool linkSuccess = (defaultVertexExecutable && defaultPixelExecutable && + (!usesGeometryShader(GL_POINTS) || pointGS)); + return LinkResult(linkSuccess, gl::Error(GL_NO_ERROR)); } LinkResult ProgramD3D::link(const gl::ContextState &data, gl::InfoLog &infoLog) @@ -1343,7 +1363,7 @@ LinkResult ProgramD3D::link(const gl::ContextState &data, gl::InfoLog &infoLog) if (fragmentShaderD3D->usesFrontFacing()) { infoLog << "The current renderer doesn't support gl_FrontFacing"; - return false; + return LinkResult(false, gl::Error(GL_NO_ERROR)); } } @@ -1355,7 +1375,7 @@ LinkResult ProgramD3D::link(const gl::ContextState &data, gl::InfoLog &infoLog) if (!varyingPacking.packVaryings(infoLog, packedVaryings, mState.getTransformFeedbackVaryingNames())) { - return false; + return LinkResult(false, gl::Error(GL_NO_ERROR)); } ProgramD3DMetadata metadata(mRenderer, vertexShaderD3D, fragmentShaderD3D); @@ -1366,7 +1386,7 @@ LinkResult ProgramD3D::link(const gl::ContextState &data, gl::InfoLog &infoLog) if (static_cast(varyingPacking.getRegisterCount()) > data.getCaps().maxVaryingVectors) { infoLog << "No varying registers left to support gl_FragCoord/gl_PointCoord"; - return false; + return LinkResult(false, gl::Error(GL_NO_ERROR)); } // TODO(jmadill): Implement more sophisticated component packing in D3D9. @@ -1376,13 +1396,13 @@ LinkResult ProgramD3D::link(const gl::ContextState &data, gl::InfoLog &infoLog) varyingPacking.getMaxSemanticIndex() > data.getCaps().maxVaryingVectors) { infoLog << "Cannot pack these varyings on D3D9."; - return false; + return LinkResult(false, gl::Error(GL_NO_ERROR)); } if (!mDynamicHLSL->generateShaderLinkHLSL(data, mState, metadata, varyingPacking, &mPixelHLSL, &mVertexHLSL)) { - return false; + return LinkResult(false, gl::Error(GL_NO_ERROR)); } mUsesPointSize = vertexShaderD3D->usesPointSize(); @@ -1413,12 +1433,7 @@ LinkResult ProgramD3D::link(const gl::ContextState &data, gl::InfoLog &infoLog) gatherTransformFeedbackVaryings(varyingPacking); LinkResult result = compileProgramExecutables(data, infoLog); - if (result.isError()) - { - infoLog << result.getError().getMessage(); - return result; - } - else if (!result.getResult()) + if (result.error.isError() || !result.linkSuccess) { infoLog << "Failed to create D3D shaders."; return result; @@ -1426,7 +1441,7 @@ LinkResult ProgramD3D::link(const gl::ContextState &data, gl::InfoLog &infoLog) initUniformBlockInfo(); - return true; + return LinkResult(true, gl::Error(GL_NO_ERROR)); } GLboolean ProgramD3D::validate(const gl::Caps & /*caps*/, gl::InfoLog * /*infoLog*/) diff --git a/gfx/angle/src/libANGLE/renderer/d3d/RendererD3D.h b/gfx/angle/src/libANGLE/renderer/d3d/RendererD3D.h index b63aba8a9..9378b68b3 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/RendererD3D.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/RendererD3D.h @@ -127,17 +127,9 @@ class RendererD3D : public BufferFactoryD3D virtual SwapChainD3D *createSwapChain(NativeWindowD3D *nativeWindow, HANDLE shareHandle, - IUnknown *d3dTexture, GLenum backBufferFormat, GLenum depthBufferFormat, EGLint orientation) = 0; - virtual egl::Error getD3DTextureInfo(IUnknown *d3dTexture, - EGLint *width, - EGLint *height, - GLenum *fboFormat) const = 0; - virtual egl::Error validateShareHandle(const egl::Config *config, - HANDLE shareHandle, - const egl::AttributeMap &attribs) const = 0; virtual gl::Error setSamplerState(gl::SamplerType type, int index, gl::Texture *texture, const gl::SamplerState &sampler) = 0; virtual gl::Error setTexture(gl::SamplerType type, int index, gl::Texture *texture) = 0; @@ -177,10 +169,6 @@ class RendererD3D : public BufferFactoryD3D bool unpackFlipY, bool unpackPremultiplyAlpha, bool unpackUnmultiplyAlpha) = 0; - virtual gl::Error copyCompressedTexture(const gl::Texture *source, - GLint sourceLevel, - TextureStorage *storage, - GLint destLevel) = 0; // RenderTarget creation virtual gl::Error createRenderTarget(int width, int height, GLenum format, GLsizei samples, RenderTargetD3D **outRT) = 0; diff --git a/gfx/angle/src/libANGLE/renderer/d3d/ShaderD3D.cpp b/gfx/angle/src/libANGLE/renderer/d3d/ShaderD3D.cpp index fd7b13abb..326c198d7 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/ShaderD3D.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/ShaderD3D.cpp @@ -59,14 +59,6 @@ ShaderD3D::ShaderD3D(const gl::ShaderState &data, const WorkaroundsD3D &workarou { mAdditionalOptions |= SH_REWRITE_TEXELFETCHOFFSET_TO_TEXELFETCH; } - if (workarounds.rewriteUnaryMinusOperator) - { - mAdditionalOptions |= SH_REWRITE_INTEGER_UNARY_MINUS_OPERATOR; - } - if (workarounds.emulateIsnanFloat) - { - mAdditionalOptions |= SH_EMULATE_ISNAN_FLOAT_FUNCTION; - } } ShaderD3D::~ShaderD3D() @@ -141,12 +133,12 @@ ShShaderOutput ShaderD3D::getCompilerOutputType() const return mCompilerOutputType; } -ShCompileOptions ShaderD3D::prepareSourceAndReturnOptions(std::stringstream *shaderSourceStream, - std::string *sourcePath) +int ShaderD3D::prepareSourceAndReturnOptions(std::stringstream *shaderSourceStream, + std::string *sourcePath) { uncompile(); - ShCompileOptions additionalOptions = 0; + int additionalOptions = 0; const std::string &source = mData.getSource(); @@ -201,7 +193,7 @@ bool ShaderD3D::postTranslateCompile(gl::Compiler *compiler, std::string *infoLo ShHandle compilerHandle = compiler->getCompilerHandle(mData.getShaderType()); - mUniformRegisterMap = GetUniformRegisterMap(sh::GetUniformRegisterMap(compilerHandle)); + mUniformRegisterMap = GetUniformRegisterMap(ShGetUniformRegisterMap(compilerHandle)); for (const sh::InterfaceBlock &interfaceBlock : mData.getInterfaceBlocks()) { @@ -209,7 +201,8 @@ bool ShaderD3D::postTranslateCompile(gl::Compiler *compiler, std::string *infoLo { unsigned int index = static_cast(-1); bool blockRegisterResult = - sh::GetInterfaceBlockRegister(compilerHandle, interfaceBlock.name, &index); + ShGetInterfaceBlockRegister(compilerHandle, interfaceBlock.name, &index); + UNUSED_ASSERTION_VARIABLE(blockRegisterResult); ASSERT(blockRegisterResult); mInterfaceBlockRegisterMap[interfaceBlock.name] = index; diff --git a/gfx/angle/src/libANGLE/renderer/d3d/ShaderD3D.h b/gfx/angle/src/libANGLE/renderer/d3d/ShaderD3D.h index 587c12173..bf6215872 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/ShaderD3D.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/ShaderD3D.h @@ -28,8 +28,8 @@ class ShaderD3D : public ShaderImpl virtual ~ShaderD3D(); // ShaderImpl implementation - ShCompileOptions prepareSourceAndReturnOptions(std::stringstream *sourceStream, - std::string *sourcePath) override; + int prepareSourceAndReturnOptions(std::stringstream *sourceStream, + std::string *sourcePath) override; bool postTranslateCompile(gl::Compiler *compiler, std::string *infoLog) override; std::string getDebugInfo() const override; @@ -77,7 +77,7 @@ class ShaderD3D : public ShaderImpl mutable std::string mDebugInfo; std::map mUniformRegisterMap; std::map mInterfaceBlockRegisterMap; - ShCompileOptions mAdditionalOptions; + int mAdditionalOptions; }; } // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp b/gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp index 8696ab0d7..3c02c4a68 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp @@ -26,8 +26,7 @@ SurfaceD3D::SurfaceD3D(const egl::SurfaceState &state, egl::Display *display, const egl::Config *config, EGLNativeWindowType window, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) : SurfaceImpl(state), mRenderer(renderer), @@ -42,39 +41,19 @@ SurfaceD3D::SurfaceD3D(const egl::SurfaceState &state, mWidth(static_cast(attribs.get(EGL_WIDTH, 0))), mHeight(static_cast(attribs.get(EGL_HEIGHT, 0))), mSwapInterval(1), - mShareHandle(0), - mD3DTexture(nullptr) + mShareHandle(reinterpret_cast(shareHandle)) { if (window != nullptr && !mFixedSize) { mWidth = -1; mHeight = -1; } - - switch (buftype) - { - case EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE: - mShareHandle = static_cast(clientBuffer); - break; - - case EGL_D3D_TEXTURE_ANGLE: - mD3DTexture = static_cast(clientBuffer); - ASSERT(mD3DTexture != nullptr); - mD3DTexture->AddRef(); - mRenderer->getD3DTextureInfo(mD3DTexture, &mWidth, &mHeight, &mRenderTargetFormat); - mDepthStencilFormat = GL_NONE; - break; - - default: - break; - } } SurfaceD3D::~SurfaceD3D() { releaseSwapChain(); SafeDelete(mNativeWindow); - SafeRelease(mD3DTexture); } void SurfaceD3D::releaseSwapChain() @@ -143,8 +122,8 @@ egl::Error SurfaceD3D::resetSwapChain() height = mHeight; } - mSwapChain = mRenderer->createSwapChain(mNativeWindow, mShareHandle, mD3DTexture, - mRenderTargetFormat, mDepthStencilFormat, mOrientation); + mSwapChain = mRenderer->createSwapChain(mNativeWindow, mShareHandle, mRenderTargetFormat, + mDepthStencilFormat, mOrientation); if (!mSwapChain) { return egl::Error(EGL_BAD_ALLOC); @@ -362,14 +341,7 @@ WindowSurfaceD3D::WindowSurfaceD3D(const egl::SurfaceState &state, const egl::Config *config, EGLNativeWindowType window, const egl::AttributeMap &attribs) - : SurfaceD3D(state, - renderer, - display, - config, - window, - 0, - static_cast(0), - attribs) + : SurfaceD3D(state, renderer, display, config, window, static_cast(0), attribs) { } @@ -381,16 +353,14 @@ PbufferSurfaceD3D::PbufferSurfaceD3D(const egl::SurfaceState &state, RendererD3D *renderer, egl::Display *display, const egl::Config *config, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) : SurfaceD3D(state, renderer, display, config, static_cast(0), - buftype, - clientBuffer, + shareHandle, attribs) { } diff --git a/gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h b/gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h index 768c60bd0..614b8f979 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h @@ -61,8 +61,7 @@ class SurfaceD3D : public SurfaceImpl egl::Display *display, const egl::Config *config, EGLNativeWindowType window, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs); egl::Error swapRect(EGLint x, EGLint y, EGLint width, EGLint height); @@ -88,7 +87,6 @@ class SurfaceD3D : public SurfaceImpl EGLint mSwapInterval; HANDLE mShareHandle; - IUnknown *mD3DTexture; }; class WindowSurfaceD3D : public SurfaceD3D @@ -110,8 +108,7 @@ class PbufferSurfaceD3D : public SurfaceD3D RendererD3D *renderer, egl::Display *display, const egl::Config *config, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs); ~PbufferSurfaceD3D() override; }; diff --git a/gfx/angle/src/libANGLE/renderer/d3d/SwapChainD3D.cpp b/gfx/angle/src/libANGLE/renderer/d3d/SwapChainD3D.cpp deleted file mode 100644 index de8534c3d..000000000 --- a/gfx/angle/src/libANGLE/renderer/d3d/SwapChainD3D.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright (c) 2016 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. -// - -// SwapChainD3D.cpp: Defines a back-end specific class that hides the details of the -// implementation-specific swapchain. - -#include "libANGLE/renderer/d3d/SwapChainD3D.h" - -namespace rx -{ - -SwapChainD3D::SwapChainD3D(HANDLE shareHandle, - IUnknown *d3dTexture, - GLenum backBufferFormat, - GLenum depthBufferFormat) - : mOffscreenRenderTargetFormat(backBufferFormat), - mDepthBufferFormat(depthBufferFormat), - mShareHandle(shareHandle), - mD3DTexture(d3dTexture) -{ - if (mD3DTexture) - { - mD3DTexture->AddRef(); - } -} - -SwapChainD3D::~SwapChainD3D() -{ - SafeRelease(mD3DTexture); -} -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/d3d/SwapChainD3D.h b/gfx/angle/src/libANGLE/renderer/d3d/SwapChainD3D.h index f49204527..992c68bc5 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/SwapChainD3D.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/SwapChainD3D.h @@ -27,11 +27,14 @@ class RenderTargetD3D; class SwapChainD3D : angle::NonCopyable { public: - SwapChainD3D(HANDLE shareHandle, - IUnknown *d3dTexture, - GLenum backBufferFormat, - GLenum depthBufferFormat); - virtual ~SwapChainD3D(); + SwapChainD3D(HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat) + : mOffscreenRenderTargetFormat(backBufferFormat), + mDepthBufferFormat(depthBufferFormat), + mShareHandle(shareHandle) + { + } + + virtual ~SwapChainD3D() {}; virtual EGLint resize(EGLint backbufferWidth, EGLint backbufferSize) = 0; virtual EGLint reset(EGLint backbufferWidth, EGLint backbufferHeight, EGLint swapInterval) = 0; @@ -52,8 +55,7 @@ class SwapChainD3D : angle::NonCopyable const GLenum mDepthBufferFormat; HANDLE mShareHandle; - IUnknown *mD3DTexture; }; -} // namespace rx +} #endif // LIBANGLE_RENDERER_D3D_SWAPCHAIND3D_H_ diff --git a/gfx/angle/src/libANGLE/renderer/d3d/TextureD3D.cpp b/gfx/angle/src/libANGLE/renderer/d3d/TextureD3D.cpp index 287700264..96e8e20ff 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/TextureD3D.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/TextureD3D.cpp @@ -46,7 +46,12 @@ gl::Error GetUnpackPointer(const gl::PixelUnpackState &unpack, const uint8_t *pi BufferD3D *bufferD3D = GetImplAs(pixelBuffer); ASSERT(bufferD3D); const uint8_t *bufferData = NULL; - ANGLE_TRY(bufferD3D->getData(&bufferData)); + gl::Error error = bufferD3D->getData(&bufferData); + if (error.isError()) + { + return error; + } + *pointerOut = bufferData + offset; } else @@ -87,17 +92,25 @@ TextureD3D::~TextureD3D() gl::Error TextureD3D::getNativeTexture(TextureStorage **outStorage) { // ensure the underlying texture is created - ANGLE_TRY(initializeStorage(false)); + gl::Error error = initializeStorage(false); + if (error.isError()) + { + return error; + } if (mTexStorage) { - ANGLE_TRY(updateStorage()); + error = updateStorage(); + if (error.isError()) + { + return error; + } } ASSERT(outStorage); *outStorage = mTexStorage; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } GLint TextureD3D::getLevelZeroWidth() const @@ -182,24 +195,33 @@ gl::Error TextureD3D::setImageImpl(const gl::ImageIndex &index, // We no longer need the "GLenum format" parameter to TexImage to determine what data format "pixels" contains. // From our image internal format we know how many channels to expect, and "type" gives the format of pixel's components. const uint8_t *pixelData = NULL; - ANGLE_TRY(GetUnpackPointer(unpack, pixels, layerOffset, &pixelData)); + gl::Error error = GetUnpackPointer(unpack, pixels, layerOffset, &pixelData); + if (error.isError()) + { + return error; + } if (pixelData != nullptr) { if (shouldUseSetData(image)) { - ANGLE_TRY(mTexStorage->setData(index, image, NULL, type, unpack, pixelData)); + error = mTexStorage->setData(index, image, NULL, type, unpack, pixelData); } else { gl::Box fullImageArea(0, 0, 0, image->getWidth(), image->getHeight(), image->getDepth()); - ANGLE_TRY(image->loadData(fullImageArea, unpack, type, pixelData, index.is3D())); + error = image->loadData(fullImageArea, unpack, type, pixelData, index.is3D()); + } + + if (error.isError()) + { + return error; } mDirtyImages = true; } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureD3D::subImage(const gl::ImageIndex &index, const gl::Box &area, GLenum format, GLenum type, @@ -207,7 +229,11 @@ gl::Error TextureD3D::subImage(const gl::ImageIndex &index, const gl::Box &area, { // CPU readback & copy where direct GPU copy is not supported const uint8_t *pixelData = NULL; - ANGLE_TRY(GetUnpackPointer(unpack, pixels, layerOffset, &pixelData)); + gl::Error error = GetUnpackPointer(unpack, pixels, layerOffset, &pixelData); + if (error.isError()) + { + return error; + } if (pixelData != NULL) { @@ -219,8 +245,18 @@ gl::Error TextureD3D::subImage(const gl::ImageIndex &index, const gl::Box &area, return mTexStorage->setData(index, image, &area, type, unpack, pixelData); } - ANGLE_TRY(image->loadData(area, unpack, type, pixelData, index.is3D())); - ANGLE_TRY(commitRegion(index, area)); + error = image->loadData(area, unpack, type, pixelData, index.is3D()); + if (error.isError()) + { + return error; + } + + error = commitRegion(index, area); + if (error.isError()) + { + return error; + } + mDirtyImages = true; } @@ -243,12 +279,20 @@ gl::Error TextureD3D::setCompressedImageImpl(const gl::ImageIndex &index, // We no longer need the "GLenum format" parameter to TexImage to determine what data format "pixels" contains. // From our image internal format we know how many channels to expect, and "type" gives the format of pixel's components. const uint8_t *pixelData = NULL; - ANGLE_TRY(GetUnpackPointer(unpack, pixels, layerOffset, &pixelData)); + gl::Error error = GetUnpackPointer(unpack, pixels, layerOffset, &pixelData); + if (error.isError()) + { + return error; + } if (pixelData != NULL) { gl::Box fullImageArea(0, 0, 0, image->getWidth(), image->getHeight(), image->getDepth()); - ANGLE_TRY(image->loadCompressedData(fullImageArea, pixelData)); + error = image->loadCompressedData(fullImageArea, pixelData); + if (error.isError()) + { + return error; + } mDirtyImages = true; } @@ -261,14 +305,22 @@ gl::Error TextureD3D::subImageCompressed(const gl::ImageIndex &index, const gl:: ptrdiff_t layerOffset) { const uint8_t *pixelData = NULL; - ANGLE_TRY(GetUnpackPointer(unpack, pixels, layerOffset, &pixelData)); + gl::Error error = GetUnpackPointer(unpack, pixels, layerOffset, &pixelData); + if (error.isError()) + { + return error; + } if (pixelData != NULL) { ImageD3D *image = getImage(index); ASSERT(image); - ANGLE_TRY(image->loadCompressedData(area, pixelData)); + error = image->loadCompressedData(area, pixelData); + if (error.isError()) + { + return error; + } mDirtyImages = true; } @@ -305,11 +357,13 @@ gl::Error TextureD3D::fastUnpackPixels(const gl::PixelUnpackState &unpack, const uintptr_t offset = reinterpret_cast(pixels); - ANGLE_TRY(mRenderer->fastCopyBufferToTexture(unpack, static_cast(offset), - destRenderTarget, sizedInternalFormat, type, - destArea)); + gl::Error error = mRenderer->fastCopyBufferToTexture(unpack, static_cast(offset), destRenderTarget, sizedInternalFormat, type, destArea); + if (error.isError()) + { + return error; + } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } GLint TextureD3D::creationLevels(GLsizei width, GLsizei height, GLsizei depth) const @@ -356,13 +410,23 @@ gl::Error TextureD3D::generateMipmap() const GLuint baseLevel = mState.getEffectiveBaseLevel(); const GLuint maxLevel = mState.getMipmapMaxLevel(); ASSERT(maxLevel > baseLevel); // Should be checked before calling this. + UNUSED_ASSERTION_VARIABLE(baseLevel); if (mTexStorage && mRenderer->getWorkarounds().zeroMaxLodWorkaround) { // Switch to using the mipmapped texture. TextureStorage *textureStorage = NULL; - ANGLE_TRY(getNativeTexture(&textureStorage)); - ANGLE_TRY(textureStorage->useLevelZeroWorkaroundTexture(false)); + gl::Error error = getNativeTexture(&textureStorage); + if (error.isError()) + { + return error; + } + + error = textureStorage->useLevelZeroWorkaroundTexture(false); + if (error.isError()) + { + return error; + } } // Set up proper mipmap chain in our Image array. @@ -370,15 +434,27 @@ gl::Error TextureD3D::generateMipmap() if (mTexStorage && mTexStorage->supportsNativeMipmapFunction()) { - ANGLE_TRY(updateStorage()); + gl::Error error = updateStorage(); + if (error.isError()) + { + return error; + } // Generate the mipmap chain using the ad-hoc DirectX function. - ANGLE_TRY(mRenderer->generateMipmapUsingD3D(mTexStorage, mState)); + error = mRenderer->generateMipmapUsingD3D(mTexStorage, mState); + if (error.isError()) + { + return error; + } } else { // Generate the mipmap chain, one level at a time. - ANGLE_TRY(generateMipmapUsingImages(maxLevel)); + gl::Error error = generateMipmapUsingImages(maxLevel); + if (error.isError()) + { + return error; + } } return gl::Error(GL_NO_ERROR); @@ -402,12 +478,20 @@ gl::Error TextureD3D::generateMipmapUsingImages(const GLuint maxLevel) gl::ImageIndex srcIndex = getImageIndex(mBaseLevel, layer); ImageD3D *image = getImage(srcIndex); - ANGLE_TRY(image->copyFromTexStorage(srcIndex, mTexStorage)); + gl::Error error = image->copyFromTexStorage(srcIndex, mTexStorage); + if (error.isError()) + { + return error; + } } } else { - ANGLE_TRY(updateStorage()); + gl::Error error = updateStorage(); + if (error.isError()) + { + return error; + } } } @@ -430,12 +514,20 @@ gl::Error TextureD3D::generateMipmapUsingImages(const GLuint maxLevel) if (renderableStorage) { // GPU-side mipmapping - ANGLE_TRY(mTexStorage->generateMipmap(sourceIndex, destIndex)); + gl::Error error = mTexStorage->generateMipmap(sourceIndex, destIndex); + if (error.isError()) + { + return error; + } } else { // CPU-side mipmapping - ANGLE_TRY(mRenderer->generateMipmap(getImage(destIndex), getImage(sourceIndex))); + gl::Error error = mRenderer->generateMipmap(getImage(destIndex), getImage(sourceIndex)); + if (error.isError()) + { + return error; + } } } } @@ -445,7 +537,7 @@ gl::Error TextureD3D::generateMipmapUsingImages(const GLuint maxLevel) updateStorage(); } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } bool TextureD3D::isBaseImageZeroSize() const @@ -477,7 +569,11 @@ bool TextureD3D::isBaseImageZeroSize() const gl::Error TextureD3D::ensureRenderTarget() { - ANGLE_TRY(initializeStorage(true)); + gl::Error error = initializeStorage(true); + if (error.isError()) + { + return error; + } if (!isBaseImageZeroSize()) { @@ -485,9 +581,13 @@ gl::Error TextureD3D::ensureRenderTarget() if (!mTexStorage->isRenderTarget()) { TextureStorage *newRenderTargetStorage = NULL; - ANGLE_TRY(createCompleteStorage(true, &newRenderTargetStorage)); + error = createCompleteStorage(true, &newRenderTargetStorage); + if (error.isError()) + { + return error; + } - gl::Error error = mTexStorage->copyToStorage(newRenderTargetStorage); + error = mTexStorage->copyToStorage(newRenderTargetStorage); if (error.isError()) { SafeDelete(newRenderTargetStorage); @@ -503,7 +603,7 @@ gl::Error TextureD3D::ensureRenderTarget() } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } bool TextureD3D::canCreateRenderTargetForImage(const gl::ImageIndex &index) const @@ -519,11 +619,16 @@ gl::Error TextureD3D::commitRegion(const gl::ImageIndex &index, const gl::Box &r { ASSERT(isValidIndex(index)); ImageD3D *image = getImage(index); - ANGLE_TRY(image->copyToStorage(mTexStorage, index, region)); + gl::Error error = image->copyToStorage(mTexStorage, index, region); + if (error.isError()) + { + return error; + } + image->markClean(); } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureD3D::getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target, @@ -558,11 +663,6 @@ void TextureD3D::setBaseLevel(GLuint baseLevel) } } -void TextureD3D::syncState(const gl::Texture::DirtyBits &dirtyBits) -{ - // TODO(geofflang): Use dirty bits -} - TextureD3D_2D::TextureD3D_2D(const gl::TextureState &state, RendererD3D *renderer) : TextureD3D(state, renderer) { @@ -679,7 +779,7 @@ gl::Error TextureD3D_2D::setImage(GLenum target, ANGLE_TRY(setImageImpl(index, type, unpack, pixels, 0)); } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureD3D_2D::setSubImage(GLenum target, @@ -868,26 +968,6 @@ gl::Error TextureD3D_2D::copySubTexture(const gl::Offset &destOffset, return gl::NoError(); } -gl::Error TextureD3D_2D::copyCompressedTexture(const gl::Texture *source) -{ - GLenum sourceTarget = source->getTarget(); - GLint sourceLevel = 0; - - GLint destLevel = 0; - - GLenum sizedInternalFormat = source->getFormat(sourceTarget, sourceLevel).asSized(); - gl::Extents size(static_cast(source->getWidth(sourceTarget, sourceLevel)), - static_cast(source->getHeight(sourceTarget, sourceLevel)), 1); - redefineImage(destLevel, sizedInternalFormat, size, false); - - ANGLE_TRY(initializeStorage(false)); - ASSERT(mTexStorage); - - ANGLE_TRY(mRenderer->copyCompressedTexture(source, sourceLevel, mTexStorage, destLevel)); - - return gl::NoError(); -} - gl::Error TextureD3D_2D::setStorage(GLenum target, size_t levels, GLenum internalFormat, const gl::Extents &size) { ASSERT(GL_TEXTURE_2D && size.depth == 1); @@ -917,11 +997,16 @@ gl::Error TextureD3D_2D::setStorage(GLenum target, size_t levels, GLenum interna return error; } - ANGLE_TRY(updateStorage()); + error = updateStorage(); + + if (error.isError()) + { + return error; + } mImmutable = true; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } void TextureD3D_2D::bindTexImage(egl::Surface *surface) @@ -1006,8 +1091,17 @@ gl::Error TextureD3D_2D::getRenderTarget(const gl::ImageIndex &index, RenderTarg ASSERT(!index.hasLayer()); // ensure the underlying texture is created - ANGLE_TRY(ensureRenderTarget()); - ANGLE_TRY(updateStorageLevel(index.mipIndex)); + gl::Error error = ensureRenderTarget(); + if (error.isError()) + { + return error; + } + + error = updateStorageLevel(index.mipIndex); + if (error.isError()) + { + return error; + } return mTexStorage->getRenderTarget(index, outRT); } @@ -1082,9 +1176,13 @@ gl::Error TextureD3D_2D::initializeStorage(bool renderTarget) bool createRenderTarget = (renderTarget || IsRenderTargetUsage(mState.getUsage())); TextureStorage *storage = NULL; - ANGLE_TRY(createCompleteStorage(createRenderTarget, &storage)); + gl::Error error = createCompleteStorage(createRenderTarget, &storage); + if (error.isError()) + { + return error; + } - gl::Error error = setCompleteTexStorage(storage); + error = setCompleteTexStorage(storage); if (error.isError()) { SafeDelete(storage); @@ -1094,7 +1192,11 @@ gl::Error TextureD3D_2D::initializeStorage(bool renderTarget) ASSERT(mTexStorage); // flush image data to the storage - ANGLE_TRY(updateStorage()); + error = updateStorage(); + if (error.isError()) + { + return error; + } return gl::Error(GL_NO_ERROR); } @@ -1134,7 +1236,11 @@ gl::Error TextureD3D_2D::setCompleteTexStorage(TextureStorage *newCompleteTexSto { for (int level = 0; level < newCompleteTexStorage->getLevelCount(); level++) { - ANGLE_TRY(mImageArray[level]->setManagedSurface2D(newCompleteTexStorage, level)); + gl::Error error = mImageArray[level]->setManagedSurface2D(newCompleteTexStorage, level); + if (error.isError()) + { + return error; + } } } @@ -1143,7 +1249,7 @@ gl::Error TextureD3D_2D::setCompleteTexStorage(TextureStorage *newCompleteTexSto mDirtyImages = true; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureD3D_2D::updateStorage() @@ -1154,11 +1260,15 @@ gl::Error TextureD3D_2D::updateStorage() { if (mImageArray[level]->isDirty() && isLevelComplete(level)) { - ANGLE_TRY(updateStorageLevel(level)); + gl::Error error = updateStorageLevel(level); + if (error.isError()) + { + return error; + } } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureD3D_2D::updateStorageLevel(int level) @@ -1170,10 +1280,14 @@ gl::Error TextureD3D_2D::updateStorageLevel(int level) { gl::ImageIndex index = gl::ImageIndex::Make2D(level); gl::Box region(0, 0, 0, getWidth(level), getHeight(level), 1); - ANGLE_TRY(commitRegion(index, region)); + gl::Error error = commitRegion(index, region); + if (error.isError()) + { + return error; + } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } void TextureD3D_2D::redefineImage(size_t level, @@ -1352,7 +1466,12 @@ gl::Error TextureD3D_Cube::setCompressedSubImage(GLenum target, size_t level, co gl::ImageIndex index = gl::ImageIndex::MakeCube(target, static_cast(level)); - ANGLE_TRY(TextureD3D::subImageCompressed(index, area, format, unpack, pixels, 0)); + gl::Error error = TextureD3D::subImageCompressed(index, area, format, unpack, pixels, 0); + if (error.isError()) + { + return error; + } + return commitRegion(index, area); } @@ -1377,21 +1496,34 @@ gl::Error TextureD3D_Cube::copyImage(GLenum target, // so we should use the non-rendering copy path. if (!canCreateRenderTargetForImage(index) || mRenderer->getWorkarounds().zeroMaxLodWorkaround) { - ANGLE_TRY( - mImageArray[faceIndex][level]->copyFromFramebuffer(destOffset, sourceArea, source)); + gl::Error error = + mImageArray[faceIndex][level]->copyFromFramebuffer(destOffset, sourceArea, source); + if (error.isError()) + { + return error; + } + mDirtyImages = true; } else { - ANGLE_TRY(ensureRenderTarget()); + gl::Error error = ensureRenderTarget(); + if (error.isError()) + { + return error; + } + mImageArray[faceIndex][level]->markClean(); ASSERT(size.width == size.height); if (size.width > 0 && isValidFaceLevel(faceIndex, level)) { - ANGLE_TRY(mRenderer->copyImageCube(source, sourceArea, internalFormat, destOffset, - mTexStorage, target, level)); + error = mRenderer->copyImageCube(source, sourceArea, internalFormat, destOffset, mTexStorage, target, level); + if (error.isError()) + { + return error; + } } } @@ -1424,13 +1556,26 @@ gl::Error TextureD3D_Cube::copySubImage(GLenum target, } else { - ANGLE_TRY(ensureRenderTarget()); + gl::Error error = ensureRenderTarget(); + if (error.isError()) + { + return error; + } + if (isValidFaceLevel(faceIndex, level)) { - ANGLE_TRY(updateStorageFaceLevel(faceIndex, level)); - ANGLE_TRY(mRenderer->copyImageCube( - source, sourceArea, gl::GetInternalFormatInfo(getBaseLevelInternalFormat()).format, - destOffset, mTexStorage, target, level)); + error = updateStorageFaceLevel(faceIndex, level); + if (error.isError()) + { + return error; + } + + error = mRenderer->copyImageCube(source, sourceArea, gl::GetInternalFormatInfo(getBaseLevelInternalFormat()).format, + destOffset, mTexStorage, target, level); + if (error.isError()) + { + return error; + } } } @@ -1472,11 +1617,16 @@ gl::Error TextureD3D_Cube::setStorage(GLenum target, size_t levels, GLenum inter return error; } - ANGLE_TRY(updateStorage()); + error = updateStorage(); + + if (error.isError()) + { + return error; + } mImmutable = true; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } // Tests for cube texture completeness. [OpenGL ES 2.0.24] section 3.7.10 page 81. @@ -1539,8 +1689,17 @@ gl::Error TextureD3D_Cube::getRenderTarget(const gl::ImageIndex &index, RenderTa ASSERT(gl::IsCubeMapTextureTarget(index.type)); // ensure the underlying texture is created - ANGLE_TRY(ensureRenderTarget()); - ANGLE_TRY(updateStorageFaceLevel(index.layerIndex, index.mipIndex)); + gl::Error error = ensureRenderTarget(); + if (error.isError()) + { + return error; + } + + error = updateStorageFaceLevel(index.layerIndex, index.mipIndex); + if (error.isError()) + { + return error; + } return mTexStorage->getRenderTarget(index, outRT); } @@ -1550,21 +1709,25 @@ gl::Error TextureD3D_Cube::initializeStorage(bool renderTarget) // Only initialize the first time this texture is used as a render target or shader resource if (mTexStorage) { - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } // do not attempt to create storage for nonexistant data if (!isFaceLevelComplete(0, getBaseLevel())) { - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } bool createRenderTarget = (renderTarget || IsRenderTargetUsage(mState.getUsage())); TextureStorage *storage = NULL; - ANGLE_TRY(createCompleteStorage(createRenderTarget, &storage)); + gl::Error error = createCompleteStorage(createRenderTarget, &storage); + if (error.isError()) + { + return error; + } - gl::Error error = setCompleteTexStorage(storage); + error = setCompleteTexStorage(storage); if (error.isError()) { SafeDelete(storage); @@ -1574,9 +1737,13 @@ gl::Error TextureD3D_Cube::initializeStorage(bool renderTarget) ASSERT(mTexStorage); // flush image data to the storage - ANGLE_TRY(updateStorage()); + error = updateStorage(); + if (error.isError()) + { + return error; + } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureD3D_Cube::createCompleteStorage(bool renderTarget, TextureStorage **outTexStorage) const @@ -1617,8 +1784,11 @@ gl::Error TextureD3D_Cube::setCompleteTexStorage(TextureStorage *newCompleteTexS { for (int level = 0; level < newCompleteTexStorage->getLevelCount(); level++) { - ANGLE_TRY(mImageArray[faceIndex][level]->setManagedSurfaceCube( - newCompleteTexStorage, faceIndex, level)); + gl::Error error = mImageArray[faceIndex][level]->setManagedSurfaceCube(newCompleteTexStorage, faceIndex, level); + if (error.isError()) + { + return error; + } } } } @@ -1640,12 +1810,16 @@ gl::Error TextureD3D_Cube::updateStorage() { if (mImageArray[face][level]->isDirty() && isFaceLevelComplete(face, level)) { - ANGLE_TRY(updateStorageFaceLevel(face, level)); + gl::Error error = updateStorageFaceLevel(face, level); + if (error.isError()) + { + return error; + } } } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } bool TextureD3D_Cube::isValidFaceLevel(int faceIndex, int level) const @@ -1713,10 +1887,14 @@ gl::Error TextureD3D_Cube::updateStorageFaceLevel(int faceIndex, int level) GLenum faceTarget = gl::LayerIndexToCubeMapTextureTarget(faceIndex); gl::ImageIndex index = gl::ImageIndex::MakeCube(faceTarget, level); gl::Box region(0, 0, 0, image->getWidth(), image->getHeight(), 1); - ANGLE_TRY(commitRegion(index, region)); + gl::Error error = commitRegion(index, region); + if (error.isError()) + { + return error; + } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } void TextureD3D_Cube::redefineImage(int faceIndex, GLint level, GLenum internalformat, const gl::Extents &size) @@ -1882,12 +2060,19 @@ gl::Error TextureD3D_3D::setImage(GLenum target, { // Will try to create RT storage if it does not exist RenderTargetD3D *destRenderTarget = NULL; - ANGLE_TRY(getRenderTarget(index, &destRenderTarget)); + gl::Error error = getRenderTarget(index, &destRenderTarget); + if (error.isError()) + { + return error; + } gl::Box destArea(0, 0, 0, getWidth(level), getHeight(level), getDepth(level)); - ANGLE_TRY(fastUnpackPixels(unpack, pixels, destArea, sizedInternalFormat, type, - destRenderTarget)); + error = fastUnpackPixels(unpack, pixels, destArea, sizedInternalFormat, type, destRenderTarget); + if (error.isError()) + { + return error; + } // Ensure we don't overwrite our newly initialized data mImageArray[level]->markClean(); @@ -1897,7 +2082,11 @@ gl::Error TextureD3D_3D::setImage(GLenum target, if (!fastUnpacked) { - ANGLE_TRY(setImageImpl(index, type, unpack, pixels, 0)); + gl::Error error = setImageImpl(index, type, unpack, pixels, 0); + if (error.isError()) + { + return error; + } } return gl::Error(GL_NO_ERROR); @@ -1920,7 +2109,12 @@ gl::Error TextureD3D_3D::setSubImage(GLenum target, if (isFastUnpackable(unpack, getInternalFormat(level)) && isLevelComplete(level)) { RenderTargetD3D *destRenderTarget = NULL; - ANGLE_TRY(getRenderTarget(index, &destRenderTarget)); + gl::Error error = getRenderTarget(index, &destRenderTarget); + if (error.isError()) + { + return error; + } + ASSERT(!mImageArray[level]->isDirty()); return fastUnpackPixels(unpack, pixels, area, getInternalFormat(level), type, destRenderTarget); @@ -1955,7 +2149,12 @@ gl::Error TextureD3D_3D::setCompressedSubImage(GLenum target, size_t level, cons ASSERT(target == GL_TEXTURE_3D); gl::ImageIndex index = gl::ImageIndex::Make3D(static_cast(level)); - ANGLE_TRY(TextureD3D::subImageCompressed(index, area, format, unpack, pixels, 0)); + gl::Error error = TextureD3D::subImageCompressed(index, area, format, unpack, pixels, 0); + if (error.isError()) + { + return error; + } + return commitRegion(index, area); } @@ -1979,18 +2178,37 @@ gl::Error TextureD3D_3D::copySubImage(GLenum target, if (canCreateRenderTargetForImage(index)) { - ANGLE_TRY(mImageArray[level]->copyFromFramebuffer(destOffset, sourceArea, source)); + gl::Error error = mImageArray[level]->copyFromFramebuffer(destOffset, sourceArea, source); + if (error.isError()) + { + return error; + } + mDirtyImages = true; } else { - ANGLE_TRY(ensureRenderTarget()); + gl::Error error = ensureRenderTarget(); + if (error.isError()) + { + return error; + } + if (isValidLevel(level)) { - ANGLE_TRY(updateStorageLevel(level)); - ANGLE_TRY(mRenderer->copyImage3D( - source, sourceArea, gl::GetInternalFormatInfo(getBaseLevelInternalFormat()).format, - destOffset, mTexStorage, level)); + error = updateStorageLevel(level); + if (error.isError()) + { + return error; + } + + error = mRenderer->copyImage3D(source, sourceArea, + gl::GetInternalFormatInfo(getBaseLevelInternalFormat()).format, + destOffset, mTexStorage, level); + if (error.isError()) + { + return error; + } } } @@ -2027,11 +2245,16 @@ gl::Error TextureD3D_3D::setStorage(GLenum target, size_t levels, GLenum interna return error; } - ANGLE_TRY(updateStorage()); + error = updateStorage(); + + if (error.isError()) + { + return error; + } mImmutable = true; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } void TextureD3D_3D::bindTexImage(egl::Surface *surface) @@ -2062,15 +2285,27 @@ void TextureD3D_3D::initMipmapImages() gl::Error TextureD3D_3D::getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT) { // ensure the underlying texture is created - ANGLE_TRY(ensureRenderTarget()); + gl::Error error = ensureRenderTarget(); + if (error.isError()) + { + return error; + } if (index.hasLayer()) { - ANGLE_TRY(updateStorage()); + error = updateStorage(); + if (error.isError()) + { + return error; + } } else { - ANGLE_TRY(updateStorageLevel(index.mipIndex)); + error = updateStorageLevel(index.mipIndex); + if (error.isError()) + { + return error; + } } return mTexStorage->getRenderTarget(index, outRT); @@ -2093,9 +2328,13 @@ gl::Error TextureD3D_3D::initializeStorage(bool renderTarget) bool createRenderTarget = (renderTarget || IsRenderTargetUsage(mState.getUsage())); TextureStorage *storage = NULL; - ANGLE_TRY(createCompleteStorage(createRenderTarget, &storage)); + gl::Error error = createCompleteStorage(createRenderTarget, &storage); + if (error.isError()) + { + return error; + } - gl::Error error = setCompleteTexStorage(storage); + error = setCompleteTexStorage(storage); if (error.isError()) { SafeDelete(storage); @@ -2105,9 +2344,13 @@ gl::Error TextureD3D_3D::initializeStorage(bool renderTarget) ASSERT(mTexStorage); // flush image data to the storage - ANGLE_TRY(updateStorage()); + error = updateStorage(); + if (error.isError()) + { + return error; + } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureD3D_3D::createCompleteStorage(bool renderTarget, TextureStorage **outStorage) const @@ -2137,7 +2380,7 @@ gl::Error TextureD3D_3D::setCompleteTexStorage(TextureStorage *newCompleteTexSto // We do not support managed 3D storage, as that is D3D9/ES2-only ASSERT(!mTexStorage->isManaged()); - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureD3D_3D::updateStorage() @@ -2148,11 +2391,15 @@ gl::Error TextureD3D_3D::updateStorage() { if (mImageArray[level]->isDirty() && isLevelComplete(level)) { - ANGLE_TRY(updateStorageLevel(level)); + gl::Error error = updateStorageLevel(level); + if (error.isError()) + { + return error; + } } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } bool TextureD3D_3D::isValidLevel(int level) const @@ -2222,10 +2469,14 @@ gl::Error TextureD3D_3D::updateStorageLevel(int level) { gl::ImageIndex index = gl::ImageIndex::Make3D(level); gl::Box region(0, 0, 0, getWidth(level), getHeight(level), getDepth(level)); - ANGLE_TRY(commitRegion(index, region)); + gl::Error error = commitRegion(index, region); + if (error.isError()) + { + return error; + } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } void TextureD3D_3D::redefineImage(GLint level, GLenum internalformat, const gl::Extents &size) @@ -2234,12 +2485,12 @@ void TextureD3D_3D::redefineImage(GLint level, GLenum internalformat, const gl:: const int storageWidth = std::max(1, getLevelZeroWidth() >> level); const int storageHeight = std::max(1, getLevelZeroHeight() >> level); const int storageDepth = std::max(1, getLevelZeroDepth() >> level); - const GLenum storageFormat = getBaseLevelInternalFormat(); mImageArray[level]->redefine(GL_TEXTURE_3D, internalformat, size, false); if (mTexStorage) { + const GLenum storageFormat = getBaseLevelInternalFormat(); const int storageLevels = mTexStorage->getLevelCount(); if ((level >= storageLevels && storageLevels != 0) || @@ -2366,25 +2617,29 @@ gl::Error TextureD3D_2DArray::setImage(GLenum target, { ASSERT(target == GL_TEXTURE_2D_ARRAY); - GLint level = static_cast(imageLevel); GLenum sizedInternalFormat = gl::GetSizedInternalFormat(internalFormat, type); + + GLint level = static_cast(imageLevel); redefineImage(level, sizedInternalFormat, size); - const auto sizedInputFormat = gl::GetSizedInternalFormat(format, type); - const gl::InternalFormat &inputFormat = gl::GetInternalFormatInfo(sizedInputFormat); - GLsizei inputDepthPitch = 0; - ANGLE_TRY_RESULT(inputFormat.computeDepthPitch(size.width, size.height, unpack.alignment, - unpack.rowLength, unpack.imageHeight), + const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(sizedInternalFormat); + GLsizei inputDepthPitch = 0; + ANGLE_TRY_RESULT(formatInfo.computeDepthPitch(type, size.width, size.height, unpack.alignment, + unpack.rowLength, unpack.imageHeight), inputDepthPitch); for (int i = 0; i < size.depth; i++) { const ptrdiff_t layerOffset = (inputDepthPitch * i); gl::ImageIndex index = gl::ImageIndex::Make2DArray(level, i); - ANGLE_TRY(setImageImpl(index, type, unpack, pixels, layerOffset)); + gl::Error error = setImageImpl(index, type, unpack, pixels, layerOffset); + if (error.isError()) + { + return error; + } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureD3D_2DArray::setSubImage(GLenum target, @@ -2396,12 +2651,11 @@ gl::Error TextureD3D_2DArray::setSubImage(GLenum target, const uint8_t *pixels) { ASSERT(target == GL_TEXTURE_2D_ARRAY); - GLint level = static_cast(imageLevel); - const auto sizedInputFormat = gl::GetSizedInternalFormat(format, type); - const gl::InternalFormat &inputFormat = gl::GetInternalFormatInfo(sizedInputFormat); - GLsizei inputDepthPitch = 0; - ANGLE_TRY_RESULT(inputFormat.computeDepthPitch(area.width, area.height, unpack.alignment, - unpack.rowLength, unpack.imageHeight), + GLint level = static_cast(imageLevel); + const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(getInternalFormat(level)); + GLsizei inputDepthPitch = 0; + ANGLE_TRY_RESULT(formatInfo.computeDepthPitch(type, area.width, area.height, unpack.alignment, + unpack.rowLength, unpack.imageHeight), inputDepthPitch); for (int i = 0; i < area.depth; i++) @@ -2412,11 +2666,14 @@ gl::Error TextureD3D_2DArray::setSubImage(GLenum target, gl::Box layerArea(area.x, area.y, 0, area.width, area.height, 1); gl::ImageIndex index = gl::ImageIndex::Make2DArray(level, layer); - ANGLE_TRY( - TextureD3D::subImage(index, layerArea, format, type, unpack, pixels, layerOffset)); + gl::Error error = TextureD3D::subImage(index, layerArea, format, type, unpack, pixels, layerOffset); + if (error.isError()) + { + return error; + } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureD3D_2DArray::setCompressedImage(GLenum target, @@ -2436,7 +2693,7 @@ gl::Error TextureD3D_2DArray::setCompressedImage(GLenum target, const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(internalFormat); GLsizei inputDepthPitch = 0; ANGLE_TRY_RESULT( - formatInfo.computeDepthPitch(size.width, size.height, 1, 0, 0), + formatInfo.computeDepthPitch(GL_UNSIGNED_BYTE, size.width, size.height, 1, 0, 0), inputDepthPitch); for (int i = 0; i < size.depth; i++) @@ -2444,10 +2701,14 @@ gl::Error TextureD3D_2DArray::setCompressedImage(GLenum target, const ptrdiff_t layerOffset = (inputDepthPitch * i); gl::ImageIndex index = gl::ImageIndex::Make2DArray(level, i); - ANGLE_TRY(setCompressedImageImpl(index, unpack, pixels, layerOffset)); + gl::Error error = setCompressedImageImpl(index, unpack, pixels, layerOffset); + if (error.isError()) + { + return error; + } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureD3D_2DArray::setCompressedSubImage(GLenum target, size_t level, const gl::Box &area, GLenum format, @@ -2458,7 +2719,7 @@ gl::Error TextureD3D_2DArray::setCompressedSubImage(GLenum target, size_t level, const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(format); GLsizei inputDepthPitch = 0; ANGLE_TRY_RESULT( - formatInfo.computeDepthPitch(area.width, area.height, 1, 0, 0), + formatInfo.computeDepthPitch(GL_UNSIGNED_BYTE, area.width, area.height, 1, 0, 0), inputDepthPitch); for (int i = 0; i < area.depth; i++) @@ -2469,9 +2730,17 @@ gl::Error TextureD3D_2DArray::setCompressedSubImage(GLenum target, size_t level, gl::Box layerArea(area.x, area.y, 0, area.width, area.height, 1); gl::ImageIndex index = gl::ImageIndex::Make2DArray(static_cast(level), layer); - ANGLE_TRY( - TextureD3D::subImageCompressed(index, layerArea, format, unpack, pixels, layerOffset)); - ANGLE_TRY(commitRegion(index, layerArea)); + gl::Error error = TextureD3D::subImageCompressed(index, layerArea, format, unpack, pixels, layerOffset); + if (error.isError()) + { + return error; + } + + error = commitRegion(index, layerArea); + if (error.isError()) + { + return error; + } } return gl::Error(GL_NO_ERROR); @@ -2498,21 +2767,39 @@ gl::Error TextureD3D_2DArray::copySubImage(GLenum target, if (canCreateRenderTargetForImage(index)) { gl::Offset destLayerOffset(destOffset.x, destOffset.y, 0); - ANGLE_TRY(mImageArray[level][destOffset.z]->copyFromFramebuffer(destLayerOffset, sourceArea, - source)); + gl::Error error = mImageArray[level][destOffset.z]->copyFromFramebuffer(destLayerOffset, + sourceArea, source); + if (error.isError()) + { + return error; + } + mDirtyImages = true; } else { - ANGLE_TRY(ensureRenderTarget()); + gl::Error error = ensureRenderTarget(); + if (error.isError()) + { + return error; + } if (isValidLevel(level)) { - ANGLE_TRY(updateStorageLevel(level)); - ANGLE_TRY(mRenderer->copyImage2DArray( + error = updateStorageLevel(level); + if (error.isError()) + { + return error; + } + + error = mRenderer->copyImage2DArray( source, sourceArea, gl::GetInternalFormatInfo(getInternalFormat(getBaseLevel())).format, destOffset, - mTexStorage, level)); + mTexStorage, level); + if (error.isError()) + { + return error; + } } } return gl::Error(GL_NO_ERROR); @@ -2558,11 +2845,16 @@ gl::Error TextureD3D_2DArray::setStorage(GLenum target, size_t levels, GLenum in return error; } - ANGLE_TRY(updateStorage()); + error = updateStorage(); + + if (error.isError()) + { + return error; + } mImmutable = true; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } void TextureD3D_2DArray::bindTexImage(egl::Surface *surface) @@ -2599,8 +2891,18 @@ void TextureD3D_2DArray::initMipmapImages() gl::Error TextureD3D_2DArray::getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT) { // ensure the underlying texture is created - ANGLE_TRY(ensureRenderTarget()); - ANGLE_TRY(updateStorageLevel(index.mipIndex)); + gl::Error error = ensureRenderTarget(); + if (error.isError()) + { + return error; + } + + error = updateStorageLevel(index.mipIndex); + if (error.isError()) + { + return error; + } + return mTexStorage->getRenderTarget(index, outRT); } @@ -2609,21 +2911,25 @@ gl::Error TextureD3D_2DArray::initializeStorage(bool renderTarget) // Only initialize the first time this texture is used as a render target or shader resource if (mTexStorage) { - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } // do not attempt to create storage for nonexistant data if (!isLevelComplete(getBaseLevel())) { - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } bool createRenderTarget = (renderTarget || IsRenderTargetUsage(mState.getUsage())); - TextureStorage *storage = nullptr; - ANGLE_TRY(createCompleteStorage(createRenderTarget, &storage)); + TextureStorage *storage = NULL; + gl::Error error = createCompleteStorage(createRenderTarget, &storage); + if (error.isError()) + { + return error; + } - gl::Error error = setCompleteTexStorage(storage); + error = setCompleteTexStorage(storage); if (error.isError()) { SafeDelete(storage); @@ -2633,9 +2939,13 @@ gl::Error TextureD3D_2DArray::initializeStorage(bool renderTarget) ASSERT(mTexStorage); // flush image data to the storage - ANGLE_TRY(updateStorage()); + error = updateStorage(); + if (error.isError()) + { + return error; + } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureD3D_2DArray::createCompleteStorage(bool renderTarget, TextureStorage **outStorage) const @@ -2653,7 +2963,7 @@ gl::Error TextureD3D_2DArray::createCompleteStorage(bool renderTarget, TextureSt // TODO(geofflang): Verify storage creation succeeds *outStorage = mRenderer->createTextureStorage2DArray(internalFormat, renderTarget, width, height, depth, levels); - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureD3D_2DArray::setCompleteTexStorage(TextureStorage *newCompleteTexStorage) @@ -2665,7 +2975,7 @@ gl::Error TextureD3D_2DArray::setCompleteTexStorage(TextureStorage *newCompleteT // We do not support managed 2D array storage, as managed storage is ES2/D3D9 only ASSERT(!mTexStorage->isManaged()); - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureD3D_2DArray::updateStorage() @@ -2676,11 +2986,15 @@ gl::Error TextureD3D_2DArray::updateStorage() { if (isLevelComplete(level)) { - ANGLE_TRY(updateStorageLevel(level)); + gl::Error error = updateStorageLevel(level); + if (error.isError()) + { + return error; + } } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } bool TextureD3D_2DArray::isValidLevel(int level) const @@ -2759,7 +3073,11 @@ gl::Error TextureD3D_2DArray::updateStorageLevel(int level) { gl::ImageIndex index = gl::ImageIndex::Make2DArray(level, layer); gl::Box region(0, 0, 0, getWidth(level), getHeight(level), 1); - ANGLE_TRY(commitRegion(index, region)); + gl::Error error = commitRegion(index, region); + if (error.isError()) + { + return error; + } } } @@ -3083,4 +3401,4 @@ void TextureD3D_External::markAllImagesDirty() { UNREACHABLE(); } -} // namespace rx +} diff --git a/gfx/angle/src/libANGLE/renderer/d3d/TextureD3D.h b/gfx/angle/src/libANGLE/renderer/d3d/TextureD3D.h index 99343632a..7a8cad980 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/TextureD3D.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/TextureD3D.h @@ -69,8 +69,6 @@ class TextureD3D : public TextureImpl void setBaseLevel(GLuint baseLevel) override; - void syncState(const gl::Texture::DirtyBits &dirtyBits) override; - protected: gl::Error setImageImpl(const gl::ImageIndex &index, GLenum type, @@ -172,7 +170,6 @@ class TextureD3D_2D : public TextureD3D bool unpackPremultiplyAlpha, bool unpackUnmultiplyAlpha, const gl::Texture *source) override; - gl::Error copyCompressedTexture(const gl::Texture *source) override; gl::Error setStorage(GLenum target, size_t levels, GLenum internalFormat, const gl::Extents &size) override; diff --git a/gfx/angle/src/libANGLE/renderer/d3d/VaryingPacking.cpp b/gfx/angle/src/libANGLE/renderer/d3d/VaryingPacking.cpp index eea85fea7..0bd783414 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/VaryingPacking.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/VaryingPacking.cpp @@ -271,37 +271,33 @@ bool VaryingPacking::packVaryings(gl::InfoLog &infoLog, continue; } - bool found = false; for (const PackedVarying &packedVarying : packedVaryings) { const auto &varying = *packedVarying.varying; // Make sure transform feedback varyings aren't optimized out. - if (uniqueVaryingNames.count(transformFeedbackVaryingName) > 0) + if (uniqueVaryingNames.count(transformFeedbackVaryingName) == 0) { - found = true; - break; - } - - if (transformFeedbackVaryingName == varying.name) - { - if (!packVarying(packedVarying)) + bool found = false; + if (transformFeedbackVaryingName == varying.name) + { + if (!packVarying(packedVarying)) + { + infoLog << "Could not pack varying " << varying.name; + return false; + } + + found = true; + break; + } + if (!found) { - infoLog << "Could not pack varying " << varying.name; + infoLog << "Transform feedback varying " << transformFeedbackVaryingName + << " does not exist in the vertex shader."; return false; } - - found = true; - break; } } - - if (!found) - { - infoLog << "Transform feedback varying " << transformFeedbackVaryingName - << " does not exist in the vertex shader."; - return false; - } } // Sort the packed register list diff --git a/gfx/angle/src/libANGLE/renderer/d3d/VertexDataManager.cpp b/gfx/angle/src/libANGLE/renderer/d3d/VertexDataManager.cpp index 89dd4faf2..fff16e63a 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/VertexDataManager.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/VertexDataManager.cpp @@ -431,6 +431,7 @@ gl::Error VertexDataManager::reserveSpaceForAttrib(const TranslatedAttribute &tr gl::Buffer *buffer = attrib.buffer.get(); BufferD3D *bufferD3D = buffer ? GetImplAs(buffer) : nullptr; ASSERT(!bufferD3D || bufferD3D->getStaticVertexBuffer(attrib) == nullptr); + UNUSED_ASSERTION_VARIABLE(bufferD3D); size_t totalCount = ComputeVertexAttributeElementCount(attrib, count, instances); ASSERT(!bufferD3D || diff --git a/gfx/angle/src/libANGLE/renderer/d3d/WorkaroundsD3D.h b/gfx/angle/src/libANGLE/renderer/d3d/WorkaroundsD3D.h index ede929ce8..83abab81e 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/WorkaroundsD3D.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/WorkaroundsD3D.h @@ -72,38 +72,9 @@ struct WorkaroundsD3D // is negative, even if the sum of Offset and Location is in range. This may cause errors when // translating GLSL's function texelFetchOffset into texture.Load, as it is valid for // texelFetchOffset to use negative texture coordinates as its parameter P when the sum of P - // and Offset is in range. To work around this, we translate texelFetchOffset into texelFetch + // and Offset is in range. To work around this, we translatie texelFetchOffset into texelFetch // by adding Offset directly to Location before reading the texture. bool preAddTexelFetchOffsets = false; - - // On some AMD drivers, 1x1 and 2x2 mips of depth/stencil textures aren't sampled correctly. - // We can work around this bug by doing an internal blit to a temporary single-channel texture - // before we sample. - bool emulateTinyStencilTextures = false; - - // In Intel driver, the data with format DXGI_FORMAT_B5G6R5_UNORM will be parsed incorrectly. - // This workaroud will disable B5G6R5 support when it's Intel driver. By default, it will use - // R8G8B8A8 format. - bool disableB5G6R5Support = false; - - // On some Intel drivers, evaluating unary minus operator on integer may get wrong answer in - // vertex shaders. To work around this bug, we translate -(int) into ~(int)+1. - bool rewriteUnaryMinusOperator = false; - - // On some Intel drivers, using isnan() on highp float will get wrong answer. To work around - // this bug, we use an expression to emulate function isnan(). Tracking bug: - // https://crbug.com/650547 - bool emulateIsnanFloat = false; - - // On some Intel drivers, using clear() may not take effect. To work around this bug, we call - // clear() twice on these platforms. Tracking bug: https://crbug.com/655534 - bool callClearTwice = false; - - // On some Intel drivers, copying from staging storage to constant buffer storage does not - // seem to work. Work around this by keeping system memory storage as a canonical reference - // for buffer data. - // D3D11-only workaround. See http://crbug.com/593024. - bool useSystemMemoryForConstantBuffers = false; }; } // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp index f8a0ac597..d1e6a13f2 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp @@ -274,93 +274,6 @@ void CopyDepthStencil(const gl::Box &sourceArea, } } -void Depth32FStencil8ToDepth32F(const float *source, float *dest) -{ - *dest = *source; -} - -void Depth24Stencil8ToDepth32F(const uint32_t *source, float *dest) -{ - uint32_t normDepth = source[0] & 0x00FFFFFF; - float floatDepth = gl::normalizedToFloat<24>(normDepth); - *dest = floatDepth; -} - -void BlitD24S8ToD32F(const gl::Box &sourceArea, - const gl::Box &destArea, - const gl::Rectangle &clippedDestArea, - const gl::Extents &sourceSize, - unsigned int sourceRowPitch, - unsigned int destRowPitch, - ptrdiff_t readOffset, - ptrdiff_t writeOffset, - size_t copySize, - size_t srcPixelStride, - size_t destPixelStride, - const uint8_t *sourceData, - uint8_t *destData) -{ - // No stretching or subregions are supported, only full blits. - ASSERT(sourceArea == destArea); - ASSERT(sourceSize.width == sourceArea.width && sourceSize.height == sourceArea.height && - sourceSize.depth == 1); - ASSERT(clippedDestArea.width == sourceSize.width && - clippedDestArea.height == sourceSize.height); - ASSERT(readOffset == 0 && writeOffset == 0); - ASSERT(destArea.x == 0 && destArea.y == 0); - - for (int row = 0; row < destArea.height; ++row) - { - for (int column = 0; column < destArea.width; ++column) - { - ptrdiff_t offset = row * sourceRowPitch + column * srcPixelStride; - const uint32_t *sourcePixel = reinterpret_cast(sourceData + offset); - - float *destPixel = - reinterpret_cast(destData + row * destRowPitch + column * destPixelStride); - - Depth24Stencil8ToDepth32F(sourcePixel, destPixel); - } - } -} - -void BlitD32FS8ToD32F(const gl::Box &sourceArea, - const gl::Box &destArea, - const gl::Rectangle &clippedDestArea, - const gl::Extents &sourceSize, - unsigned int sourceRowPitch, - unsigned int destRowPitch, - ptrdiff_t readOffset, - ptrdiff_t writeOffset, - size_t copySize, - size_t srcPixelStride, - size_t destPixelStride, - const uint8_t *sourceData, - uint8_t *destData) -{ - // No stretching or subregions are supported, only full blits. - ASSERT(sourceArea == destArea); - ASSERT(sourceSize.width == sourceArea.width && sourceSize.height == sourceArea.height && - sourceSize.depth == 1); - ASSERT(clippedDestArea.width == sourceSize.width && - clippedDestArea.height == sourceSize.height); - ASSERT(readOffset == 0 && writeOffset == 0); - ASSERT(destArea.x == 0 && destArea.y == 0); - - for (int row = 0; row < destArea.height; ++row) - { - for (int column = 0; column < destArea.width; ++column) - { - ptrdiff_t offset = row * sourceRowPitch + column * srcPixelStride; - const float *sourcePixel = reinterpret_cast(sourceData + offset); - float *destPixel = - reinterpret_cast(destData + row * destRowPitch + column * destPixelStride); - - Depth32FStencil8ToDepth32F(sourcePixel, destPixel); - } - } -} - Blit11::BlitConvertFunction *GetCopyDepthStencilFunction(GLenum internalFormat) { switch (internalFormat) @@ -1022,7 +935,8 @@ gl::Error Blit11::swizzleTexture(ID3D11ShaderResourceView *source, D3D11_SHADER_RESOURCE_VIEW_DESC sourceSRVDesc; source->GetDesc(&sourceSRVDesc); - GLenum componentType = d3d11::GetComponentType(sourceSRVDesc.Format); + const d3d11::DXGIFormat &dxgiFormatInfo = d3d11::GetDXGIFormatInfo(sourceSRVDesc.Format); + GLenum componentType = dxgiFormatInfo.componentType; if (componentType == GL_NONE) { // We're swizzling the depth component of a depth-stencil texture. @@ -1182,7 +1096,8 @@ gl::Error Blit11::copyTexture(ID3D11ShaderResourceView *source, D3D11_SHADER_RESOURCE_VIEW_DESC sourceSRVDesc; source->GetDesc(&sourceSRVDesc); - GLenum componentType = d3d11::GetComponentType(sourceSRVDesc.Format); + const d3d11::DXGIFormat &dxgiFormatInfo = d3d11::GetDXGIFormatInfo(sourceSRVDesc.Format); + GLenum componentType = dxgiFormatInfo.componentType; ASSERT(componentType != GL_NONE); ASSERT(componentType != GL_SIGNED_NORMALIZED); @@ -1457,26 +1372,26 @@ gl::Error Blit11::copyDepthStencilImpl(const TextureHelper11 &source, const gl::Rectangle *scissor, bool stencilOnly) { - auto srcDXGIFormat = source.getFormat(); - const auto &srcSizeInfo = d3d11::GetDXGIFormatSizeInfo(srcDXGIFormat); + auto srcFormat = source.getFormat(); + const auto &srcSizeInfo = d3d11::GetDXGIFormatSizeInfo(srcFormat); unsigned int srcPixelSize = srcSizeInfo.pixelBytes; - unsigned int copyOffset = 0; + unsigned int copyOffset = 0; unsigned int copySize = srcPixelSize; - auto destDXGIFormat = dest.getFormat(); - const auto &destSizeInfo = d3d11::GetDXGIFormatSizeInfo(destDXGIFormat); + auto destFormat = dest.getFormat(); + const auto &destSizeInfo = d3d11::GetDXGIFormatSizeInfo(destFormat); unsigned int destPixelSize = destSizeInfo.pixelBytes; - ASSERT(srcDXGIFormat == destDXGIFormat || destDXGIFormat == DXGI_FORMAT_R32_TYPELESS); + ASSERT(srcFormat == destFormat); if (stencilOnly) { - const auto &srcFormat = source.getFormatSet().format(); + const d3d11::DXGIFormat &srcDXGIFormat = d3d11::GetDXGIFormatInfo(srcFormat); // Stencil channel should be right after the depth channel. Some views to depth/stencil // resources have red channel for depth, in which case the depth channel bit width is in // redBits. - ASSERT((srcFormat.redBits != 0) != (srcFormat.depthBits != 0)); - GLuint depthBits = srcFormat.redBits + srcFormat.depthBits; + ASSERT((srcDXGIFormat.redBits != 0) != (srcDXGIFormat.depthBits != 0)); + GLuint depthBits = srcDXGIFormat.redBits + srcDXGIFormat.depthBits; // Known formats have either 24 or 32 bits of depth. ASSERT(depthBits == 24 || depthBits == 32); copyOffset = depthBits / 8; @@ -1485,22 +1400,6 @@ gl::Error Blit11::copyDepthStencilImpl(const TextureHelper11 &source, copySize = 1; } - if (srcDXGIFormat != destDXGIFormat) - { - if (srcDXGIFormat == DXGI_FORMAT_R24G8_TYPELESS) - { - ASSERT(sourceArea == destArea && sourceSize == destSize && scissor == nullptr); - return copyAndConvert(source, sourceSubresource, sourceArea, sourceSize, dest, - destSubresource, destArea, destSize, scissor, copyOffset, - copyOffset, copySize, srcPixelSize, destPixelSize, - BlitD24S8ToD32F); - } - ASSERT(srcDXGIFormat == DXGI_FORMAT_R32G8X24_TYPELESS); - return copyAndConvert(source, sourceSubresource, sourceArea, sourceSize, dest, - destSubresource, destArea, destSize, scissor, copyOffset, copyOffset, - copySize, srcPixelSize, destPixelSize, BlitD32FS8ToD32F); - } - return copyAndConvert(source, sourceSubresource, sourceArea, sourceSize, dest, destSubresource, destArea, destSize, scissor, copyOffset, copyOffset, copySize, srcPixelSize, destPixelSize, StretchedBlitNearest); @@ -2000,14 +1899,6 @@ gl::Error Blit11::getSwizzleShader(GLenum type, gl::ErrorOrResult Blit11::resolveDepth(RenderTarget11 *depth) { - // Multisampled depth stencil SRVs are not available in feature level 10.0 - if (mRenderer->getRenderer11DeviceCaps().featureLevel <= D3D_FEATURE_LEVEL_10_0) - { - return gl::Error(GL_INVALID_OPERATION, - "Resolving multisampled depth stencil textures is not supported in " - "feature level 10.0."); - } - const auto &extents = depth->getExtents(); ID3D11Device *device = mRenderer->getDevice(); ID3D11DeviceContext *context = mRenderer->getDeviceContext(); @@ -2136,14 +2027,6 @@ gl::Error Blit11::initResolveDepthStencil(const gl::Extents &extents) gl::ErrorOrResult Blit11::resolveStencil(RenderTarget11 *depthStencil, bool alsoDepth) { - // Multisampled depth stencil SRVs are not available in feature level 10.0 - if (mRenderer->getRenderer11DeviceCaps().featureLevel <= D3D_FEATURE_LEVEL_10_0) - { - return gl::Error(GL_INVALID_OPERATION, - "Resolving multisampled depth stencil textures is not supported in " - "feature level 10.0."); - } - const auto &extents = depthStencil->getExtents(); ANGLE_TRY(initResolveDepthStencil(extents)); diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Buffer11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Buffer11.cpp index 90668b759..107a577e4 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Buffer11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Buffer11.cpp @@ -38,34 +38,12 @@ enum class CopyResult NOT_RECREATED, }; -void CalculateConstantBufferParams(GLintptr offset, - GLsizeiptr size, - UINT *outFirstConstant, - UINT *outNumConstants) -{ - // The offset must be aligned to 256 bytes (should have been enforced by glBindBufferRange). - ASSERT(offset % 256 == 0); - - // firstConstant and numConstants are expressed in constants of 16-bytes. Furthermore they must - // be a multiple of 16 constants. - *outFirstConstant = static_cast(offset / 16); - - // The GL size is not required to be aligned to a 256 bytes boundary. - // Round the size up to a 256 bytes boundary then express the results in constants of 16-bytes. - *outNumConstants = static_cast(rx::roundUp(size, static_cast(256)) / 16); - - // Since the size is rounded up, firstConstant + numConstants may be bigger than the actual size - // of the buffer. This behaviour is explictly allowed according to the documentation on - // ID3D11DeviceContext1::PSSetConstantBuffers1 - // https://msdn.microsoft.com/en-us/library/windows/desktop/hh404649%28v=vs.85%29.aspx -} - } // anonymous namespace namespace gl_d3d11 { -D3D11_MAP GetD3DMapTypeFromBits(BufferUsage usage, GLbitfield access) +D3D11_MAP GetD3DMapTypeFromBits(GLbitfield access) { bool readBit = ((access & GL_MAP_READ_BIT) != 0); bool writeBit = ((access & GL_MAP_WRITE_BIT) != 0); @@ -81,8 +59,7 @@ D3D11_MAP GetD3DMapTypeFromBits(BufferUsage usage, GLbitfield access) } else if (writeBit && !readBit) { - // Special case for uniform storage - we only allow full buffer updates. - return usage == BUFFER_USAGE_UNIFORM ? D3D11_MAP_WRITE_DISCARD : D3D11_MAP_WRITE; + return D3D11_MAP_WRITE; } else if (writeBit && readBit) { @@ -111,7 +88,7 @@ class Buffer11::BufferStorage : angle::NonCopyable size_t getSize() const { return mBufferSize; } void setDataRevision(DataRevision rev) { mRevision = rev; } - virtual bool isMappable(GLbitfield access) const = 0; + virtual bool isMappable() const = 0; virtual gl::ErrorOrResult copyFromStorage(BufferStorage *source, size_t sourceOffset, @@ -146,7 +123,7 @@ class Buffer11::NativeStorage : public Buffer11::BufferStorage const angle::BroadcastChannel *onStorageChanged); ~NativeStorage() override; - bool isMappable(GLbitfield access) const override; + bool isMappable() const override { return mUsage == BUFFER_USAGE_STAGING; } ID3D11Buffer *getNativeStorage() const { return mNativeStorage; } gl::ErrorOrResult copyFromStorage(BufferStorage *source, @@ -161,18 +138,14 @@ class Buffer11::NativeStorage : public Buffer11::BufferStorage uint8_t **mapPointerOut) override; void unmap() override; - gl::ErrorOrResult getSRVForFormat(DXGI_FORMAT srvFormat); - private: - static void FillBufferDesc(D3D11_BUFFER_DESC *bufferDesc, + static void fillBufferDesc(D3D11_BUFFER_DESC *bufferDesc, Renderer11 *renderer, BufferUsage usage, unsigned int bufferSize); - void clearSRVs(); ID3D11Buffer *mNativeStorage; const angle::BroadcastChannel *mOnStorageChanged; - std::map mBufferResourceViews; }; // A emulated indexed buffer storage represents an underlying D3D11 buffer for data @@ -184,7 +157,7 @@ class Buffer11::EmulatedIndexedStorage : public Buffer11::BufferStorage EmulatedIndexedStorage(Renderer11 *renderer); ~EmulatedIndexedStorage() override; - bool isMappable(GLbitfield access) const override { return true; } + bool isMappable() const override { return true; } gl::ErrorOrResult getNativeStorage(SourceIndexData *indexInfo, const TranslatedAttribute &attribute, @@ -217,7 +190,7 @@ class Buffer11::PackStorage : public Buffer11::BufferStorage explicit PackStorage(Renderer11 *renderer); ~PackStorage() override; - bool isMappable(GLbitfield access) const override { return true; } + bool isMappable() const override { return true; } gl::ErrorOrResult copyFromStorage(BufferStorage *source, size_t sourceOffset, size_t size, @@ -252,7 +225,7 @@ class Buffer11::SystemMemoryStorage : public Buffer11::BufferStorage explicit SystemMemoryStorage(Renderer11 *renderer); ~SystemMemoryStorage() override {} - bool isMappable(GLbitfield access) const override { return true; } + bool isMappable() const override { return true; } gl::ErrorOrResult copyFromStorage(BufferStorage *source, size_t sourceOffset, size_t size, @@ -271,16 +244,16 @@ class Buffer11::SystemMemoryStorage : public Buffer11::BufferStorage MemoryBuffer mSystemCopy; }; -Buffer11::Buffer11(const gl::BufferState &state, Renderer11 *renderer) - : BufferD3D(state, renderer), +Buffer11::Buffer11(Renderer11 *renderer) + : BufferD3D(renderer), mRenderer(renderer), mSize(0), mMappedStorage(nullptr), - mBufferStorages({}), - mDeallocThresholds({}), - mIdleness({}), + mBufferStorages(BUFFER_USAGE_COUNT, nullptr), mConstantBufferStorageAdditionalSize(0), - mMaxConstantBufferLruCount(0) + mMaxConstantBufferLruCount(0), + mReadUsageCount(0), + mSystemMemoryDeallocThreshold(0) { } @@ -299,10 +272,10 @@ Buffer11::~Buffer11() mRenderer->onBufferDelete(this); } -gl::Error Buffer11::setData(GLenum target, const void *data, size_t size, GLenum usage) +gl::Error Buffer11::setData(const void *data, size_t size, GLenum usage) { updateD3DBufferUsage(usage); - ANGLE_TRY(setSubData(target, data, size, 0)); + ANGLE_TRY(setSubData(data, size, 0)); return gl::NoError(); } @@ -311,6 +284,8 @@ gl::Error Buffer11::getData(const uint8_t **outData) SystemMemoryStorage *systemMemoryStorage = nullptr; ANGLE_TRY_RESULT(getSystemMemoryStorage(), systemMemoryStorage); + mReadUsageCount = 0; + ASSERT(systemMemoryStorage->getSize() >= mSize); *outData = systemMemoryStorage->getSystemCopy()->data(); @@ -324,34 +299,16 @@ gl::ErrorOrResult Buffer11::getSystemMemoryStor return GetAs(storage); } -gl::Error Buffer11::setSubData(GLenum target, const void *data, size_t size, size_t offset) +gl::Error Buffer11::setSubData(const void *data, size_t size, size_t offset) { size_t requiredSize = size + offset; if (data && size > 0) { // Use system memory storage for dynamic buffers. - // Try using a constant storage for constant buffers + BufferStorage *writeBuffer = nullptr; - if (target == GL_UNIFORM_BUFFER) - { - // If we are a very large uniform buffer, keep system memory storage around so that we - // aren't forced to read back from a constant buffer. We also check the workaround for - // Intel - this requires us to use system memory so we don't end up having to copy from - // a constant buffer to a staging buffer. - // TODO(jmadill): Use Context caps. - if (offset == 0 && size >= mSize && - size <= static_cast(mRenderer->getNativeCaps().maxUniformBlockSize) && - !mRenderer->getWorkarounds().useSystemMemoryForConstantBuffers) - { - ANGLE_TRY_RESULT(getBufferStorage(BUFFER_USAGE_UNIFORM), writeBuffer); - } - else - { - ANGLE_TRY_RESULT(getSystemMemoryStorage(), writeBuffer); - } - } - else if (supportsDirectBinding()) + if (supportsDirectBinding()) { ANGLE_TRY_RESULT(getStagingStorage(), writeBuffer); } @@ -406,12 +363,11 @@ gl::Error Buffer11::copySubData(BufferImpl *source, // If copying to/from a pixel pack buffer, we must have a staging or // pack buffer partner, because other native buffers can't be mapped - if (copyDest->getUsage() == BUFFER_USAGE_PIXEL_PACK && !copySource->isMappable(GL_MAP_READ_BIT)) + if (copyDest->getUsage() == BUFFER_USAGE_PIXEL_PACK && !copySource->isMappable()) { ANGLE_TRY_RESULT(sourceBuffer->getStagingStorage(), copySource); } - else if (copySource->getUsage() == BUFFER_USAGE_PIXEL_PACK && - !copyDest->isMappable(GL_MAP_WRITE_BIT)) + else if (copySource->getUsage() == BUFFER_USAGE_PIXEL_PACK && !copyDest->isMappable()) { ANGLE_TRY_RESULT(getStagingStorage(), copyDest); } @@ -518,81 +474,50 @@ gl::Error Buffer11::markTransformFeedbackUsage() return gl::NoError(); } -void Buffer11::updateDeallocThreshold(BufferUsage usage) +void Buffer11::updateSystemMemoryDeallocThreshold() { // The following strategy was tuned on the Oort online benchmark (http://oortonline.gl/) // as well as a custom microbenchmark (IndexConversionPerfTest.Run/index_range_d3d11) - // First readback: 8 unmodified uses before we free buffer memory. + // First readback: 8 unmodified uses before we free system memory. // After that, double the threshold each time until we reach the max. - if (mDeallocThresholds[usage] == 0) + if (mSystemMemoryDeallocThreshold == 0) { - mDeallocThresholds[usage] = 8; + mSystemMemoryDeallocThreshold = 8; } - else if (mDeallocThresholds[usage] < std::numeric_limits::max() / 2u) + else if (mSystemMemoryDeallocThreshold < std::numeric_limits::max() / 2u) { - mDeallocThresholds[usage] *= 2u; + mSystemMemoryDeallocThreshold *= 2u; } else { - mDeallocThresholds[usage] = std::numeric_limits::max(); + mSystemMemoryDeallocThreshold = std::numeric_limits::max(); } } -// Free the storage if we decide it isn't being used very often. -gl::Error Buffer11::checkForDeallocation(BufferUsage usage) +gl::Error Buffer11::markBufferUsage() { - mIdleness[usage]++; + mReadUsageCount++; - BufferStorage *&storage = mBufferStorages[usage]; - if (storage != nullptr && mIdleness[usage] > mDeallocThresholds[usage]) + // Free the system memory storage if we decide it isn't being used very often. + BufferStorage *&sysMemStorage = mBufferStorages[BUFFER_USAGE_SYSTEM_MEMORY]; + if (sysMemStorage != nullptr && mReadUsageCount > mSystemMemoryDeallocThreshold) { BufferStorage *latestStorage = nullptr; ANGLE_TRY_RESULT(getLatestBufferStorage(), latestStorage); - if (latestStorage != storage) + if (latestStorage != sysMemStorage) { - SafeDelete(storage); + SafeDelete(sysMemStorage); } } return gl::NoError(); } -// Keep system memory when we are using it for the canonical version of data. -bool Buffer11::canDeallocateSystemMemory() const -{ - // Must keep system memory on Intel. - if (mRenderer->getWorkarounds().useSystemMemoryForConstantBuffers) - { - return false; - } - - return (!mBufferStorages[BUFFER_USAGE_UNIFORM] || - mSize <= mRenderer->getNativeCaps().maxUniformBlockSize); -} - -void Buffer11::markBufferUsage(BufferUsage usage) -{ - mIdleness[usage] = 0; -} - -gl::Error Buffer11::garbageCollection(BufferUsage currentUsage) -{ - if (currentUsage != BUFFER_USAGE_SYSTEM_MEMORY && canDeallocateSystemMemory()) - { - ANGLE_TRY(checkForDeallocation(BUFFER_USAGE_SYSTEM_MEMORY)); - } - - if (currentUsage != BUFFER_USAGE_STAGING) - { - ANGLE_TRY(checkForDeallocation(BUFFER_USAGE_STAGING)); - } - - return gl::NoError(); -} - gl::ErrorOrResult Buffer11::getBuffer(BufferUsage usage) { + ANGLE_TRY(markBufferUsage()); + BufferStorage *storage = nullptr; ANGLE_TRY_RESULT(getBufferStorage(usage), storage); return GetAs(storage)->getNativeStorage(); @@ -605,6 +530,8 @@ gl::ErrorOrResult Buffer11::getEmulatedIndexedBuffer( { ASSERT(indexInfo); + ANGLE_TRY(markBufferUsage()); + BufferStorage *untypedStorage = nullptr; ANGLE_TRY_RESULT(getBufferStorage(BUFFER_USAGE_EMULATED_INDEXED_VERTEX), untypedStorage); @@ -617,37 +544,64 @@ gl::ErrorOrResult Buffer11::getEmulatedIndexedBuffer( return nativeStorage; } -gl::Error Buffer11::getConstantBufferRange(GLintptr offset, - GLsizeiptr size, - ID3D11Buffer **bufferOut, - UINT *firstConstantOut, - UINT *numConstantsOut) +gl::ErrorOrResult Buffer11::getConstantBufferRange(GLintptr offset, GLsizeiptr size) { + ANGLE_TRY(markBufferUsage()); + BufferStorage *bufferStorage = nullptr; if (offset == 0 || mRenderer->getRenderer11DeviceCaps().supportsConstantBufferOffsets) { ANGLE_TRY_RESULT(getBufferStorage(BUFFER_USAGE_UNIFORM), bufferStorage); - CalculateConstantBufferParams(offset, size, firstConstantOut, numConstantsOut); } else { ANGLE_TRY_RESULT(getConstantBufferRangeStorage(offset, size), bufferStorage); - *firstConstantOut = 0; - *numConstantsOut = 0; } - *bufferOut = GetAs(bufferStorage)->getNativeStorage(); - - return gl::NoError(); + return GetAs(bufferStorage)->getNativeStorage(); } gl::ErrorOrResult Buffer11::getSRV(DXGI_FORMAT srvFormat) { BufferStorage *storage = nullptr; ANGLE_TRY_RESULT(getBufferStorage(BUFFER_USAGE_PIXEL_UNPACK), storage); - NativeStorage *nativeStorage = GetAs(storage); - return nativeStorage->getSRVForFormat(srvFormat); + ID3D11Buffer *buffer = GetAs(storage)->getNativeStorage(); + + auto bufferSRVIt = mBufferResourceViews.find(srvFormat); + + if (bufferSRVIt != mBufferResourceViews.end()) + { + if (bufferSRVIt->second.first == buffer) + { + return bufferSRVIt->second.second; + } + else + { + // The underlying buffer has changed since the SRV was created: recreate the SRV. + SafeRelease(bufferSRVIt->second.second); + } + } + + ID3D11Device *device = mRenderer->getDevice(); + ID3D11ShaderResourceView *bufferSRV = nullptr; + + const d3d11::DXGIFormatSize &dxgiFormatInfo = d3d11::GetDXGIFormatSizeInfo(srvFormat); + + D3D11_SHADER_RESOURCE_VIEW_DESC bufferSRVDesc; + bufferSRVDesc.Buffer.ElementOffset = 0; + bufferSRVDesc.Buffer.ElementWidth = + static_cast(mSize) / dxgiFormatInfo.pixelBytes; + bufferSRVDesc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER; + bufferSRVDesc.Format = srvFormat; + + HRESULT result = device->CreateShaderResourceView(buffer, &bufferSRVDesc, &bufferSRV); + UNUSED_ASSERTION_VARIABLE(result); + ASSERT(SUCCEEDED(result)); + + mBufferResourceViews[srvFormat] = BufferSRVPair(buffer, bufferSRV); + + return bufferSRV; } gl::Error Buffer11::packPixels(const gl::FramebufferAttachment &readAttachment, @@ -689,31 +643,28 @@ gl::ErrorOrResult Buffer11::getBufferStorage(BufferUs newStorage = allocateStorage(usage); } - markBufferUsage(usage); - // resize buffer if (newStorage->getSize() < mSize) { ANGLE_TRY(newStorage->resize(mSize, true)); } - ASSERT(newStorage); - ANGLE_TRY(updateBufferStorage(newStorage, 0, mSize)); - ANGLE_TRY(garbageCollection(usage)); return newStorage; } Buffer11::BufferStorage *Buffer11::allocateStorage(BufferUsage usage) { - updateDeallocThreshold(usage); switch (usage) { case BUFFER_USAGE_PIXEL_PACK: return new PackStorage(mRenderer); case BUFFER_USAGE_SYSTEM_MEMORY: + { + updateSystemMemoryDeallocThreshold(); return new SystemMemoryStorage(mRenderer); + } case BUFFER_USAGE_EMULATED_INDEXED_VERTEX: return new EmulatedIndexedStorage(mRenderer); case BUFFER_USAGE_VERTEX_OR_TRANSFORM_FEEDBACK: @@ -744,8 +695,6 @@ gl::ErrorOrResult Buffer11::getConstantBufferRangeSto newStorage = cacheEntry->storage; } - markBufferUsage(BUFFER_USAGE_UNIFORM); - if (newStorage->getSize() < static_cast(size)) { size_t maximumAllowedAdditionalSize = 2 * getSize(); @@ -780,7 +729,6 @@ gl::ErrorOrResult Buffer11::getConstantBufferRangeSto } ANGLE_TRY(updateBufferStorage(newStorage, offset, size)); - ANGLE_TRY(garbageCollection(BUFFER_USAGE_UNIFORM)); return newStorage; } @@ -791,8 +739,6 @@ gl::Error Buffer11::updateBufferStorage(BufferStorage *storage, BufferStorage *latestBuffer = nullptr; ANGLE_TRY_RESULT(getLatestBufferStorage(), latestBuffer); - ASSERT(storage); - if (latestBuffer && latestBuffer->getDataRevision() > storage->getDataRevision()) { // Copy through a staging buffer if we're copying from or to a non-staging, mappable @@ -800,7 +746,7 @@ gl::Error Buffer11::updateBufferStorage(BufferStorage *storage, // data directly. If we're already using a staging buffer we're fine. if (latestBuffer->getUsage() != BUFFER_USAGE_STAGING && storage->getUsage() != BUFFER_USAGE_STAGING && - (!latestBuffer->isMappable(GL_MAP_READ_BIT) || !storage->isMappable(GL_MAP_WRITE_BIT))) + (!latestBuffer->isMappable() || !storage->isMappable())) { NativeStorage *stagingBuffer = nullptr; ANGLE_TRY_RESULT(getStagingStorage(), stagingBuffer); @@ -899,8 +845,6 @@ angle::BroadcastChannel *Buffer11::getDirectBroadcastChannel() return &mDirectBroadcastChannel; } -// Buffer11::BufferStorage implementation - Buffer11::BufferStorage::BufferStorage(Renderer11 *renderer, BufferUsage usage) : mRenderer(renderer), mRevision(0), mUsage(usage), mBufferSize(0) { @@ -908,24 +852,18 @@ Buffer11::BufferStorage::BufferStorage(Renderer11 *renderer, BufferUsage usage) gl::Error Buffer11::BufferStorage::setData(const uint8_t *data, size_t offset, size_t size) { - ASSERT(isMappable(GL_MAP_WRITE_BIT)); - - // Uniform storage can have a different internal size than the buffer size. Ensure we don't - // overflow. - size_t mapSize = std::min(size, mBufferSize - offset); + ASSERT(isMappable()); uint8_t *writePointer = nullptr; - ANGLE_TRY(map(offset, mapSize, GL_MAP_WRITE_BIT, &writePointer)); + ANGLE_TRY(map(offset, size, GL_MAP_WRITE_BIT, &writePointer)); - memcpy(writePointer, data, mapSize); + memcpy(writePointer, data, size); unmap(); return gl::NoError(); } -// Buffer11::NativeStorage implementation - Buffer11::NativeStorage::NativeStorage(Renderer11 *renderer, BufferUsage usage, const angle::BroadcastChannel *onStorageChanged) @@ -936,18 +874,6 @@ Buffer11::NativeStorage::NativeStorage(Renderer11 *renderer, Buffer11::NativeStorage::~NativeStorage() { SafeRelease(mNativeStorage); - clearSRVs(); -} - -bool Buffer11::NativeStorage::isMappable(GLbitfield access) const -{ - if ((access & GL_MAP_READ_BIT) != 0) - { - // Read is more exclusive than write mappability. - return (mUsage == BUFFER_USAGE_STAGING); - } - ASSERT((access & GL_MAP_WRITE_BIT) != 0); - return (mUsage == BUFFER_USAGE_STAGING || mUsage == BUFFER_USAGE_UNIFORM); } // Returns true if it recreates the direct buffer @@ -962,38 +888,45 @@ gl::ErrorOrResult Buffer11::NativeStorage::copyFromStorage(BufferSto bool createBuffer = !mNativeStorage || mBufferSize < requiredSize; // (Re)initialize D3D buffer if needed - bool preserveData = (destOffset > 0); if (createBuffer) { + bool preserveData = (destOffset > 0); resize(requiredSize, preserveData); } - size_t clampedSize = size; - if (mUsage == BUFFER_USAGE_UNIFORM) - { - clampedSize = std::min(clampedSize, mBufferSize - destOffset); - } - if (source->getUsage() == BUFFER_USAGE_PIXEL_PACK || source->getUsage() == BUFFER_USAGE_SYSTEM_MEMORY) { - ASSERT(source->isMappable(GL_MAP_READ_BIT) && isMappable(GL_MAP_WRITE_BIT)); - - // Uniform buffers must be mapped with write/discard. - ASSERT(!(preserveData && mUsage == BUFFER_USAGE_UNIFORM)); + ASSERT(source->isMappable()); uint8_t *sourcePointer = nullptr; - ANGLE_TRY(source->map(sourceOffset, clampedSize, GL_MAP_READ_BIT, &sourcePointer)); + ANGLE_TRY(source->map(sourceOffset, size, GL_MAP_READ_BIT, &sourcePointer)); + + D3D11_MAPPED_SUBRESOURCE mappedResource; + HRESULT hr = context->Map(mNativeStorage, 0, D3D11_MAP_WRITE, 0, &mappedResource); + ASSERT(SUCCEEDED(hr)); + if (FAILED(hr)) + { + source->unmap(); + return gl::Error( + GL_OUT_OF_MEMORY, + "Failed to map native storage in Buffer11::NativeStorage::copyFromStorage"); + } + + uint8_t *destPointer = static_cast(mappedResource.pData) + destOffset; - setData(sourcePointer, destOffset, clampedSize); + // Offset bounds are validated at the API layer + ASSERT(sourceOffset + size <= destOffset + mBufferSize); + memcpy(destPointer, sourcePointer, size); + context->Unmap(mNativeStorage, 0); source->unmap(); } else { D3D11_BOX srcBox; srcBox.left = static_cast(sourceOffset); - srcBox.right = static_cast(sourceOffset + clampedSize); + srcBox.right = static_cast(sourceOffset + size); srcBox.top = 0; srcBox.bottom = 1; srcBox.front = 0; @@ -1014,7 +947,7 @@ gl::Error Buffer11::NativeStorage::resize(size_t size, bool preserveData) ID3D11DeviceContext *context = mRenderer->getDeviceContext(); D3D11_BUFFER_DESC bufferDesc; - FillBufferDesc(&bufferDesc, mRenderer, mUsage, static_cast(size)); + fillBufferDesc(&bufferDesc, mRenderer, mUsage, static_cast(size)); ID3D11Buffer *newBuffer; HRESULT result = device->CreateBuffer(&bufferDesc, nullptr, &newBuffer); @@ -1049,9 +982,6 @@ gl::Error Buffer11::NativeStorage::resize(size_t size, bool preserveData) mBufferSize = bufferDesc.ByteWidth; - // Free the SRVs. - clearSRVs(); - // Notify that the storage has changed. if (mOnStorageChanged) { @@ -1061,8 +991,7 @@ gl::Error Buffer11::NativeStorage::resize(size_t size, bool preserveData) return gl::NoError(); } -// static -void Buffer11::NativeStorage::FillBufferDesc(D3D11_BUFFER_DESC *bufferDesc, +void Buffer11::NativeStorage::fillBufferDesc(D3D11_BUFFER_DESC *bufferDesc, Renderer11 *renderer, BufferUsage usage, unsigned int bufferSize) @@ -1111,9 +1040,6 @@ void Buffer11::NativeStorage::FillBufferDesc(D3D11_BUFFER_DESC *bufferDesc, // Constant buffers must be of a limited size, and aligned to 16 byte boundaries // For our purposes we ignore any buffer data past the maximum constant buffer size bufferDesc->ByteWidth = roundUp(bufferDesc->ByteWidth, 16u); - - // Note: it seems that D3D11 allows larger buffers on some platforms, but not all. - // (Windows 10 seems to allow larger constant buffers, but not Windows 7) bufferDesc->ByteWidth = std::min(bufferDesc->ByteWidth, static_cast(renderer->getNativeCaps().maxUniformBlockSize)); @@ -1129,11 +1055,11 @@ gl::Error Buffer11::NativeStorage::map(size_t offset, GLbitfield access, uint8_t **mapPointerOut) { - ASSERT(isMappable(access)); + ASSERT(mUsage == BUFFER_USAGE_STAGING); D3D11_MAPPED_SUBRESOURCE mappedResource; ID3D11DeviceContext *context = mRenderer->getDeviceContext(); - D3D11_MAP d3dMapType = gl_d3d11::GetD3DMapTypeFromBits(mUsage, access); + D3D11_MAP d3dMapType = gl_d3d11::GetD3DMapTypeFromBits(access); UINT d3dMapFlag = ((access & GL_MAP_UNSYNCHRONIZED_BIT) != 0 ? D3D11_MAP_FLAG_DO_NOT_WAIT : 0); HRESULT result = context->Map(mNativeStorage, 0, d3dMapType, d3dMapFlag, &mappedResource); @@ -1150,56 +1076,11 @@ gl::Error Buffer11::NativeStorage::map(size_t offset, void Buffer11::NativeStorage::unmap() { - ASSERT(isMappable(GL_MAP_WRITE_BIT) || isMappable(GL_MAP_READ_BIT)); + ASSERT(mUsage == BUFFER_USAGE_STAGING); ID3D11DeviceContext *context = mRenderer->getDeviceContext(); context->Unmap(mNativeStorage, 0); } -gl::ErrorOrResult Buffer11::NativeStorage::getSRVForFormat( - DXGI_FORMAT srvFormat) -{ - auto bufferSRVIt = mBufferResourceViews.find(srvFormat); - - if (bufferSRVIt != mBufferResourceViews.end()) - { - return bufferSRVIt->second; - } - - ID3D11Device *device = mRenderer->getDevice(); - ID3D11ShaderResourceView *bufferSRV = nullptr; - - const d3d11::DXGIFormatSize &dxgiFormatInfo = d3d11::GetDXGIFormatSizeInfo(srvFormat); - - D3D11_SHADER_RESOURCE_VIEW_DESC bufferSRVDesc; - bufferSRVDesc.Buffer.ElementOffset = 0; - bufferSRVDesc.Buffer.ElementWidth = static_cast(mBufferSize) / dxgiFormatInfo.pixelBytes; - bufferSRVDesc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER; - bufferSRVDesc.Format = srvFormat; - - HRESULT result = device->CreateShaderResourceView(mNativeStorage, &bufferSRVDesc, &bufferSRV); - ASSERT(SUCCEEDED(result)); - if (FAILED(result)) - { - return gl::Error(GL_OUT_OF_MEMORY, - "Error creating buffer SRV in Buffer11::NativeStorage::getSRVForFormat"); - } - - mBufferResourceViews[srvFormat] = bufferSRV; - - return bufferSRV; -} - -void Buffer11::NativeStorage::clearSRVs() -{ - for (auto &srv : mBufferResourceViews) - { - SafeRelease(srv.second); - } - mBufferResourceViews.clear(); -} - -// Buffer11::EmulatedIndexStorage implementation - Buffer11::EmulatedIndexedStorage::EmulatedIndexedStorage(Renderer11 *renderer) : BufferStorage(renderer, BUFFER_USAGE_EMULATED_INDEXED_VERTEX), mNativeStorage(nullptr) { @@ -1334,7 +1215,7 @@ gl::ErrorOrResult Buffer11::EmulatedIndexedStorage::copyFromStorage( size_t size, size_t destOffset) { - ASSERT(source->isMappable(GL_MAP_READ_BIT)); + ASSERT(source->isMappable()); uint8_t *sourceData = nullptr; ANGLE_TRY(source->map(sourceOffset, size, GL_MAP_READ_BIT, &sourceData)); ASSERT(destOffset + size <= mMemoryBuffer.size()); @@ -1372,8 +1253,6 @@ void Buffer11::EmulatedIndexedStorage::unmap() // No-op } -// Buffer11::PackStorage implementation - Buffer11::PackStorage::PackStorage(Renderer11 *renderer) : BufferStorage(renderer, BUFFER_USAGE_PIXEL_PACK), mStagingTexture(), mDataModified(false) { @@ -1390,8 +1269,9 @@ gl::ErrorOrResult Buffer11::PackStorage::copyFromStorage(BufferStora { ANGLE_TRY(flushQueuedPackCommand()); - // For all use cases of pack buffers, we must copy through a readable buffer. - ASSERT(source->isMappable(GL_MAP_READ_BIT)); + // We copy through a staging buffer when drawing with a pack buffer, or for other cases where we + // access the pack buffer + ASSERT(source->isMappable() && source->getUsage() == BUFFER_USAGE_STAGING); uint8_t *sourceData = nullptr; ANGLE_TRY(source->map(sourceOffset, size, GL_MAP_READ_BIT, &sourceData)); ASSERT(destOffset + size <= mMemoryBuffer.size()); @@ -1504,8 +1384,6 @@ gl::Error Buffer11::PackStorage::flushQueuedPackCommand() return gl::NoError(); } -// Buffer11::SystemMemoryStorage implementation - Buffer11::SystemMemoryStorage::SystemMemoryStorage(Renderer11 *renderer) : Buffer11::BufferStorage(renderer, BUFFER_USAGE_SYSTEM_MEMORY) { @@ -1516,7 +1394,7 @@ gl::ErrorOrResult Buffer11::SystemMemoryStorage::copyFromStorage(Buf size_t size, size_t destOffset) { - ASSERT(source->isMappable(GL_MAP_READ_BIT)); + ASSERT(source->isMappable()); uint8_t *sourceData = nullptr; ANGLE_TRY(source->map(sourceOffset, size, GL_MAP_READ_BIT, &sourceData)); ASSERT(destOffset + size <= mSystemCopy.size()); diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Buffer11.h b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Buffer11.h index 3210f05bc..6d56501d8 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Buffer11.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Buffer11.h @@ -9,7 +9,6 @@ #ifndef LIBANGLE_RENDERER_D3D_D3D11_BUFFER11_H_ #define LIBANGLE_RENDERER_D3D_D3D11_BUFFER11_H_ -#include #include #include "libANGLE/angletypes.h" @@ -28,16 +27,15 @@ class Renderer11; struct SourceIndexData; struct TranslatedAttribute; -// The order of this enum governs priority of 'getLatestBufferStorage'. enum BufferUsage { - BUFFER_USAGE_SYSTEM_MEMORY, BUFFER_USAGE_STAGING, BUFFER_USAGE_VERTEX_OR_TRANSFORM_FEEDBACK, BUFFER_USAGE_INDEX, BUFFER_USAGE_PIXEL_UNPACK, BUFFER_USAGE_PIXEL_PACK, BUFFER_USAGE_UNIFORM, + BUFFER_USAGE_SYSTEM_MEMORY, BUFFER_USAGE_EMULATED_INDEXED_VERTEX, BUFFER_USAGE_COUNT, @@ -48,18 +46,14 @@ typedef size_t DataRevision; class Buffer11 : public BufferD3D { public: - Buffer11(const gl::BufferState &state, Renderer11 *renderer); + Buffer11(Renderer11 *renderer); virtual ~Buffer11(); gl::ErrorOrResult getBuffer(BufferUsage usage); gl::ErrorOrResult getEmulatedIndexedBuffer(SourceIndexData *indexInfo, const TranslatedAttribute &attribute, GLint startVertex); - gl::Error getConstantBufferRange(GLintptr offset, - GLsizeiptr size, - ID3D11Buffer **bufferOut, - UINT *firstConstantOut, - UINT *numConstantsOut); + gl::ErrorOrResult getConstantBufferRange(GLintptr offset, GLsizeiptr size); gl::ErrorOrResult getSRV(DXGI_FORMAT srvFormat); bool isMapped() const { return mMappedStorage != nullptr; } gl::Error packPixels(const gl::FramebufferAttachment &readAttachment, @@ -74,8 +68,8 @@ class Buffer11 : public BufferD3D void invalidateStaticData() override; // BufferImpl implementation - gl::Error setData(GLenum target, const void *data, size_t size, GLenum usage) override; - gl::Error setSubData(GLenum target, const void *data, size_t size, size_t offset) override; + gl::Error setData(const void *data, size_t size, GLenum usage) override; + gl::Error setSubData(const void *data, size_t size, size_t offset) override; gl::Error copySubData(BufferImpl *source, GLintptr sourceOffset, GLintptr destOffset, @@ -106,8 +100,7 @@ class Buffer11 : public BufferD3D unsigned int lruCount; }; - void markBufferUsage(BufferUsage usage); - gl::Error garbageCollection(BufferUsage currentUsage); + gl::Error markBufferUsage(); gl::ErrorOrResult getStagingStorage(); gl::ErrorOrResult getPackStorage(); gl::ErrorOrResult getSystemMemoryStorage(); @@ -120,24 +113,14 @@ class Buffer11 : public BufferD3D GLsizeiptr size); BufferStorage *allocateStorage(BufferUsage usage); - void updateDeallocThreshold(BufferUsage usage); - - // Free the storage if we decide it isn't being used very often. - gl::Error checkForDeallocation(BufferUsage usage); - - // For some cases of uniform buffer storage, we can't deallocate system memory storage. - bool canDeallocateSystemMemory() const; + void updateSystemMemoryDeallocThreshold(); Renderer11 *mRenderer; size_t mSize; BufferStorage *mMappedStorage; - std::array mBufferStorages; - - // These two arrays are used to track when to free unused storage. - std::array mDeallocThresholds; - std::array mIdleness; + std::vector mBufferStorages; // Cache of D3D11 constant buffer for specific ranges of buffer data. // This is used to emulate UBO ranges on 11.0 devices. @@ -147,6 +130,12 @@ class Buffer11 : public BufferD3D size_t mConstantBufferStorageAdditionalSize; unsigned int mMaxConstantBufferLruCount; + typedef std::pair BufferSRVPair; + std::map mBufferResourceViews; + + unsigned int mReadUsageCount; + unsigned int mSystemMemoryDeallocThreshold; + angle::BroadcastChannel mStaticBroadcastChannel; angle::BroadcastChannel mDirectBroadcastChannel; }; diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Clear11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Clear11.cpp index f42a59ced..d2d813895 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Clear11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Clear11.cpp @@ -34,40 +34,29 @@ namespace rx { template -static void ApplyVertices(const gl::Extents &framebufferSize, - const gl::Rectangle *scissor, - const gl::Color &color, - float depth, - void *buffer) +static void ApplyVertices(const gl::Extents &framebufferSize, const gl::Rectangle *scissor, const gl::Color &color, float depth, void *buffer) { - d3d11::PositionDepthColorVertex *vertices = - reinterpret_cast *>(buffer); + d3d11::PositionDepthColorVertex *vertices = reinterpret_cast*>(buffer); float depthClear = gl::clamp01(depth); - float left = -1.0f; - float right = 1.0f; - float top = -1.0f; - float bottom = 1.0f; + float left = -1.0f; + float right = 1.0f; + float top = -1.0f; + float bottom = 1.0f; // Clip the quad coordinates to the scissor if needed if (scissor != nullptr) { - left = std::max(left, (scissor->x / float(framebufferSize.width)) * 2.0f - 1.0f); - right = std::min( - right, ((scissor->x + scissor->width) / float(framebufferSize.width)) * 2.0f - 1.0f); - top = std::max(top, ((framebufferSize.height - scissor->y - scissor->height) / - float(framebufferSize.height)) * - 2.0f - - 1.0f); - bottom = std::min( - bottom, - ((framebufferSize.height - scissor->y) / float(framebufferSize.height)) * 2.0f - 1.0f); + left = std::max(left, (scissor->x / float(framebufferSize.width)) * 2.0f - 1.0f); + right = std::min(right, ((scissor->x + scissor->width) / float(framebufferSize.width)) * 2.0f - 1.0f); + top = std::max(top, ((framebufferSize.height - scissor->y - scissor->height) / float(framebufferSize.height)) * 2.0f - 1.0f); + bottom = std::min(bottom, ((framebufferSize.height - scissor->y) / float(framebufferSize.height)) * 2.0f - 1.0f); } - d3d11::SetPositionDepthColorVertex(vertices + 0, left, bottom, depthClear, color); - d3d11::SetPositionDepthColorVertex(vertices + 1, left, top, depthClear, color); + d3d11::SetPositionDepthColorVertex(vertices + 0, left, bottom, depthClear, color); + d3d11::SetPositionDepthColorVertex(vertices + 1, left, top, depthClear, color); d3d11::SetPositionDepthColorVertex(vertices + 2, right, bottom, depthClear, color); - d3d11::SetPositionDepthColorVertex(vertices + 3, right, top, depthClear, color); + d3d11::SetPositionDepthColorVertex(vertices + 3, right, top, depthClear, color); } Clear11::ClearShader::ClearShader(DXGI_FORMAT colorType, @@ -82,9 +71,10 @@ Clear11::ClearShader::ClearShader(DXGI_FORMAT colorType, vertexShader(vsByteCode, vsSize, vsDebugName), pixelShader(psByteCode, psSize, psDebugName) { - D3D11_INPUT_ELEMENT_DESC quadLayout[] = { - {"POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0}, - {"COLOR", 0, colorType, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0}, + D3D11_INPUT_ELEMENT_DESC quadLayout[] = + { + { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 }, + { "COLOR", 0, colorType, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 }, }; inputLayout = new d3d11::LazyInputLayout(quadLayout, 2, vsByteCode, vsSize, inputLayoutName); @@ -113,11 +103,11 @@ Clear11::Clear11(Renderer11 *renderer) ID3D11Device *device = renderer->getDevice(); D3D11_BUFFER_DESC vbDesc; - vbDesc.ByteWidth = sizeof(d3d11::PositionDepthColorVertex) * 4; - vbDesc.Usage = D3D11_USAGE_DYNAMIC; - vbDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER; - vbDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; - vbDesc.MiscFlags = 0; + vbDesc.ByteWidth = sizeof(d3d11::PositionDepthColorVertex) * 4; + vbDesc.Usage = D3D11_USAGE_DYNAMIC; + vbDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER; + vbDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; + vbDesc.MiscFlags = 0; vbDesc.StructureByteStride = 0; result = device->CreateBuffer(&vbDesc, nullptr, &mVertexBuffer); @@ -125,15 +115,15 @@ Clear11::Clear11(Renderer11 *renderer) d3d11::SetDebugName(mVertexBuffer, "Clear11 masked clear vertex buffer"); D3D11_RASTERIZER_DESC rsDesc; - rsDesc.FillMode = D3D11_FILL_SOLID; - rsDesc.CullMode = D3D11_CULL_NONE; + rsDesc.FillMode = D3D11_FILL_SOLID; + rsDesc.CullMode = D3D11_CULL_NONE; rsDesc.FrontCounterClockwise = FALSE; - rsDesc.DepthBias = 0; - rsDesc.DepthBiasClamp = 0.0f; - rsDesc.SlopeScaledDepthBias = 0.0f; - rsDesc.DepthClipEnable = TRUE; - rsDesc.ScissorEnable = FALSE; - rsDesc.MultisampleEnable = FALSE; + rsDesc.DepthBias = 0; + rsDesc.DepthBiasClamp = 0.0f; + rsDesc.SlopeScaledDepthBias = 0.0f; + rsDesc.DepthClipEnable = TRUE; + rsDesc.ScissorEnable = FALSE; + rsDesc.MultisampleEnable = FALSE; rsDesc.AntialiasedLineEnable = FALSE; result = device->CreateRasterizerState(&rsDesc, &mRasterizerState); @@ -142,36 +132,51 @@ Clear11::Clear11(Renderer11 *renderer) if (mRenderer->getRenderer11DeviceCaps().featureLevel <= D3D_FEATURE_LEVEL_9_3) { - mFloatClearShader = - new ClearShader(DXGI_FORMAT_R32G32B32A32_FLOAT, "Clear11 Float IL", g_VS_ClearFloat, - ArraySize(g_VS_ClearFloat), "Clear11 Float VS", g_PS_ClearFloat_FL9, - ArraySize(g_PS_ClearFloat_FL9), "Clear11 Float PS"); + mFloatClearShader = new ClearShader(DXGI_FORMAT_R32G32B32A32_FLOAT, + "Clear11 Float IL", + g_VS_ClearFloat, + ArraySize(g_VS_ClearFloat), + "Clear11 Float VS", + g_PS_ClearFloat_FL9, + ArraySize(g_PS_ClearFloat_FL9), + "Clear11 Float PS"); } else { - mFloatClearShader = - new ClearShader(DXGI_FORMAT_R32G32B32A32_FLOAT, "Clear11 Float IL", g_VS_ClearFloat, - ArraySize(g_VS_ClearFloat), "Clear11 Float VS", g_PS_ClearFloat, - ArraySize(g_PS_ClearFloat), "Clear11 Float PS"); + mFloatClearShader = new ClearShader(DXGI_FORMAT_R32G32B32A32_FLOAT, + "Clear11 Float IL", + g_VS_ClearFloat, + ArraySize(g_VS_ClearFloat), + "Clear11 Float VS", + g_PS_ClearFloat, + ArraySize(g_PS_ClearFloat), + "Clear11 Float PS"); } if (renderer->isES3Capable()) { - mUintClearShader = - new ClearShader(DXGI_FORMAT_R32G32B32A32_UINT, "Clear11 UINT IL", g_VS_ClearUint, - ArraySize(g_VS_ClearUint), "Clear11 UINT VS", g_PS_ClearUint, - ArraySize(g_PS_ClearUint), "Clear11 UINT PS"); - mIntClearShader = - new ClearShader(DXGI_FORMAT_R32G32B32A32_UINT, "Clear11 SINT IL", g_VS_ClearSint, - ArraySize(g_VS_ClearSint), "Clear11 SINT VS", g_PS_ClearSint, - ArraySize(g_PS_ClearSint), "Clear11 SINT PS"); + mUintClearShader = new ClearShader(DXGI_FORMAT_R32G32B32A32_UINT, + "Clear11 UINT IL", + g_VS_ClearUint, + ArraySize(g_VS_ClearUint), + "Clear11 UINT VS", + g_PS_ClearUint, + ArraySize(g_PS_ClearUint), + "Clear11 UINT PS"); + mIntClearShader = new ClearShader(DXGI_FORMAT_R32G32B32A32_UINT, + "Clear11 SINT IL", + g_VS_ClearSint, + ArraySize(g_VS_ClearSint), + "Clear11 SINT VS", + g_PS_ClearSint, + ArraySize(g_PS_ClearSint), + "Clear11 SINT PS"); } } Clear11::~Clear11() { - for (ClearBlendStateMap::iterator i = mClearBlendStates.begin(); i != mClearBlendStates.end(); - i++) + for (ClearBlendStateMap::iterator i = mClearBlendStates.begin(); i != mClearBlendStates.end(); i++) { SafeRelease(i->second); } @@ -181,8 +186,7 @@ Clear11::~Clear11() SafeDelete(mUintClearShader); SafeDelete(mIntClearShader); - for (ClearDepthStencilStateMap::iterator i = mClearDepthStencilStates.begin(); - i != mClearDepthStencilStates.end(); i++) + for (ClearDepthStencilStateMap::iterator i = mClearDepthStencilStates.begin(); i != mClearDepthStencilStates.end(); i++) { SafeRelease(i->second); } @@ -195,9 +199,9 @@ Clear11::~Clear11() gl::Error Clear11::clearFramebuffer(const ClearParameters &clearParams, const gl::FramebufferState &fboData) { - const auto &colorAttachments = fboData.getColorAttachments(); - const auto &drawBufferStates = fboData.getDrawBufferStates(); - const auto *depthAttachment = fboData.getDepthAttachment(); + const auto &colorAttachments = fboData.getColorAttachments(); + const auto &drawBufferStates = fboData.getDrawBufferStates(); + const auto *depthAttachment = fboData.getDepthAttachment(); const auto *stencilAttachment = fboData.getStencilAttachment(); ASSERT(colorAttachments.size() == drawBufferStates.size()); @@ -205,24 +209,20 @@ gl::Error Clear11::clearFramebuffer(const ClearParameters &clearParams, // Iterate over the color buffers which require clearing and determine if they can be // cleared with ID3D11DeviceContext::ClearRenderTargetView or ID3D11DeviceContext1::ClearView. // This requires: - // 1) The render target is being cleared to a float value (will be cast to integer when clearing - // integer + // 1) The render target is being cleared to a float value (will be cast to integer when clearing integer // render targets as expected but does not work the other way around) // 2) The format of the render target has no color channels that are currently masked out. - // Clear the easy-to-clear buffers on the spot and accumulate the ones that require special - // work. + // Clear the easy-to-clear buffers on the spot and accumulate the ones that require special work. // // If these conditions are met, and: // - No scissored clear is needed, then clear using ID3D11DeviceContext::ClearRenderTargetView. // - A scissored clear is needed then clear using ID3D11DeviceContext1::ClearView if available. // Otherwise draw a quad. // - // Also determine if the depth stencil can be cleared with - // ID3D11DeviceContext::ClearDepthStencilView + // Also determine if the depth stencil can be cleared with ID3D11DeviceContext::ClearDepthStencilView // by checking if the stencil write mask covers the entire stencil. // - // To clear the remaining buffers, quads must be drawn containing an int, uint or float vertex - // color + // To clear the remaining buffers, quads must be drawn containing an int, uint or float vertex color // attribute. gl::Extents framebufferSize; @@ -246,7 +246,7 @@ gl::Error Clear11::clearFramebuffer(const ClearParameters &clearParams, return gl::Error(GL_INVALID_OPERATION); } - if (clearParams.scissorEnabled && (clearParams.scissor.x >= framebufferSize.width || + if (clearParams.scissorEnabled && (clearParams.scissor.x >= framebufferSize.width || clearParams.scissor.y >= framebufferSize.height || clearParams.scissor.x + clearParams.scissor.width <= 0 || clearParams.scissor.y + clearParams.scissor.height <= 0)) @@ -255,18 +255,16 @@ gl::Error Clear11::clearFramebuffer(const ClearParameters &clearParams, return gl::Error(GL_NO_ERROR); } - bool needScissoredClear = - clearParams.scissorEnabled && - (clearParams.scissor.x > 0 || clearParams.scissor.y > 0 || - clearParams.scissor.x + clearParams.scissor.width < framebufferSize.width || - clearParams.scissor.y + clearParams.scissor.height < framebufferSize.height); + bool needScissoredClear = clearParams.scissorEnabled && (clearParams.scissor.x > 0 || clearParams.scissor.y > 0 || + clearParams.scissor.x + clearParams.scissor.width < framebufferSize.width || + clearParams.scissor.y + clearParams.scissor.height < framebufferSize.height); std::vector maskedClearRenderTargets; - RenderTarget11 *maskedClearDepthStencil = nullptr; + RenderTarget11* maskedClearDepthStencil = nullptr; - ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext(); + ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext(); ID3D11DeviceContext1 *deviceContext1 = mRenderer->getDeviceContext1IfSupported(); - ID3D11Device *device = mRenderer->getDevice(); + ID3D11Device *device = mRenderer->getDevice(); for (size_t colorAttachmentIndex = 0; colorAttachmentIndex < colorAttachments.size(); colorAttachmentIndex++) @@ -277,7 +275,11 @@ gl::Error Clear11::clearFramebuffer(const ClearParameters &clearParams, drawBufferStates[colorAttachmentIndex] != GL_NONE) { RenderTarget11 *renderTarget = nullptr; - ANGLE_TRY(attachment.getRenderTarget(&renderTarget)); + gl::Error error = attachment.getRenderTarget(&renderTarget); + if (error.isError()) + { + return error; + } const gl::InternalFormat &formatInfo = *attachment.getFormat().info; @@ -309,8 +311,7 @@ gl::Error Clear11::clearFramebuffer(const ClearParameters &clearParams, (formatInfo.blueBits > 0 && !clearParams.colorMaskBlue) || (formatInfo.alphaBits > 0 && !clearParams.colorMaskAlpha)) { - // A masked clear is required, or a scissored clear is required and - // ID3D11DeviceContext1::ClearView is unavailable + // A masked clear is required, or a scissored clear is required and ID3D11DeviceContext1::ClearView is unavailable MaskedRenderTarget maskAndRt; bool clearColor = clearParams.clearColor[colorAttachmentIndex]; maskAndRt.colorMask[0] = (clearColor && clearParams.colorMaskRed); @@ -322,40 +323,39 @@ gl::Error Clear11::clearFramebuffer(const ClearParameters &clearParams, } else { - // ID3D11DeviceContext::ClearRenderTargetView or ID3D11DeviceContext1::ClearView is - // possible + // ID3D11DeviceContext::ClearRenderTargetView or ID3D11DeviceContext1::ClearView is possible ID3D11RenderTargetView *framebufferRTV = renderTarget->getRenderTargetView(); if (!framebufferRTV) { - return gl::Error(GL_OUT_OF_MEMORY, - "Internal render target view pointer unexpectedly null."); + return gl::Error(GL_OUT_OF_MEMORY, "Internal render target view pointer unexpectedly null."); } - const auto &nativeFormat = renderTarget->getFormatSet().format(); + const auto &dxgiFormatInfo = + d3d11::GetDXGIFormatInfo(renderTarget->getFormatSet().rtvFormat); - // Check if the actual format has a channel that the internal format does not and - // set them to the default values + // Check if the actual format has a channel that the internal format does not and set them to the + // default values float clearValues[4] = { - ((formatInfo.redBits == 0 && nativeFormat.redBits > 0) + ((formatInfo.redBits == 0 && dxgiFormatInfo.redBits > 0) ? 0.0f : clearParams.colorFClearValue.red), - ((formatInfo.greenBits == 0 && nativeFormat.greenBits > 0) + ((formatInfo.greenBits == 0 && dxgiFormatInfo.greenBits > 0) ? 0.0f : clearParams.colorFClearValue.green), - ((formatInfo.blueBits == 0 && nativeFormat.blueBits > 0) + ((formatInfo.blueBits == 0 && dxgiFormatInfo.blueBits > 0) ? 0.0f : clearParams.colorFClearValue.blue), - ((formatInfo.alphaBits == 0 && nativeFormat.alphaBits > 0) + ((formatInfo.alphaBits == 0 && dxgiFormatInfo.alphaBits > 0) ? 1.0f : clearParams.colorFClearValue.alpha), }; - if (formatInfo.alphaBits == 1) + if (dxgiFormatInfo.alphaBits == 1) { - // Some drivers do not correctly handle calling Clear() on a format with 1-bit - // alpha. They can incorrectly round all non-zero values up to 1.0f. Note that - // WARP does not do this. We should handle the rounding for them instead. + // Some drivers do not correctly handle calling Clear() on a format with 1-bit alpha. + // They can incorrectly round all non-zero values up to 1.0f. Note that WARP does not do this. + // We should handle the rounding for them instead. clearValues[3] = (clearParams.colorFClearValue.alpha >= 0.5f) ? 1.0f : 0.0f; } @@ -365,26 +365,16 @@ gl::Error Clear11::clearFramebuffer(const ClearParameters &clearParams, ASSERT(deviceContext1); D3D11_RECT rect; - rect.left = clearParams.scissor.x; - rect.right = clearParams.scissor.x + clearParams.scissor.width; - rect.top = clearParams.scissor.y; + rect.left = clearParams.scissor.x; + rect.right = clearParams.scissor.x + clearParams.scissor.width; + rect.top = clearParams.scissor.y; rect.bottom = clearParams.scissor.y + clearParams.scissor.height; deviceContext1->ClearView(framebufferRTV, clearValues, &rect, 1); - - if (mRenderer->getWorkarounds().callClearTwice) - { - deviceContext1->ClearView(framebufferRTV, clearValues, &rect, 1); - } } else { deviceContext->ClearRenderTargetView(framebufferRTV, clearValues); - - if (mRenderer->getWorkarounds().callClearTwice) - { - deviceContext->ClearRenderTargetView(framebufferRTV, clearValues); - } } } } @@ -392,20 +382,21 @@ gl::Error Clear11::clearFramebuffer(const ClearParameters &clearParams, if (clearParams.clearDepth || clearParams.clearStencil) { - const gl::FramebufferAttachment *attachment = - (depthAttachment != nullptr) ? depthAttachment : stencilAttachment; + const gl::FramebufferAttachment *attachment = (depthAttachment != nullptr) ? depthAttachment : stencilAttachment; ASSERT(attachment != nullptr); RenderTarget11 *renderTarget = nullptr; - ANGLE_TRY(attachment->getRenderTarget(&renderTarget)); + gl::Error error = attachment->getRenderTarget(&renderTarget); + if (error.isError()) + { + return error; + } - const auto &nativeFormat = renderTarget->getFormatSet().format(); + const auto &dxgiFormatInfo = + d3d11::GetDXGIFormatInfo(renderTarget->getFormatSet().dsvFormat); - unsigned int stencilUnmasked = - (stencilAttachment != nullptr) ? (1 << nativeFormat.stencilBits) - 1 : 0; - bool needMaskedStencilClear = - clearParams.clearStencil && - (clearParams.stencilWriteMask & stencilUnmasked) != stencilUnmasked; + unsigned int stencilUnmasked = (stencilAttachment != nullptr) ? (1 << dxgiFormatInfo.stencilBits) - 1 : 0; + bool needMaskedStencilClear = clearParams.clearStencil && (clearParams.stencilWriteMask & stencilUnmasked) != stencilUnmasked; if (needScissoredClear || needMaskedStencilClear) { @@ -416,156 +407,144 @@ gl::Error Clear11::clearFramebuffer(const ClearParameters &clearParams, ID3D11DepthStencilView *framebufferDSV = renderTarget->getDepthStencilView(); if (!framebufferDSV) { - return gl::Error(GL_OUT_OF_MEMORY, - "Internal depth stencil view pointer unexpectedly null."); + return gl::Error(GL_OUT_OF_MEMORY, "Internal depth stencil view pointer unexpectedly null."); } - UINT clearFlags = (clearParams.clearDepth ? D3D11_CLEAR_DEPTH : 0) | - (clearParams.clearStencil ? D3D11_CLEAR_STENCIL : 0); - FLOAT depthClear = gl::clamp01(clearParams.depthClearValue); + UINT clearFlags = (clearParams.clearDepth ? D3D11_CLEAR_DEPTH : 0) | + (clearParams.clearStencil ? D3D11_CLEAR_STENCIL : 0); + FLOAT depthClear = gl::clamp01(clearParams.depthClearValue); UINT8 stencilClear = clearParams.stencilClearValue & 0xFF; - deviceContext->ClearDepthStencilView(framebufferDSV, clearFlags, depthClear, - stencilClear); + deviceContext->ClearDepthStencilView(framebufferDSV, clearFlags, depthClear, stencilClear); } } - if (maskedClearRenderTargets.empty() && !maskedClearDepthStencil) + if (maskedClearRenderTargets.size() > 0 || maskedClearDepthStencil) { - return gl::NoError(); - } + // To clear the render targets and depth stencil in one pass: + // + // Render a quad clipped to the scissor rectangle which draws the clear color and a blend + // state that will perform the required color masking. + // + // The quad's depth is equal to the depth clear value with a depth stencil state that + // will enable or disable depth test/writes if the depth buffer should be cleared or not. + // + // The rasterizer state's stencil is set to always pass or fail based on if the stencil + // should be cleared or not with a stencil write mask of the stencil clear value. + // + // ====================================================================================== + // + // Luckily, the gl spec (ES 3.0.2 pg 183) states that the results of clearing a render- + // buffer that is not normalized fixed point or floating point with floating point values + // are undefined so we can just write floats to them and D3D11 will bit cast them to + // integers. + // + // Also, we don't have to worry about attempting to clear a normalized fixed/floating point + // buffer with integer values because there is no gl API call which would allow it, + // glClearBuffer* calls only clear a single renderbuffer at a time which is verified to + // be a compatible clear type. + + // Bind all the render targets which need clearing + ASSERT(maskedClearRenderTargets.size() <= mRenderer->getNativeCaps().maxDrawBuffers); + std::vector rtvs(maskedClearRenderTargets.size()); + for (unsigned int i = 0; i < maskedClearRenderTargets.size(); i++) + { + RenderTarget11 *renderTarget = maskedClearRenderTargets[i].renderTarget; + ID3D11RenderTargetView *rtv = renderTarget->getRenderTargetView(); + if (!rtv) + { + return gl::Error(GL_OUT_OF_MEMORY, "Internal render target view pointer unexpectedly null."); + } - // To clear the render targets and depth stencil in one pass: - // - // Render a quad clipped to the scissor rectangle which draws the clear color and a blend - // state that will perform the required color masking. - // - // The quad's depth is equal to the depth clear value with a depth stencil state that - // will enable or disable depth test/writes if the depth buffer should be cleared or not. - // - // The rasterizer state's stencil is set to always pass or fail based on if the stencil - // should be cleared or not with a stencil write mask of the stencil clear value. - // - // ====================================================================================== - // - // Luckily, the gl spec (ES 3.0.2 pg 183) states that the results of clearing a render- - // buffer that is not normalized fixed point or floating point with floating point values - // are undefined so we can just write floats to them and D3D11 will bit cast them to - // integers. - // - // Also, we don't have to worry about attempting to clear a normalized fixed/floating point - // buffer with integer values because there is no gl API call which would allow it, - // glClearBuffer* calls only clear a single renderbuffer at a time which is verified to - // be a compatible clear type. - - // Bind all the render targets which need clearing - ASSERT(maskedClearRenderTargets.size() <= mRenderer->getNativeCaps().maxDrawBuffers); - std::vector rtvs(maskedClearRenderTargets.size()); - for (unsigned int i = 0; i < maskedClearRenderTargets.size(); i++) - { - RenderTarget11 *renderTarget = maskedClearRenderTargets[i].renderTarget; - ID3D11RenderTargetView *rtv = renderTarget->getRenderTargetView(); - if (!rtv) + rtvs[i] = rtv; + } + ID3D11DepthStencilView *dsv = maskedClearDepthStencil ? maskedClearDepthStencil->getDepthStencilView() : nullptr; + + ID3D11BlendState *blendState = getBlendState(maskedClearRenderTargets); + const FLOAT blendFactors[4] = { 1.0f, 1.0f, 1.0f, 1.0f }; + const UINT sampleMask = 0xFFFFFFFF; + + ID3D11DepthStencilState *dsState = getDepthStencilState(clearParams); + const UINT stencilClear = clearParams.stencilClearValue & 0xFF; + + // Set the vertices + UINT vertexStride = 0; + const UINT startIdx = 0; + ClearShader *shader = nullptr; + D3D11_MAPPED_SUBRESOURCE mappedResource; + HRESULT result = deviceContext->Map(mVertexBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); + if (FAILED(result)) { - return gl::Error(GL_OUT_OF_MEMORY, - "Internal render target view pointer unexpectedly null."); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to map internal masked clear vertex buffer, HRESULT: 0x%X.", result); } - rtvs[i] = rtv; - } - ID3D11DepthStencilView *dsv = - maskedClearDepthStencil ? maskedClearDepthStencil->getDepthStencilView() : nullptr; - - ID3D11BlendState *blendState = getBlendState(maskedClearRenderTargets); - const FLOAT blendFactors[4] = {1.0f, 1.0f, 1.0f, 1.0f}; - const UINT sampleMask = 0xFFFFFFFF; - - ID3D11DepthStencilState *dsState = getDepthStencilState(clearParams); - const UINT stencilClear = clearParams.stencilClearValue & 0xFF; - - // Set the vertices - UINT vertexStride = 0; - const UINT startIdx = 0; - ClearShader *shader = nullptr; - D3D11_MAPPED_SUBRESOURCE mappedResource; - HRESULT result = - deviceContext->Map(mVertexBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); - if (FAILED(result)) - { - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to map internal masked clear vertex buffer, HRESULT: 0x%X.", - result); - } - - const gl::Rectangle *scissorPtr = clearParams.scissorEnabled ? &clearParams.scissor : nullptr; - switch (clearParams.colorClearType) - { - case GL_FLOAT: - ApplyVertices(framebufferSize, scissorPtr, clearParams.colorFClearValue, - clearParams.depthClearValue, mappedResource.pData); + const gl::Rectangle *scissorPtr = clearParams.scissorEnabled ? &clearParams.scissor : nullptr; + switch (clearParams.colorClearType) + { + case GL_FLOAT: + ApplyVertices(framebufferSize, scissorPtr, clearParams.colorFClearValue, clearParams.depthClearValue, mappedResource.pData); vertexStride = sizeof(d3d11::PositionDepthColorVertex); - shader = mFloatClearShader; + shader = mFloatClearShader; break; - case GL_UNSIGNED_INT: - ApplyVertices(framebufferSize, scissorPtr, clearParams.colorUIClearValue, - clearParams.depthClearValue, mappedResource.pData); + case GL_UNSIGNED_INT: + ApplyVertices(framebufferSize, scissorPtr, clearParams.colorUIClearValue, clearParams.depthClearValue, mappedResource.pData); vertexStride = sizeof(d3d11::PositionDepthColorVertex); - shader = mUintClearShader; + shader = mUintClearShader; break; - case GL_INT: - ApplyVertices(framebufferSize, scissorPtr, clearParams.colorIClearValue, - clearParams.depthClearValue, mappedResource.pData); + case GL_INT: + ApplyVertices(framebufferSize, scissorPtr, clearParams.colorIClearValue, clearParams.depthClearValue, mappedResource.pData); vertexStride = sizeof(d3d11::PositionDepthColorVertex); - shader = mIntClearShader; + shader = mIntClearShader; break; - default: + default: UNREACHABLE(); break; - } - - deviceContext->Unmap(mVertexBuffer, 0); - - // Set the viewport to be the same size as the framebuffer - D3D11_VIEWPORT viewport; - viewport.TopLeftX = 0; - viewport.TopLeftY = 0; - viewport.Width = static_cast(framebufferSize.width); - viewport.Height = static_cast(framebufferSize.height); - viewport.MinDepth = 0; - viewport.MaxDepth = 1; - deviceContext->RSSetViewports(1, &viewport); - - // Apply state - deviceContext->OMSetBlendState(blendState, blendFactors, sampleMask); - deviceContext->OMSetDepthStencilState(dsState, stencilClear); - deviceContext->RSSetState(mRasterizerState); - - // Apply shaders - deviceContext->IASetInputLayout(shader->inputLayout->resolve(device)); - deviceContext->VSSetShader(shader->vertexShader.resolve(device), nullptr, 0); - deviceContext->PSSetShader(shader->pixelShader.resolve(device), nullptr, 0); - deviceContext->GSSetShader(nullptr, nullptr, 0); - - // Apply vertex buffer - deviceContext->IASetVertexBuffers(0, 1, &mVertexBuffer, &vertexStride, &startIdx); - deviceContext->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); - - // Apply render targets - mRenderer->getStateManager()->setOneTimeRenderTargets(rtvs, dsv); - - // Draw the clear quad - deviceContext->Draw(4, 0); + } - // Clean up - mRenderer->markAllStateDirty(); + deviceContext->Unmap(mVertexBuffer, 0); + + // Set the viewport to be the same size as the framebuffer + D3D11_VIEWPORT viewport; + viewport.TopLeftX = 0; + viewport.TopLeftY = 0; + viewport.Width = static_cast(framebufferSize.width); + viewport.Height = static_cast(framebufferSize.height); + viewport.MinDepth = 0; + viewport.MaxDepth = 1; + deviceContext->RSSetViewports(1, &viewport); + + // Apply state + deviceContext->OMSetBlendState(blendState, blendFactors, sampleMask); + deviceContext->OMSetDepthStencilState(dsState, stencilClear); + deviceContext->RSSetState(mRasterizerState); + + // Apply shaders + deviceContext->IASetInputLayout(shader->inputLayout->resolve(device)); + deviceContext->VSSetShader(shader->vertexShader.resolve(device), nullptr, 0); + deviceContext->PSSetShader(shader->pixelShader.resolve(device), nullptr, 0); + deviceContext->GSSetShader(nullptr, nullptr, 0); + + // Apply vertex buffer + deviceContext->IASetVertexBuffers(0, 1, &mVertexBuffer, &vertexStride, &startIdx); + deviceContext->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); + + // Apply render targets + mRenderer->getStateManager()->setOneTimeRenderTargets(rtvs, dsv); + + // Draw the clear quad + deviceContext->Draw(4, 0); + + // Clean up + mRenderer->markAllStateDirty(); + } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } -ID3D11BlendState *Clear11::getBlendState(const std::vector &rts) +ID3D11BlendState *Clear11::getBlendState(const std::vector& rts) { ClearBlendInfo blendKey = {}; for (unsigned int i = 0; i < D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; i++) @@ -573,12 +552,11 @@ ID3D11BlendState *Clear11::getBlendState(const std::vector & if (i < rts.size()) { RenderTarget11 *rt = rts[i].renderTarget; - const gl::InternalFormat &formatInfo = - gl::GetInternalFormatInfo(rt->getInternalFormat()); + const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(rt->getInternalFormat()); - blendKey.maskChannels[i][0] = (rts[i].colorMask[0] && formatInfo.redBits > 0); + blendKey.maskChannels[i][0] = (rts[i].colorMask[0] && formatInfo.redBits > 0); blendKey.maskChannels[i][1] = (rts[i].colorMask[1] && formatInfo.greenBits > 0); - blendKey.maskChannels[i][2] = (rts[i].colorMask[2] && formatInfo.blueBits > 0); + blendKey.maskChannels[i][2] = (rts[i].colorMask[2] && formatInfo.blueBits > 0); blendKey.maskChannels[i][3] = (rts[i].colorMask[3] && formatInfo.alphaBits > 0); } else @@ -597,21 +575,22 @@ ID3D11BlendState *Clear11::getBlendState(const std::vector & } else { - D3D11_BLEND_DESC blendDesc = {0}; - blendDesc.AlphaToCoverageEnable = FALSE; + D3D11_BLEND_DESC blendDesc = { 0 }; + blendDesc.AlphaToCoverageEnable = FALSE; blendDesc.IndependentBlendEnable = (rts.size() > 1) ? TRUE : FALSE; for (unsigned int j = 0; j < D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; j++) { - blendDesc.RenderTarget[j].BlendEnable = FALSE; - blendDesc.RenderTarget[j].RenderTargetWriteMask = gl_d3d11::ConvertColorMask( - blendKey.maskChannels[j][0], blendKey.maskChannels[j][1], - blendKey.maskChannels[j][2], blendKey.maskChannels[j][3]); + blendDesc.RenderTarget[j].BlendEnable = FALSE; + blendDesc.RenderTarget[j].RenderTargetWriteMask = gl_d3d11::ConvertColorMask(blendKey.maskChannels[j][0], + blendKey.maskChannels[j][1], + blendKey.maskChannels[j][2], + blendKey.maskChannels[j][3]); } - ID3D11Device *device = mRenderer->getDevice(); - ID3D11BlendState *blendState = nullptr; - HRESULT result = device->CreateBlendState(&blendDesc, &blendState); + ID3D11Device *device = mRenderer->getDevice(); + ID3D11BlendState* blendState = nullptr; + HRESULT result = device->CreateBlendState(&blendDesc, &blendState); if (FAILED(result) || !blendState) { ERR("Unable to create a ID3D11BlendState, HRESULT: 0x%X.", result); @@ -626,10 +605,10 @@ ID3D11BlendState *Clear11::getBlendState(const std::vector & ID3D11DepthStencilState *Clear11::getDepthStencilState(const ClearParameters &clearParams) { - ClearDepthStencilInfo dsKey = {0}; - dsKey.clearDepth = clearParams.clearDepth; - dsKey.clearStencil = clearParams.clearStencil; - dsKey.stencilWriteMask = clearParams.stencilWriteMask & 0xFF; + ClearDepthStencilInfo dsKey = { 0 }; + dsKey.clearDepth = clearParams.clearDepth; + dsKey.clearStencil = clearParams.clearStencil; + dsKey.stencilWriteMask = clearParams.stencilWriteMask & 0xFF; ClearDepthStencilStateMap::const_iterator i = mClearDepthStencilStates.find(dsKey); if (i != mClearDepthStencilStates.end()) @@ -638,26 +617,25 @@ ID3D11DepthStencilState *Clear11::getDepthStencilState(const ClearParameters &cl } else { - D3D11_DEPTH_STENCIL_DESC dsDesc = {0}; - dsDesc.DepthEnable = dsKey.clearDepth ? TRUE : FALSE; - dsDesc.DepthWriteMask = - dsKey.clearDepth ? D3D11_DEPTH_WRITE_MASK_ALL : D3D11_DEPTH_WRITE_MASK_ZERO; - dsDesc.DepthFunc = D3D11_COMPARISON_ALWAYS; - dsDesc.StencilEnable = dsKey.clearStencil ? TRUE : FALSE; - dsDesc.StencilReadMask = 0; - dsDesc.StencilWriteMask = dsKey.stencilWriteMask; - dsDesc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_REPLACE; + D3D11_DEPTH_STENCIL_DESC dsDesc = { 0 }; + dsDesc.DepthEnable = dsKey.clearDepth ? TRUE : FALSE; + dsDesc.DepthWriteMask = dsKey.clearDepth ? D3D11_DEPTH_WRITE_MASK_ALL : D3D11_DEPTH_WRITE_MASK_ZERO; + dsDesc.DepthFunc = D3D11_COMPARISON_ALWAYS; + dsDesc.StencilEnable = dsKey.clearStencil ? TRUE : FALSE; + dsDesc.StencilReadMask = 0; + dsDesc.StencilWriteMask = dsKey.stencilWriteMask; + dsDesc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_REPLACE; dsDesc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_REPLACE; - dsDesc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_REPLACE; - dsDesc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS; - dsDesc.BackFace.StencilFailOp = D3D11_STENCIL_OP_REPLACE; - dsDesc.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_REPLACE; - dsDesc.BackFace.StencilPassOp = D3D11_STENCIL_OP_REPLACE; - dsDesc.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS; - - ID3D11Device *device = mRenderer->getDevice(); - ID3D11DepthStencilState *dsState = nullptr; - HRESULT result = device->CreateDepthStencilState(&dsDesc, &dsState); + dsDesc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_REPLACE; + dsDesc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS; + dsDesc.BackFace.StencilFailOp = D3D11_STENCIL_OP_REPLACE; + dsDesc.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_REPLACE; + dsDesc.BackFace.StencilPassOp = D3D11_STENCIL_OP_REPLACE; + dsDesc.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS; + + ID3D11Device *device = mRenderer->getDevice(); + ID3D11DepthStencilState* dsState = nullptr; + HRESULT result = device->CreateDepthStencilState(&dsDesc, &dsState); if (FAILED(result) || !dsState) { ERR("Unable to create a ID3D11DepthStencilState, HRESULT: 0x%X.", result); @@ -669,4 +647,5 @@ ID3D11DepthStencilState *Clear11::getDepthStencilState(const ClearParameters &cl return dsState; } } + } diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Context11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Context11.cpp index 05da453f0..4ebac6016 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Context11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Context11.cpp @@ -94,9 +94,9 @@ RenderbufferImpl *Context11::createRenderbuffer() return new RenderbufferD3D(mRenderer); } -BufferImpl *Context11::createBuffer(const gl::BufferState &state) +BufferImpl *Context11::createBuffer() { - Buffer11 *buffer = new Buffer11(state, mRenderer); + Buffer11 *buffer = new Buffer11(mRenderer); mRenderer->onBufferCreate(buffer); return buffer; } @@ -148,7 +148,7 @@ gl::Error Context11::finish() gl::Error Context11::drawArrays(GLenum mode, GLint first, GLsizei count) { - return mRenderer->genericDrawArrays(this, mode, first, count, 1); + return mRenderer->genericDrawArrays(this, mode, first, count, 0); } gl::Error Context11::drawArraysInstanced(GLenum mode, @@ -165,7 +165,7 @@ gl::Error Context11::drawElements(GLenum mode, const GLvoid *indices, const gl::IndexRange &indexRange) { - return mRenderer->genericDrawElements(this, mode, count, type, indices, 1, indexRange); + return mRenderer->genericDrawElements(this, mode, count, type, indices, 0, indexRange); } gl::Error Context11::drawElementsInstanced(GLenum mode, @@ -186,7 +186,7 @@ gl::Error Context11::drawRangeElements(GLenum mode, const GLvoid *indices, const gl::IndexRange &indexRange) { - return mRenderer->genericDrawElements(this, mode, count, type, indices, 1, indexRange); + return mRenderer->genericDrawElements(this, mode, count, type, indices, 0, indexRange); } GLenum Context11::getResetStatus() diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Context11.h b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Context11.h index e36a6e978..debf2f9be 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Context11.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Context11.h @@ -39,7 +39,7 @@ class Context11 : public ContextImpl RenderbufferImpl *createRenderbuffer() override; // Buffer creation - BufferImpl *createBuffer(const gl::BufferState &state) override; + BufferImpl *createBuffer() override; // Vertex Array creation VertexArrayImpl *createVertexArray(const gl::VertexArrayState &data) override; diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Fence11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Fence11.cpp index 1f0eedb6e..fb3a18336 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Fence11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Fence11.cpp @@ -4,8 +4,7 @@ // found in the LICENSE file. // -// Fence11.cpp: Defines the rx::FenceNV11 and rx::FenceSync11 classes which implement -// rx::FenceNVImpl and rx::FenceSyncImpl. +// Fence11.cpp: Defines the rx::FenceNV11 and rx::FenceSync11 classes which implement rx::FenceNVImpl and rx::FenceSyncImpl. #include "libANGLE/renderer/d3d/d3d11/Fence11.h" #include "libANGLE/renderer/d3d/d3d11/Renderer11.h" @@ -21,20 +20,19 @@ static const int kDeviceLostCheckPeriod = 64; // Template helpers for set and test operations. // -template +template gl::Error FenceSetHelper(FenceClass *fence) { if (!fence->mQuery) { D3D11_QUERY_DESC queryDesc; - queryDesc.Query = D3D11_QUERY_EVENT; + queryDesc.Query = D3D11_QUERY_EVENT; queryDesc.MiscFlags = 0; HRESULT result = fence->mRenderer->getDevice()->CreateQuery(&queryDesc, &fence->mQuery); if (FAILED(result)) { - return gl::Error(GL_OUT_OF_MEMORY, "Failed to create event query, result: 0x%X.", - result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create event query, result: 0x%X.", result); } } @@ -48,8 +46,7 @@ gl::Error FenceTestHelper(FenceClass *fence, bool flushCommandBuffer, GLboolean ASSERT(fence->mQuery); UINT getDataFlags = (flushCommandBuffer ? 0 : D3D11_ASYNC_GETDATA_DONOTFLUSH); - HRESULT result = - fence->mRenderer->getDeviceContext()->GetData(fence->mQuery, NULL, 0, getDataFlags); + HRESULT result = fence->mRenderer->getDeviceContext()->GetData(fence->mQuery, NULL, 0, getDataFlags); if (FAILED(result)) { @@ -65,7 +62,10 @@ gl::Error FenceTestHelper(FenceClass *fence, bool flushCommandBuffer, GLboolean // FenceNV11 // -FenceNV11::FenceNV11(Renderer11 *renderer) : FenceNVImpl(), mRenderer(renderer), mQuery(NULL) +FenceNV11::FenceNV11(Renderer11 *renderer) + : FenceNVImpl(), + mRenderer(renderer), + mQuery(NULL) { } @@ -92,7 +92,11 @@ gl::Error FenceNV11::finish() while (finished != GL_TRUE) { loopCount++; - ANGLE_TRY(FenceTestHelper(this, true, &finished)); + gl::Error error = FenceTestHelper(this, true, &finished); + if (error.isError()) + { + return error; + } if (loopCount % kDeviceLostCheckPeriod == 0 && mRenderer->testDeviceLost()) { @@ -103,7 +107,7 @@ gl::Error FenceNV11::finish() ScheduleYield(); } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } // @@ -121,10 +125,14 @@ gl::Error FenceNV11::finish() // We still opt to use QPC. In the present and moving forward, most newer systems will not suffer // from buggy implementations. -FenceSync11::FenceSync11(Renderer11 *renderer) : FenceSyncImpl(), mRenderer(renderer), mQuery(NULL) +FenceSync11::FenceSync11(Renderer11 *renderer) + : FenceSyncImpl(), + mRenderer(renderer), + mQuery(NULL) { LARGE_INTEGER counterFreqency = {}; - BOOL success = QueryPerformanceFrequency(&counterFreqency); + BOOL success = QueryPerformanceFrequency(&counterFreqency); + UNUSED_ASSERTION_VARIABLE(success); ASSERT(success); mCounterFrequency = counterFreqency.QuadPart; @@ -148,7 +156,7 @@ gl::Error FenceSync11::clientWait(GLbitfield flags, GLuint64 timeout, GLenum *ou bool flushCommandBuffer = ((flags & GL_SYNC_FLUSH_COMMANDS_BIT) != 0); GLboolean result = GL_FALSE; - gl::Error error = FenceTestHelper(this, flushCommandBuffer, &result); + gl::Error error = FenceTestHelper(this, flushCommandBuffer, &result); if (error.isError()) { *outResult = GL_WAIT_FAILED; @@ -168,11 +176,12 @@ gl::Error FenceSync11::clientWait(GLbitfield flags, GLuint64 timeout, GLenum *ou } LARGE_INTEGER currentCounter = {}; - BOOL success = QueryPerformanceCounter(¤tCounter); + BOOL success = QueryPerformanceCounter(¤tCounter); + UNUSED_ASSERTION_VARIABLE(success); ASSERT(success); LONGLONG timeoutInSeconds = static_cast(timeout) * static_cast(1000000ll); - LONGLONG endCounter = currentCounter.QuadPart + mCounterFrequency * timeoutInSeconds; + LONGLONG endCounter = currentCounter.QuadPart + mCounterFrequency * timeoutInSeconds; int loopCount = 0; while (currentCounter.QuadPart < endCounter && !result) @@ -180,6 +189,7 @@ gl::Error FenceSync11::clientWait(GLbitfield flags, GLuint64 timeout, GLenum *ou loopCount++; ScheduleYield(); success = QueryPerformanceCounter(¤tCounter); + UNUSED_ASSERTION_VARIABLE(success); ASSERT(success); error = FenceTestHelper(this, flushCommandBuffer, &result); @@ -212,19 +222,19 @@ gl::Error FenceSync11::clientWait(GLbitfield flags, GLuint64 timeout, GLenum *ou gl::Error FenceSync11::serverWait(GLbitfield flags, GLuint64 timeout) { // Because our API is currently designed to be called from a single thread, we don't need to do - // extra work for a server-side fence. GPU commands issued after the fence is created will - // always be processed after the fence is signaled. + // extra work for a server-side fence. GPU commands issued after the fence is created will always + // be processed after the fence is signaled. return gl::Error(GL_NO_ERROR); } gl::Error FenceSync11::getStatus(GLint *outResult) { GLboolean result = GL_FALSE; - gl::Error error = FenceTestHelper(this, false, &result); + gl::Error error = FenceTestHelper(this, false, &result); if (error.isError()) { - // The spec does not specify any way to report errors during the status test (e.g. device - // lost) so we report the fence is unblocked in case of error or signaled. + // The spec does not specify any way to report errors during the status test (e.g. device lost) + // so we report the fence is unblocked in case of error or signaled. *outResult = GL_SIGNALED; return error; @@ -234,4 +244,4 @@ gl::Error FenceSync11::getStatus(GLint *outResult) return gl::Error(GL_NO_ERROR); } -} // namespace rx +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp index 90922914a..4e67fa1ef 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp @@ -29,7 +29,7 @@ namespace rx namespace { -gl::Error MarkAttachmentsDirty(const gl::FramebufferAttachment *attachment) +gl::Error InvalidateAttachmentSwizzles(const gl::FramebufferAttachment *attachment) { if (attachment && attachment->type() == GL_TEXTURE) { @@ -45,7 +45,7 @@ gl::Error MarkAttachmentsDirty(const gl::FramebufferAttachment *attachment) TextureStorage11 *texStorage11 = GetAs(texStorage); ASSERT(texStorage11); - texStorage11->markLevelDirty(attachment->mipLevel()); + texStorage11->invalidateSwizzleCacheLevel(attachment->mipLevel()); } } @@ -89,18 +89,18 @@ Framebuffer11::~Framebuffer11() { } -gl::Error Framebuffer11::markAttachmentsDirty() const +gl::Error Framebuffer11::invalidateSwizzles() const { for (const auto &colorAttachment : mState.getColorAttachments()) { if (colorAttachment.isAttached()) { - ANGLE_TRY(MarkAttachmentsDirty(&colorAttachment)); + ANGLE_TRY(InvalidateAttachmentSwizzles(&colorAttachment)); } } - ANGLE_TRY(MarkAttachmentsDirty(mState.getDepthAttachment())); - ANGLE_TRY(MarkAttachmentsDirty(mState.getStencilAttachment())); + ANGLE_TRY(InvalidateAttachmentSwizzles(mState.getDepthAttachment())); + ANGLE_TRY(InvalidateAttachmentSwizzles(mState.getStencilAttachment())); return gl::NoError(); } @@ -128,7 +128,7 @@ gl::Error Framebuffer11::clearImpl(ContextImpl *context, const ClearParameters & ANGLE_TRY(clearer->clearFramebuffer(clearParams, mState)); } - ANGLE_TRY(markAttachmentsDirty()); + ANGLE_TRY(invalidateSwizzles()); return gl::NoError(); } @@ -182,10 +182,7 @@ gl::Error Framebuffer11::invalidateBase(size_t count, const GLenum *attachments, size_t colorIndex = (attachments[i] == GL_COLOR ? 0u : (attachments[i] - GL_COLOR_ATTACHMENT0)); auto colorAttachment = mState.getColorAttachment(colorIndex); - if (colorAttachment) - { - ANGLE_TRY(invalidateAttachment(colorAttachment)); - } + ANGLE_TRY(invalidateAttachment(colorAttachment)); break; } } @@ -354,14 +351,14 @@ gl::Error Framebuffer11::blitImpl(const gl::Rectangle &sourceArea, blitDepth, blitStencil)); } - ANGLE_TRY(markAttachmentsDirty()); + ANGLE_TRY(invalidateSwizzles()); return gl::NoError(); } GLenum Framebuffer11::getRenderTargetImplementationFormat(RenderTargetD3D *renderTarget) const { RenderTarget11 *renderTarget11 = GetAs(renderTarget); - return renderTarget11->getFormatSet().format().fboImplementationInternalFormat; + return renderTarget11->getFormatSet().format.fboImplementationInternalFormat; } void Framebuffer11::updateColorRenderTarget(size_t colorIndex) diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.h b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.h index b1683a206..813e0f32f 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.h @@ -28,7 +28,7 @@ class Framebuffer11 : public FramebufferD3D, public angle::SignalReceiver gl::Error invalidateSub(size_t count, const GLenum *attachments, const gl::Rectangle &area) override; // Invalidate the cached swizzles of all bound texture attachments. - gl::Error markAttachmentsDirty() const; + gl::Error invalidateSwizzles() const; void syncState(const gl::Framebuffer::DirtyBits &dirtyBits) override; diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Image11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Image11.cpp index 3c797f820..d27a8d53a 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Image11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Image11.cpp @@ -50,21 +50,25 @@ gl::Error Image11::generateMipmap(Image11 *dest, ASSERT(src->getHeight() == 1 || src->getHeight() / 2 == dest->getHeight()); D3D11_MAPPED_SUBRESOURCE destMapped; - ANGLE_TRY(dest->map(D3D11_MAP_WRITE, &destMapped)); + gl::Error error = dest->map(D3D11_MAP_WRITE, &destMapped); + if (error.isError()) + { + return error; + } D3D11_MAPPED_SUBRESOURCE srcMapped; - gl::Error error = src->map(D3D11_MAP_READ, &srcMapped); + error = src->map(D3D11_MAP_READ, &srcMapped); if (error.isError()) { dest->unmap(); return error; } - const uint8_t *sourceData = reinterpret_cast(srcMapped.pData); - uint8_t *destData = reinterpret_cast(destMapped.pData); + const uint8_t *sourceData = reinterpret_cast(srcMapped.pData); + uint8_t *destData = reinterpret_cast(destMapped.pData); auto mipGenerationFunction = - d3d11::Format::Get(src->getInternalFormat(), rendererCaps).format().mipGenerationFunction; + d3d11::Format::Get(src->getInternalFormat(), rendererCaps).format.mipGenerationFunction; mipGenerationFunction(src->getWidth(), src->getHeight(), src->getDepth(), sourceData, srcMapped.RowPitch, srcMapped.DepthPitch, destData, destMapped.RowPitch, destMapped.DepthPitch); @@ -74,14 +78,15 @@ gl::Error Image11::generateMipmap(Image11 *dest, dest->markDirty(); - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } bool Image11::isDirty() const { - // If mDirty is true AND mStagingTexture doesn't exist AND mStagingTexture doesn't need to be - // recovered from TextureStorage AND the texture doesn't require init data (i.e. a blank new - // texture will suffice) then isDirty should still return false. + // If mDirty is true + // AND mStagingTexture doesn't exist AND mStagingTexture doesn't need to be recovered from TextureStorage + // AND the texture doesn't require init data (i.e. a blank new texture will suffice) + // then isDirty should still return false. if (mDirty && !mStagingTexture && !mRecoverFromStorage) { const Renderer11DeviceCaps &deviceCaps = mRenderer->getRenderer11DeviceCaps(); @@ -95,45 +100,54 @@ bool Image11::isDirty() const return mDirty; } -gl::Error Image11::copyToStorage(TextureStorage *storage, - const gl::ImageIndex &index, - const gl::Box ®ion) +gl::Error Image11::copyToStorage(TextureStorage *storage, const gl::ImageIndex &index, const gl::Box ®ion) { TextureStorage11 *storage11 = GetAs(storage); - // If an app's behavior results in an Image11 copying its data to/from to a TextureStorage - // multiple times, then we should just keep the staging texture around to prevent the copying - // from impacting perf. We allow the Image11 to copy its data to/from TextureStorage once. This - // accounts for an app making a late call to glGenerateMipmap. + // If an app's behavior results in an Image11 copying its data to/from to a TextureStorage multiple times, + // then we should just keep the staging texture around to prevent the copying from impacting perf. + // We allow the Image11 to copy its data to/from TextureStorage once. + // This accounts for an app making a late call to glGenerateMipmap. bool attemptToReleaseStagingTexture = (mRecoveredFromStorageCount < 2); if (attemptToReleaseStagingTexture) { - // If another image is relying on this Storage for its data, then we must let it recover its - // data before we overwrite it. - ANGLE_TRY(storage11->releaseAssociatedImage(index, this)); + // If another image is relying on this Storage for its data, then we must let it recover its data before we overwrite it. + gl::Error error = storage11->releaseAssociatedImage(index, this); + if (error.isError()) + { + return error; + } } - ID3D11Resource *stagingTexture = NULL; + ID3D11Resource *stagingTexture = NULL; unsigned int stagingSubresourceIndex = 0; - ANGLE_TRY(getStagingTexture(&stagingTexture, &stagingSubresourceIndex)); - ANGLE_TRY( - storage11->updateSubresourceLevel(stagingTexture, stagingSubresourceIndex, index, region)); + gl::Error error = getStagingTexture(&stagingTexture, &stagingSubresourceIndex); + if (error.isError()) + { + return error; + } + + error = storage11->updateSubresourceLevel(stagingTexture, stagingSubresourceIndex, index, region); + if (error.isError()) + { + return error; + } // Once the image data has been copied into the Storage, we can release it locally. if (attemptToReleaseStagingTexture) { storage11->associateImage(this, index); releaseStagingTexture(); - mRecoverFromStorage = true; - mAssociatedStorage = storage11; + mRecoverFromStorage = true; + mAssociatedStorage = storage11; mAssociatedImageIndex = index; } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } -bool Image11::isAssociatedStorageValid(TextureStorage11 *textureStorage) const +bool Image11::isAssociatedStorageValid(TextureStorage11* textureStorage) const { return (mAssociatedStorage == textureStorage); } @@ -142,22 +156,28 @@ gl::Error Image11::recoverFromAssociatedStorage() { if (mRecoverFromStorage) { - ANGLE_TRY(createStagingTexture()); + gl::Error error = createStagingTexture(); + if (error.isError()) + { + return error; + } - bool textureStorageCorrect = - mAssociatedStorage->isAssociatedImageValid(mAssociatedImageIndex, this); + bool textureStorageCorrect = mAssociatedStorage->isAssociatedImageValid(mAssociatedImageIndex, this); - // This means that the cached TextureStorage has been modified after this Image11 released - // its copy of its data. This should not have happened. The TextureStorage should have told - // this Image11 to recover its data before it was overwritten. + // This means that the cached TextureStorage has been modified after this Image11 released its copy of its data. + // This should not have happened. The TextureStorage should have told this Image11 to recover its data before it was overwritten. ASSERT(textureStorageCorrect); if (textureStorageCorrect) { // CopySubResource from the Storage to the Staging texture gl::Box region(0, 0, 0, mWidth, mHeight, mDepth); - ANGLE_TRY(mAssociatedStorage->copySubresourceLevel(mStagingTexture, mStagingSubresource, - mAssociatedImageIndex, region)); + error = mAssociatedStorage->copySubresourceLevel(mStagingTexture, mStagingSubresource, mAssociatedImageIndex, region); + if (error.isError()) + { + return error; + } + mRecoveredFromStorageCount += 1; } @@ -165,7 +185,7 @@ gl::Error Image11::recoverFromAssociatedStorage() disassociateStorage(); } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } void Image11::disassociateStorage() @@ -175,18 +195,17 @@ void Image11::disassociateStorage() // Make the texturestorage release the Image11 too mAssociatedStorage->disassociateImage(mAssociatedImageIndex, this); - mRecoverFromStorage = false; - mAssociatedStorage = NULL; + mRecoverFromStorage = false; + mAssociatedStorage = NULL; mAssociatedImageIndex = gl::ImageIndex::MakeInvalid(); } } -bool Image11::redefine(GLenum target, - GLenum internalformat, - const gl::Extents &size, - bool forceRelease) +bool Image11::redefine(GLenum target, GLenum internalformat, const gl::Extents &size, bool forceRelease) { - if (mWidth != size.width || mHeight != size.height || mInternalFormat != internalformat || + if (mWidth != size.width || + mHeight != size.height || + mInternalFormat != internalformat || forceRelease) { // End the association with the TextureStorage, since that data will be out of date. @@ -194,11 +213,11 @@ bool Image11::redefine(GLenum target, disassociateStorage(); mRecoveredFromStorageCount = 0; - mWidth = size.width; - mHeight = size.height; - mDepth = size.depth; + mWidth = size.width; + mHeight = size.height; + mDepth = size.depth; mInternalFormat = internalformat; - mTarget = target; + mTarget = target; // compute the d3d format that will be used const d3d11::Format &formatInfo = @@ -224,87 +243,93 @@ DXGI_FORMAT Image11::getDXGIFormat() const return mDXGIFormat; } -// Store the pixel rectangle designated by xoffset,yoffset,width,height with pixels stored as -// format/type at input +// Store the pixel rectangle designated by xoffset,yoffset,width,height with pixels stored as format/type at input // into the target pixel rectangle. gl::Error Image11::loadData(const gl::Box &area, const gl::PixelUnpackState &unpack, - GLenum inputType, + GLenum type, const void *input, bool applySkipImages) { - const auto sizedInputFormat = getSizedInputFormat(inputType); - const gl::InternalFormat &inputFormat = gl::GetInternalFormatInfo(sizedInputFormat); + const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(mInternalFormat); GLuint inputRowPitch = 0; ANGLE_TRY_RESULT( - inputFormat.computeRowPitch(area.width, unpack.alignment, unpack.rowLength), + formatInfo.computeRowPitch(type, area.width, unpack.alignment, unpack.rowLength), inputRowPitch); GLuint inputDepthPitch = 0; - ANGLE_TRY_RESULT(gl::InternalFormat::computeDepthPitch(area.height, unpack.imageHeight, inputRowPitch), + ANGLE_TRY_RESULT(formatInfo.computeDepthPitch(type, area.width, area.height, unpack.alignment, + unpack.rowLength, unpack.imageHeight), inputDepthPitch); GLuint inputSkipBytes = 0; ANGLE_TRY_RESULT( - inputFormat.computeSkipBytes(inputRowPitch, inputDepthPitch, unpack, applySkipImages), + formatInfo.computeSkipBytes(inputRowPitch, inputDepthPitch, unpack.skipImages, + unpack.skipRows, unpack.skipPixels, applySkipImages), inputSkipBytes); const d3d11::DXGIFormatSize &dxgiFormatInfo = d3d11::GetDXGIFormatSizeInfo(mDXGIFormat); - GLuint outputPixelSize = dxgiFormatInfo.pixelBytes; + GLuint outputPixelSize = dxgiFormatInfo.pixelBytes; const d3d11::Format &d3dFormatInfo = d3d11::Format::Get(mInternalFormat, mRenderer->getRenderer11DeviceCaps()); - LoadImageFunction loadFunction = d3dFormatInfo.getLoadFunctions()(inputType).loadFunction; + LoadImageFunction loadFunction = d3dFormatInfo.loadFunctions(type).loadFunction; D3D11_MAPPED_SUBRESOURCE mappedImage; - ANGLE_TRY(map(D3D11_MAP_WRITE, &mappedImage)); + gl::Error error = map(D3D11_MAP_WRITE, &mappedImage); + if (error.isError()) + { + return error; + } - uint8_t *offsetMappedData = (reinterpret_cast(mappedImage.pData) + - (area.y * mappedImage.RowPitch + area.x * outputPixelSize + - area.z * mappedImage.DepthPitch)); + uint8_t *offsetMappedData = (reinterpret_cast(mappedImage.pData) + (area.y * mappedImage.RowPitch + area.x * outputPixelSize + area.z * mappedImage.DepthPitch)); loadFunction(area.width, area.height, area.depth, reinterpret_cast(input) + inputSkipBytes, inputRowPitch, inputDepthPitch, offsetMappedData, mappedImage.RowPitch, mappedImage.DepthPitch); unmap(); - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error Image11::loadCompressedData(const gl::Box &area, const void *input) { const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(mInternalFormat); GLsizei inputRowPitch = 0; - ANGLE_TRY_RESULT(formatInfo.computeRowPitch(area.width, 1, 0), inputRowPitch); + ANGLE_TRY_RESULT(formatInfo.computeRowPitch(GL_UNSIGNED_BYTE, area.width, 1, 0), inputRowPitch); GLsizei inputDepthPitch = 0; - ANGLE_TRY_RESULT(gl::InternalFormat::computeDepthPitch(area.height, 0, inputRowPitch), inputDepthPitch); + ANGLE_TRY_RESULT( + formatInfo.computeDepthPitch(GL_UNSIGNED_BYTE, area.width, area.height, 1, 0, 0), + inputDepthPitch); const d3d11::DXGIFormatSize &dxgiFormatInfo = d3d11::GetDXGIFormatSizeInfo(mDXGIFormat); - GLuint outputPixelSize = dxgiFormatInfo.pixelBytes; - GLuint outputBlockWidth = dxgiFormatInfo.blockWidth; - GLuint outputBlockHeight = dxgiFormatInfo.blockHeight; + GLuint outputPixelSize = dxgiFormatInfo.pixelBytes; + GLuint outputBlockWidth = dxgiFormatInfo.blockWidth; + GLuint outputBlockHeight = dxgiFormatInfo.blockHeight; ASSERT(area.x % outputBlockWidth == 0); ASSERT(area.y % outputBlockHeight == 0); const d3d11::Format &d3dFormatInfo = d3d11::Format::Get(mInternalFormat, mRenderer->getRenderer11DeviceCaps()); - LoadImageFunction loadFunction = - d3dFormatInfo.getLoadFunctions()(GL_UNSIGNED_BYTE).loadFunction; + LoadImageFunction loadFunction = d3dFormatInfo.loadFunctions(GL_UNSIGNED_BYTE).loadFunction; D3D11_MAPPED_SUBRESOURCE mappedImage; - ANGLE_TRY(map(D3D11_MAP_WRITE, &mappedImage)); + gl::Error error = map(D3D11_MAP_WRITE, &mappedImage); + if (error.isError()) + { + return error; + } - uint8_t *offsetMappedData = - reinterpret_cast(mappedImage.pData) + - ((area.y / outputBlockHeight) * mappedImage.RowPitch + - (area.x / outputBlockWidth) * outputPixelSize + area.z * mappedImage.DepthPitch); + uint8_t* offsetMappedData = reinterpret_cast(mappedImage.pData) + ((area.y / outputBlockHeight) * mappedImage.RowPitch + + (area.x / outputBlockWidth) * outputPixelSize + + area.z * mappedImage.DepthPitch); - loadFunction(area.width, area.height, area.depth, reinterpret_cast(input), - inputRowPitch, inputDepthPitch, offsetMappedData, mappedImage.RowPitch, - mappedImage.DepthPitch); + loadFunction(area.width, area.height, area.depth, + reinterpret_cast(input), inputRowPitch, inputDepthPitch, + offsetMappedData, mappedImage.RowPitch, mappedImage.DepthPitch); unmap(); - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error Image11::copyFromTexStorage(const gl::ImageIndex &imageIndex, TextureStorage *source) @@ -312,9 +337,13 @@ gl::Error Image11::copyFromTexStorage(const gl::ImageIndex &imageIndex, TextureS TextureStorage11 *storage11 = GetAs(source); ID3D11Resource *resource = nullptr; - ANGLE_TRY(storage11->getResource(&resource)); + gl::Error error = storage11->getResource(&resource); + if (error.isError()) + { + return error; + } - UINT subresourceIndex = storage11->getSubresourceIndex(imageIndex); + UINT subresourceIndex = storage11->getSubresourceIndex(imageIndex); TextureHelper11 textureHelper = TextureHelper11::MakeAndReference(resource, storage11->getFormatSet()); @@ -336,7 +365,11 @@ gl::Error Image11::copyFromFramebuffer(const gl::Offset &destOffset, if (d3d11Format.texFormat == mDXGIFormat && sourceInternalFormat == mInternalFormat) { RenderTargetD3D *renderTarget = nullptr; - ANGLE_TRY(srcAttachment->getRenderTarget(&renderTarget)); + gl::Error error = srcAttachment->getRenderTarget(&renderTarget); + if (error.isError()) + { + return error; + } RenderTarget11 *rt11 = GetAs(renderTarget); ASSERT(rt11->getTexture()); @@ -352,7 +385,11 @@ gl::Error Image11::copyFromFramebuffer(const gl::Offset &destOffset, // This format requires conversion, so we must copy the texture to staging and manually convert // via readPixels D3D11_MAPPED_SUBRESOURCE mappedImage; - ANGLE_TRY(map(D3D11_MAP_WRITE, &mappedImage)); + gl::Error error = map(D3D11_MAP_WRITE, &mappedImage); + if (error.isError()) + { + return error; + } // determine the offset coordinate into the destination buffer const auto &dxgiFormatInfo = d3d11::GetDXGIFormatSizeInfo(mDXGIFormat); @@ -366,8 +403,7 @@ gl::Error Image11::copyFromFramebuffer(const gl::Offset &destOffset, const auto &destD3D11Format = d3d11::Format::Get(mInternalFormat, mRenderer->getRenderer11DeviceCaps()); - auto loadFunction = destD3D11Format.getLoadFunctions()(destFormatInfo.type); - gl::Error error = gl::NoError(); + auto loadFunction = destD3D11Format.loadFunctions(destFormatInfo.type); if (loadFunction.requiresConversion) { size_t bufferSize = destFormatInfo.pixelBytes * sourceArea.width * sourceArea.height; @@ -404,7 +440,11 @@ gl::Error Image11::copyWithoutConversion(const gl::Offset &destOffset, // No conversion needed-- use copyback fastpath ID3D11Resource *stagingTexture = nullptr; unsigned int stagingSubresourceIndex = 0; - ANGLE_TRY(getStagingTexture(&stagingTexture, &stagingSubresourceIndex)); + gl::Error error = getStagingTexture(&stagingTexture, &stagingSubresourceIndex); + if (error.isError()) + { + return error; + } ID3D11Device *device = mRenderer->getDevice(); ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext(); @@ -433,7 +473,7 @@ gl::Error Image11::copyWithoutConversion(const gl::Offset &destOffset, resolveDesc.MiscFlags = 0; ID3D11Texture2D *srcTex2D = NULL; - HRESULT result = device->CreateTexture2D(&resolveDesc, NULL, &srcTex2D); + HRESULT result = device->CreateTexture2D(&resolveDesc, NULL, &srcTex2D); if (FAILED(result)) { return gl::Error(GL_OUT_OF_MEMORY, @@ -469,17 +509,20 @@ gl::Error Image11::copyWithoutConversion(const gl::Offset &destOffset, } mDirty = true; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } -gl::Error Image11::getStagingTexture(ID3D11Resource **outStagingTexture, - unsigned int *outSubresourceIndex) +gl::Error Image11::getStagingTexture(ID3D11Resource **outStagingTexture, unsigned int *outSubresourceIndex) { - ANGLE_TRY(createStagingTexture()); + gl::Error error = createStagingTexture(); + if (error.isError()) + { + return error; + } - *outStagingTexture = mStagingTexture; + *outStagingTexture = mStagingTexture; *outSubresourceIndex = mStagingSubresource; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } void Image11::releaseStagingTexture() @@ -501,8 +544,8 @@ gl::Error Image11::createStagingTexture() ID3D11Device *device = mRenderer->getDevice(); HRESULT result; - int lodOffset = 1; - GLsizei width = mWidth; + int lodOffset = 1; + GLsizei width = mWidth; GLsizei height = mHeight; // adjust size if needed for compressed textures @@ -513,24 +556,23 @@ gl::Error Image11::createStagingTexture() ID3D11Texture3D *newTexture = NULL; D3D11_TEXTURE3D_DESC desc; - desc.Width = width; - desc.Height = height; - desc.Depth = mDepth; - desc.MipLevels = lodOffset + 1; - desc.Format = dxgiFormat; - desc.Usage = D3D11_USAGE_STAGING; - desc.BindFlags = 0; + desc.Width = width; + desc.Height = height; + desc.Depth = mDepth; + desc.MipLevels = lodOffset + 1; + desc.Format = dxgiFormat; + desc.Usage = D3D11_USAGE_STAGING; + desc.BindFlags = 0; desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE; - desc.MiscFlags = 0; + desc.MiscFlags = 0; if (d3d11::Format::Get(mInternalFormat, mRenderer->getRenderer11DeviceCaps()) .dataInitializerFunction != NULL) { std::vector initialData; std::vector> textureData; - d3d11::GenerateInitialTextureData(mInternalFormat, mRenderer->getRenderer11DeviceCaps(), - width, height, mDepth, lodOffset + 1, &initialData, - &textureData); + d3d11::GenerateInitialTextureData(mInternalFormat, mRenderer->getRenderer11DeviceCaps(), width, height, mDepth, + lodOffset + 1, &initialData, &textureData); result = device->CreateTexture3D(&desc, initialData.data(), &newTexture); } @@ -542,39 +584,36 @@ gl::Error Image11::createStagingTexture() if (FAILED(result)) { ASSERT(result == E_OUTOFMEMORY); - return gl::Error(GL_OUT_OF_MEMORY, "Failed to create staging texture, result: 0x%X.", - result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create staging texture, result: 0x%X.", result); } - mStagingTexture = newTexture; + mStagingTexture = newTexture; mStagingSubresource = D3D11CalcSubresource(lodOffset, 0, lodOffset + 1); } - else if (mTarget == GL_TEXTURE_2D || mTarget == GL_TEXTURE_2D_ARRAY || - mTarget == GL_TEXTURE_CUBE_MAP) + else if (mTarget == GL_TEXTURE_2D || mTarget == GL_TEXTURE_2D_ARRAY || mTarget == GL_TEXTURE_CUBE_MAP) { ID3D11Texture2D *newTexture = NULL; D3D11_TEXTURE2D_DESC desc; - desc.Width = width; - desc.Height = height; - desc.MipLevels = lodOffset + 1; - desc.ArraySize = 1; - desc.Format = dxgiFormat; - desc.SampleDesc.Count = 1; + desc.Width = width; + desc.Height = height; + desc.MipLevels = lodOffset + 1; + desc.ArraySize = 1; + desc.Format = dxgiFormat; + desc.SampleDesc.Count = 1; desc.SampleDesc.Quality = 0; - desc.Usage = D3D11_USAGE_STAGING; - desc.BindFlags = 0; - desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE; - desc.MiscFlags = 0; + desc.Usage = D3D11_USAGE_STAGING; + desc.BindFlags = 0; + desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE; + desc.MiscFlags = 0; if (d3d11::Format::Get(mInternalFormat, mRenderer->getRenderer11DeviceCaps()) .dataInitializerFunction != NULL) { std::vector initialData; std::vector> textureData; - d3d11::GenerateInitialTextureData(mInternalFormat, mRenderer->getRenderer11DeviceCaps(), - width, height, 1, lodOffset + 1, &initialData, - &textureData); + d3d11::GenerateInitialTextureData(mInternalFormat, mRenderer->getRenderer11DeviceCaps(), width, height, 1, + lodOffset + 1, &initialData, &textureData); result = device->CreateTexture2D(&desc, initialData.data(), &newTexture); } @@ -586,11 +625,10 @@ gl::Error Image11::createStagingTexture() if (FAILED(result)) { ASSERT(result == E_OUTOFMEMORY); - return gl::Error(GL_OUT_OF_MEMORY, "Failed to create staging texture, result: 0x%X.", - result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create staging texture, result: 0x%X.", result); } - mStagingTexture = newTexture; + mStagingTexture = newTexture; mStagingSubresource = D3D11CalcSubresource(lodOffset, 0, lodOffset + 1); } else @@ -605,11 +643,19 @@ gl::Error Image11::createStagingTexture() gl::Error Image11::map(D3D11_MAP mapType, D3D11_MAPPED_SUBRESOURCE *map) { // We must recover from the TextureStorage if necessary, even for D3D11_MAP_WRITE. - ANGLE_TRY(recoverFromAssociatedStorage()); + gl::Error error = recoverFromAssociatedStorage(); + if (error.isError()) + { + return error; + } ID3D11Resource *stagingTexture = NULL; - unsigned int subresourceIndex = 0; - ANGLE_TRY(getStagingTexture(&stagingTexture, &subresourceIndex)); + unsigned int subresourceIndex = 0; + error = getStagingTexture(&stagingTexture, &subresourceIndex); + if (error.isError()) + { + return error; + } ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext(); diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Query11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Query11.cpp index 58b18ded5..b256cd51c 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Query11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Query11.cpp @@ -96,11 +96,17 @@ template gl::Error Query11::getResultBase(T *params) { ASSERT(mActiveQuery->query == nullptr); - ANGLE_TRY(flush(true)); + + gl::Error error = flush(true); + if (error.isError()) + { + return error; + } + ASSERT(mPendingQueries.empty()); *params = static_cast(mResultSum); - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error Query11::getResult(GLint *params) @@ -125,10 +131,14 @@ gl::Error Query11::getResult(GLuint64 *params) gl::Error Query11::isResultAvailable(bool *available) { - ANGLE_TRY(flush(false)); + gl::Error error = flush(false); + if (error.isError()) + { + return error; + } *available = mPendingQueries.empty(); - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error Query11::pause() @@ -157,7 +167,11 @@ gl::Error Query11::resume() { if (mActiveQuery->query == nullptr) { - ANGLE_TRY(flush(false)); + gl::Error error = flush(false); + if (error.isError()) + { + return error; + } GLenum queryType = getType(); D3D11_QUERY d3dQueryType = gl_d3d11::ConvertQueryType(queryType); @@ -181,7 +195,7 @@ gl::Error Query11::resume() D3D11_QUERY_DESC desc; desc.Query = D3D11_QUERY_TIMESTAMP; desc.MiscFlags = 0; - result = device->CreateQuery(&desc, &mActiveQuery->beginTimestamp); + result = device->CreateQuery(&desc, &mActiveQuery->beginTimestamp); if (FAILED(result)) { return gl::Error(GL_OUT_OF_MEMORY, "Internal query creation failed, result: 0x%X.", @@ -220,7 +234,11 @@ gl::Error Query11::flush(bool force) do { - ANGLE_TRY(testQuery(query)); + gl::Error error = testQuery(query); + if (error.isError()) + { + return error; + } if (!query->finished && !force) { return gl::Error(GL_NO_ERROR); @@ -231,7 +249,7 @@ gl::Error Query11::flush(bool force) mPendingQueries.pop_front(); } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error Query11::testQuery(QueryState *queryState) @@ -241,8 +259,8 @@ gl::Error Query11::testQuery(QueryState *queryState) ID3D11DeviceContext *context = mRenderer->getDeviceContext(); switch (getType()) { - case GL_ANY_SAMPLES_PASSED_EXT: - case GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT: + case GL_ANY_SAMPLES_PASSED_EXT: + case GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT: { ASSERT(queryState->query); UINT64 numPixels = 0; @@ -250,35 +268,31 @@ gl::Error Query11::testQuery(QueryState *queryState) context->GetData(queryState->query, &numPixels, sizeof(numPixels), 0); if (FAILED(result)) { - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to get the data of an internal query, result: 0x%X.", - result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to get the data of an internal query, result: 0x%X.", result); } if (result == S_OK) { queryState->finished = true; - mResult = (numPixels > 0) ? GL_TRUE : GL_FALSE; + mResult = (numPixels > 0) ? GL_TRUE : GL_FALSE; } } break; - case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: + case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: { ASSERT(queryState->query); - D3D11_QUERY_DATA_SO_STATISTICS soStats = {0}; + D3D11_QUERY_DATA_SO_STATISTICS soStats = { 0 }; HRESULT result = context->GetData(queryState->query, &soStats, sizeof(soStats), 0); if (FAILED(result)) { - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to get the data of an internal query, result: 0x%X.", - result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to get the data of an internal query, result: 0x%X.", result); } if (result == S_OK) { queryState->finished = true; - mResult = static_cast(soStats.NumPrimitivesWritten); + mResult = static_cast(soStats.NumPrimitivesWritten); } } break; @@ -355,7 +369,7 @@ gl::Error Query11::testQuery(QueryState *queryState) // to have any sort of continuity outside of a disjoint timestamp query block, which // GL depends on ASSERT(queryState->query == nullptr); - mResult = 0; + mResult = 0; queryState->finished = true; } break; @@ -382,9 +396,9 @@ gl::Error Query11::testQuery(QueryState *queryState) } break; - default: - UNREACHABLE(); - break; + default: + UNREACHABLE(); + break; } if (!queryState->finished && mRenderer->testDeviceLost()) @@ -394,7 +408,7 @@ gl::Error Query11::testQuery(QueryState *queryState) } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } -} // namespace rx +} diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/RenderStateCache.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/RenderStateCache.cpp index bd870bcbd..2ee25cfb6 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/RenderStateCache.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/RenderStateCache.cpp @@ -436,8 +436,7 @@ gl::Error RenderStateCache::getSamplerState(const gl::SamplerState &samplerState samplerDesc.AddressV = gl_d3d11::ConvertTextureWrap(samplerState.wrapT); samplerDesc.AddressW = gl_d3d11::ConvertTextureWrap(samplerState.wrapR); samplerDesc.MipLODBias = 0; - samplerDesc.MaxAnisotropy = - gl_d3d11::ConvertMaxAnisotropy(samplerState.maxAnisotropy, mDevice->GetFeatureLevel()); + samplerDesc.MaxAnisotropy = static_cast(samplerState.maxAnisotropy); samplerDesc.ComparisonFunc = gl_d3d11::ConvertComparison(samplerState.compareFunc); samplerDesc.BorderColor[0] = 0.0f; samplerDesc.BorderColor[1] = 0.0f; diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/RenderTarget11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/RenderTarget11.cpp index a042f447d..6449c9e6a 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/RenderTarget11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/RenderTarget11.cpp @@ -258,7 +258,7 @@ TextureRenderTarget11::TextureRenderTarget11(ID3D11RenderTargetView *rtv, { mSubresourceIndex = GetRTVSubresourceIndex(mTexture, mRenderTarget); } - ASSERT(mFormatSet.formatID != angle::Format::ID::NONE || mWidth == 0 || mHeight == 0); + ASSERT(mFormatSet.format.id != angle::Format::ID::NONE || mWidth == 0 || mHeight == 0); } TextureRenderTarget11::TextureRenderTarget11(ID3D11DepthStencilView *dsv, @@ -302,7 +302,7 @@ TextureRenderTarget11::TextureRenderTarget11(ID3D11DepthStencilView *dsv, { mSubresourceIndex = GetDSVSubresourceIndex(mTexture, mDepthStencil); } - ASSERT(mFormatSet.formatID != angle::Format::ID::NONE || mWidth == 0 || mHeight == 0); + ASSERT(mFormatSet.format.id != angle::Format::ID::NONE || mWidth == 0 || mHeight == 0); } TextureRenderTarget11::~TextureRenderTarget11() diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp index 8b4abaf9c..dcc2233fc 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp @@ -98,6 +98,23 @@ enum MAX_TEXTURE_IMAGE_UNITS_VTF_SM4 = 16 }; +void CalculateConstantBufferParams(GLintptr offset, GLsizeiptr size, UINT *outFirstConstant, UINT *outNumConstants) +{ + // The offset must be aligned to 256 bytes (should have been enforced by glBindBufferRange). + ASSERT(offset % 256 == 0); + + // firstConstant and numConstants are expressed in constants of 16-bytes. Furthermore they must be a multiple of 16 constants. + *outFirstConstant = static_cast(offset / 16); + + // The GL size is not required to be aligned to a 256 bytes boundary. + // Round the size up to a 256 bytes boundary then express the results in constants of 16-bytes. + *outNumConstants = static_cast(rx::roundUp(size, static_cast(256)) / 16); + + // Since the size is rounded up, firstConstant + numConstants may be bigger than the actual size of the buffer. + // This behaviour is explictly allowed according to the documentation on ID3D11DeviceContext1::PSSetConstantBuffers1 + // https://msdn.microsoft.com/en-us/library/windows/desktop/hh404649%28v=vs.85%29.aspx +} + enum ANGLEFeatureLevel { ANGLE_FEATURE_LEVEL_INVALID, @@ -113,20 +130,14 @@ ANGLEFeatureLevel GetANGLEFeatureLevel(D3D_FEATURE_LEVEL d3dFeatureLevel) { switch (d3dFeatureLevel) { - case D3D_FEATURE_LEVEL_9_3: - return ANGLE_FEATURE_LEVEL_9_3; - case D3D_FEATURE_LEVEL_10_0: - return ANGLE_FEATURE_LEVEL_10_0; - case D3D_FEATURE_LEVEL_10_1: - return ANGLE_FEATURE_LEVEL_10_1; - case D3D_FEATURE_LEVEL_11_0: - return ANGLE_FEATURE_LEVEL_11_0; - // Note: we don't ever request a 11_1 device, because this gives - // an E_INVALIDARG error on systems that don't have the platform update. - case D3D_FEATURE_LEVEL_11_1: - return ANGLE_FEATURE_LEVEL_11_1; - default: - return ANGLE_FEATURE_LEVEL_INVALID; + case D3D_FEATURE_LEVEL_9_3: return ANGLE_FEATURE_LEVEL_9_3; + case D3D_FEATURE_LEVEL_10_0: return ANGLE_FEATURE_LEVEL_10_0; + case D3D_FEATURE_LEVEL_10_1: return ANGLE_FEATURE_LEVEL_10_1; + case D3D_FEATURE_LEVEL_11_0: return ANGLE_FEATURE_LEVEL_11_0; + // Note: we don't ever request a 11_1 device, because this gives + // an E_INVALIDARG error on systems that don't have the platform update. + case D3D_FEATURE_LEVEL_11_1: return ANGLE_FEATURE_LEVEL_11_1; + default: return ANGLE_FEATURE_LEVEL_INVALID; } } @@ -394,13 +405,13 @@ Renderer11::Renderer11(egl::Display *display) mAnnotator(nullptr) { mVertexDataManager = NULL; - mIndexDataManager = NULL; + mIndexDataManager = NULL; - mLineLoopIB = NULL; - mTriangleFanIB = NULL; + mLineLoopIB = NULL; + mTriangleFanIB = NULL; mAppliedIBChanged = false; - mBlit = NULL; + mBlit = NULL; mPixelTransfer = NULL; mClear = NULL; @@ -409,31 +420,31 @@ Renderer11::Renderer11(egl::Display *display) mSyncQuery = NULL; - mRenderer11DeviceCaps.supportsClearView = false; + mRenderer11DeviceCaps.supportsClearView = false; mRenderer11DeviceCaps.supportsConstantBufferOffsets = false; - mRenderer11DeviceCaps.supportsDXGI1_2 = false; - mRenderer11DeviceCaps.B5G6R5support = 0; - mRenderer11DeviceCaps.B4G4R4A4support = 0; - mRenderer11DeviceCaps.B5G5R5A1support = 0; + mRenderer11DeviceCaps.supportsDXGI1_2 = false; + mRenderer11DeviceCaps.B5G6R5support = 0; + mRenderer11DeviceCaps.B4G4R4A4support = 0; + mRenderer11DeviceCaps.B5G5R5A1support = 0; - mD3d11Module = NULL; - mDxgiModule = NULL; + mD3d11Module = NULL; + mDxgiModule = NULL; mDCompModule = NULL; mCreatedWithDeviceEXT = false; mEGLDevice = nullptr; - mDevice = NULL; - mDeviceContext = NULL; + mDevice = NULL; + mDeviceContext = NULL; mDeviceContext1 = NULL; - mDxgiAdapter = NULL; - mDxgiFactory = NULL; + mDxgiAdapter = NULL; + mDxgiFactory = NULL; mDriverConstantBufferVS = NULL; mDriverConstantBufferPS = NULL; - mAppliedVertexShader = NULL; + mAppliedVertexShader = NULL; mAppliedGeometryShader = NULL; - mAppliedPixelShader = NULL; + mAppliedPixelShader = NULL; mAppliedTFObject = angle::DirtyPointer; @@ -509,7 +520,7 @@ Renderer11::Renderer11(egl::Display *display) // Also set EGL_PLATFORM_ANGLE_ANGLE variables, in case they're used elsewhere in ANGLE // mAvailableFeatureLevels defaults to empty - mRequestedDriverType = D3D_DRIVER_TYPE_UNKNOWN; + mRequestedDriverType = D3D_DRIVER_TYPE_UNKNOWN; mPresentPathFastEnabled = false; } @@ -540,17 +551,20 @@ egl::Error Renderer11::initialize() { HRESULT result = S_OK; - ANGLE_TRY(initializeD3DDevice()); + egl::Error error = initializeD3DDevice(); + if (error.isError()) + { + return error; + } #if !defined(ANGLE_ENABLE_WINDOWS_STORE) #if !ANGLE_SKIP_DXGI_1_2_CHECK { TRACE_EVENT0("gpu.angle", "Renderer11::initialize (DXGICheck)"); - // In order to create a swap chain for an HWND owned by another process, DXGI 1.2 is - // required. + // In order to create a swap chain for an HWND owned by another process, DXGI 1.2 is required. // The easiest way to check is to query for a IDXGIDevice2. bool requireDXGI1_2 = false; - HWND hwnd = WindowFromDC(mDisplay->getNativeDisplayId()); + HWND hwnd = WindowFromDC(mDisplay->getNativeDisplayId()); if (hwnd) { DWORD currentProcessId = GetCurrentProcessId(); @@ -566,12 +580,12 @@ egl::Error Renderer11::initialize() if (requireDXGI1_2) { IDXGIDevice2 *dxgiDevice2 = NULL; - result = mDevice->QueryInterface(__uuidof(IDXGIDevice2), (void **)&dxgiDevice2); + result = mDevice->QueryInterface(__uuidof(IDXGIDevice2), (void**)&dxgiDevice2); if (FAILED(result)) { - return egl::Error( - EGL_NOT_INITIALIZED, D3D11_INIT_INCOMPATIBLE_DXGI, - "DXGI 1.2 required to present to HWNDs owned by another process."); + return egl::Error(EGL_NOT_INITIALIZED, + D3D11_INIT_INCOMPATIBLE_DXGI, + "DXGI 1.2 required to present to HWNDs owned by another process."); } SafeRelease(dxgiDevice2); } @@ -587,19 +601,21 @@ egl::Error Renderer11::initialize() mDeviceContext1 = d3d11::DynamicCastComObject(mDeviceContext); IDXGIDevice *dxgiDevice = NULL; - result = mDevice->QueryInterface(__uuidof(IDXGIDevice), (void **)&dxgiDevice); + result = mDevice->QueryInterface(__uuidof(IDXGIDevice), (void**)&dxgiDevice); if (FAILED(result)) { - return egl::Error(EGL_NOT_INITIALIZED, D3D11_INIT_OTHER_ERROR, + return egl::Error(EGL_NOT_INITIALIZED, + D3D11_INIT_OTHER_ERROR, "Could not query DXGI device."); } - result = dxgiDevice->GetParent(__uuidof(IDXGIAdapter), (void **)&mDxgiAdapter); + result = dxgiDevice->GetParent(__uuidof(IDXGIAdapter), (void**)&mDxgiAdapter); if (FAILED(result)) { - return egl::Error(EGL_NOT_INITIALIZED, D3D11_INIT_OTHER_ERROR, + return egl::Error(EGL_NOT_INITIALIZED, + D3D11_INIT_OTHER_ERROR, "Could not retrieve DXGI adapter"); } @@ -607,28 +623,24 @@ egl::Error Renderer11::initialize() IDXGIAdapter2 *dxgiAdapter2 = d3d11::DynamicCastComObject(mDxgiAdapter); - // On D3D_FEATURE_LEVEL_9_*, IDXGIAdapter::GetDesc returns "Software Adapter" for the - // description string. - // If DXGI1.2 is available then IDXGIAdapter2::GetDesc2 can be used to get the actual - // hardware values. + // On D3D_FEATURE_LEVEL_9_*, IDXGIAdapter::GetDesc returns "Software Adapter" for the description string. + // If DXGI1.2 is available then IDXGIAdapter2::GetDesc2 can be used to get the actual hardware values. if (mRenderer11DeviceCaps.featureLevel <= D3D_FEATURE_LEVEL_9_3 && dxgiAdapter2 != NULL) { DXGI_ADAPTER_DESC2 adapterDesc2 = {}; - result = dxgiAdapter2->GetDesc2(&adapterDesc2); + result = dxgiAdapter2->GetDesc2(&adapterDesc2); if (SUCCEEDED(result)) { - // Copy the contents of the DXGI_ADAPTER_DESC2 into mAdapterDescription (a - // DXGI_ADAPTER_DESC). - memcpy(mAdapterDescription.Description, adapterDesc2.Description, - sizeof(mAdapterDescription.Description)); - mAdapterDescription.VendorId = adapterDesc2.VendorId; - mAdapterDescription.DeviceId = adapterDesc2.DeviceId; - mAdapterDescription.SubSysId = adapterDesc2.SubSysId; - mAdapterDescription.Revision = adapterDesc2.Revision; - mAdapterDescription.DedicatedVideoMemory = adapterDesc2.DedicatedVideoMemory; + // Copy the contents of the DXGI_ADAPTER_DESC2 into mAdapterDescription (a DXGI_ADAPTER_DESC). + memcpy(mAdapterDescription.Description, adapterDesc2.Description, sizeof(mAdapterDescription.Description)); + mAdapterDescription.VendorId = adapterDesc2.VendorId; + mAdapterDescription.DeviceId = adapterDesc2.DeviceId; + mAdapterDescription.SubSysId = adapterDesc2.SubSysId; + mAdapterDescription.Revision = adapterDesc2.Revision; + mAdapterDescription.DedicatedVideoMemory = adapterDesc2.DedicatedVideoMemory; mAdapterDescription.DedicatedSystemMemory = adapterDesc2.DedicatedSystemMemory; - mAdapterDescription.SharedSystemMemory = adapterDesc2.SharedSystemMemory; - mAdapterDescription.AdapterLuid = adapterDesc2.AdapterLuid; + mAdapterDescription.SharedSystemMemory = adapterDesc2.SharedSystemMemory; + mAdapterDescription.AdapterLuid = adapterDesc2.AdapterLuid; } } else @@ -640,23 +652,25 @@ egl::Error Renderer11::initialize() if (FAILED(result)) { - return egl::Error(EGL_NOT_INITIALIZED, D3D11_INIT_OTHER_ERROR, + return egl::Error(EGL_NOT_INITIALIZED, + D3D11_INIT_OTHER_ERROR, "Could not read DXGI adaptor description."); } memset(mDescription, 0, sizeof(mDescription)); wcstombs(mDescription, mAdapterDescription.Description, sizeof(mDescription) - 1); - result = mDxgiAdapter->GetParent(__uuidof(IDXGIFactory), (void **)&mDxgiFactory); + result = mDxgiAdapter->GetParent(__uuidof(IDXGIFactory), (void**)&mDxgiFactory); if (!mDxgiFactory || FAILED(result)) { - return egl::Error(EGL_NOT_INITIALIZED, D3D11_INIT_OTHER_ERROR, + return egl::Error(EGL_NOT_INITIALIZED, + D3D11_INIT_OTHER_ERROR, "Could not create DXGI factory."); } } -// Disable some spurious D3D11 debug warnings to prevent them from flooding the output log + // Disable some spurious D3D11 debug warnings to prevent them from flooding the output log #if defined(ANGLE_SUPPRESS_D3D11_HAZARD_WARNINGS) && defined(_DEBUG) { TRACE_EVENT0("gpu.angle", "Renderer11::initialize (HideWarnings)"); @@ -665,12 +679,14 @@ egl::Error Renderer11::initialize() if (SUCCEEDED(result)) { - D3D11_MESSAGE_ID hideMessages[] = { - D3D11_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET}; + D3D11_MESSAGE_ID hideMessages[] = + { + D3D11_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET + }; D3D11_INFO_QUEUE_FILTER filter = {}; filter.DenyList.NumIDs = static_cast(ArraySize(hideMessages)); - filter.DenyList.pIDList = hideMessages; + filter.DenyList.pIDList = hideMessages; infoQueue->AddStorageFilterEntries(&filter); SafeRelease(infoQueue); @@ -760,8 +776,12 @@ egl::Error Renderer11::initializeD3DDevice() else { // We should use the inputted D3D11 device instead - void *device = nullptr; - ANGLE_TRY(mEGLDevice->getDevice(&device)); + void *device = nullptr; + egl::Error error = mEGLDevice->getDevice(&device); + if (error.isError()) + { + return error; + } ID3D11Device *d3dDevice = reinterpret_cast(device); if (FAILED(d3dDevice->GetDeviceRemovedReason())) @@ -802,7 +822,7 @@ void Renderer11::initializeDevice() ASSERT(!mVertexDataManager && !mIndexDataManager); mVertexDataManager = new VertexDataManager(this); - mIndexDataManager = new IndexDataManager(this, getRendererClass()); + mIndexDataManager = new IndexDataManager(this, getRendererClass()); ASSERT(!mBlit); mBlit = new Blit11(this); @@ -856,7 +876,8 @@ void Renderer11::initializeDevice() angleFeatureLevel = ANGLE_FEATURE_LEVEL_11_1; } - ANGLE_HISTOGRAM_ENUMERATION("GPU.ANGLE.D3D11FeatureLevel", angleFeatureLevel, + ANGLE_HISTOGRAM_ENUMERATION("GPU.ANGLE.D3D11FeatureLevel", + angleFeatureLevel, NUM_ANGLE_FEATURE_LEVELS); } @@ -864,54 +885,30 @@ void Renderer11::populateRenderer11DeviceCaps() { HRESULT hr = S_OK; - LARGE_INTEGER version; - hr = mDxgiAdapter->CheckInterfaceSupport(__uuidof(IDXGIDevice), &version); - if (FAILED(hr)) - { - mRenderer11DeviceCaps.driverVersion.reset(); - ERR("Error querying driver version from DXGI Adapter."); - } - else - { - mRenderer11DeviceCaps.driverVersion = version; - } - if (mDeviceContext1) { D3D11_FEATURE_DATA_D3D11_OPTIONS d3d11Options; - HRESULT result = mDevice->CheckFeatureSupport(D3D11_FEATURE_D3D11_OPTIONS, &d3d11Options, - sizeof(D3D11_FEATURE_DATA_D3D11_OPTIONS)); + HRESULT result = mDevice->CheckFeatureSupport(D3D11_FEATURE_D3D11_OPTIONS, &d3d11Options, sizeof(D3D11_FEATURE_DATA_D3D11_OPTIONS)); if (SUCCEEDED(result)) { mRenderer11DeviceCaps.supportsClearView = (d3d11Options.ClearView != FALSE); - mRenderer11DeviceCaps.supportsConstantBufferOffsets = - (d3d11Options.ConstantBufferOffsetting != FALSE); + mRenderer11DeviceCaps.supportsConstantBufferOffsets = (d3d11Options.ConstantBufferOffsetting != FALSE); } } - if (getWorkarounds().disableB5G6R5Support) + hr = mDevice->CheckFormatSupport(DXGI_FORMAT_B5G6R5_UNORM, &(mRenderer11DeviceCaps.B5G6R5support)); + if (FAILED(hr)) { mRenderer11DeviceCaps.B5G6R5support = 0; } - else - { - hr = mDevice->CheckFormatSupport(DXGI_FORMAT_B5G6R5_UNORM, - &(mRenderer11DeviceCaps.B5G6R5support)); - if (FAILED(hr)) - { - mRenderer11DeviceCaps.B5G6R5support = 0; - } - } - hr = mDevice->CheckFormatSupport(DXGI_FORMAT_B4G4R4A4_UNORM, - &(mRenderer11DeviceCaps.B4G4R4A4support)); + hr = mDevice->CheckFormatSupport(DXGI_FORMAT_B4G4R4A4_UNORM, &(mRenderer11DeviceCaps.B4G4R4A4support)); if (FAILED(hr)) { mRenderer11DeviceCaps.B4G4R4A4support = 0; } - hr = mDevice->CheckFormatSupport(DXGI_FORMAT_B5G5R5A1_UNORM, - &(mRenderer11DeviceCaps.B5G5R5A1support)); + hr = mDevice->CheckFormatSupport(DXGI_FORMAT_B5G5R5A1_UNORM, &(mRenderer11DeviceCaps.B5G5R5A1support)); if (FAILED(hr)) { mRenderer11DeviceCaps.B5G5R5A1support = 0; @@ -920,6 +917,18 @@ void Renderer11::populateRenderer11DeviceCaps() IDXGIAdapter2 *dxgiAdapter2 = d3d11::DynamicCastComObject(mDxgiAdapter); mRenderer11DeviceCaps.supportsDXGI1_2 = (dxgiAdapter2 != nullptr); SafeRelease(dxgiAdapter2); + + LARGE_INTEGER version; + hr = mDxgiAdapter->CheckInterfaceSupport(__uuidof(IDXGIDevice), &version); + if (FAILED(hr)) + { + mRenderer11DeviceCaps.driverVersion.reset(); + ERR("Error querying driver version from DXGI Adapter."); + } + else + { + mRenderer11DeviceCaps.driverVersion = version; + } } egl::ConfigSet Renderer11::generateConfigs() @@ -943,8 +952,11 @@ egl::ConfigSet Renderer11::generateConfigs() colorBufferFormats.push_back(GL_RGB565); } - static const GLenum depthStencilBufferFormats[] = { - GL_NONE, GL_DEPTH24_STENCIL8_OES, GL_DEPTH_COMPONENT16, + static const GLenum depthStencilBufferFormats[] = + { + GL_NONE, + GL_DEPTH24_STENCIL8_OES, + GL_DEPTH_COMPONENT16, }; const gl::Caps &rendererCaps = getNativeCaps(); @@ -956,8 +968,7 @@ egl::ConfigSet Renderer11::generateConfigs() egl::ConfigSet configs; for (GLenum colorBufferInternalFormat : colorBufferFormats) { - const gl::TextureCaps &colorBufferFormatCaps = - rendererTextureCaps.get(colorBufferInternalFormat); + const gl::TextureCaps &colorBufferFormatCaps = rendererTextureCaps.get(colorBufferInternalFormat); if (!colorBufferFormatCaps.renderable) { continue; @@ -977,7 +988,6 @@ egl::ConfigSet Renderer11::generateConfigs() gl::GetInternalFormatInfo(colorBufferInternalFormat); const gl::InternalFormat &depthStencilBufferFormatInfo = gl::GetInternalFormatInfo(depthStencilBufferInternalFormat); - const gl::Version &maxVersion = getMaxSupportedESVersion(); egl::Config config; config.renderTargetFormat = colorBufferInternalFormat; @@ -990,27 +1000,20 @@ egl::ConfigSet Renderer11::generateConfigs() config.alphaSize = colorBufferFormatInfo.alphaBits; config.alphaMaskSize = 0; config.bindToTextureRGB = (colorBufferFormatInfo.format == GL_RGB); - config.bindToTextureRGBA = (colorBufferFormatInfo.format == GL_RGBA || + config.bindToTextureRGBA = (colorBufferFormatInfo.format == GL_RGBA || colorBufferFormatInfo.format == GL_BGRA_EXT); config.colorBufferType = EGL_RGB_BUFFER; config.configCaveat = EGL_NONE; config.configID = static_cast(configs.size() + 1); + // Can only support a conformant ES2 with feature level greater than 10.0. + config.conformant = (mRenderer11DeviceCaps.featureLevel >= D3D_FEATURE_LEVEL_10_0) + ? (EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT_KHR) + : 0; // PresentPathFast may not be conformant - config.conformant = 0; - if (!mPresentPathFastEnabled) + if (mPresentPathFastEnabled) { - // Can only support a conformant ES2 with feature level greater than 10.0. - if (mRenderer11DeviceCaps.featureLevel >= D3D_FEATURE_LEVEL_10_0) - { - config.conformant |= EGL_OPENGL_ES2_BIT; - } - - // We can only support conformant ES3 on FL 10.1+ - if (maxVersion.major >= 3) - { - config.conformant |= EGL_OPENGL_ES3_BIT_KHR; - } + config.conformant = 0; } config.depthSize = depthStencilBufferFormatInfo.depthBits; @@ -1018,24 +1021,21 @@ egl::ConfigSet Renderer11::generateConfigs() config.matchNativePixmap = EGL_NONE; config.maxPBufferWidth = rendererCaps.max2DTextureSize; config.maxPBufferHeight = rendererCaps.max2DTextureSize; - config.maxPBufferPixels = rendererCaps.max2DTextureSize * rendererCaps.max2DTextureSize; - config.maxSwapInterval = 4; - config.minSwapInterval = 0; - config.nativeRenderable = EGL_FALSE; - config.nativeVisualID = 0; - config.nativeVisualType = EGL_NONE; - - // Can't support ES3 at all without feature level 10.1 - config.renderableType = EGL_OPENGL_ES2_BIT; - if (maxVersion.major >= 3) - { - config.renderableType |= EGL_OPENGL_ES3_BIT_KHR; - } - - config.sampleBuffers = 0; // FIXME: enumerate multi-sampling - config.samples = 0; - config.stencilSize = depthStencilBufferFormatInfo.stencilBits; - config.surfaceType = EGL_PBUFFER_BIT | EGL_WINDOW_BIT | EGL_SWAP_BEHAVIOR_PRESERVED_BIT; + config.maxPBufferPixels = rendererCaps.max2DTextureSize * rendererCaps.max2DTextureSize; + config.maxSwapInterval = 4; + config.minSwapInterval = 0; + config.nativeRenderable = EGL_FALSE; + config.nativeVisualID = 0; + config.nativeVisualType = EGL_NONE; + // Can't support ES3 at all without feature level 10.0 + config.renderableType = + EGL_OPENGL_ES2_BIT | ((mRenderer11DeviceCaps.featureLevel >= D3D_FEATURE_LEVEL_10_0) + ? EGL_OPENGL_ES3_BIT_KHR + : 0); + config.sampleBuffers = 0; // FIXME: enumerate multi-sampling + config.samples = 0; + config.stencilSize = depthStencilBufferFormatInfo.stencilBits; + config.surfaceType = EGL_PBUFFER_BIT | EGL_WINDOW_BIT | EGL_SWAP_BEHAVIOR_PRESERVED_BIT; config.transparentType = EGL_NONE; config.transparentRedValue = 0; config.transparentGreenValue = 0; @@ -1059,9 +1059,8 @@ void Renderer11::generateDisplayExtensions(egl::DisplayExtensions *outExtensions outExtensions->d3dShareHandleClientBuffer = true; outExtensions->surfaceD3DTexture2DShareHandle = true; } - outExtensions->d3dTextureClientBuffer = true; - outExtensions->keyedMutex = true; + outExtensions->keyedMutex = true; outExtensions->querySurfacePointer = true; outExtensions->windowFixedSize = true; @@ -1105,15 +1104,14 @@ gl::Error Renderer11::finish() if (!mSyncQuery) { D3D11_QUERY_DESC queryDesc; - queryDesc.Query = D3D11_QUERY_EVENT; + queryDesc.Query = D3D11_QUERY_EVENT; queryDesc.MiscFlags = 0; result = mDevice->CreateQuery(&queryDesc, &mSyncQuery); ASSERT(SUCCEEDED(result)); if (FAILED(result)) { - return gl::Error(GL_OUT_OF_MEMORY, "Failed to create event query, result: 0x%X.", - result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create event query, result: 0x%X.", result); } } @@ -1129,8 +1127,7 @@ gl::Error Renderer11::finish() result = mDeviceContext->GetData(mSyncQuery, NULL, 0, flags); if (FAILED(result)) { - return gl::Error(GL_OUT_OF_MEMORY, "Failed to get event query data, result: 0x%X.", - result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to get event query data, result: 0x%X.", result); } // Keep polling, but allow other threads to do something useful first @@ -1141,7 +1138,8 @@ gl::Error Renderer11::finish() mDisplay->notifyDeviceLost(); return gl::Error(GL_OUT_OF_MEMORY, "Device was lost while waiting for sync."); } - } while (result == S_FALSE); + } + while (result == S_FALSE); return gl::Error(GL_NO_ERROR); } @@ -1169,124 +1167,19 @@ NativeWindowD3D *Renderer11::createNativeWindow(EGLNativeWindowType window, #endif } -egl::Error Renderer11::getD3DTextureInfo(IUnknown *d3dTexture, - EGLint *width, - EGLint *height, - GLenum *fboFormat) const -{ - ID3D11Texture2D *texture = d3d11::DynamicCastComObject(d3dTexture); - if (texture == nullptr) - { - return egl::Error(EGL_BAD_PARAMETER, "client buffer is not a ID3D11Texture2D"); - } - - ID3D11Device *textureDevice = nullptr; - texture->GetDevice(&textureDevice); - if (textureDevice != mDevice) - { - SafeRelease(texture); - return egl::Error(EGL_BAD_PARAMETER, "Texture's device does not match."); - } - SafeRelease(textureDevice); - - D3D11_TEXTURE2D_DESC desc = {0}; - texture->GetDesc(&desc); - SafeRelease(texture); - - if (width) - { - *width = static_cast(desc.Width); - } - if (height) - { - *height = static_cast(desc.Height); - } - - // From table egl.restrictions in EGL_ANGLE_d3d_texture_client_buffer. - switch (desc.Format) - { - case DXGI_FORMAT_R8G8B8A8_UNORM: - case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB: - case DXGI_FORMAT_B8G8R8A8_UNORM: - case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB: - case DXGI_FORMAT_R16G16B16A16_FLOAT: - case DXGI_FORMAT_R32G32B32A32_FLOAT: - break; - - default: - return egl::Error(EGL_BAD_PARAMETER, "Unknown client buffer texture format: %u.", - desc.Format); - } - - if (fboFormat) - { - const angle::Format &angleFormat = d3d11_angle::GetFormat(desc.Format); - *fboFormat = angleFormat.fboImplementationInternalFormat; - } - - return egl::Error(EGL_SUCCESS); -} - -egl::Error Renderer11::validateShareHandle(const egl::Config *config, - HANDLE shareHandle, - const egl::AttributeMap &attribs) const -{ - if (shareHandle == nullptr) - { - return egl::Error(EGL_BAD_PARAMETER, "NULL share handle."); - } - - ID3D11Resource *tempResource11 = nullptr; - HRESULT result = mDevice->OpenSharedResource(shareHandle, __uuidof(ID3D11Resource), - (void **)&tempResource11); - if (FAILED(result)) - { - return egl::Error(EGL_BAD_PARAMETER, "Failed to open share handle, result: 0x%X.", result); - } - - ID3D11Texture2D *texture2D = d3d11::DynamicCastComObject(tempResource11); - SafeRelease(tempResource11); - - if (texture2D == nullptr) - { - return egl::Error(EGL_BAD_PARAMETER, - "Failed to query ID3D11Texture2D object from share handle."); - } - - D3D11_TEXTURE2D_DESC desc = {0}; - texture2D->GetDesc(&desc); - SafeRelease(texture2D); - - EGLint width = attribs.getAsInt(EGL_WIDTH, 0); - EGLint height = attribs.getAsInt(EGL_HEIGHT, 0); - ASSERT(width != 0 && height != 0); - - const d3d11::Format &backbufferFormatInfo = - d3d11::Format::Get(config->renderTargetFormat, getRenderer11DeviceCaps()); - - if (desc.Width != static_cast(width) || desc.Height != static_cast(height) || - desc.Format != backbufferFormatInfo.texFormat || desc.MipLevels != 1 || desc.ArraySize != 1) - { - return egl::Error(EGL_BAD_PARAMETER, "Invalid texture parameters in share handle texture."); - } - - return egl::Error(EGL_SUCCESS); -} - SwapChainD3D *Renderer11::createSwapChain(NativeWindowD3D *nativeWindow, HANDLE shareHandle, - IUnknown *d3dTexture, GLenum backBufferFormat, GLenum depthBufferFormat, EGLint orientation) { - return new SwapChain11(this, GetAs(nativeWindow), shareHandle, d3dTexture, - backBufferFormat, depthBufferFormat, orientation); + return new SwapChain11(this, GetAs(nativeWindow), shareHandle, backBufferFormat, + depthBufferFormat, orientation); } void *Renderer11::getD3DDevice() { - return reinterpret_cast(mDevice); + return reinterpret_cast(mDevice); } gl::Error Renderer11::generateSwizzle(gl::Texture *texture) @@ -1297,13 +1190,21 @@ gl::Error Renderer11::generateSwizzle(gl::Texture *texture) ASSERT(textureD3D); TextureStorage *texStorage = nullptr; - ANGLE_TRY(textureD3D->getNativeTexture(&texStorage)); + gl::Error error = textureD3D->getNativeTexture(&texStorage); + if (error.isError()) + { + return error; + } if (texStorage) { - TextureStorage11 *storage11 = GetAs(texStorage); + TextureStorage11 *storage11 = GetAs(texStorage); const gl::TextureState &textureState = texture->getTextureState(); - ANGLE_TRY(storage11->generateSwizzles(textureState.getSwizzleState())); + error = storage11->generateSwizzles(textureState.getSwizzleState()); + if (error.isError()) + { + return error; + } } } @@ -1349,7 +1250,11 @@ gl::Error Renderer11::setSamplerState(gl::SamplerType type, TextureD3D *textureD3D = GetImplAs(texture); TextureStorage *storage = nullptr; - ANGLE_TRY(textureD3D->getNativeTexture(&storage)); + gl::Error error = textureD3D->getNativeTexture(&storage); + if (error.isError()) + { + return error; + } // Storage should exist, texture should be complete ASSERT(storage); @@ -1367,7 +1272,11 @@ gl::Error Renderer11::setSamplerState(gl::SamplerType type, memcmp(&samplerState, &mCurPixelSamplerStates[index], sizeof(gl::SamplerState)) != 0) { ID3D11SamplerState *dxSamplerState = NULL; - ANGLE_TRY(mStateCache.getSamplerState(samplerState, &dxSamplerState)); + error = mStateCache.getSamplerState(samplerState, &dxSamplerState); + if (error.isError()) + { + return error; + } ASSERT(dxSamplerState != NULL); mDeviceContext->PSSetSamplers(index, 1, &dxSamplerState); @@ -1387,7 +1296,11 @@ gl::Error Renderer11::setSamplerState(gl::SamplerType type, memcmp(&samplerState, &mCurVertexSamplerStates[index], sizeof(gl::SamplerState)) != 0) { ID3D11SamplerState *dxSamplerState = NULL; - ANGLE_TRY(mStateCache.getSamplerState(samplerState, &dxSamplerState)); + error = mStateCache.getSamplerState(samplerState, &dxSamplerState); + if (error.isError()) + { + return error; + } ASSERT(dxSamplerState != NULL); mDeviceContext->VSSetSamplers(index, 1, &dxSamplerState); @@ -1399,13 +1312,12 @@ gl::Error Renderer11::setSamplerState(gl::SamplerType type, metadata = &mSamplerMetadataVS; } - else - UNREACHABLE(); + else UNREACHABLE(); ASSERT(metadata != nullptr); metadata->update(index, *texture); - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error Renderer11::setTexture(gl::SamplerType type, int index, gl::Texture *texture) @@ -1417,7 +1329,11 @@ gl::Error Renderer11::setTexture(gl::SamplerType type, int index, gl::Texture *t TextureD3D *textureImpl = GetImplAs(texture); TextureStorage *texStorage = nullptr; - ANGLE_TRY(textureImpl->getNativeTexture(&texStorage)); + gl::Error error = textureImpl->getNativeTexture(&texStorage); + if (error.isError()) + { + return error; + } // Texture should be complete and have a storage ASSERT(texStorage); @@ -1426,8 +1342,8 @@ gl::Error Renderer11::setTexture(gl::SamplerType type, int index, gl::Texture *t ANGLE_TRY(storage11->getSRV(texture->getTextureState(), &textureSRV)); - // If we get NULL back from getSRV here, something went wrong in the texture class and we're - // unexpectedly missing the shader resource view + // If we get NULL back from getSRV here, something went wrong in the texture class and we're unexpectedly + // missing the shader resource view ASSERT(textureSRV != NULL); textureImpl->resetDirty(); @@ -1447,8 +1363,7 @@ gl::Error Renderer11::setUniformBuffers(const gl::ContextState &data, const std::vector &vertexUniformBuffers, const std::vector &fragmentUniformBuffers) { - for (size_t uniformBufferIndex = 0; uniformBufferIndex < vertexUniformBuffers.size(); - uniformBufferIndex++) + for (size_t uniformBufferIndex = 0; uniformBufferIndex < vertexUniformBuffers.size(); uniformBufferIndex++) { GLint binding = vertexUniformBuffers[uniformBufferIndex]; @@ -1469,12 +1384,10 @@ gl::Error Renderer11::setUniformBuffers(const gl::ContextState &data, Buffer11 *bufferStorage = GetImplAs(uniformBuffer.get()); ID3D11Buffer *constantBuffer = nullptr; - UINT firstConstant = 0; - UINT numConstants = 0; - ANGLE_TRY(bufferStorage->getConstantBufferRange(uniformBufferOffset, uniformBufferSize, - &constantBuffer, &firstConstant, - &numConstants)); + ANGLE_TRY_RESULT( + bufferStorage->getConstantBufferRange(uniformBufferOffset, uniformBufferSize), + constantBuffer); if (!constantBuffer) { @@ -1485,9 +1398,11 @@ gl::Error Renderer11::setUniformBuffers(const gl::ContextState &data, mCurrentConstantBufferVSOffset[uniformBufferIndex] != uniformBufferOffset || mCurrentConstantBufferVSSize[uniformBufferIndex] != uniformBufferSize) { - if (firstConstant != 0 && uniformBufferSize != 0) + if (mRenderer11DeviceCaps.supportsConstantBufferOffsets && uniformBufferSize != 0) { - ASSERT(numConstants != 0); + UINT firstConstant = 0, numConstants = 0; + CalculateConstantBufferParams(uniformBufferOffset, uniformBufferSize, + &firstConstant, &numConstants); mDeviceContext1->VSSetConstantBuffers1( getReservedVertexUniformBuffers() + static_cast(uniformBufferIndex), @@ -1507,8 +1422,7 @@ gl::Error Renderer11::setUniformBuffers(const gl::ContextState &data, } } - for (size_t uniformBufferIndex = 0; uniformBufferIndex < fragmentUniformBuffers.size(); - uniformBufferIndex++) + for (size_t uniformBufferIndex = 0; uniformBufferIndex < fragmentUniformBuffers.size(); uniformBufferIndex++) { GLint binding = fragmentUniformBuffers[uniformBufferIndex]; @@ -1529,12 +1443,10 @@ gl::Error Renderer11::setUniformBuffers(const gl::ContextState &data, Buffer11 *bufferStorage = GetImplAs(uniformBuffer.get()); ID3D11Buffer *constantBuffer = nullptr; - UINT firstConstant = 0; - UINT numConstants = 0; - ANGLE_TRY(bufferStorage->getConstantBufferRange(uniformBufferOffset, uniformBufferSize, - &constantBuffer, &firstConstant, - &numConstants)); + ANGLE_TRY_RESULT( + bufferStorage->getConstantBufferRange(uniformBufferOffset, uniformBufferSize), + constantBuffer); if (!constantBuffer) { @@ -1545,8 +1457,11 @@ gl::Error Renderer11::setUniformBuffers(const gl::ContextState &data, mCurrentConstantBufferPSOffset[uniformBufferIndex] != uniformBufferOffset || mCurrentConstantBufferPSSize[uniformBufferIndex] != uniformBufferSize) { - if (firstConstant != 0 && uniformBufferSize != 0) + if (mRenderer11DeviceCaps.supportsConstantBufferOffsets && uniformBufferSize != 0) { + UINT firstConstant = 0, numConstants = 0; + CalculateConstantBufferParams(uniformBufferOffset, uniformBufferSize, + &firstConstant, &numConstants); mDeviceContext1->PSSetConstantBuffers1( getReservedFragmentUniformBuffers() + static_cast(uniformBufferIndex), @@ -1592,17 +1507,7 @@ gl::Error Renderer11::updateState(const gl::ContextState &data, GLenum drawMode) mStateManager.setScissorRectangle(glState.getScissor(), glState.isScissorTestEnabled()); // Applying rasterizer state to D3D11 device - // Since framebuffer->getSamples will return the original samples which may be different with - // the sample counts that we set in render target view, here we use renderTarget->getSamples to - // get the actual samples. - GLsizei samples = 0; - if (firstColorAttachment) - { - ASSERT(firstColorAttachment->isAttached()); - RenderTarget11 *renderTarget = nullptr; - ANGLE_TRY(firstColorAttachment->getRenderTarget(&renderTarget)); - samples = renderTarget->getSamples(); - } + int samples = framebuffer->getSamples(data); gl::RasterizerState rasterizer = glState.getRasterizerState(); rasterizer.pointDrawMode = (drawMode == GL_POINTS); rasterizer.multiSample = (samples != 0); @@ -1628,44 +1533,22 @@ bool Renderer11::applyPrimitiveType(GLenum mode, GLsizei count, bool usesPointSi switch (mode) { - case GL_POINTS: - primitiveTopology = D3D11_PRIMITIVE_TOPOLOGY_POINTLIST; - minCount = 1; - break; - case GL_LINES: - primitiveTopology = D3D_PRIMITIVE_TOPOLOGY_LINELIST; - minCount = 2; - break; - case GL_LINE_LOOP: - primitiveTopology = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP; - minCount = 2; - break; - case GL_LINE_STRIP: - primitiveTopology = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP; - minCount = 2; - break; - case GL_TRIANGLES: - primitiveTopology = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST; - minCount = 3; - break; - case GL_TRIANGLE_STRIP: - primitiveTopology = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP; - minCount = 3; - break; - // emulate fans via rewriting index buffer - case GL_TRIANGLE_FAN: - primitiveTopology = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST; - minCount = 3; - break; - default: - UNREACHABLE(); - return false; + case GL_POINTS: primitiveTopology = D3D11_PRIMITIVE_TOPOLOGY_POINTLIST; minCount = 1; break; + case GL_LINES: primitiveTopology = D3D_PRIMITIVE_TOPOLOGY_LINELIST; minCount = 2; break; + case GL_LINE_LOOP: primitiveTopology = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP; minCount = 2; break; + case GL_LINE_STRIP: primitiveTopology = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP; minCount = 2; break; + case GL_TRIANGLES: primitiveTopology = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST; minCount = 3; break; + case GL_TRIANGLE_STRIP: primitiveTopology = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP; minCount = 3; break; + // emulate fans via rewriting index buffer + case GL_TRIANGLE_FAN: primitiveTopology = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST; minCount = 3; break; + default: + UNREACHABLE(); + return false; } // If instanced pointsprite emulation is being used and If gl_PointSize is used in the shader, // GL_POINTS mode is expected to render pointsprites. - // Instanced PointSprite emulation requires that the topology to be - // D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST. + // Instanced PointSprite emulation requires that the topology to be D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST. if (mode == GL_POINTS && usesPointSize && getWorkarounds().useInstancedPointSpriteEmulation) { primitiveTopology = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST; @@ -1695,10 +1578,18 @@ gl::Error Renderer11::applyVertexBuffer(const gl::State &state, const auto &vertexArray = state.getVertexArray(); auto *vertexArray11 = GetImplAs(vertexArray); - ANGLE_TRY(vertexArray11->updateDirtyAndDynamicAttribs(mVertexDataManager, state, first, count, - instances)); + gl::Error error = vertexArray11->updateDirtyAndDynamicAttribs(mVertexDataManager, state, first, + count, instances); + if (error.isError()) + { + return error; + } - ANGLE_TRY(mStateManager.updateCurrentValueAttribs(state, mVertexDataManager)); + error = mStateManager.updateCurrentValueAttribs(state, mVertexDataManager); + if (error.isError()) + { + return error; + } // If index information is passed, mark it with the current changed status. if (indexInfo) @@ -1742,8 +1633,7 @@ gl::Error Renderer11::applyIndexBuffer(const gl::ContextState &data, indexInfo, glState.isPrimitiveRestartEnabled())); ID3D11Buffer *buffer = nullptr; - DXGI_FORMAT bufferFormat = - (indexInfo->indexType == GL_UNSIGNED_INT) ? DXGI_FORMAT_R32_UINT : DXGI_FORMAT_R16_UINT; + DXGI_FORMAT bufferFormat = (indexInfo->indexType == GL_UNSIGNED_INT) ? DXGI_FORMAT_R32_UINT : DXGI_FORMAT_R16_UINT; if (indexInfo->storage) { @@ -1752,19 +1642,18 @@ gl::Error Renderer11::applyIndexBuffer(const gl::ContextState &data, } else { - IndexBuffer11 *indexBuffer = GetAs(indexInfo->indexBuffer); - buffer = indexBuffer->getBuffer(); + IndexBuffer11* indexBuffer = GetAs(indexInfo->indexBuffer); + buffer = indexBuffer->getBuffer(); } mAppliedIBChanged = false; - if (buffer != mAppliedIB || bufferFormat != mAppliedIBFormat || - indexInfo->startOffset != mAppliedIBOffset) + if (buffer != mAppliedIB || bufferFormat != mAppliedIBFormat || indexInfo->startOffset != mAppliedIBOffset) { mDeviceContext->IASetIndexBuffer(buffer, bufferFormat, indexInfo->startOffset); - mAppliedIB = buffer; - mAppliedIBFormat = bufferFormat; - mAppliedIBOffset = indexInfo->startOffset; + mAppliedIB = buffer; + mAppliedIBFormat = bufferFormat; + mAppliedIBOffset = indexInfo->startOffset; mAppliedIBChanged = true; } @@ -1834,8 +1723,12 @@ gl::Error Renderer11::drawArraysImpl(const gl::ContextState &data, } rx::ShaderExecutableD3D *pixelExe = nullptr; - ANGLE_TRY( - programD3D->getPixelExecutableForFramebuffer(glState.getDrawFramebuffer(), &pixelExe)); + gl::Error error = + programD3D->getPixelExecutableForFramebuffer(glState.getDrawFramebuffer(), &pixelExe); + if (error.isError()) + { + return error; + } // Skip the draw call if rasterizer discard is enabled (or no fragment shader). if (!pixelExe || glState.getRasterizerState().rasterizerDiscard) @@ -1849,8 +1742,12 @@ gl::Error Renderer11::drawArraysImpl(const gl::ContextState &data, // Retrieve the geometry shader. rx::ShaderExecutableD3D *geometryExe = nullptr; - ANGLE_TRY( - programD3D->getGeometryExecutableForPrimitiveType(data, mode, &geometryExe, nullptr)); + error = + programD3D->getGeometryExecutableForPrimitiveType(data, mode, &geometryExe, nullptr); + if (error.isError()) + { + return error; + } ID3D11GeometryShader *geometryShader = (geometryExe ? GetAs(geometryExe)->getGeometryShader() : NULL); @@ -2009,10 +1906,14 @@ gl::Error Renderer11::drawLineLoop(const gl::ContextState &data, if (type != GL_NONE && elementArrayBuffer) { BufferD3D *storage = GetImplAs(elementArrayBuffer); - intptr_t offset = reinterpret_cast(indices); + intptr_t offset = reinterpret_cast(indices); const uint8_t *bufferData = NULL; - ANGLE_TRY(storage->getData(&bufferData)); + gl::Error error = storage->getData(&bufferData); + if (error.isError()) + { + return error; + } indices = bufferData + offset; } @@ -2020,8 +1921,7 @@ gl::Error Renderer11::drawLineLoop(const gl::ContextState &data, if (!mLineLoopIB) { mLineLoopIB = new StreamingIndexBufferInterface(this); - gl::Error error = - mLineLoopIB->reserveBufferSpace(INITIAL_INDEX_BUFFER_SIZE, GL_UNSIGNED_INT); + gl::Error error = mLineLoopIB->reserveBufferSpace(INITIAL_INDEX_BUFFER_SIZE, GL_UNSIGNED_INT); if (error.isError()) { SafeDelete(mLineLoopIB); @@ -2032,12 +1932,9 @@ gl::Error Renderer11::drawLineLoop(const gl::ContextState &data, // Checked by Renderer11::applyPrimitiveType ASSERT(count >= 0); - if (static_cast(count) + 1 > - (std::numeric_limits::max() / sizeof(unsigned int))) + if (static_cast(count) + 1 > (std::numeric_limits::max() / sizeof(unsigned int))) { - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to create a 32-bit looping index buffer for GL_LINE_LOOP, too " - "many indices required."); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create a 32-bit looping index buffer for GL_LINE_LOOP, too many indices required."); } GetLineLoopIndices(indices, type, static_cast(count), @@ -2045,33 +1942,45 @@ gl::Error Renderer11::drawLineLoop(const gl::ContextState &data, unsigned int spaceNeeded = static_cast(sizeof(GLuint) * mScratchIndexDataBuffer.size()); - ANGLE_TRY(mLineLoopIB->reserveBufferSpace(spaceNeeded, GL_UNSIGNED_INT)); + gl::Error error = mLineLoopIB->reserveBufferSpace(spaceNeeded, GL_UNSIGNED_INT); + if (error.isError()) + { + return error; + } - void *mappedMemory = NULL; + void* mappedMemory = NULL; unsigned int offset; - ANGLE_TRY(mLineLoopIB->mapBuffer(spaceNeeded, &mappedMemory, &offset)); + error = mLineLoopIB->mapBuffer(spaceNeeded, &mappedMemory, &offset); + if (error.isError()) + { + return error; + } // Copy over the converted index data. memcpy(mappedMemory, &mScratchIndexDataBuffer[0], sizeof(GLuint) * mScratchIndexDataBuffer.size()); - ANGLE_TRY(mLineLoopIB->unmapBuffer()); + error = mLineLoopIB->unmapBuffer(); + if (error.isError()) + { + return error; + } - IndexBuffer11 *indexBuffer = GetAs(mLineLoopIB->getIndexBuffer()); + IndexBuffer11 *indexBuffer = GetAs(mLineLoopIB->getIndexBuffer()); ID3D11Buffer *d3dIndexBuffer = indexBuffer->getBuffer(); - DXGI_FORMAT indexFormat = indexBuffer->getIndexFormat(); + DXGI_FORMAT indexFormat = indexBuffer->getIndexFormat(); if (mAppliedIB != d3dIndexBuffer || mAppliedIBFormat != indexFormat || mAppliedIBOffset != offset) { mDeviceContext->IASetIndexBuffer(d3dIndexBuffer, indexFormat, offset); - mAppliedIB = d3dIndexBuffer; + mAppliedIB = d3dIndexBuffer; mAppliedIBFormat = indexFormat; mAppliedIBOffset = offset; } INT baseVertexLocation = (indexInfo ? -static_cast(indexInfo->indexRange.start) : 0); - UINT indexCount = static_cast(mScratchIndexDataBuffer.size()); + UINT indexCount = static_cast(mScratchIndexDataBuffer.size()); if (instances > 0) { @@ -2082,7 +1991,7 @@ gl::Error Renderer11::drawLineLoop(const gl::ContextState &data, mDeviceContext->DrawIndexed(indexCount, 0, baseVertexLocation); } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error Renderer11::drawTriangleFan(const gl::ContextState &data, @@ -2101,10 +2010,14 @@ gl::Error Renderer11::drawTriangleFan(const gl::ContextState &data, if (type != GL_NONE && elementArrayBuffer) { BufferD3D *storage = GetImplAs(elementArrayBuffer); - intptr_t offset = reinterpret_cast(indices); + intptr_t offset = reinterpret_cast(indices); const uint8_t *bufferData = NULL; - ANGLE_TRY(storage->getData(&bufferData)); + gl::Error error = storage->getData(&bufferData); + if (error.isError()) + { + return error; + } indexPointer = bufferData + offset; } @@ -2112,8 +2025,7 @@ gl::Error Renderer11::drawTriangleFan(const gl::ContextState &data, if (!mTriangleFanIB) { mTriangleFanIB = new StreamingIndexBufferInterface(this); - gl::Error error = - mTriangleFanIB->reserveBufferSpace(INITIAL_INDEX_BUFFER_SIZE, GL_UNSIGNED_INT); + gl::Error error = mTriangleFanIB->reserveBufferSpace(INITIAL_INDEX_BUFFER_SIZE, GL_UNSIGNED_INT); if (error.isError()) { SafeDelete(mTriangleFanIB); @@ -2128,9 +2040,7 @@ gl::Error Renderer11::drawTriangleFan(const gl::ContextState &data, if (numTris > (std::numeric_limits::max() / (sizeof(unsigned int) * 3))) { - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to create a scratch index buffer for GL_TRIANGLE_FAN, too many " - "indices required."); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create a scratch index buffer for GL_TRIANGLE_FAN, too many indices required."); } GetTriFanIndices(indexPointer, type, count, data.getState().isPrimitiveRestartEnabled(), @@ -2138,25 +2048,37 @@ gl::Error Renderer11::drawTriangleFan(const gl::ContextState &data, const unsigned int spaceNeeded = static_cast(mScratchIndexDataBuffer.size() * sizeof(unsigned int)); - ANGLE_TRY(mTriangleFanIB->reserveBufferSpace(spaceNeeded, GL_UNSIGNED_INT)); + gl::Error error = mTriangleFanIB->reserveBufferSpace(spaceNeeded, GL_UNSIGNED_INT); + if (error.isError()) + { + return error; + } void *mappedMemory = nullptr; unsigned int offset; - ANGLE_TRY(mTriangleFanIB->mapBuffer(spaceNeeded, &mappedMemory, &offset)); + error = mTriangleFanIB->mapBuffer(spaceNeeded, &mappedMemory, &offset); + if (error.isError()) + { + return error; + } memcpy(mappedMemory, &mScratchIndexDataBuffer[0], spaceNeeded); - ANGLE_TRY(mTriangleFanIB->unmapBuffer()); + error = mTriangleFanIB->unmapBuffer(); + if (error.isError()) + { + return error; + } - IndexBuffer11 *indexBuffer = GetAs(mTriangleFanIB->getIndexBuffer()); + IndexBuffer11 *indexBuffer = GetAs(mTriangleFanIB->getIndexBuffer()); ID3D11Buffer *d3dIndexBuffer = indexBuffer->getBuffer(); - DXGI_FORMAT indexFormat = indexBuffer->getIndexFormat(); + DXGI_FORMAT indexFormat = indexBuffer->getIndexFormat(); if (mAppliedIB != d3dIndexBuffer || mAppliedIBFormat != indexFormat || mAppliedIBOffset != offset) { mDeviceContext->IASetIndexBuffer(d3dIndexBuffer, indexFormat, offset); - mAppliedIB = d3dIndexBuffer; + mAppliedIB = d3dIndexBuffer; mAppliedIBFormat = indexFormat; mAppliedIBOffset = offset; } @@ -2172,7 +2094,7 @@ gl::Error Renderer11::drawTriangleFan(const gl::ContextState &data, mDeviceContext->DrawIndexed(indexCount, 0, -minIndex); } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error Renderer11::applyShaders(const gl::ContextState &data, GLenum drawMode) @@ -2224,21 +2146,21 @@ gl::Error Renderer11::applyShaders(const gl::ContextState &data, GLenum drawMode { mDeviceContext->VSSetShader(vertexShader, nullptr, 0); mAppliedVertexShader = reinterpret_cast(vertexShader); - dirtyUniforms = true; + dirtyUniforms = true; } if (reinterpret_cast(geometryShader) != mAppliedGeometryShader) { mDeviceContext->GSSetShader(geometryShader, nullptr, 0); mAppliedGeometryShader = reinterpret_cast(geometryShader); - dirtyUniforms = true; + dirtyUniforms = true; } if (reinterpret_cast(pixelShader) != mAppliedPixelShader) { mDeviceContext->PSSetShader(pixelShader, nullptr, 0); mAppliedPixelShader = reinterpret_cast(pixelShader); - dirtyUniforms = true; + dirtyUniforms = true; } if (dirtyUniforms) @@ -2257,7 +2179,7 @@ gl::Error Renderer11::applyUniforms(const ProgramD3D &programD3D, unsigned int totalRegisterCountPS = 0; bool vertexUniformsDirty = false; - bool pixelUniformsDirty = false; + bool pixelUniformsDirty = false; for (const D3DUniform *uniform : uniformArray) { @@ -2282,16 +2204,16 @@ gl::Error Renderer11::applyUniforms(const ProgramD3D &programD3D, ASSERT(fragmentUniformStorage); ID3D11Buffer *vertexConstantBuffer = vertexUniformStorage->getConstantBuffer(); - ID3D11Buffer *pixelConstantBuffer = fragmentUniformStorage->getConstantBuffer(); + ID3D11Buffer *pixelConstantBuffer = fragmentUniformStorage->getConstantBuffer(); - float(*mapVS)[4] = NULL; - float(*mapPS)[4] = NULL; + float (*mapVS)[4] = NULL; + float (*mapPS)[4] = NULL; if (totalRegisterCountVS > 0 && vertexUniformsDirty) { D3D11_MAPPED_SUBRESOURCE map = {0}; - HRESULT result = - mDeviceContext->Map(vertexConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map); + HRESULT result = mDeviceContext->Map(vertexConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map); + UNUSED_ASSERTION_VARIABLE(result); ASSERT(SUCCEEDED(result)); mapVS = (float(*)[4])map.pData; } @@ -2299,8 +2221,8 @@ gl::Error Renderer11::applyUniforms(const ProgramD3D &programD3D, if (totalRegisterCountPS > 0 && pixelUniformsDirty) { D3D11_MAPPED_SUBRESOURCE map = {0}; - HRESULT result = - mDeviceContext->Map(pixelConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map); + HRESULT result = mDeviceContext->Map(pixelConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map); + UNUSED_ASSERTION_VARIABLE(result); ASSERT(SUCCEEDED(result)); mapPS = (float(*)[4])map.pData; } @@ -2363,9 +2285,7 @@ gl::Error Renderer11::applyUniforms(const ProgramD3D &programD3D, ASSERT(SUCCEEDED(result)); if (FAILED(result)) { - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to create vertex shader constant buffer, result: 0x%X.", - result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create vertex shader constant buffer, result: 0x%X.", result); } mDeviceContext->VSSetConstantBuffers(d3d11::RESERVED_CONSTANT_BUFFER_SLOT_DRIVER, 1, &mDriverConstantBufferVS); @@ -2380,9 +2300,7 @@ gl::Error Renderer11::applyUniforms(const ProgramD3D &programD3D, ASSERT(SUCCEEDED(result)); if (FAILED(result)) { - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to create pixel shader constant buffer, result: 0x%X.", - result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create pixel shader constant buffer, result: 0x%X.", result); } mDeviceContext->PSSetConstantBuffers(d3d11::RESERVED_CONSTANT_BUFFER_SLOT_DRIVER, 1, &mDriverConstantBufferPS); @@ -2391,13 +2309,13 @@ gl::Error Renderer11::applyUniforms(const ProgramD3D &programD3D, // Sampler metadata and driver constants need to coexist in the same constant buffer to conserve // constant buffer slots. We update both in the constant buffer if needed. const dx_VertexConstants11 &vertexConstants = mStateManager.getVertexConstants(); - size_t samplerMetadataReferencedBytesVS = sizeof(SamplerMetadataD3D11::dx_SamplerMetadata) * + size_t samplerMetadataReferencedBytesVS = sizeof(SamplerMetadataD3D11::dx_SamplerMetadata) * programD3D.getUsedSamplerRange(gl::SAMPLER_VERTEX); applyDriverConstantsIfNeeded(&mAppliedVertexConstants, vertexConstants, &mSamplerMetadataVS, samplerMetadataReferencedBytesVS, mDriverConstantBufferVS); const dx_PixelConstants11 &pixelConstants = mStateManager.getPixelConstants(); - size_t samplerMetadataReferencedBytesPS = sizeof(SamplerMetadataD3D11::dx_SamplerMetadata) * + size_t samplerMetadataReferencedBytesPS = sizeof(SamplerMetadataD3D11::dx_SamplerMetadata) * programD3D.getUsedSamplerRange(gl::SAMPLER_PIXEL); applyDriverConstantsIfNeeded(&mAppliedPixelConstants, pixelConstants, &mSamplerMetadataPS, samplerMetadataReferencedBytesPS, mDriverConstantBufferPS); @@ -2469,7 +2387,7 @@ void Renderer11::SamplerMetadataD3D11::update(unsigned int samplerIndex, const g case GL_R16I: case GL_R16UI: needIntegerTextureMetadata = true; - internalFormatBits = 16; + internalFormatBits = 16; break; case GL_RGBA8I: case GL_RGBA8UI: @@ -2480,11 +2398,11 @@ void Renderer11::SamplerMetadataD3D11::update(unsigned int samplerIndex, const g case GL_R8I: case GL_R8UI: needIntegerTextureMetadata = true; - internalFormatBits = 8; + internalFormatBits = 8; break; case GL_RGB10_A2UI: needIntegerTextureMetadata = true; - internalFormatBits = 10; + internalFormatBits = 10; break; default: break; @@ -2538,6 +2456,7 @@ void Renderer11::applyDriverConstantsIfNeeded(TShaderConstants *appliedConstants HRESULT result = mDeviceContext->Map(driverConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mapping); ASSERT(SUCCEEDED(result)); + UNUSED_ASSERTION_VARIABLE(result); memcpy(mapping.pData, appliedConstants, sizeof(TShaderConstants)); // Previous buffer contents were discarded, so we need to refresh also the area of the // buffer that isn't used by this program. @@ -2578,7 +2497,7 @@ void Renderer11::markAllStateDirty() mStateManager.invalidateEverything(); - mAppliedIB = NULL; + mAppliedIB = NULL; mAppliedIBFormat = DXGI_FORMAT_UNKNOWN; mAppliedIBOffset = 0; @@ -2595,16 +2514,16 @@ void Renderer11::markAllStateDirty() for (unsigned int i = 0; i < gl::IMPLEMENTATION_MAX_VERTEX_SHADER_UNIFORM_BUFFERS; i++) { - mCurrentConstantBufferVS[i] = static_cast(-1); + mCurrentConstantBufferVS[i] = static_cast(-1); mCurrentConstantBufferVSOffset[i] = 0; - mCurrentConstantBufferVSSize[i] = 0; - mCurrentConstantBufferPS[i] = static_cast(-1); + mCurrentConstantBufferVSSize[i] = 0; + mCurrentConstantBufferPS[i] = static_cast(-1); mCurrentConstantBufferPSOffset[i] = 0; - mCurrentConstantBufferPSSize[i] = 0; + mCurrentConstantBufferPSSize[i] = 0; } - mCurrentVertexConstantBuffer = NULL; - mCurrentPixelConstantBuffer = NULL; + mCurrentVertexConstantBuffer = NULL; + mCurrentPixelConstantBuffer = NULL; mCurrentGeometryConstantBuffer = NULL; mCurrentPrimitiveTopology = D3D_PRIMITIVE_TOPOLOGY_UNDEFINED; @@ -2635,14 +2554,13 @@ bool Renderer11::testDeviceLost() { bool isLost = false; - if (!mDevice) - { + if (!mDevice) { return true; } // GetRemovedReason is used to test if the device is removed HRESULT result = mDevice->GetDeviceRemovedReason(); - isLost = d3d11::isDeviceLostError(result); + isLost = d3d11::isDeviceLostError(result); if (isLost) { @@ -2655,26 +2573,25 @@ bool Renderer11::testDeviceLost() bool Renderer11::testDeviceResettable() { // determine if the device is resettable by creating a dummy device - PFN_D3D11_CREATE_DEVICE D3D11CreateDevice = - (PFN_D3D11_CREATE_DEVICE)GetProcAddress(mD3d11Module, "D3D11CreateDevice"); + PFN_D3D11_CREATE_DEVICE D3D11CreateDevice = (PFN_D3D11_CREATE_DEVICE)GetProcAddress(mD3d11Module, "D3D11CreateDevice"); if (D3D11CreateDevice == NULL) { return false; } - ID3D11Device *dummyDevice; + ID3D11Device* dummyDevice; D3D_FEATURE_LEVEL dummyFeatureLevel; - ID3D11DeviceContext *dummyContext; + ID3D11DeviceContext* dummyContext; ASSERT(mRequestedDriverType != D3D_DRIVER_TYPE_UNKNOWN); HRESULT result = D3D11CreateDevice( NULL, mRequestedDriverType, NULL, -#if defined(_DEBUG) + #if defined(_DEBUG) D3D11_CREATE_DEVICE_DEBUG, -#else + #else 0, -#endif + #endif mAvailableFeatureLevels.data(), static_cast(mAvailableFeatureLevels.size()), D3D11_SDK_VERSION, &dummyDevice, &dummyFeatureLevel, &dummyContext); @@ -2763,6 +2680,11 @@ bool Renderer11::resetDevice() return true; } +VendorID Renderer11::getVendorId() const +{ + return static_cast(mAdapterDescription.VendorId); +} + SIZE_T Renderer11::getMaxResourceSize() const { // This formula comes from http://msdn.microsoft.com/en-us/library/windows/desktop/ff819065%28v=vs.85%29.aspx @@ -2776,10 +2698,8 @@ std::string Renderer11::getRendererDescription() const rendererString << mDescription; rendererString << " Direct3D11"; - rendererString << " vs_" << getMajorShaderModel() << "_" << getMinorShaderModel() - << getShaderModelSuffix(); - rendererString << " ps_" << getMajorShaderModel() << "_" << getMinorShaderModel() - << getShaderModelSuffix(); + rendererString << " vs_" << getMajorShaderModel() << "_" << getMinorShaderModel() << getShaderModelSuffix(); + rendererString << " ps_" << getMajorShaderModel() << "_" << getMinorShaderModel() << getShaderModelSuffix(); return rendererString.str(); } @@ -2787,12 +2707,12 @@ std::string Renderer11::getRendererDescription() const DeviceIdentifier Renderer11::getAdapterIdentifier() const { // Don't use the AdapterLuid here, since that doesn't persist across reboot. - DeviceIdentifier deviceIdentifier = {0}; - deviceIdentifier.VendorId = mAdapterDescription.VendorId; - deviceIdentifier.DeviceId = mAdapterDescription.DeviceId; - deviceIdentifier.SubSysId = mAdapterDescription.SubSysId; - deviceIdentifier.Revision = mAdapterDescription.Revision; - deviceIdentifier.FeatureLevel = static_cast(mRenderer11DeviceCaps.featureLevel); + DeviceIdentifier deviceIdentifier = { 0 }; + deviceIdentifier.VendorId = mAdapterDescription.VendorId; + deviceIdentifier.DeviceId = mAdapterDescription.DeviceId; + deviceIdentifier.SubSysId = mAdapterDescription.SubSysId; + deviceIdentifier.Revision = mAdapterDescription.Revision; + deviceIdentifier.FeatureLevel = static_cast(mRenderer11DeviceCaps.featureLevel); return deviceIdentifier; } @@ -2865,8 +2785,7 @@ bool Renderer11::getShareHandleSupport() const return false; } - // Also disable share handles on Feature Level 9_3, since it doesn't support share handles on - // RGBA8 textures/swapchains. + // Also disable share handles on Feature Level 9_3, since it doesn't support share handles on RGBA8 textures/swapchains. if (mRenderer11DeviceCaps.featureLevel <= D3D_FEATURE_LEVEL_9_3) { mSupportsShareHandles = false; @@ -2929,17 +2848,11 @@ int Renderer11::getMajorShaderModel() const { switch (mRenderer11DeviceCaps.featureLevel) { - case D3D_FEATURE_LEVEL_11_0: - return D3D11_SHADER_MAJOR_VERSION; // 5 - case D3D_FEATURE_LEVEL_10_1: - return D3D10_1_SHADER_MAJOR_VERSION; // 4 - case D3D_FEATURE_LEVEL_10_0: - return D3D10_SHADER_MAJOR_VERSION; // 4 - case D3D_FEATURE_LEVEL_9_3: - return D3D10_SHADER_MAJOR_VERSION; // 4 - default: - UNREACHABLE(); - return 0; + case D3D_FEATURE_LEVEL_11_0: return D3D11_SHADER_MAJOR_VERSION; // 5 + case D3D_FEATURE_LEVEL_10_1: return D3D10_1_SHADER_MAJOR_VERSION; // 4 + case D3D_FEATURE_LEVEL_10_0: return D3D10_SHADER_MAJOR_VERSION; // 4 + case D3D_FEATURE_LEVEL_9_3: return D3D10_SHADER_MAJOR_VERSION; // 4 + default: UNREACHABLE(); return 0; } } @@ -2947,17 +2860,11 @@ int Renderer11::getMinorShaderModel() const { switch (mRenderer11DeviceCaps.featureLevel) { - case D3D_FEATURE_LEVEL_11_0: - return D3D11_SHADER_MINOR_VERSION; // 0 - case D3D_FEATURE_LEVEL_10_1: - return D3D10_1_SHADER_MINOR_VERSION; // 1 - case D3D_FEATURE_LEVEL_10_0: - return D3D10_SHADER_MINOR_VERSION; // 0 - case D3D_FEATURE_LEVEL_9_3: - return D3D10_SHADER_MINOR_VERSION; // 0 - default: - UNREACHABLE(); - return 0; + case D3D_FEATURE_LEVEL_11_0: return D3D11_SHADER_MINOR_VERSION; // 0 + case D3D_FEATURE_LEVEL_10_1: return D3D10_1_SHADER_MINOR_VERSION; // 1 + case D3D_FEATURE_LEVEL_10_0: return D3D10_SHADER_MINOR_VERSION; // 0 + case D3D_FEATURE_LEVEL_9_3: return D3D10_SHADER_MINOR_VERSION; // 0 + default: UNREACHABLE(); return 0; } } @@ -2965,17 +2872,11 @@ std::string Renderer11::getShaderModelSuffix() const { switch (mRenderer11DeviceCaps.featureLevel) { - case D3D_FEATURE_LEVEL_11_0: - return ""; - case D3D_FEATURE_LEVEL_10_1: - return ""; - case D3D_FEATURE_LEVEL_10_0: - return ""; - case D3D_FEATURE_LEVEL_9_3: - return "_level_9_3"; - default: - UNREACHABLE(); - return ""; + case D3D_FEATURE_LEVEL_11_0: return ""; + case D3D_FEATURE_LEVEL_10_1: return ""; + case D3D_FEATURE_LEVEL_10_0: return ""; + case D3D_FEATURE_LEVEL_9_3: return "_level_9_3"; + default: UNREACHABLE(); return ""; } } @@ -3048,73 +2949,60 @@ gl::Error Renderer11::copyImage2D(const gl::Framebuffer *framebuffer, ANGLE_TRY(copyImageInternal(framebuffer, sourceRect, destFormat, destOffset, destRenderTarget)); - storage11->markLevelDirty(level); + storage11->invalidateSwizzleCacheLevel(level); return gl::NoError(); } -gl::Error Renderer11::copyImageCube(const gl::Framebuffer *framebuffer, - const gl::Rectangle &sourceRect, - GLenum destFormat, - const gl::Offset &destOffset, - TextureStorage *storage, - GLenum target, - GLint level) +gl::Error Renderer11::copyImageCube(const gl::Framebuffer *framebuffer, const gl::Rectangle &sourceRect, GLenum destFormat, + const gl::Offset &destOffset, TextureStorage *storage, GLenum target, GLint level) { TextureStorage11_Cube *storage11 = GetAs(storage); ASSERT(storage11); - gl::ImageIndex index = gl::ImageIndex::MakeCube(target, level); + gl::ImageIndex index = gl::ImageIndex::MakeCube(target, level); RenderTargetD3D *destRenderTarget = nullptr; ANGLE_TRY(storage11->getRenderTarget(index, &destRenderTarget)); ASSERT(destRenderTarget); ANGLE_TRY(copyImageInternal(framebuffer, sourceRect, destFormat, destOffset, destRenderTarget)); - storage11->markLevelDirty(level); + storage11->invalidateSwizzleCacheLevel(level); return gl::NoError(); } -gl::Error Renderer11::copyImage3D(const gl::Framebuffer *framebuffer, - const gl::Rectangle &sourceRect, - GLenum destFormat, - const gl::Offset &destOffset, - TextureStorage *storage, - GLint level) +gl::Error Renderer11::copyImage3D(const gl::Framebuffer *framebuffer, const gl::Rectangle &sourceRect, GLenum destFormat, + const gl::Offset &destOffset, TextureStorage *storage, GLint level) { TextureStorage11_3D *storage11 = GetAs(storage); ASSERT(storage11); - gl::ImageIndex index = gl::ImageIndex::Make3D(level, destOffset.z); + gl::ImageIndex index = gl::ImageIndex::Make3D(level, destOffset.z); RenderTargetD3D *destRenderTarget = nullptr; ANGLE_TRY(storage11->getRenderTarget(index, &destRenderTarget)); ASSERT(destRenderTarget); ANGLE_TRY(copyImageInternal(framebuffer, sourceRect, destFormat, destOffset, destRenderTarget)); - storage11->markLevelDirty(level); + storage11->invalidateSwizzleCacheLevel(level); return gl::NoError(); } -gl::Error Renderer11::copyImage2DArray(const gl::Framebuffer *framebuffer, - const gl::Rectangle &sourceRect, - GLenum destFormat, - const gl::Offset &destOffset, - TextureStorage *storage, - GLint level) +gl::Error Renderer11::copyImage2DArray(const gl::Framebuffer *framebuffer, const gl::Rectangle &sourceRect, GLenum destFormat, + const gl::Offset &destOffset, TextureStorage *storage, GLint level) { TextureStorage11_2DArray *storage11 = GetAs(storage); ASSERT(storage11); - gl::ImageIndex index = gl::ImageIndex::Make2DArray(level, destOffset.z); + gl::ImageIndex index = gl::ImageIndex::Make2DArray(level, destOffset.z); RenderTargetD3D *destRenderTarget = nullptr; ANGLE_TRY(storage11->getRenderTarget(index, &destRenderTarget)); ASSERT(destRenderTarget); ANGLE_TRY(copyImageInternal(framebuffer, sourceRect, destFormat, destOffset, destRenderTarget)); - storage11->markLevelDirty(level); + storage11->invalidateSwizzleCacheLevel(level); return gl::NoError(); } @@ -3204,44 +3092,9 @@ gl::Error Renderer11::copyTexture(const gl::Texture *source, unpackUnmultiplyAlpha)); } - destStorage11->markLevelDirty(destLevel); - - return gl::NoError(); -} - -gl::Error Renderer11::copyCompressedTexture(const gl::Texture *source, - GLint sourceLevel, - TextureStorage *storage, - GLint destLevel) -{ - TextureStorage11_2D *destStorage11 = GetAs(storage); - ASSERT(destStorage11); - - ID3D11Resource *destResource = nullptr; - ANGLE_TRY(destStorage11->getResource(&destResource)); - - gl::ImageIndex destIndex = gl::ImageIndex::Make2D(destLevel); - UINT destSubresource = destStorage11->getSubresourceIndex(destIndex); + destStorage11->invalidateSwizzleCacheLevel(destLevel); - TextureD3D *sourceD3D = GetImplAs(source); - ASSERT(sourceD3D); - - TextureStorage *sourceStorage = nullptr; - ANGLE_TRY(sourceD3D->getNativeTexture(&sourceStorage)); - - TextureStorage11_2D *sourceStorage11 = GetAs(sourceStorage); - ASSERT(sourceStorage11); - - ID3D11Resource *sourceResource = nullptr; - ANGLE_TRY(sourceStorage11->getResource(&sourceResource)); - - gl::ImageIndex sourceIndex = gl::ImageIndex::Make2D(sourceLevel); - UINT sourceSubresource = sourceStorage11->getSubresourceIndex(sourceIndex); - - mDeviceContext->CopySubresourceRegion(destResource, destSubresource, 0, 0, 0, sourceResource, - sourceSubresource, nullptr); - - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } UINT64 EstimateSize(D3D11_TEXTURE2D_DESC &desc) @@ -3253,31 +3106,27 @@ UINT64 EstimateSize(D3D11_TEXTURE2D_DESC &desc) return total; } -gl::Error Renderer11::createRenderTarget(int width, - int height, - GLenum format, - GLsizei samples, - RenderTargetD3D **outRT) +gl::Error Renderer11::createRenderTarget(int width, int height, GLenum format, GLsizei samples, RenderTargetD3D **outRT) { const d3d11::Format &formatInfo = d3d11::Format::Get(format, mRenderer11DeviceCaps); const gl::TextureCaps &textureCaps = getNativeTextureCaps().get(format); - GLuint supportedSamples = textureCaps.getNearestSamples(samples); + GLuint supportedSamples = textureCaps.getNearestSamples(samples); if (width > 0 && height > 0) { // Create texture resource D3D11_TEXTURE2D_DESC desc; - desc.Width = width; - desc.Height = height; - desc.MipLevels = 1; - desc.ArraySize = 1; + desc.Width = width; + desc.Height = height; + desc.MipLevels = 1; + desc.ArraySize = 1; desc.Format = formatInfo.texFormat; - desc.SampleDesc.Count = (supportedSamples == 0) ? 1 : supportedSamples; + desc.SampleDesc.Count = (supportedSamples == 0) ? 1 : supportedSamples; desc.SampleDesc.Quality = 0; - desc.Usage = D3D11_USAGE_DEFAULT; - desc.CPUAccessFlags = 0; - desc.MiscFlags = 0; + desc.Usage = D3D11_USAGE_DEFAULT; + desc.CPUAccessFlags = 0; + desc.MiscFlags = 0; // If a rendertarget or depthstencil format exists for this texture format, // we'll flag it to allow binding that way. Shader resource views are a little @@ -3287,18 +3136,8 @@ gl::Error Renderer11::createRenderTarget(int width, bindDSV = (formatInfo.dsvFormat != DXGI_FORMAT_UNKNOWN); bindSRV = (formatInfo.srvFormat != DXGI_FORMAT_UNKNOWN); - // D3D feature level 10.0 no longer allows creation of textures with both the bind SRV and - // DSV flags when multisampled. crbug.com/656989 - bool supportsMultisampledDepthStencilSRVs = - mRenderer11DeviceCaps.featureLevel > D3D_FEATURE_LEVEL_10_0; - bool isMultisampledDepthStencil = bindDSV && desc.SampleDesc.Count > 1; - if (isMultisampledDepthStencil && !supportsMultisampledDepthStencilSRVs) - { - bindSRV = false; - } - - desc.BindFlags = (bindRTV ? D3D11_BIND_RENDER_TARGET : 0) | - (bindDSV ? D3D11_BIND_DEPTH_STENCIL : 0) | + desc.BindFlags = (bindRTV ? D3D11_BIND_RENDER_TARGET : 0) | + (bindDSV ? D3D11_BIND_DEPTH_STENCIL : 0) | (bindSRV ? D3D11_BIND_SHADER_RESOURCE : 0); // The format must be either an RTV or a DSV @@ -3320,8 +3159,7 @@ gl::Error Renderer11::createRenderTarget(int width, if (FAILED(result)) { ASSERT(result == E_OUTOFMEMORY); - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to create render target texture, result: 0x%X.", result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create render target texture, result: 0x%X.", result); } ID3D11ShaderResourceView *srv = nullptr; @@ -3329,20 +3167,17 @@ gl::Error Renderer11::createRenderTarget(int width, if (bindSRV) { D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc; - srvDesc.Format = formatInfo.srvFormat; - srvDesc.ViewDimension = (supportedSamples == 0) ? D3D11_SRV_DIMENSION_TEXTURE2D - : D3D11_SRV_DIMENSION_TEXTURE2DMS; + srvDesc.Format = formatInfo.srvFormat; + srvDesc.ViewDimension = (supportedSamples == 0) ? D3D11_SRV_DIMENSION_TEXTURE2D : D3D11_SRV_DIMENSION_TEXTURE2DMS; srvDesc.Texture2D.MostDetailedMip = 0; - srvDesc.Texture2D.MipLevels = 1; + srvDesc.Texture2D.MipLevels = 1; result = mDevice->CreateShaderResourceView(texture, &srvDesc, &srv); if (FAILED(result)) { ASSERT(result == E_OUTOFMEMORY); SafeRelease(texture); - return gl::Error( - GL_OUT_OF_MEMORY, - "Failed to create render target shader resource view, result: 0x%X.", result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create render target shader resource view, result: 0x%X.", result); } if (formatInfo.blitSRVFormat != formatInfo.srvFormat) @@ -3377,23 +3212,20 @@ gl::Error Renderer11::createRenderTarget(int width, if (bindDSV) { D3D11_DEPTH_STENCIL_VIEW_DESC dsvDesc; - dsvDesc.Format = formatInfo.dsvFormat; - dsvDesc.ViewDimension = (supportedSamples == 0) ? D3D11_DSV_DIMENSION_TEXTURE2D - : D3D11_DSV_DIMENSION_TEXTURE2DMS; + dsvDesc.Format = formatInfo.dsvFormat; + dsvDesc.ViewDimension = (supportedSamples == 0) ? D3D11_DSV_DIMENSION_TEXTURE2D : D3D11_DSV_DIMENSION_TEXTURE2DMS; dsvDesc.Texture2D.MipSlice = 0; - dsvDesc.Flags = 0; + dsvDesc.Flags = 0; ID3D11DepthStencilView *dsv = NULL; - result = mDevice->CreateDepthStencilView(texture, &dsvDesc, &dsv); + result = mDevice->CreateDepthStencilView(texture, &dsvDesc, &dsv); if (FAILED(result)) { ASSERT(result == E_OUTOFMEMORY); SafeRelease(texture); SafeRelease(srv); SafeRelease(blitSRV); - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to create render target depth stencil view, result: 0x%X.", - result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create render target depth stencil view, result: 0x%X.", result); } *outRT = new TextureRenderTarget11(dsv, texture, srv, format, formatInfo, width, height, @@ -3404,27 +3236,24 @@ gl::Error Renderer11::createRenderTarget(int width, else if (bindRTV) { D3D11_RENDER_TARGET_VIEW_DESC rtvDesc; - rtvDesc.Format = formatInfo.rtvFormat; - rtvDesc.ViewDimension = (supportedSamples == 0) ? D3D11_RTV_DIMENSION_TEXTURE2D - : D3D11_RTV_DIMENSION_TEXTURE2DMS; + rtvDesc.Format = formatInfo.rtvFormat; + rtvDesc.ViewDimension = (supportedSamples == 0) ? D3D11_RTV_DIMENSION_TEXTURE2D : D3D11_RTV_DIMENSION_TEXTURE2DMS; rtvDesc.Texture2D.MipSlice = 0; ID3D11RenderTargetView *rtv = NULL; - result = mDevice->CreateRenderTargetView(texture, &rtvDesc, &rtv); + result = mDevice->CreateRenderTargetView(texture, &rtvDesc, &rtv); if (FAILED(result)) { ASSERT(result == E_OUTOFMEMORY); SafeRelease(texture); SafeRelease(srv); SafeRelease(blitSRV); - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to create render target render target view, result: 0x%X.", - result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create render target render target view, result: 0x%X.", result); } if (formatInfo.dataInitializerFunction != NULL) { - const float clearValues[4] = {0.0f, 0.0f, 0.0f, 1.0f}; + const float clearValues[4] = { 0.0f, 0.0f, 0.0f, 1.0f }; mDeviceContext->ClearRenderTargetView(rtv, clearValues); } @@ -3457,8 +3286,12 @@ gl::Error Renderer11::createRenderTargetCopy(RenderTargetD3D *source, RenderTarg ASSERT(source != nullptr); RenderTargetD3D *newRT = nullptr; - ANGLE_TRY(createRenderTarget(source->getWidth(), source->getHeight(), - source->getInternalFormat(), source->getSamples(), &newRT)); + gl::Error error = createRenderTarget(source->getWidth(), source->getHeight(), + source->getInternalFormat(), source->getSamples(), &newRT); + if (error.isError()) + { + return error; + } RenderTarget11 *source11 = GetAs(source); RenderTarget11 *dest11 = GetAs(newRT); @@ -3479,17 +3312,16 @@ gl::Error Renderer11::loadExecutable(const void *function, { switch (type) { - case SHADER_VERTEX: + case SHADER_VERTEX: { - ID3D11VertexShader *vertexShader = NULL; + ID3D11VertexShader *vertexShader = NULL; ID3D11GeometryShader *streamOutShader = NULL; HRESULT result = mDevice->CreateVertexShader(function, length, NULL, &vertexShader); ASSERT(SUCCEEDED(result)); if (FAILED(result)) { - return gl::Error(GL_OUT_OF_MEMORY, "Failed to create vertex shader, result: 0x%X.", - result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create vertex shader, result: 0x%X.", result); } if (!streamOutVaryings.empty()) @@ -3504,8 +3336,8 @@ gl::Error Renderer11::loadExecutable(const void *function, entry.SemanticName = streamOutVarying.semanticName.c_str(); entry.SemanticIndex = streamOutVarying.semanticIndex; entry.StartComponent = 0; - entry.ComponentCount = static_cast(streamOutVarying.componentCount); - entry.OutputSlot = static_cast( + entry.ComponentCount = static_cast(streamOutVarying.componentCount); + entry.OutputSlot = static_cast( (separatedOutputBuffers ? streamOutVarying.outputSlot : 0)); soDeclaration.push_back(entry); } @@ -3517,16 +3349,14 @@ gl::Error Renderer11::loadExecutable(const void *function, ASSERT(SUCCEEDED(result)); if (FAILED(result)) { - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to create steam output shader, result: 0x%X.", result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create steam output shader, result: 0x%X.", result); } } - *outExecutable = - new ShaderExecutable11(function, length, vertexShader, streamOutShader); + *outExecutable = new ShaderExecutable11(function, length, vertexShader, streamOutShader); } break; - case SHADER_PIXEL: + case SHADER_PIXEL: { ID3D11PixelShader *pixelShader = NULL; @@ -3534,14 +3364,13 @@ gl::Error Renderer11::loadExecutable(const void *function, ASSERT(SUCCEEDED(result)); if (FAILED(result)) { - return gl::Error(GL_OUT_OF_MEMORY, "Failed to create pixel shader, result: 0x%X.", - result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create pixel shader, result: 0x%X.", result); } *outExecutable = new ShaderExecutable11(function, length, pixelShader); } break; - case SHADER_GEOMETRY: + case SHADER_GEOMETRY: { ID3D11GeometryShader *geometryShader = NULL; @@ -3549,16 +3378,15 @@ gl::Error Renderer11::loadExecutable(const void *function, ASSERT(SUCCEEDED(result)); if (FAILED(result)) { - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to create geometry shader, result: 0x%X.", result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to create geometry shader, result: 0x%X.", result); } *outExecutable = new ShaderExecutable11(function, length, geometryShader); } break; - default: - UNREACHABLE(); - return gl::Error(GL_INVALID_OPERATION); + default: + UNREACHABLE(); + return gl::Error(GL_INVALID_OPERATION); } return gl::Error(GL_NO_ERROR); @@ -3575,22 +3403,21 @@ gl::Error Renderer11::compileToExecutable(gl::InfoLog &infoLog, const char *profileType = NULL; switch (type) { - case SHADER_VERTEX: - profileType = "vs"; - break; - case SHADER_PIXEL: - profileType = "ps"; - break; - case SHADER_GEOMETRY: - profileType = "gs"; - break; - default: - UNREACHABLE(); - return gl::Error(GL_INVALID_OPERATION); + case SHADER_VERTEX: + profileType = "vs"; + break; + case SHADER_PIXEL: + profileType = "ps"; + break; + case SHADER_GEOMETRY: + profileType = "gs"; + break; + default: + UNREACHABLE(); + return gl::Error(GL_INVALID_OPERATION); } - std::string profile = FormatString("%s_%d_%d%s", profileType, getMajorShaderModel(), - getMinorShaderModel(), getShaderModelSuffix().c_str()); + std::string profile = FormatString("%s_%d_%d%s", profileType, getMajorShaderModel(), getMinorShaderModel(), getShaderModelSuffix().c_str()); UINT flags = D3DCOMPILE_OPTIMIZATION_LEVEL2; @@ -3606,12 +3433,11 @@ gl::Error Renderer11::compileToExecutable(gl::InfoLog &infoLog, if (workarounds.enableIEEEStrictness) flags |= D3DCOMPILE_IEEE_STRICTNESS; - // Sometimes D3DCompile will fail with the default compilation flags for complicated shaders - // when it would otherwise pass with alternative options. + // Sometimes D3DCompile will fail with the default compilation flags for complicated shaders when it would otherwise pass with alternative options. // Try the default flags first and if compilation fails, try some alternatives. std::vector configs; - configs.push_back(CompileConfig(flags, "default")); - configs.push_back(CompileConfig(flags | D3DCOMPILE_SKIP_VALIDATION, "skip validation")); + configs.push_back(CompileConfig(flags, "default" )); + configs.push_back(CompileConfig(flags | D3DCOMPILE_SKIP_VALIDATION, "skip validation" )); configs.push_back(CompileConfig(flags | D3DCOMPILE_SKIP_OPTIMIZATION, "skip optimization")); if (getMajorShaderModel() == 4 && getShaderModelSuffix() != "") @@ -3623,24 +3449,26 @@ gl::Error Renderer11::compileToExecutable(gl::InfoLog &infoLog, CompileConfig(flags | D3DCOMPILE_AVOID_FLOW_CONTROL, "avoid flow control")); } - D3D_SHADER_MACRO loopMacros[] = {{"ANGLE_ENABLE_LOOP_FLATTEN", "1"}, {0, 0}}; + D3D_SHADER_MACRO loopMacros[] = { {"ANGLE_ENABLE_LOOP_FLATTEN", "1"}, {0, 0} }; ID3DBlob *binary = NULL; std::string debugInfo; - ANGLE_TRY(mCompiler.compileToBinary(infoLog, shaderHLSL, profile, configs, loopMacros, &binary, - &debugInfo)); + gl::Error error = mCompiler.compileToBinary(infoLog, shaderHLSL, profile, configs, loopMacros, &binary, &debugInfo); + if (error.isError()) + { + return error; + } - // It's possible that binary is NULL if the compiler failed in all configurations. Set the - // executable to NULL and return GL_NO_ERROR to signify that there was a link error but the - // internal state is still OK. + // It's possible that binary is NULL if the compiler failed in all configurations. Set the executable to NULL + // and return GL_NO_ERROR to signify that there was a link error but the internal state is still OK. if (!binary) { *outExectuable = NULL; return gl::Error(GL_NO_ERROR); } - gl::Error error = loadExecutable(binary->GetBufferPointer(), binary->GetBufferSize(), type, - streamOutVaryings, separatedOutputBuffers, outExectuable); + error = loadExecutable(binary->GetBufferPointer(), binary->GetBufferSize(), type, + streamOutVaryings, separatedOutputBuffers, outExectuable); SafeRelease(binary); if (error.isError()) @@ -3653,7 +3481,7 @@ gl::Error Renderer11::compileToExecutable(gl::InfoLog &infoLog, (*outExectuable)->appendDebugInfo(debugInfo); } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } UniformStorageD3D *Renderer11::createUniformStorage(size_t storageSize) @@ -3705,19 +3533,14 @@ bool Renderer11::supportsFastCopyBufferToTexture(GLenum internalFormat) const } // We don't support formats which we can't represent without conversion - if (d3d11FormatInfo.format().glInternalFormat != internalFormat) - { - return false; - } - - // Buffer SRV creation for this format was not working on Windows 10. - if (d3d11FormatInfo.texFormat == DXGI_FORMAT_B5G5R5A1_UNORM) + if (d3d11FormatInfo.format.glInternalFormat != internalFormat) { return false; } - // This format is not supported as a buffer SRV. - if (d3d11FormatInfo.texFormat == DXGI_FORMAT_A8_UNORM) + // Buffer SRV creation in this format was not working on Windows 10, repro at least on Intel + // and NVIDIA. + if (internalFormat == GL_RGB5_A1) { return false; } @@ -3725,16 +3548,11 @@ bool Renderer11::supportsFastCopyBufferToTexture(GLenum internalFormat) const return true; } -gl::Error Renderer11::fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, - unsigned int offset, - RenderTargetD3D *destRenderTarget, - GLenum destinationFormat, - GLenum sourcePixelsType, - const gl::Box &destArea) +gl::Error Renderer11::fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTargetD3D *destRenderTarget, + GLenum destinationFormat, GLenum sourcePixelsType, const gl::Box &destArea) { ASSERT(supportsFastCopyBufferToTexture(destinationFormat)); - return mPixelTransfer->copyBufferToTexture(unpack, offset, destRenderTarget, destinationFormat, - sourcePixelsType, destArea); + return mPixelTransfer->copyBufferToTexture(unpack, offset, destRenderTarget, destinationFormat, sourcePixelsType, destArea); } ImageD3D *Renderer11::createImage() @@ -3745,7 +3563,7 @@ ImageD3D *Renderer11::createImage() gl::Error Renderer11::generateMipmap(ImageD3D *dest, ImageD3D *src) { Image11 *dest11 = GetAs(dest); - Image11 *src11 = GetAs(src); + Image11 *src11 = GetAs(src); return Image11::generateMipmap(dest11, src11, mRenderer11DeviceCaps); } @@ -3758,12 +3576,16 @@ gl::Error Renderer11::generateMipmapUsingD3D(TextureStorage *storage, ASSERT(storage11->supportsNativeMipmapFunction()); ID3D11ShaderResourceView *srv; - ANGLE_TRY(storage11->getSRVLevels(textureState.getEffectiveBaseLevel(), - textureState.getEffectiveMaxLevel(), &srv)); + gl::Error error = storage11->getSRVLevels(textureState.getEffectiveBaseLevel(), + textureState.getEffectiveMaxLevel(), &srv); + if (error.isError()) + { + return error; + } mDeviceContext->GenerateMips(srv); - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } TextureStorage *Renderer11::createTextureStorage2D(SwapChainD3D *swapChain) @@ -3785,47 +3607,24 @@ TextureStorage *Renderer11::createTextureStorageExternal( return new TextureStorage11_External(this, stream, desc); } -TextureStorage *Renderer11::createTextureStorage2D(GLenum internalformat, - bool renderTarget, - GLsizei width, - GLsizei height, - int levels, - bool hintLevelZeroOnly) +TextureStorage *Renderer11::createTextureStorage2D(GLenum internalformat, bool renderTarget, GLsizei width, GLsizei height, int levels, bool hintLevelZeroOnly) { - return new TextureStorage11_2D(this, internalformat, renderTarget, width, height, levels, - hintLevelZeroOnly); + return new TextureStorage11_2D(this, internalformat, renderTarget, width, height, levels, hintLevelZeroOnly); } -TextureStorage *Renderer11::createTextureStorageCube(GLenum internalformat, - bool renderTarget, - int size, - int levels, - bool hintLevelZeroOnly) +TextureStorage *Renderer11::createTextureStorageCube(GLenum internalformat, bool renderTarget, int size, int levels, bool hintLevelZeroOnly) { - return new TextureStorage11_Cube(this, internalformat, renderTarget, size, levels, - hintLevelZeroOnly); + return new TextureStorage11_Cube(this, internalformat, renderTarget, size, levels, hintLevelZeroOnly); } -TextureStorage *Renderer11::createTextureStorage3D(GLenum internalformat, - bool renderTarget, - GLsizei width, - GLsizei height, - GLsizei depth, - int levels) +TextureStorage *Renderer11::createTextureStorage3D(GLenum internalformat, bool renderTarget, GLsizei width, GLsizei height, GLsizei depth, int levels) { - return new TextureStorage11_3D(this, internalformat, renderTarget, width, height, depth, - levels); + return new TextureStorage11_3D(this, internalformat, renderTarget, width, height, depth, levels); } -TextureStorage *Renderer11::createTextureStorage2DArray(GLenum internalformat, - bool renderTarget, - GLsizei width, - GLsizei height, - GLsizei depth, - int levels) +TextureStorage *Renderer11::createTextureStorage2DArray(GLenum internalformat, bool renderTarget, GLsizei width, GLsizei height, GLsizei depth, int levels) { - return new TextureStorage11_2DArray(this, internalformat, renderTarget, width, height, depth, - levels); + return new TextureStorage11_2DArray(this, internalformat, renderTarget, width, height, depth, levels); } gl::Error Renderer11::readFromAttachment(const gl::FramebufferAttachment &srcAttachment, @@ -3897,15 +3696,15 @@ gl::Error Renderer11::readFromAttachment(const gl::FramebufferAttachment &srcAtt D3D11_TEXTURE2D_DESC resolveDesc; resolveDesc.Width = static_cast(texSize.width); resolveDesc.Height = static_cast(texSize.height); - resolveDesc.MipLevels = 1; - resolveDesc.ArraySize = 1; + resolveDesc.MipLevels = 1; + resolveDesc.ArraySize = 1; resolveDesc.Format = textureHelper.getFormat(); - resolveDesc.SampleDesc.Count = 1; + resolveDesc.SampleDesc.Count = 1; resolveDesc.SampleDesc.Quality = 0; - resolveDesc.Usage = D3D11_USAGE_DEFAULT; - resolveDesc.BindFlags = 0; - resolveDesc.CPUAccessFlags = 0; - resolveDesc.MiscFlags = 0; + resolveDesc.Usage = D3D11_USAGE_DEFAULT; + resolveDesc.BindFlags = 0; + resolveDesc.CPUAccessFlags = 0; + resolveDesc.MiscFlags = 0; ID3D11Texture2D *resolveTex2D = nullptr; HRESULT result = mDevice->CreateTexture2D(&resolveDesc, nullptr, &resolveTex2D); @@ -3977,17 +3776,16 @@ gl::Error Renderer11::packPixels(const TextureHelper11 &textureHelper, if (FAILED(hr)) { ASSERT(hr == E_OUTOFMEMORY); - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to map internal texture for reading, result: 0x%X.", hr); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to map internal texture for reading, result: 0x%X.", hr); } uint8_t *source = static_cast(mapping.pData); int inputPitch = static_cast(mapping.RowPitch); const auto &formatInfo = textureHelper.getFormatSet(); - ASSERT(formatInfo.format().glInternalFormat != GL_NONE); + ASSERT(formatInfo.format.glInternalFormat != GL_NONE); - PackPixels(params, formatInfo.format(), inputPitch, source, pixelsOut); + PackPixels(params, formatInfo.format, inputPitch, source, pixelsOut); mDeviceContext->Unmap(readResource, 0); @@ -4012,27 +3810,23 @@ gl::Error Renderer11::blitRenderbufferRect(const gl::Rectangle &readRectIn, RenderTarget11 *drawRenderTarget11 = GetAs(drawRenderTarget); if (!drawRenderTarget11) { - return gl::Error( - GL_OUT_OF_MEMORY, - "Failed to retrieve the internal draw render target from the draw framebuffer."); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to retrieve the internal draw render target from the draw framebuffer."); } TextureHelper11 drawTexture = TextureHelper11::MakeAndReference( drawRenderTarget11->getTexture(), drawRenderTarget11->getFormatSet()); - unsigned int drawSubresource = drawRenderTarget11->getSubresourceIndex(); + unsigned int drawSubresource = drawRenderTarget11->getSubresourceIndex(); ID3D11RenderTargetView *drawRTV = drawRenderTarget11->getRenderTargetView(); ID3D11DepthStencilView *drawDSV = drawRenderTarget11->getDepthStencilView(); RenderTarget11 *readRenderTarget11 = GetAs(readRenderTarget); if (!readRenderTarget11) { - return gl::Error( - GL_OUT_OF_MEMORY, - "Failed to retrieve the internal read render target from the read framebuffer."); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to retrieve the internal read render target from the read framebuffer."); } TextureHelper11 readTexture; - unsigned int readSubresource = 0; + unsigned int readSubresource = 0; ID3D11ShaderResourceView *readSRV = nullptr; if (readRenderTarget->getSamples() > 1) @@ -4066,7 +3860,7 @@ gl::Error Renderer11::blitRenderbufferRect(const gl::Rectangle &readRectIn, readTexture = TextureHelper11::MakeAndReference(readRenderTarget11->getTexture(), readRenderTarget11->getFormatSet()); readSubresource = readRenderTarget11->getSubresourceIndex(); - readSRV = readRenderTarget11->getBlitShaderResourceView(); + readSRV = readRenderTarget11->getBlitShaderResourceView(); if (readSRV == nullptr) { ASSERT(depthBlit || stencilBlit); @@ -4090,7 +3884,8 @@ gl::Error Renderer11::blitRenderbufferRect(const gl::Rectangle &readRectIn, // by internally scaling the read and draw rectangles. gl::Rectangle readRect = readRectIn; gl::Rectangle drawRect = drawRectIn; - auto readToDrawX = [&drawRectIn, &readRectIn](int readOffset) { + auto readToDrawX = [&drawRectIn, &readRectIn](int readOffset) + { double readToDrawScale = static_cast(drawRectIn.width) / static_cast(readRectIn.width); return static_cast(round(static_cast(readOffset) * readToDrawScale)); @@ -4106,7 +3901,8 @@ gl::Error Renderer11::blitRenderbufferRect(const gl::Rectangle &readRectIn, drawRect.width -= drawOffset; } - auto readToDrawY = [&drawRectIn, &readRectIn](int readOffset) { + auto readToDrawY = [&drawRectIn, &readRectIn](int readOffset) + { double readToDrawScale = static_cast(drawRectIn.height) / static_cast(readRectIn.height); return static_cast(round(static_cast(readOffset) * readToDrawScale)); @@ -4145,20 +3941,21 @@ gl::Error Renderer11::blitRenderbufferRect(const gl::Rectangle &readRectIn, const auto &destFormatInfo = gl::GetInternalFormatInfo(drawRenderTarget->getInternalFormat()); const auto &srcFormatInfo = gl::GetInternalFormatInfo(readRenderTarget->getInternalFormat()); const auto &formatSet = drawRenderTarget11->getFormatSet(); - const auto &nativeFormat = formatSet.format(); + const DXGI_FORMAT drawDXGIFormat = colorBlit ? formatSet.rtvFormat : formatSet.dsvFormat; + const auto &dxgiFormatInfo = d3d11::GetDXGIFormatInfo(drawDXGIFormat); // Some blits require masking off emulated texture channels. eg: from RGBA8 to RGB8, we // emulate RGB8 with RGBA8, so we need to mask off the alpha channel when we copy. gl::Color colorMask; - colorMask.red = - (srcFormatInfo.redBits > 0) && (destFormatInfo.redBits == 0) && (nativeFormat.redBits > 0); + colorMask.red = (srcFormatInfo.redBits > 0) && (destFormatInfo.redBits == 0) && + (dxgiFormatInfo.redBits > 0); colorMask.green = (srcFormatInfo.greenBits > 0) && (destFormatInfo.greenBits == 0) && - (nativeFormat.greenBits > 0); + (dxgiFormatInfo.greenBits > 0); colorMask.blue = (srcFormatInfo.blueBits > 0) && (destFormatInfo.blueBits == 0) && - (nativeFormat.blueBits > 0); + (dxgiFormatInfo.blueBits > 0); colorMask.alpha = (srcFormatInfo.alphaBits > 0) && (destFormatInfo.alphaBits == 0) && - (nativeFormat.alphaBits > 0); + (dxgiFormatInfo.alphaBits > 0); // We only currently support masking off the alpha channel. bool colorMaskingNeeded = colorMask.alpha; @@ -4172,19 +3969,17 @@ gl::Error Renderer11::blitRenderbufferRect(const gl::Rectangle &readRectIn, bool stretchRequired = readRect.width != drawRect.width || readRect.height != drawRect.height; - bool flipRequired = - readRect.width < 0 || readRect.height < 0 || drawRect.width < 0 || drawRect.height < 0; + bool flipRequired = readRect.width < 0 || readRect.height < 0 || drawRect.width < 0 || drawRect.height < 0; bool outOfBounds = readRect.x < 0 || readRect.x + readRect.width > readSize.width || readRect.y < 0 || readRect.y + readRect.height > readSize.height || drawRect.x < 0 || drawRect.x + drawRect.width > drawSize.width || drawRect.y < 0 || drawRect.y + drawRect.height > drawSize.height; - bool partialDSBlit = - (nativeFormat.depthBits > 0 && depthBlit) != (nativeFormat.stencilBits > 0 && stencilBlit); + bool partialDSBlit = (dxgiFormatInfo.depthBits > 0 && depthBlit) != (dxgiFormatInfo.stencilBits > 0 && stencilBlit); - if (readRenderTarget11->getFormatSet().formatID == - drawRenderTarget11->getFormatSet().formatID && + if (readRenderTarget11->getFormatSet().format.id == + drawRenderTarget11->getFormatSet().format.id && !stretchRequired && !outOfBounds && !flipRequired && !partialDSBlit && !colorMaskingNeeded && (!(depthBlit || stencilBlit) || wholeBufferCopy)) { @@ -4192,17 +3987,16 @@ gl::Error Renderer11::blitRenderbufferRect(const gl::Rectangle &readRectIn, UINT dstY = drawRect.y; D3D11_BOX readBox; - readBox.left = readRect.x; - readBox.right = readRect.x + readRect.width; - readBox.top = readRect.y; + readBox.left = readRect.x; + readBox.right = readRect.x + readRect.width; + readBox.top = readRect.y; readBox.bottom = readRect.y + readRect.height; - readBox.front = 0; - readBox.back = 1; + readBox.front = 0; + readBox.back = 1; if (scissorNeeded) { - // drawRect is guaranteed to have positive width and height because stretchRequired is - // false. + // drawRect is guaranteed to have positive width and height because stretchRequired is false. ASSERT(drawRect.width >= 0 || drawRect.height >= 0); if (drawRect.x < scissor->x) @@ -4282,7 +4076,7 @@ void Renderer11::onSwap() // Send histogram updates every half hour const double kHistogramUpdateInterval = 30 * 60; - const double currentTime = ANGLEPlatformCurrent()->monotonicallyIncreasingTime(); + const double currentTime = ANGLEPlatformCurrent()->monotonicallyIncreasingTime(); const double timeSinceLastUpdate = currentTime - mLastHistogramUpdateTime; if (timeSinceLastUpdate > kHistogramUpdateInterval) @@ -4363,7 +4157,7 @@ Renderer11::resolveMultisampledTexture(RenderTarget11 *renderTarget, bool depth, bool Renderer11::getLUID(LUID *adapterLuid) const { adapterLuid->HighPart = 0; - adapterLuid->LowPart = 0; + adapterLuid->LowPart = 0; if (!mDxgiAdapter) { @@ -4380,18 +4174,14 @@ bool Renderer11::getLUID(LUID *adapterLuid) const return true; } -VertexConversionType Renderer11::getVertexConversionType( - gl::VertexFormatType vertexFormatType) const +VertexConversionType Renderer11::getVertexConversionType(gl::VertexFormatType vertexFormatType) const { - return d3d11::GetVertexFormatInfo(vertexFormatType, mRenderer11DeviceCaps.featureLevel) - .conversionType; + return d3d11::GetVertexFormatInfo(vertexFormatType, mRenderer11DeviceCaps.featureLevel).conversionType; } GLenum Renderer11::getVertexComponentType(gl::VertexFormatType vertexFormatType) const { - const auto &format = - d3d11::GetVertexFormatInfo(vertexFormatType, mRenderer11DeviceCaps.featureLevel); - return d3d11::GetComponentType(format.nativeFormat); + return d3d11::GetDXGIFormatInfo(d3d11::GetVertexFormatInfo(vertexFormatType, mRenderer11DeviceCaps.featureLevel).nativeFormat).componentType; } gl::ErrorOrResult Renderer11::getVertexSpaceRequired( @@ -4430,10 +4220,8 @@ gl::ErrorOrResult Renderer11::getVertexSpaceRequired( return elementSize * elementCount; } -void Renderer11::generateCaps(gl::Caps *outCaps, - gl::TextureCapsMap *outTextureCaps, - gl::Extensions *outExtensions, - gl::Limitations *outLimitations) const +void Renderer11::generateCaps(gl::Caps *outCaps, gl::TextureCapsMap *outTextureCaps, + gl::Extensions *outExtensions, gl::Limitations *outLimitations) const { d3d11_gl::GenerateCaps(mDevice, mDeviceContext, mRenderer11DeviceCaps, outCaps, outTextureCaps, outExtensions, outLimitations); @@ -4576,7 +4364,7 @@ gl::Error Renderer11::getScratchMemoryBuffer(size_t requestedSize, MemoryBuffer if (mScratchMemoryBuffer.size() == requestedSize) { mScratchMemoryBufferResetCounter = ScratchMemoryBufferLifetime; - *bufferOut = &mScratchMemoryBuffer; + *bufferOut = &mScratchMemoryBuffer; return gl::NoError(); } diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.h b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.h index 576fe3215..2f536bfd8 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.h @@ -123,17 +123,9 @@ class Renderer11 : public RendererD3D SwapChainD3D *createSwapChain(NativeWindowD3D *nativeWindow, HANDLE shareHandle, - IUnknown *d3dTexture, GLenum backBufferFormat, GLenum depthBufferFormat, EGLint orientation) override; - egl::Error getD3DTextureInfo(IUnknown *d3dTexture, - EGLint *width, - EGLint *height, - GLenum *fboFormat) const override; - egl::Error validateShareHandle(const egl::Config *config, - HANDLE shareHandle, - const egl::AttributeMap &attribs) const override; gl::Error setSamplerState(gl::SamplerType type, int index, @@ -170,6 +162,7 @@ class Renderer11 : public RendererD3D bool testDeviceLost() override; bool testDeviceResettable() override; + VendorID getVendorId() const; SIZE_T getMaxResourceSize() const; std::string getRendererDescription() const; DeviceIdentifier getAdapterIdentifier() const override; @@ -224,10 +217,6 @@ class Renderer11 : public RendererD3D bool unpackFlipY, bool unpackPremultiplyAlpha, bool unpackUnmultiplyAlpha) override; - gl::Error copyCompressedTexture(const gl::Texture *source, - GLint sourceLevel, - TextureStorage *storage, - GLint destLevel) override; // RenderTarget creation gl::Error createRenderTarget(int width, @@ -343,7 +332,7 @@ class Renderer11 : public RendererD3D bool colorBlit, bool depthBlit, bool stencilBlit); bool isES3Capable() const; - const Renderer11DeviceCaps &getRenderer11DeviceCaps() const { return mRenderer11DeviceCaps; }; + const Renderer11DeviceCaps &getRenderer11DeviceCaps() { return mRenderer11DeviceCaps; }; RendererClass getRendererClass() const override { return RENDERER_D3D11; } InputLayoutCache *getInputLayoutCache() { return &mInputLayoutCache; } diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/ShaderExecutable11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/ShaderExecutable11.cpp index e20b161ef..4da51afe4 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/ShaderExecutable11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/ShaderExecutable11.cpp @@ -85,6 +85,7 @@ UniformStorage11::UniformStorage11(Renderer11 *renderer, size_t initialSize) constantBufferDescription.StructureByteStride = 0; HRESULT result = d3d11Device->CreateBuffer(&constantBufferDescription, NULL, &mConstantBuffer); + UNUSED_ASSERTION_VARIABLE(result); ASSERT(SUCCEEDED(result)); } } diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp index 0e28c8c18..b8b0e45c4 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp @@ -492,11 +492,16 @@ gl::Error StateManager11::setBlendState(const gl::Framebuffer *framebuffer, { if (!mBlendStateIsDirty && sampleMask == mCurSampleMask) { - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } ID3D11BlendState *dxBlendState = nullptr; - ANGLE_TRY(mRenderer->getStateCache().getBlendState(framebuffer, blendState, &dxBlendState)); + gl::Error error = + mRenderer->getStateCache().getBlendState(framebuffer, blendState, &dxBlendState); + if (error.isError()) + { + return error; + } ASSERT(dxBlendState != nullptr); @@ -527,7 +532,7 @@ gl::Error StateManager11::setBlendState(const gl::Framebuffer *framebuffer, mBlendStateIsDirty = false; - return gl::NoError(); + return error; } gl::Error StateManager11::setDepthStencilState(const gl::State &glState) @@ -547,7 +552,7 @@ gl::Error StateManager11::setDepthStencilState(const gl::State &glState) disableDepth == mCurDisableDepth.value() && mCurDisableStencil.valid() && disableStencil == mCurDisableStencil.value()) { - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } const auto &depthStencilState = glState.getDepthStencilState(); @@ -567,8 +572,12 @@ gl::Error StateManager11::setDepthStencilState(const gl::State &glState) (depthStencilState.stencilBackMask & maxStencil)); ID3D11DepthStencilState *dxDepthStencilState = NULL; - ANGLE_TRY(mRenderer->getStateCache().getDepthStencilState( - depthStencilState, disableDepth, disableStencil, &dxDepthStencilState)); + gl::Error error = mRenderer->getStateCache().getDepthStencilState( + depthStencilState, disableDepth, disableStencil, &dxDepthStencilState); + if (error.isError()) + { + return error; + } ASSERT(dxDepthStencilState); @@ -592,7 +601,7 @@ gl::Error StateManager11::setDepthStencilState(const gl::State &glState) mDepthStencilStateIsDirty = false; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error StateManager11::setRasterizerState(const gl::RasterizerState &rasterState) @@ -601,10 +610,11 @@ gl::Error StateManager11::setRasterizerState(const gl::RasterizerState &rasterSt if (!mRasterizerStateIsDirty && rasterState.pointDrawMode == mCurRasterState.pointDrawMode && rasterState.multiSample == mCurRasterState.multiSample) { - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } ID3D11RasterizerState *dxRasterState = nullptr; + gl::Error error(GL_NO_ERROR); if (mCurPresentPathFastEnabled) { @@ -623,13 +633,18 @@ gl::Error StateManager11::setRasterizerState(const gl::RasterizerState &rasterSt modifiedRasterState.frontFace = GL_CCW; } - ANGLE_TRY(mRenderer->getStateCache().getRasterizerState( - modifiedRasterState, mCurScissorEnabled, &dxRasterState)); + error = mRenderer->getStateCache().getRasterizerState(modifiedRasterState, + mCurScissorEnabled, &dxRasterState); } else { - ANGLE_TRY(mRenderer->getStateCache().getRasterizerState(rasterState, mCurScissorEnabled, - &dxRasterState)); + error = mRenderer->getStateCache().getRasterizerState(rasterState, mCurScissorEnabled, + &dxRasterState); + } + + if (error.isError()) + { + return error; } mRenderer->getDeviceContext()->RSSetState(dxRasterState); @@ -637,7 +652,7 @@ gl::Error StateManager11::setRasterizerState(const gl::RasterizerState &rasterSt mCurRasterState = rasterState; mRasterizerStateIsDirty = false; - return gl::NoError(); + return error; } void StateManager11::setScissorRectangle(const gl::Rectangle &scissor, bool enabled) @@ -852,7 +867,7 @@ gl::Error StateManager11::onMakeCurrent(const gl::ContextState &data) } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } void StateManager11::setShaderResource(gl::SamplerType shaderType, @@ -886,7 +901,7 @@ gl::Error StateManager11::clearTextures(gl::SamplerType samplerType, { if (rangeStart == rangeEnd) { - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } auto ¤tSRVs = (samplerType == gl::SAMPLER_VERTEX ? mCurVertexSRVs : mCurPixelSRVs); @@ -896,7 +911,7 @@ gl::Error StateManager11::clearTextures(gl::SamplerType samplerType, if (clearRange.empty()) { - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } auto deviceContext = mRenderer->getDeviceContext(); @@ -918,7 +933,7 @@ gl::Error StateManager11::clearTextures(gl::SamplerType samplerType, currentSRVs.update(samplerIndex, nullptr); } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } void StateManager11::unsetConflictingSRVs(gl::SamplerType samplerType, @@ -974,7 +989,11 @@ void StateManager11::deinitialize() gl::Error StateManager11::syncFramebuffer(gl::Framebuffer *framebuffer) { Framebuffer11 *framebuffer11 = GetImplAs(framebuffer); - ANGLE_TRY(framebuffer11->markAttachmentsDirty()); + gl::Error error = framebuffer11->invalidateSwizzles(); + if (error.isError()) + { + return error; + } if (framebuffer11->hasAnyInternalDirtyBit()) { @@ -984,7 +1003,7 @@ gl::Error StateManager11::syncFramebuffer(gl::Framebuffer *framebuffer) if (!mRenderTargetIsDirty) { - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } mRenderTargetIsDirty = false; @@ -998,7 +1017,7 @@ gl::Error StateManager11::syncFramebuffer(gl::Framebuffer *framebuffer) const gl::Extents &size = framebuffer->getFirstColorbuffer()->getSize(); if (size.width == 0 || size.height == 0) { - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } } @@ -1082,7 +1101,7 @@ gl::Error StateManager11::syncFramebuffer(gl::Framebuffer *framebuffer) setViewportBounds(renderTargetWidth, renderTargetHeight); - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error StateManager11::updateCurrentValueAttribs(const gl::State &state, @@ -1105,11 +1124,15 @@ gl::Error StateManager11::updateCurrentValueAttribs(const gl::State &state, currentValueAttrib->currentValueType = currentValue.Type; currentValueAttrib->attribute = &vertexAttributes[attribIndex]; - ANGLE_TRY(vertexDataManager->storeCurrentValue(currentValue, currentValueAttrib, - static_cast(attribIndex))); + gl::Error error = vertexDataManager->storeCurrentValue(currentValue, currentValueAttrib, + static_cast(attribIndex)); + if (error.isError()) + { + return error; + } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } const std::vector &StateManager11::getCurrentValueAttribs() const diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp index a410c425d..b12fd80d2 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp @@ -45,11 +45,10 @@ bool NeedsOffscreenTexture(Renderer11 *renderer, NativeWindow11 *nativeWindow, E SwapChain11::SwapChain11(Renderer11 *renderer, NativeWindow11 *nativeWindow, HANDLE shareHandle, - IUnknown *d3dTexture, GLenum backBufferFormat, GLenum depthBufferFormat, EGLint orientation) - : SwapChainD3D(shareHandle, d3dTexture, backBufferFormat, depthBufferFormat), + : SwapChainD3D(shareHandle, backBufferFormat, depthBufferFormat), mRenderer(renderer), mWidth(-1), mHeight(-1), @@ -181,29 +180,43 @@ EGLint SwapChain11::resetOffscreenColorBuffer(int backbufferWidth, int backbuffe const d3d11::Format &backbufferFormatInfo = d3d11::Format::Get(mOffscreenRenderTargetFormat, mRenderer->getRenderer11DeviceCaps()); - // If the app passed in a share handle or D3D texture, open the resource - // See EGL_ANGLE_d3d_share_handle_client_buffer and EGL_ANGLE_d3d_texture_client_buffer - if (mAppCreatedShareHandle || mD3DTexture != nullptr) + // If the app passed in a share handle, open the resource + // See EGL_ANGLE_d3d_share_handle_client_buffer + if (mAppCreatedShareHandle) { - if (mAppCreatedShareHandle) - { - ID3D11Resource *tempResource11; - HRESULT result = device->OpenSharedResource(mShareHandle, __uuidof(ID3D11Resource), - (void **)&tempResource11); - ASSERT(SUCCEEDED(result)); + ID3D11Resource *tempResource11; + HRESULT result = device->OpenSharedResource(mShareHandle, __uuidof(ID3D11Resource), (void**)&tempResource11); - mOffscreenTexture = d3d11::DynamicCastComObject(tempResource11); - SafeRelease(tempResource11); + if (FAILED(result)) + { + ERR("Failed to open the swap chain pbuffer share handle: %08lX", result); + release(); + return EGL_BAD_PARAMETER; } - else if (mD3DTexture != nullptr) + + result = tempResource11->QueryInterface(__uuidof(ID3D11Texture2D), (void**)&mOffscreenTexture); + SafeRelease(tempResource11); + + if (FAILED(result)) { - mOffscreenTexture = d3d11::DynamicCastComObject(mD3DTexture); + ERR("Failed to query texture2d interface in pbuffer share handle: %08lX", result); + release(); + return EGL_BAD_PARAMETER; } - else + + // Validate offscreen texture parameters + D3D11_TEXTURE2D_DESC offscreenTextureDesc = {0}; + mOffscreenTexture->GetDesc(&offscreenTextureDesc); + + if (offscreenTextureDesc.Width != (UINT)backbufferWidth || + offscreenTextureDesc.Height != (UINT)backbufferHeight || + offscreenTextureDesc.Format != backbufferFormatInfo.texFormat || + offscreenTextureDesc.MipLevels != 1 || offscreenTextureDesc.ArraySize != 1) { - UNREACHABLE(); + ERR("Invalid texture parameters in the shared offscreen texture pbuffer"); + release(); + return EGL_BAD_PARAMETER; } - ASSERT(mOffscreenTexture != nullptr); } else { diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h index 1d7e57b7c..1ea608054 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h @@ -24,7 +24,6 @@ class SwapChain11 final : public SwapChainD3D SwapChain11(Renderer11 *renderer, NativeWindow11 *nativeWindow, HANDLE shareHandle, - IUnknown *d3dTexture, GLenum backBufferFormat, GLenum depthBufferFormat, EGLint orientation); diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp index 36c888dd3..738dae13f 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp @@ -31,15 +31,15 @@ namespace rx { -TextureStorage11::SRVKey::SRVKey(int baseLevel, int mipLevels, bool swizzle, bool dropStencil) - : baseLevel(baseLevel), mipLevels(mipLevels), swizzle(swizzle), dropStencil(dropStencil) +TextureStorage11::SRVKey::SRVKey(int baseLevel, int mipLevels, bool swizzle) + : baseLevel(baseLevel), mipLevels(mipLevels), swizzle(swizzle) { } bool TextureStorage11::SRVKey::operator<(const SRVKey &rhs) const { - return std::tie(baseLevel, mipLevels, swizzle, dropStencil) < - std::tie(rhs.baseLevel, rhs.mipLevels, rhs.swizzle, rhs.dropStencil); + return std::tie(baseLevel, mipLevels, swizzle) < + std::tie(rhs.baseLevel, rhs.mipLevels, rhs.swizzle); } TextureStorage11::TextureStorage11(Renderer11 *renderer, @@ -53,7 +53,6 @@ TextureStorage11::TextureStorage11(Renderer11 *renderer, mTextureWidth(0), mTextureHeight(0), mTextureDepth(0), - mDropStencilTexture(nullptr), mBindFlags(bindFlags), mMiscFlags(miscFlags) { @@ -74,7 +73,6 @@ TextureStorage11::~TextureStorage11() SafeRelease(i->second); } mSrvCache.clear(); - SafeRelease(mDropStencilTexture); } DWORD TextureStorage11::GetTextureBindFlags(GLenum internalFormat, @@ -110,7 +108,9 @@ DWORD TextureStorage11::GetTextureMiscFlags(GLenum internalFormat, const d3d11::Format &formatInfo = d3d11::Format::Get(internalFormat, renderer11DeviceCaps); if (renderTarget && levels > 1) { - if (d3d11::SupportsMipGen(formatInfo.texFormat, renderer11DeviceCaps.featureLevel)) + const d3d11::DXGIFormat &dxgiFormatInfo = d3d11::GetDXGIFormatInfo(formatInfo.texFormat); + + if (dxgiFormatInfo.nativeMipmapSupport(renderer11DeviceCaps.featureLevel)) { miscFlags |= D3D11_RESOURCE_MISC_GENERATE_MIPS; } @@ -185,8 +185,8 @@ gl::Error TextureStorage11::getSRV(const gl::TextureState &textureState, { // Make sure to add the level offset for our tiny compressed texture workaround const GLuint effectiveBaseLevel = textureState.getEffectiveBaseLevel(); - bool swizzleRequired = textureState.swizzleRequired(); - bool mipmapping = gl::IsMipmapFiltered(textureState.getSamplerState()); + bool swizzleRequired = textureState.swizzleRequired(); + bool mipmapping = gl::IsMipmapFiltered(textureState.getSamplerState()); unsigned int mipLevels = mipmapping ? (textureState.getEffectiveMaxLevel() - effectiveBaseLevel + 1) : 1; @@ -203,7 +203,11 @@ gl::Error TextureStorage11::getSRV(const gl::TextureState &textureState, if (mRenderer->getWorkarounds().zeroMaxLodWorkaround) { // We must ensure that the level zero texture is in sync with mipped texture. - ANGLE_TRY(useLevelZeroWorkaroundTexture(mipLevels == 1)); + gl::Error error = useLevelZeroWorkaroundTexture(mipLevels == 1); + if (error.isError()) + { + return error; + } } if (swizzleRequired) @@ -211,22 +215,7 @@ gl::Error TextureStorage11::getSRV(const gl::TextureState &textureState, verifySwizzleExists(textureState.getSwizzleState()); } - // We drop the stencil when sampling from the SRV if three conditions hold: - // 1. the drop stencil workaround is enabled. - bool workaround = mRenderer->getWorkarounds().emulateTinyStencilTextures; - // 2. this is a stencil texture. - bool hasStencil = (mFormatInfo.format().stencilBits > 0); - // 3. the texture has a 1x1 or 2x2 mip. - bool hasSmallMips = (getLevelWidth(mMipLevels - 1) <= 2 || getLevelHeight(mMipLevels - 1) <= 2); - - bool useDropStencil = (workaround && hasStencil && hasSmallMips); - if (useDropStencil) - { - // Ensure drop texture gets re-created, if SRV is cached. - ANGLE_TRY(createDropStencilTexture()); - } - - SRVKey key(effectiveBaseLevel, mipLevels, swizzleRequired, useDropStencil); + SRVKey key(effectiveBaseLevel, mipLevels, swizzleRequired); ANGLE_TRY(getCachedOrCreateSRV(key, outSRV)); return gl::NoError(); @@ -243,30 +232,17 @@ gl::Error TextureStorage11::getCachedOrCreateSRV(const SRVKey &key, } ID3D11Resource *texture = nullptr; - DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN; - if (key.swizzle) { - const auto &swizzleFormat = - mFormatInfo.getSwizzleFormat(mRenderer->getRenderer11DeviceCaps()); - ASSERT(!key.dropStencil || swizzleFormat.format().stencilBits == 0); ANGLE_TRY(getSwizzleTexture(&texture)); - format = swizzleFormat.srvFormat; - } - else if (key.dropStencil) - { - ASSERT(mDropStencilTexture); - texture = mDropStencilTexture; - format = DXGI_FORMAT_R32_FLOAT; } else { ANGLE_TRY(getResource(&texture)); - format = mFormatInfo.srvFormat; } ID3D11ShaderResourceView *srv = nullptr; - + DXGI_FORMAT format = (key.swizzle ? mFormatInfo.swizzle.srvFormat : mFormatInfo.srvFormat); ANGLE_TRY(createSRV(key.baseLevel, key.mipLevels, format, texture, &srv)); mSrvCache.insert(std::make_pair(key, srv)); @@ -295,17 +271,25 @@ gl::Error TextureStorage11::getSRVLevel(int mipLevel, else { ID3D11Resource *resource = nullptr; - ANGLE_TRY(getResource(&resource)); + gl::Error error = getResource(&resource); + if (error.isError()) + { + return error; + } DXGI_FORMAT resourceFormat = blitSRV ? mFormatInfo.blitSRVFormat : mFormatInfo.srvFormat; - ANGLE_TRY(createSRV(mipLevel, 1, resourceFormat, resource, &levelSRVs[mipLevel])); + error = createSRV(mipLevel, 1, resourceFormat, resource, &levelSRVs[mipLevel]); + if (error.isError()) + { + return error; + } } } *outSRV = levelSRVs[mipLevel]; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureStorage11::getSRVLevels(GLint baseLevel, @@ -326,12 +310,14 @@ gl::Error TextureStorage11::getSRVLevels(GLint baseLevel, if (mRenderer->getWorkarounds().zeroMaxLodWorkaround) { // We must ensure that the level zero texture is in sync with mipped texture. - ANGLE_TRY(useLevelZeroWorkaroundTexture(mipLevels == 1)); + gl::Error error = useLevelZeroWorkaroundTexture(mipLevels == 1); + if (error.isError()) + { + return error; + } } - // TODO(jmadill): Assert we don't need to drop stencil. - - SRVKey key(baseLevel, mipLevels, false, false); + SRVKey key(baseLevel, mipLevels, false); ANGLE_TRY(getCachedOrCreateSRV(key, outSRV)); return gl::NoError(); @@ -351,25 +337,38 @@ gl::Error TextureStorage11::generateSwizzles(const gl::SwizzleState &swizzleTarg { // Need to re-render the swizzle for this level ID3D11ShaderResourceView *sourceSRV = nullptr; - ANGLE_TRY(getSRVLevel(level, true, &sourceSRV)); + gl::Error error = getSRVLevel(level, true, &sourceSRV); + + if (error.isError()) + { + return error; + } ID3D11RenderTargetView *destRTV = nullptr; - ANGLE_TRY(getSwizzleRenderTarget(level, &destRTV)); + error = getSwizzleRenderTarget(level, &destRTV); + if (error.isError()) + { + return error; + } gl::Extents size(getLevelWidth(level), getLevelHeight(level), getLevelDepth(level)); Blit11 *blitter = mRenderer->getBlitter(); - ANGLE_TRY(blitter->swizzleTexture(sourceSRV, destRTV, size, swizzleTarget)); + error = blitter->swizzleTexture(sourceSRV, destRTV, size, swizzleTarget); + if (error.isError()) + { + return error; + } mSwizzleCache[level] = swizzleTarget; } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } -void TextureStorage11::markLevelDirty(int mipLevel) +void TextureStorage11::invalidateSwizzleCacheLevel(int mipLevel) { if (mipLevel >= 0 && static_cast(mipLevel) < ArraySize(mSwizzleCache)) { @@ -377,15 +376,13 @@ void TextureStorage11::markLevelDirty(int mipLevel) // not a valid swizzle combination mSwizzleCache[mipLevel] = gl::SwizzleState(); } - - SafeRelease(mDropStencilTexture); } -void TextureStorage11::markDirty() +void TextureStorage11::invalidateSwizzleCache() { for (unsigned int mipLevel = 0; mipLevel < ArraySize(mSwizzleCache); mipLevel++) { - markLevelDirty(mipLevel); + invalidateSwizzleCacheLevel(mipLevel); } } @@ -398,7 +395,7 @@ gl::Error TextureStorage11::updateSubresourceLevel(ID3D11Resource *srcTexture, const GLint level = index.mipIndex; - markLevelDirty(level); + invalidateSwizzleCacheLevel(level); gl::Extents texSize(getLevelWidth(level), getLevelHeight(level), getLevelDepth(level)); @@ -428,7 +425,7 @@ gl::Error TextureStorage11::updateSubresourceLevel(ID3D11Resource *srcTexture, if (!fullCopy && mFormatInfo.dsvFormat != DXGI_FORMAT_UNKNOWN) { // CopySubresourceRegion cannot copy partial depth stencils, use the blitter instead - Blit11 *blitter = mRenderer->getBlitter(); + Blit11 *blitter = mRenderer->getBlitter(); TextureHelper11 source = TextureHelper11::MakeAndReference(srcTexture, getFormatSet()); TextureHelper11 dest = TextureHelper11::MakeAndReference(dstTexture, getFormatSet()); return blitter->copyDepthStencil(source, sourceSubresource, copyArea, texSize, dest, @@ -460,16 +457,22 @@ gl::Error TextureStorage11::copySubresourceLevel(ID3D11Resource *dstTexture, ASSERT(dstTexture); ID3D11Resource *srcTexture = nullptr; + gl::Error error(GL_NO_ERROR); // If the zero-LOD workaround is active and we want to update a level greater than zero, then we // should update the mipmapped texture, even if mapmaps are currently disabled. if (index.mipIndex > 0 && mRenderer->getWorkarounds().zeroMaxLodWorkaround) { - ANGLE_TRY(getMippedResource(&srcTexture)); + error = getMippedResource(&srcTexture); } else { - ANGLE_TRY(getResource(&srcTexture)); + error = getResource(&srcTexture); + } + + if (error.isError()) + { + return error; } ASSERT(srcTexture); @@ -508,17 +511,25 @@ gl::Error TextureStorage11::generateMipmap(const gl::ImageIndex &sourceIndex, { ASSERT(sourceIndex.layerIndex == destIndex.layerIndex); - markLevelDirty(destIndex.mipIndex); + invalidateSwizzleCacheLevel(destIndex.mipIndex); RenderTargetD3D *source = nullptr; - ANGLE_TRY(getRenderTarget(sourceIndex, &source)); + gl::Error error = getRenderTarget(sourceIndex, &source); + if (error.isError()) + { + return error; + } RenderTargetD3D *dest = nullptr; - ANGLE_TRY(getRenderTarget(destIndex, &dest)); + error = getRenderTarget(destIndex, &dest); + if (error.isError()) + { + return error; + } ID3D11ShaderResourceView *sourceSRV = GetAs(source)->getBlitShaderResourceView(); - ID3D11RenderTargetView *destRTV = GetAs(dest)->getRenderTargetView(); + ID3D11RenderTargetView *destRTV = GetAs(dest)->getRenderTargetView(); gl::Box sourceArea(0, 0, 0, source->getWidth(), source->getHeight(), source->getDepth()); gl::Extents sourceSize(source->getWidth(), source->getHeight(), source->getDepth()); @@ -543,7 +554,7 @@ void TextureStorage11::verifySwizzleExists(const gl::SwizzleState &swizzleState) void TextureStorage11::clearSRVCache() { - markDirty(); + invalidateSwizzleCache(); auto iter = mSrvCache.begin(); while (iter != mSrvCache.end()) @@ -571,64 +582,72 @@ gl::Error TextureStorage11::copyToStorage(TextureStorage *destStorage) ASSERT(destStorage); ID3D11Resource *sourceResouce = nullptr; - ANGLE_TRY(getResource(&sourceResouce)); + gl::Error error = getResource(&sourceResouce); + if (error.isError()) + { + return error; + } TextureStorage11 *dest11 = GetAs(destStorage); ID3D11Resource *destResource = nullptr; - ANGLE_TRY(dest11->getResource(&destResource)); + error = dest11->getResource(&destResource); + if (error.isError()) + { + return error; + } ID3D11DeviceContext *immediateContext = mRenderer->getDeviceContext(); immediateContext->CopyResource(destResource, sourceResouce); - dest11->markDirty(); + dest11->invalidateSwizzleCache(); - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureStorage11::setData(const gl::ImageIndex &index, ImageD3D *image, const gl::Box *destBox, - GLenum inputType, + GLenum type, const gl::PixelUnpackState &unpack, const uint8_t *pixelData) { ASSERT(!image->isDirty()); - markLevelDirty(index.mipIndex); - ID3D11Resource *resource = nullptr; ANGLE_TRY(getResource(&resource)); ASSERT(resource); UINT destSubresource = getSubresourceIndex(index); - const auto sizedInputFormat = image->getSizedInputFormat(inputType); - const gl::InternalFormat &inputFormat = gl::GetInternalFormatInfo(sizedInputFormat); + const gl::InternalFormat &internalFormatInfo = + gl::GetInternalFormatInfo(image->getInternalFormat()); gl::Box levelBox(0, 0, 0, getLevelWidth(index.mipIndex), getLevelHeight(index.mipIndex), getLevelDepth(index.mipIndex)); bool fullUpdate = (destBox == nullptr || *destBox == levelBox); - ASSERT(inputFormat.depthBits == 0 || fullUpdate); + ASSERT(internalFormatInfo.depthBits == 0 || fullUpdate); // TODO(jmadill): Handle compressed formats // Compressed formats have different load syntax, so we'll have to handle them with slightly // different logic. Will implemnent this in a follow-up patch, and ensure we do not use SetData // with compressed formats in the calling logic. - ASSERT(!inputFormat.compressed); + ASSERT(!internalFormatInfo.compressed); - const int width = destBox ? destBox->width : static_cast(image->getWidth()); - const int height = destBox ? destBox->height : static_cast(image->getHeight()); - const int depth = destBox ? destBox->depth : static_cast(image->getDepth()); + const int width = destBox ? destBox->width : static_cast(image->getWidth()); + const int height = destBox ? destBox->height : static_cast(image->getHeight()); + const int depth = destBox ? destBox->depth : static_cast(image->getDepth()); GLuint srcRowPitch = 0; ANGLE_TRY_RESULT( - inputFormat.computeRowPitch(width, unpack.alignment, unpack.rowLength), + internalFormatInfo.computeRowPitch(type, width, unpack.alignment, unpack.rowLength), srcRowPitch); GLuint srcDepthPitch = 0; - ANGLE_TRY_RESULT(gl::InternalFormat::computeDepthPitch(height, unpack.imageHeight, srcRowPitch), + ANGLE_TRY_RESULT(internalFormatInfo.computeDepthPitch(type, width, height, unpack.alignment, + unpack.rowLength, unpack.imageHeight), srcDepthPitch); GLuint srcSkipBytes = 0; ANGLE_TRY_RESULT( - inputFormat.computeSkipBytes(srcRowPitch, srcDepthPitch, unpack, index.is3D()), + internalFormatInfo.computeSkipBytes(srcRowPitch, srcDepthPitch, unpack.skipImages, + unpack.skipRows, unpack.skipPixels, index.is3D()), srcSkipBytes); const d3d11::Format &d3d11Format = @@ -645,7 +664,7 @@ gl::Error TextureStorage11::setData(const gl::ImageIndex &index, MemoryBuffer *conversionBuffer = nullptr; const uint8_t *data = nullptr; - LoadImageFunctionInfo loadFunctionInfo = d3d11Format.getLoadFunctions()(inputType); + LoadImageFunctionInfo loadFunctionInfo = d3d11Format.loadFunctions(type); if (loadFunctionInfo.requiresConversion) { ANGLE_TRY(mRenderer->getScratchMemoryBuffer(neededSize, &conversionBuffer)); @@ -687,12 +706,6 @@ gl::Error TextureStorage11::setData(const gl::ImageIndex &index, return gl::NoError(); } -gl::Error TextureStorage11::createDropStencilTexture() -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION, "Drop stencil texture not implemented."); -} - TextureStorage11_2D::TextureStorage11_2D(Renderer11 *renderer, SwapChain11 *swapchain) : TextureStorage11(renderer, D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE, @@ -778,7 +791,6 @@ TextureStorage11_2D::~TextureStorage11_2D() if (error.isError()) { // TODO: Find a way to report this back to the context - ERR("Error initialization texture storage: %x", error.getCode()); } } } @@ -817,37 +829,63 @@ gl::Error TextureStorage11_2D::copyToStorage(TextureStorage *destStorage) // corresponding textures in destStorage. if (mTexture) { - ANGLE_TRY(dest11->useLevelZeroWorkaroundTexture(false)); + gl::Error error = dest11->useLevelZeroWorkaroundTexture(false); + if (error.isError()) + { + return error; + } ID3D11Resource *destResource = nullptr; - ANGLE_TRY(dest11->getResource(&destResource)); + error = dest11->getResource(&destResource); + if (error.isError()) + { + return error; + } immediateContext->CopyResource(destResource, mTexture); } if (mLevelZeroTexture) { - ANGLE_TRY(dest11->useLevelZeroWorkaroundTexture(true)); + gl::Error error = dest11->useLevelZeroWorkaroundTexture(true); + if (error.isError()) + { + return error; + } ID3D11Resource *destResource = nullptr; - ANGLE_TRY(dest11->getResource(&destResource)); + error = dest11->getResource(&destResource); + if (error.isError()) + { + return error; + } immediateContext->CopyResource(destResource, mLevelZeroTexture); } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } + else + { + ID3D11Resource *sourceResouce = nullptr; + gl::Error error = getResource(&sourceResouce); + if (error.isError()) + { + return error; + } - ID3D11Resource *sourceResouce = nullptr; - ANGLE_TRY(getResource(&sourceResouce)); - - ID3D11Resource *destResource = nullptr; - ANGLE_TRY(dest11->getResource(&destResource)); + ID3D11Resource *destResource = nullptr; + error = dest11->getResource(&destResource); + if (error.isError()) + { + return error; + } - immediateContext->CopyResource(destResource, sourceResouce); - dest11->markDirty(); + immediateContext->CopyResource(destResource, sourceResouce); + dest11->invalidateSwizzleCache(); + } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureStorage11_2D::useLevelZeroWorkaroundTexture(bool useLevelZeroTexture) @@ -858,7 +896,11 @@ gl::Error TextureStorage11_2D::useLevelZeroWorkaroundTexture(bool useLevelZeroTe { if (!mUseLevelZeroTexture && mTexture) { - ANGLE_TRY(ensureTextureExists(1)); + gl::Error error = ensureTextureExists(1); + if (error.isError()) + { + return error; + } // Pull data back from the mipped texture if necessary. ASSERT(mLevelZeroTexture); @@ -872,7 +914,11 @@ gl::Error TextureStorage11_2D::useLevelZeroWorkaroundTexture(bool useLevelZeroTe { if (mUseLevelZeroTexture && mLevelZeroTexture) { - ANGLE_TRY(ensureTextureExists(mMipLevels)); + gl::Error error = ensureTextureExists(mMipLevels); + if (error.isError()) + { + return error; + } // Pull data back from the level zero texture if necessary. ASSERT(mTexture); @@ -899,7 +945,7 @@ gl::Error TextureStorage11_2D::useLevelZeroWorkaroundTexture(bool useLevelZeroTe } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } void TextureStorage11_2D::associateImage(Image11 *image, const gl::ImageIndex &index) @@ -972,28 +1018,42 @@ gl::Error TextureStorage11_2D::releaseAssociatedImage(const gl::ImageIndex &inde { // Force the image to recover from storage before its data is overwritten. // This will reset mAssociatedImages[level] to nullptr too. - ANGLE_TRY(mAssociatedImages[level]->recoverFromAssociatedStorage()); + gl::Error error = mAssociatedImages[level]->recoverFromAssociatedStorage(); + if (error.isError()) + { + return error; + } } } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureStorage11_2D::getResource(ID3D11Resource **outResource) { if (mUseLevelZeroTexture && mMipLevels > 1) { - ANGLE_TRY(ensureTextureExists(1)); + gl::Error error = ensureTextureExists(1); + if (error.isError()) + { + return error; + } *outResource = mLevelZeroTexture; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } + else + { + gl::Error error = ensureTextureExists(mMipLevels); + if (error.isError()) + { + return error; + } - ANGLE_TRY(ensureTextureExists(mMipLevels)); - - *outResource = mTexture; - return gl::NoError(); + *outResource = mTexture; + return gl::Error(GL_NO_ERROR); + } } gl::Error TextureStorage11_2D::getMippedResource(ID3D11Resource **outResource) @@ -1001,10 +1061,14 @@ gl::Error TextureStorage11_2D::getMippedResource(ID3D11Resource **outResource) // This shouldn't be called unless the zero max LOD workaround is active. ASSERT(mRenderer->getWorkarounds().zeroMaxLodWorkaround); - ANGLE_TRY(ensureTextureExists(mMipLevels)); + gl::Error error = ensureTextureExists(mMipLevels); + if (error.isError()) + { + return error; + } *outResource = mTexture; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureStorage11_2D::ensureTextureExists(int mipLevels) @@ -1078,17 +1142,29 @@ gl::Error TextureStorage11_2D::getRenderTarget(const gl::ImageIndex &index, Rend if (mRenderTarget[level]) { *outRT = mRenderTarget[level]; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } ID3D11Resource *texture = nullptr; - ANGLE_TRY(getResource(&texture)); + gl::Error error = getResource(&texture); + if (error.isError()) + { + return error; + } ID3D11ShaderResourceView *srv = nullptr; - ANGLE_TRY(getSRVLevel(level, false, &srv)); + error = getSRVLevel(level, false, &srv); + if (error.isError()) + { + return error; + } ID3D11ShaderResourceView *blitSRV = nullptr; - ANGLE_TRY(getSRVLevel(level, true, &blitSRV)); + error = getSRVLevel(level, true, &blitSRV); + if (error.isError()) + { + return error; + } ID3D11Device *device = mRenderer->getDevice(); @@ -1122,7 +1198,7 @@ gl::Error TextureStorage11_2D::getRenderTarget(const gl::ImageIndex &index, Rend } *outRT = mLevelZeroRenderTarget; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } if (mFormatInfo.rtvFormat != DXGI_FORMAT_UNKNOWN) @@ -1183,7 +1259,7 @@ gl::Error TextureStorage11_2D::getRenderTarget(const gl::ImageIndex &index, Rend SafeRelease(dsv); *outRT = mRenderTarget[level]; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureStorage11_2D::createSRV(int baseLevel, @@ -1251,7 +1327,7 @@ gl::Error TextureStorage11_2D::getSwizzleTexture(ID3D11Resource **outTexture) desc.Height = mTextureHeight; desc.MipLevels = mMipLevels; desc.ArraySize = 1; - desc.Format = mFormatInfo.getSwizzleFormat(mRenderer->getRenderer11DeviceCaps()).texFormat; + desc.Format = mFormatInfo.swizzle.texFormat; desc.SampleDesc.Count = 1; desc.SampleDesc.Quality = 0; desc.Usage = D3D11_USAGE_DEFAULT; @@ -1283,13 +1359,16 @@ gl::Error TextureStorage11_2D::getSwizzleRenderTarget(int mipLevel, ID3D11Render if (!mSwizzleRenderTargets[mipLevel]) { ID3D11Resource *swizzleTexture = nullptr; - ANGLE_TRY(getSwizzleTexture(&swizzleTexture)); + gl::Error error = getSwizzleTexture(&swizzleTexture); + if (error.isError()) + { + return error; + } ID3D11Device *device = mRenderer->getDevice(); D3D11_RENDER_TARGET_VIEW_DESC rtvDesc; - rtvDesc.Format = - mFormatInfo.getSwizzleFormat(mRenderer->getRenderer11DeviceCaps()).rtvFormat; + rtvDesc.Format = mFormatInfo.swizzle.rtvFormat; rtvDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D; rtvDesc.Texture2D.MipSlice = mTopLevel + mipLevel; @@ -1306,41 +1385,7 @@ gl::Error TextureStorage11_2D::getSwizzleRenderTarget(int mipLevel, ID3D11Render } *outRTV = mSwizzleRenderTargets[mipLevel]; - return gl::NoError(); -} - -gl::Error TextureStorage11_2D::createDropStencilTexture() -{ - if (mDropStencilTexture) - { - return gl::NoError(); - } - - D3D11_TEXTURE2D_DESC dropDesc = {}; - dropDesc.ArraySize = 1; - dropDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_DEPTH_STENCIL; - dropDesc.CPUAccessFlags = 0; - dropDesc.Format = DXGI_FORMAT_R32_TYPELESS; - dropDesc.Height = mTextureHeight; - dropDesc.MipLevels = mMipLevels; - dropDesc.MiscFlags = 0; - dropDesc.SampleDesc.Count = 1; - dropDesc.SampleDesc.Quality = 0; - dropDesc.Usage = D3D11_USAGE_DEFAULT; - dropDesc.Width = mTextureWidth; - - ID3D11Device *device = mRenderer->getDevice(); - - HRESULT hr = device->CreateTexture2D(&dropDesc, nullptr, &mDropStencilTexture); - if (FAILED(hr)) - { - return gl::Error(GL_INVALID_OPERATION, "Error creating drop stencil texture."); - } - d3d11::SetDebugName(mDropStencilTexture, "TexStorage2D.DropStencil"); - - ANGLE_TRY(initDropStencilTexture(gl::ImageIndexIterator::Make2D(0, mMipLevels))); - - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } TextureStorage11_External::TextureStorage11_External( @@ -1352,15 +1397,15 @@ TextureStorage11_External::TextureStorage11_External( ASSERT(stream->getProducerType() == egl::Stream::ProducerType::D3D11TextureNV12); StreamProducerNV12 *producer = static_cast(stream->getImplementation()); mTexture = producer->getD3DTexture(); - mSubresourceIndex = producer->getArraySlice(); + mSubresourceIndex = producer->getArraySlice(); mTexture->AddRef(); mMipLevels = 1; D3D11_TEXTURE2D_DESC desc; mTexture->GetDesc(&desc); - mTextureWidth = desc.Width; - mTextureHeight = desc.Height; - mTextureDepth = 1; + mTextureWidth = desc.Width; + mTextureHeight = desc.Height; + mTextureDepth = 1; mHasKeyedMutex = (desc.MiscFlags & D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX) != 0; } @@ -1504,10 +1549,10 @@ TextureStorage11_EGLImage::TextureStorage11_EGLImage(Renderer11 *renderer, { mCurrentRenderTarget = reinterpret_cast(renderTarget11); - mMipLevels = 1; - mTextureWidth = renderTarget11->getWidth(); - mTextureHeight = renderTarget11->getHeight(); - mTextureDepth = 1; + mMipLevels = 1; + mTextureWidth = renderTarget11->getWidth(); + mTextureHeight = renderTarget11->getHeight(); + mTextureDepth = 1; } TextureStorage11_EGLImage::~TextureStorage11_EGLImage() @@ -1549,8 +1594,13 @@ gl::Error TextureStorage11_EGLImage::getRenderTarget(const gl::ImageIndex &index { ASSERT(!index.hasLayer()); ASSERT(index.mipIndex == 0); + UNUSED_ASSERTION_VARIABLE(index); - ANGLE_TRY(checkForUpdatedRenderTarget()); + gl::Error error = checkForUpdatedRenderTarget(); + if (error.isError()) + { + return error; + } return mImage->getRenderTarget(outRT); } @@ -1558,19 +1608,27 @@ gl::Error TextureStorage11_EGLImage::getRenderTarget(const gl::ImageIndex &index gl::Error TextureStorage11_EGLImage::copyToStorage(TextureStorage *destStorage) { ID3D11Resource *sourceResouce = nullptr; - ANGLE_TRY(getResource(&sourceResouce)); + gl::Error error = getResource(&sourceResouce); + if (error.isError()) + { + return error; + } ASSERT(destStorage); TextureStorage11_2D *dest11 = GetAs(destStorage); ID3D11Resource *destResource = nullptr; - ANGLE_TRY(dest11->getResource(&destResource)); + error = dest11->getResource(&destResource); + if (error.isError()) + { + return error; + } ID3D11DeviceContext *immediateContext = mRenderer->getDeviceContext(); immediateContext->CopyResource(destResource, sourceResouce); - dest11->markDirty(); + dest11->invalidateSwizzleCache(); - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } void TextureStorage11_EGLImage::associateImage(Image11 *, const gl::ImageIndex &) @@ -1610,7 +1668,7 @@ gl::Error TextureStorage11_EGLImage::getSwizzleTexture(ID3D11Resource **outTextu desc.Height = mTextureHeight; desc.MipLevels = mMipLevels; desc.ArraySize = 1; - desc.Format = mFormatInfo.getSwizzleFormat(mRenderer->getRenderer11DeviceCaps()).texFormat; + desc.Format = mFormatInfo.swizzle.texFormat; desc.SampleDesc.Count = 1; desc.SampleDesc.Quality = 0; desc.Usage = D3D11_USAGE_DEFAULT; @@ -1643,13 +1701,16 @@ gl::Error TextureStorage11_EGLImage::getSwizzleRenderTarget(int mipLevel, if (!mSwizzleRenderTargets[mipLevel]) { ID3D11Resource *swizzleTexture = nullptr; - ANGLE_TRY(getSwizzleTexture(&swizzleTexture)); + gl::Error error = getSwizzleTexture(&swizzleTexture); + if (error.isError()) + { + return error; + } ID3D11Device *device = mRenderer->getDevice(); D3D11_RENDER_TARGET_VIEW_DESC rtvDesc; - rtvDesc.Format = - mFormatInfo.getSwizzleFormat(mRenderer->getRenderer11DeviceCaps()).rtvFormat; + rtvDesc.Format = mFormatInfo.swizzle.rtvFormat; rtvDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D; rtvDesc.Texture2D.MipSlice = mTopLevel + mipLevel; @@ -1666,7 +1727,7 @@ gl::Error TextureStorage11_EGLImage::getSwizzleRenderTarget(int mipLevel, } *outRTV = mSwizzleRenderTargets[mipLevel]; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureStorage11_EGLImage::checkForUpdatedRenderTarget() @@ -1719,7 +1780,11 @@ gl::Error TextureStorage11_EGLImage::createSRV(int baseLevel, else { RenderTarget11 *renderTarget = nullptr; - ANGLE_TRY(getImageRenderTarget(&renderTarget)); + gl::Error error = getImageRenderTarget(&renderTarget); + if (error.isError()) + { + return error; + } ASSERT(texture == renderTarget->getTexture()); @@ -1860,20 +1925,36 @@ gl::Error TextureStorage11_Cube::copyToStorage(TextureStorage *destStorage) // corresponding textures in destStorage. if (mTexture) { - ANGLE_TRY(dest11->useLevelZeroWorkaroundTexture(false)); + gl::Error error = dest11->useLevelZeroWorkaroundTexture(false); + if (error.isError()) + { + return error; + } ID3D11Resource *destResource = nullptr; - ANGLE_TRY(dest11->getResource(&destResource)); + error = dest11->getResource(&destResource); + if (error.isError()) + { + return error; + } immediateContext->CopyResource(destResource, mTexture); } if (mLevelZeroTexture) { - ANGLE_TRY(dest11->useLevelZeroWorkaroundTexture(true)); + gl::Error error = dest11->useLevelZeroWorkaroundTexture(true); + if (error.isError()) + { + return error; + } ID3D11Resource *destResource = nullptr; - ANGLE_TRY(dest11->getResource(&destResource)); + error = dest11->getResource(&destResource); + if (error.isError()) + { + return error; + } immediateContext->CopyResource(destResource, mLevelZeroTexture); } @@ -1881,18 +1962,26 @@ gl::Error TextureStorage11_Cube::copyToStorage(TextureStorage *destStorage) else { ID3D11Resource *sourceResouce = nullptr; - ANGLE_TRY(getResource(&sourceResouce)); + gl::Error error = getResource(&sourceResouce); + if (error.isError()) + { + return error; + } ID3D11Resource *destResource = nullptr; - ANGLE_TRY(dest11->getResource(&destResource)); + error = dest11->getResource(&destResource); + if (error.isError()) + { + return error; + } ID3D11DeviceContext *immediateContext = mRenderer->getDeviceContext(); immediateContext->CopyResource(destResource, sourceResouce); } - dest11->markDirty(); + dest11->invalidateSwizzleCache(); - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureStorage11_Cube::useLevelZeroWorkaroundTexture(bool useLevelZeroTexture) @@ -1901,7 +1990,11 @@ gl::Error TextureStorage11_Cube::useLevelZeroWorkaroundTexture(bool useLevelZero { if (!mUseLevelZeroTexture && mTexture) { - ANGLE_TRY(ensureTextureExists(1)); + gl::Error error = ensureTextureExists(1); + if (error.isError()) + { + return error; + } // Pull data back from the mipped texture if necessary. ASSERT(mLevelZeroTexture); @@ -1920,7 +2013,11 @@ gl::Error TextureStorage11_Cube::useLevelZeroWorkaroundTexture(bool useLevelZero { if (mUseLevelZeroTexture && mLevelZeroTexture) { - ANGLE_TRY(ensureTextureExists(mMipLevels)); + gl::Error error = ensureTextureExists(mMipLevels); + if (error.isError()) + { + return error; + } // Pull data back from the level zero texture if necessary. ASSERT(mTexture); @@ -1936,7 +2033,7 @@ gl::Error TextureStorage11_Cube::useLevelZeroWorkaroundTexture(bool useLevelZero mUseLevelZeroTexture = false; } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } void TextureStorage11_Cube::associateImage(Image11 *image, const gl::ImageIndex &index) @@ -2029,29 +2126,43 @@ gl::Error TextureStorage11_Cube::releaseAssociatedImage(const gl::ImageIndex &in { // Force the image to recover from storage before its data is overwritten. // This will reset mAssociatedImages[level] to nullptr too. - ANGLE_TRY( - mAssociatedImages[layerTarget][level]->recoverFromAssociatedStorage()); + gl::Error error = + mAssociatedImages[layerTarget][level]->recoverFromAssociatedStorage(); + if (error.isError()) + { + return error; + } } } } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureStorage11_Cube::getResource(ID3D11Resource **outResource) { if (mUseLevelZeroTexture && mMipLevels > 1) { - ANGLE_TRY(ensureTextureExists(1)); + gl::Error error = ensureTextureExists(1); + if (error.isError()) + { + return error; + } + *outResource = mLevelZeroTexture; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } else { - ANGLE_TRY(ensureTextureExists(mMipLevels)); + gl::Error error = ensureTextureExists(mMipLevels); + if (error.isError()) + { + return error; + } + *outResource = mTexture; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } } @@ -2060,9 +2171,14 @@ gl::Error TextureStorage11_Cube::getMippedResource(ID3D11Resource **outResource) // This shouldn't be called unless the zero max LOD workaround is active. ASSERT(mRenderer->getWorkarounds().zeroMaxLodWorkaround); - ANGLE_TRY(ensureTextureExists(mMipLevels)); + gl::Error error = ensureTextureExists(mMipLevels); + if (error.isError()) + { + return error; + } + *outResource = mTexture; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureStorage11_Cube::ensureTextureExists(int mipLevels) @@ -2113,7 +2229,7 @@ gl::Error TextureStorage11_Cube::ensureTextureExists(int mipLevels) d3d11::SetDebugName(*outputTexture, "TexStorageCube.Texture"); } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureStorage11_Cube::createRenderTargetSRV(ID3D11Resource *texture, @@ -2167,7 +2283,11 @@ gl::Error TextureStorage11_Cube::getRenderTarget(const gl::ImageIndex &index, HRESULT result; ID3D11Resource *texture = nullptr; - ANGLE_TRY(getResource(&texture)); + gl::Error error = getResource(&texture); + if (error.isError()) + { + return error; + } if (mUseLevelZeroTexture) { @@ -2206,12 +2326,15 @@ gl::Error TextureStorage11_Cube::getRenderTarget(const gl::ImageIndex &index, } ID3D11ShaderResourceView *srv = nullptr; - ANGLE_TRY(createRenderTargetSRV(texture, index, mFormatInfo.srvFormat, &srv)); + error = createRenderTargetSRV(texture, index, mFormatInfo.srvFormat, &srv); + if (error.isError()) + { + return error; + } ID3D11ShaderResourceView *blitSRV = nullptr; if (mFormatInfo.blitSRVFormat != mFormatInfo.srvFormat) { - gl::Error error = - createRenderTargetSRV(texture, index, mFormatInfo.blitSRVFormat, &blitSRV); + error = createRenderTargetSRV(texture, index, mFormatInfo.blitSRVFormat, &blitSRV); if (error.isError()) { SafeRelease(srv); @@ -2319,8 +2442,8 @@ gl::Error TextureStorage11_Cube::createSRV(int baseLevel, // Unnormalized integer cube maps are not supported by DX11; we emulate them as an array of six // 2D textures - const GLenum componentType = d3d11::GetComponentType(format); - if (componentType == GL_INT || componentType == GL_UNSIGNED_INT) + const d3d11::DXGIFormat &dxgiFormatInfo = d3d11::GetDXGIFormatInfo(format); + if (dxgiFormatInfo.componentType == GL_INT || dxgiFormatInfo.componentType == GL_UNSIGNED_INT) { srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2DARRAY; srvDesc.Texture2DArray.MostDetailedMip = mTopLevel + baseLevel; @@ -2386,7 +2509,7 @@ gl::Error TextureStorage11_Cube::getSwizzleTexture(ID3D11Resource **outTexture) desc.Height = mTextureHeight; desc.MipLevels = mMipLevels; desc.ArraySize = CUBE_FACE_COUNT; - desc.Format = mFormatInfo.getSwizzleFormat(mRenderer->getRenderer11DeviceCaps()).texFormat; + desc.Format = mFormatInfo.swizzle.texFormat; desc.SampleDesc.Count = 1; desc.SampleDesc.Quality = 0; desc.Usage = D3D11_USAGE_DEFAULT; @@ -2419,13 +2542,16 @@ gl::Error TextureStorage11_Cube::getSwizzleRenderTarget(int mipLevel, if (!mSwizzleRenderTargets[mipLevel]) { ID3D11Resource *swizzleTexture = nullptr; - ANGLE_TRY(getSwizzleTexture(&swizzleTexture)); + gl::Error error = getSwizzleTexture(&swizzleTexture); + if (error.isError()) + { + return error; + } ID3D11Device *device = mRenderer->getDevice(); D3D11_RENDER_TARGET_VIEW_DESC rtvDesc; - rtvDesc.Format = - mFormatInfo.getSwizzleFormat(mRenderer->getRenderer11DeviceCaps()).rtvFormat; + rtvDesc.Format = mFormatInfo.swizzle.rtvFormat; rtvDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY; rtvDesc.Texture2DArray.MipSlice = mTopLevel + mipLevel; rtvDesc.Texture2DArray.FirstArraySlice = 0; @@ -2444,67 +2570,7 @@ gl::Error TextureStorage11_Cube::getSwizzleRenderTarget(int mipLevel, } *outRTV = mSwizzleRenderTargets[mipLevel]; - return gl::NoError(); -} - -gl::Error TextureStorage11::initDropStencilTexture(const gl::ImageIndexIterator &it) -{ - ID3D11Resource *resource = nullptr; - ANGLE_TRY(getResource(&resource)); - TextureHelper11 sourceTexture = TextureHelper11::MakeAndReference(resource, mFormatInfo); - TextureHelper11 destTexture = TextureHelper11::MakeAndReference( - mDropStencilTexture, - d3d11::Format::Get(GL_DEPTH_COMPONENT32F, mRenderer->getRenderer11DeviceCaps())); - - gl::ImageIndexIterator itCopy = it; - - while (itCopy.hasNext()) - { - gl::ImageIndex index = itCopy.next(); - gl::Box wholeArea(0, 0, 0, getLevelWidth(index.mipIndex), getLevelHeight(index.mipIndex), - 1); - gl::Extents wholeSize(wholeArea.width, wholeArea.height, 1); - UINT subresource = getSubresourceIndex(index); - ANGLE_TRY(mRenderer->getBlitter()->copyDepthStencil(sourceTexture, subresource, wholeArea, - wholeSize, destTexture, subresource, - wholeArea, wholeSize, nullptr)); - } - - return gl::NoError(); -} - -gl::Error TextureStorage11_Cube::createDropStencilTexture() -{ - if (mDropStencilTexture) - { - return gl::NoError(); - } - - D3D11_TEXTURE2D_DESC dropDesc = {}; - dropDesc.ArraySize = 6; - dropDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_DEPTH_STENCIL; - dropDesc.CPUAccessFlags = 0; - dropDesc.Format = DXGI_FORMAT_R32_TYPELESS; - dropDesc.Height = mTextureHeight; - dropDesc.MipLevels = mMipLevels; - dropDesc.MiscFlags = D3D11_RESOURCE_MISC_TEXTURECUBE; - dropDesc.SampleDesc.Count = 1; - dropDesc.SampleDesc.Quality = 0; - dropDesc.Usage = D3D11_USAGE_DEFAULT; - dropDesc.Width = mTextureWidth; - - ID3D11Device *device = mRenderer->getDevice(); - - HRESULT hr = device->CreateTexture2D(&dropDesc, nullptr, &mDropStencilTexture); - if (FAILED(hr)) - { - return gl::Error(GL_INVALID_OPERATION, "Error creating drop stencil texture."); - } - d3d11::SetDebugName(mDropStencilTexture, "TexStorageCube.DropStencil"); - - ANGLE_TRY(initDropStencilTexture(gl::ImageIndexIterator::MakeCube(0, mMipLevels))); - - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } TextureStorage11_3D::TextureStorage11_3D(Renderer11 *renderer, @@ -2647,12 +2713,16 @@ gl::Error TextureStorage11_3D::releaseAssociatedImage(const gl::ImageIndex &inde { // Force the image to recover from storage before its data is overwritten. // This will reset mAssociatedImages[level] to nullptr too. - ANGLE_TRY(mAssociatedImages[level]->recoverFromAssociatedStorage()); + gl::Error error = mAssociatedImages[level]->recoverFromAssociatedStorage(); + if (error.isError()) + { + return error; + } } } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureStorage11_3D::getResource(ID3D11Resource **outResource) @@ -2740,13 +2810,25 @@ gl::Error TextureStorage11_3D::getRenderTarget(const gl::ImageIndex &index, Rend if (!mLevelRenderTargets[mipLevel]) { ID3D11Resource *texture = nullptr; - ANGLE_TRY(getResource(&texture)); + gl::Error error = getResource(&texture); + if (error.isError()) + { + return error; + } ID3D11ShaderResourceView *srv = nullptr; - ANGLE_TRY(getSRVLevel(mipLevel, false, &srv)); + error = getSRVLevel(mipLevel, false, &srv); + if (error.isError()) + { + return error; + } ID3D11ShaderResourceView *blitSRV = nullptr; - ANGLE_TRY(getSRVLevel(mipLevel, true, &blitSRV)); + error = getSRVLevel(mipLevel, true, &blitSRV); + if (error.isError()) + { + return error; + } ID3D11Device *device = mRenderer->getDevice(); @@ -2796,10 +2878,14 @@ gl::Error TextureStorage11_3D::getRenderTarget(const gl::ImageIndex &index, Rend HRESULT result; ID3D11Resource *texture = nullptr; - ANGLE_TRY(getResource(&texture)); + gl::Error error = getResource(&texture); + if (error.isError()) + { + return error; + } // TODO, what kind of SRV is expected here? - ID3D11ShaderResourceView *srv = nullptr; + ID3D11ShaderResourceView *srv = nullptr; ID3D11ShaderResourceView *blitSRV = nullptr; D3D11_RENDER_TARGET_VIEW_DESC rtvDesc; @@ -2836,7 +2922,7 @@ gl::Error TextureStorage11_3D::getRenderTarget(const gl::ImageIndex &index, Rend ASSERT(outRT); *outRT = mLevelLayerRenderTargets[key]; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } } @@ -2853,7 +2939,7 @@ gl::Error TextureStorage11_3D::getSwizzleTexture(ID3D11Resource **outTexture) desc.Height = mTextureHeight; desc.Depth = mTextureDepth; desc.MipLevels = mMipLevels; - desc.Format = mFormatInfo.getSwizzleFormat(mRenderer->getRenderer11DeviceCaps()).texFormat; + desc.Format = mFormatInfo.swizzle.texFormat; desc.Usage = D3D11_USAGE_DEFAULT; desc.BindFlags = D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET; desc.CPUAccessFlags = 0; @@ -2883,13 +2969,16 @@ gl::Error TextureStorage11_3D::getSwizzleRenderTarget(int mipLevel, ID3D11Render if (!mSwizzleRenderTargets[mipLevel]) { ID3D11Resource *swizzleTexture = nullptr; - ANGLE_TRY(getSwizzleTexture(&swizzleTexture)); + gl::Error error = getSwizzleTexture(&swizzleTexture); + if (error.isError()) + { + return error; + } ID3D11Device *device = mRenderer->getDevice(); D3D11_RENDER_TARGET_VIEW_DESC rtvDesc; - rtvDesc.Format = - mFormatInfo.getSwizzleFormat(mRenderer->getRenderer11DeviceCaps()).rtvFormat; + rtvDesc.Format = mFormatInfo.swizzle.rtvFormat; rtvDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE3D; rtvDesc.Texture3D.MipSlice = mTopLevel + mipLevel; rtvDesc.Texture3D.FirstWSlice = 0; @@ -3052,12 +3141,16 @@ gl::Error TextureStorage11_2DArray::releaseAssociatedImage(const gl::ImageIndex { // Force the image to recover from storage before its data is overwritten. // This will reset mAssociatedImages[level] to nullptr too. - ANGLE_TRY(mAssociatedImages[key]->recoverFromAssociatedStorage()); + gl::Error error = mAssociatedImages[key]->recoverFromAssociatedStorage(); + if (error.isError()) + { + return error; + } } } } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureStorage11_2DArray::getResource(ID3D11Resource **outResource) @@ -3180,14 +3273,21 @@ gl::Error TextureStorage11_2DArray::getRenderTarget(const gl::ImageIndex &index, HRESULT result; ID3D11Resource *texture = nullptr; - ANGLE_TRY(getResource(&texture)); + gl::Error error = getResource(&texture); + if (error.isError()) + { + return error; + } ID3D11ShaderResourceView *srv; - ANGLE_TRY(createRenderTargetSRV(texture, index, mFormatInfo.srvFormat, &srv)); + error = createRenderTargetSRV(texture, index, mFormatInfo.srvFormat, &srv); + if (error.isError()) + { + return error; + } ID3D11ShaderResourceView *blitSRV; if (mFormatInfo.blitSRVFormat != mFormatInfo.srvFormat) { - gl::Error error = - createRenderTargetSRV(texture, index, mFormatInfo.blitSRVFormat, &blitSRV); + error = createRenderTargetSRV(texture, index, mFormatInfo.blitSRVFormat, &blitSRV); if (error.isError()) { SafeRelease(srv); @@ -3275,7 +3375,7 @@ gl::Error TextureStorage11_2DArray::getRenderTarget(const gl::ImageIndex &index, ASSERT(outRT); *outRT = mRenderTargets[key]; - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error TextureStorage11_2DArray::getSwizzleTexture(ID3D11Resource **outTexture) @@ -3289,7 +3389,7 @@ gl::Error TextureStorage11_2DArray::getSwizzleTexture(ID3D11Resource **outTextur desc.Height = mTextureHeight; desc.MipLevels = mMipLevels; desc.ArraySize = mTextureDepth; - desc.Format = mFormatInfo.getSwizzleFormat(mRenderer->getRenderer11DeviceCaps()).texFormat; + desc.Format = mFormatInfo.swizzle.texFormat; desc.SampleDesc.Count = 1; desc.SampleDesc.Quality = 0; desc.Usage = D3D11_USAGE_DEFAULT; @@ -3322,13 +3422,16 @@ gl::Error TextureStorage11_2DArray::getSwizzleRenderTarget(int mipLevel, if (!mSwizzleRenderTargets[mipLevel]) { ID3D11Resource *swizzleTexture = nullptr; - ANGLE_TRY(getSwizzleTexture(&swizzleTexture)); + gl::Error error = getSwizzleTexture(&swizzleTexture); + if (error.isError()) + { + return error; + } ID3D11Device *device = mRenderer->getDevice(); D3D11_RENDER_TARGET_VIEW_DESC rtvDesc; - rtvDesc.Format = - mFormatInfo.getSwizzleFormat(mRenderer->getRenderer11DeviceCaps()).rtvFormat; + rtvDesc.Format = mFormatInfo.swizzle.rtvFormat; rtvDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY; rtvDesc.Texture2DArray.MipSlice = mTopLevel + mipLevel; rtvDesc.Texture2DArray.FirstArraySlice = 0; @@ -3347,44 +3450,6 @@ gl::Error TextureStorage11_2DArray::getSwizzleRenderTarget(int mipLevel, } *outRTV = mSwizzleRenderTargets[mipLevel]; - return gl::NoError(); -} - -gl::Error TextureStorage11_2DArray::createDropStencilTexture() -{ - if (mDropStencilTexture) - { - return gl::NoError(); - } - - D3D11_TEXTURE2D_DESC dropDesc = {}; - dropDesc.ArraySize = mTextureDepth; - dropDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_DEPTH_STENCIL; - dropDesc.CPUAccessFlags = 0; - dropDesc.Format = DXGI_FORMAT_R32_TYPELESS; - dropDesc.Height = mTextureHeight; - dropDesc.MipLevels = mMipLevels; - dropDesc.MiscFlags = 0; - dropDesc.SampleDesc.Count = 1; - dropDesc.SampleDesc.Quality = 0; - dropDesc.Usage = D3D11_USAGE_DEFAULT; - dropDesc.Width = mTextureWidth; - - ID3D11Device *device = mRenderer->getDevice(); - - HRESULT hr = device->CreateTexture2D(&dropDesc, nullptr, &mDropStencilTexture); - if (FAILED(hr)) - { - return gl::Error(GL_INVALID_OPERATION, "Error creating drop stencil texture."); - } - d3d11::SetDebugName(mDropStencilTexture, "TexStorage2DArray.DropStencil"); - - std::vector layerCounts(mMipLevels, mTextureDepth); - - ANGLE_TRY(initDropStencilTexture( - gl::ImageIndexIterator::Make2DArray(0, mMipLevels, layerCounts.data()))); - - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } - } // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.h b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.h index 46eb8458b..8d968adb0 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.h @@ -59,8 +59,8 @@ class TextureStorage11 : public TextureStorage virtual UINT getSubresourceIndex(const gl::ImageIndex &index) const; gl::Error generateSwizzles(const gl::SwizzleState &swizzleTarget); - void markLevelDirty(int mipLevel); - void markDirty(); + void invalidateSwizzleCacheLevel(int mipLevel); + void invalidateSwizzleCache(); gl::Error updateSubresourceLevel(ID3D11Resource *texture, unsigned int sourceSubresource, const gl::ImageIndex &index, const gl::Box ©Area); @@ -94,10 +94,6 @@ class TextureStorage11 : public TextureStorage virtual gl::Error getSwizzleRenderTarget(int mipLevel, ID3D11RenderTargetView **outRTV) = 0; gl::Error getSRVLevel(int mipLevel, bool blitSRV, ID3D11ShaderResourceView **outSRV); - // Get a version of a depth texture with only depth information, not stencil. - virtual gl::Error createDropStencilTexture(); - gl::Error initDropStencilTexture(const gl::ImageIndexIterator &it); - // The baseLevel parameter should *not* have mTopLevel applied. virtual gl::Error createSRV(int baseLevel, int mipLevels, DXGI_FORMAT format, ID3D11Resource *texture, ID3D11ShaderResourceView **outSRV) const = 0; @@ -117,7 +113,6 @@ class TextureStorage11 : public TextureStorage unsigned int mTextureDepth; gl::SwizzleState mSwizzleCache[gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS]; - ID3D11Texture2D *mDropStencilTexture; private: const UINT mBindFlags; @@ -125,14 +120,13 @@ class TextureStorage11 : public TextureStorage struct SRVKey { - SRVKey(int baseLevel, int mipLevels, bool swizzle, bool dropStencil); + SRVKey(int baseLevel = 0, int mipLevels = 0, bool swizzle = false); bool operator<(const SRVKey &rhs) const; - int baseLevel = 0; // Without mTopLevel applied. - int mipLevels = 0; - bool swizzle = false; - bool dropStencil = false; + int baseLevel; // Without mTopLevel applied. + int mipLevels; + bool swizzle; }; typedef std::map SRVCache; @@ -148,35 +142,30 @@ class TextureStorage11_2D : public TextureStorage11 public: TextureStorage11_2D(Renderer11 *renderer, SwapChain11 *swapchain); TextureStorage11_2D(Renderer11 *renderer, GLenum internalformat, bool renderTarget, GLsizei width, GLsizei height, int levels, bool hintLevelZeroOnly = false); - ~TextureStorage11_2D() override; + virtual ~TextureStorage11_2D(); - gl::Error getResource(ID3D11Resource **outResource) override; - gl::Error getMippedResource(ID3D11Resource **outResource) override; - gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT) override; + virtual gl::Error getResource(ID3D11Resource **outResource); + virtual gl::Error getMippedResource(ID3D11Resource **outResource); + virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT); - gl::Error copyToStorage(TextureStorage *destStorage) override; + virtual gl::Error copyToStorage(TextureStorage *destStorage); - void associateImage(Image11 *image, const gl::ImageIndex &index) override; - void disassociateImage(const gl::ImageIndex &index, Image11 *expectedImage) override; - bool isAssociatedImageValid(const gl::ImageIndex &index, Image11 *expectedImage) override; - gl::Error releaseAssociatedImage(const gl::ImageIndex &index, Image11 *incomingImage) override; + virtual void associateImage(Image11* image, const gl::ImageIndex &index); + virtual void disassociateImage(const gl::ImageIndex &index, Image11* expectedImage); + virtual bool isAssociatedImageValid(const gl::ImageIndex &index, Image11* expectedImage); + virtual gl::Error releaseAssociatedImage(const gl::ImageIndex &index, Image11* incomingImage); - gl::Error useLevelZeroWorkaroundTexture(bool useLevelZeroTexture) override; + virtual gl::Error useLevelZeroWorkaroundTexture(bool useLevelZeroTexture); protected: - gl::Error getSwizzleTexture(ID3D11Resource **outTexture) override; - gl::Error getSwizzleRenderTarget(int mipLevel, ID3D11RenderTargetView **outRTV) override; - - gl::Error createDropStencilTexture() override; + virtual gl::Error getSwizzleTexture(ID3D11Resource **outTexture); + virtual gl::Error getSwizzleRenderTarget(int mipLevel, ID3D11RenderTargetView **outRTV); gl::Error ensureTextureExists(int mipLevels); private: - gl::Error createSRV(int baseLevel, - int mipLevels, - DXGI_FORMAT format, - ID3D11Resource *texture, - ID3D11ShaderResourceView **outSRV) const override; + virtual gl::Error createSRV(int baseLevel, int mipLevels, DXGI_FORMAT format, ID3D11Resource *texture, + ID3D11ShaderResourceView **outSRV) const; ID3D11Texture2D *mTexture; RenderTarget11 *mRenderTarget[gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS]; @@ -312,8 +301,6 @@ class TextureStorage11_Cube : public TextureStorage11 virtual gl::Error getSwizzleTexture(ID3D11Resource **outTexture); virtual gl::Error getSwizzleRenderTarget(int mipLevel, ID3D11RenderTargetView **outRTV); - gl::Error createDropStencilTexture() override; - gl::Error ensureTextureExists(int mipLevels); private: @@ -397,8 +384,6 @@ class TextureStorage11_2DArray : public TextureStorage11 virtual gl::Error getSwizzleTexture(ID3D11Resource **outTexture); virtual gl::Error getSwizzleRenderTarget(int mipLevel, ID3D11RenderTargetView **outRTV); - gl::Error createDropStencilTexture() override; - private: virtual gl::Error createSRV(int baseLevel, int mipLevels, DXGI_FORMAT format, ID3D11Resource *texture, ID3D11ShaderResourceView **outSRV) const; diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/VertexArray11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/VertexArray11.cpp index e06a6b22b..8f0fe8496 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/VertexArray11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/VertexArray11.cpp @@ -182,8 +182,12 @@ gl::Error VertexArray11::updateDirtyAndDynamicAttribs(VertexDataManager *vertexD break; case VertexStorageType::STATIC: { - ANGLE_TRY( - VertexDataManager::StoreStaticAttrib(translatedAttrib, count, instances)); + auto error = + VertexDataManager::StoreStaticAttrib(translatedAttrib, count, instances); + if (error.isError()) + { + return error; + } break; } case VertexStorageType::CURRENT_VALUE: diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/VertexBuffer11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/VertexBuffer11.cpp index 6cd91bd35..8e2d119d2 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/VertexBuffer11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/VertexBuffer11.cpp @@ -21,9 +21,9 @@ namespace rx VertexBuffer11::VertexBuffer11(Renderer11 *const renderer) : mRenderer(renderer) { - mBuffer = NULL; - mBufferSize = 0; - mDynamicUsage = false; + mBuffer = NULL; + mBufferSize = 0; + mDynamicUsage = false; mMappedResourceData = NULL; } @@ -41,21 +41,20 @@ gl::Error VertexBuffer11::initialize(unsigned int size, bool dynamicUsage) if (size > 0) { - ID3D11Device *dxDevice = mRenderer->getDevice(); + ID3D11Device* dxDevice = mRenderer->getDevice(); D3D11_BUFFER_DESC bufferDesc; - bufferDesc.ByteWidth = size; - bufferDesc.Usage = D3D11_USAGE_DYNAMIC; - bufferDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER; - bufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; - bufferDesc.MiscFlags = 0; + bufferDesc.ByteWidth = size; + bufferDesc.Usage = D3D11_USAGE_DYNAMIC; + bufferDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER; + bufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; + bufferDesc.MiscFlags = 0; bufferDesc.StructureByteStride = 0; HRESULT result = dxDevice->CreateBuffer(&bufferDesc, NULL, &mBuffer); if (FAILED(result)) { - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to allocate internal vertex buffer of size, %lu.", size); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to allocate internal vertex buffer of size, %lu.", size); } if (dynamicUsage) @@ -68,7 +67,7 @@ gl::Error VertexBuffer11::initialize(unsigned int size, bool dynamicUsage) } } - mBufferSize = size; + mBufferSize = size; mDynamicUsage = dynamicUsage; return gl::Error(GL_NO_ERROR); @@ -82,15 +81,13 @@ gl::Error VertexBuffer11::mapResource() D3D11_MAPPED_SUBRESOURCE mappedResource; - HRESULT result = - dxContext->Map(mBuffer, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &mappedResource); + HRESULT result = dxContext->Map(mBuffer, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &mappedResource); if (FAILED(result)) { - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to map internal vertex buffer, HRESULT: 0x%08x.", result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to map internal vertex buffer, HRESULT: 0x%08x.", result); } - mMappedResourceData = reinterpret_cast(mappedResource.pData); + mMappedResourceData = reinterpret_cast(mappedResource.pData); } return gl::Error(GL_NO_ERROR); @@ -123,7 +120,11 @@ gl::Error VertexBuffer11::storeVertexAttributes(const gl::VertexAttribute &attri int inputStride = static_cast(ComputeVertexAttributeStride(attrib)); // This will map the resource if it isn't already mapped. - ANGLE_TRY(mapResource()); + gl::Error error = mapResource(); + if (error.isError()) + { + return error; + } uint8_t *output = mMappedResourceData + offset; @@ -135,13 +136,12 @@ gl::Error VertexBuffer11::storeVertexAttributes(const gl::VertexAttribute &attri } gl::VertexFormatType vertexFormatType = gl::GetVertexFormatType(attrib, currentValueType); - const D3D_FEATURE_LEVEL featureLevel = mRenderer->getRenderer11DeviceCaps().featureLevel; - const d3d11::VertexFormat &vertexFormatInfo = - d3d11::GetVertexFormatInfo(vertexFormatType, featureLevel); + const D3D_FEATURE_LEVEL featureLevel = mRenderer->getRenderer11DeviceCaps().featureLevel; + const d3d11::VertexFormat &vertexFormatInfo = d3d11::GetVertexFormatInfo(vertexFormatType, featureLevel); ASSERT(vertexFormatInfo.copyFunction != NULL); vertexFormatInfo.copyFunction(input, inputStride, count, output); - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } unsigned int VertexBuffer11::getBufferSize() const @@ -174,8 +174,7 @@ gl::Error VertexBuffer11::discard() HRESULT result = dxContext->Map(mBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); if (FAILED(result)) { - return gl::Error(GL_OUT_OF_MEMORY, - "Failed to map internal buffer for discarding, HRESULT: 0x%08x", result); + return gl::Error(GL_OUT_OF_MEMORY, "Failed to map internal buffer for discarding, HRESULT: 0x%08x", result); } dxContext->Unmap(mBuffer, 0); diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_format_data.json b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_format_data.json deleted file mode 100644 index 5b8d73568..000000000 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_format_data.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "UNKNOWN": "NONE", - "R32G32B32A32_TYPELESS": "", - "R32G32B32A32_FLOAT": "", - "R32G32B32A32_UINT": "", - "R32G32B32A32_SINT": "", - "R32G32B32_TYPELESS": "", - "R32G32B32_FLOAT": "", - "R32G32B32_UINT": "", - "R32G32B32_SINT": "", - "R16G16B16A16_TYPELESS": "", - "R16G16B16A16_FLOAT": "", - "R16G16B16A16_UNORM": "", - "R16G16B16A16_UINT": "", - "R16G16B16A16_SNORM": "", - "R16G16B16A16_SINT": "", - "R32G32_TYPELESS": "", - "R32G32_FLOAT": "", - "R32G32_UINT": "", - "R32G32_SINT": "", - "R32G8X24_TYPELESS": "", - "D32_FLOAT_S8X24_UINT": "", - "R32_FLOAT_X8X24_TYPELESS": "", - "X32_TYPELESS_G8X24_UINT": "", - "R10G10B10A2_TYPELESS": "", - "R10G10B10A2_UNORM": "", - "R10G10B10A2_UINT": "", - "R11G11B10_FLOAT": "", - "R8G8B8A8_TYPELESS": "", - "R8G8B8A8_UNORM": "", - "R8G8B8A8_UNORM_SRGB": "", - "R8G8B8A8_UINT": "", - "R8G8B8A8_SNORM": "", - "R8G8B8A8_SINT": "", - "R16G16_TYPELESS": "", - "R16G16_FLOAT": "", - "R16G16_UNORM": "", - "R16G16_UINT": "", - "R16G16_SNORM": "", - "R16G16_SINT": "", - "R32_TYPELESS": "", - "D32_FLOAT": "", - "R32_FLOAT": "", - "R32_UINT": "", - "R32_SINT": "", - "R24G8_TYPELESS": "", - "D24_UNORM_S8_UINT": "", - "R24_UNORM_X8_TYPELESS": "", - "X24_TYPELESS_G8_UINT": "", - "R8G8_TYPELESS": "", - "R8G8_UNORM": "", - "R8G8_UINT": "", - "R8G8_SNORM": "", - "R8G8_SINT": "", - "R16_TYPELESS": "", - "R16_FLOAT": "", - "D16_UNORM": "", - "R16_UNORM": "", - "R16_UINT": "", - "R16_SNORM": "", - "R16_SINT": "", - "R8_TYPELESS": "", - "R8_UNORM": "", - "R8_UINT": "", - "R8_SNORM": "", - "R8_SINT": "", - "A8_UNORM": "", - "R1_UNORM": "", - "R9G9B9E5_SHAREDEXP": "", - "R8G8_B8G8_UNORM": "", - "G8R8_G8B8_UNORM": "", - "BC1_TYPELESS": "", - "BC1_UNORM": "BC1_RGBA_UNORM_BLOCK", - "BC1_UNORM_SRGB": "", - "BC2_TYPELESS": "", - "BC2_UNORM": "BC2_RGBA_UNORM_BLOCK", - "BC2_UNORM_SRGB": "", - "BC3_TYPELESS": "", - "BC3_UNORM": "BC3_RGBA_UNORM_BLOCK", - "BC3_UNORM_SRGB": "", - "BC4_TYPELESS": "", - "BC4_UNORM": "", - "BC4_SNORM": "", - "BC5_TYPELESS": "", - "BC5_UNORM": "", - "BC5_SNORM": "", - "B5G6R5_UNORM": "", - "B5G5R5A1_UNORM": "", - "B8G8R8A8_UNORM": "", - "B8G8R8X8_UNORM": "", - "R10G10B10_XR_BIAS_A2_UNORM": "", - "B8G8R8A8_TYPELESS": "", - "B8G8R8A8_UNORM_SRGB": "", - "B8G8R8X8_TYPELESS": "", - "B8G8R8X8_UNORM_SRGB": "", - "BC6H_TYPELESS": "", - "BC6H_UF16": "", - "BC6H_SF16": "", - "BC7_TYPELESS": "", - "BC7_UNORM": "", - "BC7_UNORM_SRGB": "", - "AYUV": "", - "Y410": "", - "Y416": "", - "NV12": "", - "P010": "", - "P016": "", - "420_OPAQUE": "", - "YUY2": "", - "Y210": "", - "Y216": "", - "NV11": "", - "AI44": "", - "IA44": "", - "P8": "", - "A8P8": "", - "B4G4R4A4_UNORM": "" -} diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_format_map_autogen.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_format_map_autogen.cpp deleted file mode 100644 index 66610cac9..000000000 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_format_map_autogen.cpp +++ /dev/null @@ -1,516 +0,0 @@ -// GENERATED FILE - DO NOT EDIT. -// Generated by gen_dxgi_format_table.py using data from dxgi_format_data.json. -// -// Copyright 2016 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. -// -// DXGI format info: -// Determining metadata about a DXGI format. - -#include "libANGLE/renderer/Format.h" - -using namespace angle; - -namespace rx -{ - -namespace d3d11 -{ - -GLenum GetComponentType(DXGI_FORMAT dxgiFormat) -{ - switch (dxgiFormat) - { - case DXGI_FORMAT_420_OPAQUE: - break; - case DXGI_FORMAT_A8P8: - break; - case DXGI_FORMAT_A8_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_AI44: - break; - case DXGI_FORMAT_AYUV: - break; - case DXGI_FORMAT_B4G4R4A4_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_B5G5R5A1_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_B5G6R5_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_B8G8R8A8_TYPELESS: - break; - case DXGI_FORMAT_B8G8R8A8_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_B8G8R8X8_TYPELESS: - break; - case DXGI_FORMAT_B8G8R8X8_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_BC1_TYPELESS: - break; - case DXGI_FORMAT_BC1_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_BC1_UNORM_SRGB: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_BC2_TYPELESS: - break; - case DXGI_FORMAT_BC2_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_BC2_UNORM_SRGB: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_BC3_TYPELESS: - break; - case DXGI_FORMAT_BC3_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_BC3_UNORM_SRGB: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_BC4_SNORM: - return GL_SIGNED_NORMALIZED; - case DXGI_FORMAT_BC4_TYPELESS: - break; - case DXGI_FORMAT_BC4_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_BC5_SNORM: - return GL_SIGNED_NORMALIZED; - case DXGI_FORMAT_BC5_TYPELESS: - break; - case DXGI_FORMAT_BC5_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_BC6H_SF16: - break; - case DXGI_FORMAT_BC6H_TYPELESS: - break; - case DXGI_FORMAT_BC6H_UF16: - break; - case DXGI_FORMAT_BC7_TYPELESS: - break; - case DXGI_FORMAT_BC7_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_BC7_UNORM_SRGB: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_D16_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_D24_UNORM_S8_UINT: - break; - case DXGI_FORMAT_D32_FLOAT: - return GL_FLOAT; - case DXGI_FORMAT_D32_FLOAT_S8X24_UINT: - break; - case DXGI_FORMAT_G8R8_G8B8_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_IA44: - break; - case DXGI_FORMAT_NV11: - break; - case DXGI_FORMAT_NV12: - break; - case DXGI_FORMAT_P010: - break; - case DXGI_FORMAT_P016: - break; - case DXGI_FORMAT_P8: - break; - case DXGI_FORMAT_R10G10B10A2_TYPELESS: - break; - case DXGI_FORMAT_R10G10B10A2_UINT: - return GL_UNSIGNED_INT; - case DXGI_FORMAT_R10G10B10A2_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_R11G11B10_FLOAT: - return GL_FLOAT; - case DXGI_FORMAT_R16G16B16A16_FLOAT: - return GL_FLOAT; - case DXGI_FORMAT_R16G16B16A16_SINT: - return GL_INT; - case DXGI_FORMAT_R16G16B16A16_SNORM: - return GL_SIGNED_NORMALIZED; - case DXGI_FORMAT_R16G16B16A16_TYPELESS: - break; - case DXGI_FORMAT_R16G16B16A16_UINT: - return GL_UNSIGNED_INT; - case DXGI_FORMAT_R16G16B16A16_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_R16G16_FLOAT: - return GL_FLOAT; - case DXGI_FORMAT_R16G16_SINT: - return GL_INT; - case DXGI_FORMAT_R16G16_SNORM: - return GL_SIGNED_NORMALIZED; - case DXGI_FORMAT_R16G16_TYPELESS: - break; - case DXGI_FORMAT_R16G16_UINT: - return GL_UNSIGNED_INT; - case DXGI_FORMAT_R16G16_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_R16_FLOAT: - return GL_FLOAT; - case DXGI_FORMAT_R16_SINT: - return GL_INT; - case DXGI_FORMAT_R16_SNORM: - return GL_SIGNED_NORMALIZED; - case DXGI_FORMAT_R16_TYPELESS: - break; - case DXGI_FORMAT_R16_UINT: - return GL_UNSIGNED_INT; - case DXGI_FORMAT_R16_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_R1_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_R24G8_TYPELESS: - break; - case DXGI_FORMAT_R24_UNORM_X8_TYPELESS: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_R32G32B32A32_FLOAT: - return GL_FLOAT; - case DXGI_FORMAT_R32G32B32A32_SINT: - return GL_INT; - case DXGI_FORMAT_R32G32B32A32_TYPELESS: - break; - case DXGI_FORMAT_R32G32B32A32_UINT: - return GL_UNSIGNED_INT; - case DXGI_FORMAT_R32G32B32_FLOAT: - return GL_FLOAT; - case DXGI_FORMAT_R32G32B32_SINT: - return GL_INT; - case DXGI_FORMAT_R32G32B32_TYPELESS: - break; - case DXGI_FORMAT_R32G32B32_UINT: - return GL_UNSIGNED_INT; - case DXGI_FORMAT_R32G32_FLOAT: - return GL_FLOAT; - case DXGI_FORMAT_R32G32_SINT: - return GL_INT; - case DXGI_FORMAT_R32G32_TYPELESS: - break; - case DXGI_FORMAT_R32G32_UINT: - return GL_UNSIGNED_INT; - case DXGI_FORMAT_R32G8X24_TYPELESS: - break; - case DXGI_FORMAT_R32_FLOAT: - return GL_FLOAT; - case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS: - return GL_FLOAT; - case DXGI_FORMAT_R32_SINT: - return GL_INT; - case DXGI_FORMAT_R32_TYPELESS: - break; - case DXGI_FORMAT_R32_UINT: - return GL_UNSIGNED_INT; - case DXGI_FORMAT_R8G8B8A8_SINT: - return GL_INT; - case DXGI_FORMAT_R8G8B8A8_SNORM: - return GL_SIGNED_NORMALIZED; - case DXGI_FORMAT_R8G8B8A8_TYPELESS: - break; - case DXGI_FORMAT_R8G8B8A8_UINT: - return GL_UNSIGNED_INT; - case DXGI_FORMAT_R8G8B8A8_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_R8G8_B8G8_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_R8G8_SINT: - return GL_INT; - case DXGI_FORMAT_R8G8_SNORM: - return GL_SIGNED_NORMALIZED; - case DXGI_FORMAT_R8G8_TYPELESS: - break; - case DXGI_FORMAT_R8G8_UINT: - return GL_UNSIGNED_INT; - case DXGI_FORMAT_R8G8_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_R8_SINT: - return GL_INT; - case DXGI_FORMAT_R8_SNORM: - return GL_SIGNED_NORMALIZED; - case DXGI_FORMAT_R8_TYPELESS: - break; - case DXGI_FORMAT_R8_UINT: - return GL_UNSIGNED_INT; - case DXGI_FORMAT_R8_UNORM: - return GL_UNSIGNED_NORMALIZED; - case DXGI_FORMAT_R9G9B9E5_SHAREDEXP: - return GL_FLOAT; - case DXGI_FORMAT_UNKNOWN: - break; - case DXGI_FORMAT_X24_TYPELESS_G8_UINT: - return GL_UNSIGNED_INT; - case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT: - return GL_UNSIGNED_INT; - case DXGI_FORMAT_Y210: - break; - case DXGI_FORMAT_Y216: - break; - case DXGI_FORMAT_Y410: - break; - case DXGI_FORMAT_Y416: - break; - case DXGI_FORMAT_YUY2: - break; - default: - break; - } - - UNREACHABLE(); - return GL_NONE; -} - -} // namespace d3d11 - -namespace d3d11_angle -{ - -const Format &GetFormat(DXGI_FORMAT dxgiFormat) -{ - switch (dxgiFormat) - { - case DXGI_FORMAT_420_OPAQUE: - break; - case DXGI_FORMAT_A8P8: - break; - case DXGI_FORMAT_A8_UNORM: - return Format::Get(Format::ID::A8_UNORM); - case DXGI_FORMAT_AI44: - break; - case DXGI_FORMAT_AYUV: - break; - case DXGI_FORMAT_B4G4R4A4_UNORM: - return Format::Get(Format::ID::B4G4R4A4_UNORM); - case DXGI_FORMAT_B5G5R5A1_UNORM: - return Format::Get(Format::ID::B5G5R5A1_UNORM); - case DXGI_FORMAT_B5G6R5_UNORM: - return Format::Get(Format::ID::B5G6R5_UNORM); - case DXGI_FORMAT_B8G8R8A8_TYPELESS: - break; - case DXGI_FORMAT_B8G8R8A8_UNORM: - return Format::Get(Format::ID::B8G8R8A8_UNORM); - case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB: - break; - case DXGI_FORMAT_B8G8R8X8_TYPELESS: - break; - case DXGI_FORMAT_B8G8R8X8_UNORM: - return Format::Get(Format::ID::B8G8R8X8_UNORM); - case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB: - break; - case DXGI_FORMAT_BC1_TYPELESS: - break; - case DXGI_FORMAT_BC1_UNORM: - return Format::Get(Format::ID::BC1_RGBA_UNORM_BLOCK); - case DXGI_FORMAT_BC1_UNORM_SRGB: - break; - case DXGI_FORMAT_BC2_TYPELESS: - break; - case DXGI_FORMAT_BC2_UNORM: - return Format::Get(Format::ID::BC2_RGBA_UNORM_BLOCK); - case DXGI_FORMAT_BC2_UNORM_SRGB: - break; - case DXGI_FORMAT_BC3_TYPELESS: - break; - case DXGI_FORMAT_BC3_UNORM: - return Format::Get(Format::ID::BC3_RGBA_UNORM_BLOCK); - case DXGI_FORMAT_BC3_UNORM_SRGB: - break; - case DXGI_FORMAT_BC4_SNORM: - break; - case DXGI_FORMAT_BC4_TYPELESS: - break; - case DXGI_FORMAT_BC4_UNORM: - break; - case DXGI_FORMAT_BC5_SNORM: - break; - case DXGI_FORMAT_BC5_TYPELESS: - break; - case DXGI_FORMAT_BC5_UNORM: - break; - case DXGI_FORMAT_BC6H_SF16: - break; - case DXGI_FORMAT_BC6H_TYPELESS: - break; - case DXGI_FORMAT_BC6H_UF16: - break; - case DXGI_FORMAT_BC7_TYPELESS: - break; - case DXGI_FORMAT_BC7_UNORM: - break; - case DXGI_FORMAT_BC7_UNORM_SRGB: - break; - case DXGI_FORMAT_D16_UNORM: - return Format::Get(Format::ID::D16_UNORM); - case DXGI_FORMAT_D24_UNORM_S8_UINT: - return Format::Get(Format::ID::D24_UNORM_S8_UINT); - case DXGI_FORMAT_D32_FLOAT: - return Format::Get(Format::ID::D32_FLOAT); - case DXGI_FORMAT_D32_FLOAT_S8X24_UINT: - return Format::Get(Format::ID::D32_FLOAT_S8X24_UINT); - case DXGI_FORMAT_G8R8_G8B8_UNORM: - break; - case DXGI_FORMAT_IA44: - break; - case DXGI_FORMAT_NV11: - break; - case DXGI_FORMAT_NV12: - break; - case DXGI_FORMAT_P010: - break; - case DXGI_FORMAT_P016: - break; - case DXGI_FORMAT_P8: - break; - case DXGI_FORMAT_R10G10B10A2_TYPELESS: - break; - case DXGI_FORMAT_R10G10B10A2_UINT: - return Format::Get(Format::ID::R10G10B10A2_UINT); - case DXGI_FORMAT_R10G10B10A2_UNORM: - return Format::Get(Format::ID::R10G10B10A2_UNORM); - case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM: - break; - case DXGI_FORMAT_R11G11B10_FLOAT: - return Format::Get(Format::ID::R11G11B10_FLOAT); - case DXGI_FORMAT_R16G16B16A16_FLOAT: - return Format::Get(Format::ID::R16G16B16A16_FLOAT); - case DXGI_FORMAT_R16G16B16A16_SINT: - return Format::Get(Format::ID::R16G16B16A16_SINT); - case DXGI_FORMAT_R16G16B16A16_SNORM: - return Format::Get(Format::ID::R16G16B16A16_SNORM); - case DXGI_FORMAT_R16G16B16A16_TYPELESS: - break; - case DXGI_FORMAT_R16G16B16A16_UINT: - return Format::Get(Format::ID::R16G16B16A16_UINT); - case DXGI_FORMAT_R16G16B16A16_UNORM: - return Format::Get(Format::ID::R16G16B16A16_UNORM); - case DXGI_FORMAT_R16G16_FLOAT: - return Format::Get(Format::ID::R16G16_FLOAT); - case DXGI_FORMAT_R16G16_SINT: - return Format::Get(Format::ID::R16G16_SINT); - case DXGI_FORMAT_R16G16_SNORM: - return Format::Get(Format::ID::R16G16_SNORM); - case DXGI_FORMAT_R16G16_TYPELESS: - break; - case DXGI_FORMAT_R16G16_UINT: - return Format::Get(Format::ID::R16G16_UINT); - case DXGI_FORMAT_R16G16_UNORM: - return Format::Get(Format::ID::R16G16_UNORM); - case DXGI_FORMAT_R16_FLOAT: - return Format::Get(Format::ID::R16_FLOAT); - case DXGI_FORMAT_R16_SINT: - return Format::Get(Format::ID::R16_SINT); - case DXGI_FORMAT_R16_SNORM: - return Format::Get(Format::ID::R16_SNORM); - case DXGI_FORMAT_R16_TYPELESS: - break; - case DXGI_FORMAT_R16_UINT: - return Format::Get(Format::ID::R16_UINT); - case DXGI_FORMAT_R16_UNORM: - return Format::Get(Format::ID::R16_UNORM); - case DXGI_FORMAT_R1_UNORM: - break; - case DXGI_FORMAT_R24G8_TYPELESS: - break; - case DXGI_FORMAT_R24_UNORM_X8_TYPELESS: - break; - case DXGI_FORMAT_R32G32B32A32_FLOAT: - return Format::Get(Format::ID::R32G32B32A32_FLOAT); - case DXGI_FORMAT_R32G32B32A32_SINT: - return Format::Get(Format::ID::R32G32B32A32_SINT); - case DXGI_FORMAT_R32G32B32A32_TYPELESS: - break; - case DXGI_FORMAT_R32G32B32A32_UINT: - return Format::Get(Format::ID::R32G32B32A32_UINT); - case DXGI_FORMAT_R32G32B32_FLOAT: - return Format::Get(Format::ID::R32G32B32_FLOAT); - case DXGI_FORMAT_R32G32B32_SINT: - return Format::Get(Format::ID::R32G32B32_SINT); - case DXGI_FORMAT_R32G32B32_TYPELESS: - break; - case DXGI_FORMAT_R32G32B32_UINT: - return Format::Get(Format::ID::R32G32B32_UINT); - case DXGI_FORMAT_R32G32_FLOAT: - return Format::Get(Format::ID::R32G32_FLOAT); - case DXGI_FORMAT_R32G32_SINT: - return Format::Get(Format::ID::R32G32_SINT); - case DXGI_FORMAT_R32G32_TYPELESS: - break; - case DXGI_FORMAT_R32G32_UINT: - return Format::Get(Format::ID::R32G32_UINT); - case DXGI_FORMAT_R32G8X24_TYPELESS: - break; - case DXGI_FORMAT_R32_FLOAT: - return Format::Get(Format::ID::R32_FLOAT); - case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS: - break; - case DXGI_FORMAT_R32_SINT: - return Format::Get(Format::ID::R32_SINT); - case DXGI_FORMAT_R32_TYPELESS: - break; - case DXGI_FORMAT_R32_UINT: - return Format::Get(Format::ID::R32_UINT); - case DXGI_FORMAT_R8G8B8A8_SINT: - return Format::Get(Format::ID::R8G8B8A8_SINT); - case DXGI_FORMAT_R8G8B8A8_SNORM: - return Format::Get(Format::ID::R8G8B8A8_SNORM); - case DXGI_FORMAT_R8G8B8A8_TYPELESS: - break; - case DXGI_FORMAT_R8G8B8A8_UINT: - return Format::Get(Format::ID::R8G8B8A8_UINT); - case DXGI_FORMAT_R8G8B8A8_UNORM: - return Format::Get(Format::ID::R8G8B8A8_UNORM); - case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB: - return Format::Get(Format::ID::R8G8B8A8_UNORM_SRGB); - case DXGI_FORMAT_R8G8_B8G8_UNORM: - break; - case DXGI_FORMAT_R8G8_SINT: - return Format::Get(Format::ID::R8G8_SINT); - case DXGI_FORMAT_R8G8_SNORM: - return Format::Get(Format::ID::R8G8_SNORM); - case DXGI_FORMAT_R8G8_TYPELESS: - break; - case DXGI_FORMAT_R8G8_UINT: - return Format::Get(Format::ID::R8G8_UINT); - case DXGI_FORMAT_R8G8_UNORM: - return Format::Get(Format::ID::R8G8_UNORM); - case DXGI_FORMAT_R8_SINT: - return Format::Get(Format::ID::R8_SINT); - case DXGI_FORMAT_R8_SNORM: - return Format::Get(Format::ID::R8_SNORM); - case DXGI_FORMAT_R8_TYPELESS: - break; - case DXGI_FORMAT_R8_UINT: - return Format::Get(Format::ID::R8_UINT); - case DXGI_FORMAT_R8_UNORM: - return Format::Get(Format::ID::R8_UNORM); - case DXGI_FORMAT_R9G9B9E5_SHAREDEXP: - return Format::Get(Format::ID::R9G9B9E5_SHAREDEXP); - case DXGI_FORMAT_UNKNOWN: - return Format::Get(Format::ID::NONE); - case DXGI_FORMAT_X24_TYPELESS_G8_UINT: - break; - case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT: - break; - case DXGI_FORMAT_Y210: - break; - case DXGI_FORMAT_Y216: - break; - case DXGI_FORMAT_Y410: - break; - case DXGI_FORMAT_Y416: - break; - case DXGI_FORMAT_YUY2: - break; - default: - break; - } - - UNREACHABLE(); - return Format::Get(Format::ID::NONE); -} - -} // namespace d3d11_angle - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_support_data.json b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_support_data.json index dce0997d9..e81b4deea 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_support_data.json +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_support_data.json @@ -8,8 +8,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R32G32B32A32_TYPELESS": { @@ -19,8 +18,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R32G32B32A32_FLOAT": { @@ -30,30 +28,27 @@ "shaderSample": "10_0check10_1always", "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "always" + "depthStencil": "never" }, "DXGI_FORMAT_R32G32B32A32_UINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R32G32B32A32_SINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R32G32B32_TYPELESS": { @@ -63,8 +58,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R32G32B32_FLOAT": { @@ -74,8 +68,7 @@ "shaderSample": "11_0check", "renderTarget": "check", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R32G32B32_UINT": { @@ -85,8 +78,7 @@ "shaderSample": "never", "renderTarget": "check", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R32G32B32_SINT": { @@ -96,8 +88,7 @@ "shaderSample": "never", "renderTarget": "check", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R16G16B16A16_TYPELESS": { @@ -107,63 +98,57 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R16G16B16A16_FLOAT": { "texture2D": "always", "texture3D": "always", "textureCube": "always", - "shaderSample": "9_3check_10_0always", + "shaderSample": "10_0", "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "always" + "depthStencil": "never" }, "DXGI_FORMAT_R16G16B16A16_UNORM": { "texture2D": "always", "texture3D": "always", "textureCube": "always", - "shaderSample": "always", + "shaderSample": "10_0", "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "always" + "depthStencil": "never" }, "DXGI_FORMAT_R16G16B16A16_UINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R16G16B16A16_SNORM": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "10_0", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "10_0" + "depthStencil": "never" }, "DXGI_FORMAT_R16G16B16A16_SINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R32G32_TYPELESS": { @@ -173,8 +158,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R32G32_FLOAT": { @@ -184,41 +168,37 @@ "shaderSample": "10_0check10_1always", "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "10_0" + "depthStencil": "never" }, "DXGI_FORMAT_R32G32_UINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R32G32_SINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R32G8X24_TYPELESS": { - "texture2D": "10_0", + "texture2D": "always", "texture3D": "never", - "textureCube": "10_0", + "textureCube": "always", "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_D32_FLOAT_S8X24_UINT": { @@ -228,8 +208,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "check", - "depthStencil": "10_0", - "mipAutoGen": "never" + "depthStencil": "always" }, "DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS": { @@ -239,8 +218,7 @@ "shaderSample": "10_0check10_1always", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_X32_TYPELESS_G8X24_UINT": { @@ -250,52 +228,47 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R10G10B10A2_TYPELESS": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R10G10B10A2_UNORM": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "10_0", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "10_0" + "depthStencil": "never" }, "DXGI_FORMAT_R10G10B10A2_UINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R11G11B10_FLOAT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "10_0", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "10_0" + "depthStencil": "never" }, "DXGI_FORMAT_R8G8B8A8_TYPELESS": { @@ -305,63 +278,57 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R8G8B8A8_UNORM": { "texture2D": "always", "texture3D": "always", "textureCube": "always", - "shaderSample": "always", + "shaderSample": "10_0", "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "always" + "depthStencil": "never" }, "DXGI_FORMAT_R8G8B8A8_UNORM_SRGB": { "texture2D": "always", "texture3D": "always", "textureCube": "always", - "shaderSample": "always", + "shaderSample": "10_0", "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "always" + "depthStencil": "never" }, "DXGI_FORMAT_R8G8B8A8_UINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R8G8B8A8_SNORM": { "texture2D": "always", "texture3D": "always", "textureCube": "always", - "shaderSample": "always", + "shaderSample": "10_0", "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "10_0" + "depthStencil": "never" }, "DXGI_FORMAT_R8G8B8A8_SINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R16G16_TYPELESS": { @@ -371,8 +338,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R16G16_FLOAT": { @@ -382,63 +348,57 @@ "shaderSample": "10_0", "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "always" + "depthStencil": "never" }, "DXGI_FORMAT_R16G16_UNORM": { "texture2D": "always", "texture3D": "always", "textureCube": "always", - "shaderSample": "always", + "shaderSample": "10_0", "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "always" + "depthStencil": "never" }, "DXGI_FORMAT_R16G16_UINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R16G16_SNORM": { "texture2D": "always", "texture3D": "always", "textureCube": "always", - "shaderSample": "always", + "shaderSample": "10_0", "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "10_0" + "depthStencil": "never" }, "DXGI_FORMAT_R16G16_SINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R32_TYPELESS": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_D32_FLOAT": { @@ -448,8 +408,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "check", - "depthStencil": "10_0", - "mipAutoGen": "never" + "depthStencil": "always" }, "DXGI_FORMAT_R32_FLOAT": { @@ -459,30 +418,27 @@ "shaderSample": "10_0check10_1always", "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "always" + "depthStencil": "never" }, "DXGI_FORMAT_R32_UINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R32_SINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R24G8_TYPELESS": { @@ -492,8 +448,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_D24_UNORM_S8_UINT": { @@ -513,8 +468,7 @@ "shaderSample": "10_0check10_1always", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_X24_TYPELESS_G8_UINT": { @@ -524,8 +478,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R8G8_TYPELESS": { @@ -535,52 +488,47 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R8G8_UNORM": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", - "shaderSample": "9_3check_10_0always", - "renderTarget": "9_3check_10_0always", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", + "shaderSample": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "10_0" + "depthStencil": "never" }, "DXGI_FORMAT_R8G8_UINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R8G8_SNORM": { "texture2D": "always", - "texture3D": "10_0", - "textureCube": "10_0", - "shaderSample": "always", - "renderTarget": "10_0", + "texture3D": "always", + "textureCube": "always", + "shaderSample": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "10_0" + "depthStencil": "never" }, "DXGI_FORMAT_R8G8_SINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R16_TYPELESS": { @@ -590,19 +538,17 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R16_FLOAT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "10_0", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "10_0" + "depthStencil": "never" }, "DXGI_FORMAT_D16_UNORM": { @@ -612,52 +558,47 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "check", - "depthStencil": "always", - "mipAutoGen": "never" + "depthStencil": "always" }, "DXGI_FORMAT_R16_UNORM": { "texture2D": "always", "texture3D": "always", "textureCube": "always", - "shaderSample": "always", - "renderTarget": "10_0", + "shaderSample": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "10_0" + "depthStencil": "never" }, "DXGI_FORMAT_R16_UINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R16_SNORM": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "10_0", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "10_0" + "depthStencil": "never" }, "DXGI_FORMAT_R16_SINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R8_TYPELESS": { @@ -667,52 +608,47 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R8_UNORM": { "texture2D": "always", "texture3D": "always", "textureCube": "always", - "shaderSample": "always", - "renderTarget": "9_3check_10_0always", + "shaderSample": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "10_0" + "depthStencil": "never" }, "DXGI_FORMAT_R8_UINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R8_SNORM": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "10_0", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "10_0" + "depthStencil": "never" }, "DXGI_FORMAT_R8_SINT": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "never", - "renderTarget": "10_0", + "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_A8_UNORM": { @@ -722,8 +658,7 @@ "shaderSample": "10_0", "renderTarget": "always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "10_0" + "depthStencil": "never" }, "DXGI_FORMAT_R1_UNORM": { @@ -733,19 +668,17 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R9G9B9E5_SHAREDEXP": { - "texture2D": "10_0", - "texture3D": "10_0", - "textureCube": "10_0", + "texture2D": "always", + "texture3D": "always", + "textureCube": "always", "shaderSample": "10_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R8G8_B8G8_UNORM": { @@ -755,8 +688,7 @@ "shaderSample": "10_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_G8R8_G8B8_UNORM": { @@ -766,8 +698,7 @@ "shaderSample": "10_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC1_TYPELESS": { @@ -777,19 +708,17 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC1_UNORM": { "texture2D": "always", "texture3D": "always", "textureCube": "always", - "shaderSample": "always", + "shaderSample": "10_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC1_UNORM_SRGB": { @@ -799,8 +728,7 @@ "shaderSample": "10_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC2_TYPELESS": { @@ -810,19 +738,17 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC2_UNORM": { "texture2D": "always", "texture3D": "always", "textureCube": "always", - "shaderSample": "always", + "shaderSample": "10_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC2_UNORM_SRGB": { @@ -832,8 +758,7 @@ "shaderSample": "10_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC3_TYPELESS": { @@ -843,19 +768,17 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC3_UNORM": { "texture2D": "always", "texture3D": "always", "textureCube": "always", - "shaderSample": "always", + "shaderSample": "10_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC3_UNORM_SRGB": { @@ -865,8 +788,7 @@ "shaderSample": "10_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC4_TYPELESS": { @@ -876,8 +798,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC4_UNORM": { @@ -887,8 +808,7 @@ "shaderSample": "10_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC4_SNORM": { @@ -898,8 +818,7 @@ "shaderSample": "10_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC5_TYPELESS": { @@ -909,8 +828,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC5_UNORM": { @@ -920,8 +838,7 @@ "shaderSample": "10_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC5_SNORM": { @@ -931,8 +848,7 @@ "shaderSample": "10_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_B5G6R5_UNORM": { @@ -942,8 +858,7 @@ "shaderSample": "dxgi1_2", "renderTarget": "dxgi1_2", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "dxgi1_2" + "depthStencil": "never" }, "DXGI_FORMAT_B5G5R5A1_UNORM": { @@ -953,19 +868,17 @@ "shaderSample": "dxgi1_2", "renderTarget": "check", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "dxgi1_2" + "depthStencil": "never" }, "DXGI_FORMAT_B8G8R8A8_UNORM": { "texture2D": "check", "texture3D": "check", "textureCube": "check", - "shaderSample": "9_3always_10_0check11_0always", - "renderTarget": "9_3always_10_0check11_0always", + "shaderSample": "10_0check11_0always", + "renderTarget": "10_0check11_0always", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "always" + "depthStencil": "never" }, "DXGI_FORMAT_B8G8R8X8_UNORM": { @@ -975,8 +888,7 @@ "shaderSample": "10_0check11_0always", "renderTarget": "11_0", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM": { @@ -986,8 +898,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_B8G8R8A8_TYPELESS": { @@ -997,8 +908,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_B8G8R8A8_UNORM_SRGB": { @@ -1008,8 +918,7 @@ "shaderSample": "10_0check11_0always", "renderTarget": "11_0", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_B8G8R8X8_TYPELESS": { @@ -1019,8 +928,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_B8G8R8X8_UNORM_SRGB": { @@ -1030,8 +938,7 @@ "shaderSample": "10_0check11_0always", "renderTarget": "11_0", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC6H_TYPELESS": { @@ -1041,8 +948,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC6H_UF16": { @@ -1052,8 +958,7 @@ "shaderSample": "11_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC6H_SF16": { @@ -1063,8 +968,7 @@ "shaderSample": "11_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC7_TYPELESS": { @@ -1074,8 +978,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC7_UNORM": { @@ -1085,8 +988,7 @@ "shaderSample": "11_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_BC7_UNORM_SRGB": { @@ -1096,8 +998,7 @@ "shaderSample": "11_0", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_AYUV": { @@ -1107,8 +1008,7 @@ "shaderSample": "11_1", "renderTarget": "11_1", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_Y410": { @@ -1118,8 +1018,7 @@ "shaderSample": "11_1", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_Y416": { @@ -1129,8 +1028,7 @@ "shaderSample": "11_1", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_NV12": { @@ -1140,8 +1038,7 @@ "shaderSample": "11_1", "renderTarget": "11_1", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_P010": { @@ -1151,8 +1048,7 @@ "shaderSample": "11_1", "renderTarget": "11_1", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_P016": { @@ -1162,8 +1058,7 @@ "shaderSample": "11_1", "renderTarget": "11_1", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_420_OPAQUE": { @@ -1173,8 +1068,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_YUY2": { @@ -1184,8 +1078,7 @@ "shaderSample": "11_1", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_Y210": { @@ -1195,8 +1088,7 @@ "shaderSample": "11_1", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_Y216": { @@ -1206,8 +1098,7 @@ "shaderSample": "11_1", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_NV11": { @@ -1217,8 +1108,7 @@ "shaderSample": "11_1", "renderTarget": "11_1", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_AI44": { @@ -1228,8 +1118,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_IA44": { @@ -1239,8 +1128,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_P8": { @@ -1250,8 +1138,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_A8P8": { @@ -1261,8 +1148,7 @@ "shaderSample": "never", "renderTarget": "never", "multisampleRT": "never", - "depthStencil": "never", - "mipAutoGen": "never" + "depthStencil": "never" }, "DXGI_FORMAT_B4G4R4A4_UNORM": { @@ -1272,8 +1158,7 @@ "shaderSample": "dxgi1_2", "renderTarget": "check", "multisampleRT": "check", - "depthStencil": "never", - "mipAutoGen": "dxgi1_2" + "depthStencil": "never" } } ] diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_support_table.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_support_table.cpp index d202ce130..cbc36445e 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_support_table.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/dxgi_support_table.cpp @@ -26,798 +26,205 @@ namespace d3d11 #define F_RT D3D11_FORMAT_SUPPORT_RENDER_TARGET #define F_MS D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET #define F_DS D3D11_FORMAT_SUPPORT_DEPTH_STENCIL -#define F_MIPGEN D3D11_FORMAT_SUPPORT_MIP_AUTOGEN namespace { const DXGISupport &GetDefaultSupport() { - static UINT AllSupportFlags = - D3D11_FORMAT_SUPPORT_TEXTURE2D | D3D11_FORMAT_SUPPORT_TEXTURE3D | - D3D11_FORMAT_SUPPORT_TEXTURECUBE | D3D11_FORMAT_SUPPORT_SHADER_SAMPLE | - D3D11_FORMAT_SUPPORT_RENDER_TARGET | D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET | - D3D11_FORMAT_SUPPORT_DEPTH_STENCIL | D3D11_FORMAT_SUPPORT_MIP_AUTOGEN; + static UINT AllSupportFlags = D3D11_FORMAT_SUPPORT_TEXTURE2D | + D3D11_FORMAT_SUPPORT_TEXTURE3D | + D3D11_FORMAT_SUPPORT_TEXTURECUBE | + D3D11_FORMAT_SUPPORT_SHADER_SAMPLE | + D3D11_FORMAT_SUPPORT_RENDER_TARGET | + D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET | + D3D11_FORMAT_SUPPORT_DEPTH_STENCIL; static const DXGISupport defaultSupport(0, 0, AllSupportFlags); return defaultSupport; } -const DXGISupport &GetDXGISupport_9_3(DXGI_FORMAT dxgiFormat) -{ - // clang-format off - switch (dxgiFormat) - { - case DXGI_FORMAT_420_OPAQUE: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_A8P8: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_A8_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_AI44: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_AYUV: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_B4G4R4A4_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_SAMPLE, F_DS, F_MS | F_RT); - return info; - } - case DXGI_FORMAT_B5G5R5A1_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_SAMPLE, F_DS, F_MS | F_RT); - return info; - } - case DXGI_FORMAT_B5G6R5_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_B8G8R8A8_TYPELESS: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, F_2D | F_3D | F_CUBE); - return info; - } - case DXGI_FORMAT_B8G8R8A8_UNORM: - { - static const DXGISupport info(F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_2D | F_3D | F_CUBE | F_MS); - return info; - } - case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB: - { - static const DXGISupport info(0, F_DS | F_MIPGEN, F_2D | F_3D | F_CUBE | F_MS); - return info; - } - case DXGI_FORMAT_B8G8R8X8_TYPELESS: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, F_2D | F_3D | F_CUBE); - return info; - } - case DXGI_FORMAT_B8G8R8X8_UNORM: - { - static const DXGISupport info(0, F_DS | F_MIPGEN, F_2D | F_3D | F_CUBE | F_MS); - return info; - } - case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB: - { - static const DXGISupport info(0, F_DS | F_MIPGEN, F_2D | F_3D | F_CUBE | F_MS); - return info; - } - case DXGI_FORMAT_BC1_TYPELESS: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_BC1_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_BC1_UNORM_SRGB: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_BC2_TYPELESS: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_BC2_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_BC2_UNORM_SRGB: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_BC3_TYPELESS: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_BC3_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_BC3_UNORM_SRGB: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_BC4_SNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_BC4_TYPELESS: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_BC4_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_BC5_SNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_BC5_TYPELESS: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_BC5_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_BC6H_SF16: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_BC6H_TYPELESS: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_BC6H_UF16: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_BC7_TYPELESS: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_BC7_UNORM: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_BC7_UNORM_SRGB: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_D16_UNORM: - { - static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_MIPGEN | F_RT | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_D24_UNORM_S8_UINT: - { - static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_RT | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_D32_FLOAT: - { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_MIPGEN | F_RT | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_D32_FLOAT_S8X24_UINT: - { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_MIPGEN | F_RT | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_G8R8_G8B8_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_IA44: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_NV11: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_NV12: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_P010: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_P016: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_P8: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_R10G10B10A2_TYPELESS: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_R10G10B10A2_UINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R10G10B10A2_UNORM: - { - static const DXGISupport info(0, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM: - { - static const DXGISupport info(0, F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, F_2D | F_3D); - return info; - } - case DXGI_FORMAT_R11G11B10_FLOAT: - { - static const DXGISupport info(0, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R16G16B16A16_FLOAT: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT, F_DS, F_MS | F_SAMPLE); - return info; - } - case DXGI_FORMAT_R16G16B16A16_SINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R16G16B16A16_SNORM: - { - static const DXGISupport info(0, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R16G16B16A16_TYPELESS: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_R16G16B16A16_UINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R16G16B16A16_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R16G16_FLOAT: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R16G16_SINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R16G16_SNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R16G16_TYPELESS: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_R16G16_UINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R16G16_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R16_FLOAT: - { - static const DXGISupport info(0, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R16_SINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R16_SNORM: - { - static const DXGISupport info(0, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R16_TYPELESS: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_R16_UINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R16_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R1_UNORM: - { - static const DXGISupport info(F_2D, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_R24G8_TYPELESS: - { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_R24_UNORM_X8_TYPELESS: - { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_R32G32B32A32_FLOAT: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R32G32B32A32_SINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R32G32B32A32_TYPELESS: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_R32G32B32A32_UINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R32G32B32_FLOAT: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN, F_MS | F_RT); - return info; - } - case DXGI_FORMAT_R32G32B32_SINT: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_SAMPLE, F_MS | F_RT); - return info; - } - case DXGI_FORMAT_R32G32B32_TYPELESS: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_R32G32B32_UINT: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_SAMPLE, F_MS | F_RT); - return info; - } - case DXGI_FORMAT_R32G32_FLOAT: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R32G32_SINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R32G32_TYPELESS: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_R32G32_UINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R32G8X24_TYPELESS: - { - static const DXGISupport info(0, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_R32_FLOAT: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS: - { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_R32_SINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R32_TYPELESS: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_R32_UINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R8G8B8A8_SINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R8G8B8A8_SNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R8G8B8A8_TYPELESS: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_R8G8B8A8_UINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R8G8B8A8_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R8G8_B8G8_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_R8G8_SINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R8G8_SNORM: - { - static const DXGISupport info(F_2D | F_SAMPLE, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R8G8_TYPELESS: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_R8G8_UINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R8G8_UNORM: - { - static const DXGISupport info(0, F_DS, F_MS | F_RT | F_SAMPLE); - return info; - } - case DXGI_FORMAT_R8_SINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R8_SNORM: - { - static const DXGISupport info(0, F_DS, F_MS); - return info; - } - case DXGI_FORMAT_R8_TYPELESS: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_R8_UINT: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_SAMPLE, F_MS); - return info; - } - case DXGI_FORMAT_R8_UNORM: - { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS, F_MS | F_RT); - return info; - } - case DXGI_FORMAT_R9G9B9E5_SHAREDEXP: - { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0); - return info; - } - case DXGI_FORMAT_UNKNOWN: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_X24_TYPELESS_G8_UINT: - { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT: - { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_Y210: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_Y216: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_Y410: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_Y416: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - case DXGI_FORMAT_YUY2: - { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); - return info; - } - - default: - UNREACHABLE(); - return GetDefaultSupport(); - } - // clang-format on -} - const DXGISupport &GetDXGISupport_10_0(DXGI_FORMAT dxgiFormat) { - // clang-format off switch (dxgiFormat) { case DXGI_FORMAT_420_OPAQUE: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_A8P8: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_A8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_AI44: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_AYUV: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_B4G4R4A4_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_SAMPLE, F_DS, F_MS | F_RT); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS, F_MS | F_RT); return info; } case DXGI_FORMAT_B5G5R5A1_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_SAMPLE, F_DS, F_MS | F_RT); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS, F_MS | F_RT); return info; } case DXGI_FORMAT_B5G6R5_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_B8G8R8A8_TYPELESS: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, F_2D | F_3D | F_CUBE); + static const DXGISupport info(0, F_DS | F_MS | F_RT | F_SAMPLE, F_2D | F_3D | F_CUBE); return info; } case DXGI_FORMAT_B8G8R8A8_UNORM: { - static const DXGISupport info(F_MIPGEN, F_DS, F_2D | F_3D | F_CUBE | F_MS | F_RT | F_SAMPLE); + static const DXGISupport info(0, F_DS, F_2D | F_3D | F_CUBE | F_MS | F_RT | F_SAMPLE); return info; } case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB: { - static const DXGISupport info(0, F_DS | F_MIPGEN, F_2D | F_3D | F_CUBE | F_MS | F_SAMPLE); + static const DXGISupport info(0, F_DS, F_2D | F_3D | F_CUBE | F_MS | F_SAMPLE); return info; } case DXGI_FORMAT_B8G8R8X8_TYPELESS: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, F_2D | F_3D | F_CUBE); + static const DXGISupport info(0, F_DS | F_MS | F_RT | F_SAMPLE, F_2D | F_3D | F_CUBE); return info; } case DXGI_FORMAT_B8G8R8X8_UNORM: { - static const DXGISupport info(0, F_DS | F_MIPGEN, F_2D | F_3D | F_CUBE | F_MS | F_SAMPLE); + static const DXGISupport info(0, F_DS, F_2D | F_3D | F_CUBE | F_MS | F_SAMPLE); return info; } case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB: { - static const DXGISupport info(0, F_DS | F_MIPGEN, F_2D | F_3D | F_CUBE | F_MS | F_SAMPLE); + static const DXGISupport info(0, F_DS, F_2D | F_3D | F_CUBE | F_MS | F_SAMPLE); return info; } case DXGI_FORMAT_BC1_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC1_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC1_UNORM_SRGB: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC2_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC2_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC2_UNORM_SRGB: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC3_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC3_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC3_UNORM_SRGB: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC4_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC4_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC4_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC5_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC5_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC5_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC6H_SF16: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(0, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC6H_TYPELESS: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC6H_UF16: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(0, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC7_TYPELESS: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC7_UNORM: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(0, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC7_UNORM_SRGB: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(0, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_D16_UNORM: { - static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_D24_UNORM_S8_UINT: @@ -827,397 +234,397 @@ const DXGISupport &GetDXGISupport_10_0(DXGI_FORMAT dxgiFormat) } case DXGI_FORMAT_D32_FLOAT: { - static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_D32_FLOAT_S8X24_UINT: { - static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_G8R8_G8B8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_IA44: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_NV11: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_NV12: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_P010: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_P016: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_P8: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R10G10B10A2_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R10G10B10A2_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R10G10B10A2_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM: { - static const DXGISupport info(0, F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, F_2D | F_3D); + static const DXGISupport info(0, F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, F_2D | F_3D); return info; } case DXGI_FORMAT_R11G11B10_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16B16A16_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16B16A16_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16G16B16A16_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16B16A16_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R16G16B16A16_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16G16B16A16_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16G16_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R16G16_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16G16_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R16_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R1_UNORM: { - static const DXGISupport info(F_2D, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R24G8_TYPELESS: { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R24_UNORM_X8_TYPELESS: { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT, F_SAMPLE); + static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MS | F_RT, F_SAMPLE); return info; } case DXGI_FORMAT_R32G32B32A32_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT, F_DS, F_MS | F_SAMPLE); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS, F_MS | F_SAMPLE); return info; } case DXGI_FORMAT_R32G32B32A32_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R32G32B32A32_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R32G32B32A32_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R32G32B32_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN, F_MS | F_RT); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS, F_MS | F_RT); return info; } case DXGI_FORMAT_R32G32B32_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_SAMPLE, F_MS | F_RT); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_SAMPLE, F_MS | F_RT); return info; } case DXGI_FORMAT_R32G32B32_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R32G32B32_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_SAMPLE, F_MS | F_RT); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_SAMPLE, F_MS | F_RT); return info; } case DXGI_FORMAT_R32G32_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT, F_DS, F_MS | F_SAMPLE); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS, F_MS | F_SAMPLE); return info; } case DXGI_FORMAT_R32G32_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R32G32_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R32G32_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R32G8X24_TYPELESS: { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R32_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT, F_DS, F_MS | F_SAMPLE); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS, F_MS | F_SAMPLE); return info; } case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS: { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT, F_SAMPLE); + static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MS | F_RT, F_SAMPLE); return info; } case DXGI_FORMAT_R32_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R32_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R32_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8G8B8A8_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8G8B8A8_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8G8B8A8_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R8G8B8A8_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8G8B8A8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8G8_B8G8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_R8G8_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8G8_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8G8_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R8G8_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8G8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R8_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R9G9B9E5_SHAREDEXP: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_UNKNOWN: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_X24_TYPELESS_G8_UINT: { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT: { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_Y210: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_Y216: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_Y410: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_Y416: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_YUY2: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } @@ -1225,192 +632,190 @@ const DXGISupport &GetDXGISupport_10_0(DXGI_FORMAT dxgiFormat) UNREACHABLE(); return GetDefaultSupport(); } - // clang-format on } const DXGISupport &GetDXGISupport_10_1(DXGI_FORMAT dxgiFormat) { - // clang-format off switch (dxgiFormat) { case DXGI_FORMAT_420_OPAQUE: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_A8P8: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_A8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_AI44: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_AYUV: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_B4G4R4A4_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_SAMPLE, F_DS, F_MS | F_RT); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS, F_MS | F_RT); return info; } case DXGI_FORMAT_B5G5R5A1_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_SAMPLE, F_DS, F_MS | F_RT); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS, F_MS | F_RT); return info; } case DXGI_FORMAT_B5G6R5_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_B8G8R8A8_TYPELESS: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, F_2D | F_3D | F_CUBE); + static const DXGISupport info(0, F_DS | F_MS | F_RT | F_SAMPLE, F_2D | F_3D | F_CUBE); return info; } case DXGI_FORMAT_B8G8R8A8_UNORM: { - static const DXGISupport info(F_MIPGEN, F_DS, F_2D | F_3D | F_CUBE | F_MS | F_RT | F_SAMPLE); + static const DXGISupport info(0, F_DS, F_2D | F_3D | F_CUBE | F_MS | F_RT | F_SAMPLE); return info; } case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB: { - static const DXGISupport info(0, F_DS | F_MIPGEN, F_2D | F_3D | F_CUBE | F_MS | F_SAMPLE); + static const DXGISupport info(0, F_DS, F_2D | F_3D | F_CUBE | F_MS | F_SAMPLE); return info; } case DXGI_FORMAT_B8G8R8X8_TYPELESS: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, F_2D | F_3D | F_CUBE); + static const DXGISupport info(0, F_DS | F_MS | F_RT | F_SAMPLE, F_2D | F_3D | F_CUBE); return info; } case DXGI_FORMAT_B8G8R8X8_UNORM: { - static const DXGISupport info(0, F_DS | F_MIPGEN, F_2D | F_3D | F_CUBE | F_MS | F_SAMPLE); + static const DXGISupport info(0, F_DS, F_2D | F_3D | F_CUBE | F_MS | F_SAMPLE); return info; } case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB: { - static const DXGISupport info(0, F_DS | F_MIPGEN, F_2D | F_3D | F_CUBE | F_MS | F_SAMPLE); + static const DXGISupport info(0, F_DS, F_2D | F_3D | F_CUBE | F_MS | F_SAMPLE); return info; } case DXGI_FORMAT_BC1_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC1_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC1_UNORM_SRGB: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC2_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC2_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC2_UNORM_SRGB: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC3_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC3_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC3_UNORM_SRGB: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC4_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC4_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC4_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC5_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC5_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC5_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC6H_SF16: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(0, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC6H_TYPELESS: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC6H_UF16: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(0, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC7_TYPELESS: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC7_UNORM: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(0, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC7_UNORM_SRGB: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(0, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_D16_UNORM: { - static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_D24_UNORM_S8_UINT: @@ -1420,397 +825,397 @@ const DXGISupport &GetDXGISupport_10_1(DXGI_FORMAT dxgiFormat) } case DXGI_FORMAT_D32_FLOAT: { - static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_D32_FLOAT_S8X24_UINT: { - static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_G8R8_G8B8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_IA44: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_NV11: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_NV12: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_P010: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_P016: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_P8: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R10G10B10A2_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R10G10B10A2_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R10G10B10A2_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM: { - static const DXGISupport info(0, F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, F_2D | F_3D); + static const DXGISupport info(0, F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, F_2D | F_3D); return info; } case DXGI_FORMAT_R11G11B10_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16B16A16_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16B16A16_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16G16B16A16_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16B16A16_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R16G16B16A16_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16G16B16A16_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16G16_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R16G16_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16G16_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R16_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R1_UNORM: { - static const DXGISupport info(F_2D, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R24G8_TYPELESS: { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R24_UNORM_X8_TYPELESS: { - static const DXGISupport info(F_2D | F_CUBE | F_SAMPLE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_CUBE | F_SAMPLE, F_3D | F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_R32G32B32A32_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R32G32B32A32_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R32G32B32A32_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R32G32B32A32_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R32G32B32_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN, F_MS | F_RT); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS, F_MS | F_RT); return info; } case DXGI_FORMAT_R32G32B32_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_SAMPLE, F_MS | F_RT); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_SAMPLE, F_MS | F_RT); return info; } case DXGI_FORMAT_R32G32B32_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R32G32B32_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_SAMPLE, F_MS | F_RT); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_SAMPLE, F_MS | F_RT); return info; } case DXGI_FORMAT_R32G32_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R32G32_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R32G32_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R32G32_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R32G8X24_TYPELESS: { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R32_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS: { - static const DXGISupport info(F_2D | F_CUBE | F_SAMPLE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_CUBE | F_SAMPLE, F_3D | F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_R32_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R32_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R32_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8G8B8A8_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8G8B8A8_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8G8B8A8_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R8G8B8A8_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8G8B8A8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8G8_B8G8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_R8G8_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8G8_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8G8_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R8G8_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8G8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R8_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R9G9B9E5_SHAREDEXP: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_UNKNOWN: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_X24_TYPELESS_G8_UINT: { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT: { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_Y210: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_Y216: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_Y410: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_Y416: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_YUY2: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } @@ -1818,192 +1223,190 @@ const DXGISupport &GetDXGISupport_10_1(DXGI_FORMAT dxgiFormat) UNREACHABLE(); return GetDefaultSupport(); } - // clang-format on } const DXGISupport &GetDXGISupport_11_0(DXGI_FORMAT dxgiFormat) { - // clang-format off switch (dxgiFormat) { case DXGI_FORMAT_420_OPAQUE: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_A8P8: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_A8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_AI44: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_AYUV: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_B4G4R4A4_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_SAMPLE, F_DS, F_MS | F_RT); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS, F_MS | F_RT); return info; } case DXGI_FORMAT_B5G5R5A1_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_SAMPLE, F_DS, F_MS | F_RT); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS, F_MS | F_RT); return info; } case DXGI_FORMAT_B5G6R5_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_B8G8R8A8_TYPELESS: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, F_2D | F_3D | F_CUBE); + static const DXGISupport info(0, F_DS | F_MS | F_RT | F_SAMPLE, F_2D | F_3D | F_CUBE); return info; } case DXGI_FORMAT_B8G8R8A8_UNORM: { - static const DXGISupport info(F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_2D | F_3D | F_CUBE | F_MS); + static const DXGISupport info(F_RT | F_SAMPLE, F_DS, F_2D | F_3D | F_CUBE | F_MS); return info; } case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB: { - static const DXGISupport info(F_RT | F_SAMPLE, F_DS | F_MIPGEN, F_2D | F_3D | F_CUBE | F_MS); + static const DXGISupport info(F_RT | F_SAMPLE, F_DS, F_2D | F_3D | F_CUBE | F_MS); return info; } case DXGI_FORMAT_B8G8R8X8_TYPELESS: { - static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, F_2D | F_3D | F_CUBE); + static const DXGISupport info(0, F_DS | F_MS | F_RT | F_SAMPLE, F_2D | F_3D | F_CUBE); return info; } case DXGI_FORMAT_B8G8R8X8_UNORM: { - static const DXGISupport info(F_RT | F_SAMPLE, F_DS | F_MIPGEN, F_2D | F_3D | F_CUBE | F_MS); + static const DXGISupport info(F_RT | F_SAMPLE, F_DS, F_2D | F_3D | F_CUBE | F_MS); return info; } case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB: { - static const DXGISupport info(F_RT | F_SAMPLE, F_DS | F_MIPGEN, F_2D | F_3D | F_CUBE | F_MS); + static const DXGISupport info(F_RT | F_SAMPLE, F_DS, F_2D | F_3D | F_CUBE | F_MS); return info; } case DXGI_FORMAT_BC1_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC1_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC1_UNORM_SRGB: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC2_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC2_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC2_UNORM_SRGB: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC3_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC3_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC3_UNORM_SRGB: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC4_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC4_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC4_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC5_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC5_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC5_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC6H_SF16: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC6H_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC6H_UF16: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC7_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_BC7_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_BC7_UNORM_SRGB: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_D16_UNORM: { - static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_D24_UNORM_S8_UINT: @@ -2013,397 +1416,397 @@ const DXGISupport &GetDXGISupport_11_0(DXGI_FORMAT dxgiFormat) } case DXGI_FORMAT_D32_FLOAT: { - static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_D32_FLOAT_S8X24_UINT: { - static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_CUBE | F_DS, F_3D | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_G8R8_G8B8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_IA44: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_NV11: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_NV12: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_P010: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_P016: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_RT | F_SAMPLE, F_MS); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_RT | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_P8: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R10G10B10A2_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R10G10B10A2_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R10G10B10A2_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM: { - static const DXGISupport info(0, F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, F_2D | F_3D); + static const DXGISupport info(0, F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, F_2D | F_3D); return info; } case DXGI_FORMAT_R11G11B10_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16B16A16_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16B16A16_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16G16B16A16_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16B16A16_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R16G16B16A16_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16G16B16A16_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16G16_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16G16_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R16G16_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16G16_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R16_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R16_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R16_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R1_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R24G8_TYPELESS: { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R24_UNORM_X8_TYPELESS: { - static const DXGISupport info(F_2D | F_CUBE | F_SAMPLE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_CUBE | F_SAMPLE, F_3D | F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_R32G32B32A32_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R32G32B32A32_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R32G32B32A32_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R32G32B32A32_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R32G32B32_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN, F_MS | F_RT); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS, F_MS | F_RT); return info; } case DXGI_FORMAT_R32G32B32_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_SAMPLE, F_MS | F_RT); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_SAMPLE, F_MS | F_RT); return info; } case DXGI_FORMAT_R32G32B32_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R32G32B32_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_SAMPLE, F_MS | F_RT); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_SAMPLE, F_MS | F_RT); return info; } case DXGI_FORMAT_R32G32_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R32G32_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R32G32_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R32G32_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R32G8X24_TYPELESS: { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R32_FLOAT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS: { - static const DXGISupport info(F_2D | F_CUBE | F_SAMPLE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_CUBE | F_SAMPLE, F_3D | F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_R32_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R32_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R32_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8G8B8A8_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8G8B8A8_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8G8B8A8_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R8G8B8A8_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8G8B8A8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8G8_B8G8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_R8G8_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8G8_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8G8_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R8G8_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8G8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8_SINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8_SNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R8_TYPELESS: { - static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_R8_UINT: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_MIPGEN | F_SAMPLE, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT, F_DS | F_SAMPLE, F_MS); return info; } case DXGI_FORMAT_R8_UNORM: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_MIPGEN | F_RT | F_SAMPLE, F_DS, F_MS); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_RT | F_SAMPLE, F_DS, F_MS); return info; } case DXGI_FORMAT_R9G9B9E5_SHAREDEXP: { - static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MIPGEN | F_MS | F_RT, 0); + static const DXGISupport info(F_2D | F_3D | F_CUBE | F_SAMPLE, F_DS | F_MS | F_RT, 0); return info; } case DXGI_FORMAT_UNKNOWN: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_X24_TYPELESS_G8_UINT: { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT: { - static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(F_2D | F_CUBE, F_3D | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_Y210: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_Y216: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_Y410: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_Y416: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } case DXGI_FORMAT_YUY2: { - static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0); + static const DXGISupport info(0, F_2D | F_3D | F_CUBE | F_DS | F_MS | F_RT | F_SAMPLE, 0); return info; } @@ -2411,7 +1814,6 @@ const DXGISupport &GetDXGISupport_11_0(DXGI_FORMAT dxgiFormat) UNREACHABLE(); return GetDefaultSupport(); } - // clang-format on } } @@ -2423,14 +1825,11 @@ const DXGISupport &GetDXGISupport_11_0(DXGI_FORMAT dxgiFormat) #undef F_RT #undef F_MS #undef F_DS -#undef F_MIPGEN const DXGISupport &GetDXGISupport(DXGI_FORMAT dxgiFormat, D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_9_3: - return GetDXGISupport_9_3(dxgiFormat); case D3D_FEATURE_LEVEL_10_0: return GetDXGISupport_10_0(dxgiFormat); case D3D_FEATURE_LEVEL_10_1: diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/formatutils11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/formatutils11.cpp index 695ad468d..c4b3f3202 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/formatutils11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/formatutils11.cpp @@ -15,7 +15,6 @@ #include "libANGLE/formatutils.h" #include "libANGLE/renderer/d3d/d3d11/copyvertex.h" -#include "libANGLE/renderer/d3d/d3d11/dxgi_support_table.h" #include "libANGLE/renderer/d3d/d3d11/renderer11_utils.h" #include "libANGLE/renderer/d3d/d3d11/Renderer11.h" @@ -25,11 +24,329 @@ namespace rx namespace d3d11 { -bool SupportsMipGen(DXGI_FORMAT dxgiFormat, D3D_FEATURE_LEVEL featureLevel) +struct DXGIColorFormatInfo { - const auto &support = GetDXGISupport(dxgiFormat, featureLevel); - ASSERT((support.optionallySupportedFlags & D3D11_FORMAT_SUPPORT_MIP_AUTOGEN) == 0); - return ((support.alwaysSupportedFlags & D3D11_FORMAT_SUPPORT_MIP_AUTOGEN) != 0); + size_t redBits; + size_t greenBits; + size_t blueBits; + + size_t luminanceBits; + + size_t alphaBits; + size_t sharedBits; +}; + +typedef std::map ColorFormatInfoMap; +typedef std::pair ColorFormatInfoPair; + +static inline void InsertDXGIColorFormatInfo(ColorFormatInfoMap *map, DXGI_FORMAT format, size_t redBits, size_t greenBits, + size_t blueBits, size_t alphaBits, size_t sharedBits) +{ + DXGIColorFormatInfo info; + info.redBits = redBits; + info.greenBits = greenBits; + info.blueBits = blueBits; + info.alphaBits = alphaBits; + info.sharedBits = sharedBits; + + map->insert(std::make_pair(format, info)); +} + +static ColorFormatInfoMap BuildColorFormatInfoMap() +{ + ColorFormatInfoMap map; + + // clang-format off + // | DXGI format | R | G | B | A | S | + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_A8_UNORM, 0, 0, 0, 8, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8_UNORM, 8, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8G8_UNORM, 8, 8, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8G8B8A8_UNORM, 8, 8, 8, 8, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, 8, 8, 8, 8, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_B8G8R8A8_UNORM, 8, 8, 8, 8, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16_UNORM, 16, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16G16_UNORM, 16, 16, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16G16B16A16_UNORM, 16, 16, 16, 16, 0); + + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8_SNORM, 8, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8G8_SNORM, 8, 8, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8G8B8A8_SNORM, 8, 8, 8, 8, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16_SNORM, 16, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16G16_SNORM, 16, 16, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16G16B16A16_SNORM, 16, 16, 16, 16, 0); + + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8_UINT, 8, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16_UINT, 16, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32_UINT, 32, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8G8_UINT, 8, 8, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16G16_UINT, 16, 16, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32G32_UINT, 32, 32, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32G32B32_UINT, 32, 32, 32, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8G8B8A8_UINT, 8, 8, 8, 8, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16G16B16A16_UINT, 16, 16, 16, 16, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32G32B32A32_UINT, 32, 32, 32, 32, 0); + + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8_SINT, 8, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16_SINT, 16, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32_SINT, 32, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8G8_SINT, 8, 8, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16G16_SINT, 16, 16, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32G32_SINT, 32, 32, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32G32B32_SINT, 32, 32, 32, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8G8B8A8_SINT, 8, 8, 8, 8, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16G16B16A16_SINT, 16, 16, 16, 16, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32G32B32A32_SINT, 32, 32, 32, 32, 0); + + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R10G10B10A2_TYPELESS, 10, 10, 10, 2, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R10G10B10A2_UNORM, 10, 10, 10, 2, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R10G10B10A2_UINT, 10, 10, 10, 2, 0); + + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16_FLOAT, 16, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16G16_FLOAT, 16, 16, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16G16B16A16_FLOAT, 16, 16, 16, 16, 0); + + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32_FLOAT, 32, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32G32_FLOAT, 32, 32, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32G32B32_FLOAT, 32, 32, 32, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32G32B32A32_FLOAT, 32, 32, 32, 32, 0); + + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R9G9B9E5_SHAREDEXP, 9, 9, 9, 0, 5); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R11G11B10_FLOAT, 11, 11, 10, 0, 0); + + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_B5G6R5_UNORM, 5, 6, 5, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_B4G4R4A4_UNORM, 4, 4, 4, 4, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_B5G5R5A1_UNORM, 5, 5, 5, 1, 0); + + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8_TYPELESS, 8, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16_TYPELESS, 16, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32_TYPELESS, 32, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8G8_TYPELESS, 8, 8, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16G16_TYPELESS, 16, 16, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32G32_TYPELESS, 32, 32, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32G32B32_TYPELESS, 32, 32, 32, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R8G8B8A8_TYPELESS, 8, 8, 8, 8, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R16G16B16A16_TYPELESS, 16, 16, 16, 16, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32G32B32A32_TYPELESS, 32, 32, 32, 32, 0); + + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R24G8_TYPELESS, 24, 8, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R24_UNORM_X8_TYPELESS, 24, 0, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32G8X24_TYPELESS, 32, 8, 0, 0, 0); + InsertDXGIColorFormatInfo(&map, DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS, 32, 0, 0, 0, 0); + // clang-format on + + return map; +} + +struct DXGIDepthStencilInfo +{ + unsigned int depthBits; + unsigned int stencilBits; +}; + +typedef std::map DepthStencilInfoMap; +typedef std::pair DepthStencilInfoPair; + +static inline void InsertDXGIDepthStencilInfo(DepthStencilInfoMap *map, + DXGI_FORMAT format, + unsigned int depthBits, + unsigned int stencilBits) +{ + DXGIDepthStencilInfo info; + info.depthBits = depthBits; + info.stencilBits = stencilBits; + + map->insert(std::make_pair(format, info)); +} + +static DepthStencilInfoMap BuildDepthStencilInfoMap() +{ + DepthStencilInfoMap map; + + // clang-format off + InsertDXGIDepthStencilInfo(&map, DXGI_FORMAT_D16_UNORM, 16, 0); + InsertDXGIDepthStencilInfo(&map, DXGI_FORMAT_D24_UNORM_S8_UINT, 24, 8); + InsertDXGIDepthStencilInfo(&map, DXGI_FORMAT_D32_FLOAT, 32, 0); + InsertDXGIDepthStencilInfo(&map, DXGI_FORMAT_D32_FLOAT_S8X24_UINT, 32, 8); + // clang-format on + + return map; +} + +typedef std::map DXGIFormatInfoMap; + +DXGIFormat::DXGIFormat() + : redBits(0), + greenBits(0), + blueBits(0), + alphaBits(0), + sharedBits(0), + depthBits(0), + stencilBits(0), + componentType(GL_NONE), + nativeMipmapSupport(NULL) +{ +} + +static bool NeverSupported(D3D_FEATURE_LEVEL) +{ + return false; +} + +template +static bool RequiresFeatureLevel(D3D_FEATURE_LEVEL featureLevel) +{ + return featureLevel >= requiredFeatureLevel; +} + +void AddDXGIFormat(DXGIFormatInfoMap *map, + DXGI_FORMAT dxgiFormat, + GLenum componentType, + NativeMipmapGenerationSupportFunction nativeMipmapSupport) +{ + DXGIFormat info; + + static const ColorFormatInfoMap colorInfoMap = BuildColorFormatInfoMap(); + ColorFormatInfoMap::const_iterator colorInfoIter = colorInfoMap.find(dxgiFormat); + if (colorInfoIter != colorInfoMap.end()) + { + const DXGIColorFormatInfo &colorInfo = colorInfoIter->second; + info.redBits = static_cast(colorInfo.redBits); + info.greenBits = static_cast(colorInfo.greenBits); + info.blueBits = static_cast(colorInfo.blueBits); + info.alphaBits = static_cast(colorInfo.alphaBits); + info.sharedBits = static_cast(colorInfo.sharedBits); + } + + static const DepthStencilInfoMap dsInfoMap = BuildDepthStencilInfoMap(); + DepthStencilInfoMap::const_iterator dsInfoIter = dsInfoMap.find(dxgiFormat); + if (dsInfoIter != dsInfoMap.end()) + { + const DXGIDepthStencilInfo &dsInfo = dsInfoIter->second; + info.depthBits = dsInfo.depthBits; + info.stencilBits = dsInfo.stencilBits; + } + + info.componentType = componentType; + info.nativeMipmapSupport = nativeMipmapSupport; + + map->insert(std::make_pair(dxgiFormat, info)); +} + +// A map to determine the color read function and mipmap generation function of a given DXGI format +static DXGIFormatInfoMap BuildDXGIFormatInfoMap() +{ + DXGIFormatInfoMap map; + + // clang-format off + // | DXGI format | Component Type | Color read function | Native mipmap function + AddDXGIFormat(&map, DXGI_FORMAT_UNKNOWN, GL_NONE, NeverSupported); + + AddDXGIFormat(&map, DXGI_FORMAT_A8_UNORM, GL_UNSIGNED_NORMALIZED, RequiresFeatureLevel); + AddDXGIFormat(&map, DXGI_FORMAT_R8_UNORM, GL_UNSIGNED_NORMALIZED, RequiresFeatureLevel); + AddDXGIFormat(&map, DXGI_FORMAT_R16_UNORM, GL_UNSIGNED_NORMALIZED, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R8G8_UNORM, GL_UNSIGNED_NORMALIZED, RequiresFeatureLevel); + AddDXGIFormat(&map, DXGI_FORMAT_R16G16_UNORM, GL_UNSIGNED_NORMALIZED, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R8G8B8A8_UNORM, GL_UNSIGNED_NORMALIZED, RequiresFeatureLevel); + AddDXGIFormat(&map, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, GL_UNSIGNED_NORMALIZED, RequiresFeatureLevel); + AddDXGIFormat(&map, DXGI_FORMAT_B8G8R8A8_UNORM, GL_UNSIGNED_NORMALIZED, RequiresFeatureLevel); + AddDXGIFormat(&map, DXGI_FORMAT_R16G16B16A16_UNORM, GL_UNSIGNED_NORMALIZED, NeverSupported); + + AddDXGIFormat(&map, DXGI_FORMAT_R8_SNORM, GL_SIGNED_NORMALIZED, RequiresFeatureLevel); + AddDXGIFormat(&map, DXGI_FORMAT_R16_SNORM, GL_SIGNED_NORMALIZED, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R8G8_SNORM, GL_SIGNED_NORMALIZED, RequiresFeatureLevel); + AddDXGIFormat(&map, DXGI_FORMAT_R16G16_SNORM, GL_SIGNED_NORMALIZED, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R8G8B8A8_SNORM, GL_SIGNED_NORMALIZED, RequiresFeatureLevel); + AddDXGIFormat(&map, DXGI_FORMAT_R16G16B16A16_SNORM, GL_SIGNED_NORMALIZED, NeverSupported); + + AddDXGIFormat(&map, DXGI_FORMAT_R8_UINT, GL_UNSIGNED_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R16_UINT, GL_UNSIGNED_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32_UINT, GL_UNSIGNED_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R8G8_UINT, GL_UNSIGNED_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R16G16_UINT, GL_UNSIGNED_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32G32_UINT, GL_UNSIGNED_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32G32B32_UINT, GL_UNSIGNED_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R8G8B8A8_UINT, GL_UNSIGNED_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R16G16B16A16_UINT, GL_UNSIGNED_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32G32B32A32_UINT, GL_UNSIGNED_INT, NeverSupported); + + AddDXGIFormat(&map, DXGI_FORMAT_R8_SINT, GL_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R16_SINT, GL_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32_SINT, GL_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R8G8_SINT, GL_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R16G16_SINT, GL_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32G32_SINT, GL_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32G32B32_SINT, GL_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R8G8B8A8_SINT, GL_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R16G16B16A16_SINT, GL_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32G32B32A32_SINT, GL_INT, NeverSupported); + + AddDXGIFormat(&map, DXGI_FORMAT_R10G10B10A2_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R10G10B10A2_UNORM, GL_UNSIGNED_NORMALIZED, RequiresFeatureLevel); + AddDXGIFormat(&map, DXGI_FORMAT_R10G10B10A2_UINT, GL_UNSIGNED_INT, NeverSupported); + + AddDXGIFormat(&map, DXGI_FORMAT_R16_FLOAT, GL_FLOAT, RequiresFeatureLevel); + AddDXGIFormat(&map, DXGI_FORMAT_R16G16_FLOAT, GL_FLOAT, RequiresFeatureLevel); + AddDXGIFormat(&map, DXGI_FORMAT_R16G16B16A16_FLOAT, GL_FLOAT, RequiresFeatureLevel); + + AddDXGIFormat(&map, DXGI_FORMAT_R32_FLOAT, GL_FLOAT, RequiresFeatureLevel); + AddDXGIFormat(&map, DXGI_FORMAT_R32G32_FLOAT, GL_FLOAT, RequiresFeatureLevel); + AddDXGIFormat(&map, DXGI_FORMAT_R32G32B32_FLOAT, GL_FLOAT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32G32B32A32_FLOAT, GL_FLOAT, RequiresFeatureLevel); + + AddDXGIFormat(&map, DXGI_FORMAT_R9G9B9E5_SHAREDEXP, GL_FLOAT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R11G11B10_FLOAT, GL_FLOAT, RequiresFeatureLevel); + + AddDXGIFormat(&map, DXGI_FORMAT_R8_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R16_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R8G8_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R16G16_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32G32_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R8G8_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R16G16_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32G32_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32G32B32_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R8G8B8A8_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R16G16B16A16_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32G32B32A32_TYPELESS, GL_NONE, NeverSupported); + + AddDXGIFormat(&map, DXGI_FORMAT_R24G8_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R24_UNORM_X8_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32G8X24_TYPELESS, GL_NONE, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS, GL_NONE, NeverSupported); + + AddDXGIFormat(&map, DXGI_FORMAT_D16_UNORM, GL_UNSIGNED_NORMALIZED, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_D24_UNORM_S8_UINT, GL_UNSIGNED_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_D32_FLOAT_S8X24_UINT, GL_UNSIGNED_INT, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_D32_FLOAT, GL_FLOAT, NeverSupported); + + AddDXGIFormat(&map, DXGI_FORMAT_BC1_UNORM, GL_UNSIGNED_NORMALIZED, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_BC2_UNORM, GL_UNSIGNED_NORMALIZED, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_BC3_UNORM, GL_UNSIGNED_NORMALIZED, NeverSupported); + + // B5G6R5 in D3D11 is treated the same as R5G6B5 in D3D9, so reuse the R5G6B5 functions used by the D3D9 renderer. + // The same applies to B4G4R4A4 and B5G5R5A1 with A4R4G4B4 and A1R5G5B5 respectively. + AddDXGIFormat(&map, DXGI_FORMAT_B5G6R5_UNORM, GL_UNSIGNED_NORMALIZED, RequiresFeatureLevel); + AddDXGIFormat(&map, DXGI_FORMAT_B4G4R4A4_UNORM, GL_UNSIGNED_NORMALIZED, NeverSupported); + AddDXGIFormat(&map, DXGI_FORMAT_B5G5R5A1_UNORM, GL_UNSIGNED_NORMALIZED, NeverSupported); + // clang-format on + + return map; +} + +const DXGIFormat &GetDXGIFormatInfo(DXGI_FORMAT format) +{ + static const DXGIFormatInfoMap infoMap = BuildDXGIFormatInfoMap(); + DXGIFormatInfoMap::const_iterator iter = infoMap.find(format); + if (iter != infoMap.end()) + { + return iter->second; + } + else + { + static DXGIFormat defaultInfo; + return defaultInfo; + } } DXGIFormatSize::DXGIFormatSize(GLuint pixelBits, GLuint blockWidth, GLuint blockHeight) @@ -199,214 +516,117 @@ const DXGIFormatSize &GetDXGIFormatSizeInfo(DXGI_FORMAT format) } } -constexpr VertexFormat::VertexFormat() - : conversionType(VERTEX_CONVERT_NONE), nativeFormat(DXGI_FORMAT_UNKNOWN), copyFunction(NULL) +typedef std::map D3D11VertexFormatInfoMap; +typedef std::pair D3D11VertexFormatPair; + +VertexFormat::VertexFormat() + : conversionType(VERTEX_CONVERT_NONE), + nativeFormat(DXGI_FORMAT_UNKNOWN), + copyFunction(NULL) +{ +} + +VertexFormat::VertexFormat(VertexConversionType conversionTypeIn, + DXGI_FORMAT nativeFormatIn, + VertexCopyFunction copyFunctionIn) + : conversionType(conversionTypeIn), + nativeFormat(nativeFormatIn), + copyFunction(copyFunctionIn) { } -constexpr VertexFormat::VertexFormat(VertexConversionType conversionTypeIn, - DXGI_FORMAT nativeFormatIn, - VertexCopyFunction copyFunctionIn) - : conversionType(conversionTypeIn), nativeFormat(nativeFormatIn), copyFunction(copyFunctionIn) +static void AddVertexFormatInfo(D3D11VertexFormatInfoMap *map, + GLenum inputType, + GLboolean normalized, + GLuint componentCount, + VertexConversionType conversionType, + DXGI_FORMAT nativeFormat, + VertexCopyFunction copyFunction) { + gl::VertexFormatType formatType = gl::GetVertexFormatType(inputType, normalized, componentCount, false); + + VertexFormat info; + info.conversionType = conversionType; + info.nativeFormat = nativeFormat; + info.copyFunction = copyFunction; + + map->insert(D3D11VertexFormatPair(formatType, info)); } -const VertexFormat *GetVertexFormatInfo_FL_9_3(gl::VertexFormatType vertexFormatType) +static D3D11VertexFormatInfoMap BuildD3D11_FL9_3VertexFormatInfoOverrideMap() { - // D3D11 Feature Level 9_3 doesn't support as many formats for vertex buffer resource as Feature - // Level 10_0+. + // D3D11 Feature Level 9_3 doesn't support as many formats for vertex buffer resource as Feature Level 10_0+. // http://msdn.microsoft.com/en-us/library/windows/desktop/ff471324(v=vs.85).aspx - switch (vertexFormatType) - { - // GL_BYTE -- unnormalized - case gl::VERTEX_FORMAT_SBYTE1: - { - static constexpr VertexFormat info(VERTEX_CONVERT_BOTH, DXGI_FORMAT_R16G16_SINT, - &Copy8SintTo16SintVertexData<1, 2>); - return &info; - } - case gl::VERTEX_FORMAT_SBYTE2: - { - static constexpr VertexFormat info(VERTEX_CONVERT_BOTH, DXGI_FORMAT_R16G16_SINT, - &Copy8SintTo16SintVertexData<2, 2>); - return &info; - } - case gl::VERTEX_FORMAT_SBYTE3: - { - static constexpr VertexFormat info(VERTEX_CONVERT_BOTH, DXGI_FORMAT_R16G16B16A16_SINT, - &Copy8SintTo16SintVertexData<3, 4>); - return &info; - } - case gl::VERTEX_FORMAT_SBYTE4: - { - static constexpr VertexFormat info(VERTEX_CONVERT_BOTH, DXGI_FORMAT_R16G16B16A16_SINT, - &Copy8SintTo16SintVertexData<4, 4>); - return &info; - } + D3D11VertexFormatInfoMap map; - // GL_BYTE -- normalized - case gl::VERTEX_FORMAT_SBYTE1_NORM: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16_SNORM, - &Copy8SnormTo16SnormVertexData<1, 2>); - return &info; - } - case gl::VERTEX_FORMAT_SBYTE2_NORM: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16_SNORM, - &Copy8SnormTo16SnormVertexData<2, 2>); - return &info; - } - case gl::VERTEX_FORMAT_SBYTE3_NORM: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_SNORM, - &Copy8SnormTo16SnormVertexData<3, 4>); - return &info; - } - case gl::VERTEX_FORMAT_SBYTE4_NORM: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_SNORM, - &Copy8SnormTo16SnormVertexData<4, 4>); - return &info; - } + // GL_BYTE -- unnormalized + AddVertexFormatInfo(&map, GL_BYTE, GL_FALSE, 1, VERTEX_CONVERT_BOTH, DXGI_FORMAT_R16G16_SINT, &Copy8SintTo16SintVertexData<1, 2>); + AddVertexFormatInfo(&map, GL_BYTE, GL_FALSE, 2, VERTEX_CONVERT_BOTH, DXGI_FORMAT_R16G16_SINT, &Copy8SintTo16SintVertexData<2, 2>); + AddVertexFormatInfo(&map, GL_BYTE, GL_FALSE, 3, VERTEX_CONVERT_BOTH, DXGI_FORMAT_R16G16B16A16_SINT, &Copy8SintTo16SintVertexData<3, 4>); + AddVertexFormatInfo(&map, GL_BYTE, GL_FALSE, 4, VERTEX_CONVERT_BOTH, DXGI_FORMAT_R16G16B16A16_SINT, &Copy8SintTo16SintVertexData<4, 4>); - // GL_UNSIGNED_BYTE -- un-normalized - // NOTE: 3 and 4 component unnormalized GL_UNSIGNED_BYTE should use the default format - // table. - case gl::VERTEX_FORMAT_UBYTE1: - { - static constexpr VertexFormat info(VERTEX_CONVERT_BOTH, DXGI_FORMAT_R8G8B8A8_UINT, - &CopyNativeVertexData); - return &info; - } - case gl::VERTEX_FORMAT_UBYTE2: - { - static constexpr VertexFormat info(VERTEX_CONVERT_BOTH, DXGI_FORMAT_R8G8B8A8_UINT, - &CopyNativeVertexData); - return &info; - } + // GL_BYTE -- normalized + AddVertexFormatInfo(&map, GL_BYTE, GL_TRUE, 1, VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16_SNORM, &Copy8SnormTo16SnormVertexData<1, 2>); + AddVertexFormatInfo(&map, GL_BYTE, GL_TRUE, 2, VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16_SNORM, &Copy8SnormTo16SnormVertexData<2, 2>); + AddVertexFormatInfo(&map, GL_BYTE, GL_TRUE, 3, VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_SNORM, &Copy8SnormTo16SnormVertexData<3, 4>); + AddVertexFormatInfo(&map, GL_BYTE, GL_TRUE, 4, VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_SNORM, &Copy8SnormTo16SnormVertexData<4, 4>); - // GL_UNSIGNED_BYTE -- normalized - // NOTE: 3 and 4 component normalized GL_UNSIGNED_BYTE should use the default format table. + // GL_UNSIGNED_BYTE -- unnormalized + AddVertexFormatInfo(&map, GL_UNSIGNED_BYTE, GL_FALSE, 1, VERTEX_CONVERT_BOTH, DXGI_FORMAT_R8G8B8A8_UINT, &CopyNativeVertexData); + AddVertexFormatInfo(&map, GL_UNSIGNED_BYTE, GL_FALSE, 2, VERTEX_CONVERT_BOTH, DXGI_FORMAT_R8G8B8A8_UINT, &CopyNativeVertexData); + // NOTE: 3 and 4 component unnormalized GL_UNSIGNED_BYTE should use the default format table. - // GL_UNSIGNED_BYTE -- normalized - case gl::VERTEX_FORMAT_UBYTE1_NORM: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R8G8B8A8_UNORM, - &CopyNativeVertexData); - return &info; - } - case gl::VERTEX_FORMAT_UBYTE2_NORM: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R8G8B8A8_UNORM, - &CopyNativeVertexData); - return &info; - } + // GL_UNSIGNED_BYTE -- normalized + AddVertexFormatInfo(&map, GL_UNSIGNED_BYTE, GL_TRUE, 1, VERTEX_CONVERT_CPU, DXGI_FORMAT_R8G8B8A8_UNORM, &CopyNativeVertexData); + AddVertexFormatInfo(&map, GL_UNSIGNED_BYTE, GL_TRUE, 2, VERTEX_CONVERT_CPU, DXGI_FORMAT_R8G8B8A8_UNORM, &CopyNativeVertexData); + // NOTE: 3 and 4 component normalized GL_UNSIGNED_BYTE should use the default format table. - // GL_SHORT -- un-normalized - // NOTE: 2, 3 and 4 component unnormalized GL_SHORT should use the default format table. - case gl::VERTEX_FORMAT_SSHORT1: - { - static constexpr VertexFormat info(VERTEX_CONVERT_BOTH, DXGI_FORMAT_R16G16_SINT, - &CopyNativeVertexData); - return &info; - } + // GL_SHORT -- unnormalized + AddVertexFormatInfo(&map, GL_SHORT, GL_FALSE, 1, VERTEX_CONVERT_BOTH, DXGI_FORMAT_R16G16_SINT, &CopyNativeVertexData); + // NOTE: 2, 3 and 4 component unnormalized GL_SHORT should use the default format table. - // GL_SHORT -- normalized - // NOTE: 2, 3 and 4 component normalized GL_SHORT should use the default format table. - case gl::VERTEX_FORMAT_SSHORT1_NORM: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16_SNORM, - &CopyNativeVertexData); - return &info; - } + // GL_SHORT -- normalized + AddVertexFormatInfo(&map, GL_SHORT, GL_TRUE, 1, VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16_SNORM, &CopyNativeVertexData); + // NOTE: 2, 3 and 4 component normalized GL_SHORT should use the default format table. - // GL_UNSIGNED_SHORT -- un-normalized - case gl::VERTEX_FORMAT_USHORT1: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, - &CopyTo32FVertexData); - return &info; - } - case gl::VERTEX_FORMAT_USHORT2: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, - &CopyTo32FVertexData); - return &info; - } - case gl::VERTEX_FORMAT_USHORT3: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32_FLOAT, - &CopyTo32FVertexData); - return &info; - } - case gl::VERTEX_FORMAT_USHORT4: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, - &CopyTo32FVertexData); - return &info; - } + // GL_UNSIGNED_SHORT -- unnormalized + AddVertexFormatInfo(&map, GL_UNSIGNED_SHORT, GL_FALSE, 1, VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, &CopyTo32FVertexData); + AddVertexFormatInfo(&map, GL_UNSIGNED_SHORT, GL_FALSE, 2, VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, &CopyTo32FVertexData); + AddVertexFormatInfo(&map, GL_UNSIGNED_SHORT, GL_FALSE, 3, VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32_FLOAT, &CopyTo32FVertexData); + AddVertexFormatInfo(&map, GL_UNSIGNED_SHORT, GL_FALSE, 4, VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, &CopyTo32FVertexData); - // GL_UNSIGNED_SHORT -- normalized - case gl::VERTEX_FORMAT_USHORT1_NORM: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, - &CopyTo32FVertexData); - return &info; - } - case gl::VERTEX_FORMAT_USHORT2_NORM: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, - &CopyTo32FVertexData); - return &info; - } - case gl::VERTEX_FORMAT_USHORT3_NORM: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32_FLOAT, - &CopyTo32FVertexData); - return &info; - } - case gl::VERTEX_FORMAT_USHORT4_NORM: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, - &CopyTo32FVertexData); - return &info; - } + // GL_UNSIGNED_SHORT -- normalized + AddVertexFormatInfo(&map, GL_UNSIGNED_SHORT, GL_TRUE, 1, VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, &CopyTo32FVertexData); + AddVertexFormatInfo(&map, GL_UNSIGNED_SHORT, GL_TRUE, 2, VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, &CopyTo32FVertexData); + AddVertexFormatInfo(&map, GL_UNSIGNED_SHORT, GL_TRUE, 3, VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32_FLOAT, &CopyTo32FVertexData); + AddVertexFormatInfo(&map, GL_UNSIGNED_SHORT, GL_TRUE, 4, VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, &CopyTo32FVertexData); - // GL_FIXED - // TODO: Add test to verify that this works correctly. - // NOTE: 2, 3 and 4 component GL_FIXED should use the default format table. - case gl::VERTEX_FORMAT_FIXED1: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, - &Copy32FixedTo32FVertexData<1, 2>); - return &info; - } + // GL_FIXED + // TODO: Add test to verify that this works correctly. + AddVertexFormatInfo(&map, GL_FIXED, GL_FALSE, 1, VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, &Copy32FixedTo32FVertexData<1, 2>); + // NOTE: 2, 3 and 4 component GL_FIXED should use the default format table. - // GL_FLOAT - // TODO: Add test to verify that this works correctly. - // NOTE: 2, 3 and 4 component GL_FLOAT should use the default format table. - case gl::VERTEX_FORMAT_FLOAT1: - { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, - &CopyNativeVertexData); - return &info; - } + // GL_FLOAT + // TODO: Add test to verify that this works correctly. + AddVertexFormatInfo(&map, GL_FLOAT, GL_FALSE, 1, VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, &CopyNativeVertexData); + // NOTE: 2, 3 and 4 component GL_FLOAT should use the default format table. - default: - return nullptr; - } + return map; } const VertexFormat &GetVertexFormatInfo(gl::VertexFormatType vertexFormatType, D3D_FEATURE_LEVEL featureLevel) { if (featureLevel == D3D_FEATURE_LEVEL_9_3) { - const VertexFormat *result = GetVertexFormatInfo_FL_9_3(vertexFormatType); - if (result) + static const D3D11VertexFormatInfoMap vertexFormatMapFL9_3Override = + BuildD3D11_FL9_3VertexFormatInfoOverrideMap(); + + // First see if the format has a special mapping for FL9_3 + auto iter = vertexFormatMapFL9_3Override.find(vertexFormatType); + if (iter != vertexFormatMapFL9_3Override.end()) { - return *result; + return iter->second; } } @@ -419,418 +639,357 @@ const VertexFormat &GetVertexFormatInfo(gl::VertexFormatType vertexFormatType, D // GL_BYTE -- un-normalized case gl::VERTEX_FORMAT_SBYTE1: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R8_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R8_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SBYTE2: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R8G8_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R8G8_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SBYTE3: { - static constexpr VertexFormat info(VERTEX_CONVERT_BOTH, DXGI_FORMAT_R8G8B8A8_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_BOTH, DXGI_FORMAT_R8G8B8A8_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SBYTE4: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R8G8B8A8_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R8G8B8A8_SINT, &CopyNativeVertexData); return info; } // GL_BYTE -- normalized case gl::VERTEX_FORMAT_SBYTE1_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8_SNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8_SNORM, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SBYTE2_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8_SNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8_SNORM, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SBYTE3_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R8G8B8A8_SNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R8G8B8A8_SNORM, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SBYTE4_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8B8A8_SNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8B8A8_SNORM, &CopyNativeVertexData); return info; } // GL_UNSIGNED_BYTE -- un-normalized case gl::VERTEX_FORMAT_UBYTE1: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R8_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R8_UINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_UBYTE2: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R8G8_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R8G8_UINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_UBYTE3: { - static constexpr VertexFormat info(VERTEX_CONVERT_BOTH, DXGI_FORMAT_R8G8B8A8_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_BOTH, DXGI_FORMAT_R8G8B8A8_UINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_UBYTE4: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R8G8B8A8_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R8G8B8A8_UINT, &CopyNativeVertexData); return info; } // GL_UNSIGNED_BYTE -- normalized case gl::VERTEX_FORMAT_UBYTE1_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8_UNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8_UNORM, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_UBYTE2_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8_UNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8_UNORM, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_UBYTE3_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R8G8B8A8_UNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R8G8B8A8_UNORM, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_UBYTE4_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8B8A8_UNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8B8A8_UNORM, &CopyNativeVertexData); return info; } // GL_SHORT -- un-normalized case gl::VERTEX_FORMAT_SSHORT1: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R16_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R16_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SSHORT2: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R16G16_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R16G16_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SSHORT3: { - static constexpr VertexFormat info(VERTEX_CONVERT_BOTH, DXGI_FORMAT_R16G16B16A16_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_BOTH, DXGI_FORMAT_R16G16B16A16_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SSHORT4: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R16G16B16A16_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R16G16B16A16_SINT, &CopyNativeVertexData); return info; } // GL_SHORT -- normalized case gl::VERTEX_FORMAT_SSHORT1_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16_SNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16_SNORM, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SSHORT2_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16_SNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16_SNORM, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SSHORT3_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_SNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_SNORM, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SSHORT4_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16B16A16_SNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16B16A16_SNORM, &CopyNativeVertexData); return info; } // GL_UNSIGNED_SHORT -- un-normalized case gl::VERTEX_FORMAT_USHORT1: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R16_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R16_UINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_USHORT2: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R16G16_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R16G16_UINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_USHORT3: { - static constexpr VertexFormat info(VERTEX_CONVERT_BOTH, DXGI_FORMAT_R16G16B16A16_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_BOTH, DXGI_FORMAT_R16G16B16A16_UINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_USHORT4: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R16G16B16A16_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R16G16B16A16_UINT, &CopyNativeVertexData); return info; } // GL_UNSIGNED_SHORT -- normalized case gl::VERTEX_FORMAT_USHORT1_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16_UNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16_UNORM, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_USHORT2_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16_UNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16_UNORM, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_USHORT3_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_UNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_UNORM, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_USHORT4_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16B16A16_UNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16B16A16_UNORM, &CopyNativeVertexData); return info; } // GL_INT -- un-normalized case gl::VERTEX_FORMAT_SINT1: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SINT2: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32G32_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32G32_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SINT3: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32G32B32_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32G32B32_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SINT4: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32G32B32A32_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32G32B32A32_SINT, &CopyNativeVertexData); return info; } // GL_INT -- normalized case gl::VERTEX_FORMAT_SINT1_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32_FLOAT, - &CopyTo32FVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32_FLOAT, &CopyTo32FVertexData); return info; } case gl::VERTEX_FORMAT_SINT2_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, - &CopyTo32FVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, &CopyTo32FVertexData); return info; } case gl::VERTEX_FORMAT_SINT3_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32_FLOAT, - &CopyTo32FVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32_FLOAT, &CopyTo32FVertexData); return info; } case gl::VERTEX_FORMAT_SINT4_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, - &CopyTo32FVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, &CopyTo32FVertexData); return info; } // GL_UNSIGNED_INT -- un-normalized case gl::VERTEX_FORMAT_UINT1: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32_UINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_UINT2: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32G32_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32G32_UINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_UINT3: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32G32B32_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32G32B32_UINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_UINT4: { - static constexpr VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32G32B32A32_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_GPU, DXGI_FORMAT_R32G32B32A32_UINT, &CopyNativeVertexData); return info; } // GL_UNSIGNED_INT -- normalized case gl::VERTEX_FORMAT_UINT1_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32_FLOAT, - &CopyTo32FVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32_FLOAT, + &CopyTo32FVertexData); return info; } case gl::VERTEX_FORMAT_UINT2_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, - &CopyTo32FVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, + &CopyTo32FVertexData); return info; } case gl::VERTEX_FORMAT_UINT3_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32_FLOAT, - &CopyTo32FVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32_FLOAT, &CopyTo32FVertexData); return info; } case gl::VERTEX_FORMAT_UINT4_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, - &CopyTo32FVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, + &CopyTo32FVertexData); return info; } // GL_FIXED case gl::VERTEX_FORMAT_FIXED1: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32_FLOAT, - &Copy32FixedTo32FVertexData<1, 1>); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32_FLOAT, &Copy32FixedTo32FVertexData<1, 1>); return info; } case gl::VERTEX_FORMAT_FIXED2: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, - &Copy32FixedTo32FVertexData<2, 2>); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32_FLOAT, &Copy32FixedTo32FVertexData<2, 2>); return info; } case gl::VERTEX_FORMAT_FIXED3: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32_FLOAT, - &Copy32FixedTo32FVertexData<3, 3>); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32_FLOAT, &Copy32FixedTo32FVertexData<3, 3>); return info; } case gl::VERTEX_FORMAT_FIXED4: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, - &Copy32FixedTo32FVertexData<4, 4>); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, &Copy32FixedTo32FVertexData<4, 4>); return info; } // GL_HALF_FLOAT case gl::VERTEX_FORMAT_HALF1: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16_FLOAT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16_FLOAT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_HALF2: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16_FLOAT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16_FLOAT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_HALF3: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_FLOAT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_FLOAT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_HALF4: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16B16A16_FLOAT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16B16A16_FLOAT, &CopyNativeVertexData); return info; } // GL_FLOAT case gl::VERTEX_FORMAT_FLOAT1: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32_FLOAT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32_FLOAT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_FLOAT2: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32_FLOAT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32_FLOAT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_FLOAT3: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32B32_FLOAT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32B32_FLOAT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_FLOAT4: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32B32A32_FLOAT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32B32A32_FLOAT, &CopyNativeVertexData); return info; } // GL_INT_2_10_10_10_REV case gl::VERTEX_FORMAT_SINT210: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, - &CopyXYZ10W2ToXYZW32FVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, &CopyXYZ10W2ToXYZW32FVertexData); return info; } case gl::VERTEX_FORMAT_SINT210_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, - &CopyXYZ10W2ToXYZW32FVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, &CopyXYZ10W2ToXYZW32FVertexData); return info; } // GL_UNSIGNED_INT_2_10_10_10_REV case gl::VERTEX_FORMAT_UINT210: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, - &CopyXYZ10W2ToXYZW32FVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R32G32B32A32_FLOAT, &CopyXYZ10W2ToXYZW32FVertexData); return info; } case gl::VERTEX_FORMAT_UINT210_NORM: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R10G10B10A2_UNORM, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R10G10B10A2_UNORM, &CopyNativeVertexData); return info; } @@ -841,183 +1000,157 @@ const VertexFormat &GetVertexFormatInfo(gl::VertexFormatType vertexFormatType, D // GL_BYTE case gl::VERTEX_FORMAT_SBYTE1_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SBYTE2_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SBYTE3_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R8G8B8A8_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R8G8B8A8_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SBYTE4_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8B8A8_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8B8A8_SINT, &CopyNativeVertexData); return info; } // GL_UNSIGNED_BYTE case gl::VERTEX_FORMAT_UBYTE1_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8_UINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_UBYTE2_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8_UINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_UBYTE3_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R8G8B8A8_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R8G8B8A8_UINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_UBYTE4_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8B8A8_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R8G8B8A8_UINT, &CopyNativeVertexData); return info; } // GL_SHORT case gl::VERTEX_FORMAT_SSHORT1_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SSHORT2_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SSHORT3_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SSHORT4_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16B16A16_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16B16A16_SINT, &CopyNativeVertexData); return info; } // GL_UNSIGNED_SHORT case gl::VERTEX_FORMAT_USHORT1_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16_UINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_USHORT2_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16_UINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_USHORT3_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_UINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_USHORT4_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16B16A16_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R16G16B16A16_UINT, &CopyNativeVertexData); return info; } // GL_INT case gl::VERTEX_FORMAT_SINT1_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SINT2_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SINT3_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32B32_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32B32_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_SINT4_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32B32A32_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32B32A32_SINT, &CopyNativeVertexData); return info; } // GL_UNSIGNED_INT case gl::VERTEX_FORMAT_UINT1_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_UINT2_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_UINT3_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32B32_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32B32_SINT, &CopyNativeVertexData); return info; } case gl::VERTEX_FORMAT_UINT4_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32B32A32_SINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R32G32B32A32_SINT, &CopyNativeVertexData); return info; } // GL_INT_2_10_10_10_REV case gl::VERTEX_FORMAT_SINT210_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_SINT, - &CopyXYZ10W2ToXYZW32FVertexData); + static const VertexFormat info(VERTEX_CONVERT_CPU, DXGI_FORMAT_R16G16B16A16_SINT, &CopyXYZ10W2ToXYZW32FVertexData); return info; } // GL_UNSIGNED_INT_2_10_10_10_REV case gl::VERTEX_FORMAT_UINT210_INT: { - static constexpr VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R10G10B10A2_UINT, - &CopyNativeVertexData); + static const VertexFormat info(VERTEX_CONVERT_NONE, DXGI_FORMAT_R10G10B10A2_UINT, &CopyNativeVertexData); return info; } default: { - static constexpr VertexFormat info; + static const VertexFormat info; return info; } } } -} // namespace d3d11 +} -} // namespace rx +} diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/formatutils11.h b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/formatutils11.h index 3a9fd63df..1aa5cc294 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/formatutils11.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/formatutils11.h @@ -25,11 +25,31 @@ struct Renderer11DeviceCaps; namespace d3d11 { -// A texture might be stored as DXGI_FORMAT_R16_TYPELESS but store integer components, +typedef bool (*NativeMipmapGenerationSupportFunction)(D3D_FEATURE_LEVEL); + +struct DXGIFormat +{ + DXGIFormat(); + + GLuint redBits; + GLuint greenBits; + GLuint blueBits; + GLuint alphaBits; + GLuint sharedBits; + + GLuint depthBits; + GLuint stencilBits; + + GLenum componentType; + + NativeMipmapGenerationSupportFunction nativeMipmapSupport; +}; + +// This structure is problematic because a resource is associated with multiple DXGI formats. +// For example, a texture might be stored as DXGI_FORMAT_R16_TYPELESS but store integer components, // which are accessed through an DXGI_FORMAT_R16_SINT view. It's easy to write code which queries // information about the wrong format. Therefore, use of this should be avoided where possible. - -bool SupportsMipGen(DXGI_FORMAT dxgiFormat, D3D_FEATURE_LEVEL featureLevel); +const DXGIFormat &GetDXGIFormatInfo(DXGI_FORMAT format); struct DXGIFormatSize { @@ -41,31 +61,22 @@ struct DXGIFormatSize }; const DXGIFormatSize &GetDXGIFormatSizeInfo(DXGI_FORMAT format); -struct VertexFormat : angle::NonCopyable +struct VertexFormat { - constexpr VertexFormat(); - constexpr VertexFormat(VertexConversionType conversionType, - DXGI_FORMAT nativeFormat, - VertexCopyFunction copyFunction); + VertexFormat(); + VertexFormat(VertexConversionType conversionType, + DXGI_FORMAT nativeFormat, + VertexCopyFunction copyFunction); VertexConversionType conversionType; DXGI_FORMAT nativeFormat; VertexCopyFunction copyFunction; }; - const VertexFormat &GetVertexFormatInfo(gl::VertexFormatType vertexFormatType, D3D_FEATURE_LEVEL featureLevel); -// Auto-generated in dxgi_format_map_autogen.cpp. -GLenum GetComponentType(DXGI_FORMAT dxgiFormat); - } // namespace d3d11 -namespace d3d11_angle -{ -const angle::Format &GetFormat(DXGI_FORMAT dxgiFormat); -} - } // namespace rx #endif // LIBANGLE_RENDERER_D3D_D3D11_FORMATUTILS11_H_ diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/gen_dxgi_format_table.py b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/gen_dxgi_format_table.py deleted file mode 100644 index 6c6d1906a..000000000 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/gen_dxgi_format_table.py +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/python -# Copyright 2016 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. -# -# gen_dxgi_format_table.py: -# Code generation for DXGI format map. - -from datetime import date -import sys - -sys.path.append('../..') -import angle_format - -template_cpp = """// GENERATED FILE - DO NOT EDIT. -// Generated by {script_name} using data from {data_source_name}. -// -// Copyright {copyright_year} 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. -// -// DXGI format info: -// Determining metadata about a DXGI format. - -#include "libANGLE/renderer/Format.h" - -using namespace angle; - -namespace rx -{{ - -namespace d3d11 -{{ - -GLenum GetComponentType(DXGI_FORMAT dxgiFormat) -{{ - switch (dxgiFormat) - {{ -{component_type_cases} default: - break; - }} - - UNREACHABLE(); - return GL_NONE; -}} - -}} // namespace d3d11 - -namespace d3d11_angle -{{ - -const Format &GetFormat(DXGI_FORMAT dxgiFormat) -{{ - switch (dxgiFormat) - {{ -{format_cases} default: - break; - }} - - UNREACHABLE(); - return Format::Get(Format::ID::NONE); -}} - -}} // namespace d3d11_angle - -}} // namespace rx -""" - -template_format_case = """ case DXGI_FORMAT_{dxgi_format}: - return {result}; -""" - -template_undefined_case = """ case DXGI_FORMAT_{dxgi_format}: - break; -""" - -def format_case(dxgi_format, result): - return template_format_case.format( - dxgi_format = dxgi_format, - result = result) - -def undefined_case(dxgi_format): - return template_undefined_case.format(dxgi_format = dxgi_format) - -component_cases = "" -format_cases = "" - -input_data = 'dxgi_format_data.json' - -dxgi_map = angle_format.load_json(input_data) - -types = { - 'SNORM': 'GL_SIGNED_NORMALIZED', - 'UNORM': 'GL_UNSIGNED_NORMALIZED', - 'SINT': 'GL_INT', - 'UINT': 'GL_UNSIGNED_INT', - 'FLOAT': 'GL_FLOAT', - 'SHAREDEXP': 'GL_FLOAT' -} - -angle_to_gl = angle_format.load_inverse_table('../../angle_format_map.json') -all_angle = angle_to_gl.keys() - -for dxgi_format, angle_format in sorted(dxgi_map.iteritems()): - - found = [ctype in dxgi_format for ctype in types.keys()] - count = reduce((lambda a, b: int(a) + int(b)), found) - - component_type = 'GL_NONE' - - if count == 1: - gltype = next(gltype for ctype, gltype in types.iteritems() if ctype in dxgi_format) - component_cases += format_case(dxgi_format, gltype) - else: - component_cases += undefined_case(dxgi_format) - - if angle_format == "": - angle_format = dxgi_format - - if angle_format in all_angle: - angle_format = "Format::Get(Format::ID::" + angle_format + ")" - format_cases += format_case(dxgi_format, angle_format) - else: - format_cases += undefined_case(dxgi_format) - -with open('dxgi_format_map_autogen.cpp', 'wt') as out_file: - output_cpp = template_cpp.format( - script_name = sys.argv[0], - data_source_name = input_data, - copyright_year = date.today().year, - component_type_cases = component_cases, - format_cases = format_cases) - out_file.write(output_cpp) - out_file.close() diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/gen_dxgi_support_tables.py b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/gen_dxgi_support_tables.py index dba583f1e..21b22803b 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/gen_dxgi_support_tables.py +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/gen_dxgi_support_tables.py @@ -46,38 +46,25 @@ namespace d3d11 #define {prefix}RT D3D11_FORMAT_SUPPORT_RENDER_TARGET #define {prefix}MS D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET #define {prefix}DS D3D11_FORMAT_SUPPORT_DEPTH_STENCIL -#define {prefix}MIPGEN D3D11_FORMAT_SUPPORT_MIP_AUTOGEN namespace {{ const DXGISupport &GetDefaultSupport() {{ - static UINT AllSupportFlags = - D3D11_FORMAT_SUPPORT_TEXTURE2D | D3D11_FORMAT_SUPPORT_TEXTURE3D | - D3D11_FORMAT_SUPPORT_TEXTURECUBE | D3D11_FORMAT_SUPPORT_SHADER_SAMPLE | - D3D11_FORMAT_SUPPORT_RENDER_TARGET | D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET | - D3D11_FORMAT_SUPPORT_DEPTH_STENCIL | D3D11_FORMAT_SUPPORT_MIP_AUTOGEN; + static UINT AllSupportFlags = D3D11_FORMAT_SUPPORT_TEXTURE2D | + D3D11_FORMAT_SUPPORT_TEXTURE3D | + D3D11_FORMAT_SUPPORT_TEXTURECUBE | + D3D11_FORMAT_SUPPORT_SHADER_SAMPLE | + D3D11_FORMAT_SUPPORT_RENDER_TARGET | + D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET | + D3D11_FORMAT_SUPPORT_DEPTH_STENCIL; static const DXGISupport defaultSupport(0, 0, AllSupportFlags); return defaultSupport; }} -const DXGISupport &GetDXGISupport_9_3(DXGI_FORMAT dxgiFormat) -{{ - // clang-format off - switch (dxgiFormat) - {{ -{table_data_9_3} - default: - UNREACHABLE(); - return GetDefaultSupport(); - }} - // clang-format on -}} - const DXGISupport &GetDXGISupport_10_0(DXGI_FORMAT dxgiFormat) {{ - // clang-format off switch (dxgiFormat) {{ {table_data_10_0} @@ -85,12 +72,10 @@ const DXGISupport &GetDXGISupport_10_0(DXGI_FORMAT dxgiFormat) UNREACHABLE(); return GetDefaultSupport(); }} - // clang-format on }} const DXGISupport &GetDXGISupport_10_1(DXGI_FORMAT dxgiFormat) {{ - // clang-format off switch (dxgiFormat) {{ {table_data_10_1} @@ -98,12 +83,10 @@ const DXGISupport &GetDXGISupport_10_1(DXGI_FORMAT dxgiFormat) UNREACHABLE(); return GetDefaultSupport(); }} - // clang-format on }} const DXGISupport &GetDXGISupport_11_0(DXGI_FORMAT dxgiFormat) {{ - // clang-format off switch (dxgiFormat) {{ {table_data_11_0} @@ -111,7 +94,6 @@ const DXGISupport &GetDXGISupport_11_0(DXGI_FORMAT dxgiFormat) UNREACHABLE(); return GetDefaultSupport(); }} - // clang-format on }} }} @@ -123,14 +105,11 @@ const DXGISupport &GetDXGISupport_11_0(DXGI_FORMAT dxgiFormat) #undef {prefix}RT #undef {prefix}MS #undef {prefix}DS -#undef {prefix}MIPGEN const DXGISupport &GetDXGISupport(DXGI_FORMAT dxgiFormat, D3D_FEATURE_LEVEL featureLevel) {{ switch (featureLevel) {{ - case D3D_FEATURE_LEVEL_9_3: - return GetDXGISupport_9_3(dxgiFormat); case D3D_FEATURE_LEVEL_10_0: return GetDXGISupport_10_0(dxgiFormat); case D3D_FEATURE_LEVEL_10_1: @@ -150,7 +129,7 @@ const DXGISupport &GetDXGISupport(DXGI_FORMAT dxgiFormat, D3D_FEATURE_LEVEL feat table_init = "" def do_format(format_data): - table_data = {'9_3': '', '10_0': '', '10_1': '', '11_0': ''} + table_data = {'10_0': '', '10_1': '', '11_0': ''} json_flag_to_d3d = { 'texture2D': macro_prefix + '2D', @@ -159,8 +138,7 @@ def do_format(format_data): 'shaderSample': macro_prefix + 'SAMPLE', 'renderTarget': macro_prefix + 'RT', 'multisampleRT': macro_prefix + 'MS', - 'depthStencil': macro_prefix + 'DS', - 'mipAutoGen': macro_prefix + 'MIPGEN' + 'depthStencil': macro_prefix + 'DS' } for format_name, format_support in sorted(format_data.iteritems()): @@ -168,9 +146,6 @@ def do_format(format_data): always_supported = set() never_supported = set() optionally_supported = set() - fl_9_3_supported = set() - fl_9_3_check = set() - fl_10_0_supported = set() fl_10_1_supported = set() fl_11_0_supported = set() fl_11_0_check = set() @@ -188,7 +163,8 @@ def do_format(format_data): elif support == 'never': never_supported.update(d3d_flag) elif support == '10_0': - fl_10_0_supported.update(d3d_flag) + # TODO(jmadill): FL 9_3 handling + always_supported.update(d3d_flag) elif support == '10_1': fl_10_1_supported.update(d3d_flag) elif support == '11_0': @@ -205,33 +181,21 @@ def do_format(format_data): fl_10_0_check_11_0_supported.update(d3d_flag) elif support == '11_0check': fl_11_0_check.update(d3d_flag) - elif support == '9_3always_10_0check11_0always': - fl_9_3_supported.update(d3d_flag) - fl_10_0_check_11_0_supported.update(d3d_flag) - elif support == '9_3check_10_0always': - fl_9_3_check.update(d3d_flag) - fl_10_0_supported.update(d3d_flag) else: print("Data specification error: " + support) sys.exit(1) - for feature_level in ['9_3', '10_0', '10_1', '11_0']: + for feature_level in ['10_0', '10_1', '11_0']: always_for_fl = always_supported optional_for_fl = optionally_supported - if feature_level == '9_3': - always_for_fl = fl_9_3_supported.union(always_for_fl) - optional_for_fl = fl_9_3_check.union(optional_for_fl) - elif feature_level == '10_0': - always_for_fl = fl_10_0_supported.union(always_for_fl) + if feature_level == '10_0': optional_for_fl = fl_10_0_check_10_1_supported.union(optional_for_fl) optional_for_fl = fl_10_0_check_11_0_supported.union(optional_for_fl) - elif feature_level == '10_1': - always_for_fl = fl_10_0_supported.union(always_for_fl) + if feature_level == '10_1': always_for_fl = fl_10_1_supported.union(always_for_fl) always_for_fl = fl_10_0_check_10_1_supported.union(always_for_fl) optional_for_fl = fl_10_0_check_11_0_supported.union(optional_for_fl) elif feature_level == '11_0': - always_for_fl = fl_10_0_supported.union(always_for_fl) always_for_fl = fl_10_0_check_10_1_supported.union(always_for_fl) always_for_fl = fl_10_0_check_11_0_supported.union(always_for_fl) always_for_fl = fl_10_1_supported.union(always_for_fl) @@ -254,8 +218,7 @@ def do_format(format_data): return table_data def join_table_data(table_data_1, table_data_2): - return {'9_3': table_data_1['9_3'] + table_data_2['9_3'], - '10_0': table_data_1['10_0'] + table_data_2['10_0'], + return {'10_0': table_data_1['10_0'] + table_data_2['10_0'], '10_1': table_data_1['10_1'] + table_data_2['10_1'], '11_0': table_data_1['11_0'] + table_data_2['11_0']} @@ -264,13 +227,12 @@ with open('dxgi_support_data.json') as dxgi_file: dxgi_file.close() json_data = json.loads(file_data) - table_data = {'9_3': '', '10_0': '', '10_1': '', '11_0': ''} + table_data = {'10_0': '', '10_1': '', '11_0': ''} for format_data in json_data: table_data = join_table_data(table_data, do_format(format_data)) out_data = template.format(prefix=macro_prefix, - table_data_9_3=table_data['9_3'], table_data_10_0=table_data['10_0'], table_data_10_1=table_data['10_1'], table_data_11_0=table_data['11_0']) diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/gen_texture_format_table.py b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/gen_texture_format_table.py index 3c4b228e4..981a77f51 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/gen_texture_format_table.py +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/gen_texture_format_table.py @@ -19,7 +19,7 @@ sys.path.append('../..') import angle_format template_texture_format_table_autogen_cpp = """// GENERATED FILE - DO NOT EDIT. -// Generated by {script_name} using data from {data_source_name} +// Generated by gen_texture_format_table.py using data from texture_format_data.json // // Copyright {copyright_year} The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be @@ -60,7 +60,7 @@ const Format &Format::Get(GLenum internalFormat, const Renderer11DeviceCaps &dev // clang-format on UNREACHABLE(); - static constexpr Format defaultInfo; + static const Format defaultInfo; return defaultInfo; }} @@ -216,7 +216,23 @@ def get_blit_srv_format(angle_format): format_entry_template = """{space}{{ -{space} static constexpr Format info({internalFormat}, +{space} static const Format info({internalFormat}, +{space} angle::Format::ID::{formatName}, +{space} {texFormat}, +{space} {srvFormat}, +{space} {rtvFormat}, +{space} {dsvFormat}, +{space} {blitSRVFormat}, +{space} {swizzleFormat}, +{space} {initializer}, +{space} deviceCaps); +{space} return info; +{space}}} +""" + +split_format_entry_template = """{space} {condition} +{space} {{ +{space} static const Format info({internalFormat}, {space} angle::Format::ID::{formatName}, {space} {texFormat}, {space} {srvFormat}, @@ -224,22 +240,8 @@ format_entry_template = """{space}{{ {space} {dsvFormat}, {space} {blitSRVFormat}, {space} {swizzleFormat}, -{space} {initializer}); -{space} return info; -{space}}} -""" - -split_format_entry_template = """{space} {condition} -{space} {{ -{space} static constexpr Format info({internalFormat}, -{space} angle::Format::ID::{formatName}, -{space} {texFormat}, -{space} {srvFormat}, -{space} {rtvFormat}, -{space} {dsvFormat}, -{space} {blitSRVFormat}, -{space} {swizzleFormat}, -{space} {initializer}); +{space} {initializer}, +{space} deviceCaps); {space} return info; {space} }} """ @@ -342,19 +344,16 @@ def reject_duplicate_keys(pairs): return found_keys json_map = angle_format.load_with_override(os.path.abspath('texture_format_map.json')) -data_source_name = 'texture_format_data.json' -with open(data_source_name) as texture_format_json_file: +with open('texture_format_data.json') as texture_format_json_file: texture_format_data = texture_format_json_file.read() texture_format_json_file.close() json_data = json.loads(texture_format_data, object_pairs_hook=angle_format.reject_duplicate_keys) angle_format_cases = parse_json_into_switch_angle_format_string(json_map, json_data) output_cpp = template_texture_format_table_autogen_cpp.format( - script_name = sys.argv[0], - copyright_year = date.today().year, - angle_format_info_cases = angle_format_cases, - data_source_name = data_source_name) + copyright_year=date.today().year, + angle_format_info_cases=angle_format_cases) with open('texture_format_table_autogen.cpp', 'wt') as out_file: out_file.write(output_cpp) out_file.close() diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp index 5bb51feca..6bad7b2ec 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp @@ -22,13 +22,219 @@ #include "libANGLE/renderer/d3d/d3d11/texture_format_table.h" #include "libANGLE/renderer/d3d/FramebufferD3D.h" #include "libANGLE/renderer/d3d/WorkaroundsD3D.h" -#include "libANGLE/renderer/driver_utils.h" namespace rx { +namespace gl_d3d11 +{ + +D3D11_BLEND ConvertBlendFunc(GLenum glBlend, bool isAlpha) +{ + D3D11_BLEND d3dBlend = D3D11_BLEND_ZERO; + + switch (glBlend) + { + case GL_ZERO: d3dBlend = D3D11_BLEND_ZERO; break; + case GL_ONE: d3dBlend = D3D11_BLEND_ONE; break; + case GL_SRC_COLOR: d3dBlend = (isAlpha ? D3D11_BLEND_SRC_ALPHA : D3D11_BLEND_SRC_COLOR); break; + case GL_ONE_MINUS_SRC_COLOR: d3dBlend = (isAlpha ? D3D11_BLEND_INV_SRC_ALPHA : D3D11_BLEND_INV_SRC_COLOR); break; + case GL_DST_COLOR: d3dBlend = (isAlpha ? D3D11_BLEND_DEST_ALPHA : D3D11_BLEND_DEST_COLOR); break; + case GL_ONE_MINUS_DST_COLOR: d3dBlend = (isAlpha ? D3D11_BLEND_INV_DEST_ALPHA : D3D11_BLEND_INV_DEST_COLOR); break; + case GL_SRC_ALPHA: d3dBlend = D3D11_BLEND_SRC_ALPHA; break; + case GL_ONE_MINUS_SRC_ALPHA: d3dBlend = D3D11_BLEND_INV_SRC_ALPHA; break; + case GL_DST_ALPHA: d3dBlend = D3D11_BLEND_DEST_ALPHA; break; + case GL_ONE_MINUS_DST_ALPHA: d3dBlend = D3D11_BLEND_INV_DEST_ALPHA; break; + case GL_CONSTANT_COLOR: d3dBlend = D3D11_BLEND_BLEND_FACTOR; break; + case GL_ONE_MINUS_CONSTANT_COLOR: d3dBlend = D3D11_BLEND_INV_BLEND_FACTOR; break; + case GL_CONSTANT_ALPHA: d3dBlend = D3D11_BLEND_BLEND_FACTOR; break; + case GL_ONE_MINUS_CONSTANT_ALPHA: d3dBlend = D3D11_BLEND_INV_BLEND_FACTOR; break; + case GL_SRC_ALPHA_SATURATE: d3dBlend = D3D11_BLEND_SRC_ALPHA_SAT; break; + default: UNREACHABLE(); + } + + return d3dBlend; +} + +D3D11_BLEND_OP ConvertBlendOp(GLenum glBlendOp) +{ + D3D11_BLEND_OP d3dBlendOp = D3D11_BLEND_OP_ADD; + + switch (glBlendOp) + { + case GL_FUNC_ADD: d3dBlendOp = D3D11_BLEND_OP_ADD; break; + case GL_FUNC_SUBTRACT: d3dBlendOp = D3D11_BLEND_OP_SUBTRACT; break; + case GL_FUNC_REVERSE_SUBTRACT: d3dBlendOp = D3D11_BLEND_OP_REV_SUBTRACT; break; + case GL_MIN: d3dBlendOp = D3D11_BLEND_OP_MIN; break; + case GL_MAX: d3dBlendOp = D3D11_BLEND_OP_MAX; break; + default: UNREACHABLE(); + } + + return d3dBlendOp; +} + +UINT8 ConvertColorMask(bool red, bool green, bool blue, bool alpha) +{ + UINT8 mask = 0; + if (red) + { + mask |= D3D11_COLOR_WRITE_ENABLE_RED; + } + if (green) + { + mask |= D3D11_COLOR_WRITE_ENABLE_GREEN; + } + if (blue) + { + mask |= D3D11_COLOR_WRITE_ENABLE_BLUE; + } + if (alpha) + { + mask |= D3D11_COLOR_WRITE_ENABLE_ALPHA; + } + return mask; +} + +D3D11_CULL_MODE ConvertCullMode(bool cullEnabled, GLenum cullMode) +{ + D3D11_CULL_MODE cull = D3D11_CULL_NONE; + + if (cullEnabled) + { + switch (cullMode) + { + case GL_FRONT: cull = D3D11_CULL_FRONT; break; + case GL_BACK: cull = D3D11_CULL_BACK; break; + case GL_FRONT_AND_BACK: cull = D3D11_CULL_NONE; break; + default: UNREACHABLE(); + } + } + else + { + cull = D3D11_CULL_NONE; + } + + return cull; +} + +D3D11_COMPARISON_FUNC ConvertComparison(GLenum comparison) +{ + D3D11_COMPARISON_FUNC d3dComp = D3D11_COMPARISON_NEVER; + switch (comparison) + { + case GL_NEVER: d3dComp = D3D11_COMPARISON_NEVER; break; + case GL_ALWAYS: d3dComp = D3D11_COMPARISON_ALWAYS; break; + case GL_LESS: d3dComp = D3D11_COMPARISON_LESS; break; + case GL_LEQUAL: d3dComp = D3D11_COMPARISON_LESS_EQUAL; break; + case GL_EQUAL: d3dComp = D3D11_COMPARISON_EQUAL; break; + case GL_GREATER: d3dComp = D3D11_COMPARISON_GREATER; break; + case GL_GEQUAL: d3dComp = D3D11_COMPARISON_GREATER_EQUAL; break; + case GL_NOTEQUAL: d3dComp = D3D11_COMPARISON_NOT_EQUAL; break; + default: UNREACHABLE(); + } + + return d3dComp; +} + +D3D11_DEPTH_WRITE_MASK ConvertDepthMask(bool depthWriteEnabled) +{ + return depthWriteEnabled ? D3D11_DEPTH_WRITE_MASK_ALL : D3D11_DEPTH_WRITE_MASK_ZERO; +} + +UINT8 ConvertStencilMask(GLuint stencilmask) +{ + return static_cast(stencilmask); +} + +D3D11_STENCIL_OP ConvertStencilOp(GLenum stencilOp) +{ + D3D11_STENCIL_OP d3dStencilOp = D3D11_STENCIL_OP_KEEP; + + switch (stencilOp) + { + case GL_ZERO: d3dStencilOp = D3D11_STENCIL_OP_ZERO; break; + case GL_KEEP: d3dStencilOp = D3D11_STENCIL_OP_KEEP; break; + case GL_REPLACE: d3dStencilOp = D3D11_STENCIL_OP_REPLACE; break; + case GL_INCR: d3dStencilOp = D3D11_STENCIL_OP_INCR_SAT; break; + case GL_DECR: d3dStencilOp = D3D11_STENCIL_OP_DECR_SAT; break; + case GL_INVERT: d3dStencilOp = D3D11_STENCIL_OP_INVERT; break; + case GL_INCR_WRAP: d3dStencilOp = D3D11_STENCIL_OP_INCR; break; + case GL_DECR_WRAP: d3dStencilOp = D3D11_STENCIL_OP_DECR; break; + default: UNREACHABLE(); + } + + return d3dStencilOp; +} + +D3D11_FILTER ConvertFilter(GLenum minFilter, GLenum magFilter, float maxAnisotropy, GLenum comparisonMode) +{ + bool comparison = comparisonMode != GL_NONE; + + if (maxAnisotropy > 1.0f) + { + return D3D11_ENCODE_ANISOTROPIC_FILTER(static_cast(comparison)); + } + else + { + D3D11_FILTER_TYPE dxMin = D3D11_FILTER_TYPE_POINT; + D3D11_FILTER_TYPE dxMip = D3D11_FILTER_TYPE_POINT; + switch (minFilter) + { + case GL_NEAREST: dxMin = D3D11_FILTER_TYPE_POINT; dxMip = D3D11_FILTER_TYPE_POINT; break; + case GL_LINEAR: dxMin = D3D11_FILTER_TYPE_LINEAR; dxMip = D3D11_FILTER_TYPE_POINT; break; + case GL_NEAREST_MIPMAP_NEAREST: dxMin = D3D11_FILTER_TYPE_POINT; dxMip = D3D11_FILTER_TYPE_POINT; break; + case GL_LINEAR_MIPMAP_NEAREST: dxMin = D3D11_FILTER_TYPE_LINEAR; dxMip = D3D11_FILTER_TYPE_POINT; break; + case GL_NEAREST_MIPMAP_LINEAR: dxMin = D3D11_FILTER_TYPE_POINT; dxMip = D3D11_FILTER_TYPE_LINEAR; break; + case GL_LINEAR_MIPMAP_LINEAR: dxMin = D3D11_FILTER_TYPE_LINEAR; dxMip = D3D11_FILTER_TYPE_LINEAR; break; + default: UNREACHABLE(); + } + + D3D11_FILTER_TYPE dxMag = D3D11_FILTER_TYPE_POINT; + switch (magFilter) + { + case GL_NEAREST: dxMag = D3D11_FILTER_TYPE_POINT; break; + case GL_LINEAR: dxMag = D3D11_FILTER_TYPE_LINEAR; break; + default: UNREACHABLE(); + } + + return D3D11_ENCODE_BASIC_FILTER(dxMin, dxMag, dxMip, static_cast(comparison)); + } +} + +D3D11_TEXTURE_ADDRESS_MODE ConvertTextureWrap(GLenum wrap) +{ + switch (wrap) + { + case GL_REPEAT: return D3D11_TEXTURE_ADDRESS_WRAP; + case GL_CLAMP_TO_EDGE: return D3D11_TEXTURE_ADDRESS_CLAMP; + case GL_MIRRORED_REPEAT: return D3D11_TEXTURE_ADDRESS_MIRROR; + default: UNREACHABLE(); + } + + return D3D11_TEXTURE_ADDRESS_WRAP; +} + +D3D11_QUERY ConvertQueryType(GLenum queryType) +{ + switch (queryType) + { + case GL_ANY_SAMPLES_PASSED_EXT: + case GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT: return D3D11_QUERY_OCCLUSION; + case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: return D3D11_QUERY_SO_STATISTICS; + case GL_TIME_ELAPSED_EXT: + // Two internal queries are also created for begin/end timestamps + return D3D11_QUERY_TIMESTAMP_DISJOINT; + case GL_COMMANDS_COMPLETED_CHROMIUM: + return D3D11_QUERY_EVENT; + default: UNREACHABLE(); return D3D11_QUERY_EVENT; + } +} + +} // namespace gl_d3d11 + namespace d3d11_gl { + namespace { @@ -37,7 +243,8 @@ class DXGISupportHelper : angle::NonCopyable { public: DXGISupportHelper(ID3D11Device *device, D3D_FEATURE_LEVEL featureLevel) - : mDevice(device), mFeatureLevel(featureLevel) + : mDevice(device), + mFeatureLevel(featureLevel) { } @@ -72,10 +279,72 @@ class DXGISupportHelper : angle::NonCopyable D3D_FEATURE_LEVEL mFeatureLevel; }; -gl::TextureCaps GenerateTextureFormatCaps(GLint maxClientVersion, - GLenum internalFormat, - ID3D11Device *device, - const Renderer11DeviceCaps &renderer11DeviceCaps) +} // anonymous namespace + +unsigned int GetReservedVertexUniformVectors(D3D_FEATURE_LEVEL featureLevel) +{ + switch (featureLevel) + { + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: + return 0; + + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: + return 3; // dx_ViewAdjust, dx_ViewCoords and dx_ViewScale + + default: + UNREACHABLE(); + return 0; + } +} + +unsigned int GetReservedFragmentUniformVectors(D3D_FEATURE_LEVEL featureLevel) +{ + switch (featureLevel) + { + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: + return 0; + + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: + return 3; + + default: + UNREACHABLE(); + return 0; + } +} + +GLint GetMaximumClientVersion(D3D_FEATURE_LEVEL featureLevel) +{ + switch (featureLevel) + { + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + case D3D_FEATURE_LEVEL_10_1: + return 3; + + case D3D_FEATURE_LEVEL_10_0: + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: + return 2; + + default: + UNREACHABLE(); + return 0; + } +} + +static gl::TextureCaps GenerateTextureFormatCaps(GLint maxClientVersion, GLenum internalFormat, ID3D11Device *device, const Renderer11DeviceCaps &renderer11DeviceCaps) { gl::TextureCaps textureCaps; @@ -136,911 +405,661 @@ gl::TextureCaps GenerateTextureFormatCaps(GLint maxClientVersion, return textureCaps; } -bool GetNPOTTextureSupport(D3D_FEATURE_LEVEL featureLevel) +static bool GetNPOTTextureSupport(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return true; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return true; // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476876.aspx - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return false; + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return false; - default: - UNREACHABLE(); - return false; + default: UNREACHABLE(); return false; } } -float GetMaximumAnisotropy(D3D_FEATURE_LEVEL featureLevel) +static float GetMaximumAnisotropy(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_MAX_MAXANISOTROPY; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_MAX_MAXANISOTROPY; - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_MAX_MAXANISOTROPY; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return D3D10_MAX_MAXANISOTROPY; // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476876.aspx - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - return 16; + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: return 16; - case D3D_FEATURE_LEVEL_9_1: - return D3D_FL9_1_DEFAULT_MAX_ANISOTROPY; + case D3D_FEATURE_LEVEL_9_1: return D3D_FL9_1_DEFAULT_MAX_ANISOTROPY; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -bool GetOcclusionQuerySupport(D3D_FEATURE_LEVEL featureLevel) +static bool GetOcclusionQuerySupport(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return true; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return true; - // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476150.aspx - // ID3D11Device::CreateQuery - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - return true; - case D3D_FEATURE_LEVEL_9_1: - return false; + // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476150.aspx ID3D11Device::CreateQuery + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: return true; + case D3D_FEATURE_LEVEL_9_1: return false; - default: - UNREACHABLE(); - return false; + default: UNREACHABLE(); return false; } } -bool GetEventQuerySupport(D3D_FEATURE_LEVEL featureLevel) +static bool GetEventQuerySupport(D3D_FEATURE_LEVEL featureLevel) { - // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476150.aspx - // ID3D11Device::CreateQuery + // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476150.aspx ID3D11Device::CreateQuery switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return true; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return true; - default: - UNREACHABLE(); - return false; + default: UNREACHABLE(); return false; } } -bool GetInstancingSupport(D3D_FEATURE_LEVEL featureLevel) +static bool GetInstancingSupport(D3D_FEATURE_LEVEL featureLevel) { - // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476150.aspx - // ID3D11Device::CreateInputLayout + // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476150.aspx ID3D11Device::CreateInputLayout switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return true; - - // Feature Level 9_3 supports instancing, but slot 0 in the input layout must not be - // instanced. - // D3D9 has a similar restriction, where stream 0 must not be instanced. - // This restriction can be worked around by remapping any non-instanced slot to slot - // 0. - // This works because HLSL uses shader semantics to match the vertex inputs to the - // elements in the input layout, rather than the slots. - // Note that we only support instancing via ANGLE_instanced_array on 9_3, since 9_3 - // doesn't support OpenGL ES 3.0 - case D3D_FEATURE_LEVEL_9_3: - return true; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return true; - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return false; + // Feature Level 9_3 supports instancing, but slot 0 in the input layout must not be instanced. + // D3D9 has a similar restriction, where stream 0 must not be instanced. + // This restriction can be worked around by remapping any non-instanced slot to slot 0. + // This works because HLSL uses shader semantics to match the vertex inputs to the elements in the input layout, rather than the slots. + // Note that we only support instancing via ANGLE_instanced_array on 9_3, since 9_3 doesn't support OpenGL ES 3.0 + case D3D_FEATURE_LEVEL_9_3: return true; - default: - UNREACHABLE(); - return false; + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return false; + + default: UNREACHABLE(); return false; } } -bool GetFramebufferMultisampleSupport(D3D_FEATURE_LEVEL featureLevel) +static bool GetFramebufferMultisampleSupport(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return true; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return true; - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return false; + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return false; - default: - UNREACHABLE(); - return false; + default: UNREACHABLE(); return false; } } -bool GetFramebufferBlitSupport(D3D_FEATURE_LEVEL featureLevel) +static bool GetFramebufferBlitSupport(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return true; - - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return false; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return true; - default: - UNREACHABLE(); - return false; + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return false; + + default: UNREACHABLE(); return false; } } -bool GetDerivativeInstructionSupport(D3D_FEATURE_LEVEL featureLevel) +static bool GetDerivativeInstructionSupport(D3D_FEATURE_LEVEL featureLevel) { - // http://msdn.microsoft.com/en-us/library/windows/desktop/bb509588.aspx states that - // shader model + // http://msdn.microsoft.com/en-us/library/windows/desktop/bb509588.aspx states that shader model // ps_2_x is required for the ddx (and other derivative functions). - // http://msdn.microsoft.com/en-us/library/windows/desktop/ff476876.aspx states that - // feature level + // http://msdn.microsoft.com/en-us/library/windows/desktop/ff476876.aspx states that feature level // 9.3 supports shader model ps_2_x. switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - case D3D_FEATURE_LEVEL_9_3: - return true; - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return false; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: + case D3D_FEATURE_LEVEL_9_3: return true; + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return false; - default: - UNREACHABLE(); - return false; + default: UNREACHABLE(); return false; } } -bool GetShaderTextureLODSupport(D3D_FEATURE_LEVEL featureLevel) +static bool GetShaderTextureLODSupport(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return true; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return true; - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return false; + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return false; - default: - UNREACHABLE(); - return false; + default: UNREACHABLE(); return false; } } -size_t GetMaximumSimultaneousRenderTargets(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumSimultaneousRenderTargets(D3D_FEATURE_LEVEL featureLevel) { - // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476150.aspx - // ID3D11Device::CreateInputLayout + // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476150.aspx ID3D11Device::CreateInputLayout switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT; - case D3D_FEATURE_LEVEL_9_3: - return D3D_FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT; - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return D3D_FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT; + case D3D_FEATURE_LEVEL_9_3: return D3D_FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT; + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return D3D_FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximum2DTextureSize(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximum2DTextureSize(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION; - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION; - case D3D_FEATURE_LEVEL_9_3: - return D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION; - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION; + case D3D_FEATURE_LEVEL_9_3: return D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION; + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximumCubeMapTextureSize(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumCubeMapTextureSize(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_REQ_TEXTURECUBE_DIMENSION; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_REQ_TEXTURECUBE_DIMENSION; - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_REQ_TEXTURECUBE_DIMENSION; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return D3D10_REQ_TEXTURECUBE_DIMENSION; - case D3D_FEATURE_LEVEL_9_3: - return D3D_FL9_3_REQ_TEXTURECUBE_DIMENSION; - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return D3D_FL9_1_REQ_TEXTURECUBE_DIMENSION; + case D3D_FEATURE_LEVEL_9_3: return D3D_FL9_3_REQ_TEXTURECUBE_DIMENSION; + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return D3D_FL9_1_REQ_TEXTURECUBE_DIMENSION; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximum2DTextureArraySize(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximum2DTextureArraySize(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION; - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return D3D10_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION; - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 0; + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return 0; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximum3DTextureSize(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximum3DTextureSize(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION; - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_REQ_TEXTURE3D_U_V_OR_W_DIMENSION; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return D3D10_REQ_TEXTURE3D_U_V_OR_W_DIMENSION; - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return D3D_FL9_1_REQ_TEXTURE3D_U_V_OR_W_DIMENSION; + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return D3D_FL9_1_REQ_TEXTURE3D_U_V_OR_W_DIMENSION; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximumViewportSize(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumViewportSize(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_VIEWPORT_BOUNDS_MAX; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_VIEWPORT_BOUNDS_MAX; - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_VIEWPORT_BOUNDS_MAX; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return D3D10_VIEWPORT_BOUNDS_MAX; - // No constants for D3D11 Feature Level 9 viewport size limits, use the maximum - // texture sizes - case D3D_FEATURE_LEVEL_9_3: - return D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION; - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION; + // No constants for D3D11 Feature Level 9 viewport size limits, use the maximum texture sizes + case D3D_FEATURE_LEVEL_9_3: return D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION; + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximumDrawIndexedIndexCount(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumDrawIndexedIndexCount(D3D_FEATURE_LEVEL featureLevel) { - // D3D11 allows up to 2^32 elements, but we report max signed int for convenience since - // that's what's + // D3D11 allows up to 2^32 elements, but we report max signed int for convenience since that's what's // returned from glGetInteger - static_assert(D3D11_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP == 32, - "Unexpected D3D11 constant value."); - static_assert(D3D10_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP == 32, - "Unexpected D3D11 constant value."); + static_assert(D3D11_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP == 32, "Unexpected D3D11 constant value."); + static_assert(D3D10_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP == 32, "Unexpected D3D11 constant value."); switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return std::numeric_limits::max(); + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return std::numeric_limits::max(); - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - return D3D_FL9_2_IA_PRIMITIVE_MAX_COUNT; - case D3D_FEATURE_LEVEL_9_1: - return D3D_FL9_1_IA_PRIMITIVE_MAX_COUNT; + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: return D3D_FL9_2_IA_PRIMITIVE_MAX_COUNT; + case D3D_FEATURE_LEVEL_9_1: return D3D_FL9_1_IA_PRIMITIVE_MAX_COUNT; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximumDrawVertexCount(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumDrawVertexCount(D3D_FEATURE_LEVEL featureLevel) { - // D3D11 allows up to 2^32 elements, but we report max signed int for convenience since - // that's what's + // D3D11 allows up to 2^32 elements, but we report max signed int for convenience since that's what's // returned from glGetInteger static_assert(D3D11_REQ_DRAW_VERTEX_COUNT_2_TO_EXP == 32, "Unexpected D3D11 constant value."); static_assert(D3D10_REQ_DRAW_VERTEX_COUNT_2_TO_EXP == 32, "Unexpected D3D11 constant value."); switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return std::numeric_limits::max(); + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return std::numeric_limits::max(); - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - return D3D_FL9_2_IA_PRIMITIVE_MAX_COUNT; - case D3D_FEATURE_LEVEL_9_1: - return D3D_FL9_1_IA_PRIMITIVE_MAX_COUNT; + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: return D3D_FL9_2_IA_PRIMITIVE_MAX_COUNT; + case D3D_FEATURE_LEVEL_9_1: return D3D_FL9_1_IA_PRIMITIVE_MAX_COUNT; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximumVertexInputSlots(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumVertexInputSlots(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_STANDARD_VERTEX_ELEMENT_COUNT; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_STANDARD_VERTEX_ELEMENT_COUNT; - case D3D_FEATURE_LEVEL_10_1: - return D3D10_1_STANDARD_VERTEX_ELEMENT_COUNT; - case D3D_FEATURE_LEVEL_10_0: - return D3D10_STANDARD_VERTEX_ELEMENT_COUNT; + case D3D_FEATURE_LEVEL_10_1: return D3D10_1_STANDARD_VERTEX_ELEMENT_COUNT; + case D3D_FEATURE_LEVEL_10_0: return D3D10_STANDARD_VERTEX_ELEMENT_COUNT; - // From http://http://msdn.microsoft.com/en-us/library/windows/desktop/ff476876.aspx - // "Max Input Slots" - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 16; + // From http://http://msdn.microsoft.com/en-us/library/windows/desktop/ff476876.aspx "Max Input Slots" + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return 16; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximumVertexUniformVectors(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumVertexUniformVectors(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT; - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_REQ_CONSTANT_BUFFER_ELEMENT_COUNT; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return D3D10_REQ_CONSTANT_BUFFER_ELEMENT_COUNT; - // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476149.aspx - // ID3D11DeviceContext::VSSetConstantBuffers - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 255 - d3d11_gl::GetReservedVertexUniformVectors(featureLevel); + // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476149.aspx ID3D11DeviceContext::VSSetConstantBuffers + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: + return 255 - d3d11_gl::GetReservedVertexUniformVectors(featureLevel); - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximumVertexUniformBlocks(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumVertexUniformBlocks(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - - d3d11::RESERVED_CONSTANT_BUFFER_SLOT_COUNT; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + return D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - + d3d11::RESERVED_CONSTANT_BUFFER_SLOT_COUNT; - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - - d3d11::RESERVED_CONSTANT_BUFFER_SLOT_COUNT; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: + return D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - + d3d11::RESERVED_CONSTANT_BUFFER_SLOT_COUNT; - // Uniform blocks not supported on D3D11 Feature Level 9 - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 0; + // Uniform blocks not supported on D3D11 Feature Level 9 + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return 0; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetReservedVertexOutputVectors(D3D_FEATURE_LEVEL featureLevel) +static size_t GetReservedVertexOutputVectors(D3D_FEATURE_LEVEL featureLevel) { // According to The OpenGL ES Shading Language specifications // (Language Version 1.00 section 10.16, Language Version 3.10 section 12.21) // built-in special variables (e.g. gl_FragCoord, or gl_PointCoord) - // which are statically used in the shader should be included in the variable packing - // algorithm. + // which are statically used in the shader should be included in the variable packing algorithm. // Therefore, we should not reserve output vectors for them. switch (featureLevel) { - // We must reserve one output vector for dx_Position. - // We also reserve one for gl_Position, which we unconditionally output on Feature - // Levels 10_0+, - // even if it's unused in the shader (e.g. for transform feedback). TODO: This could - // be improved. - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return 2; + // We must reserve one output vector for dx_Position. + // We also reserve one for gl_Position, which we unconditionally output on Feature Levels 10_0+, + // even if it's unused in the shader (e.g. for transform feedback). TODO: This could be improved. + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return 2; - // Just reserve dx_Position on Feature Level 9, since we don't ever need to output - // gl_Position. - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 1; + // Just reserve dx_Position on Feature Level 9, since we don't ever need to output gl_Position. + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return 1; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximumVertexOutputVectors(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumVertexOutputVectors(D3D_FEATURE_LEVEL featureLevel) { - static_assert(gl::IMPLEMENTATION_MAX_VARYING_VECTORS == D3D11_VS_OUTPUT_REGISTER_COUNT, - "Unexpected D3D11 constant value."); + static_assert(gl::IMPLEMENTATION_MAX_VARYING_VECTORS == D3D11_VS_OUTPUT_REGISTER_COUNT, "Unexpected D3D11 constant value."); switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_VS_OUTPUT_REGISTER_COUNT - GetReservedVertexOutputVectors(featureLevel); + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_VS_OUTPUT_REGISTER_COUNT - GetReservedVertexOutputVectors(featureLevel); - case D3D_FEATURE_LEVEL_10_1: - return D3D10_1_VS_OUTPUT_REGISTER_COUNT - GetReservedVertexOutputVectors(featureLevel); - case D3D_FEATURE_LEVEL_10_0: - return D3D10_VS_OUTPUT_REGISTER_COUNT - GetReservedVertexOutputVectors(featureLevel); + case D3D_FEATURE_LEVEL_10_1: return D3D10_1_VS_OUTPUT_REGISTER_COUNT - GetReservedVertexOutputVectors(featureLevel); + case D3D_FEATURE_LEVEL_10_0: return D3D10_VS_OUTPUT_REGISTER_COUNT - GetReservedVertexOutputVectors(featureLevel); - // Use Shader Model 2.X limits - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 8 - GetReservedVertexOutputVectors(featureLevel); + // Use Shader Model 2.X limits + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return 8 - GetReservedVertexOutputVectors(featureLevel); - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximumVertexTextureUnits(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumVertexTextureUnits(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT; - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT; - // Vertex textures not supported on D3D11 Feature Level 9 according to - // http://msdn.microsoft.com/en-us/library/windows/desktop/ff476149.aspx - // ID3D11DeviceContext::VSSetSamplers and ID3D11DeviceContext::VSSetShaderResources - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 0; + // Vertex textures not supported on D3D11 Feature Level 9 according to + // http://msdn.microsoft.com/en-us/library/windows/desktop/ff476149.aspx + // ID3D11DeviceContext::VSSetSamplers and ID3D11DeviceContext::VSSetShaderResources + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return 0; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximumPixelUniformVectors(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumPixelUniformVectors(D3D_FEATURE_LEVEL featureLevel) { // TODO(geofflang): Remove hard-coded limit once the gl-uniform-arrays test can pass switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return 1024; // D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT; - - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return 1024; // D3D10_REQ_CONSTANT_BUFFER_ELEMENT_COUNT; - - // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476149.aspx - // ID3D11DeviceContext::PSSetConstantBuffers - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 32 - d3d11_gl::GetReservedFragmentUniformVectors(featureLevel); - - default: - UNREACHABLE(); - return 0; - } -} - -size_t GetMaximumPixelUniformBlocks(D3D_FEATURE_LEVEL featureLevel) -{ - switch (featureLevel) - { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - - d3d11::RESERVED_CONSTANT_BUFFER_SLOT_COUNT; - - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - - d3d11::RESERVED_CONSTANT_BUFFER_SLOT_COUNT; - - // Uniform blocks not supported on D3D11 Feature Level 9 - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 0; - - default: - UNREACHABLE(); - return 0; - } -} - -size_t GetMaximumPixelInputVectors(D3D_FEATURE_LEVEL featureLevel) -{ - switch (featureLevel) - { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_PS_INPUT_REGISTER_COUNT - GetReservedVertexOutputVectors(featureLevel); + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return 1024; // D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT; - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_PS_INPUT_REGISTER_COUNT - GetReservedVertexOutputVectors(featureLevel); + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return 1024; // D3D10_REQ_CONSTANT_BUFFER_ELEMENT_COUNT; - // Use Shader Model 2.X limits - case D3D_FEATURE_LEVEL_9_3: - return 8 - GetReservedVertexOutputVectors(featureLevel); - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 8 - GetReservedVertexOutputVectors(featureLevel); + // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476149.aspx ID3D11DeviceContext::PSSetConstantBuffers + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: + return 32 - d3d11_gl::GetReservedFragmentUniformVectors(featureLevel); - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximumPixelTextureUnits(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumPixelUniformBlocks(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: + return D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - + d3d11::RESERVED_CONSTANT_BUFFER_SLOT_COUNT; - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: + return D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - + d3d11::RESERVED_CONSTANT_BUFFER_SLOT_COUNT; - // http://msdn.microsoft.com/en-us/library/windows/desktop/ff476149.aspx - // ID3D11DeviceContext::PSSetShaderResources - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 16; + // Uniform blocks not supported on D3D11 Feature Level 9 + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return 0; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -int GetMinimumTexelOffset(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumPixelInputVectors(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE; - - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE; - - // Sampling functions with offsets are not available below shader model 4.0. - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 0; - - default: - UNREACHABLE(); - return 0; - } -} + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_PS_INPUT_REGISTER_COUNT - GetReservedVertexOutputVectors(featureLevel); -int GetMaximumTexelOffset(D3D_FEATURE_LEVEL featureLevel) -{ - switch (featureLevel) - { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE; - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return D3D10_PS_INPUT_REGISTER_COUNT - GetReservedVertexOutputVectors(featureLevel); - // Sampling functions with offsets are not available below shader model 4.0. - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 0; + // Use Shader Model 2.X limits + case D3D_FEATURE_LEVEL_9_3: return 8 - GetReservedVertexOutputVectors(featureLevel); + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return 8 - GetReservedVertexOutputVectors(featureLevel); - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximumConstantBufferSize(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumPixelTextureUnits(D3D_FEATURE_LEVEL featureLevel) { - // Returns a size_t despite the limit being a GLuint64 because size_t is the maximum - // size of - // any buffer that could be allocated. - - const size_t bytesPerComponent = 4 * sizeof(float); - switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT * bytesPerComponent; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT; - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return D3D10_REQ_CONSTANT_BUFFER_ELEMENT_COUNT * bytesPerComponent; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT; - // Limits from http://msdn.microsoft.com/en-us/library/windows/desktop/ff476501.aspx - // remarks section - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 4096 * bytesPerComponent; + // http://msdn.microsoft.com/en-us/library/windows/desktop/ff476149.aspx ID3D11DeviceContext::PSSetShaderResources + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return 16; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximumStreamOutputBuffers(D3D_FEATURE_LEVEL featureLevel) +static int GetMinimumTexelOffset(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return D3D11_SO_BUFFER_SLOT_COUNT; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE; - case D3D_FEATURE_LEVEL_10_1: - return D3D10_1_SO_BUFFER_SLOT_COUNT; - case D3D_FEATURE_LEVEL_10_0: - return D3D10_SO_BUFFER_SLOT_COUNT; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return D3D10_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE; - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 0; + // Sampling functions with offsets are not available below shader model 4.0. + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return 0; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximumStreamOutputInterleavedComponents(D3D_FEATURE_LEVEL featureLevel) +static int GetMaximumTexelOffset(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return GetMaximumVertexOutputVectors(featureLevel) * 4; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE; - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 0; + // Sampling functions with offsets are not available below shader model 4.0. + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return 0; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -size_t GetMaximumStreamOutputSeparateComponents(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumConstantBufferSize(D3D_FEATURE_LEVEL featureLevel) { + // Returns a size_t despite the limit being a GLuint64 because size_t is the maximum size of + // any buffer that could be allocated. + + const size_t bytesPerComponent = 4 * sizeof(float); + switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - return GetMaximumStreamOutputInterleavedComponents(featureLevel) / - GetMaximumStreamOutputBuffers(featureLevel); + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT * bytesPerComponent; - // D3D 10 and 10.1 only allow one output per output slot if an output slot other - // than zero is used. - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return 4; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return D3D10_REQ_CONSTANT_BUFFER_ELEMENT_COUNT * bytesPerComponent; - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 0; + // Limits from http://msdn.microsoft.com/en-us/library/windows/desktop/ff476501.aspx remarks section + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return 4096 * bytesPerComponent; - default: - UNREACHABLE(); - return 0; + default: UNREACHABLE(); return 0; } } -} // anonymous namespace - -unsigned int GetReservedVertexUniformVectors(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumStreamOutputBuffers(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return 0; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return D3D11_SO_BUFFER_SLOT_COUNT; - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 3; // dx_ViewAdjust, dx_ViewCoords and dx_ViewScale + case D3D_FEATURE_LEVEL_10_1: return D3D10_1_SO_BUFFER_SLOT_COUNT; + case D3D_FEATURE_LEVEL_10_0: return D3D10_SO_BUFFER_SLOT_COUNT; - default: - UNREACHABLE(); - return 0; + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return 0; + + default: UNREACHABLE(); return 0; } } -unsigned int GetReservedFragmentUniformVectors(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumStreamOutputInterleavedComponents(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - case D3D_FEATURE_LEVEL_10_0: - return 0; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 3; + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return GetMaximumVertexOutputVectors(featureLevel) * 4; - default: - UNREACHABLE(); - return 0; + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return 0; + + default: UNREACHABLE(); return 0; } } -GLint GetMaximumClientVersion(D3D_FEATURE_LEVEL featureLevel) +static size_t GetMaximumStreamOutputSeparateComponents(D3D_FEATURE_LEVEL featureLevel) { switch (featureLevel) { - case D3D_FEATURE_LEVEL_11_1: - case D3D_FEATURE_LEVEL_11_0: - case D3D_FEATURE_LEVEL_10_1: - return 3; + case D3D_FEATURE_LEVEL_11_1: + case D3D_FEATURE_LEVEL_11_0: return GetMaximumStreamOutputInterleavedComponents(featureLevel) / + GetMaximumStreamOutputBuffers(featureLevel); - case D3D_FEATURE_LEVEL_10_0: - case D3D_FEATURE_LEVEL_9_3: - case D3D_FEATURE_LEVEL_9_2: - case D3D_FEATURE_LEVEL_9_1: - return 2; - default: - UNREACHABLE(); - return 0; + // D3D 10 and 10.1 only allow one output per output slot if an output slot other than zero is used. + case D3D_FEATURE_LEVEL_10_1: + case D3D_FEATURE_LEVEL_10_0: return 4; + + case D3D_FEATURE_LEVEL_9_3: + case D3D_FEATURE_LEVEL_9_2: + case D3D_FEATURE_LEVEL_9_1: return 0; + + default: UNREACHABLE(); return 0; } } @@ -1220,7 +1239,6 @@ void GenerateCaps(ID3D11Device *device, ID3D11DeviceContext *deviceContext, cons extensions->lossyETCDecode = true; extensions->syncQuery = GetEventQuerySupport(featureLevel); extensions->copyTexture = true; - extensions->copyCompressedTexture = true; // D3D11 Feature Level 10_0+ uses SV_IsFrontFace in HLSL to emulate gl_FrontFacing. // D3D11 Feature Level 9_3 doesn't support SV_IsFrontFace, and has no equivalent, so can't support gl_FrontFacing. @@ -1252,336 +1270,6 @@ void GenerateCaps(ID3D11Device *device, ID3D11DeviceContext *deviceContext, cons } // namespace d3d11_gl -namespace gl_d3d11 -{ - -D3D11_BLEND ConvertBlendFunc(GLenum glBlend, bool isAlpha) -{ - D3D11_BLEND d3dBlend = D3D11_BLEND_ZERO; - - switch (glBlend) - { - case GL_ZERO: - d3dBlend = D3D11_BLEND_ZERO; - break; - case GL_ONE: - d3dBlend = D3D11_BLEND_ONE; - break; - case GL_SRC_COLOR: - d3dBlend = (isAlpha ? D3D11_BLEND_SRC_ALPHA : D3D11_BLEND_SRC_COLOR); - break; - case GL_ONE_MINUS_SRC_COLOR: - d3dBlend = (isAlpha ? D3D11_BLEND_INV_SRC_ALPHA : D3D11_BLEND_INV_SRC_COLOR); - break; - case GL_DST_COLOR: - d3dBlend = (isAlpha ? D3D11_BLEND_DEST_ALPHA : D3D11_BLEND_DEST_COLOR); - break; - case GL_ONE_MINUS_DST_COLOR: - d3dBlend = (isAlpha ? D3D11_BLEND_INV_DEST_ALPHA : D3D11_BLEND_INV_DEST_COLOR); - break; - case GL_SRC_ALPHA: - d3dBlend = D3D11_BLEND_SRC_ALPHA; - break; - case GL_ONE_MINUS_SRC_ALPHA: - d3dBlend = D3D11_BLEND_INV_SRC_ALPHA; - break; - case GL_DST_ALPHA: - d3dBlend = D3D11_BLEND_DEST_ALPHA; - break; - case GL_ONE_MINUS_DST_ALPHA: - d3dBlend = D3D11_BLEND_INV_DEST_ALPHA; - break; - case GL_CONSTANT_COLOR: - d3dBlend = D3D11_BLEND_BLEND_FACTOR; - break; - case GL_ONE_MINUS_CONSTANT_COLOR: - d3dBlend = D3D11_BLEND_INV_BLEND_FACTOR; - break; - case GL_CONSTANT_ALPHA: - d3dBlend = D3D11_BLEND_BLEND_FACTOR; - break; - case GL_ONE_MINUS_CONSTANT_ALPHA: - d3dBlend = D3D11_BLEND_INV_BLEND_FACTOR; - break; - case GL_SRC_ALPHA_SATURATE: - d3dBlend = D3D11_BLEND_SRC_ALPHA_SAT; - break; - default: - UNREACHABLE(); - } - - return d3dBlend; -} - -D3D11_BLEND_OP ConvertBlendOp(GLenum glBlendOp) -{ - D3D11_BLEND_OP d3dBlendOp = D3D11_BLEND_OP_ADD; - - switch (glBlendOp) - { - case GL_FUNC_ADD: - d3dBlendOp = D3D11_BLEND_OP_ADD; - break; - case GL_FUNC_SUBTRACT: - d3dBlendOp = D3D11_BLEND_OP_SUBTRACT; - break; - case GL_FUNC_REVERSE_SUBTRACT: - d3dBlendOp = D3D11_BLEND_OP_REV_SUBTRACT; - break; - case GL_MIN: - d3dBlendOp = D3D11_BLEND_OP_MIN; - break; - case GL_MAX: - d3dBlendOp = D3D11_BLEND_OP_MAX; - break; - default: - UNREACHABLE(); - } - - return d3dBlendOp; -} - -UINT8 ConvertColorMask(bool red, bool green, bool blue, bool alpha) -{ - UINT8 mask = 0; - if (red) - { - mask |= D3D11_COLOR_WRITE_ENABLE_RED; - } - if (green) - { - mask |= D3D11_COLOR_WRITE_ENABLE_GREEN; - } - if (blue) - { - mask |= D3D11_COLOR_WRITE_ENABLE_BLUE; - } - if (alpha) - { - mask |= D3D11_COLOR_WRITE_ENABLE_ALPHA; - } - return mask; -} - -D3D11_CULL_MODE ConvertCullMode(bool cullEnabled, GLenum cullMode) -{ - D3D11_CULL_MODE cull = D3D11_CULL_NONE; - - if (cullEnabled) - { - switch (cullMode) - { - case GL_FRONT: - cull = D3D11_CULL_FRONT; - break; - case GL_BACK: - cull = D3D11_CULL_BACK; - break; - case GL_FRONT_AND_BACK: - cull = D3D11_CULL_NONE; - break; - default: - UNREACHABLE(); - } - } - else - { - cull = D3D11_CULL_NONE; - } - - return cull; -} - -D3D11_COMPARISON_FUNC ConvertComparison(GLenum comparison) -{ - D3D11_COMPARISON_FUNC d3dComp = D3D11_COMPARISON_NEVER; - switch (comparison) - { - case GL_NEVER: - d3dComp = D3D11_COMPARISON_NEVER; - break; - case GL_ALWAYS: - d3dComp = D3D11_COMPARISON_ALWAYS; - break; - case GL_LESS: - d3dComp = D3D11_COMPARISON_LESS; - break; - case GL_LEQUAL: - d3dComp = D3D11_COMPARISON_LESS_EQUAL; - break; - case GL_EQUAL: - d3dComp = D3D11_COMPARISON_EQUAL; - break; - case GL_GREATER: - d3dComp = D3D11_COMPARISON_GREATER; - break; - case GL_GEQUAL: - d3dComp = D3D11_COMPARISON_GREATER_EQUAL; - break; - case GL_NOTEQUAL: - d3dComp = D3D11_COMPARISON_NOT_EQUAL; - break; - default: - UNREACHABLE(); - } - - return d3dComp; -} - -D3D11_DEPTH_WRITE_MASK ConvertDepthMask(bool depthWriteEnabled) -{ - return depthWriteEnabled ? D3D11_DEPTH_WRITE_MASK_ALL : D3D11_DEPTH_WRITE_MASK_ZERO; -} - -UINT8 ConvertStencilMask(GLuint stencilmask) -{ - return static_cast(stencilmask); -} - -D3D11_STENCIL_OP ConvertStencilOp(GLenum stencilOp) -{ - D3D11_STENCIL_OP d3dStencilOp = D3D11_STENCIL_OP_KEEP; - - switch (stencilOp) - { - case GL_ZERO: - d3dStencilOp = D3D11_STENCIL_OP_ZERO; - break; - case GL_KEEP: - d3dStencilOp = D3D11_STENCIL_OP_KEEP; - break; - case GL_REPLACE: - d3dStencilOp = D3D11_STENCIL_OP_REPLACE; - break; - case GL_INCR: - d3dStencilOp = D3D11_STENCIL_OP_INCR_SAT; - break; - case GL_DECR: - d3dStencilOp = D3D11_STENCIL_OP_DECR_SAT; - break; - case GL_INVERT: - d3dStencilOp = D3D11_STENCIL_OP_INVERT; - break; - case GL_INCR_WRAP: - d3dStencilOp = D3D11_STENCIL_OP_INCR; - break; - case GL_DECR_WRAP: - d3dStencilOp = D3D11_STENCIL_OP_DECR; - break; - default: - UNREACHABLE(); - } - - return d3dStencilOp; -} - -D3D11_FILTER ConvertFilter(GLenum minFilter, - GLenum magFilter, - float maxAnisotropy, - GLenum comparisonMode) -{ - bool comparison = comparisonMode != GL_NONE; - - if (maxAnisotropy > 1.0f) - { - return D3D11_ENCODE_ANISOTROPIC_FILTER(static_cast(comparison)); - } - else - { - D3D11_FILTER_TYPE dxMin = D3D11_FILTER_TYPE_POINT; - D3D11_FILTER_TYPE dxMip = D3D11_FILTER_TYPE_POINT; - switch (minFilter) - { - case GL_NEAREST: - dxMin = D3D11_FILTER_TYPE_POINT; - dxMip = D3D11_FILTER_TYPE_POINT; - break; - case GL_LINEAR: - dxMin = D3D11_FILTER_TYPE_LINEAR; - dxMip = D3D11_FILTER_TYPE_POINT; - break; - case GL_NEAREST_MIPMAP_NEAREST: - dxMin = D3D11_FILTER_TYPE_POINT; - dxMip = D3D11_FILTER_TYPE_POINT; - break; - case GL_LINEAR_MIPMAP_NEAREST: - dxMin = D3D11_FILTER_TYPE_LINEAR; - dxMip = D3D11_FILTER_TYPE_POINT; - break; - case GL_NEAREST_MIPMAP_LINEAR: - dxMin = D3D11_FILTER_TYPE_POINT; - dxMip = D3D11_FILTER_TYPE_LINEAR; - break; - case GL_LINEAR_MIPMAP_LINEAR: - dxMin = D3D11_FILTER_TYPE_LINEAR; - dxMip = D3D11_FILTER_TYPE_LINEAR; - break; - default: - UNREACHABLE(); - } - - D3D11_FILTER_TYPE dxMag = D3D11_FILTER_TYPE_POINT; - switch (magFilter) - { - case GL_NEAREST: - dxMag = D3D11_FILTER_TYPE_POINT; - break; - case GL_LINEAR: - dxMag = D3D11_FILTER_TYPE_LINEAR; - break; - default: - UNREACHABLE(); - } - - return D3D11_ENCODE_BASIC_FILTER(dxMin, dxMag, dxMip, - static_cast(comparison)); - } -} - -D3D11_TEXTURE_ADDRESS_MODE ConvertTextureWrap(GLenum wrap) -{ - switch (wrap) - { - case GL_REPEAT: - return D3D11_TEXTURE_ADDRESS_WRAP; - case GL_CLAMP_TO_EDGE: - return D3D11_TEXTURE_ADDRESS_CLAMP; - case GL_MIRRORED_REPEAT: - return D3D11_TEXTURE_ADDRESS_MIRROR; - default: - UNREACHABLE(); - } - - return D3D11_TEXTURE_ADDRESS_WRAP; -} - -UINT ConvertMaxAnisotropy(float maxAnisotropy, D3D_FEATURE_LEVEL featureLevel) -{ - return static_cast(std::min(maxAnisotropy, d3d11_gl::GetMaximumAnisotropy(featureLevel))); -} - -D3D11_QUERY ConvertQueryType(GLenum queryType) -{ - switch (queryType) - { - case GL_ANY_SAMPLES_PASSED_EXT: - case GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT: - return D3D11_QUERY_OCCLUSION; - case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: - return D3D11_QUERY_SO_STATISTICS; - case GL_TIME_ELAPSED_EXT: - // Two internal queries are also created for begin/end timestamps - return D3D11_QUERY_TIMESTAMP_DISJOINT; - case GL_COMMANDS_COMPLETED_CHROMIUM: - return D3D11_QUERY_EVENT; - default: - UNREACHABLE(); - return D3D11_QUERY_EVENT; - } -} - -} // namespace gl_d3d11 - namespace d3d11 { @@ -1791,6 +1479,7 @@ ID3D11InputLayout *LazyInputLayout::resolve(ID3D11Device *device) device->CreateInputLayout(&mInputDesc[0], static_cast(mInputDesc.size()), mByteCode, mByteCodeLen, &mResource); ASSERT(SUCCEEDED(result)); + UNUSED_ASSERTION_VARIABLE(result); d3d11::SetDebugName(mResource, mDebugName); } @@ -1810,6 +1499,7 @@ ID3D11BlendState *LazyBlendState::resolve(ID3D11Device *device) { HRESULT result = device->CreateBlendState(&mDesc, &mResource); ASSERT(SUCCEEDED(result)); + UNUSED_ASSERTION_VARIABLE(result); d3d11::SetDebugName(mResource, mDebugName); } @@ -1828,7 +1518,7 @@ WorkaroundsD3D GenerateWorkarounds(const Renderer11DeviceCaps &deviceCaps, workarounds.useInstancedPointSpriteEmulation = is9_3; // TODO(jmadill): Narrow problematic driver range. - if (IsNvidia(adapterDesc.VendorId)) + if (adapterDesc.VendorId == VENDOR_ID_NVIDIA) { if (deviceCaps.driverVersion.valid()) { @@ -1847,32 +1537,10 @@ WorkaroundsD3D GenerateWorkarounds(const Renderer11DeviceCaps &deviceCaps, // TODO(jmadill): Disable workaround when we have a fixed compiler DLL. workarounds.expandIntegerPowExpressions = true; - workarounds.flushAfterEndingTransformFeedback = IsNvidia(adapterDesc.VendorId); - workarounds.getDimensionsIgnoresBaseLevel = IsNvidia(adapterDesc.VendorId); - - workarounds.preAddTexelFetchOffsets = IsIntel(adapterDesc.VendorId); - workarounds.disableB5G6R5Support = IsIntel(adapterDesc.VendorId); - workarounds.rewriteUnaryMinusOperator = - IsIntel(adapterDesc.VendorId) && - (IsBroadwell(adapterDesc.DeviceId) || IsHaswell(adapterDesc.DeviceId)); - workarounds.emulateIsnanFloat = - IsIntel(adapterDesc.VendorId) && IsSkylake(adapterDesc.DeviceId); - workarounds.callClearTwice = - IsIntel(adapterDesc.VendorId) && IsSkylake(adapterDesc.DeviceId); - - // TODO(jmadill): Disable when we have a fixed driver version. - workarounds.emulateTinyStencilTextures = IsAMD(adapterDesc.VendorId); - - // The tiny stencil texture workaround involves using CopySubresource or UpdateSubresource on a - // depth stencil texture. This is not allowed until feature level 10.1 but since it is not - // possible to support ES3 on these devices, there is no need for the workaround to begin with - // (anglebug.com/1572). - if (deviceCaps.featureLevel < D3D_FEATURE_LEVEL_10_1) - { - workarounds.emulateTinyStencilTextures = false; - } + workarounds.flushAfterEndingTransformFeedback = (adapterDesc.VendorId == VENDOR_ID_NVIDIA); + workarounds.getDimensionsIgnoresBaseLevel = (adapterDesc.VendorId == VENDOR_ID_NVIDIA); - workarounds.useSystemMemoryForConstantBuffers = IsIntel(adapterDesc.VendorId); + workarounds.preAddTexelFetchOffsets = (adapterDesc.VendorId == VENDOR_ID_INTEL); return workarounds; } diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.h b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.h index 463571cf9..2690fc6f5 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.h @@ -52,7 +52,6 @@ D3D11_STENCIL_OP ConvertStencilOp(GLenum stencilOp); D3D11_FILTER ConvertFilter(GLenum minFilter, GLenum magFilter, float maxAnisotropy, GLenum comparisonMode); D3D11_TEXTURE_ADDRESS_MODE ConvertTextureWrap(GLenum wrap); -UINT ConvertMaxAnisotropy(float maxAnisotropy, D3D_FEATURE_LEVEL featureLevel); D3D11_QUERY ConvertQueryType(GLenum queryType); diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.cpp index a9dfec56b..6697a1177 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.cpp @@ -15,19 +15,40 @@ namespace rx namespace d3d11 { -const Format &Format::getSwizzleFormat(const Renderer11DeviceCaps &deviceCaps) const +Format::Format() + : internalFormat(GL_NONE), + format(angle::Format::Get(angle::Format::ID::NONE)), + texFormat(DXGI_FORMAT_UNKNOWN), + srvFormat(DXGI_FORMAT_UNKNOWN), + rtvFormat(DXGI_FORMAT_UNKNOWN), + dsvFormat(DXGI_FORMAT_UNKNOWN), + blitSRVFormat(DXGI_FORMAT_UNKNOWN), + swizzle(*this), + dataInitializerFunction(nullptr) { - return (swizzleFormat == internalFormat ? *this : Format::Get(swizzleFormat, deviceCaps)); } -LoadFunctionMap Format::getLoadFunctions() const +Format::Format(GLenum internalFormat, + angle::Format::ID formatID, + DXGI_FORMAT texFormat, + DXGI_FORMAT srvFormat, + DXGI_FORMAT rtvFormat, + DXGI_FORMAT dsvFormat, + DXGI_FORMAT blitSRVFormat, + GLenum swizzleFormat, + InitializeTextureDataFunction internalFormatInitializer, + const Renderer11DeviceCaps &deviceCaps) + : internalFormat(internalFormat), + format(angle::Format::Get(formatID)), + texFormat(texFormat), + srvFormat(srvFormat), + rtvFormat(rtvFormat), + dsvFormat(dsvFormat), + blitSRVFormat(blitSRVFormat), + swizzle(swizzleFormat == internalFormat ? *this : Format::Get(swizzleFormat, deviceCaps)), + dataInitializerFunction(internalFormatInitializer), + loadFunctions(GetLoadFunctionsMap(internalFormat, formatID)) { - return GetLoadFunctionsMap(internalFormat, formatID); -} - -const angle::Format &Format::format() const -{ - return angle::Format::Get(formatID); } } // namespace d3d11 diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.h b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.h index 3be759f19..8e05a2eb8 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.h @@ -32,25 +32,22 @@ namespace d3d11 // DSVs given a GL internal format. struct Format final : angle::NonCopyable { - constexpr Format(); - constexpr Format(GLenum internalFormat, - angle::Format::ID formatID, - DXGI_FORMAT texFormat, - DXGI_FORMAT srvFormat, - DXGI_FORMAT rtvFormat, - DXGI_FORMAT dsvFormat, - DXGI_FORMAT blitSRVFormat, - GLenum swizzleFormat, - InitializeTextureDataFunction internalFormatInitializer); + Format(); + Format(GLenum internalFormat, + angle::Format::ID formatID, + DXGI_FORMAT texFormat, + DXGI_FORMAT srvFormat, + DXGI_FORMAT rtvFormat, + DXGI_FORMAT dsvFormat, + DXGI_FORMAT blitSRVFormat, + GLenum swizzleFormat, + InitializeTextureDataFunction internalFormatInitializer, + const Renderer11DeviceCaps &deviceCaps); static const Format &Get(GLenum internalFormat, const Renderer11DeviceCaps &deviceCaps); - const Format &getSwizzleFormat(const Renderer11DeviceCaps &deviceCaps) const; - LoadFunctionMap getLoadFunctions() const; - const angle::Format &format() const; - GLenum internalFormat; - angle::Format::ID formatID; + const angle::Format &format; DXGI_FORMAT texFormat; DXGI_FORMAT srvFormat; @@ -59,44 +56,12 @@ struct Format final : angle::NonCopyable DXGI_FORMAT blitSRVFormat; - GLenum swizzleFormat; + const Format &swizzle; InitializeTextureDataFunction dataInitializerFunction; -}; -constexpr Format::Format() - : internalFormat(GL_NONE), - formatID(angle::Format::ID::NONE), - texFormat(DXGI_FORMAT_UNKNOWN), - srvFormat(DXGI_FORMAT_UNKNOWN), - rtvFormat(DXGI_FORMAT_UNKNOWN), - dsvFormat(DXGI_FORMAT_UNKNOWN), - blitSRVFormat(DXGI_FORMAT_UNKNOWN), - swizzleFormat(GL_NONE), - dataInitializerFunction(nullptr) -{ -} - -constexpr Format::Format(GLenum internalFormat, - angle::Format::ID formatID, - DXGI_FORMAT texFormat, - DXGI_FORMAT srvFormat, - DXGI_FORMAT rtvFormat, - DXGI_FORMAT dsvFormat, - DXGI_FORMAT blitSRVFormat, - GLenum swizzleFormat, - InitializeTextureDataFunction internalFormatInitializer) - : internalFormat(internalFormat), - formatID(formatID), - texFormat(texFormat), - srvFormat(srvFormat), - rtvFormat(rtvFormat), - dsvFormat(dsvFormat), - blitSRVFormat(blitSRVFormat), - swizzleFormat(swizzleFormat), - dataInitializerFunction(internalFormatInitializer) -{ -} + LoadFunctionMap loadFunctions; +}; } // namespace d3d11 diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table_autogen.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table_autogen.cpp index dd9c8757f..d5eab7bc1 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table_autogen.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table_autogen.cpp @@ -35,56 +35,60 @@ const Format &Format::Get(GLenum internalFormat, const Renderer11DeviceCaps &dev { case GL_ALPHA16F_EXT: { - static constexpr Format info(GL_ALPHA16F_EXT, - angle::Format::ID::R16G16B16A16_FLOAT, - DXGI_FORMAT_R16G16B16A16_FLOAT, - DXGI_FORMAT_R16G16B16A16_FLOAT, - DXGI_FORMAT_R16G16B16A16_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16B16A16_FLOAT, - GL_RGBA16F, - nullptr); + static const Format info(GL_ALPHA16F_EXT, + angle::Format::ID::R16G16B16A16_FLOAT, + DXGI_FORMAT_R16G16B16A16_FLOAT, + DXGI_FORMAT_R16G16B16A16_FLOAT, + DXGI_FORMAT_R16G16B16A16_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16B16A16_FLOAT, + GL_RGBA16F, + nullptr, + deviceCaps); return info; } case GL_ALPHA32F_EXT: { - static constexpr Format info(GL_ALPHA32F_EXT, - angle::Format::ID::R32G32B32A32_FLOAT, - DXGI_FORMAT_R32G32B32A32_FLOAT, - DXGI_FORMAT_R32G32B32A32_FLOAT, - DXGI_FORMAT_R32G32B32A32_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R32G32B32A32_FLOAT, - GL_RGBA32F, - nullptr); + static const Format info(GL_ALPHA32F_EXT, + angle::Format::ID::R32G32B32A32_FLOAT, + DXGI_FORMAT_R32G32B32A32_FLOAT, + DXGI_FORMAT_R32G32B32A32_FLOAT, + DXGI_FORMAT_R32G32B32A32_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R32G32B32A32_FLOAT, + GL_RGBA32F, + nullptr, + deviceCaps); return info; } case GL_ALPHA8_EXT: { if (OnlyFL10Plus(deviceCaps)) { - static constexpr Format info(GL_ALPHA8_EXT, - angle::Format::ID::A8_UNORM, - DXGI_FORMAT_A8_UNORM, - DXGI_FORMAT_A8_UNORM, - DXGI_FORMAT_A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_A8_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_ALPHA8_EXT, + angle::Format::ID::A8_UNORM, + DXGI_FORMAT_A8_UNORM, + DXGI_FORMAT_A8_UNORM, + DXGI_FORMAT_A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_A8_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } else { - static constexpr Format info(GL_ALPHA8_EXT, - angle::Format::ID::R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_ALPHA8_EXT, + angle::Format::ID::R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } } @@ -92,684 +96,736 @@ const Format &Format::Get(GLenum internalFormat, const Renderer11DeviceCaps &dev { if (SupportsFormat(DXGI_FORMAT_B5G6R5_UNORM, deviceCaps)) { - static constexpr Format info(GL_BGR565_ANGLEX, - angle::Format::ID::B5G6R5_UNORM, - DXGI_FORMAT_B5G6R5_UNORM, - DXGI_FORMAT_B5G6R5_UNORM, - DXGI_FORMAT_B5G6R5_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_B5G6R5_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_BGR565_ANGLEX, + angle::Format::ID::B5G6R5_UNORM, + DXGI_FORMAT_B5G6R5_UNORM, + DXGI_FORMAT_B5G6R5_UNORM, + DXGI_FORMAT_B5G6R5_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_B5G6R5_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } else { - static constexpr Format info(GL_BGR565_ANGLEX, - angle::Format::ID::R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_BGR565_ANGLEX, + angle::Format::ID::R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } } case GL_BGR5_A1_ANGLEX: { - static constexpr Format info(GL_BGR5_A1_ANGLEX, - angle::Format::ID::B8G8R8A8_UNORM, - DXGI_FORMAT_B8G8R8A8_UNORM, - DXGI_FORMAT_B8G8R8A8_UNORM, - DXGI_FORMAT_B8G8R8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_B8G8R8A8_UNORM, - GL_BGRA8_EXT, - nullptr); + static const Format info(GL_BGR5_A1_ANGLEX, + angle::Format::ID::B8G8R8A8_UNORM, + DXGI_FORMAT_B8G8R8A8_UNORM, + DXGI_FORMAT_B8G8R8A8_UNORM, + DXGI_FORMAT_B8G8R8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_B8G8R8A8_UNORM, + GL_BGRA8_EXT, + nullptr, + deviceCaps); return info; } case GL_BGRA4_ANGLEX: { - static constexpr Format info(GL_BGRA4_ANGLEX, - angle::Format::ID::B8G8R8A8_UNORM, - DXGI_FORMAT_B8G8R8A8_UNORM, - DXGI_FORMAT_B8G8R8A8_UNORM, - DXGI_FORMAT_B8G8R8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_B8G8R8A8_UNORM, - GL_BGRA8_EXT, - nullptr); + static const Format info(GL_BGRA4_ANGLEX, + angle::Format::ID::B8G8R8A8_UNORM, + DXGI_FORMAT_B8G8R8A8_UNORM, + DXGI_FORMAT_B8G8R8A8_UNORM, + DXGI_FORMAT_B8G8R8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_B8G8R8A8_UNORM, + GL_BGRA8_EXT, + nullptr, + deviceCaps); return info; } case GL_BGRA8_EXT: { - static constexpr Format info(GL_BGRA8_EXT, - angle::Format::ID::B8G8R8A8_UNORM, - DXGI_FORMAT_B8G8R8A8_UNORM, - DXGI_FORMAT_B8G8R8A8_UNORM, - DXGI_FORMAT_B8G8R8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_B8G8R8A8_UNORM, - GL_BGRA8_EXT, - nullptr); + static const Format info(GL_BGRA8_EXT, + angle::Format::ID::B8G8R8A8_UNORM, + DXGI_FORMAT_B8G8R8A8_UNORM, + DXGI_FORMAT_B8G8R8A8_UNORM, + DXGI_FORMAT_B8G8R8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_B8G8R8A8_UNORM, + GL_BGRA8_EXT, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_R11_EAC: { - static constexpr Format info(GL_COMPRESSED_R11_EAC, - angle::Format::ID::R8_UNORM, - DXGI_FORMAT_R8_UNORM, - DXGI_FORMAT_R8_UNORM, - DXGI_FORMAT_R8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_COMPRESSED_R11_EAC, + angle::Format::ID::R8_UNORM, + DXGI_FORMAT_R8_UNORM, + DXGI_FORMAT_R8_UNORM, + DXGI_FORMAT_R8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RG11_EAC: { - static constexpr Format info(GL_COMPRESSED_RG11_EAC, - angle::Format::ID::R8G8_UNORM, - DXGI_FORMAT_R8G8_UNORM, - DXGI_FORMAT_R8G8_UNORM, - DXGI_FORMAT_R8G8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_COMPRESSED_RG11_EAC, + angle::Format::ID::R8G8_UNORM, + DXGI_FORMAT_R8G8_UNORM, + DXGI_FORMAT_R8G8_UNORM, + DXGI_FORMAT_R8G8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGB8_ETC2: { - static constexpr Format info(GL_COMPRESSED_RGB8_ETC2, - angle::Format::ID::R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM, - GL_RGBA8, - Initialize4ComponentData); + static const Format info(GL_COMPRESSED_RGB8_ETC2, + angle::Format::ID::R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM, + GL_RGBA8, + Initialize4ComponentData, + deviceCaps); return info; } case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: { - static constexpr Format info(GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, - angle::Format::ID::R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM, - GL_RGBA8, - Initialize4ComponentData); + static const Format info(GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, + angle::Format::ID::R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM, + GL_RGBA8, + Initialize4ComponentData, + deviceCaps); return info; } case GL_COMPRESSED_RGBA8_ETC2_EAC: { - static constexpr Format info(GL_COMPRESSED_RGBA8_ETC2_EAC, - angle::Format::ID::R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_COMPRESSED_RGBA8_ETC2_EAC, + angle::Format::ID::R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_ASTC_10x10_KHR: { - static constexpr Format info(GL_COMPRESSED_RGBA_ASTC_10x10_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_ASTC_10x10_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_ASTC_10x5_KHR: { - static constexpr Format info(GL_COMPRESSED_RGBA_ASTC_10x5_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_ASTC_10x5_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_ASTC_10x6_KHR: { - static constexpr Format info(GL_COMPRESSED_RGBA_ASTC_10x6_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_ASTC_10x6_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_ASTC_10x8_KHR: { - static constexpr Format info(GL_COMPRESSED_RGBA_ASTC_10x8_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_ASTC_10x8_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_ASTC_12x10_KHR: { - static constexpr Format info(GL_COMPRESSED_RGBA_ASTC_12x10_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_ASTC_12x10_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_ASTC_12x12_KHR: { - static constexpr Format info(GL_COMPRESSED_RGBA_ASTC_12x12_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_ASTC_12x12_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_ASTC_4x4_KHR: { - static constexpr Format info(GL_COMPRESSED_RGBA_ASTC_4x4_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_ASTC_4x4_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_ASTC_5x4_KHR: { - static constexpr Format info(GL_COMPRESSED_RGBA_ASTC_5x4_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_ASTC_5x4_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_ASTC_5x5_KHR: { - static constexpr Format info(GL_COMPRESSED_RGBA_ASTC_5x5_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_ASTC_5x5_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_ASTC_6x5_KHR: { - static constexpr Format info(GL_COMPRESSED_RGBA_ASTC_6x5_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_ASTC_6x5_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_ASTC_6x6_KHR: { - static constexpr Format info(GL_COMPRESSED_RGBA_ASTC_6x6_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_ASTC_6x6_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_ASTC_8x5_KHR: { - static constexpr Format info(GL_COMPRESSED_RGBA_ASTC_8x5_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_ASTC_8x5_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_ASTC_8x6_KHR: { - static constexpr Format info(GL_COMPRESSED_RGBA_ASTC_8x6_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_ASTC_8x6_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_ASTC_8x8_KHR: { - static constexpr Format info(GL_COMPRESSED_RGBA_ASTC_8x8_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_ASTC_8x8_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: { - static constexpr Format info(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, - angle::Format::ID::BC1_RGBA_UNORM_BLOCK, - DXGI_FORMAT_BC1_UNORM, - DXGI_FORMAT_BC1_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_BC1_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, + angle::Format::ID::BC1_RGBA_UNORM_BLOCK, + DXGI_FORMAT_BC1_UNORM, + DXGI_FORMAT_BC1_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_BC1_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE: { - static constexpr Format info(GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE, - angle::Format::ID::BC2_RGBA_UNORM_BLOCK, - DXGI_FORMAT_BC2_UNORM, - DXGI_FORMAT_BC2_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_BC2_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE, + angle::Format::ID::BC2_RGBA_UNORM_BLOCK, + DXGI_FORMAT_BC2_UNORM, + DXGI_FORMAT_BC2_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_BC2_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE: { - static constexpr Format info(GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, - angle::Format::ID::BC3_RGBA_UNORM_BLOCK, - DXGI_FORMAT_BC3_UNORM, - DXGI_FORMAT_BC3_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_BC3_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, + angle::Format::ID::BC3_RGBA_UNORM_BLOCK, + DXGI_FORMAT_BC3_UNORM, + DXGI_FORMAT_BC3_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_BC3_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: { - static constexpr Format info(GL_COMPRESSED_RGB_S3TC_DXT1_EXT, - angle::Format::ID::BC1_RGB_UNORM_BLOCK, - DXGI_FORMAT_BC1_UNORM, - DXGI_FORMAT_BC1_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_BC1_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_COMPRESSED_RGB_S3TC_DXT1_EXT, + angle::Format::ID::BC1_RGB_UNORM_BLOCK, + DXGI_FORMAT_BC1_UNORM, + DXGI_FORMAT_BC1_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_BC1_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SIGNED_R11_EAC: { - static constexpr Format info(GL_COMPRESSED_SIGNED_R11_EAC, - angle::Format::ID::R8_SNORM, - DXGI_FORMAT_R8_SNORM, - DXGI_FORMAT_R8_SNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8_SNORM, - GL_RGBA8_SNORM, - nullptr); + static const Format info(GL_COMPRESSED_SIGNED_R11_EAC, + angle::Format::ID::R8_SNORM, + DXGI_FORMAT_R8_SNORM, + DXGI_FORMAT_R8_SNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8_SNORM, + GL_RGBA8_SNORM, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SIGNED_RG11_EAC: { - static constexpr Format info(GL_COMPRESSED_SIGNED_RG11_EAC, - angle::Format::ID::R8G8_SNORM, - DXGI_FORMAT_R8G8_SNORM, - DXGI_FORMAT_R8G8_SNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8_SNORM, - GL_RGBA8_SNORM, - nullptr); + static const Format info(GL_COMPRESSED_SIGNED_RG11_EAC, + angle::Format::ID::R8G8_SNORM, + DXGI_FORMAT_R8G8_SNORM, + DXGI_FORMAT_R8G8_SNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8_SNORM, + GL_RGBA8_SNORM, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, - angle::Format::ID::R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - GL_SRGB8_ALPHA8, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, + angle::Format::ID::R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + GL_SRGB8_ALPHA8, + nullptr, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_ETC2: { - static constexpr Format info(GL_COMPRESSED_SRGB8_ETC2, - angle::Format::ID::R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - GL_SRGB8_ALPHA8, - Initialize4ComponentData); + static const Format info(GL_COMPRESSED_SRGB8_ETC2, + angle::Format::ID::R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + GL_SRGB8_ALPHA8, + Initialize4ComponentData, + deviceCaps); return info; } case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: { - static constexpr Format info(GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, - angle::Format::ID::R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - GL_SRGB8_ALPHA8, - nullptr); + static const Format info(GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, + angle::Format::ID::R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + GL_SRGB8_ALPHA8, + nullptr, + deviceCaps); return info; } case GL_DEPTH24_STENCIL8: { if (OnlyFL10Plus(deviceCaps)) { - static constexpr Format info(GL_DEPTH24_STENCIL8, - angle::Format::ID::D24_UNORM_S8_UINT, - DXGI_FORMAT_R24G8_TYPELESS, - DXGI_FORMAT_R24_UNORM_X8_TYPELESS, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_D24_UNORM_S8_UINT, - DXGI_FORMAT_R24_UNORM_X8_TYPELESS, - GL_RGBA32F, - nullptr); + static const Format info(GL_DEPTH24_STENCIL8, + angle::Format::ID::D24_UNORM_S8_UINT, + DXGI_FORMAT_R24G8_TYPELESS, + DXGI_FORMAT_R24_UNORM_X8_TYPELESS, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_D24_UNORM_S8_UINT, + DXGI_FORMAT_R24_UNORM_X8_TYPELESS, + GL_RGBA32F, + nullptr, + deviceCaps); return info; } else { - static constexpr Format info(GL_DEPTH24_STENCIL8, - angle::Format::ID::D24_UNORM_S8_UINT, - DXGI_FORMAT_D24_UNORM_S8_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_D24_UNORM_S8_UINT, - DXGI_FORMAT_UNKNOWN, - GL_RGBA32F, - nullptr); + static const Format info(GL_DEPTH24_STENCIL8, + angle::Format::ID::D24_UNORM_S8_UINT, + DXGI_FORMAT_D24_UNORM_S8_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_D24_UNORM_S8_UINT, + DXGI_FORMAT_UNKNOWN, + GL_RGBA32F, + nullptr, + deviceCaps); return info; } } case GL_DEPTH32F_STENCIL8: { - static constexpr Format info(GL_DEPTH32F_STENCIL8, - angle::Format::ID::D32_FLOAT_S8X24_UINT, - DXGI_FORMAT_R32G8X24_TYPELESS, - DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_D32_FLOAT_S8X24_UINT, - DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS, - GL_RGBA32F, - nullptr); + static const Format info(GL_DEPTH32F_STENCIL8, + angle::Format::ID::D32_FLOAT_S8X24_UINT, + DXGI_FORMAT_R32G8X24_TYPELESS, + DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_D32_FLOAT_S8X24_UINT, + DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS, + GL_RGBA32F, + nullptr, + deviceCaps); return info; } case GL_DEPTH_COMPONENT16: { if (OnlyFL10Plus(deviceCaps)) { - static constexpr Format info(GL_DEPTH_COMPONENT16, - angle::Format::ID::D16_UNORM, - DXGI_FORMAT_R16_TYPELESS, - DXGI_FORMAT_R16_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_D16_UNORM, - DXGI_FORMAT_R16_UNORM, - GL_RGBA16_EXT, - nullptr); + static const Format info(GL_DEPTH_COMPONENT16, + angle::Format::ID::D16_UNORM, + DXGI_FORMAT_R16_TYPELESS, + DXGI_FORMAT_R16_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_D16_UNORM, + DXGI_FORMAT_R16_UNORM, + GL_RGBA16_EXT, + nullptr, + deviceCaps); return info; } else { - static constexpr Format info(GL_DEPTH_COMPONENT16, - angle::Format::ID::D16_UNORM, - DXGI_FORMAT_D16_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_D16_UNORM, - DXGI_FORMAT_UNKNOWN, - GL_RGBA16_EXT, - nullptr); + static const Format info(GL_DEPTH_COMPONENT16, + angle::Format::ID::D16_UNORM, + DXGI_FORMAT_D16_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_D16_UNORM, + DXGI_FORMAT_UNKNOWN, + GL_RGBA16_EXT, + nullptr, + deviceCaps); return info; } } @@ -777,684 +833,736 @@ const Format &Format::Get(GLenum internalFormat, const Renderer11DeviceCaps &dev { if (OnlyFL10Plus(deviceCaps)) { - static constexpr Format info(GL_DEPTH_COMPONENT24, - angle::Format::ID::D24_UNORM_S8_UINT, - DXGI_FORMAT_R24G8_TYPELESS, - DXGI_FORMAT_R24_UNORM_X8_TYPELESS, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_D24_UNORM_S8_UINT, - DXGI_FORMAT_R24_UNORM_X8_TYPELESS, - GL_RGBA32F, - nullptr); + static const Format info(GL_DEPTH_COMPONENT24, + angle::Format::ID::D24_UNORM_S8_UINT, + DXGI_FORMAT_R24G8_TYPELESS, + DXGI_FORMAT_R24_UNORM_X8_TYPELESS, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_D24_UNORM_S8_UINT, + DXGI_FORMAT_R24_UNORM_X8_TYPELESS, + GL_RGBA32F, + nullptr, + deviceCaps); return info; } else { - static constexpr Format info(GL_DEPTH_COMPONENT24, - angle::Format::ID::D24_UNORM_S8_UINT, - DXGI_FORMAT_D24_UNORM_S8_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_D24_UNORM_S8_UINT, - DXGI_FORMAT_UNKNOWN, - GL_RGBA32F, - nullptr); + static const Format info(GL_DEPTH_COMPONENT24, + angle::Format::ID::D24_UNORM_S8_UINT, + DXGI_FORMAT_D24_UNORM_S8_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_D24_UNORM_S8_UINT, + DXGI_FORMAT_UNKNOWN, + GL_RGBA32F, + nullptr, + deviceCaps); return info; } } case GL_DEPTH_COMPONENT32F: { - static constexpr Format info(GL_DEPTH_COMPONENT32F, - angle::Format::ID::D32_FLOAT, - DXGI_FORMAT_R32_TYPELESS, - DXGI_FORMAT_R32_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_D32_FLOAT, - DXGI_FORMAT_R32_FLOAT, - GL_RGBA32F, - nullptr); + static const Format info(GL_DEPTH_COMPONENT32F, + angle::Format::ID::D32_FLOAT, + DXGI_FORMAT_R32_TYPELESS, + DXGI_FORMAT_R32_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_D32_FLOAT, + DXGI_FORMAT_R32_FLOAT, + GL_RGBA32F, + nullptr, + deviceCaps); return info; } case GL_DEPTH_COMPONENT32_OES: { if (OnlyFL10Plus(deviceCaps)) { - static constexpr Format info(GL_DEPTH_COMPONENT32_OES, - angle::Format::ID::D24_UNORM_S8_UINT, - DXGI_FORMAT_R24G8_TYPELESS, - DXGI_FORMAT_R24_UNORM_X8_TYPELESS, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_D24_UNORM_S8_UINT, - DXGI_FORMAT_R24_UNORM_X8_TYPELESS, - GL_RGBA32F, - nullptr); + static const Format info(GL_DEPTH_COMPONENT32_OES, + angle::Format::ID::D24_UNORM_S8_UINT, + DXGI_FORMAT_R24G8_TYPELESS, + DXGI_FORMAT_R24_UNORM_X8_TYPELESS, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_D24_UNORM_S8_UINT, + DXGI_FORMAT_R24_UNORM_X8_TYPELESS, + GL_RGBA32F, + nullptr, + deviceCaps); return info; } else { - static constexpr Format info(GL_DEPTH_COMPONENT32_OES, - angle::Format::ID::D24_UNORM_S8_UINT, - DXGI_FORMAT_D24_UNORM_S8_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_D24_UNORM_S8_UINT, - DXGI_FORMAT_UNKNOWN, - GL_RGBA32F, - nullptr); + static const Format info(GL_DEPTH_COMPONENT32_OES, + angle::Format::ID::D24_UNORM_S8_UINT, + DXGI_FORMAT_D24_UNORM_S8_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_D24_UNORM_S8_UINT, + DXGI_FORMAT_UNKNOWN, + GL_RGBA32F, + nullptr, + deviceCaps); return info; } } case GL_ETC1_RGB8_LOSSY_DECODE_ANGLE: { - static constexpr Format info(GL_ETC1_RGB8_LOSSY_DECODE_ANGLE, - angle::Format::ID::BC1_RGB_UNORM_BLOCK, - DXGI_FORMAT_BC1_UNORM, - DXGI_FORMAT_BC1_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_BC1_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_ETC1_RGB8_LOSSY_DECODE_ANGLE, + angle::Format::ID::BC1_RGB_UNORM_BLOCK, + DXGI_FORMAT_BC1_UNORM, + DXGI_FORMAT_BC1_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_BC1_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } case GL_ETC1_RGB8_OES: { - static constexpr Format info(GL_ETC1_RGB8_OES, - angle::Format::ID::R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM, - GL_RGBA8, - Initialize4ComponentData); + static const Format info(GL_ETC1_RGB8_OES, + angle::Format::ID::R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM, + GL_RGBA8, + Initialize4ComponentData, + deviceCaps); return info; } case GL_LUMINANCE16F_EXT: { - static constexpr Format info(GL_LUMINANCE16F_EXT, - angle::Format::ID::R16G16B16A16_FLOAT, - DXGI_FORMAT_R16G16B16A16_FLOAT, - DXGI_FORMAT_R16G16B16A16_FLOAT, - DXGI_FORMAT_R16G16B16A16_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16B16A16_FLOAT, - GL_RGBA16F, - Initialize4ComponentData); + static const Format info(GL_LUMINANCE16F_EXT, + angle::Format::ID::R16G16B16A16_FLOAT, + DXGI_FORMAT_R16G16B16A16_FLOAT, + DXGI_FORMAT_R16G16B16A16_FLOAT, + DXGI_FORMAT_R16G16B16A16_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16B16A16_FLOAT, + GL_RGBA16F, + Initialize4ComponentData, + deviceCaps); return info; } case GL_LUMINANCE32F_EXT: { - static constexpr Format info(GL_LUMINANCE32F_EXT, - angle::Format::ID::R32G32B32A32_FLOAT, - DXGI_FORMAT_R32G32B32A32_FLOAT, - DXGI_FORMAT_R32G32B32A32_FLOAT, - DXGI_FORMAT_R32G32B32A32_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R32G32B32A32_FLOAT, - GL_RGBA32F, - Initialize4ComponentData); + static const Format info(GL_LUMINANCE32F_EXT, + angle::Format::ID::R32G32B32A32_FLOAT, + DXGI_FORMAT_R32G32B32A32_FLOAT, + DXGI_FORMAT_R32G32B32A32_FLOAT, + DXGI_FORMAT_R32G32B32A32_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R32G32B32A32_FLOAT, + GL_RGBA32F, + Initialize4ComponentData, + deviceCaps); return info; } case GL_LUMINANCE8_ALPHA8_EXT: { - static constexpr Format info(GL_LUMINANCE8_ALPHA8_EXT, - angle::Format::ID::R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_LUMINANCE8_ALPHA8_EXT, + angle::Format::ID::R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } case GL_LUMINANCE8_EXT: { - static constexpr Format info(GL_LUMINANCE8_EXT, - angle::Format::ID::R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM, - GL_RGBA8, - Initialize4ComponentData); + static const Format info(GL_LUMINANCE8_EXT, + angle::Format::ID::R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM, + GL_RGBA8, + Initialize4ComponentData, + deviceCaps); return info; } case GL_LUMINANCE_ALPHA16F_EXT: { - static constexpr Format info(GL_LUMINANCE_ALPHA16F_EXT, - angle::Format::ID::R16G16B16A16_FLOAT, - DXGI_FORMAT_R16G16B16A16_FLOAT, - DXGI_FORMAT_R16G16B16A16_FLOAT, - DXGI_FORMAT_R16G16B16A16_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16B16A16_FLOAT, - GL_RGBA16F, - nullptr); + static const Format info(GL_LUMINANCE_ALPHA16F_EXT, + angle::Format::ID::R16G16B16A16_FLOAT, + DXGI_FORMAT_R16G16B16A16_FLOAT, + DXGI_FORMAT_R16G16B16A16_FLOAT, + DXGI_FORMAT_R16G16B16A16_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16B16A16_FLOAT, + GL_RGBA16F, + nullptr, + deviceCaps); return info; } case GL_LUMINANCE_ALPHA32F_EXT: { - static constexpr Format info(GL_LUMINANCE_ALPHA32F_EXT, - angle::Format::ID::R32G32B32A32_FLOAT, - DXGI_FORMAT_R32G32B32A32_FLOAT, - DXGI_FORMAT_R32G32B32A32_FLOAT, - DXGI_FORMAT_R32G32B32A32_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R32G32B32A32_FLOAT, - GL_RGBA32F, - nullptr); + static const Format info(GL_LUMINANCE_ALPHA32F_EXT, + angle::Format::ID::R32G32B32A32_FLOAT, + DXGI_FORMAT_R32G32B32A32_FLOAT, + DXGI_FORMAT_R32G32B32A32_FLOAT, + DXGI_FORMAT_R32G32B32A32_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R32G32B32A32_FLOAT, + GL_RGBA32F, + nullptr, + deviceCaps); return info; } case GL_NONE: { - static constexpr Format info(GL_NONE, - angle::Format::ID::NONE, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - GL_NONE, - nullptr); + static const Format info(GL_NONE, + angle::Format::ID::NONE, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + GL_NONE, + nullptr, + deviceCaps); return info; } case GL_R11F_G11F_B10F: { - static constexpr Format info(GL_R11F_G11F_B10F, - angle::Format::ID::R11G11B10_FLOAT, - DXGI_FORMAT_R11G11B10_FLOAT, - DXGI_FORMAT_R11G11B10_FLOAT, - DXGI_FORMAT_R11G11B10_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R11G11B10_FLOAT, - GL_RGBA16F_EXT, - nullptr); + static const Format info(GL_R11F_G11F_B10F, + angle::Format::ID::R11G11B10_FLOAT, + DXGI_FORMAT_R11G11B10_FLOAT, + DXGI_FORMAT_R11G11B10_FLOAT, + DXGI_FORMAT_R11G11B10_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R11G11B10_FLOAT, + GL_RGBA16F_EXT, + nullptr, + deviceCaps); return info; } case GL_R16F: { - static constexpr Format info(GL_R16F, - angle::Format::ID::R16_FLOAT, - DXGI_FORMAT_R16_FLOAT, - DXGI_FORMAT_R16_FLOAT, - DXGI_FORMAT_R16_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16_FLOAT, - GL_RGBA16F_EXT, - nullptr); + static const Format info(GL_R16F, + angle::Format::ID::R16_FLOAT, + DXGI_FORMAT_R16_FLOAT, + DXGI_FORMAT_R16_FLOAT, + DXGI_FORMAT_R16_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16_FLOAT, + GL_RGBA16F_EXT, + nullptr, + deviceCaps); return info; } case GL_R16I: { - static constexpr Format info(GL_R16I, - angle::Format::ID::R16_SINT, - DXGI_FORMAT_R16_SINT, - DXGI_FORMAT_R16_SINT, - DXGI_FORMAT_R16_SINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16_SINT, - GL_RGBA16I, - nullptr); + static const Format info(GL_R16I, + angle::Format::ID::R16_SINT, + DXGI_FORMAT_R16_SINT, + DXGI_FORMAT_R16_SINT, + DXGI_FORMAT_R16_SINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16_SINT, + GL_RGBA16I, + nullptr, + deviceCaps); return info; } case GL_R16UI: { - static constexpr Format info(GL_R16UI, - angle::Format::ID::R16_UINT, - DXGI_FORMAT_R16_UINT, - DXGI_FORMAT_R16_UINT, - DXGI_FORMAT_R16_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16_UINT, - GL_RGBA16I, - nullptr); + static const Format info(GL_R16UI, + angle::Format::ID::R16_UINT, + DXGI_FORMAT_R16_UINT, + DXGI_FORMAT_R16_UINT, + DXGI_FORMAT_R16_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16_UINT, + GL_RGBA16I, + nullptr, + deviceCaps); return info; } case GL_R16_EXT: { - static constexpr Format info(GL_R16_EXT, - angle::Format::ID::R16_UNORM, - DXGI_FORMAT_R16_UNORM, - DXGI_FORMAT_R16_UNORM, - DXGI_FORMAT_R16_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16_UNORM, - GL_RGBA16_EXT, - nullptr); + static const Format info(GL_R16_EXT, + angle::Format::ID::R16_UNORM, + DXGI_FORMAT_R16_UNORM, + DXGI_FORMAT_R16_UNORM, + DXGI_FORMAT_R16_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16_UNORM, + GL_RGBA16_EXT, + nullptr, + deviceCaps); return info; } case GL_R16_SNORM_EXT: { - static constexpr Format info(GL_R16_SNORM_EXT, - angle::Format::ID::R16_SNORM, - DXGI_FORMAT_R16_SNORM, - DXGI_FORMAT_R16_SNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16_SNORM, - GL_RGBA16_SNORM_EXT, - nullptr); + static const Format info(GL_R16_SNORM_EXT, + angle::Format::ID::R16_SNORM, + DXGI_FORMAT_R16_SNORM, + DXGI_FORMAT_R16_SNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16_SNORM, + GL_RGBA16_SNORM_EXT, + nullptr, + deviceCaps); return info; } case GL_R32F: { - static constexpr Format info(GL_R32F, - angle::Format::ID::R32_FLOAT, - DXGI_FORMAT_R32_FLOAT, - DXGI_FORMAT_R32_FLOAT, - DXGI_FORMAT_R32_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R32_FLOAT, - GL_RGBA32F, - nullptr); + static const Format info(GL_R32F, + angle::Format::ID::R32_FLOAT, + DXGI_FORMAT_R32_FLOAT, + DXGI_FORMAT_R32_FLOAT, + DXGI_FORMAT_R32_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R32_FLOAT, + GL_RGBA32F, + nullptr, + deviceCaps); return info; } case GL_R32I: { - static constexpr Format info(GL_R32I, - angle::Format::ID::R32_SINT, - DXGI_FORMAT_R32_SINT, - DXGI_FORMAT_R32_SINT, - DXGI_FORMAT_R32_SINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R32_SINT, - GL_RGBA32I, - nullptr); + static const Format info(GL_R32I, + angle::Format::ID::R32_SINT, + DXGI_FORMAT_R32_SINT, + DXGI_FORMAT_R32_SINT, + DXGI_FORMAT_R32_SINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R32_SINT, + GL_RGBA32I, + nullptr, + deviceCaps); return info; } case GL_R32UI: { - static constexpr Format info(GL_R32UI, - angle::Format::ID::R32_UINT, - DXGI_FORMAT_R32_UINT, - DXGI_FORMAT_R32_UINT, - DXGI_FORMAT_R32_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R32_UINT, - GL_RGBA32I, - nullptr); + static const Format info(GL_R32UI, + angle::Format::ID::R32_UINT, + DXGI_FORMAT_R32_UINT, + DXGI_FORMAT_R32_UINT, + DXGI_FORMAT_R32_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R32_UINT, + GL_RGBA32I, + nullptr, + deviceCaps); return info; } case GL_R8: { - static constexpr Format info(GL_R8, - angle::Format::ID::R8_UNORM, - DXGI_FORMAT_R8_UNORM, - DXGI_FORMAT_R8_UNORM, - DXGI_FORMAT_R8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_R8, + angle::Format::ID::R8_UNORM, + DXGI_FORMAT_R8_UNORM, + DXGI_FORMAT_R8_UNORM, + DXGI_FORMAT_R8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } case GL_R8I: { - static constexpr Format info(GL_R8I, - angle::Format::ID::R8_SINT, - DXGI_FORMAT_R8_SINT, - DXGI_FORMAT_R8_SINT, - DXGI_FORMAT_R8_SINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8_SINT, - GL_RGBA8I, - nullptr); + static const Format info(GL_R8I, + angle::Format::ID::R8_SINT, + DXGI_FORMAT_R8_SINT, + DXGI_FORMAT_R8_SINT, + DXGI_FORMAT_R8_SINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8_SINT, + GL_RGBA8I, + nullptr, + deviceCaps); return info; } case GL_R8UI: { - static constexpr Format info(GL_R8UI, - angle::Format::ID::R8_UINT, - DXGI_FORMAT_R8_UINT, - DXGI_FORMAT_R8_UINT, - DXGI_FORMAT_R8_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8_UINT, - GL_RGBA8I, - nullptr); + static const Format info(GL_R8UI, + angle::Format::ID::R8_UINT, + DXGI_FORMAT_R8_UINT, + DXGI_FORMAT_R8_UINT, + DXGI_FORMAT_R8_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8_UINT, + GL_RGBA8I, + nullptr, + deviceCaps); return info; } case GL_R8_SNORM: { - static constexpr Format info(GL_R8_SNORM, - angle::Format::ID::R8_SNORM, - DXGI_FORMAT_R8_SNORM, - DXGI_FORMAT_R8_SNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8_SNORM, - GL_RGBA8_SNORM, - nullptr); + static const Format info(GL_R8_SNORM, + angle::Format::ID::R8_SNORM, + DXGI_FORMAT_R8_SNORM, + DXGI_FORMAT_R8_SNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8_SNORM, + GL_RGBA8_SNORM, + nullptr, + deviceCaps); return info; } case GL_RG16F: { - static constexpr Format info(GL_RG16F, - angle::Format::ID::R16G16_FLOAT, - DXGI_FORMAT_R16G16_FLOAT, - DXGI_FORMAT_R16G16_FLOAT, - DXGI_FORMAT_R16G16_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16_FLOAT, - GL_RGBA16F_EXT, - nullptr); + static const Format info(GL_RG16F, + angle::Format::ID::R16G16_FLOAT, + DXGI_FORMAT_R16G16_FLOAT, + DXGI_FORMAT_R16G16_FLOAT, + DXGI_FORMAT_R16G16_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16_FLOAT, + GL_RGBA16F_EXT, + nullptr, + deviceCaps); return info; } case GL_RG16I: { - static constexpr Format info(GL_RG16I, - angle::Format::ID::R16G16_SINT, - DXGI_FORMAT_R16G16_SINT, - DXGI_FORMAT_R16G16_SINT, - DXGI_FORMAT_R16G16_SINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16_SINT, - GL_RGBA16I, - nullptr); + static const Format info(GL_RG16I, + angle::Format::ID::R16G16_SINT, + DXGI_FORMAT_R16G16_SINT, + DXGI_FORMAT_R16G16_SINT, + DXGI_FORMAT_R16G16_SINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16_SINT, + GL_RGBA16I, + nullptr, + deviceCaps); return info; } case GL_RG16UI: { - static constexpr Format info(GL_RG16UI, - angle::Format::ID::R16G16_UINT, - DXGI_FORMAT_R16G16_UINT, - DXGI_FORMAT_R16G16_UINT, - DXGI_FORMAT_R16G16_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16_UINT, - GL_RGBA16I, - nullptr); + static const Format info(GL_RG16UI, + angle::Format::ID::R16G16_UINT, + DXGI_FORMAT_R16G16_UINT, + DXGI_FORMAT_R16G16_UINT, + DXGI_FORMAT_R16G16_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16_UINT, + GL_RGBA16I, + nullptr, + deviceCaps); return info; } case GL_RG16_EXT: { - static constexpr Format info(GL_RG16_EXT, - angle::Format::ID::R16G16_UNORM, - DXGI_FORMAT_R16G16_UNORM, - DXGI_FORMAT_R16G16_UNORM, - DXGI_FORMAT_R16G16_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16_UNORM, - GL_RGBA16_EXT, - nullptr); + static const Format info(GL_RG16_EXT, + angle::Format::ID::R16G16_UNORM, + DXGI_FORMAT_R16G16_UNORM, + DXGI_FORMAT_R16G16_UNORM, + DXGI_FORMAT_R16G16_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16_UNORM, + GL_RGBA16_EXT, + nullptr, + deviceCaps); return info; } case GL_RG16_SNORM_EXT: { - static constexpr Format info(GL_RG16_SNORM_EXT, - angle::Format::ID::R16G16_SNORM, - DXGI_FORMAT_R16G16_SNORM, - DXGI_FORMAT_R16G16_SNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16_SNORM, - GL_RGBA16_SNORM_EXT, - nullptr); + static const Format info(GL_RG16_SNORM_EXT, + angle::Format::ID::R16G16_SNORM, + DXGI_FORMAT_R16G16_SNORM, + DXGI_FORMAT_R16G16_SNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16_SNORM, + GL_RGBA16_SNORM_EXT, + nullptr, + deviceCaps); return info; } case GL_RG32F: { - static constexpr Format info(GL_RG32F, - angle::Format::ID::R32G32_FLOAT, - DXGI_FORMAT_R32G32_FLOAT, - DXGI_FORMAT_R32G32_FLOAT, - DXGI_FORMAT_R32G32_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R32G32_FLOAT, - GL_RGBA32F, - nullptr); + static const Format info(GL_RG32F, + angle::Format::ID::R32G32_FLOAT, + DXGI_FORMAT_R32G32_FLOAT, + DXGI_FORMAT_R32G32_FLOAT, + DXGI_FORMAT_R32G32_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R32G32_FLOAT, + GL_RGBA32F, + nullptr, + deviceCaps); return info; } case GL_RG32I: { - static constexpr Format info(GL_RG32I, - angle::Format::ID::R32G32_SINT, - DXGI_FORMAT_R32G32_SINT, - DXGI_FORMAT_R32G32_SINT, - DXGI_FORMAT_R32G32_SINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R32G32_SINT, - GL_RGBA32I, - nullptr); + static const Format info(GL_RG32I, + angle::Format::ID::R32G32_SINT, + DXGI_FORMAT_R32G32_SINT, + DXGI_FORMAT_R32G32_SINT, + DXGI_FORMAT_R32G32_SINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R32G32_SINT, + GL_RGBA32I, + nullptr, + deviceCaps); return info; } case GL_RG32UI: { - static constexpr Format info(GL_RG32UI, - angle::Format::ID::R32G32_UINT, - DXGI_FORMAT_R32G32_UINT, - DXGI_FORMAT_R32G32_UINT, - DXGI_FORMAT_R32G32_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R32G32_UINT, - GL_RGBA32I, - nullptr); + static const Format info(GL_RG32UI, + angle::Format::ID::R32G32_UINT, + DXGI_FORMAT_R32G32_UINT, + DXGI_FORMAT_R32G32_UINT, + DXGI_FORMAT_R32G32_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R32G32_UINT, + GL_RGBA32I, + nullptr, + deviceCaps); return info; } case GL_RG8: { - static constexpr Format info(GL_RG8, - angle::Format::ID::R8G8_UNORM, - DXGI_FORMAT_R8G8_UNORM, - DXGI_FORMAT_R8G8_UNORM, - DXGI_FORMAT_R8G8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_RG8, + angle::Format::ID::R8G8_UNORM, + DXGI_FORMAT_R8G8_UNORM, + DXGI_FORMAT_R8G8_UNORM, + DXGI_FORMAT_R8G8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } case GL_RG8I: { - static constexpr Format info(GL_RG8I, - angle::Format::ID::R8G8_SINT, - DXGI_FORMAT_R8G8_SINT, - DXGI_FORMAT_R8G8_SINT, - DXGI_FORMAT_R8G8_SINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8_SINT, - GL_RGBA8I, - nullptr); + static const Format info(GL_RG8I, + angle::Format::ID::R8G8_SINT, + DXGI_FORMAT_R8G8_SINT, + DXGI_FORMAT_R8G8_SINT, + DXGI_FORMAT_R8G8_SINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8_SINT, + GL_RGBA8I, + nullptr, + deviceCaps); return info; } case GL_RG8UI: { - static constexpr Format info(GL_RG8UI, - angle::Format::ID::R8G8_UINT, - DXGI_FORMAT_R8G8_UINT, - DXGI_FORMAT_R8G8_UINT, - DXGI_FORMAT_R8G8_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8_UINT, - GL_RGBA8I, - nullptr); + static const Format info(GL_RG8UI, + angle::Format::ID::R8G8_UINT, + DXGI_FORMAT_R8G8_UINT, + DXGI_FORMAT_R8G8_UINT, + DXGI_FORMAT_R8G8_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8_UINT, + GL_RGBA8I, + nullptr, + deviceCaps); return info; } case GL_RG8_SNORM: { - static constexpr Format info(GL_RG8_SNORM, - angle::Format::ID::R8G8_SNORM, - DXGI_FORMAT_R8G8_SNORM, - DXGI_FORMAT_R8G8_SNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8_SNORM, - GL_RGBA8_SNORM, - nullptr); + static const Format info(GL_RG8_SNORM, + angle::Format::ID::R8G8_SNORM, + DXGI_FORMAT_R8G8_SNORM, + DXGI_FORMAT_R8G8_SNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8_SNORM, + GL_RGBA8_SNORM, + nullptr, + deviceCaps); return info; } case GL_RGB: { - static constexpr Format info(GL_RGB, - angle::Format::ID::R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM, - GL_RGBA8, - Initialize4ComponentData); + static const Format info(GL_RGB, + angle::Format::ID::R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM, + GL_RGBA8, + Initialize4ComponentData, + deviceCaps); return info; } case GL_RGB10_A2: { - static constexpr Format info(GL_RGB10_A2, - angle::Format::ID::R10G10B10A2_UNORM, - DXGI_FORMAT_R10G10B10A2_UNORM, - DXGI_FORMAT_R10G10B10A2_UNORM, - DXGI_FORMAT_R10G10B10A2_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R10G10B10A2_UNORM, - GL_RGBA16_EXT, - nullptr); + static const Format info(GL_RGB10_A2, + angle::Format::ID::R10G10B10A2_UNORM, + DXGI_FORMAT_R10G10B10A2_UNORM, + DXGI_FORMAT_R10G10B10A2_UNORM, + DXGI_FORMAT_R10G10B10A2_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R10G10B10A2_UNORM, + GL_RGBA16_EXT, + nullptr, + deviceCaps); return info; } case GL_RGB10_A2UI: { - static constexpr Format info(GL_RGB10_A2UI, - angle::Format::ID::R10G10B10A2_UINT, - DXGI_FORMAT_R10G10B10A2_UINT, - DXGI_FORMAT_R10G10B10A2_UINT, - DXGI_FORMAT_R10G10B10A2_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R10G10B10A2_UINT, - GL_RGBA16I, - nullptr); + static const Format info(GL_RGB10_A2UI, + angle::Format::ID::R10G10B10A2_UINT, + DXGI_FORMAT_R10G10B10A2_UINT, + DXGI_FORMAT_R10G10B10A2_UINT, + DXGI_FORMAT_R10G10B10A2_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R10G10B10A2_UINT, + GL_RGBA16I, + nullptr, + deviceCaps); return info; } case GL_RGB16F: { - static constexpr Format info(GL_RGB16F, - angle::Format::ID::R16G16B16A16_FLOAT, - DXGI_FORMAT_R16G16B16A16_FLOAT, - DXGI_FORMAT_R16G16B16A16_FLOAT, - DXGI_FORMAT_R16G16B16A16_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16B16A16_FLOAT, - GL_RGBA16F, - Initialize4ComponentData); + static const Format info(GL_RGB16F, + angle::Format::ID::R16G16B16A16_FLOAT, + DXGI_FORMAT_R16G16B16A16_FLOAT, + DXGI_FORMAT_R16G16B16A16_FLOAT, + DXGI_FORMAT_R16G16B16A16_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16B16A16_FLOAT, + GL_RGBA16F, + Initialize4ComponentData, + deviceCaps); return info; } case GL_RGB16I: { - static constexpr Format info(GL_RGB16I, - angle::Format::ID::R16G16B16A16_SINT, - DXGI_FORMAT_R16G16B16A16_SINT, - DXGI_FORMAT_R16G16B16A16_SINT, - DXGI_FORMAT_R16G16B16A16_SINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16B16A16_SINT, - GL_RGBA16I, - Initialize4ComponentData); + static const Format info(GL_RGB16I, + angle::Format::ID::R16G16B16A16_SINT, + DXGI_FORMAT_R16G16B16A16_SINT, + DXGI_FORMAT_R16G16B16A16_SINT, + DXGI_FORMAT_R16G16B16A16_SINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16B16A16_SINT, + GL_RGBA16I, + Initialize4ComponentData, + deviceCaps); return info; } case GL_RGB16UI: { - static constexpr Format info(GL_RGB16UI, - angle::Format::ID::R16G16B16A16_UINT, - DXGI_FORMAT_R16G16B16A16_UINT, - DXGI_FORMAT_R16G16B16A16_UINT, - DXGI_FORMAT_R16G16B16A16_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16B16A16_UINT, - GL_RGBA16UI, - Initialize4ComponentData); + static const Format info(GL_RGB16UI, + angle::Format::ID::R16G16B16A16_UINT, + DXGI_FORMAT_R16G16B16A16_UINT, + DXGI_FORMAT_R16G16B16A16_UINT, + DXGI_FORMAT_R16G16B16A16_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16B16A16_UINT, + GL_RGBA16UI, + Initialize4ComponentData, + deviceCaps); return info; } case GL_RGB16_EXT: { - static constexpr Format info(GL_RGB16_EXT, - angle::Format::ID::R16G16B16A16_UNORM, - DXGI_FORMAT_R16G16B16A16_UNORM, - DXGI_FORMAT_R16G16B16A16_UNORM, - DXGI_FORMAT_R16G16B16A16_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16B16A16_UNORM, - GL_RGBA16_EXT, - Initialize4ComponentData); + static const Format info(GL_RGB16_EXT, + angle::Format::ID::R16G16B16A16_UNORM, + DXGI_FORMAT_R16G16B16A16_UNORM, + DXGI_FORMAT_R16G16B16A16_UNORM, + DXGI_FORMAT_R16G16B16A16_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16B16A16_UNORM, + GL_RGBA16_EXT, + Initialize4ComponentData, + deviceCaps); return info; } case GL_RGB16_SNORM_EXT: { - static constexpr Format info(GL_RGB16_SNORM_EXT, - angle::Format::ID::R16G16B16A16_SNORM, - DXGI_FORMAT_R16G16B16A16_SNORM, - DXGI_FORMAT_R16G16B16A16_SNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16B16A16_SNORM, - GL_RGBA16_SNORM_EXT, - Initialize4ComponentData); + static const Format info(GL_RGB16_SNORM_EXT, + angle::Format::ID::R16G16B16A16_SNORM, + DXGI_FORMAT_R16G16B16A16_SNORM, + DXGI_FORMAT_R16G16B16A16_SNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16B16A16_SNORM, + GL_RGBA16_SNORM_EXT, + Initialize4ComponentData, + deviceCaps); return info; } case GL_RGB32F: { - static constexpr Format info(GL_RGB32F, - angle::Format::ID::R32G32B32A32_FLOAT, - DXGI_FORMAT_R32G32B32A32_FLOAT, - DXGI_FORMAT_R32G32B32A32_FLOAT, - DXGI_FORMAT_R32G32B32A32_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R32G32B32A32_FLOAT, - GL_RGBA32F, - Initialize4ComponentData); + static const Format info(GL_RGB32F, + angle::Format::ID::R32G32B32A32_FLOAT, + DXGI_FORMAT_R32G32B32A32_FLOAT, + DXGI_FORMAT_R32G32B32A32_FLOAT, + DXGI_FORMAT_R32G32B32A32_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R32G32B32A32_FLOAT, + GL_RGBA32F, + Initialize4ComponentData, + deviceCaps); return info; } case GL_RGB32I: { - static constexpr Format info(GL_RGB32I, - angle::Format::ID::R32G32B32A32_SINT, - DXGI_FORMAT_R32G32B32A32_SINT, - DXGI_FORMAT_R32G32B32A32_SINT, - DXGI_FORMAT_R32G32B32A32_SINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R32G32B32A32_SINT, - GL_RGBA32I, - Initialize4ComponentData); + static const Format info(GL_RGB32I, + angle::Format::ID::R32G32B32A32_SINT, + DXGI_FORMAT_R32G32B32A32_SINT, + DXGI_FORMAT_R32G32B32A32_SINT, + DXGI_FORMAT_R32G32B32A32_SINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R32G32B32A32_SINT, + GL_RGBA32I, + Initialize4ComponentData, + deviceCaps); return info; } case GL_RGB32UI: { - static constexpr Format info(GL_RGB32UI, - angle::Format::ID::R32G32B32A32_UINT, - DXGI_FORMAT_R32G32B32A32_UINT, - DXGI_FORMAT_R32G32B32A32_UINT, - DXGI_FORMAT_R32G32B32A32_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R32G32B32A32_UINT, - GL_RGBA32UI, - Initialize4ComponentData); + static const Format info(GL_RGB32UI, + angle::Format::ID::R32G32B32A32_UINT, + DXGI_FORMAT_R32G32B32A32_UINT, + DXGI_FORMAT_R32G32B32A32_UINT, + DXGI_FORMAT_R32G32B32A32_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R32G32B32A32_UINT, + GL_RGBA32UI, + Initialize4ComponentData, + deviceCaps); return info; } case GL_RGB565: { if (SupportsFormat(DXGI_FORMAT_B5G6R5_UNORM, deviceCaps)) { - static constexpr Format info(GL_RGB565, - angle::Format::ID::B5G6R5_UNORM, - DXGI_FORMAT_B5G6R5_UNORM, - DXGI_FORMAT_B5G6R5_UNORM, - DXGI_FORMAT_B5G6R5_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_B5G6R5_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_RGB565, + angle::Format::ID::B5G6R5_UNORM, + DXGI_FORMAT_B5G6R5_UNORM, + DXGI_FORMAT_B5G6R5_UNORM, + DXGI_FORMAT_B5G6R5_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_B5G6R5_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } else { - static constexpr Format info(GL_RGB565, - angle::Format::ID::R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM, - GL_RGBA8, - Initialize4ComponentData); + static const Format info(GL_RGB565, + angle::Format::ID::R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM, + GL_RGBA8, + Initialize4ComponentData, + deviceCaps); return info; } } @@ -1462,34 +1570,21 @@ const Format &Format::Get(GLenum internalFormat, const Renderer11DeviceCaps &dev { if (SupportsFormat(DXGI_FORMAT_B5G5R5A1_UNORM, deviceCaps)) { - static constexpr Format info(GL_RGB5_A1, - angle::Format::ID::B5G5R5A1_UNORM, - DXGI_FORMAT_B5G5R5A1_UNORM, - DXGI_FORMAT_B5G5R5A1_UNORM, - DXGI_FORMAT_B5G5R5A1_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_B5G5R5A1_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_RGB5_A1, + angle::Format::ID::B5G5R5A1_UNORM, + DXGI_FORMAT_B5G5R5A1_UNORM, + DXGI_FORMAT_B5G5R5A1_UNORM, + DXGI_FORMAT_B5G5R5A1_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_B5G5R5A1_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } else { - static constexpr Format info(GL_RGB5_A1, - angle::Format::ID::R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM, - GL_RGBA8, - nullptr); - return info; - } - } - case GL_RGB8: - { - static constexpr Format info(GL_RGB8, + static const Format info(GL_RGB5_A1, angle::Format::ID::R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, @@ -1497,210 +1592,226 @@ const Format &Format::Get(GLenum internalFormat, const Renderer11DeviceCaps &dev DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_R8G8B8A8_UNORM, GL_RGBA8, - Initialize4ComponentData); + nullptr, + deviceCaps); + return info; + } + } + case GL_RGB8: + { + static const Format info(GL_RGB8, + angle::Format::ID::R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM, + GL_RGBA8, + Initialize4ComponentData, + deviceCaps); return info; } case GL_RGB8I: { - static constexpr Format info(GL_RGB8I, - angle::Format::ID::R8G8B8A8_SINT, - DXGI_FORMAT_R8G8B8A8_SINT, - DXGI_FORMAT_R8G8B8A8_SINT, - DXGI_FORMAT_R8G8B8A8_SINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_SINT, - GL_RGBA8I, - Initialize4ComponentData); + static const Format info(GL_RGB8I, + angle::Format::ID::R8G8B8A8_SINT, + DXGI_FORMAT_R8G8B8A8_SINT, + DXGI_FORMAT_R8G8B8A8_SINT, + DXGI_FORMAT_R8G8B8A8_SINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_SINT, + GL_RGBA8I, + Initialize4ComponentData, + deviceCaps); return info; } case GL_RGB8UI: { - static constexpr Format info(GL_RGB8UI, - angle::Format::ID::R8G8B8A8_UINT, - DXGI_FORMAT_R8G8B8A8_UINT, - DXGI_FORMAT_R8G8B8A8_UINT, - DXGI_FORMAT_R8G8B8A8_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UINT, - GL_RGBA8UI, - Initialize4ComponentData); + static const Format info(GL_RGB8UI, + angle::Format::ID::R8G8B8A8_UINT, + DXGI_FORMAT_R8G8B8A8_UINT, + DXGI_FORMAT_R8G8B8A8_UINT, + DXGI_FORMAT_R8G8B8A8_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UINT, + GL_RGBA8UI, + Initialize4ComponentData, + deviceCaps); return info; } case GL_RGB8_SNORM: { - static constexpr Format info(GL_RGB8_SNORM, - angle::Format::ID::R8G8B8A8_SNORM, - DXGI_FORMAT_R8G8B8A8_SNORM, - DXGI_FORMAT_R8G8B8A8_SNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_SNORM, - GL_RGBA8_SNORM, - Initialize4ComponentData); + static const Format info(GL_RGB8_SNORM, + angle::Format::ID::R8G8B8A8_SNORM, + DXGI_FORMAT_R8G8B8A8_SNORM, + DXGI_FORMAT_R8G8B8A8_SNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_SNORM, + GL_RGBA8_SNORM, + Initialize4ComponentData, + deviceCaps); return info; } case GL_RGB9_E5: { - static constexpr Format info(GL_RGB9_E5, - angle::Format::ID::R9G9B9E5_SHAREDEXP, - DXGI_FORMAT_R9G9B9E5_SHAREDEXP, - DXGI_FORMAT_R9G9B9E5_SHAREDEXP, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R9G9B9E5_SHAREDEXP, - GL_RGBA16F_EXT, - nullptr); + static const Format info(GL_RGB9_E5, + angle::Format::ID::R9G9B9E5_SHAREDEXP, + DXGI_FORMAT_R9G9B9E5_SHAREDEXP, + DXGI_FORMAT_R9G9B9E5_SHAREDEXP, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R9G9B9E5_SHAREDEXP, + GL_RGBA16F_EXT, + nullptr, + deviceCaps); return info; } case GL_RGBA: { - static constexpr Format info(GL_RGBA, - angle::Format::ID::R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM, - GL_RGBA8, - nullptr); + static const Format info(GL_RGBA, + angle::Format::ID::R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } case GL_RGBA16F: { - static constexpr Format info(GL_RGBA16F, - angle::Format::ID::R16G16B16A16_FLOAT, - DXGI_FORMAT_R16G16B16A16_FLOAT, - DXGI_FORMAT_R16G16B16A16_FLOAT, - DXGI_FORMAT_R16G16B16A16_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16B16A16_FLOAT, - GL_RGBA16F, - nullptr); + static const Format info(GL_RGBA16F, + angle::Format::ID::R16G16B16A16_FLOAT, + DXGI_FORMAT_R16G16B16A16_FLOAT, + DXGI_FORMAT_R16G16B16A16_FLOAT, + DXGI_FORMAT_R16G16B16A16_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16B16A16_FLOAT, + GL_RGBA16F, + nullptr, + deviceCaps); return info; } case GL_RGBA16I: { - static constexpr Format info(GL_RGBA16I, - angle::Format::ID::R16G16B16A16_SINT, - DXGI_FORMAT_R16G16B16A16_SINT, - DXGI_FORMAT_R16G16B16A16_SINT, - DXGI_FORMAT_R16G16B16A16_SINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16B16A16_SINT, - GL_RGBA16I, - nullptr); + static const Format info(GL_RGBA16I, + angle::Format::ID::R16G16B16A16_SINT, + DXGI_FORMAT_R16G16B16A16_SINT, + DXGI_FORMAT_R16G16B16A16_SINT, + DXGI_FORMAT_R16G16B16A16_SINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16B16A16_SINT, + GL_RGBA16I, + nullptr, + deviceCaps); return info; } case GL_RGBA16UI: { - static constexpr Format info(GL_RGBA16UI, - angle::Format::ID::R16G16B16A16_UINT, - DXGI_FORMAT_R16G16B16A16_UINT, - DXGI_FORMAT_R16G16B16A16_UINT, - DXGI_FORMAT_R16G16B16A16_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16B16A16_UINT, - GL_RGBA16UI, - nullptr); + static const Format info(GL_RGBA16UI, + angle::Format::ID::R16G16B16A16_UINT, + DXGI_FORMAT_R16G16B16A16_UINT, + DXGI_FORMAT_R16G16B16A16_UINT, + DXGI_FORMAT_R16G16B16A16_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16B16A16_UINT, + GL_RGBA16UI, + nullptr, + deviceCaps); return info; } case GL_RGBA16_EXT: { - static constexpr Format info(GL_RGBA16_EXT, - angle::Format::ID::R16G16B16A16_UNORM, - DXGI_FORMAT_R16G16B16A16_UNORM, - DXGI_FORMAT_R16G16B16A16_UNORM, - DXGI_FORMAT_R16G16B16A16_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16B16A16_UNORM, - GL_RGBA16_EXT, - nullptr); + static const Format info(GL_RGBA16_EXT, + angle::Format::ID::R16G16B16A16_UNORM, + DXGI_FORMAT_R16G16B16A16_UNORM, + DXGI_FORMAT_R16G16B16A16_UNORM, + DXGI_FORMAT_R16G16B16A16_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16B16A16_UNORM, + GL_RGBA16_EXT, + nullptr, + deviceCaps); return info; } case GL_RGBA16_SNORM_EXT: { - static constexpr Format info(GL_RGBA16_SNORM_EXT, - angle::Format::ID::R16G16B16A16_SNORM, - DXGI_FORMAT_R16G16B16A16_SNORM, - DXGI_FORMAT_R16G16B16A16_SNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R16G16B16A16_SNORM, - GL_RGBA16_SNORM_EXT, - nullptr); + static const Format info(GL_RGBA16_SNORM_EXT, + angle::Format::ID::R16G16B16A16_SNORM, + DXGI_FORMAT_R16G16B16A16_SNORM, + DXGI_FORMAT_R16G16B16A16_SNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R16G16B16A16_SNORM, + GL_RGBA16_SNORM_EXT, + nullptr, + deviceCaps); return info; } case GL_RGBA32F: { - static constexpr Format info(GL_RGBA32F, - angle::Format::ID::R32G32B32A32_FLOAT, - DXGI_FORMAT_R32G32B32A32_FLOAT, - DXGI_FORMAT_R32G32B32A32_FLOAT, - DXGI_FORMAT_R32G32B32A32_FLOAT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R32G32B32A32_FLOAT, - GL_RGBA32F, - nullptr); + static const Format info(GL_RGBA32F, + angle::Format::ID::R32G32B32A32_FLOAT, + DXGI_FORMAT_R32G32B32A32_FLOAT, + DXGI_FORMAT_R32G32B32A32_FLOAT, + DXGI_FORMAT_R32G32B32A32_FLOAT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R32G32B32A32_FLOAT, + GL_RGBA32F, + nullptr, + deviceCaps); return info; } case GL_RGBA32I: { - static constexpr Format info(GL_RGBA32I, - angle::Format::ID::R32G32B32A32_SINT, - DXGI_FORMAT_R32G32B32A32_SINT, - DXGI_FORMAT_R32G32B32A32_SINT, - DXGI_FORMAT_R32G32B32A32_SINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R32G32B32A32_SINT, - GL_RGBA32I, - nullptr); + static const Format info(GL_RGBA32I, + angle::Format::ID::R32G32B32A32_SINT, + DXGI_FORMAT_R32G32B32A32_SINT, + DXGI_FORMAT_R32G32B32A32_SINT, + DXGI_FORMAT_R32G32B32A32_SINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R32G32B32A32_SINT, + GL_RGBA32I, + nullptr, + deviceCaps); return info; } case GL_RGBA32UI: { - static constexpr Format info(GL_RGBA32UI, - angle::Format::ID::R32G32B32A32_UINT, - DXGI_FORMAT_R32G32B32A32_UINT, - DXGI_FORMAT_R32G32B32A32_UINT, - DXGI_FORMAT_R32G32B32A32_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R32G32B32A32_UINT, - GL_RGBA32UI, - nullptr); + static const Format info(GL_RGBA32UI, + angle::Format::ID::R32G32B32A32_UINT, + DXGI_FORMAT_R32G32B32A32_UINT, + DXGI_FORMAT_R32G32B32A32_UINT, + DXGI_FORMAT_R32G32B32A32_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R32G32B32A32_UINT, + GL_RGBA32UI, + nullptr, + deviceCaps); return info; } case GL_RGBA4: { if (SupportsFormat(DXGI_FORMAT_B4G4R4A4_UNORM, deviceCaps)) { - static constexpr Format info(GL_RGBA4, - angle::Format::ID::B4G4R4A4_UNORM, - DXGI_FORMAT_B4G4R4A4_UNORM, - DXGI_FORMAT_B4G4R4A4_UNORM, - DXGI_FORMAT_B4G4R4A4_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_B4G4R4A4_UNORM, - GL_RGBA4, - nullptr); + static const Format info(GL_RGBA4, + angle::Format::ID::B4G4R4A4_UNORM, + DXGI_FORMAT_B4G4R4A4_UNORM, + DXGI_FORMAT_B4G4R4A4_UNORM, + DXGI_FORMAT_B4G4R4A4_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_B4G4R4A4_UNORM, + GL_RGBA4, + nullptr, + deviceCaps); return info; } else { - static constexpr Format info(GL_RGBA4, - angle::Format::ID::R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_R8G8B8A8_UNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM, - GL_RGBA8, - nullptr); - return info; - } - } - case GL_RGBA8: - { - static constexpr Format info(GL_RGBA8, + static const Format info(GL_RGBA4, angle::Format::ID::R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, @@ -1708,100 +1819,123 @@ const Format &Format::Get(GLenum internalFormat, const Renderer11DeviceCaps &dev DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_R8G8B8A8_UNORM, GL_RGBA8, - nullptr); + nullptr, + deviceCaps); + return info; + } + } + case GL_RGBA8: + { + static const Format info(GL_RGBA8, + angle::Format::ID::R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_R8G8B8A8_UNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM, + GL_RGBA8, + nullptr, + deviceCaps); return info; } case GL_RGBA8I: { - static constexpr Format info(GL_RGBA8I, - angle::Format::ID::R8G8B8A8_SINT, - DXGI_FORMAT_R8G8B8A8_SINT, - DXGI_FORMAT_R8G8B8A8_SINT, - DXGI_FORMAT_R8G8B8A8_SINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_SINT, - GL_RGBA8I, - nullptr); + static const Format info(GL_RGBA8I, + angle::Format::ID::R8G8B8A8_SINT, + DXGI_FORMAT_R8G8B8A8_SINT, + DXGI_FORMAT_R8G8B8A8_SINT, + DXGI_FORMAT_R8G8B8A8_SINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_SINT, + GL_RGBA8I, + nullptr, + deviceCaps); return info; } case GL_RGBA8UI: { - static constexpr Format info(GL_RGBA8UI, - angle::Format::ID::R8G8B8A8_UINT, - DXGI_FORMAT_R8G8B8A8_UINT, - DXGI_FORMAT_R8G8B8A8_UINT, - DXGI_FORMAT_R8G8B8A8_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UINT, - GL_RGBA8UI, - nullptr); + static const Format info(GL_RGBA8UI, + angle::Format::ID::R8G8B8A8_UINT, + DXGI_FORMAT_R8G8B8A8_UINT, + DXGI_FORMAT_R8G8B8A8_UINT, + DXGI_FORMAT_R8G8B8A8_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UINT, + GL_RGBA8UI, + nullptr, + deviceCaps); return info; } case GL_RGBA8_SNORM: { - static constexpr Format info(GL_RGBA8_SNORM, - angle::Format::ID::R8G8B8A8_SNORM, - DXGI_FORMAT_R8G8B8A8_SNORM, - DXGI_FORMAT_R8G8B8A8_SNORM, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_SNORM, - GL_RGBA8_SNORM, - nullptr); + static const Format info(GL_RGBA8_SNORM, + angle::Format::ID::R8G8B8A8_SNORM, + DXGI_FORMAT_R8G8B8A8_SNORM, + DXGI_FORMAT_R8G8B8A8_SNORM, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_SNORM, + GL_RGBA8_SNORM, + nullptr, + deviceCaps); return info; } case GL_SRGB8: { - static constexpr Format info(GL_SRGB8, - angle::Format::ID::R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - GL_SRGB8_ALPHA8, - Initialize4ComponentData); + static const Format info(GL_SRGB8, + angle::Format::ID::R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + GL_SRGB8_ALPHA8, + Initialize4ComponentData, + deviceCaps); return info; } case GL_SRGB8_ALPHA8: { - static constexpr Format info(GL_SRGB8_ALPHA8, - angle::Format::ID::R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - GL_SRGB8_ALPHA8, - nullptr); + static const Format info(GL_SRGB8_ALPHA8, + angle::Format::ID::R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + GL_SRGB8_ALPHA8, + nullptr, + deviceCaps); return info; } case GL_STENCIL_INDEX8: { if (OnlyFL10Plus(deviceCaps)) { - static constexpr Format info(GL_STENCIL_INDEX8, - angle::Format::ID::D24_UNORM_S8_UINT, - DXGI_FORMAT_R24G8_TYPELESS, - DXGI_FORMAT_R24_UNORM_X8_TYPELESS, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_D24_UNORM_S8_UINT, - DXGI_FORMAT_R24_UNORM_X8_TYPELESS, - GL_RGBA32F, - nullptr); + static const Format info(GL_STENCIL_INDEX8, + angle::Format::ID::D24_UNORM_S8_UINT, + DXGI_FORMAT_R24G8_TYPELESS, + DXGI_FORMAT_R24_UNORM_X8_TYPELESS, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_D24_UNORM_S8_UINT, + DXGI_FORMAT_R24_UNORM_X8_TYPELESS, + GL_RGBA32F, + nullptr, + deviceCaps); return info; } else { - static constexpr Format info(GL_STENCIL_INDEX8, - angle::Format::ID::D24_UNORM_S8_UINT, - DXGI_FORMAT_D24_UNORM_S8_UINT, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_UNKNOWN, - DXGI_FORMAT_D24_UNORM_S8_UINT, - DXGI_FORMAT_UNKNOWN, - GL_RGBA32F, - nullptr); + static const Format info(GL_STENCIL_INDEX8, + angle::Format::ID::D24_UNORM_S8_UINT, + DXGI_FORMAT_D24_UNORM_S8_UINT, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_UNKNOWN, + DXGI_FORMAT_D24_UNORM_S8_UINT, + DXGI_FORMAT_UNKNOWN, + GL_RGBA32F, + nullptr, + deviceCaps); return info; } } @@ -1812,7 +1946,7 @@ const Format &Format::Get(GLenum internalFormat, const Renderer11DeviceCaps &dev // clang-format on UNREACHABLE(); - static constexpr Format defaultInfo; + static const Format defaultInfo; return defaultInfo; } diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Blit9.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Blit9.cpp index 95320f228..2ac8ee3a2 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Blit9.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Blit9.cpp @@ -145,7 +145,13 @@ gl::Error Blit9::setShader(ShaderId source, const char *profile, { const BYTE* shaderCode = g_shaderCode[source]; size_t shaderSize = g_shaderSize[source]; - ANGLE_TRY((mRenderer->*createShader)(reinterpret_cast(shaderCode), shaderSize, &shader)); + + gl::Error error = (mRenderer->*createShader)(reinterpret_cast(shaderCode), shaderSize, &shader); + if (error.isError()) + { + return error; + } + mCompiledShaders[source] = shader; } @@ -184,10 +190,18 @@ RECT Blit9::getSurfaceRect(IDirect3DSurface9 *surface) const gl::Error Blit9::boxFilter(IDirect3DSurface9 *source, IDirect3DSurface9 *dest) { - ANGLE_TRY(initialize()); + gl::Error error = initialize(); + if (error.isError()) + { + return error; + } IDirect3DTexture9 *texture = NULL; - ANGLE_TRY(copySurfaceToTexture(source, getSurfaceRect(source), &texture)); + error = copySurfaceToTexture(source, getSurfaceRect(source), &texture); + if (error.isError()) + { + return error; + } IDirect3DDevice9 *device = mRenderer->getDevice(); @@ -216,13 +230,21 @@ gl::Error Blit9::boxFilter(IDirect3DSurface9 *source, IDirect3DSurface9 *dest) gl::Error Blit9::copy2D(const gl::Framebuffer *framebuffer, const RECT &sourceRect, GLenum destFormat, const gl::Offset &destOffset, TextureStorage *storage, GLint level) { - ANGLE_TRY(initialize()); + gl::Error error = initialize(); + if (error.isError()) + { + return error; + } const gl::FramebufferAttachment *colorbuffer = framebuffer->getColorbuffer(0); ASSERT(colorbuffer); RenderTarget9 *renderTarget9 = nullptr; - ANGLE_TRY(colorbuffer->getRenderTarget(&renderTarget9)); + error = colorbuffer->getRenderTarget(&renderTarget9); + if (error.isError()) + { + return error; + } ASSERT(renderTarget9); IDirect3DSurface9 *source = renderTarget9->getSurface(); @@ -230,7 +252,7 @@ gl::Error Blit9::copy2D(const gl::Framebuffer *framebuffer, const RECT &sourceRe IDirect3DSurface9 *destSurface = NULL; TextureStorage9 *storage9 = GetAs(storage); - gl::Error error = storage9->getSurfaceLevel(GL_TEXTURE_2D, level, true, &destSurface); + error = storage9->getSurfaceLevel(GL_TEXTURE_2D, level, true, &destSurface); if (error.isError()) { SafeRelease(source); @@ -492,12 +514,9 @@ gl::Error Blit9::copySurfaceToTexture(IDirect3DSurface9 *surface, const RECT &so D3DSURFACE_DESC sourceDesc; surface->GetDesc(&sourceDesc); - const auto destWidth = sourceRect.right - sourceRect.left; - const auto destHeight = sourceRect.bottom - sourceRect.top; - // Copy the render target into a texture IDirect3DTexture9 *texture; - HRESULT result = device->CreateTexture(destWidth, destHeight, 1, D3DUSAGE_RENDERTARGET, sourceDesc.Format, D3DPOOL_DEFAULT, &texture, NULL); + HRESULT result = device->CreateTexture(sourceRect.right - sourceRect.left, sourceRect.bottom - sourceRect.top, 1, D3DUSAGE_RENDERTARGET, sourceDesc.Format, D3DPOOL_DEFAULT, &texture, NULL); if (FAILED(result)) { @@ -516,40 +535,8 @@ gl::Error Blit9::copySurfaceToTexture(IDirect3DSurface9 *surface, const RECT &so } mRenderer->endScene(); + result = device->StretchRect(surface, &sourceRect, textureSurface, NULL, D3DTEXF_NONE); - if (sourceRect.left < sourceDesc.Width && sourceRect.right > 0 && - sourceRect.top < sourceDesc.Height && sourceRect.bottom > 0) - { - RECT validSourceRect = sourceRect; - RECT validDestRect = {0, 0, destWidth, destHeight}; - - if (sourceRect.left < 0) { - validSourceRect.left += 0 - sourceRect.left; - validDestRect.left += 0 - sourceRect.left; - } - - if (sourceRect.right > sourceDesc.Width) { - validSourceRect.right -= sourceRect.right - sourceDesc.Width; - validDestRect.right -= sourceRect.right - sourceDesc.Width; - } - - if (sourceRect.top < 0) { - validSourceRect.top += 0 - sourceRect.top; - validDestRect.top += 0 - sourceRect.top; - } - - if (sourceRect.bottom > sourceDesc.Height) { - validSourceRect.bottom -= sourceRect.bottom - sourceDesc.Height; - validDestRect.bottom -= sourceRect.bottom - sourceDesc.Height; - } - - ASSERT(validSourceRect.left < validSourceRect.right); - ASSERT(validSourceRect.top < validSourceRect.bottom); - ASSERT(validDestRect.left < validDestRect.right); - ASSERT(validDestRect.top < validDestRect.bottom); - result = device->StretchRect(surface, &validSourceRect, textureSurface, - &validDestRect, D3DTEXF_NONE); - } SafeRelease(textureSurface); if (FAILED(result)) diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Buffer9.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Buffer9.cpp index b8abf3845..0ee0d8325 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Buffer9.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Buffer9.cpp @@ -12,8 +12,9 @@ namespace rx { -Buffer9::Buffer9(const gl::BufferState &state, Renderer9 *renderer) - : BufferD3D(state, renderer), mSize(0) +Buffer9::Buffer9(Renderer9 *renderer) + : BufferD3D(renderer), + mSize(0) {} Buffer9::~Buffer9() @@ -21,7 +22,7 @@ Buffer9::~Buffer9() mSize = 0; } -gl::Error Buffer9::setData(GLenum /*target*/, const void *data, size_t size, GLenum usage) +gl::Error Buffer9::setData(const void* data, size_t size, GLenum usage) { if (size > mMemory.size()) { @@ -50,7 +51,7 @@ gl::Error Buffer9::getData(const uint8_t **outData) return gl::Error(GL_NO_ERROR); } -gl::Error Buffer9::setSubData(GLenum /*target*/, const void *data, size_t size, size_t offset) +gl::Error Buffer9::setSubData(const void* data, size_t size, size_t offset) { if (offset + size > mMemory.size()) { diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Buffer9.h b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Buffer9.h index dd7671827..219f8a658 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Buffer9.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Buffer9.h @@ -20,7 +20,7 @@ class Renderer9; class Buffer9 : public BufferD3D { public: - Buffer9(const gl::BufferState &state, Renderer9 *renderer); + Buffer9(Renderer9 *renderer); virtual ~Buffer9(); // BufferD3D implementation @@ -29,16 +29,13 @@ class Buffer9 : public BufferD3D gl::Error getData(const uint8_t **outData) override; // BufferImpl implementation - gl::Error setData(GLenum target, const void *data, size_t size, GLenum usage) override; - gl::Error setSubData(GLenum target, const void *data, size_t size, size_t offset) override; - gl::Error copySubData(BufferImpl *source, - GLintptr sourceOffset, - GLintptr destOffset, - GLsizeiptr size) override; - gl::Error map(GLenum access, GLvoid **mapPtr) override; - gl::Error mapRange(size_t offset, size_t length, GLbitfield access, GLvoid **mapPtr) override; - gl::Error unmap(GLboolean *result) override; - gl::Error markTransformFeedbackUsage() override; + virtual gl::Error setData(const void* data, size_t size, GLenum usage); + virtual gl::Error setSubData(const void* data, size_t size, size_t offset); + virtual gl::Error copySubData(BufferImpl* source, GLintptr sourceOffset, GLintptr destOffset, GLsizeiptr size); + virtual gl::Error map(GLenum access, GLvoid **mapPtr); + virtual gl::Error mapRange(size_t offset, size_t length, GLbitfield access, GLvoid **mapPtr); + virtual gl::Error unmap(GLboolean *result); + virtual gl::Error markTransformFeedbackUsage(); private: MemoryBuffer mMemory; diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Context9.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Context9.cpp index c38bc1b11..1c90fffa1 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Context9.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Context9.cpp @@ -82,9 +82,9 @@ RenderbufferImpl *Context9::createRenderbuffer() return new RenderbufferD3D(mRenderer); } -BufferImpl *Context9::createBuffer(const gl::BufferState &state) +BufferImpl *Context9::createBuffer() { - return new Buffer9(state, mRenderer); + return new Buffer9(mRenderer); } VertexArrayImpl *Context9::createVertexArray(const gl::VertexArrayState &data) @@ -137,7 +137,7 @@ gl::Error Context9::finish() gl::Error Context9::drawArrays(GLenum mode, GLint first, GLsizei count) { - return mRenderer->genericDrawArrays(this, mode, first, count, 1); + return mRenderer->genericDrawArrays(this, mode, first, count, 0); } gl::Error Context9::drawArraysInstanced(GLenum mode, @@ -154,7 +154,7 @@ gl::Error Context9::drawElements(GLenum mode, const GLvoid *indices, const gl::IndexRange &indexRange) { - return mRenderer->genericDrawElements(this, mode, count, type, indices, 1, indexRange); + return mRenderer->genericDrawElements(this, mode, count, type, indices, 0, indexRange); } gl::Error Context9::drawElementsInstanced(GLenum mode, @@ -175,7 +175,7 @@ gl::Error Context9::drawRangeElements(GLenum mode, const GLvoid *indices, const gl::IndexRange &indexRange) { - return mRenderer->genericDrawElements(this, mode, count, type, indices, 1, indexRange); + return mRenderer->genericDrawElements(this, mode, count, type, indices, 0, indexRange); } GLenum Context9::getResetStatus() diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Context9.h b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Context9.h index aeb18ff5e..7e3492f9a 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Context9.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Context9.h @@ -39,7 +39,7 @@ class Context9 : public ContextImpl RenderbufferImpl *createRenderbuffer() override; // Buffer creation - BufferImpl *createBuffer(const gl::BufferState &state) override; + BufferImpl *createBuffer() override; // Vertex Array creation VertexArrayImpl *createVertexArray(const gl::VertexArrayState &data) override; diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.cpp index 18e1b3da4..9286d9b0d 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.cpp @@ -205,7 +205,7 @@ gl::Error Framebuffer9::readPixelsImpl(const gl::Rectangle &area, packParams.outputPitch = static_cast(outputPitch); packParams.pack = pack; - PackPixels(packParams, d3dFormatInfo.info(), inputPitch, source, pixels); + PackPixels(packParams, *d3dFormatInfo.info, inputPitch, source, pixels); systemSurface->UnlockRect(); SafeRelease(systemSurface); @@ -404,7 +404,7 @@ GLenum Framebuffer9::getRenderTargetImplementationFormat(RenderTargetD3D *render { RenderTarget9 *renderTarget9 = GetAs(renderTarget); const d3d9::D3DFormat &d3dFormatInfo = d3d9::GetD3DFormatInfo(renderTarget9->getD3DFormat()); - return d3dFormatInfo.info().glInternalFormat; + return d3dFormatInfo.info->glInternalFormat; } } // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Image9.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Image9.cpp index ad2c41584..24c1e9150 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Image9.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Image9.cpp @@ -61,7 +61,7 @@ gl::Error Image9::generateMip(IDirect3DSurface9 *destSurface, IDirect3DSurface9 ASSERT(sourceDesc.Height == 1 || sourceDesc.Height / 2 == destDesc.Height); const d3d9::D3DFormat &d3dFormatInfo = d3d9::GetD3DFormatInfo(sourceDesc.Format); - ASSERT(d3dFormatInfo.info().mipGenerationFunction != NULL); + ASSERT(d3dFormatInfo.info->mipGenerationFunction != NULL); D3DLOCKED_RECT sourceLocked = {0}; result = sourceSurface->LockRect(&sourceLocked, NULL, D3DLOCK_READONLY); @@ -85,9 +85,8 @@ gl::Error Image9::generateMip(IDirect3DSurface9 *destSurface, IDirect3DSurface9 ASSERT(sourceData && destData); - d3dFormatInfo.info().mipGenerationFunction(sourceDesc.Width, sourceDesc.Height, 1, sourceData, - sourceLocked.Pitch, 0, destData, destLocked.Pitch, - 0); + d3dFormatInfo.info->mipGenerationFunction(sourceDesc.Width, sourceDesc.Height, 1, sourceData, + sourceLocked.Pitch, 0, destData, destLocked.Pitch, 0); destSurface->UnlockRect(); sourceSurface->UnlockRect(); @@ -295,6 +294,7 @@ void Image9::unlock() if (mSurface) { HRESULT result = mSurface->UnlockRect(); + UNUSED_ASSERTION_VARIABLE(result); ASSERT(SUCCEEDED(result)); } } @@ -475,17 +475,17 @@ gl::Error Image9::copyToSurface(IDirect3DSurface9 *destSurface, const gl::Box &a // into the target pixel rectangle. gl::Error Image9::loadData(const gl::Box &area, const gl::PixelUnpackState &unpack, - GLenum inputType, + GLenum type, const void *input, bool applySkipImages) { // 3D textures are not supported by the D3D9 backend. ASSERT(area.z == 0 && area.depth == 1); - ASSERT(getSizedInputFormat(inputType) == mInternalFormat); + const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(mInternalFormat); GLuint inputRowPitch = 0; ANGLE_TRY_RESULT( - formatInfo.computeRowPitch(area.width, unpack.alignment, unpack.rowLength), + formatInfo.computeRowPitch(type, area.width, unpack.alignment, unpack.rowLength), inputRowPitch); ASSERT(!applySkipImages); ASSERT(unpack.skipPixels == 0); @@ -523,10 +523,11 @@ gl::Error Image9::loadCompressedData(const gl::Box &area, const void *input) const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(mInternalFormat); GLsizei inputRowPitch = 0; - ANGLE_TRY_RESULT(formatInfo.computeRowPitch(area.width, 1, 0), inputRowPitch); + ANGLE_TRY_RESULT(formatInfo.computeRowPitch(GL_UNSIGNED_BYTE, area.width, 1, 0), inputRowPitch); GLsizei inputDepthPitch = 0; - ANGLE_TRY_RESULT(formatInfo.computeDepthPitch(area.height, 0, inputDepthPitch), - inputDepthPitch); + ANGLE_TRY_RESULT( + formatInfo.computeDepthPitch(GL_UNSIGNED_BYTE, area.width, area.height, 1, 0, 0), + inputDepthPitch); const d3d9::TextureFormat &d3d9FormatInfo = d3d9::GetTextureFormatInfo(mInternalFormat); diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp index d578d4075..63b33b6f2 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp @@ -525,7 +525,6 @@ void Renderer9::generateDisplayExtensions(egl::DisplayExtensions *outExtensions) outExtensions->d3dShareHandleClientBuffer = true; outExtensions->surfaceD3DTexture2DShareHandle = true; } - outExtensions->d3dTextureClientBuffer = true; outExtensions->querySurfacePointer = true; outExtensions->windowFixedSize = true; @@ -673,111 +672,12 @@ NativeWindowD3D *Renderer9::createNativeWindow(EGLNativeWindowType window, SwapChainD3D *Renderer9::createSwapChain(NativeWindowD3D *nativeWindow, HANDLE shareHandle, - IUnknown *d3dTexture, GLenum backBufferFormat, GLenum depthBufferFormat, EGLint orientation) { - return new SwapChain9(this, GetAs(nativeWindow), shareHandle, d3dTexture, - backBufferFormat, depthBufferFormat, orientation); -} - -egl::Error Renderer9::getD3DTextureInfo(IUnknown *d3dTexture, - EGLint *width, - EGLint *height, - GLenum *fboFormat) const -{ - IDirect3DTexture9 *texture = nullptr; - if (FAILED(d3dTexture->QueryInterface(&texture))) - { - return egl::Error(EGL_BAD_PARAMETER, "client buffer is not a IDirect3DTexture9"); - } - - IDirect3DDevice9 *textureDevice = nullptr; - texture->GetDevice(&textureDevice); - if (textureDevice != mDevice) - { - SafeRelease(texture); - return egl::Error(EGL_BAD_PARAMETER, "Texture's device does not match."); - } - SafeRelease(textureDevice); - - D3DSURFACE_DESC desc; - texture->GetLevelDesc(0, &desc); - SafeRelease(texture); - - if (width) - { - *width = static_cast(desc.Width); - } - if (height) - { - *height = static_cast(desc.Height); - } - - // From table egl.restrictions in EGL_ANGLE_d3d_texture_client_buffer. - switch (desc.Format) - { - case D3DFMT_R8G8B8: - case D3DFMT_A8R8G8B8: - case D3DFMT_A16B16G16R16F: - case D3DFMT_A32B32G32R32F: - break; - - default: - return egl::Error(EGL_BAD_PARAMETER, "Unknown client buffer texture format: %u.", - desc.Format); - } - - if (fboFormat) - { - const auto &d3dFormatInfo = d3d9::GetD3DFormatInfo(desc.Format); - ASSERT(d3dFormatInfo.info().id != angle::Format::ID::NONE); - *fboFormat = d3dFormatInfo.info().fboImplementationInternalFormat; - } - - return egl::Error(EGL_SUCCESS); -} - -egl::Error Renderer9::validateShareHandle(const egl::Config *config, - HANDLE shareHandle, - const egl::AttributeMap &attribs) const -{ - if (shareHandle == nullptr) - { - return egl::Error(EGL_BAD_PARAMETER, "NULL share handle."); - } - - EGLint width = attribs.getAsInt(EGL_WIDTH, 0); - EGLint height = attribs.getAsInt(EGL_HEIGHT, 0); - ASSERT(width != 0 && height != 0); - - const d3d9::TextureFormat &backBufferd3dFormatInfo = - d3d9::GetTextureFormatInfo(config->renderTargetFormat); - - IDirect3DTexture9 *texture = nullptr; - HRESULT result = mDevice->CreateTexture(width, height, 1, D3DUSAGE_RENDERTARGET, - backBufferd3dFormatInfo.texFormat, D3DPOOL_DEFAULT, - &texture, &shareHandle); - if (FAILED(result)) - { - return egl::Error(EGL_BAD_PARAMETER, "Failed to open share handle, result: 0x%X.", result); - } - - DWORD levelCount = texture->GetLevelCount(); - - D3DSURFACE_DESC desc; - texture->GetLevelDesc(0, &desc); - SafeRelease(texture); - - if (levelCount != 1 || desc.Width != static_cast(width) || - desc.Height != static_cast(height) || - desc.Format != backBufferd3dFormatInfo.texFormat) - { - return egl::Error(EGL_BAD_PARAMETER, "Invalid texture parameters in share handle texture."); - } - - return egl::Error(EGL_SUCCESS); + return new SwapChain9(this, GetAs(nativeWindow), shareHandle, backBufferFormat, + depthBufferFormat, orientation); } ContextImpl *Renderer9::createContext(const gl::ContextState &state) @@ -918,9 +818,7 @@ gl::Error Renderer9::setSamplerState(gl::SamplerType type, int index, gl::Textur mDevice->SetSamplerState(d3dSampler, D3DSAMP_MIPMAPLODBIAS, static_cast(lodBias)); if (getNativeExtensions().textureFilterAnisotropic) { - DWORD maxAnisotropy = - std::min(mDeviceCaps.MaxAnisotropy, static_cast(samplerState.maxAnisotropy)); - mDevice->SetSamplerState(d3dSampler, D3DSAMP_MAXANISOTROPY, maxAnisotropy); + mDevice->SetSamplerState(d3dSampler, D3DSAMP_MAXANISOTROPY, (DWORD)samplerState.maxAnisotropy); } } @@ -1007,18 +905,7 @@ gl::Error Renderer9::updateState(Context9 *context, GLenum drawMode) setScissorRectangle(glState.getScissor(), glState.isScissorTestEnabled()); // Setting blend, depth stencil, and rasterizer states - // Since framebuffer->getSamples will return the original samples which may be different with - // the sample counts that we set in render target view, here we use renderTarget->getSamples to - // get the actual samples. - GLsizei samples = 0; - auto firstColorAttachment = framebuffer->getFirstColorbuffer(); - if (firstColorAttachment) - { - ASSERT(firstColorAttachment->isAttached()); - RenderTarget9 *renderTarget = nullptr; - ANGLE_TRY(firstColorAttachment->getRenderTarget(&renderTarget)); - samples = renderTarget->getSamples(); - } + int samples = framebuffer->getSamples(data); gl::RasterizerState rasterizer = glState.getRasterizerState(); rasterizer.pointDrawMode = (drawMode == GL_POINTS); rasterizer.multiSample = (samples != 0); @@ -1041,18 +928,7 @@ gl::Error Renderer9::setBlendDepthRasterStates(const gl::ContextState &glData, G const auto &glState = glData.getState(); auto drawFramebuffer = glState.getDrawFramebuffer(); ASSERT(!drawFramebuffer->hasAnyDirtyBit()); - // Since framebuffer->getSamples will return the original samples which may be different with - // the sample counts that we set in render target view, here we use renderTarget->getSamples to - // get the actual samples. - GLsizei samples = 0; - auto firstColorAttachment = drawFramebuffer->getFirstColorbuffer(); - if (firstColorAttachment) - { - ASSERT(firstColorAttachment->isAttached()); - RenderTarget9 *renderTarget = nullptr; - ANGLE_TRY(firstColorAttachment->getRenderTarget(&renderTarget)); - samples = renderTarget->getSamples(); - } + int samples = drawFramebuffer->getSamples(glData); gl::RasterizerState rasterizer = glState.getRasterizerState(); rasterizer.pointDrawMode = (drawMode == GL_POINTS); rasterizer.multiSample = (samples != 0); @@ -2464,15 +2340,6 @@ gl::Error Renderer9::copyTexture(const gl::Texture *source, return gl::Error(GL_INVALID_OPERATION); } -gl::Error Renderer9::copyCompressedTexture(const gl::Texture *source, - GLint sourceLevel, - TextureStorage *storage, - GLint destLevel) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - gl::Error Renderer9::createRenderTarget(int width, int height, GLenum format, GLsizei samples, RenderTargetD3D **outRT) { const d3d9::TextureFormat &d3d9FormatInfo = d3d9::GetTextureFormatInfo(format); diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.h b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.h index 9c3ae8b04..fb8d8fa21 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.h @@ -18,7 +18,6 @@ #include "libANGLE/renderer/d3d/d3d9/ShaderCache.h" #include "libANGLE/renderer/d3d/d3d9/VertexDeclarationCache.h" #include "libANGLE/renderer/d3d/d3d9/StateManager9.h" -#include "libANGLE/renderer/driver_utils.h" namespace gl { @@ -88,17 +87,9 @@ class Renderer9 : public RendererD3D SwapChainD3D *createSwapChain(NativeWindowD3D *nativeWindow, HANDLE shareHandle, - IUnknown *d3dTexture, GLenum backBufferFormat, GLenum depthBufferFormat, EGLint orientation) override; - egl::Error getD3DTextureInfo(IUnknown *d3dTexture, - EGLint *width, - EGLint *height, - GLenum *fboFormat) const override; - egl::Error validateShareHandle(const egl::Config *config, - HANDLE shareHandle, - const egl::AttributeMap &attribs) const override; ContextImpl *createContext(const gl::ContextState &state) override; @@ -220,10 +211,6 @@ class Renderer9 : public RendererD3D bool unpackFlipY, bool unpackPremultiplyAlpha, bool unpackUnmultiplyAlpha) override; - gl::Error copyCompressedTexture(const gl::Texture *source, - GLint sourceLevel, - TextureStorage *storage, - GLint destLevel) override; // RenderTarget creation gl::Error createRenderTarget(int width, diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/StateManager9.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/StateManager9.cpp index 54885bf81..5fb675ddb 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/StateManager9.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/StateManager9.cpp @@ -70,7 +70,7 @@ StateManager9::~StateManager9() void StateManager9::initialize() { - mUsingZeroColorMaskWorkaround = IsAMD(mRenderer9->getVendorId()); + mUsingZeroColorMaskWorkaround = mRenderer9->getVendorId() == VENDOR_ID_AMD; } void StateManager9::forceSetBlendState() diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/SwapChain9.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/SwapChain9.cpp index 7e6948ebb..b61809050 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/SwapChain9.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/SwapChain9.cpp @@ -19,11 +19,10 @@ namespace rx SwapChain9::SwapChain9(Renderer9 *renderer, NativeWindow9 *nativeWindow, HANDLE shareHandle, - IUnknown *d3dTexture, GLenum backBufferFormat, GLenum depthBufferFormat, EGLint orientation) - : SwapChainD3D(shareHandle, d3dTexture, backBufferFormat, depthBufferFormat), + : SwapChainD3D(shareHandle, backBufferFormat, depthBufferFormat), mRenderer(renderer), mWidth(-1), mHeight(-1), @@ -106,37 +105,28 @@ EGLint SwapChain9::reset(int backbufferWidth, int backbufferHeight, EGLint swapI SafeRelease(mOffscreenTexture); SafeRelease(mDepthStencil); - const d3d9::TextureFormat &backBufferd3dFormatInfo = - d3d9::GetTextureFormatInfo(mOffscreenRenderTargetFormat); - if (mD3DTexture != nullptr) + HANDLE *pShareHandle = NULL; + if (!mNativeWindow->getNativeWindow() && mRenderer->getShareHandleSupport()) { - result = mD3DTexture->QueryInterface(&mOffscreenTexture); - ASSERT(SUCCEEDED(result)); + pShareHandle = &mShareHandle; } - else + + const d3d9::TextureFormat &backBufferd3dFormatInfo = d3d9::GetTextureFormatInfo(mOffscreenRenderTargetFormat); + result = device->CreateTexture(backbufferWidth, backbufferHeight, 1, D3DUSAGE_RENDERTARGET, + backBufferd3dFormatInfo.texFormat, D3DPOOL_DEFAULT, &mOffscreenTexture, + pShareHandle); + if (FAILED(result)) { - HANDLE *pShareHandle = NULL; - if (!mNativeWindow->getNativeWindow() && mRenderer->getShareHandleSupport()) + ERR("Could not create offscreen texture: %08lX", result); + release(); + + if (d3d9::isDeviceLostError(result)) { - pShareHandle = &mShareHandle; + return EGL_CONTEXT_LOST; } - - result = device->CreateTexture(backbufferWidth, backbufferHeight, 1, D3DUSAGE_RENDERTARGET, - backBufferd3dFormatInfo.texFormat, D3DPOOL_DEFAULT, - &mOffscreenTexture, pShareHandle); - if (FAILED(result)) + else { - ERR("Could not create offscreen texture: %08lX", result); - release(); - - if (d3d9::isDeviceLostError(result)) - { - return EGL_CONTEXT_LOST; - } - else - { - return EGL_BAD_ALLOC; - } + return EGL_BAD_ALLOC; } } @@ -201,7 +191,7 @@ EGLint SwapChain9::reset(int backbufferWidth, int backbufferHeight, EGLint swapI // // Some non-switchable AMD GPUs / drivers do not respect the source rectangle to Present. Therefore, when the vendor ID // is not Intel, the back buffer width must be exactly the same width as the window or horizontal scaling will occur. - if (IsIntel(mRenderer->getVendorId())) + if (mRenderer->getVendorId() == VENDOR_ID_INTEL) { presentParameters.BackBufferWidth = (presentParameters.BackBufferWidth + 63) / 64 * 64; } diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/SwapChain9.h b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/SwapChain9.h index 2e5cce1db..7c21b1788 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/SwapChain9.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/SwapChain9.h @@ -24,7 +24,6 @@ class SwapChain9 : public SwapChainD3D SwapChain9(Renderer9 *renderer, NativeWindow9 *nativeWindow, HANDLE shareHandle, - IUnknown *d3dTexture, GLenum backBufferFormat, GLenum depthBufferFormat, EGLint orientation); diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.cpp index db8765218..fd792752a 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.cpp @@ -153,6 +153,7 @@ gl::Error TextureStorage9_2D::getSurfaceLevel(GLenum target, IDirect3DSurface9 **outSurface) { ASSERT(target == GL_TEXTURE_2D); + UNUSED_ASSERTION_VARIABLE(target); IDirect3DBaseTexture9 *baseTexture = NULL; gl::Error error = getBaseTexture(&baseTexture); @@ -328,6 +329,8 @@ gl::Error TextureStorage9_EGLImage::getSurfaceLevel(GLenum target, { ASSERT(target == GL_TEXTURE_2D); ASSERT(level == 0); + UNUSED_ASSERTION_VARIABLE(target); + UNUSED_ASSERTION_VARIABLE(level); RenderTargetD3D *renderTargetD3D = nullptr; gl::Error error = mImage->getRenderTarget(&renderTargetD3D); @@ -347,6 +350,7 @@ gl::Error TextureStorage9_EGLImage::getRenderTarget(const gl::ImageIndex &index, { ASSERT(!index.hasLayer()); ASSERT(index.mipIndex == 0); + UNUSED_ASSERTION_VARIABLE(index); return mImage->getRenderTarget(outRT); } diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/VertexDeclarationCache.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/VertexDeclarationCache.cpp index c2e935e71..afae5188c 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/VertexDeclarationCache.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/VertexDeclarationCache.cpp @@ -94,7 +94,7 @@ gl::Error VertexDeclarationCache::applyDeclaration( // The validation layer checks that there is at least one active attribute with a zero divisor as per // the GL_ANGLE_instanced_arrays spec. - ASSERT(indexedAttribute != invalidAttribIndex || !attributes.size()); + ASSERT(indexedAttribute != invalidAttribIndex); } D3DCAPS9 caps; diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/formatutils9.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/formatutils9.cpp index 7cff9a117..8e6d40e25 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/formatutils9.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/formatutils9.cpp @@ -24,13 +24,13 @@ namespace rx namespace d3d9 { -constexpr D3DFORMAT D3DFMT_INTZ = ((D3DFORMAT)(MAKEFOURCC('I', 'N', 'T', 'Z'))); -constexpr D3DFORMAT D3DFMT_NULL = ((D3DFORMAT)(MAKEFOURCC('N', 'U', 'L', 'L'))); +const D3DFORMAT D3DFMT_INTZ = ((D3DFORMAT)(MAKEFOURCC('I', 'N', 'T', 'Z'))); +const D3DFORMAT D3DFMT_NULL = ((D3DFORMAT)(MAKEFOURCC('N', 'U', 'L', 'L'))); // A map to determine the pixel size and mip generation function of a given D3D format typedef std::map D3D9FormatInfoMap; -constexpr D3DFormat::D3DFormat() +D3DFormat::D3DFormat() : pixelBytes(0), blockWidth(0), blockHeight(0), @@ -41,188 +41,97 @@ constexpr D3DFormat::D3DFormat() luminanceBits(0), depthBits(0), stencilBits(0), - formatID(angle::Format::ID::NONE) + info(nullptr) { } -constexpr D3DFormat::D3DFormat(GLuint bits, - GLuint blockWidth, - GLuint blockHeight, - GLuint redBits, - GLuint greenBits, - GLuint blueBits, - GLuint alphaBits, - GLuint lumBits, - GLuint depthBits, - GLuint stencilBits, - Format::ID formatID) - : pixelBytes(bits / 8), - blockWidth(blockWidth), - blockHeight(blockHeight), - redBits(redBits), - greenBits(greenBits), - blueBits(blueBits), - alphaBits(alphaBits), - luminanceBits(lumBits), - depthBits(depthBits), - stencilBits(stencilBits), - formatID(formatID) +static inline void InsertD3DFormatInfo(D3D9FormatInfoMap *map, + D3DFORMAT format, + GLuint bits, + GLuint blockWidth, + GLuint blockHeight, + GLuint redBits, + GLuint greenBits, + GLuint blueBits, + GLuint alphaBits, + GLuint lumBits, + GLuint depthBits, + GLuint stencilBits, + Format::ID formatID) { + D3DFormat info; + info.pixelBytes = bits / 8; + info.blockWidth = blockWidth; + info.blockHeight = blockHeight; + info.redBits = redBits; + info.greenBits = greenBits; + info.blueBits = blueBits; + info.alphaBits = alphaBits; + info.luminanceBits = lumBits; + info.depthBits = depthBits; + info.stencilBits = stencilBits; + info.info = &Format::Get(formatID); + + map->insert(std::make_pair(format, info)); +} + +static D3D9FormatInfoMap BuildD3D9FormatInfoMap() +{ + using namespace angle; // For image reading and mipmap generation functions + + D3D9FormatInfoMap map; + + // clang-format off + // | D3DFORMAT | S |W |H | R | G | B | A | L | D | S | ANGLE format | + InsertD3DFormatInfo(&map, D3DFMT_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Format::ID::NONE ); + InsertD3DFormatInfo(&map, D3DFMT_UNKNOWN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Format::ID::NONE ); + + InsertD3DFormatInfo(&map, D3DFMT_L8, 8, 1, 1, 0, 0, 0, 0, 8, 0, 0, Format::ID::L8_UNORM ); + InsertD3DFormatInfo(&map, D3DFMT_A8, 8, 1, 1, 0, 0, 0, 8, 0, 0, 0, Format::ID::A8_UNORM ); + InsertD3DFormatInfo(&map, D3DFMT_A8L8, 16, 1, 1, 0, 0, 0, 8, 8, 0, 0, Format::ID::L8A8_UNORM ); + InsertD3DFormatInfo(&map, D3DFMT_A4R4G4B4, 16, 1, 1, 4, 4, 4, 4, 0, 0, 0, Format::ID::B4G4R4A4_UNORM ); + InsertD3DFormatInfo(&map, D3DFMT_A1R5G5B5, 16, 1, 1, 5, 5, 5, 1, 0, 0, 0, Format::ID::B5G5R5A1_UNORM ); + InsertD3DFormatInfo(&map, D3DFMT_R5G6B5, 16, 1, 1, 5, 6, 5, 0, 0, 0, 0, Format::ID::R5G6B5_UNORM ); + InsertD3DFormatInfo(&map, D3DFMT_X8R8G8B8, 32, 1, 1, 8, 8, 8, 0, 0, 0, 0, Format::ID::B8G8R8X8_UNORM ); + InsertD3DFormatInfo(&map, D3DFMT_A8R8G8B8, 32, 1, 1, 8, 8, 8, 8, 0, 0, 0, Format::ID::B8G8R8A8_UNORM ); + InsertD3DFormatInfo(&map, D3DFMT_R16F, 16, 1, 1, 16, 0, 0, 0, 0, 0, 0, Format::ID::R16_FLOAT ); + InsertD3DFormatInfo(&map, D3DFMT_G16R16F, 32, 1, 1, 16, 16, 0, 0, 0, 0, 0, Format::ID::R16G16_FLOAT ); + InsertD3DFormatInfo(&map, D3DFMT_A16B16G16R16F, 64, 1, 1, 16, 16, 16, 16, 0, 0, 0, Format::ID::R16G16B16A16_FLOAT ); + InsertD3DFormatInfo(&map, D3DFMT_R32F, 32, 1, 1, 32, 0, 0, 0, 0, 0, 0, Format::ID::R32_FLOAT ); + InsertD3DFormatInfo(&map, D3DFMT_G32R32F, 64, 1, 1, 32, 32, 0, 0, 0, 0, 0, Format::ID::R32G32_FLOAT ); + InsertD3DFormatInfo(&map, D3DFMT_A32B32G32R32F, 128, 1, 1, 32, 32, 32, 32, 0, 0, 0, Format::ID::R32G32B32A32_FLOAT ); + + InsertD3DFormatInfo(&map, D3DFMT_D16, 16, 1, 1, 0, 0, 0, 0, 0, 16, 0, Format::ID::D16_UNORM ); + InsertD3DFormatInfo(&map, D3DFMT_D24S8, 32, 1, 1, 0, 0, 0, 0, 0, 24, 8, Format::ID::D24_UNORM_S8_UINT ); + InsertD3DFormatInfo(&map, D3DFMT_D24X8, 32, 1, 1, 0, 0, 0, 0, 0, 24, 0, Format::ID::D16_UNORM ); + InsertD3DFormatInfo(&map, D3DFMT_D32, 32, 1, 1, 0, 0, 0, 0, 0, 32, 0, Format::ID::D32_UNORM ); + + InsertD3DFormatInfo(&map, D3DFMT_INTZ, 32, 1, 1, 0, 0, 0, 0, 0, 24, 8, Format::ID::D24_UNORM_S8_UINT ); + + InsertD3DFormatInfo(&map, D3DFMT_DXT1, 64, 4, 4, 0, 0, 0, 0, 0, 0, 0, Format::ID::BC1_RGBA_UNORM_BLOCK); + InsertD3DFormatInfo(&map, D3DFMT_DXT3, 128, 4, 4, 0, 0, 0, 0, 0, 0, 0, Format::ID::BC2_RGBA_UNORM_BLOCK); + InsertD3DFormatInfo(&map, D3DFMT_DXT5, 128, 4, 4, 0, 0, 0, 0, 0, 0, 0, Format::ID::BC3_RGBA_UNORM_BLOCK); + // clang-format on + + return map; } const D3DFormat &GetD3DFormatInfo(D3DFORMAT format) { - if (format == D3DFMT_NULL) + static const D3D9FormatInfoMap infoMap = BuildD3D9FormatInfoMap(); + D3D9FormatInfoMap::const_iterator iter = infoMap.find(format); + if (iter != infoMap.end()) { - static constexpr D3DFormat info(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Format::ID::NONE); - return info; + return iter->second; } - - if (format == D3DFMT_INTZ) + else { - static constexpr D3DFormat info(32, 1, 1, 0, 0, 0, 0, 0, 24, 8, - Format::ID::D24_UNORM_S8_UINT); - return info; + static const D3DFormat defaultInfo; + return defaultInfo; } +} - switch (format) - { - case D3DFMT_UNKNOWN: - { - static constexpr D3DFormat info(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Format::ID::NONE); - return info; - } - - case D3DFMT_L8: - { - static constexpr D3DFormat info(8, 1, 1, 0, 0, 0, 0, 8, 0, 0, Format::ID::L8_UNORM); - return info; - } - case D3DFMT_A8: - { - static constexpr D3DFormat info(8, 1, 1, 0, 0, 0, 8, 0, 0, 0, Format::ID::A8_UNORM); - return info; - } - case D3DFMT_A8L8: - { - static constexpr D3DFormat info(16, 1, 1, 0, 0, 0, 8, 8, 0, 0, Format::ID::L8A8_UNORM); - return info; - } - - case D3DFMT_A4R4G4B4: - { - static constexpr D3DFormat info(16, 1, 1, 4, 4, 4, 4, 0, 0, 0, - Format::ID::B4G4R4A4_UNORM); - return info; - } - case D3DFMT_A1R5G5B5: - { - static constexpr D3DFormat info(16, 1, 1, 5, 5, 5, 1, 0, 0, 0, - Format::ID::B5G5R5A1_UNORM); - return info; - } - case D3DFMT_R5G6B5: - { - static constexpr D3DFormat info(16, 1, 1, 5, 6, 5, 0, 0, 0, 0, - Format::ID::R5G6B5_UNORM); - return info; - } - case D3DFMT_X8R8G8B8: - { - static constexpr D3DFormat info(32, 1, 1, 8, 8, 8, 0, 0, 0, 0, - Format::ID::B8G8R8X8_UNORM); - return info; - } - case D3DFMT_A8R8G8B8: - { - static constexpr D3DFormat info(32, 1, 1, 8, 8, 8, 8, 0, 0, 0, - Format::ID::B8G8R8A8_UNORM); - return info; - } - - case D3DFMT_R16F: - { - static constexpr D3DFormat info(16, 1, 1, 16, 0, 0, 0, 0, 0, 0, Format::ID::R16_FLOAT); - return info; - } - case D3DFMT_G16R16F: - { - static constexpr D3DFormat info(32, 1, 1, 16, 16, 0, 0, 0, 0, 0, - Format::ID::R16G16_FLOAT); - return info; - } - case D3DFMT_A16B16G16R16F: - { - static constexpr D3DFormat info(64, 1, 1, 16, 16, 16, 16, 0, 0, 0, - Format::ID::R16G16B16A16_FLOAT); - return info; - } - case D3DFMT_R32F: - { - static constexpr D3DFormat info(32, 1, 1, 32, 0, 0, 0, 0, 0, 0, Format::ID::R32_FLOAT); - return info; - } - case D3DFMT_G32R32F: - { - static constexpr D3DFormat info(64, 1, 1, 32, 32, 0, 0, 0, 0, 0, - Format::ID::R32G32_FLOAT); - return info; - } - case D3DFMT_A32B32G32R32F: - { - static constexpr D3DFormat info(128, 1, 1, 32, 32, 32, 32, 0, 0, 0, - Format::ID::R32G32B32A32_FLOAT); - return info; - } - - case D3DFMT_D16: - { - static constexpr D3DFormat info(16, 1, 1, 0, 0, 0, 0, 0, 16, 0, Format::ID::D16_UNORM); - return info; - } - case D3DFMT_D24S8: - { - static constexpr D3DFormat info(32, 1, 1, 0, 0, 0, 0, 0, 24, 8, - Format::ID::D24_UNORM_S8_UINT); - return info; - } - case D3DFMT_D24X8: - { - static constexpr D3DFormat info(32, 1, 1, 0, 0, 0, 0, 0, 24, 0, Format::ID::D16_UNORM); - return info; - } - case D3DFMT_D32: - { - static constexpr D3DFormat info(32, 1, 1, 0, 0, 0, 0, 0, 32, 0, Format::ID::D32_UNORM); - return info; - } - - case D3DFMT_DXT1: - { - static constexpr D3DFormat info(64, 4, 4, 0, 0, 0, 0, 0, 0, 0, - Format::ID::BC1_RGBA_UNORM_BLOCK); - return info; - } - case D3DFMT_DXT3: - { - static constexpr D3DFormat info(128, 4, 4, 0, 0, 0, 0, 0, 0, 0, - Format::ID::BC2_RGBA_UNORM_BLOCK); - return info; - } - case D3DFMT_DXT5: - { - static constexpr D3DFormat info(128, 4, 4, 0, 0, 0, 0, 0, 0, 0, - Format::ID::BC3_RGBA_UNORM_BLOCK); - return info; - } - default: - { - static constexpr D3DFormat defaultInfo; - return defaultInfo; - } - } -} typedef std::pair InternalFormatInitialzerPair; typedef std::map InternalFormatInitialzerMap; diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/formatutils9.h b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/formatutils9.h index 828252d33..2937e14e7 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/formatutils9.h +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/formatutils9.h @@ -29,20 +29,7 @@ namespace d3d9 struct D3DFormat { - constexpr D3DFormat(); - constexpr D3DFormat(GLuint pixelBytes, - GLuint blockWidth, - GLuint blockHeight, - GLuint redBits, - GLuint greenBits, - GLuint blueBits, - GLuint alphaBits, - GLuint luminanceBits, - GLuint depthBits, - GLuint stencilBits, - angle::Format::ID formatID); - - const angle::Format &info() const { return angle::Format::Get(formatID); } + D3DFormat(); GLuint pixelBytes; GLuint blockWidth; @@ -57,7 +44,7 @@ struct D3DFormat GLuint depthBits; GLuint stencilBits; - angle::Format::ID formatID; + const angle::Format *info; }; const D3DFormat &GetD3DFormatInfo(D3DFORMAT format); diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp index a6e1f239d..1883636a3 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp @@ -18,7 +18,6 @@ #include "libANGLE/renderer/d3d/d3d9/RenderTarget9.h" #include "libANGLE/renderer/d3d/FramebufferD3D.h" #include "libANGLE/renderer/d3d/WorkaroundsD3D.h" -#include "libANGLE/renderer/driver_utils.h" #include "third_party/systeminfo/SystemInfo.h" @@ -307,7 +306,7 @@ GLsizei GetSamplesCount(D3DMULTISAMPLE_TYPE type) bool IsFormatChannelEquivalent(D3DFORMAT d3dformat, GLenum format) { - GLenum internalFormat = d3d9::GetD3DFormatInfo(d3dformat).info().glInternalFormat; + GLenum internalFormat = d3d9::GetD3DFormatInfo(d3dformat).info->glInternalFormat; GLenum convertedFormat = gl::GetInternalFormatInfo(internalFormat).format; return convertedFormat == format; } @@ -541,12 +540,12 @@ void GenerateCaps(IDirect3D9 *d3d9, { // ATI cards on XP have problems with non-power-of-two textures. extensions->textureNPOT = !(deviceCaps.TextureCaps & D3DPTEXTURECAPS_POW2) && - !(deviceCaps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP_POW2) && - !(deviceCaps.TextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL) && - !(!isWindowsVistaOrGreater() && IsAMD(adapterId.VendorId)); + !(deviceCaps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP_POW2) && + !(deviceCaps.TextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL) && + !(!isWindowsVistaOrGreater() && adapterId.VendorId == VENDOR_ID_AMD); // Disable depth texture support on AMD cards (See ANGLE issue 839) - if (IsAMD(adapterId.VendorId)) + if (adapterId.VendorId == VENDOR_ID_AMD) { extensions->depthTextures = false; } diff --git a/gfx/angle/src/libANGLE/renderer/driver_utils.cpp b/gfx/angle/src/libANGLE/renderer/driver_utils.cpp deleted file mode 100644 index 7e7b2d8a2..000000000 --- a/gfx/angle/src/libANGLE/renderer/driver_utils.cpp +++ /dev/null @@ -1,81 +0,0 @@ -// -// Copyright (c) 2016 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. -// - -// driver_utils.h : provides more information about current driver. - -#include - -#include "libANGLE/renderer/driver_utils.h" - -namespace rx -{ -// Intel -// Referenced from https://cgit.freedesktop.org/vaapi/intel-driver/tree/src/i965_pciids.h -namespace -{ -// gen7 -const uint32_t Haswell[] = { - 0x0402, 0x0406, 0x040A, 0x040B, 0x040E, 0x0C02, 0x0C06, 0x0C0A, 0x0C0B, 0x0C0E, - 0x0A02, 0x0A06, 0x0A0A, 0x0A0B, 0x0A0E, 0x0D02, 0x0D06, 0x0D0A, 0x0D0B, 0x0D0E, // hsw_gt1 - 0x0412, 0x0416, 0x041A, 0x041B, 0x041E, 0x0C12, 0x0C16, 0x0C1A, 0x0C1B, 0x0C1E, - 0x0A12, 0x0A16, 0x0A1A, 0x0A1B, 0x0A1E, 0x0D12, 0x0D16, 0x0D1A, 0x0D1B, 0x0D1E, // hsw_gt2 - 0x0422, 0x0426, 0x042A, 0x042B, 0x042E, 0x0C22, 0x0C26, 0x0C2A, 0x0C2B, 0x0C2E, - 0x0A22, 0x0A26, 0x0A2A, 0x0A2B, 0x0A2E, 0x0D22, 0x0D26, 0x0D2A, 0x0D2B, 0x0D2E // hsw_gt3 -}; - -// gen8 -const uint32_t Broadwell[] = {0x1602, 0x1606, 0x160A, 0x160B, 0x160D, 0x160E, - 0x1612, 0x1616, 0x161A, 0x161B, 0x161D, 0x161E, - 0x1622, 0x1626, 0x162A, 0x162B, 0x162D, 0x162E}; - -const uint32_t CherryView[] = {0x22B0, 0x22B1, 0x22B2, 0x22B3}; - -// gen9 -const uint32_t Skylake[] = {0x1902, 0x1906, 0x190A, 0x190B, 0x190E, 0x1912, 0x1913, 0x1915, 0x1916, - 0x1917, 0x191A, 0x191B, 0x191D, 0x191E, 0x1921, 0x1923, 0x1926, 0x1927, - 0x192A, 0x192B, 0x192D, 0x1932, 0x193A, 0x193B, 0x193D}; - -const uint32_t Broxton[] = {0x0A84, 0x1A84, 0x1A85, 0x5A84, 0x5A85}; - -// gen9p5 -const uint32_t Kabylake[] = {0x5916, 0x5913, 0x5906, 0x5926, 0x5921, 0x5915, 0x590E, - 0x591E, 0x5912, 0x5917, 0x5902, 0x591B, 0x593B, 0x590B, - 0x591A, 0x590A, 0x591D, 0x5908, 0x5923, 0x5927}; - -} // anonymous namespace - -bool IsHaswell(uint32_t DeviceId) -{ - return std::find(std::begin(Haswell), std::end(Haswell), DeviceId) != std::end(Haswell); -} - -bool IsBroadwell(uint32_t DeviceId) -{ - return std::find(std::begin(Broadwell), std::end(Broadwell), DeviceId) != std::end(Broadwell); -} - -bool IsCherryView(uint32_t DeviceId) -{ - return std::find(std::begin(CherryView), std::end(CherryView), DeviceId) != - std::end(CherryView); -} - -bool IsSkylake(uint32_t DeviceId) -{ - return std::find(std::begin(Skylake), std::end(Skylake), DeviceId) != std::end(Skylake); -} - -bool IsBroxton(uint32_t DeviceId) -{ - return std::find(std::begin(Broxton), std::end(Broxton), DeviceId) != std::end(Broxton); -} - -bool IsKabylake(uint32_t DeviceId) -{ - return std::find(std::begin(Kabylake), std::end(Kabylake), DeviceId) != std::end(Kabylake); -} - -} // namespace rx \ No newline at end of file diff --git a/gfx/angle/src/libANGLE/renderer/driver_utils.h b/gfx/angle/src/libANGLE/renderer/driver_utils.h deleted file mode 100644 index 865de73e1..000000000 --- a/gfx/angle/src/libANGLE/renderer/driver_utils.h +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright (c) 2016 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. -// - -// driver_utils.h : provides more information about current driver. - -#ifndef LIBANGLE_RENDERER_DRIVER_UTILS_H_ -#define LIBANGLE_RENDERER_DRIVER_UTILS_H_ - -#include "libANGLE/angletypes.h" - -namespace rx -{ - -enum VendorID : uint32_t -{ - VENDOR_ID_UNKNOWN = 0x0, - VENDOR_ID_AMD = 0x1002, - VENDOR_ID_INTEL = 0x8086, - VENDOR_ID_NVIDIA = 0x10DE, - // This is Qualcomm PCI Vendor ID. - // Android doesn't have a PCI bus, but all we need is a unique id. - VENDOR_ID_QUALCOMM = 0x5143, -}; - -inline bool IsAMD(uint32_t vendor_id) -{ - return vendor_id == VENDOR_ID_AMD; -} - -inline bool IsIntel(uint32_t vendor_id) -{ - return vendor_id == VENDOR_ID_INTEL; -} - -inline bool IsNvidia(uint32_t vendor_id) -{ - return vendor_id == VENDOR_ID_NVIDIA; -} - -inline bool IsQualcomm(uint32_t vendor_id) -{ - return vendor_id == VENDOR_ID_QUALCOMM; -} - -// Intel -bool IsHaswell(uint32_t DeviceId); -bool IsBroadwell(uint32_t DeviceId); -bool IsCherryView(uint32_t DeviceId); -bool IsSkylake(uint32_t DeviceId); -bool IsBroxton(uint32_t DeviceId); -bool IsKabylake(uint32_t DeviceId); - -} // namespace rx -#endif // LIBANGLE_RENDERER_DRIVER_UTILS_H_ \ No newline at end of file diff --git a/gfx/angle/src/libANGLE/renderer/gen_angle_format_table.py b/gfx/angle/src/libANGLE/renderer/gen_angle_format_table.py index 6b56bb40c..7356fc414 100755 --- a/gfx/angle/src/libANGLE/renderer/gen_angle_format_table.py +++ b/gfx/angle/src/libANGLE/renderer/gen_angle_format_table.py @@ -16,7 +16,7 @@ import re import sys template_autogen_h = """// GENERATED FILE - DO NOT EDIT. -// Generated by {script_name} using data from {data_source_name} +// Generated by gen_angle_format_table.py using data from angle_format_data.json // // Copyright {copyright_year} The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be @@ -35,8 +35,8 @@ enum class Format::ID }} // namespace angle """ -template_autogen_inl = """// GENERATED FILE - DO NOT EDIT. -// Generated by {script_name} using data from {data_source_name} +template_autogen_cpp = """// GENERATED FILE - DO NOT EDIT. +// Generated by gen_angle_format_table.py using data from angle_format_data.json // // Copyright {copyright_year} The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be @@ -54,21 +54,21 @@ template_autogen_inl = """// GENERATED FILE - DO NOT EDIT. namespace angle {{ -static constexpr rx::FastCopyFunctionMap::Entry BGRAEntry = {{GL_RGBA, GL_UNSIGNED_BYTE, - CopyBGRA8ToRGBA8}}; -static constexpr rx::FastCopyFunctionMap BGRACopyFunctions = {{&BGRAEntry, 1}}; -static constexpr rx::FastCopyFunctionMap NoCopyFunctions; - -constexpr Format g_formatInfoTable[] = {{ - // clang-format off - {{ Format::ID::NONE, GL_NONE, GL_NONE, nullptr, NoCopyFunctions, nullptr, GL_NONE, 0, 0, 0, 0, 0, 0 }}, -{angle_format_info_cases} // clang-format on -}}; - // static const Format &Format::Get(ID id) {{ - return g_formatInfoTable[static_cast(id)]; + // clang-format off + switch (id) + {{ +{angle_format_info_cases} + default: + UNREACHABLE(); + break; + }} + // clang-format on + + static const Format noneInfo(ID::NONE, GL_NONE, GL_NONE, nullptr, nullptr); + return noneInfo; }} }} // namespace angle @@ -123,7 +123,14 @@ def get_color_read_function(angle_format): } return 'ReadColor<' + channel_struct + ', '+ component_type_map[angle_format['componentType']] + '>' -format_entry_template = """ {{ Format::ID::{id}, {glInternalFormat}, {fboImplementationInternalFormat}, {mipGenerationFunction}, {fastCopyFunctions}, {colorReadFunction}, {namedComponentType}, {R}, {G}, {B}, {A}, {D}, {S} }}, +format_entry_template = """{space}{{ +{space} static const Format info(ID::{id}, +{space} {glInternalFormat}, +{space} {fboImplementationInternalFormat}, +{space} {mipGenerationFunction}, +{space} {colorReadFunction}); +{space} return info; +{space}}} """ def get_component_type(format_id): @@ -167,29 +174,13 @@ def get_bits(format_id): bits[token[0]] = int(token[1:]) return bits -def get_named_component_type(component_type): - if component_type == "snorm": - return "GL_SIGNED_NORMALIZED" - elif component_type == "unorm": - return "GL_UNSIGNED_NORMALIZED" - elif component_type == "float": - return "GL_FLOAT" - elif component_type == "uint": - return "GL_UNSIGNED_INT" - elif component_type == "int": - return "GL_INT" - elif component_type == "none": - return "GL_NONE" - else: - raise ValueError("Unknown component type for " + component_type) - def json_to_table_data(format_id, json, angle_to_gl): table_data = "" parsed = { + "space": " ", "id": format_id, - "fastCopyFunctions": "NoCopyFunctions", } for k, v in json.iteritems(): @@ -214,25 +205,14 @@ def json_to_table_data(format_id, json, angle_to_gl): parsed["mipGenerationFunction"] = get_mip_generation_function(parsed) parsed["colorReadFunction"] = get_color_read_function(parsed) - for channel in "ABDGLRS": - if parsed["bits"] != None and channel in parsed["bits"]: - parsed[channel] = parsed["bits"][channel] - else: - parsed[channel] = "0" - - parsed["namedComponentType"] = get_named_component_type(parsed["componentType"]) - - if format_id == "B8G8R8A8_UNORM": - parsed["fastCopyFunctions"] = "BGRACopyFunctions" - return format_entry_template.format(**parsed) -def parse_angle_format_table(all_angle, json_data, angle_to_gl): +def parse_json_into_angle_format_switch_string(all_angle, json_data, angle_to_gl): table_data = '' for format_id in sorted(all_angle): - if format_id != "NONE": - format_info = json_data[format_id] if format_id in json_data else {} - table_data += json_to_table_data(format_id, format_info, angle_to_gl) + format_info = json_data[format_id] if format_id in json_data else {} + table_data += ' case ID::' + format_id + ':\n' + table_data += json_to_table_data(format_id, format_info, angle_to_gl) return table_data @@ -246,27 +226,22 @@ def gen_enum_string(all_angle): gl_to_angle = angle_format.load_forward_table('angle_format_map.json') angle_to_gl = angle_format.load_inverse_table('angle_format_map.json') -data_source_name = 'angle_format_data.json' -json_data = angle_format.load_json(data_source_name) +json_data = angle_format.load_json('angle_format_data.json') all_angle = angle_to_gl.keys() -angle_format_cases = parse_angle_format_table( +angle_format_cases = parse_json_into_angle_format_switch_string( all_angle, json_data, angle_to_gl) -output_cpp = template_autogen_inl.format( - script_name = sys.argv[0], - copyright_year = date.today().year, - angle_format_info_cases = angle_format_cases, - data_source_name = data_source_name) -with open('Format_table_autogen.cpp', 'wt') as out_file: +output_cpp = template_autogen_cpp.format( + copyright_year=date.today().year, + angle_format_info_cases=angle_format_cases) +with open('Format_autogen.cpp', 'wt') as out_file: out_file.write(output_cpp) out_file.close() enum_data = gen_enum_string(all_angle) output_h = template_autogen_h.format( - script_name = sys.argv[0], - copyright_year = date.today().year, - angle_format_enum = enum_data, - data_source_name = data_source_name) + copyright_year=date.today().year, + angle_format_enum=enum_data) with open('Format_ID_autogen.inl', 'wt') as out_file: out_file.write(output_h) out_file.close() diff --git a/gfx/angle/src/libANGLE/renderer/gl/BlitGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/BlitGL.cpp index b181822ff..0a624dcb1 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/BlitGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/BlitGL.cpp @@ -30,7 +30,7 @@ gl::Error CheckCompileStatus(const rx::FunctionsGL *functions, GLuint shader) return gl::Error(GL_OUT_OF_MEMORY, "Failed to compile internal blit shader."); } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error CheckLinkStatus(const rx::FunctionsGL *functions, GLuint program) @@ -43,7 +43,7 @@ gl::Error CheckLinkStatus(const rx::FunctionsGL *functions, GLuint program) return gl::Error(GL_OUT_OF_MEMORY, "Failed to link internal blit program."); } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } } // anonymous namespace @@ -58,9 +58,6 @@ BlitGL::BlitGL(const FunctionsGL *functions, mWorkarounds(workarounds), mStateManager(stateManager), mBlitProgram(0), - mSourceTextureLocation(-1), - mScaleLocation(-1), - mOffsetLocation(-1), mScratchFBO(0), mVAO(0) { @@ -133,7 +130,11 @@ gl::Error BlitGL::copySubImageToLUMAWorkaroundTexture(GLuint texture, const gl::Rectangle &sourceArea, const gl::Framebuffer *source) { - ANGLE_TRY(initializeResources()); + gl::Error error = initializeResources(); + if (error.isError()) + { + return error; + } // Blit the framebuffer to the first scratch texture const FramebufferGL *sourceFramebufferGL = GetImplAs(source); @@ -145,6 +146,7 @@ gl::Error BlitGL::copySubImageToLUMAWorkaroundTexture(GLuint texture, const gl::InternalFormat &internalFormatInfo = gl::GetInternalFormatInfo(copyTexImageFormat.internalFormat); + mStateManager->activeTexture(0); mStateManager->bindTexture(GL_TEXTURE_2D, mScratchTextures[0]); mFunctions->copyTexImage2D(GL_TEXTURE_2D, 0, copyTexImageFormat.internalFormat, sourceArea.x, sourceArea.y, sourceArea.width, sourceArea.height, 0); @@ -169,6 +171,7 @@ gl::Error BlitGL::copySubImageToLUMAWorkaroundTexture(GLuint texture, mScratchTextures[1], 0); // Render to the destination texture, sampling from the scratch texture + mStateManager->useProgram(mBlitProgram); mStateManager->setViewport(gl::Rectangle(0, 0, sourceArea.width, sourceArea.height)); mStateManager->setScissorTestEnabled(false); mStateManager->setDepthRange(0.0f, 1.0f); @@ -183,192 +186,16 @@ gl::Error BlitGL::copySubImageToLUMAWorkaroundTexture(GLuint texture, mStateManager->setRasterizerDiscardEnabled(false); mStateManager->bindTexture(GL_TEXTURE_2D, mScratchTextures[0]); - setScratchTextureParameter(GL_TEXTURE_MIN_FILTER, GL_NEAREST); - setScratchTextureParameter(GL_TEXTURE_MAG_FILTER, GL_NEAREST); - mStateManager->activeTexture(0); - mStateManager->bindTexture(GL_TEXTURE_2D, mScratchTextures[0]); - - mStateManager->useProgram(mBlitProgram); - mFunctions->uniform1i(mSourceTextureLocation, 0); - mFunctions->uniform2f(mScaleLocation, 1.0, 1.0); - mFunctions->uniform2f(mOffsetLocation, 0.0, 0.0); - mStateManager->bindVertexArray(mVAO, 0); - mFunctions->drawArrays(GL_TRIANGLES, 0, 3); + mFunctions->drawArrays(GL_TRIANGLES, 0, 6); - // Copy the swizzled texture to the destination texture + // Finally, copy the swizzled texture to the destination texture mStateManager->bindTexture(textureType, texture); mFunctions->copyTexSubImage2D(target, static_cast(level), destOffset.x, destOffset.y, 0, 0, sourceArea.width, sourceArea.height); - // Finally orphan the scratch textures so they can be GCed by the driver. - orphanScratchTextures(); - - return gl::NoError(); -} - -gl::Error BlitGL::blitColorBufferWithShader(const gl::Framebuffer *source, - const gl::Framebuffer *dest, - const gl::Rectangle &sourceAreaIn, - const gl::Rectangle &destAreaIn, - GLenum filter) -{ - ANGLE_TRY(initializeResources()); - - // Normalize the destination area to have positive width and height because we will use - // glViewport to set it, which doesn't allow negative width or height. - gl::Rectangle sourceArea = sourceAreaIn; - gl::Rectangle destArea = destAreaIn; - if (destArea.width < 0) - { - destArea.x += destArea.width; - destArea.width = -destArea.width; - sourceArea.x += sourceArea.width; - sourceArea.width = -sourceArea.width; - } - if (destArea.height < 0) - { - destArea.y += destArea.height; - destArea.height = -destArea.height; - sourceArea.y += sourceArea.height; - sourceArea.height = -sourceArea.height; - } - - const gl::FramebufferAttachment *readAttachment = source->getReadColorbuffer(); - ASSERT(readAttachment->getSamples() <= 1); - - // Compute the part of the source that will be sampled. - gl::Rectangle inBoundsSource; - { - gl::Extents sourceSize = readAttachment->getSize(); - gl::Rectangle sourceBounds(0, 0, sourceSize.width, sourceSize.height); - gl::ClipRectangle(sourceArea, sourceBounds, &inBoundsSource); - - // Note that inBoundsSource will have lost the orientation information. - ASSERT(inBoundsSource.width >= 0 && inBoundsSource.height >= 0); - - // Early out when the sampled part is empty as the blit will be a noop, - // and it prevents a division by zero in later computations. - if (inBoundsSource.width == 0 || inBoundsSource.height == 0) - { - return gl::NoError(); - } - } - - // The blit will be emulated by getting the source of the blit in a texture and sampling it - // with CLAMP_TO_EDGE. The quad used to draw can trivially compute texture coordinates going - // from (0, 0) to (1, 1). These texture coordinates will need to be transformed to make two - // regions match: - // - The region of the texture representing the source framebuffer region that will be sampled - // - The region of the drawn quad that corresponds to non-clamped blit, this is the same as the - // region of the source rectangle that is inside the source attachment. - // - // These two regions, T (texture) and D (dest) are defined by their offset in texcoord space - // in (0, 1)^2 and their size in texcoord space in (-1, 1)^2. The size can be negative to - // represent the orientation of the blit. - // - // Then if P is the quad texcoord, Q the texcoord inside T, and R the texture texcoord: - // - Q = (P - D.offset) / D.size - // - Q = (R - T.offset) / T.size - // Hence R = (P - D.offset) / D.size * T.size - T.offset - // = P * (T.size / D.size) + (T.offset - D.offset * T.size / D.size) - - GLuint textureId; - gl::Vector2 TOffset; - gl::Vector2 TSize; - - // TODO(cwallez) once texture dirty bits are landed, reuse attached texture instead of using - // CopyTexImage2D - { - textureId = mScratchTextures[0]; - TOffset = gl::Vector2(0.0, 0.0); - TSize = gl::Vector2(1.0, 1.0); - if (sourceArea.width < 0) - { - TOffset.x = 1.0; - TSize.x = -1.0; - } - if (sourceArea.height < 0) - { - TOffset.y = 1.0; - TSize.y = -1.0; - } - - GLenum format = readAttachment->getFormat().info->internalFormat; - const FramebufferGL *sourceGL = GetImplAs(source); - mStateManager->bindFramebuffer(GL_READ_FRAMEBUFFER, sourceGL->getFramebufferID()); - mStateManager->bindTexture(GL_TEXTURE_2D, textureId); - - mFunctions->copyTexImage2D(GL_TEXTURE_2D, 0, format, inBoundsSource.x, inBoundsSource.y, - inBoundsSource.width, inBoundsSource.height, 0); - } - - // Compute normalized sampled draw quad region - // It is the same as the region of the source rectangle that is in bounds. - gl::Vector2 DOffset; - gl::Vector2 DSize; - { - ASSERT(sourceArea.width != 0 && sourceArea.height != 0); - gl::Rectangle orientedInBounds = inBoundsSource; - if (sourceArea.width < 0) - { - orientedInBounds.x += orientedInBounds.width; - orientedInBounds.width = -orientedInBounds.width; - } - if (sourceArea.height < 0) - { - orientedInBounds.y += orientedInBounds.height; - orientedInBounds.height = -orientedInBounds.height; - } - - DOffset = - gl::Vector2(static_cast(orientedInBounds.x - sourceArea.x) / sourceArea.width, - static_cast(orientedInBounds.y - sourceArea.y) / sourceArea.height); - DSize = gl::Vector2(static_cast(orientedInBounds.width) / sourceArea.width, - static_cast(orientedInBounds.height) / sourceArea.height); - } - - ASSERT(DSize.x != 0.0 && DSize.y != 0.0); - gl::Vector2 texCoordScale = gl::Vector2(TSize.x / DSize.x, TSize.y / DSize.y); - gl::Vector2 texCoordOffset = gl::Vector2(TOffset.x - DOffset.x * texCoordScale.x, - TOffset.y - DOffset.y * texCoordScale.y); - - // Reset all the state except scissor and viewport - mStateManager->setDepthRange(0.0f, 1.0f); - mStateManager->setBlendEnabled(false); - mStateManager->setColorMask(true, true, true, true); - mStateManager->setSampleAlphaToCoverageEnabled(false); - mStateManager->setSampleCoverageEnabled(false); - mStateManager->setDepthTestEnabled(false); - mStateManager->setStencilTestEnabled(false); - mStateManager->setCullFaceEnabled(false); - mStateManager->setPolygonOffsetFillEnabled(false); - mStateManager->setRasterizerDiscardEnabled(false); - - // Use the viewport to draw exactly to the destination rectangle - mStateManager->setViewport(destArea); - - // Set uniforms - setScratchTextureParameter(GL_TEXTURE_MIN_FILTER, filter); - setScratchTextureParameter(GL_TEXTURE_MAG_FILTER, filter); - setScratchTextureParameter(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - setScratchTextureParameter(GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - mStateManager->activeTexture(0); - mStateManager->bindTexture(GL_TEXTURE_2D, mScratchTextures[0]); - - mStateManager->useProgram(mBlitProgram); - mFunctions->uniform1i(mSourceTextureLocation, 0); - mFunctions->uniform2f(mScaleLocation, texCoordScale.x, texCoordScale.y); - mFunctions->uniform2f(mOffsetLocation, texCoordOffset.x, texCoordOffset.y); - - const FramebufferGL *destGL = GetImplAs(dest); - mStateManager->bindFramebuffer(GL_DRAW_FRAMEBUFFER, destGL->getFramebufferID()); - - mStateManager->bindVertexArray(mVAO, 0); - mFunctions->drawArrays(GL_TRIANGLES, 0, 3); - - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } gl::Error BlitGL::initializeResources() @@ -378,38 +205,41 @@ gl::Error BlitGL::initializeResources() mBlitProgram = mFunctions->createProgram(); // Compile the fragment shader - // It uses a single, large triangle, to avoid arithmetic precision issues where fragments - // with the same Y coordinate don't get exactly the same interpolated texcoord Y. const char *vsSource = "#version 150\n" "out vec2 v_texcoord;\n" - "uniform vec2 u_scale;\n" - "uniform vec2 u_offset;\n" "\n" "void main()\n" "{\n" - " const vec2 quad_positions[3] = vec2[3]\n" + " const vec2 quad_positions[6] = vec2[6]\n" " (\n" - " vec2(-0.5f, 0.0f),\n" - " vec2( 1.5f, 0.0f),\n" - " vec2( 0.5f, 2.0f)\n" + " vec2(0.0f, 0.0f),\n" + " vec2(0.0f, 1.0f),\n" + " vec2(1.0f, 0.0f),\n" + "\n" + " vec2(0.0f, 1.0f),\n" + " vec2(1.0f, 0.0f),\n" + " vec2(1.0f, 1.0f)\n" " );\n" "\n" " gl_Position = vec4((quad_positions[gl_VertexID] * 2.0) - 1.0, 0.0, 1.0);\n" - " v_texcoord = quad_positions[gl_VertexID] * u_scale + u_offset;\n" + " v_texcoord = quad_positions[gl_VertexID];\n" "}\n"; GLuint vs = mFunctions->createShader(GL_VERTEX_SHADER); mFunctions->shaderSource(vs, 1, &vsSource, nullptr); mFunctions->compileShader(vs); - ANGLE_TRY(CheckCompileStatus(mFunctions, vs)); + gl::Error error = CheckCompileStatus(mFunctions, vs); mFunctions->attachShader(mBlitProgram, vs); mFunctions->deleteShader(vs); + if (error.isError()) + { + return error; + } + // Compile the vertex shader - // It discards if the texcoord is outside (0, 1)^2 so the blitframebuffer workaround - // doesn't write when the point sampled is outside of the source framebuffer. const char *fsSource = "#version 150\n" "uniform sampler2D u_source_texture;\n" @@ -418,28 +248,32 @@ gl::Error BlitGL::initializeResources() "\n" "void main()\n" "{\n" - " if (clamp(v_texcoord, vec2(0.0), vec2(1.0)) != v_texcoord)\n" - " {\n" - " discard;\n" - " }\n" " output_color = texture(u_source_texture, v_texcoord);\n" "}\n"; GLuint fs = mFunctions->createShader(GL_FRAGMENT_SHADER); mFunctions->shaderSource(fs, 1, &fsSource, nullptr); mFunctions->compileShader(fs); - ANGLE_TRY(CheckCompileStatus(mFunctions, fs)); + error = CheckCompileStatus(mFunctions, fs); mFunctions->attachShader(mBlitProgram, fs); mFunctions->deleteShader(fs); + if (error.isError()) + { + return error; + } + mFunctions->linkProgram(mBlitProgram); - ANGLE_TRY(CheckLinkStatus(mFunctions, mBlitProgram)); + error = CheckLinkStatus(mFunctions, mBlitProgram); + if (error.isError()) + { + return error; + } - mSourceTextureLocation = mFunctions->getUniformLocation(mBlitProgram, "u_source_texture"); - mScaleLocation = mFunctions->getUniformLocation(mBlitProgram, "u_scale"); - mOffsetLocation = mFunctions->getUniformLocation(mBlitProgram, "u_offset"); + GLuint textureUniform = mFunctions->getUniformLocation(mBlitProgram, "u_source_texture"); mStateManager->useProgram(mBlitProgram); + mFunctions->uniform1i(textureUniform, 0); } for (size_t i = 0; i < ArraySize(mScratchTextures); i++) @@ -447,6 +281,11 @@ gl::Error BlitGL::initializeResources() if (mScratchTextures[i] == 0) { mFunctions->genTextures(1, &mScratchTextures[i]); + mStateManager->bindTexture(GL_TEXTURE_2D, mScratchTextures[i]); + + // Use nearest, non-mipmapped sampling with the scratch texture + mFunctions->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + mFunctions->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); } } @@ -460,27 +299,6 @@ gl::Error BlitGL::initializeResources() mFunctions->genVertexArrays(1, &mVAO); } - return gl::NoError(); + return gl::Error(GL_NO_ERROR); } - -void BlitGL::orphanScratchTextures() -{ - for (auto texture : mScratchTextures) - { - mStateManager->bindTexture(GL_TEXTURE_2D, texture); - mFunctions->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, - nullptr); - } -} - -void BlitGL::setScratchTextureParameter(GLenum param, GLenum value) -{ - for (auto texture : mScratchTextures) - { - mStateManager->bindTexture(GL_TEXTURE_2D, texture); - mFunctions->texParameteri(GL_TEXTURE_2D, param, value); - mFunctions->texParameteri(GL_TEXTURE_2D, param, value); - } } - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/gl/BlitGL.h b/gfx/angle/src/libANGLE/renderer/gl/BlitGL.h index b306ede29..3ab8319bb 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/BlitGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/BlitGL.h @@ -52,26 +52,14 @@ class BlitGL : public angle::NonCopyable const gl::Rectangle &sourceArea, const gl::Framebuffer *source); - gl::Error blitColorBufferWithShader(const gl::Framebuffer *source, - const gl::Framebuffer *dest, - const gl::Rectangle &sourceArea, - const gl::Rectangle &destArea, - GLenum filter); - gl::Error initializeResources(); private: - void orphanScratchTextures(); - void setScratchTextureParameter(GLenum param, GLenum value); - const FunctionsGL *mFunctions; const WorkaroundsGL &mWorkarounds; StateManagerGL *mStateManager; GLuint mBlitProgram; - GLint mSourceTextureLocation; - GLint mScaleLocation; - GLint mOffsetLocation; GLuint mScratchTextures[2]; GLuint mScratchFBO; diff --git a/gfx/angle/src/libANGLE/renderer/gl/BufferGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/BufferGL.cpp index a5eda6b30..cd82733d7 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/BufferGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/BufferGL.cpp @@ -29,10 +29,8 @@ static const GLenum SourceBufferOperationTarget = GL_COPY_READ_BUFFER; // supported GL versions and doesn't affect any current state when it changes. static const GLenum DestBufferOperationTarget = GL_ARRAY_BUFFER; -BufferGL::BufferGL(const gl::BufferState &state, - const FunctionsGL *functions, - StateManagerGL *stateManager) - : BufferImpl(state), +BufferGL::BufferGL(const FunctionsGL *functions, StateManagerGL *stateManager) + : BufferImpl(), mIsMapped(false), mMapOffset(0), mMapSize(0), @@ -55,7 +53,7 @@ BufferGL::~BufferGL() mBufferID = 0; } -gl::Error BufferGL::setData(GLenum /*target*/, const void *data, size_t size, GLenum usage) +gl::Error BufferGL::setData(const void* data, size_t size, GLenum usage) { mStateManager->bindBuffer(DestBufferOperationTarget, mBufferID); mFunctions->bufferData(DestBufferOperationTarget, size, data, usage); @@ -78,7 +76,7 @@ gl::Error BufferGL::setData(GLenum /*target*/, const void *data, size_t size, GL return gl::Error(GL_NO_ERROR); } -gl::Error BufferGL::setSubData(GLenum /*target*/, const void *data, size_t size, size_t offset) +gl::Error BufferGL::setSubData(const void* data, size_t size, size_t offset) { mStateManager->bindBuffer(DestBufferOperationTarget, mBufferID); mFunctions->bufferSubData(DestBufferOperationTarget, offset, size, data); diff --git a/gfx/angle/src/libANGLE/renderer/gl/BufferGL.h b/gfx/angle/src/libANGLE/renderer/gl/BufferGL.h index d886873fe..e787ec86e 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/BufferGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/BufferGL.h @@ -21,13 +21,11 @@ class StateManagerGL; class BufferGL : public BufferImpl { public: - BufferGL(const gl::BufferState &state, - const FunctionsGL *functions, - StateManagerGL *stateManager); + BufferGL(const FunctionsGL *functions, StateManagerGL *stateManager); ~BufferGL() override; - gl::Error setData(GLenum target, const void *data, size_t size, GLenum usage) override; - gl::Error setSubData(GLenum target, const void *data, size_t size, size_t offset) override; + gl::Error setData(const void* data, size_t size, GLenum usage) override; + gl::Error setSubData(const void* data, size_t size, size_t offset) override; gl::Error copySubData(BufferImpl* source, GLintptr sourceOffset, GLintptr destOffset, GLsizeiptr size) override; gl::Error map(GLenum access, GLvoid **mapPtr) override; gl::Error mapRange(size_t offset, size_t length, GLbitfield access, GLvoid **mapPtr) override; diff --git a/gfx/angle/src/libANGLE/renderer/gl/ContextGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/ContextGL.cpp index 8e378a4be..57dc222b9 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/ContextGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/ContextGL.cpp @@ -62,8 +62,7 @@ ProgramImpl *ContextGL::createProgram(const gl::ProgramState &data) FramebufferImpl *ContextGL::createFramebuffer(const gl::FramebufferState &data) { - return new FramebufferGL(data, getFunctions(), getStateManager(), getWorkaroundsGL(), - mRenderer->getBlitter(), false); + return new FramebufferGL(data, getFunctions(), getStateManager(), getWorkaroundsGL(), false); } TextureImpl *ContextGL::createTexture(const gl::TextureState &state) @@ -78,9 +77,9 @@ RenderbufferImpl *ContextGL::createRenderbuffer() getNativeTextureCaps()); } -BufferImpl *ContextGL::createBuffer(const gl::BufferState &state) +BufferImpl *ContextGL::createBuffer() { - return new BufferGL(state, getFunctions(), getStateManager()); + return new BufferGL(getFunctions(), getStateManager()); } VertexArrayImpl *ContextGL::createVertexArray(const gl::VertexArrayState &data) diff --git a/gfx/angle/src/libANGLE/renderer/gl/ContextGL.h b/gfx/angle/src/libANGLE/renderer/gl/ContextGL.h index b3d5e0ee8..798a90436 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/ContextGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/ContextGL.h @@ -47,7 +47,7 @@ class ContextGL : public ContextImpl RenderbufferImpl *createRenderbuffer() override; // Buffer creation - BufferImpl *createBuffer(const gl::BufferState &state) override; + BufferImpl *createBuffer() override; // Vertex Array creation VertexArrayImpl *createVertexArray(const gl::VertexArrayState &data) override; diff --git a/gfx/angle/src/libANGLE/renderer/gl/DisplayGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/DisplayGL.cpp index 30c5c7b4e..e57513326 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/DisplayGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/DisplayGL.cpp @@ -22,7 +22,8 @@ namespace rx { -DisplayGL::DisplayGL() : mRenderer(nullptr), mCurrentDrawSurface(nullptr) +DisplayGL::DisplayGL() + : mRenderer(nullptr) { } @@ -72,13 +73,6 @@ StreamProducerImpl *DisplayGL::createStreamProducerD3DTextureNV12( egl::Error DisplayGL::makeCurrent(egl::Surface *drawSurface, egl::Surface *readSurface, gl::Context *context) { - // Notify the previous surface (if it still exists) that it is no longer current - if (mCurrentDrawSurface && mSurfaceSet.find(mCurrentDrawSurface) != mSurfaceSet.end()) - { - ANGLE_TRY(GetImplAs(mCurrentDrawSurface)->unMakeCurrent()); - } - mCurrentDrawSurface = nullptr; - if (!drawSurface) { return egl::Error(EGL_SUCCESS); @@ -89,10 +83,7 @@ egl::Error DisplayGL::makeCurrent(egl::Surface *drawSurface, egl::Surface *readS glContext->getStateManager()->pauseTransformFeedback(context->getContextState()); SurfaceGL *glDrawSurface = GetImplAs(drawSurface); - ANGLE_TRY(glDrawSurface->makeCurrent()); - mCurrentDrawSurface = drawSurface; - - return egl::Error(EGL_SUCCESS); + return glDrawSurface->makeCurrent(); } gl::Version DisplayGL::getMaxSupportedESVersion() const diff --git a/gfx/angle/src/libANGLE/renderer/gl/DisplayGL.h b/gfx/angle/src/libANGLE/renderer/gl/DisplayGL.h index a63da6bbc..9f6515886 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/DisplayGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/DisplayGL.h @@ -12,11 +12,6 @@ #include "libANGLE/renderer/DisplayImpl.h" #include "libANGLE/renderer/gl/FunctionsGL.h" -namespace egl -{ -class Surface; -} - namespace rx { @@ -53,8 +48,6 @@ class DisplayGL : public DisplayImpl virtual const FunctionsGL *getFunctionsGL() const = 0; RendererGL *mRenderer; - - egl::Surface *mCurrentDrawSurface; }; } diff --git a/gfx/angle/src/libANGLE/renderer/gl/FramebufferGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/FramebufferGL.cpp index 0a058f8ba..4606114ca 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/FramebufferGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/FramebufferGL.cpp @@ -16,18 +16,14 @@ #include "libANGLE/angletypes.h" #include "libANGLE/formatutils.h" #include "libANGLE/renderer/ContextImpl.h" -#include "libANGLE/renderer/gl/BlitGL.h" #include "libANGLE/renderer/gl/FunctionsGL.h" #include "libANGLE/renderer/gl/RenderbufferGL.h" #include "libANGLE/renderer/gl/StateManagerGL.h" #include "libANGLE/renderer/gl/TextureGL.h" #include "libANGLE/renderer/gl/WorkaroundsGL.h" -#include "libANGLE/renderer/gl/formatutilsgl.h" -#include "libANGLE/renderer/gl/renderergl_utils.h" #include "platform/Platform.h" using namespace gl; -using angle::CheckedNumeric; namespace rx { @@ -36,13 +32,11 @@ FramebufferGL::FramebufferGL(const FramebufferState &state, const FunctionsGL *functions, StateManagerGL *stateManager, const WorkaroundsGL &workarounds, - BlitGL *blitter, bool isDefault) : FramebufferImpl(state), mFunctions(functions), mStateManager(stateManager), mWorkarounds(workarounds), - mBlitter(blitter), mFramebufferID(0), mIsDefault(isDefault) { @@ -56,13 +50,11 @@ FramebufferGL::FramebufferGL(GLuint id, const FramebufferState &state, const FunctionsGL *functions, const WorkaroundsGL &workarounds, - BlitGL *blitter, StateManagerGL *stateManager) : FramebufferImpl(state), mFunctions(functions), mStateManager(stateManager), mWorkarounds(workarounds), - mBlitter(blitter), mFramebufferID(id), mIsDefault(true) { @@ -220,14 +212,14 @@ GLenum FramebufferGL::getImplementationColorReadFormat() const { const auto *readAttachment = mState.getReadAttachment(); const Format &format = readAttachment->getFormat(); - return format.info->getReadPixelsFormat(); + return format.info->format; } GLenum FramebufferGL::getImplementationColorReadType() const { const auto *readAttachment = mState.getReadAttachment(); const Format &format = readAttachment->getFormat(); - return format.info->getReadPixelsType(); + return format.info->type; } Error FramebufferGL::readPixels(ContextImpl *context, @@ -241,37 +233,10 @@ Error FramebufferGL::readPixels(ContextImpl *context, const PixelPackState &packState = context->getGLState().getPackState(); mStateManager->setPixelPackState(packState); - nativegl::ReadPixelsFormat readPixelsFormat = - nativegl::GetReadPixelsFormat(mFunctions, mWorkarounds, format, type); - GLenum readFormat = readPixelsFormat.format; - GLenum readType = readPixelsFormat.type; - mStateManager->bindFramebuffer(GL_READ_FRAMEBUFFER, mFramebufferID); + mFunctions->readPixels(area.x, area.y, area.width, area.height, format, type, pixels); - if (mWorkarounds.packOverlappingRowsSeparatelyPackBuffer && packState.pixelBuffer.get() && - packState.rowLength != 0 && packState.rowLength < area.width) - { - return readPixelsRowByRowWorkaround(area, readFormat, readType, packState, pixels); - } - - if (mWorkarounds.packLastRowSeparatelyForPaddingInclusion) - { - gl::Extents size(area.width, area.height, 1); - - bool apply; - ANGLE_TRY_RESULT(ShouldApplyLastRowPaddingWorkaround(size, packState, readFormat, readType, - false, pixels), - apply); - - if (apply) - { - return readPixelsPaddingWorkaround(area, readFormat, readType, packState, pixels); - } - } - - mFunctions->readPixels(area.x, area.y, area.width, area.height, readFormat, readType, pixels); - - return gl::NoError(); + return Error(GL_NO_ERROR); } Error FramebufferGL::blit(ContextImpl *context, @@ -281,80 +246,15 @@ Error FramebufferGL::blit(ContextImpl *context, GLenum filter) { const Framebuffer *sourceFramebuffer = context->getGLState().getReadFramebuffer(); - const Framebuffer *destFramebuffer = context->getGLState().getDrawFramebuffer(); - - const FramebufferAttachment *colorReadAttachment = sourceFramebuffer->getReadColorbuffer(); - GLsizei readAttachmentSamples = colorReadAttachment->getSamples(); - - bool needManualColorBlit = false; - - // TODO(cwallez) when the filter is LINEAR and both source and destination are SRGB, we - // could avoid doing a manual blit. - - // Prior to OpenGL 4.4 BlitFramebuffer (section 18.3.1 of GL 4.3 core profile) reads: - // When values are taken from the read buffer, no linearization is performed, even - // if the format of the buffer is SRGB. - // Starting from OpenGL 4.4 (section 18.3.1) it reads: - // When values are taken from the read buffer, if FRAMEBUFFER_SRGB is enabled and the - // value of FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING for the framebuffer attachment - // corresponding to the read buffer is SRGB, the red, green, and blue components are - // converted from the non-linear sRGB color space according [...]. - { - bool sourceSRGB = colorReadAttachment != nullptr && - colorReadAttachment->getColorEncoding() == GL_SRGB; - needManualColorBlit = - needManualColorBlit || (sourceSRGB && mFunctions->isAtMostGL(gl::Version(4, 3))); - } - - // Prior to OpenGL 4.2 BlitFramebuffer (section 4.3.2 of GL 4.1 core profile) reads: - // Blit operations bypass the fragment pipeline. The only fragment operations which - // affect a blit are the pixel ownership test and scissor test. - // Starting from OpenGL 4.2 (section 4.3.2) it reads: - // When values are written to the draw buffers, blit operations bypass the fragment - // pipeline. The only fragment operations which affect a blit are the pixel ownership - // test, the scissor test and sRGB conversion. - if (!needManualColorBlit) - { - bool destSRGB = false; - for (size_t i = 0; i < destFramebuffer->getDrawbufferStateCount(); ++i) - { - const FramebufferAttachment *attachment = destFramebuffer->getDrawBuffer(i); - if (attachment && attachment->getColorEncoding() == GL_SRGB) - { - destSRGB = true; - break; - } - } - - needManualColorBlit = - needManualColorBlit || (destSRGB && mFunctions->isAtMostGL(gl::Version(4, 1))); - } - - // Enable FRAMEBUFFER_SRGB if needed - mStateManager->setFramebufferSRGBEnabledForFramebuffer(true, this); - - GLenum blitMask = mask; - if (needManualColorBlit && (mask & GL_COLOR_BUFFER_BIT) && readAttachmentSamples <= 1) - { - ANGLE_TRY(mBlitter->blitColorBufferWithShader(sourceFramebuffer, destFramebuffer, - sourceArea, destArea, filter)); - blitMask &= ~GL_COLOR_BUFFER_BIT; - } - - if (blitMask == 0) - { - return gl::NoError(); - } - const FramebufferGL *sourceFramebufferGL = GetImplAs(sourceFramebuffer); + mStateManager->bindFramebuffer(GL_READ_FRAMEBUFFER, sourceFramebufferGL->getFramebufferID()); mStateManager->bindFramebuffer(GL_DRAW_FRAMEBUFFER, mFramebufferID); mFunctions->blitFramebuffer(sourceArea.x, sourceArea.y, sourceArea.x1(), sourceArea.y1(), - destArea.x, destArea.y, destArea.x1(), destArea.y1(), blitMask, - filter); + destArea.x, destArea.y, destArea.x1(), destArea.y1(), mask, filter); - return gl::NoError(); + return Error(GL_NO_ERROR); } bool FramebufferGL::checkStatus() const @@ -420,9 +320,17 @@ GLuint FramebufferGL::getFramebufferID() const return mFramebufferID; } -bool FramebufferGL::isDefault() const +void FramebufferGL::syncDrawState() const { - return mIsDefault; + if (mFunctions->standard == STANDARD_GL_DESKTOP) + { + // Enable SRGB blending for all framebuffers except the default framebuffer on Desktop + // OpenGL. + // When SRGB blending is enabled, only SRGB capable formats will use it but the default + // framebuffer will always use it if it is enabled. + // TODO(geofflang): Update this when the framebuffer binding dirty changes, when it exists. + mStateManager->setFramebufferSRGBEnabled(!mIsDefault); + } } void FramebufferGL::syncClearState(GLbitfield mask) @@ -432,17 +340,17 @@ void FramebufferGL::syncClearState(GLbitfield mask) if (mWorkarounds.doesSRGBClearsOnLinearFramebufferAttachments && (mask & GL_COLOR_BUFFER_BIT) != 0 && !mIsDefault) { - bool hasSRGBAttachment = false; + bool hasSRBAttachment = false; for (const auto &attachment : mState.getColorAttachments()) { if (attachment.isAttached() && attachment.getColorEncoding() == GL_SRGB) { - hasSRGBAttachment = true; + hasSRBAttachment = true; break; } } - mStateManager->setFramebufferSRGBEnabled(hasSRGBAttachment); + mStateManager->setFramebufferSRGBEnabled(hasSRBAttachment); } else { @@ -483,71 +391,4 @@ void FramebufferGL::syncClearBufferState(GLenum buffer, GLint drawBuffer) } } } -gl::Error FramebufferGL::readPixelsRowByRowWorkaround(const gl::Rectangle &area, - GLenum format, - GLenum type, - const gl::PixelPackState &pack, - GLvoid *pixels) const -{ - intptr_t offset = reinterpret_cast(pixels); - - const gl::InternalFormat &glFormat = - gl::GetInternalFormatInfo(gl::GetSizedInternalFormat(format, type)); - GLuint rowBytes = 0; - ANGLE_TRY_RESULT(glFormat.computeRowPitch(area.width, pack.alignment, pack.rowLength), - rowBytes); - GLuint skipBytes = 0; - ANGLE_TRY_RESULT(glFormat.computeSkipBytes(rowBytes, 0, pack, false), skipBytes); - - gl::PixelPackState directPack; - directPack.pixelBuffer = pack.pixelBuffer; - directPack.alignment = 1; - mStateManager->setPixelPackState(directPack); - directPack.pixelBuffer.set(nullptr); - - offset += skipBytes; - for (GLint row = 0; row < area.height; ++row) - { - mFunctions->readPixels(area.x, row + area.y, area.width, 1, format, type, - reinterpret_cast(offset)); - offset += row * rowBytes; - } - - return gl::NoError(); -} - -gl::Error FramebufferGL::readPixelsPaddingWorkaround(const gl::Rectangle &area, - GLenum format, - GLenum type, - const gl::PixelPackState &pack, - GLvoid *pixels) const -{ - const gl::InternalFormat &glFormat = - gl::GetInternalFormatInfo(gl::GetSizedInternalFormat(format, type)); - GLuint rowBytes = 0; - ANGLE_TRY_RESULT(glFormat.computeRowPitch(area.width, pack.alignment, pack.rowLength), - rowBytes); - GLuint skipBytes = 0; - ANGLE_TRY_RESULT(glFormat.computeSkipBytes(rowBytes, 0, pack, false), skipBytes); - - // Get all by the last row - if (area.height > 1) - { - mFunctions->readPixels(area.x, area.y, area.width, area.height - 1, format, type, pixels); - } - - // Get the last row manually - gl::PixelPackState directPack; - directPack.pixelBuffer = pack.pixelBuffer; - directPack.alignment = 1; - mStateManager->setPixelPackState(directPack); - directPack.pixelBuffer.set(nullptr); - - intptr_t lastRowOffset = - reinterpret_cast(pixels) + skipBytes + (area.height - 1) * rowBytes; - mFunctions->readPixels(area.x, area.y + area.height - 1, area.width, 1, format, type, - reinterpret_cast(lastRowOffset)); - - return gl::NoError(); -} } // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/gl/FramebufferGL.h b/gfx/angle/src/libANGLE/renderer/gl/FramebufferGL.h index a8bcb894c..69d4aef35 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/FramebufferGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/FramebufferGL.h @@ -14,7 +14,6 @@ namespace rx { -class BlitGL; class FunctionsGL; class StateManagerGL; struct WorkaroundsGL; @@ -26,7 +25,6 @@ class FramebufferGL : public FramebufferImpl const FunctionsGL *functions, StateManagerGL *stateManager, const WorkaroundsGL &workarounds, - BlitGL *blitter, bool isDefault); // Constructor called when we need to create a FramebufferGL from an // existing framebuffer name, for example for the default framebuffer @@ -35,7 +33,6 @@ class FramebufferGL : public FramebufferImpl const gl::FramebufferState &data, const FunctionsGL *functions, const WorkaroundsGL &workarounds, - BlitGL *blitter, StateManagerGL *stateManager); ~FramebufferGL() override; @@ -80,29 +77,17 @@ class FramebufferGL : public FramebufferImpl void syncState(const gl::Framebuffer::DirtyBits &dirtyBits) override; + void syncDrawState() const; + GLuint getFramebufferID() const; - bool isDefault() const; private: void syncClearState(GLbitfield mask); void syncClearBufferState(GLenum buffer, GLint drawBuffer); - gl::Error readPixelsRowByRowWorkaround(const gl::Rectangle &area, - GLenum format, - GLenum type, - const gl::PixelPackState &pack, - GLvoid *pixels) const; - - gl::Error readPixelsPaddingWorkaround(const gl::Rectangle &area, - GLenum format, - GLenum type, - const gl::PixelPackState &pack, - GLvoid *pixels) const; - const FunctionsGL *mFunctions; StateManagerGL *mStateManager; const WorkaroundsGL &mWorkarounds; - BlitGL *mBlitter; GLuint mFramebufferID; bool mIsDefault; diff --git a/gfx/angle/src/libANGLE/renderer/gl/FunctionsGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/FunctionsGL.cpp index fcbf211bc..9c3964e47 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/FunctionsGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/FunctionsGL.cpp @@ -2283,21 +2283,11 @@ bool FunctionsGL::isAtLeastGL(const gl::Version &glVersion) const return standard == STANDARD_GL_DESKTOP && version >= glVersion; } -bool FunctionsGL::isAtMostGL(const gl::Version &glVersion) const -{ - return standard == STANDARD_GL_DESKTOP && glVersion >= version; -} - bool FunctionsGL::isAtLeastGLES(const gl::Version &glesVersion) const { return standard == STANDARD_GL_ES && version >= glesVersion; } -bool FunctionsGL::isAtMostGLES(const gl::Version &glesVersion) const -{ - return standard == STANDARD_GL_ES && glesVersion >= version; -} - bool FunctionsGL::hasExtension(const std::string &ext) const { return std::find(extensions.begin(), extensions.end(), ext) != extensions.end(); diff --git a/gfx/angle/src/libANGLE/renderer/gl/FunctionsGL.h b/gfx/angle/src/libANGLE/renderer/gl/FunctionsGL.h index fa8634e57..e790d96fe 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/FunctionsGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/FunctionsGL.h @@ -36,9 +36,7 @@ class FunctionsGL StandardGL standard; GLint profile; bool isAtLeastGL(const gl::Version &glVersion) const; - bool isAtMostGL(const gl::Version &glVersion) const; bool isAtLeastGLES(const gl::Version &glesVersion) const; - bool isAtMostGLES(const gl::Version &glesVersion) const; // Extensions std::vector extensions; diff --git a/gfx/angle/src/libANGLE/renderer/gl/ProgramGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/ProgramGL.cpp index 88c7df720..2c2c4e7ad 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/ProgramGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/ProgramGL.cpp @@ -62,12 +62,12 @@ LinkResult ProgramGL::load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream) // Verify that the program linked if (!checkLinkStatus(infoLog)) { - return false; + return LinkResult(false, gl::Error(GL_NO_ERROR)); } postLink(); - return true; + return LinkResult(true, gl::Error(GL_NO_ERROR)); } gl::Error ProgramGL::save(gl::BinaryOutputStream *stream) @@ -167,7 +167,7 @@ LinkResult ProgramGL::link(const gl::ContextState &data, gl::InfoLog &infoLog) // Verify the link if (!checkLinkStatus(infoLog)) { - return false; + return LinkResult(false, gl::Error(GL_NO_ERROR)); } if (mWorkarounds.alwaysCallUseProgramAfterLink) @@ -177,7 +177,7 @@ LinkResult ProgramGL::link(const gl::ContextState &data, gl::InfoLog &infoLog) postLink(); - return true; + return LinkResult(true, gl::Error(GL_NO_ERROR)); } GLboolean ProgramGL::validate(const gl::Caps & /*caps*/, gl::InfoLog * /*infoLog*/) @@ -223,7 +223,7 @@ void ProgramGL::setUniform1iv(GLint location, GLsizei count, const GLint *v) std::vector &boundTextureUnits = mSamplerBindings[samplerIndex].boundTextureUnits; size_t copyCount = - std::min(count, boundTextureUnits.size() - locationEntry.element); + std::max(count, boundTextureUnits.size() - locationEntry.element); std::copy(v, v + copyCount, boundTextureUnits.begin() + locationEntry.element); } } @@ -577,7 +577,7 @@ void ProgramGL::postLink() for (GLint arrayIndex = 1; arrayIndex < arraySize; ++arrayIndex) { PathRenderingFragmentInput arrayElementInput; - arrayElementInput.name = name + "[" + ToString(arrayIndex) + "]"; + arrayElementInput.name = name + "[" + std::to_string(arrayIndex) + "]"; arrayElementInput.location = baseLocation + arrayIndex; mPathRenderingFragmentInputs.push_back(std::move(arrayElementInput)); } diff --git a/gfx/angle/src/libANGLE/renderer/gl/RenderbufferGL.h b/gfx/angle/src/libANGLE/renderer/gl/RenderbufferGL.h index 0ff0faeae..eeb164378 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/RenderbufferGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/RenderbufferGL.h @@ -38,6 +38,12 @@ class RenderbufferGL : public RenderbufferImpl GLuint getRenderbufferID() const; + gl::Error getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target, + FramebufferAttachmentRenderTarget **rtOut) override + { + return gl::Error(GL_OUT_OF_MEMORY, "Not supported on OpenGL"); + } + private: const FunctionsGL *mFunctions; const WorkaroundsGL &mWorkarounds; diff --git a/gfx/angle/src/libANGLE/renderer/gl/RendererGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/RendererGL.cpp index da1a65687..10c408d93 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/RendererGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/RendererGL.cpp @@ -122,7 +122,6 @@ RendererGL::RendererGL(const FunctionsGL *functions, const egl::AttributeMap &at #ifndef NDEBUG if (mHasDebugOutput) { - mFunctions->enable(GL_DEBUG_OUTPUT); mFunctions->enable(GL_DEBUG_OUTPUT_SYNCHRONOUS); mFunctions->debugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_HIGH, 0, nullptr, GL_TRUE); mFunctions->debugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_MEDIUM, 0, nullptr, GL_TRUE); @@ -138,17 +137,6 @@ RendererGL::RendererGL(const FunctionsGL *functions, const egl::AttributeMap &at { mSkipDrawCalls = true; } - - if (mWorkarounds.initializeCurrentVertexAttributes) - { - GLint maxVertexAttribs = 0; - mFunctions->getIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs); - - for (GLint i = 0; i < maxVertexAttribs; ++i) - { - mFunctions->vertexAttrib4f(i, 0.0f, 0.0f, 0.0f, 1.0f); - } - } } RendererGL::~RendererGL() diff --git a/gfx/angle/src/libANGLE/renderer/gl/SamplerGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/SamplerGL.cpp index 2a6d81583..bffc89ec9 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/SamplerGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/SamplerGL.cpp @@ -62,7 +62,6 @@ void SamplerGL::syncState(const gl::SamplerState &samplerState) const SyncSamplerStateMember(mFunctions, mSamplerID, samplerState, mAppliedSamplerState, GL_TEXTURE_MAX_LOD, &gl::SamplerState::maxLod); SyncSamplerStateMember(mFunctions, mSamplerID, samplerState, mAppliedSamplerState, GL_TEXTURE_COMPARE_MODE, &gl::SamplerState::compareMode); SyncSamplerStateMember(mFunctions, mSamplerID, samplerState, mAppliedSamplerState, GL_TEXTURE_COMPARE_FUNC, &gl::SamplerState::compareFunc); - SyncSamplerStateMember(mFunctions, mSamplerID, samplerState, mAppliedSamplerState, GL_TEXTURE_SRGB_DECODE_EXT, &gl::SamplerState::sRGBDecode); // clang-format on } diff --git a/gfx/angle/src/libANGLE/renderer/gl/ShaderGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/ShaderGL.cpp index c9145b00a..400917b35 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/ShaderGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/ShaderGL.cpp @@ -36,8 +36,8 @@ ShaderGL::~ShaderGL() } } -ShCompileOptions ShaderGL::prepareSourceAndReturnOptions(std::stringstream *sourceStream, - std::string * /*sourcePath*/) +int ShaderGL::prepareSourceAndReturnOptions(std::stringstream *sourceStream, + std::string * /*sourcePath*/) { // Reset the previous state if (mShaderID != 0) @@ -48,43 +48,13 @@ ShCompileOptions ShaderGL::prepareSourceAndReturnOptions(std::stringstream *sour *sourceStream << mData.getSource(); - ShCompileOptions options = SH_INIT_GL_POSITION; + int options = SH_INIT_GL_POSITION; if (mWorkarounds.doWhileGLSLCausesGPUHang) { options |= SH_REWRITE_DO_WHILE_LOOPS; } - if (mWorkarounds.emulateAbsIntFunction) - { - options |= SH_EMULATE_ABS_INT_FUNCTION; - } - - if (mWorkarounds.addAndTrueToLoopCondition) - { - options |= SH_ADD_AND_TRUE_TO_LOOP_CONDITION; - } - - if (mWorkarounds.emulateIsnanFloat) - { - options |= SH_EMULATE_ISNAN_FLOAT_FUNCTION; - } - - if (mWorkarounds.useUnusedBlocksWithStandardOrSharedLayout) - { - options |= SH_USE_UNUSED_STANDARD_SHARED_BLOCKS; - } - - if (mWorkarounds.dontRemoveInvariantForFragmentInput) - { - options |= SH_DONT_REMOVE_INVARIANT_FOR_FRAGMENT_INPUT; - } - - if (mWorkarounds.removeInvariantAndCentroidForESSL3) - { - options |= SH_REMOVE_INVARIANT_AND_CENTROID_FOR_ESSL3; - } - return options; } diff --git a/gfx/angle/src/libANGLE/renderer/gl/ShaderGL.h b/gfx/angle/src/libANGLE/renderer/gl/ShaderGL.h index 0ecd89ce6..f35d2f711 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/ShaderGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/ShaderGL.h @@ -25,8 +25,8 @@ class ShaderGL : public ShaderImpl ~ShaderGL() override; // ShaderImpl implementation - ShCompileOptions prepareSourceAndReturnOptions(std::stringstream *sourceStream, - std::string *sourcePath) override; + int prepareSourceAndReturnOptions(std::stringstream *sourceStream, + std::string *sourcePath) override; bool postTranslateCompile(gl::Compiler *compiler, std::string *infoLog) override; std::string getDebugInfo() const override; diff --git a/gfx/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp index 3a227906f..1cf08b242 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp @@ -119,7 +119,6 @@ StateManagerGL::StateManagerGL(const FunctionsGL *functions, const gl::Caps &ren mClearDepth(1.0f), mClearStencil(0), mFramebufferSRGBEnabled(false), - mDitherEnabled(true), mTextureCubemapSeamlessEnabled(false), mMultisamplingEnabled(true), mSampleAlphaToOneEnabled(false), @@ -743,21 +742,18 @@ gl::Error StateManagerGL::setGenericDrawState(const gl::ContextState &data) GLenum textureType = samplerUniform.textureType; for (GLuint textureUnitIndex : samplerUniform.boundTextureUnits) { - gl::Texture *texture = state.getSamplerTexture(textureUnitIndex, textureType); + const gl::Texture *texture = state.getSamplerTexture(textureUnitIndex, textureType); if (texture != nullptr) { const TextureGL *textureGL = GetImplAs(texture); - if (mTextures[textureType][textureUnitIndex] != textureGL->getTextureID() || - texture->hasAnyDirtyBit() || textureGL->hasAnyDirtyBit()) + if (mTextures[textureType][textureUnitIndex] != textureGL->getTextureID()) { activeTexture(textureUnitIndex); bindTexture(textureType, textureGL->getTextureID()); - - // TODO: Call this from the gl:: layer once other backends use dirty bits for - // texture state. - texture->syncImplState(); } + + textureGL->syncState(textureUnitIndex); } else { @@ -785,6 +781,7 @@ gl::Error StateManagerGL::setGenericDrawState(const gl::ContextState &data) const gl::Framebuffer *framebuffer = state.getDrawFramebuffer(); const FramebufferGL *framebufferGL = GetImplAs(framebuffer); bindFramebuffer(GL_DRAW_FRAMEBUFFER, framebufferGL->getFramebufferID()); + framebufferGL->syncDrawState(); // Seamless cubemaps are required for ES3 and higher contexts. setTextureCubemapSeamlessEnabled(data.getClientMajorVersion() >= 3); @@ -1319,13 +1316,6 @@ void StateManagerGL::setClearStencil(GLint clearStencil) void StateManagerGL::syncState(const gl::State &state, const gl::State::DirtyBits &glDirtyBits) { - // The the current framebuffer binding sometimes requires resetting the srgb blending - if (glDirtyBits[gl::State::DIRTY_BIT_DRAW_FRAMEBUFFER_BINDING] && - mFunctions->standard == STANDARD_GL_DESKTOP) - { - mLocalDirtyBits.set(gl::State::DIRTY_BIT_FRAMEBUFFER_SRGB); - } - const auto &glAndLocalDirtyBits = (glDirtyBits | mLocalDirtyBits); if (!glAndLocalDirtyBits.any()) @@ -1523,7 +1513,7 @@ void StateManagerGL::syncState(const gl::State &state, const gl::State::DirtyBit setPixelPackState(state.getPackState()); break; case gl::State::DIRTY_BIT_DITHER_ENABLED: - setDitherEnabled(state.isDitherEnabled()); + // TODO(jmadill): implement this break; case gl::State::DIRTY_BIT_GENERATE_MIPMAP_HINT: // TODO(jmadill): implement this @@ -1566,11 +1556,6 @@ void StateManagerGL::syncState(const gl::State &state, const gl::State::DirtyBit setPathRenderingStencilState(state.getPathStencilFunc(), state.getPathStencilRef(), state.getPathStencilMask()); break; - case gl::State::DIRTY_BIT_FRAMEBUFFER_SRGB: - setFramebufferSRGBEnabledForFramebuffer( - state.getFramebufferSRGB(), - GetImplAs(state.getDrawFramebuffer())); - break; default: { ASSERT(dirtyBit >= gl::State::DIRTY_BIT_CURRENT_VALUE_0 && @@ -1600,41 +1585,6 @@ void StateManagerGL::setFramebufferSRGBEnabled(bool enabled) { mFunctions->disable(GL_FRAMEBUFFER_SRGB); } - mLocalDirtyBits.set(gl::State::DIRTY_BIT_FRAMEBUFFER_SRGB); - } -} - -void StateManagerGL::setFramebufferSRGBEnabledForFramebuffer(bool enabled, - const FramebufferGL *framebuffer) -{ - if (mFunctions->standard == STANDARD_GL_DESKTOP && framebuffer->isDefault()) - { - // Obey the framebuffer sRGB state for blending on all framebuffers except the default - // framebuffer on Desktop OpenGL. - // When SRGB blending is enabled, only SRGB capable formats will use it but the default - // framebuffer will always use it if it is enabled. - // TODO(geofflang): Update this when the framebuffer binding dirty changes, when it exists. - setFramebufferSRGBEnabled(false); - } - else - { - setFramebufferSRGBEnabled(enabled); - } -} - -void StateManagerGL::setDitherEnabled(bool enabled) -{ - if (mDitherEnabled != enabled) - { - mDitherEnabled = enabled; - if (mDitherEnabled) - { - mFunctions->enable(GL_DITHER); - } - else - { - mFunctions->disable(GL_DITHER); - } } } diff --git a/gfx/angle/src/libANGLE/renderer/gl/StateManagerGL.h b/gfx/angle/src/libANGLE/renderer/gl/StateManagerGL.h index 3c8c5389f..f7ec64772 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/StateManagerGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/StateManagerGL.h @@ -27,7 +27,6 @@ class State; namespace rx { -class FramebufferGL; class FunctionsGL; class TransformFeedbackGL; class QueryGL; @@ -124,9 +123,6 @@ class StateManagerGL final : angle::NonCopyable GLuint packBuffer); void setFramebufferSRGBEnabled(bool enabled); - void setFramebufferSRGBEnabledForFramebuffer(bool enabled, const FramebufferGL *framebuffer); - - void setDitherEnabled(bool enabled); void setMultisamplingStateEnabled(bool enabled); void setSampleAlphaToOneStateEnabled(bool enabled); @@ -268,7 +264,6 @@ class StateManagerGL final : angle::NonCopyable GLint mClearStencil; bool mFramebufferSRGBEnabled; - bool mDitherEnabled; bool mTextureCubemapSeamlessEnabled; bool mMultisamplingEnabled; diff --git a/gfx/angle/src/libANGLE/renderer/gl/SurfaceGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/SurfaceGL.cpp index a1f0abba7..fcdddebe0 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/SurfaceGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/SurfaceGL.cpp @@ -26,11 +26,6 @@ SurfaceGL::~SurfaceGL() FramebufferImpl *SurfaceGL::createDefaultFramebuffer(const gl::FramebufferState &data) { return new FramebufferGL(data, mRenderer->getFunctions(), mRenderer->getStateManager(), - mRenderer->getWorkarounds(), mRenderer->getBlitter(), true); -} - -egl::Error SurfaceGL::unMakeCurrent() -{ - return egl::Error(EGL_SUCCESS); + mRenderer->getWorkarounds(), true); } } diff --git a/gfx/angle/src/libANGLE/renderer/gl/SurfaceGL.h b/gfx/angle/src/libANGLE/renderer/gl/SurfaceGL.h index 681c365d2..329b562b9 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/SurfaceGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/SurfaceGL.h @@ -22,10 +22,15 @@ class SurfaceGL : public SurfaceImpl SurfaceGL(const egl::SurfaceState &state, RendererGL *renderer); ~SurfaceGL() override; + gl::Error getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target, + FramebufferAttachmentRenderTarget **rtOut) override + { + return gl::Error(GL_OUT_OF_MEMORY, "Not supported on OpenGL"); + } + FramebufferImpl *createDefaultFramebuffer(const gl::FramebufferState &data) override; virtual egl::Error makeCurrent() = 0; - virtual egl::Error unMakeCurrent(); private: RendererGL *mRenderer; diff --git a/gfx/angle/src/libANGLE/renderer/gl/TextureGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/TextureGL.cpp index 589580505..8b78bdc01 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/TextureGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/TextureGL.cpp @@ -8,7 +8,6 @@ #include "libANGLE/renderer/gl/TextureGL.h" -#include "common/BitSetIterator.h" #include "common/debug.h" #include "common/utilities.h" #include "libANGLE/State.h" @@ -21,27 +20,21 @@ #include "libANGLE/renderer/gl/StateManagerGL.h" #include "libANGLE/renderer/gl/WorkaroundsGL.h" #include "libANGLE/renderer/gl/formatutilsgl.h" -#include "libANGLE/renderer/gl/renderergl_utils.h" - -using angle::CheckedNumeric; namespace rx { -namespace -{ - -bool UseTexImage2D(GLenum textureType) +static bool UseTexImage2D(GLenum textureType) { return textureType == GL_TEXTURE_2D || textureType == GL_TEXTURE_CUBE_MAP; } -bool UseTexImage3D(GLenum textureType) +static bool UseTexImage3D(GLenum textureType) { return textureType == GL_TEXTURE_2D_ARRAY || textureType == GL_TEXTURE_3D; } -bool CompatibleTextureTarget(GLenum textureType, GLenum textureTarget) +static bool CompatibleTextureTarget(GLenum textureType, GLenum textureTarget) { if (textureType != GL_TEXTURE_CUBE_MAP) { @@ -53,13 +46,13 @@ bool CompatibleTextureTarget(GLenum textureType, GLenum textureTarget) } } -bool IsLUMAFormat(GLenum format) +static bool IsLUMAFormat(GLenum format) { return format == GL_LUMINANCE || format == GL_ALPHA || format == GL_LUMINANCE_ALPHA; } -LUMAWorkaroundGL GetLUMAWorkaroundInfo(const gl::InternalFormat &originalFormatInfo, - GLenum destinationFormat) +static LUMAWorkaroundGL GetLUMAWorkaroundInfo(const gl::InternalFormat &originalFormatInfo, + GLenum destinationFormat) { if (IsLUMAFormat(originalFormatInfo.format)) { @@ -74,35 +67,23 @@ LUMAWorkaroundGL GetLUMAWorkaroundInfo(const gl::InternalFormat &originalFormatI } } -bool IsDepthStencilFormat(GLenum format) +static bool IsDepthStencilFormat(GLenum format) { return format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL; } -bool GetDepthStencilWorkaround(const gl::InternalFormat &originalFormatInfo) +static bool GetDepthStencilWorkaround(const gl::InternalFormat &originalFormatInfo) { return IsDepthStencilFormat(originalFormatInfo.format); } -LevelInfoGL GetLevelInfo(GLenum originalFormat, GLenum destinationFormat) +static LevelInfoGL GetLevelInfo(GLenum originalFormat, GLenum destinationFormat) { const gl::InternalFormat &originalFormatInfo = gl::GetInternalFormatInfo(originalFormat); return LevelInfoGL(originalFormat, GetDepthStencilWorkaround(originalFormatInfo), GetLUMAWorkaroundInfo(originalFormatInfo, destinationFormat)); } -gl::Texture::DirtyBits GetLevelWorkaroundDirtyBits() -{ - gl::Texture::DirtyBits bits; - bits.set(gl::Texture::DIRTY_BIT_SWIZZLE_RED); - bits.set(gl::Texture::DIRTY_BIT_SWIZZLE_GREEN); - bits.set(gl::Texture::DIRTY_BIT_SWIZZLE_BLUE); - bits.set(gl::Texture::DIRTY_BIT_SWIZZLE_ALPHA); - return bits; -} - -} // anonymous namespace - LUMAWorkaroundGL::LUMAWorkaroundGL() : LUMAWorkaroundGL(false, GL_NONE) { } @@ -153,14 +134,8 @@ TextureGL::~TextureGL() mTextureID = 0; } -gl::Error TextureGL::setImage(GLenum target, - size_t level, - GLenum internalFormat, - const gl::Extents &size, - GLenum format, - GLenum type, - const gl::PixelUnpackState &unpack, - const uint8_t *pixels) +gl::Error TextureGL::setImage(GLenum target, size_t level, GLenum internalFormat, const gl::Extents &size, GLenum format, GLenum type, + const gl::PixelUnpackState &unpack, const uint8_t *pixels) { if (mWorkarounds.unpackOverlappingRowsSeparatelyUnpackBuffer && unpack.pixelBuffer.get() && unpack.rowLength != 0 && unpack.rowLength < size.width) @@ -168,41 +143,13 @@ gl::Error TextureGL::setImage(GLenum target, // The rows overlap in unpack memory. Upload the texture row by row to work around // driver bug. reserveTexImageToBeFilled(target, level, internalFormat, size, format, type); - - if (size.width == 0 || size.height == 0 || size.depth == 0) - { - return gl::NoError(); - } - gl::Box area(0, 0, 0, size.width, size.height, size.depth); - return setSubImageRowByRowWorkaround(target, level, area, format, type, unpack, pixels); + ANGLE_TRY(setSubImageRowByRowWorkaround(target, level, area, format, type, unpack, pixels)); } - - if (mWorkarounds.unpackLastRowSeparatelyForPaddingInclusion) + else { - bool apply; - ANGLE_TRY_RESULT(ShouldApplyLastRowPaddingWorkaround(size, unpack, format, type, - UseTexImage3D(mState.mTarget), pixels), - apply); - - // The driver will think the pixel buffer doesn't have enough data, work around this bug - // by uploading the last row (and last level if 3D) separately. - if (apply) - { - reserveTexImageToBeFilled(target, level, internalFormat, size, format, type); - - if (size.width == 0 || size.height == 0 || size.depth == 0) - { - return gl::NoError(); - } - - gl::Box area(0, 0, 0, size.width, size.height, size.depth); - return setSubImagePaddingWorkaround(target, level, area, format, type, unpack, pixels); - } + setImageHelper(target, level, internalFormat, size, format, type, pixels); } - - setImageHelper(target, level, internalFormat, size, format, type, pixels); - return gl::NoError(); } @@ -214,6 +161,7 @@ void TextureGL::setImageHelper(GLenum target, GLenum type, const uint8_t *pixels) { + UNUSED_ASSERTION_VARIABLE(&CompatibleTextureTarget); // Reference this function to avoid warnings. ASSERT(CompatibleTextureTarget(mState.mTarget, target)); nativegl::TexImageFormat texImageFormat = @@ -239,7 +187,7 @@ void TextureGL::setImageHelper(GLenum target, UNREACHABLE(); } - setLevelInfo(level, 1, GetLevelInfo(internalFormat, texImageFormat.internalFormat)); + mLevelInfo[level] = GetLevelInfo(internalFormat, texImageFormat.internalFormat); } void TextureGL::reserveTexImageToBeFilled(GLenum target, @@ -264,47 +212,32 @@ gl::Error TextureGL::setSubImage(GLenum target, size_t level, const gl::Box &are nativegl::TexSubImageFormat texSubImageFormat = nativegl::GetTexSubImageFormat(mFunctions, mWorkarounds, format, type); - ASSERT(mLevelInfo[level].lumaWorkaround.enabled == - GetLevelInfo(format, texSubImageFormat.format).lumaWorkaround.enabled); - mStateManager->bindTexture(mState.mTarget, mTextureID); if (mWorkarounds.unpackOverlappingRowsSeparatelyUnpackBuffer && unpack.pixelBuffer.get() && unpack.rowLength != 0 && unpack.rowLength < area.width) { - return setSubImageRowByRowWorkaround(target, level, area, format, type, unpack, pixels); - } - - if (mWorkarounds.unpackLastRowSeparatelyForPaddingInclusion) - { - gl::Extents size(area.width, area.height, area.depth); - - bool apply; - ANGLE_TRY_RESULT(ShouldApplyLastRowPaddingWorkaround(size, unpack, format, type, - UseTexImage3D(mState.mTarget), pixels), - apply); - - // The driver will think the pixel buffer doesn't have enough data, work around this bug - // by uploading the last row (and last level if 3D) separately. - if (apply) - { - return setSubImagePaddingWorkaround(target, level, area, format, type, unpack, pixels); - } + ANGLE_TRY(setSubImageRowByRowWorkaround(target, level, area, format, type, unpack, pixels)); } - - if (UseTexImage2D(mState.mTarget)) + else if (UseTexImage2D(mState.mTarget)) { ASSERT(area.z == 0 && area.depth == 1); mFunctions->texSubImage2D(target, static_cast(level), area.x, area.y, area.width, area.height, texSubImageFormat.format, texSubImageFormat.type, pixels); } - else + else if (UseTexImage3D(mState.mTarget)) { - ASSERT(UseTexImage3D(mState.mTarget)); mFunctions->texSubImage3D(target, static_cast(level), area.x, area.y, area.z, area.width, area.height, area.depth, texSubImageFormat.format, texSubImageFormat.type, pixels); } + else + { + UNREACHABLE(); + } + + ASSERT(mLevelInfo[level].lumaWorkaround.enabled == + GetLevelInfo(format, texSubImageFormat.format).lumaWorkaround.enabled); return gl::Error(GL_NO_ERROR); } @@ -317,24 +250,26 @@ gl::Error TextureGL::setSubImageRowByRowWorkaround(GLenum target, const gl::PixelUnpackState &unpack, const uint8_t *pixels) { - gl::PixelUnpackState directUnpack; - directUnpack.pixelBuffer = unpack.pixelBuffer; - directUnpack.alignment = 1; - mStateManager->setPixelUnpackState(directUnpack); - directUnpack.pixelBuffer.set(nullptr); - - const gl::InternalFormat &glFormat = - gl::GetInternalFormatInfo(gl::GetSizedInternalFormat(format, type)); - GLuint rowBytes = 0; - ANGLE_TRY_RESULT(glFormat.computeRowPitch(area.width, unpack.alignment, unpack.rowLength), - rowBytes); + gl::PixelUnpackState unpackToUse; + unpackToUse.pixelBuffer = unpack.pixelBuffer; + mStateManager->setPixelUnpackState(unpackToUse); + unpackToUse.pixelBuffer.set(nullptr); + const gl::Format &glFormat = mState.getImageDesc(mState.mTarget, level).format; + GLuint rowBytes = 0; + ANGLE_TRY_RESULT( + glFormat.info->computeRowPitch(GL_NONE, area.width, unpack.alignment, unpack.rowLength), + rowBytes); GLuint imageBytes = 0; - ANGLE_TRY_RESULT(gl::InternalFormat::computeDepthPitch(area.height, unpack.imageHeight, rowBytes), - imageBytes); + ANGLE_TRY_RESULT( + glFormat.info->computeDepthPitch(GL_NONE, area.width, area.height, unpack.alignment, + unpack.rowLength, unpack.imageHeight), + imageBytes); bool useTexImage3D = UseTexImage3D(mState.mTarget); GLuint skipBytes = 0; - ANGLE_TRY_RESULT(glFormat.computeSkipBytes(rowBytes, imageBytes, unpack, useTexImage3D), - skipBytes); + ANGLE_TRY_RESULT( + glFormat.info->computeSkipBytes(rowBytes, imageBytes, unpack.skipImages, unpack.skipRows, + unpack.skipPixels, useTexImage3D), + skipBytes); const uint8_t *pixelsWithSkip = pixels + skipBytes; if (useTexImage3D) @@ -352,9 +287,8 @@ gl::Error TextureGL::setSubImageRowByRowWorkaround(GLenum target, } } } - else + else if (UseTexImage2D(mState.mTarget)) { - ASSERT(UseTexImage2D(mState.mTarget)); for (GLint row = 0; row < area.height; ++row) { GLint byteOffset = row * rowBytes; @@ -363,89 +297,10 @@ gl::Error TextureGL::setSubImageRowByRowWorkaround(GLenum target, area.width, 1, format, type, rowPixels); } } - return gl::NoError(); -} - -gl::Error TextureGL::setSubImagePaddingWorkaround(GLenum target, - size_t level, - const gl::Box &area, - GLenum format, - GLenum type, - const gl::PixelUnpackState &unpack, - const uint8_t *pixels) -{ - const gl::InternalFormat &glFormat = - gl::GetInternalFormatInfo(gl::GetSizedInternalFormat(format, type)); - GLuint rowBytes = 0; - ANGLE_TRY_RESULT(glFormat.computeRowPitch(area.width, unpack.alignment, unpack.rowLength), - rowBytes); - GLuint imageBytes = 0; - ANGLE_TRY_RESULT(gl::InternalFormat::computeDepthPitch(area.height, unpack.imageHeight, rowBytes), - imageBytes); - bool useTexImage3D = UseTexImage3D(mState.mTarget); - GLuint skipBytes = 0; - ANGLE_TRY_RESULT(glFormat.computeSkipBytes(rowBytes, imageBytes, unpack, useTexImage3D), - skipBytes); - - gl::PixelUnpackState directUnpack; - directUnpack.pixelBuffer = unpack.pixelBuffer; - directUnpack.alignment = 1; - - if (useTexImage3D) - { - // Upload all but the last slice - if (area.depth > 1) - { - mFunctions->texSubImage3D(target, static_cast(level), area.x, area.y, area.z, - area.width, area.height, area.depth - 1, format, type, - pixels); - } - - // Upload the last slice but its last row - if (area.height > 1) - { - // Do not include skipBytes in the last image pixel start offset as it will be done by - // the driver - GLint lastImageOffset = (area.depth - 1) * imageBytes; - const GLubyte *lastImagePixels = pixels + lastImageOffset; - mFunctions->texSubImage3D(target, static_cast(level), area.x, area.y, - area.z + area.depth - 1, area.width, area.height - 1, 1, - format, type, lastImagePixels); - } - - // Upload the last row of the last slice "manually" - mStateManager->setPixelUnpackState(directUnpack); - - GLint lastRowOffset = - skipBytes + (area.depth - 1) * imageBytes + (area.height - 1) * rowBytes; - const GLubyte *lastRowPixels = pixels + lastRowOffset; - mFunctions->texSubImage3D(target, static_cast(level), area.x, - area.y + area.height - 1, area.z + area.depth - 1, area.width, 1, - 1, format, type, lastRowPixels); - } else { - ASSERT(UseTexImage2D(mState.mTarget)); - - // Upload all but the last row - if (area.height > 1) - { - mFunctions->texSubImage2D(target, static_cast(level), area.x, area.y, area.width, - area.height - 1, format, type, pixels); - } - - // Upload the last row "manually" - mStateManager->setPixelUnpackState(directUnpack); - - GLint lastRowOffset = skipBytes + (area.height - 1) * rowBytes; - const GLubyte *lastRowPixels = pixels + lastRowOffset; - mFunctions->texSubImage2D(target, static_cast(level), area.x, - area.y + area.height - 1, area.width, 1, format, type, - lastRowPixels); + UNREACHABLE(); } - - directUnpack.pixelBuffer.set(nullptr); - return gl::NoError(); } @@ -476,7 +331,7 @@ gl::Error TextureGL::setCompressedImage(GLenum target, size_t level, GLenum inte UNREACHABLE(); } - setLevelInfo(level, 1, GetLevelInfo(internalFormat, compressedTexImageFormat.internalFormat)); + mLevelInfo[level] = GetLevelInfo(internalFormat, compressedTexImageFormat.internalFormat); ASSERT(!mLevelInfo[level].lumaWorkaround.enabled); return gl::Error(GL_NO_ERROR); @@ -553,7 +408,7 @@ gl::Error TextureGL::copyImage(GLenum target, size_t level, const gl::Rectangle } } - setLevelInfo(level, 1, levelInfo); + mLevelInfo[level] = levelInfo; return gl::Error(GL_NO_ERROR); } @@ -639,7 +494,8 @@ gl::Error TextureGL::setStorage(GLenum target, size_t levels, GLenum internalFor if (internalFormatInfo.compressed) { GLuint dataSize = 0; - ANGLE_TRY_RESULT(internalFormatInfo.computeCompressedImageSize(levelSize), + ANGLE_TRY_RESULT(internalFormatInfo.computeCompressedImageSize( + GL_UNSIGNED_BYTE, levelSize), dataSize); mFunctions->compressedTexImage2D(target, static_cast(level), texStorageFormat.internalFormat, @@ -662,7 +518,7 @@ gl::Error TextureGL::setStorage(GLenum target, size_t levels, GLenum internalFor { GLuint dataSize = 0; ANGLE_TRY_RESULT(internalFormatInfo.computeCompressedImageSize( - levelSize), + GL_UNSIGNED_BYTE, levelSize), dataSize); mFunctions->compressedTexImage2D( face, static_cast(level), texStorageFormat.internalFormat, @@ -713,7 +569,7 @@ gl::Error TextureGL::setStorage(GLenum target, size_t levels, GLenum internalFor { GLuint dataSize = 0; ANGLE_TRY_RESULT( - internalFormatInfo.computeCompressedImageSize(levelSize), + internalFormatInfo.computeCompressedImageSize(GL_UNSIGNED_BYTE, levelSize), dataSize); mFunctions->compressedTexImage3D(target, i, texStorageFormat.internalFormat, levelSize.width, levelSize.height, @@ -735,7 +591,11 @@ gl::Error TextureGL::setStorage(GLenum target, size_t levels, GLenum internalFor UNREACHABLE(); } - setLevelInfo(0, levels, GetLevelInfo(internalFormat, texStorageFormat.internalFormat)); + LevelInfoGL levelInfo = GetLevelInfo(internalFormat, texStorageFormat.internalFormat); + for (size_t level = 0; level < mLevelInfo.size(); level++) + { + mLevelInfo[level] = levelInfo; + } return gl::Error(GL_NO_ERROR); } @@ -750,6 +610,8 @@ gl::Error TextureGL::setImageExternal(GLenum target, gl::Error TextureGL::generateMipmap() { + // Need to sync base level and max level to driver before calling GenerateMipmap. + syncState(0); mStateManager->bindTexture(mState.mTarget, mTextureID); mFunctions->generateMipmap(mState.mTarget); @@ -758,7 +620,10 @@ gl::Error TextureGL::generateMipmap() ASSERT(maxLevel < mLevelInfo.size()); - setLevelInfo(effectiveBaseLevel, maxLevel - effectiveBaseLevel, mLevelInfo[effectiveBaseLevel]); + for (GLuint level = effectiveBaseLevel; level <= maxLevel; level++) + { + mLevelInfo[level] = mLevelInfo[effectiveBaseLevel]; + } return gl::Error(GL_NO_ERROR); } @@ -770,7 +635,7 @@ void TextureGL::bindTexImage(egl::Surface *surface) // Make sure this texture is bound mStateManager->bindTexture(mState.mTarget, mTextureID); - setLevelInfo(0, 1, LevelInfoGL()); + mLevelInfo[0] = LevelInfoGL(); } void TextureGL::releaseTexImage() @@ -796,121 +661,58 @@ gl::Error TextureGL::setEGLImageTarget(GLenum target, egl::Image *image) return gl::Error(GL_INVALID_OPERATION); } -void TextureGL::syncState(const gl::Texture::DirtyBits &dirtyBits) +template +static inline void SyncSamplerStateMember(const FunctionsGL *functions, + ApplyTextureFuncType applyTextureFunc, + const gl::SamplerState &newState, + gl::SamplerState &curState, + GLenum textureType, + GLenum name, + T(gl::SamplerState::*samplerMember)) { - if (dirtyBits.none() && mLocalDirtyBits.none()) - { - return; - } - - mStateManager->bindTexture(mState.mTarget, mTextureID); - - if (dirtyBits[gl::Texture::DIRTY_BIT_BASE_LEVEL] || dirtyBits[gl::Texture::DIRTY_BIT_MAX_LEVEL]) + if (curState.*samplerMember != newState.*samplerMember) { - // Don't know if the previous base level was using any workarounds, always re-sync the - // workaround dirty bits - mLocalDirtyBits |= GetLevelWorkaroundDirtyBits(); + applyTextureFunc(); + curState.*samplerMember = newState.*samplerMember; + functions->texParameterf(textureType, name, static_cast(curState.*samplerMember)); } - - for (auto dirtyBit : angle::IterateBitSet(dirtyBits | mLocalDirtyBits)) - { - switch (dirtyBit) - { - case gl::Texture::DIRTY_BIT_MIN_FILTER: - mFunctions->texParameteri(mState.mTarget, GL_TEXTURE_MIN_FILTER, - mState.getSamplerState().minFilter); - break; - case gl::Texture::DIRTY_BIT_MAG_FILTER: - mFunctions->texParameteri(mState.mTarget, GL_TEXTURE_MAG_FILTER, - mState.getSamplerState().magFilter); - break; - case gl::Texture::DIRTY_BIT_WRAP_S: - mFunctions->texParameteri(mState.mTarget, GL_TEXTURE_WRAP_S, - mState.getSamplerState().wrapS); - break; - case gl::Texture::DIRTY_BIT_WRAP_T: - mFunctions->texParameteri(mState.mTarget, GL_TEXTURE_WRAP_T, - mState.getSamplerState().wrapT); - break; - case gl::Texture::DIRTY_BIT_WRAP_R: - mFunctions->texParameteri(mState.mTarget, GL_TEXTURE_WRAP_R, - mState.getSamplerState().wrapR); - break; - case gl::Texture::DIRTY_BIT_MAX_ANISOTROPY: - mFunctions->texParameterf(mState.mTarget, GL_TEXTURE_MAX_ANISOTROPY_EXT, - mState.getSamplerState().maxAnisotropy); - break; - case gl::Texture::DIRTY_BIT_MIN_LOD: - mFunctions->texParameterf(mState.mTarget, GL_TEXTURE_MIN_LOD, - mState.getSamplerState().minLod); - break; - case gl::Texture::DIRTY_BIT_MAX_LOD: - mFunctions->texParameterf(mState.mTarget, GL_TEXTURE_MAX_LOD, - mState.getSamplerState().maxLod); - break; - case gl::Texture::DIRTY_BIT_COMPARE_MODE: - mFunctions->texParameteri(mState.mTarget, GL_TEXTURE_COMPARE_MODE, - mState.getSamplerState().compareMode); - break; - case gl::Texture::DIRTY_BIT_COMPARE_FUNC: - mFunctions->texParameteri(mState.mTarget, GL_TEXTURE_COMPARE_FUNC, - mState.getSamplerState().compareFunc); - break; - case gl::Texture::DIRTY_BIT_SRGB_DECODE: - mFunctions->texParameteri(mState.mTarget, GL_TEXTURE_SRGB_DECODE_EXT, - mState.getSamplerState().sRGBDecode); - break; - - // Texture state - case gl::Texture::DIRTY_BIT_SWIZZLE_RED: - syncTextureStateSwizzle(mFunctions, GL_TEXTURE_SWIZZLE_R, - mState.getSwizzleState().swizzleRed); - break; - case gl::Texture::DIRTY_BIT_SWIZZLE_GREEN: - syncTextureStateSwizzle(mFunctions, GL_TEXTURE_SWIZZLE_G, - mState.getSwizzleState().swizzleGreen); - break; - case gl::Texture::DIRTY_BIT_SWIZZLE_BLUE: - syncTextureStateSwizzle(mFunctions, GL_TEXTURE_SWIZZLE_B, - mState.getSwizzleState().swizzleBlue); - break; - case gl::Texture::DIRTY_BIT_SWIZZLE_ALPHA: - syncTextureStateSwizzle(mFunctions, GL_TEXTURE_SWIZZLE_A, - mState.getSwizzleState().swizzleAlpha); - break; - case gl::Texture::DIRTY_BIT_BASE_LEVEL: - mFunctions->texParameteri(mState.mTarget, GL_TEXTURE_BASE_LEVEL, - mState.getEffectiveBaseLevel()); - break; - case gl::Texture::DIRTY_BIT_MAX_LEVEL: - mFunctions->texParameteri(mState.mTarget, GL_TEXTURE_MAX_LEVEL, - mState.getEffectiveMaxLevel()); - break; - case gl::Texture::DIRTY_BIT_USAGE: - break; - - default: - UNREACHABLE(); - } - } - - mLocalDirtyBits.reset(); } -bool TextureGL::hasAnyDirtyBit() const +template +static inline void SyncTextureStateMember(const FunctionsGL *functions, + ApplyTextureFuncType applyTextureFunc, + const gl::TextureState &newState, + gl::TextureState &curState, + GLenum textureType, + GLenum name, + T(gl::TextureState::*stateMember)) { - return mLocalDirtyBits.any(); + if (curState.*stateMember != newState.*stateMember) + { + applyTextureFunc(); + curState.*stateMember = newState.*stateMember; + functions->texParameterf(textureType, name, static_cast(curState.*stateMember)); + } } -void TextureGL::syncTextureStateSwizzle(const FunctionsGL *functions, GLenum name, GLenum value) +template +static inline void SyncTextureStateSwizzle(const FunctionsGL *functions, + ApplyTextureFuncType applyTextureFunc, + const LevelInfoGL &levelInfo, + const gl::SwizzleState &newState, + gl::SwizzleState &curState, + GLenum textureType, + GLenum name, + T(gl::SwizzleState::*stateMember)) { - const LevelInfoGL &levelInfo = mLevelInfo[mState.getEffectiveBaseLevel()]; - GLenum resultSwizzle = value; + GLenum resultSwizzle = newState.*stateMember; if (levelInfo.lumaWorkaround.enabled || levelInfo.depthStencilWorkaround) { if (levelInfo.lumaWorkaround.enabled) { - switch (value) + UNUSED_ASSERTION_VARIABLE(levelInfo.lumaWorkaround.workaroundFormat); + + switch (newState.*stateMember) { case GL_RED: case GL_GREEN: @@ -964,7 +766,7 @@ void TextureGL::syncTextureStateSwizzle(const FunctionsGL *functions, GLenum nam case GL_ZERO: case GL_ONE: // Don't modify the swizzle state when requesting ZERO or ONE. - resultSwizzle = value; + resultSwizzle = newState.*stateMember; break; default: @@ -974,11 +776,11 @@ void TextureGL::syncTextureStateSwizzle(const FunctionsGL *functions, GLenum nam } else if (levelInfo.depthStencilWorkaround) { - switch (value) + switch (newState.*stateMember) { case GL_RED: // Don't modify the swizzle state when requesting the red channel. - resultSwizzle = value; + resultSwizzle = newState.*stateMember; break; case GL_GREEN: @@ -995,7 +797,7 @@ void TextureGL::syncTextureStateSwizzle(const FunctionsGL *functions, GLenum nam case GL_ZERO: case GL_ONE: // Don't modify the swizzle state when requesting ZERO or ONE. - resultSwizzle = value; + resultSwizzle = newState.*stateMember; break; default: @@ -1010,25 +812,65 @@ void TextureGL::syncTextureStateSwizzle(const FunctionsGL *functions, GLenum nam } - functions->texParameteri(mState.mTarget, name, resultSwizzle); + if (curState.*stateMember != resultSwizzle) + { + applyTextureFunc(); + curState.*stateMember = resultSwizzle; + functions->texParameterf(textureType, name, static_cast(resultSwizzle)); + } } -void TextureGL::setLevelInfo(size_t level, size_t levelCount, const LevelInfoGL &levelInfo) +void TextureGL::syncState(size_t textureUnit) const { - ASSERT(levelCount > 0 && level + levelCount < mLevelInfo.size()); + // Callback lamdba to bind this texture only if needed. + bool textureApplied = false; + auto applyTextureFunc = [&]() + { + if (!textureApplied) + { + mStateManager->activeTexture(textureUnit); + mStateManager->bindTexture(mState.mTarget, mTextureID); + textureApplied = true; + } + }; - GLuint baseLevel = mState.getEffectiveBaseLevel(); - bool needsResync = level <= baseLevel && level + levelCount >= baseLevel && - (levelInfo.depthStencilWorkaround || levelInfo.lumaWorkaround.enabled); - if (needsResync) + // Sync texture state + // Apply the effective base level and max level instead of the base level and max level set from + // the API. This can help with buggy drivers. + if (mAppliedTextureState.getEffectiveBaseLevel() != mState.getEffectiveBaseLevel()) { - mLocalDirtyBits |= GetLevelWorkaroundDirtyBits(); + applyTextureFunc(); + mFunctions->texParameteri(mState.mTarget, GL_TEXTURE_BASE_LEVEL, + mState.getEffectiveBaseLevel()); } - - for (size_t i = level; i < level + levelCount; i++) + mAppliedTextureState.mBaseLevel = mState.mBaseLevel; + if (mAppliedTextureState.getEffectiveMaxLevel() != mState.getEffectiveMaxLevel()) { - mLevelInfo[i] = levelInfo; + applyTextureFunc(); + mFunctions->texParameteri(mState.mTarget, GL_TEXTURE_MAX_LEVEL, + mState.getEffectiveMaxLevel()); } + mAppliedTextureState.mMaxLevel = mState.mMaxLevel; + + // clang-format off + const LevelInfoGL &levelInfo = mLevelInfo[mState.getEffectiveBaseLevel()]; + SyncTextureStateSwizzle(mFunctions, applyTextureFunc, levelInfo, mState.mSwizzleState, mAppliedTextureState.mSwizzleState, mState.mTarget, GL_TEXTURE_SWIZZLE_R, &gl::SwizzleState::swizzleRed); + SyncTextureStateSwizzle(mFunctions, applyTextureFunc, levelInfo, mState.mSwizzleState, mAppliedTextureState.mSwizzleState, mState.mTarget, GL_TEXTURE_SWIZZLE_G, &gl::SwizzleState::swizzleGreen); + SyncTextureStateSwizzle(mFunctions, applyTextureFunc, levelInfo, mState.mSwizzleState, mAppliedTextureState.mSwizzleState, mState.mTarget, GL_TEXTURE_SWIZZLE_B, &gl::SwizzleState::swizzleBlue); + SyncTextureStateSwizzle(mFunctions, applyTextureFunc, levelInfo, mState.mSwizzleState, mAppliedTextureState.mSwizzleState, mState.mTarget, GL_TEXTURE_SWIZZLE_A, &gl::SwizzleState::swizzleAlpha); + + // Sync sampler state + SyncSamplerStateMember(mFunctions, applyTextureFunc, mState.mSamplerState, mAppliedTextureState.mSamplerState, mState.mTarget, GL_TEXTURE_MIN_FILTER, &gl::SamplerState::minFilter); + SyncSamplerStateMember(mFunctions, applyTextureFunc, mState.mSamplerState, mAppliedTextureState.mSamplerState, mState.mTarget, GL_TEXTURE_MAG_FILTER, &gl::SamplerState::magFilter); + SyncSamplerStateMember(mFunctions, applyTextureFunc, mState.mSamplerState, mAppliedTextureState.mSamplerState, mState.mTarget, GL_TEXTURE_WRAP_S, &gl::SamplerState::wrapS); + SyncSamplerStateMember(mFunctions, applyTextureFunc, mState.mSamplerState, mAppliedTextureState.mSamplerState, mState.mTarget, GL_TEXTURE_WRAP_T, &gl::SamplerState::wrapT); + SyncSamplerStateMember(mFunctions, applyTextureFunc, mState.mSamplerState, mAppliedTextureState.mSamplerState, mState.mTarget, GL_TEXTURE_WRAP_R, &gl::SamplerState::wrapR); + SyncSamplerStateMember(mFunctions, applyTextureFunc, mState.mSamplerState, mAppliedTextureState.mSamplerState, mState.mTarget, GL_TEXTURE_MAX_ANISOTROPY_EXT, &gl::SamplerState::maxAnisotropy); + SyncSamplerStateMember(mFunctions, applyTextureFunc, mState.mSamplerState, mAppliedTextureState.mSamplerState, mState.mTarget, GL_TEXTURE_MIN_LOD, &gl::SamplerState::minLod); + SyncSamplerStateMember(mFunctions, applyTextureFunc, mState.mSamplerState, mAppliedTextureState.mSamplerState, mState.mTarget, GL_TEXTURE_MAX_LOD, &gl::SamplerState::maxLod); + SyncSamplerStateMember(mFunctions, applyTextureFunc, mState.mSamplerState, mAppliedTextureState.mSamplerState, mState.mTarget, GL_TEXTURE_COMPARE_MODE, &gl::SamplerState::compareMode); + SyncSamplerStateMember(mFunctions, applyTextureFunc, mState.mSamplerState, mAppliedTextureState.mSamplerState, mState.mTarget, GL_TEXTURE_COMPARE_FUNC, &gl::SamplerState::compareFunc); + // clang-format on } GLuint TextureGL::getTextureID() const diff --git a/gfx/angle/src/libANGLE/renderer/gl/TextureGL.h b/gfx/angle/src/libANGLE/renderer/gl/TextureGL.h index 068284c5b..540e6c3c6 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/TextureGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/TextureGL.h @@ -87,12 +87,16 @@ class TextureGL : public TextureImpl gl::Error setEGLImageTarget(GLenum target, egl::Image *image) override; + void syncState(size_t textureUnit) const; GLuint getTextureID() const; - void setBaseLevel(GLuint) override {} + gl::Error getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target, + FramebufferAttachmentRenderTarget **rtOut) override + { + return gl::Error(GL_OUT_OF_MEMORY, "Not supported on OpenGL"); + } - void syncState(const gl::Texture::DirtyBits &dirtyBits) override; - bool hasAnyDirtyBit() const; + void setBaseLevel(GLuint) override {} private: void setImageHelper(GLenum target, @@ -116,25 +120,12 @@ class TextureGL : public TextureImpl const gl::PixelUnpackState &unpack, const uint8_t *pixels); - gl::Error setSubImagePaddingWorkaround(GLenum target, - size_t level, - const gl::Box &area, - GLenum format, - GLenum type, - const gl::PixelUnpackState &unpack, - const uint8_t *pixels); - - void syncTextureStateSwizzle(const FunctionsGL *functions, GLenum name, GLenum value); - - void setLevelInfo(size_t level, size_t levelCount, const LevelInfoGL &levelInfo); - const FunctionsGL *mFunctions; const WorkaroundsGL &mWorkarounds; StateManagerGL *mStateManager; BlitGL *mBlitter; std::vector mLevelInfo; - gl::Texture::DirtyBits mLocalDirtyBits; mutable gl::TextureState mAppliedTextureState; GLuint mTextureID; diff --git a/gfx/angle/src/libANGLE/renderer/gl/WorkaroundsGL.h b/gfx/angle/src/libANGLE/renderer/gl/WorkaroundsGL.h index 105f94089..2549a2c47 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/WorkaroundsGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/WorkaroundsGL.h @@ -21,13 +21,7 @@ struct WorkaroundsGL doWhileGLSLCausesGPUHang(false), finishDoesNotCauseQueriesToBeAvailable(false), alwaysCallUseProgramAfterLink(false), - unpackOverlappingRowsSeparatelyUnpackBuffer(false), - emulateAbsIntFunction(false), - addAndTrueToLoopCondition(false), - emulateIsnanFloat(false), - useUnusedBlocksWithStandardOrSharedLayout(false), - dontRemoveInvariantForFragmentInput(false), - removeInvariantAndCentroidForESSL3(false) + unpackOverlappingRowsSeparatelyUnpackBuffer(false) { } @@ -73,53 +67,6 @@ struct WorkaroundsGL // In the case of unpacking from a pixel unpack buffer, unpack overlapping rows row by row. bool unpackOverlappingRowsSeparatelyUnpackBuffer; - // In the case of packing to a pixel pack buffer, pack overlapping rows row by row. - bool packOverlappingRowsSeparatelyPackBuffer; - - // During initialization, assign the current vertex attributes to the spec-mandated defaults. - bool initializeCurrentVertexAttributes; - - // abs(i) where i is an integer returns unexpected result on Intel Mac. - // Emulate abs(i) with i * sign(i). - bool emulateAbsIntFunction; - - // On Intel Mac, calculation of loop conditions in for and while loop has bug. - // Add "&& true" to the end of the condition expression to work around the bug. - bool addAndTrueToLoopCondition; - - // When uploading textures from an unpack buffer, some drivers count an extra row padding when - // checking if the pixel unpack buffer is big enough. Tracking bug: http://anglebug.com/1512 - // For example considering the pixel buffer below where in memory, each row data (D) of the - // texture is followed by some unused data (the dots): - // +-------+--+ - // |DDDDDDD|..| - // |DDDDDDD|..| - // |DDDDDDD|..| - // |DDDDDDD|..| - // +-------A--B - // The last pixel read will be A, but the driver will think it is B, causing it to generate an - // error when the pixel buffer is just big enough. - bool unpackLastRowSeparatelyForPaddingInclusion; - - // Equivalent workaround when uploading data from a pixel pack buffer. - bool packLastRowSeparatelyForPaddingInclusion; - - // On some Intel drivers, using isnan() on highp float will get wrong answer. To work around - // this bug, we use an expression to emulate function isnan(). - // Tracking bug: http://crbug.com/650547 - bool emulateIsnanFloat; - - // On Mac with OpenGL version 4.1, unused std140 or shared uniform blocks will be - // treated as inactive which is not consistent with WebGL2.0 spec. Reference all members in a - // unused std140 or shared uniform block at the beginning of main to work around it. - bool useUnusedBlocksWithStandardOrSharedLayout; - - // This flag will keep invariant declaration for input in fragment shader for GLSL >=4.20 - // on AMD. - bool dontRemoveInvariantForFragmentInput; - - // This flag is used to fix spec difference between GLSL 4.1 or lower and ESSL3. - bool removeInvariantAndCentroidForESSL3; }; } diff --git a/gfx/angle/src/libANGLE/renderer/gl/cgl/DisplayCGL.h b/gfx/angle/src/libANGLE/renderer/gl/cgl/DisplayCGL.h index cc1b17bb7..0ba57b62b 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/cgl/DisplayCGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/cgl/DisplayCGL.h @@ -35,8 +35,7 @@ class DisplayCGL : public DisplayGL const egl::AttributeMap &attribs) override; SurfaceImpl *createPbufferFromClientBuffer(const egl::SurfaceState &state, const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) override; SurfaceImpl *createPixmapSurface(const egl::SurfaceState &state, const egl::Config *configuration, diff --git a/gfx/angle/src/libANGLE/renderer/gl/cgl/DisplayCGL.mm b/gfx/angle/src/libANGLE/renderer/gl/cgl/DisplayCGL.mm index f87134c82..b9d5f39b0 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/cgl/DisplayCGL.mm +++ b/gfx/angle/src/libANGLE/renderer/gl/cgl/DisplayCGL.mm @@ -128,8 +128,7 @@ SurfaceImpl *DisplayCGL::createPbufferSurface(const egl::SurfaceState &state, SurfaceImpl *DisplayCGL::createPbufferFromClientBuffer(const egl::SurfaceState &state, const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) { UNIMPLEMENTED(); diff --git a/gfx/angle/src/libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.h b/gfx/angle/src/libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.h index 7cbb74da4..1e198bf5a 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.h @@ -53,7 +53,7 @@ class PbufferSurfaceCGL : public SurfaceGL const FunctionsGL *mFunctions; StateManagerGL *mStateManager; - RendererGL *mRenderer; + const WorkaroundsGL &mWorkarounds; GLuint mFramebuffer; GLuint mColorRenderbuffer; diff --git a/gfx/angle/src/libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.mm b/gfx/angle/src/libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.mm index c03d3836f..b9689177e 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.mm +++ b/gfx/angle/src/libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.mm @@ -28,7 +28,7 @@ PbufferSurfaceCGL::PbufferSurfaceCGL(const egl::SurfaceState &state, mHeight(height), mFunctions(functions), mStateManager(renderer->getStateManager()), - mRenderer(renderer), + mWorkarounds(renderer->getWorkarounds()), mFramebuffer(0), mColorRenderbuffer(0), mDSRenderbuffer(0) @@ -136,8 +136,7 @@ EGLint PbufferSurfaceCGL::getSwapBehavior() const FramebufferImpl *PbufferSurfaceCGL::createDefaultFramebuffer(const gl::FramebufferState &state) { // TODO(cwallez) assert it happens only once? - return new FramebufferGL(mFramebuffer, state, mFunctions, mRenderer->getWorkarounds(), - mRenderer->getBlitter(), mStateManager); + return new FramebufferGL(mFramebuffer, state, mFunctions, mWorkarounds, mStateManager); } } diff --git a/gfx/angle/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h b/gfx/angle/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h index 165ab0486..d8f1a14d7 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h @@ -88,7 +88,6 @@ class WindowSurfaceCGL : public SurfaceGL CGLContextObj mContext; const FunctionsGL *mFunctions; StateManagerGL *mStateManager; - RendererGL *mRenderer; const WorkaroundsGL &mWorkarounds; GLuint mFramebuffer; diff --git a/gfx/angle/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm b/gfx/angle/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm index c2ac4dca4..b5375b1f9 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm +++ b/gfx/angle/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm @@ -154,12 +154,11 @@ mContext(context), mFunctions(functions), mStateManager(renderer->getStateManager()), - mRenderer(renderer), mWorkarounds(renderer->getWorkarounds()), mFramebuffer(0), mDSRenderbuffer(0) - { - pthread_mutex_init(&mSwapState.mutex, nullptr); +{ + pthread_mutex_init(&mSwapState.mutex, nullptr); } WindowSurfaceCGL::~WindowSurfaceCGL() @@ -325,8 +324,7 @@ EGLint WindowSurfaceCGL::getSwapBehavior() const FramebufferImpl *WindowSurfaceCGL::createDefaultFramebuffer(const gl::FramebufferState &state) { // TODO(cwallez) assert it happens only once? - return new FramebufferGL(mFramebuffer, state, mFunctions, mWorkarounds, mRenderer->getBlitter(), - mStateManager); + return new FramebufferGL(mFramebuffer, state, mFunctions, mWorkarounds, mStateManager); } } diff --git a/gfx/angle/src/libANGLE/renderer/gl/egl/SurfaceEGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/egl/SurfaceEGL.cpp index 693b61c9c..388832b2a 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/egl/SurfaceEGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/egl/SurfaceEGL.cpp @@ -33,6 +33,7 @@ SurfaceEGL::~SurfaceEGL() if (mSurface != EGL_NO_SURFACE) { EGLBoolean success = mEGL->destroySurface(mSurface); + UNUSED_ASSERTION_VARIABLE(success); ASSERT(success == EGL_TRUE); } } @@ -103,6 +104,7 @@ EGLint SurfaceEGL::getWidth() const { EGLint value; EGLBoolean success = mEGL->querySurface(mSurface, EGL_WIDTH, &value); + UNUSED_ASSERTION_VARIABLE(success); ASSERT(success == EGL_TRUE); return value; } @@ -111,6 +113,7 @@ EGLint SurfaceEGL::getHeight() const { EGLint value; EGLBoolean success = mEGL->querySurface(mSurface, EGL_HEIGHT, &value); + UNUSED_ASSERTION_VARIABLE(success); ASSERT(success == EGL_TRUE); return value; } @@ -125,6 +128,7 @@ EGLint SurfaceEGL::getSwapBehavior() const { EGLint value; EGLBoolean success = mEGL->querySurface(mSurface, EGL_SWAP_BEHAVIOR, &value); + UNUSED_ASSERTION_VARIABLE(success); ASSERT(success == EGL_TRUE); return value; } diff --git a/gfx/angle/src/libANGLE/renderer/gl/egl/android/DisplayAndroid.cpp b/gfx/angle/src/libANGLE/renderer/gl/egl/android/DisplayAndroid.cpp index b689578c9..4956c5b3f 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/egl/android/DisplayAndroid.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/egl/android/DisplayAndroid.cpp @@ -159,6 +159,7 @@ SurfaceImpl *DisplayAndroid::createWindowSurface(const egl::SurfaceState &state, EGL_NONE}; success = mEGL->chooseConfig(configAttribList, &config, 1, &numConfig); ASSERT(success && numConfig == 1); + UNUSED_ASSERTION_VARIABLE(success); return new WindowSurfaceEGL(state, mEGL, config, window, attribs.toIntVector(), mContext, getRenderer()); @@ -176,6 +177,7 @@ SurfaceImpl *DisplayAndroid::createPbufferSurface(const egl::SurfaceState &state EGL_NONE}; success = mEGL->chooseConfig(configAttribList, &config, 1, &numConfig); ASSERT(success && numConfig == 1); + UNUSED_ASSERTION_VARIABLE(success); return new PbufferSurfaceEGL(state, mEGL, config, attribs.toIntVector(), mContext, getRenderer()); @@ -183,8 +185,7 @@ SurfaceImpl *DisplayAndroid::createPbufferSurface(const egl::SurfaceState &state SurfaceImpl *DisplayAndroid::createPbufferFromClientBuffer(const egl::SurfaceState &state, const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) { UNIMPLEMENTED(); @@ -214,6 +215,7 @@ void DisplayAndroid::getConfigAttrib(EGLConfig config, EGLint attribute, T *valu EGLint tmp; EGLBoolean success = mEGL->getConfigAttrib(config, attribute, &tmp); ASSERT(success == EGL_TRUE); + UNUSED_ASSERTION_VARIABLE(success); *value = tmp; } @@ -231,6 +233,7 @@ egl::ConfigSet DisplayAndroid::generateConfigs() success = mEGL->chooseConfig(mConfigAttribList.data(), configs.data(), numConfigs, &numConfigs2); ASSERT(success == EGL_TRUE && numConfigs2 == numConfigs); + UNUSED_ASSERTION_VARIABLE(success); for (int i = 0; i < numConfigs; i++) { diff --git a/gfx/angle/src/libANGLE/renderer/gl/egl/android/DisplayAndroid.h b/gfx/angle/src/libANGLE/renderer/gl/egl/android/DisplayAndroid.h index 0be9bb465..693532fb4 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/egl/android/DisplayAndroid.h +++ b/gfx/angle/src/libANGLE/renderer/gl/egl/android/DisplayAndroid.h @@ -36,8 +36,7 @@ class DisplayAndroid : public DisplayEGL const egl::AttributeMap &attribs) override; SurfaceImpl *createPbufferFromClientBuffer(const egl::SurfaceState &state, const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) override; SurfaceImpl *createPixmapSurface(const egl::SurfaceState &state, const egl::Config *configuration, diff --git a/gfx/angle/src/libANGLE/renderer/gl/egl/ozone/DisplayOzone.cpp b/gfx/angle/src/libANGLE/renderer/gl/egl/ozone/DisplayOzone.cpp index 01549fcfa..6f5321632 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/egl/ozone/DisplayOzone.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/egl/ozone/DisplayOzone.cpp @@ -308,9 +308,9 @@ uint32_t DisplayOzone::Buffer::getDRMFB() FramebufferGL *DisplayOzone::Buffer::framebufferGL(const gl::FramebufferState &state) { - return new FramebufferGL( - mGLFB, state, mDisplay->mFunctionsGL, mDisplay->getRenderer()->getWorkarounds(), - mDisplay->getRenderer()->getBlitter(), mDisplay->getRenderer()->getStateManager()); + return new FramebufferGL(mGLFB, state, mDisplay->mFunctionsGL, + mDisplay->getRenderer()->getWorkarounds(), + mDisplay->getRenderer()->getStateManager()); } void DisplayOzone::Buffer::present() @@ -859,8 +859,7 @@ SurfaceImpl *DisplayOzone::createPbufferSurface(const egl::SurfaceState &state, SurfaceImpl *DisplayOzone::createPbufferFromClientBuffer(const egl::SurfaceState &state, const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) { UNIMPLEMENTED(); diff --git a/gfx/angle/src/libANGLE/renderer/gl/egl/ozone/DisplayOzone.h b/gfx/angle/src/libANGLE/renderer/gl/egl/ozone/DisplayOzone.h index 77c669314..55a188c3e 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/egl/ozone/DisplayOzone.h +++ b/gfx/angle/src/libANGLE/renderer/gl/egl/ozone/DisplayOzone.h @@ -122,8 +122,7 @@ class DisplayOzone final : public DisplayEGL const egl::AttributeMap &attribs) override; SurfaceImpl *createPbufferFromClientBuffer(const egl::SurfaceState &state, const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) override; SurfaceImpl *createPixmapSurface(const egl::SurfaceState &state, const egl::Config *configuration, diff --git a/gfx/angle/src/libANGLE/renderer/gl/formatutilsgl.cpp b/gfx/angle/src/libANGLE/renderer/gl/formatutilsgl.cpp index c5219b4b8..1688be116 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/formatutilsgl.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/formatutilsgl.cpp @@ -438,32 +438,6 @@ static GLenum GetNativeType(const FunctionsGL *functions, return result; } -static GLenum GetNativeReadType(const FunctionsGL *functions, - const WorkaroundsGL &workarounds, - GLenum type) -{ - GLenum result = type; - - if (functions->standard == STANDARD_GL_DESKTOP) - { - if (type == GL_HALF_FLOAT_OES) - { - // The enums differ for the OES half float extensions and desktop GL spec. Update it. - result = GL_HALF_FLOAT; - } - } - - return result; -} - -static GLenum GetNativeReadFormat(const FunctionsGL *functions, - const WorkaroundsGL &workarounds, - GLenum format) -{ - GLenum result = format; - return result; -} - TexImageFormat GetTexImageFormat(const FunctionsGL *functions, const WorkaroundsGL &workarounds, GLenum internalFormat, @@ -538,16 +512,6 @@ RenderbufferFormat GetRenderbufferFormat(const FunctionsGL *functions, GetNativeInternalFormat(functions, workarounds, internalFormat, internalFormat); return result; } -ReadPixelsFormat GetReadPixelsFormat(const FunctionsGL *functions, - const WorkaroundsGL &workarounds, - GLenum format, - GLenum type) -{ - ReadPixelsFormat result; - result.format = GetNativeReadFormat(functions, workarounds, format); - result.type = GetNativeReadType(functions, workarounds, type); - return result; -} } } diff --git a/gfx/angle/src/libANGLE/renderer/gl/formatutilsgl.h b/gfx/angle/src/libANGLE/renderer/gl/formatutilsgl.h index 616f37af2..547d4783e 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/formatutilsgl.h +++ b/gfx/angle/src/libANGLE/renderer/gl/formatutilsgl.h @@ -112,16 +112,6 @@ struct RenderbufferFormat RenderbufferFormat GetRenderbufferFormat(const FunctionsGL *functions, const WorkaroundsGL &workarounds, GLenum internalFormat); - -struct ReadPixelsFormat -{ - GLenum format; - GLenum type; -}; -ReadPixelsFormat GetReadPixelsFormat(const FunctionsGL *functions, - const WorkaroundsGL &workarounds, - GLenum format, - GLenum type); } } diff --git a/gfx/angle/src/libANGLE/renderer/gl/glx/DisplayGLX.cpp b/gfx/angle/src/libANGLE/renderer/gl/glx/DisplayGLX.cpp index e98401d0a..0358a428e 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/glx/DisplayGLX.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/glx/DisplayGLX.cpp @@ -350,7 +350,7 @@ egl::Error DisplayGLX::initialize(egl::Display *display) bool isOpenGLES = eglAttributes.get(EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE) == EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE; - if (isOpenGLES && (IsIntel(vendor) || IsNvidia(vendor))) + if (isOpenGLES && (vendor == VENDOR_ID_INTEL || vendor == VENDOR_ID_NVIDIA)) { return egl::Error(EGL_NOT_INITIALIZED, "Intel or NVIDIA OpenGL ES drivers are not supported."); } @@ -410,8 +410,7 @@ SurfaceImpl *DisplayGLX::createPbufferSurface(const egl::SurfaceState &state, SurfaceImpl *DisplayGLX::createPbufferFromClientBuffer(const egl::SurfaceState &state, const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) { UNIMPLEMENTED(); diff --git a/gfx/angle/src/libANGLE/renderer/gl/glx/DisplayGLX.h b/gfx/angle/src/libANGLE/renderer/gl/glx/DisplayGLX.h index 7e870c2f3..79198395d 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/glx/DisplayGLX.h +++ b/gfx/angle/src/libANGLE/renderer/gl/glx/DisplayGLX.h @@ -53,8 +53,7 @@ class DisplayGLX : public DisplayGL const egl::AttributeMap &attribs) override; SurfaceImpl *createPbufferFromClientBuffer(const egl::SurfaceState &state, const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) override; SurfaceImpl *createPixmapSurface(const egl::SurfaceState &state, const egl::Config *configuration, diff --git a/gfx/angle/src/libANGLE/renderer/gl/renderergl_utils.cpp b/gfx/angle/src/libANGLE/renderer/gl/renderergl_utils.cpp index 504a787f8..87fd24a61 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/renderergl_utils.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/renderergl_utils.cpp @@ -11,8 +11,6 @@ #include -#include "common/mathutil.h" -#include "libANGLE/Buffer.h" #include "libANGLE/Caps.h" #include "libANGLE/formatutils.h" #include "libANGLE/renderer/gl/FunctionsGL.h" @@ -22,8 +20,6 @@ #include #include -using angle::CheckedNumeric; - namespace rx { VendorID GetVendorID(const FunctionsGL *functions) @@ -871,81 +867,35 @@ void GenerateCaps(const FunctionsGL *functions, gl::Caps *caps, gl::TextureCapsM functions->isAtLeastGLES(gl::Version(3, 1)); extensions->pathRendering = canEnableGLPathRendering || canEnableESPathRendering; - - extensions->textureSRGBDecode = functions->hasGLExtension("GL_EXT_texture_sRGB_decode") || - functions->hasGLESExtension("GL_EXT_texture_sRGB_decode"); - -#if defined(ANGLE_PLATFORM_APPLE) - VendorID vendor = GetVendorID(functions); - if ((IsAMD(vendor) || IsIntel(vendor)) && *maxSupportedESVersion >= gl::Version(3, 0)) - { - // Apple Intel/AMD drivers do not correctly use the TEXTURE_SRGB_DECODE property of sampler - // states. Disable this extension when we would advertise any ES version that has samplers. - extensions->textureSRGBDecode = false; - } -#endif - - extensions->sRGBWriteControl = functions->isAtLeastGL(gl::Version(3, 0)) || - functions->hasGLExtension("GL_EXT_framebuffer_sRGB") || - functions->hasGLExtension("GL_ARB_framebuffer_sRGB") || - functions->hasGLESExtension("GL_EXT_sRGB_write_control"); - -#if defined(ANGLE_PLATFORM_ANDROID) - // SRGB blending does not appear to work correctly on the Nexus 5. Writing to an SRGB - // framebuffer with GL_FRAMEBUFFER_SRGB enabled and then reading back returns the same value. - // Disabling GL_FRAMEBUFFER_SRGB will then convert in the wrong direction. - extensions->sRGBWriteControl = false; -#endif } void GenerateWorkarounds(const FunctionsGL *functions, WorkaroundsGL *workarounds) { VendorID vendor = GetVendorID(functions); - workarounds->dontRemoveInvariantForFragmentInput = - functions->standard == STANDARD_GL_DESKTOP && IsAMD(vendor); - // Don't use 1-bit alpha formats on desktop GL with AMD or Intel drivers. workarounds->avoid1BitAlphaTextureFormats = - functions->standard == STANDARD_GL_DESKTOP && (IsAMD(vendor) || IsIntel(vendor)); + functions->standard == STANDARD_GL_DESKTOP && + (vendor == VENDOR_ID_AMD || vendor == VENDOR_ID_INTEL); workarounds->rgba4IsNotSupportedForColorRendering = - functions->standard == STANDARD_GL_DESKTOP && IsIntel(vendor); - - workarounds->emulateAbsIntFunction = IsIntel(vendor); - - workarounds->addAndTrueToLoopCondition = IsIntel(vendor); - - workarounds->emulateIsnanFloat = IsIntel(vendor); + functions->standard == STANDARD_GL_DESKTOP && vendor == VENDOR_ID_INTEL; workarounds->doesSRGBClearsOnLinearFramebufferAttachments = - functions->standard == STANDARD_GL_DESKTOP && (IsIntel(vendor) || IsAMD(vendor)); + functions->standard == STANDARD_GL_DESKTOP && + (vendor == VENDOR_ID_INTEL || vendor == VENDOR_ID_AMD); #if defined(ANGLE_PLATFORM_APPLE) workarounds->doWhileGLSLCausesGPUHang = true; - workarounds->useUnusedBlocksWithStandardOrSharedLayout = true; #endif workarounds->finishDoesNotCauseQueriesToBeAvailable = - functions->standard == STANDARD_GL_DESKTOP && IsNvidia(vendor); + functions->standard == STANDARD_GL_DESKTOP && vendor == VENDOR_ID_NVIDIA; // TODO(cwallez): Disable this workaround for MacOSX versions 10.9 or later. workarounds->alwaysCallUseProgramAfterLink = true; - workarounds->unpackOverlappingRowsSeparatelyUnpackBuffer = IsNvidia(vendor); - workarounds->packOverlappingRowsSeparatelyPackBuffer = IsNvidia(vendor); - - workarounds->initializeCurrentVertexAttributes = IsNvidia(vendor); - -#if defined(ANGLE_PLATFORM_APPLE) - workarounds->unpackLastRowSeparatelyForPaddingInclusion = true; - workarounds->packLastRowSeparatelyForPaddingInclusion = true; -#else - workarounds->unpackLastRowSeparatelyForPaddingInclusion = IsNvidia(vendor); - workarounds->packLastRowSeparatelyForPaddingInclusion = IsNvidia(vendor); -#endif - - workarounds->removeInvariantAndCentroidForESSL3 = functions->isAtMostGL(gl::Version(4, 1)); + workarounds->unpackOverlappingRowsSeparatelyUnpackBuffer = vendor == VENDOR_ID_NVIDIA; } } @@ -1001,45 +951,4 @@ uint8_t *MapBufferRangeWithFallback(const FunctionsGL *functions, return nullptr; } } - -gl::ErrorOrResult ShouldApplyLastRowPaddingWorkaround(const gl::Extents &size, - const gl::PixelStoreStateBase &state, - GLenum format, - GLenum type, - bool is3D, - const void *pixels) -{ - if (state.pixelBuffer.get() == nullptr) - { - return false; - } - - // We are using an pack or unpack buffer, compute what the driver thinks is going to be the - // last byte read or written. If it is past the end of the buffer, we will need to use the - // workaround otherwise the driver will generate INVALID_OPERATION and not do the operation. - CheckedNumeric checkedEndByte; - CheckedNumeric pixelBytes; - size_t rowPitch; - - const gl::InternalFormat &glFormat = - gl::GetInternalFormatInfo(gl::GetSizedInternalFormat(format, type)); - ANGLE_TRY_RESULT(glFormat.computePackUnpackEndByte(size, state, is3D), checkedEndByte); - ANGLE_TRY_RESULT(glFormat.computeRowPitch(size.width, state.alignment, state.rowLength), - rowPitch); - pixelBytes = glFormat.pixelBytes; - - checkedEndByte += reinterpret_cast(pixels); - - // At this point checkedEndByte is the actual last byte read. - // The driver adds an extra row padding (if any), mimic it. - ANGLE_TRY_CHECKED_MATH(pixelBytes); - if (pixelBytes.ValueOrDie() * size.width < rowPitch) - { - checkedEndByte += rowPitch - pixelBytes * size.width; - } - - ANGLE_TRY_CHECKED_MATH(checkedEndByte); - - return checkedEndByte.ValueOrDie() > static_cast(state.pixelBuffer->getSize()); -} } diff --git a/gfx/angle/src/libANGLE/renderer/gl/renderergl_utils.h b/gfx/angle/src/libANGLE/renderer/gl/renderergl_utils.h index 1e9338fb5..3b0cab27e 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/renderergl_utils.h +++ b/gfx/angle/src/libANGLE/renderer/gl/renderergl_utils.h @@ -11,8 +11,6 @@ #define LIBANGLE_RENDERER_GL_RENDERERGLUTILS_H_ #include "libANGLE/angletypes.h" -#include "libANGLE/Error.h" -#include "libANGLE/renderer/driver_utils.h" #include "libANGLE/renderer/gl/functionsgl_typedefs.h" #include @@ -49,13 +47,6 @@ uint8_t *MapBufferRangeWithFallback(const FunctionsGL *functions, size_t offset, size_t length, GLbitfield access); - -gl::ErrorOrResult ShouldApplyLastRowPaddingWorkaround(const gl::Extents &size, - const gl::PixelStoreStateBase &state, - GLenum format, - GLenum type, - bool is3D, - const void *pixels); } #endif // LIBANGLE_RENDERER_GL_RENDERERGLUTILS_H_ diff --git a/gfx/angle/src/libANGLE/renderer/gl/wgl/D3DTextureSurfaceWGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/wgl/D3DTextureSurfaceWGL.cpp deleted file mode 100644 index f19e8fdf3..000000000 --- a/gfx/angle/src/libANGLE/renderer/gl/wgl/D3DTextureSurfaceWGL.cpp +++ /dev/null @@ -1,384 +0,0 @@ -// -// Copyright (c) 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. -// - -// D3DTextureSurfaceWGL.cpp: WGL implementation of egl::Surface for D3D texture interop. - -#include "libANGLE/renderer/gl/wgl/D3DTextureSurfaceWGL.h" - -#include "libANGLE/renderer/gl/FramebufferGL.h" -#include "libANGLE/renderer/gl/TextureGL.h" -#include "libANGLE/renderer/gl/RendererGL.h" -#include "libANGLE/renderer/gl/StateManagerGL.h" -#include "libANGLE/renderer/gl/wgl/DisplayWGL.h" -#include "libANGLE/renderer/gl/wgl/FunctionsWGL.h" - -namespace rx -{ - -namespace -{ - -egl::Error GetD3DTextureInfo(EGLClientBuffer clientBuffer, - size_t *width, - size_t *height, - IUnknown **object, - IUnknown **device) -{ - IUnknown *buffer = static_cast(clientBuffer); - - IDirect3DTexture9 *texture9 = nullptr; - ID3D11Texture2D *texture11 = nullptr; - if (SUCCEEDED(buffer->QueryInterface(&texture11))) - { - D3D11_TEXTURE2D_DESC textureDesc; - texture11->GetDesc(&textureDesc); - - // From table egl.restrictions in EGL_ANGLE_d3d_texture_client_buffer. - switch (textureDesc.Format) - { - case DXGI_FORMAT_R8G8B8A8_UNORM: - case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB: - case DXGI_FORMAT_B8G8R8A8_UNORM: - case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB: - case DXGI_FORMAT_R16G16B16A16_FLOAT: - case DXGI_FORMAT_R32G32B32A32_FLOAT: - break; - - default: - SafeRelease(texture11); - return egl::Error(EGL_BAD_PARAMETER, "Unknown client buffer texture format: %u.", - textureDesc.Format); - } - - ID3D11Device *d3d11Device = nullptr; - texture11->GetDevice(&d3d11Device); - if (d3d11Device == nullptr) - { - SafeRelease(texture11); - return egl::Error(EGL_BAD_PARAMETER, - "Could not query the D3D11 device from the client buffer."); - } - - if (width) - { - *width = textureDesc.Width; - } - if (height) - { - *height = textureDesc.Height; - } - - if (device) - { - *device = d3d11Device; - } - else - { - SafeRelease(d3d11Device); - } - - if (object) - { - *object = texture11; - } - else - { - SafeRelease(texture11); - } - - return egl::Error(EGL_SUCCESS); - } - else if (SUCCEEDED(buffer->QueryInterface(&texture9))) - { - D3DSURFACE_DESC surfaceDesc; - if (FAILED(texture9->GetLevelDesc(0, &surfaceDesc))) - { - SafeRelease(texture9); - return egl::Error(EGL_BAD_PARAMETER, - "Could not query description of the D3D9 surface."); - } - - // From table egl.restrictions in EGL_ANGLE_d3d_texture_client_buffer. - switch (surfaceDesc.Format) - { - case D3DFMT_R8G8B8: - case D3DFMT_A8R8G8B8: - case D3DFMT_A16B16G16R16F: - case D3DFMT_A32B32G32R32F: - break; - - default: - SafeRelease(texture9); - return egl::Error(EGL_BAD_PARAMETER, "Unknown client buffer texture format: %u.", - surfaceDesc.Format); - } - - if (width) - { - *width = surfaceDesc.Width; - } - if (height) - { - *height = surfaceDesc.Height; - } - - IDirect3DDevice9 *d3d9Device = nullptr; - HRESULT result = texture9->GetDevice(&d3d9Device); - if (FAILED(result)) - { - SafeRelease(texture9); - return egl::Error(EGL_BAD_PARAMETER, - "Could not query the D3D9 device from the client buffer."); - } - - if (device) - { - *device = d3d9Device; - } - else - { - SafeRelease(d3d9Device); - } - - if (object) - { - *object = texture9; - } - else - { - SafeRelease(texture9); - } - - return egl::Error(EGL_SUCCESS); - } - else - { - return egl::Error(EGL_BAD_PARAMETER, - "Provided buffer is not a IDirect3DTexture9 or ID3D11Texture2D."); - } -} - -} // anonymous namespace - -D3DTextureSurfaceWGL::D3DTextureSurfaceWGL(const egl::SurfaceState &state, - RendererGL *renderer, - EGLClientBuffer clientBuffer, - DisplayWGL *display, - HGLRC wglContext, - HDC deviceContext, - const FunctionsGL *functionsGL, - const FunctionsWGL *functionsWGL) - : SurfaceGL(state, renderer), - mClientBuffer(clientBuffer), - mRenderer(renderer), - mDisplay(display), - mStateManager(renderer->getStateManager()), - mWorkarounds(renderer->getWorkarounds()), - mFunctionsGL(functionsGL), - mFunctionsWGL(functionsWGL), - mWGLContext(wglContext), - mDeviceContext(deviceContext), - mWidth(0), - mHeight(0), - mDeviceHandle(nullptr), - mObject(nullptr), - mBoundObjectTextureHandle(nullptr), - mBoundObjectRenderbufferHandle(nullptr), - mRenderbufferID(0), - mFramebufferID(0) -{ -} - -D3DTextureSurfaceWGL::~D3DTextureSurfaceWGL() -{ - ASSERT(mBoundObjectTextureHandle == nullptr); - - SafeRelease(mObject); - - if (mDeviceHandle) - { - if (mBoundObjectRenderbufferHandle) - { - mFunctionsWGL->dxUnregisterObjectNV(mDeviceHandle, mBoundObjectRenderbufferHandle); - mBoundObjectRenderbufferHandle = nullptr; - } - mStateManager->deleteRenderbuffer(mRenderbufferID); - - if (mBoundObjectTextureHandle) - { - mFunctionsWGL->dxUnregisterObjectNV(mDeviceHandle, mBoundObjectTextureHandle); - mBoundObjectTextureHandle = nullptr; - } - - // GL framebuffer is deleted by the default framebuffer object - mFramebufferID = 0; - - mDisplay->releaseD3DDevice(mDeviceHandle); - mDeviceHandle = nullptr; - } -} - -egl::Error D3DTextureSurfaceWGL::ValidateD3DTextureClientBuffer(EGLClientBuffer clientBuffer) -{ - return GetD3DTextureInfo(clientBuffer, nullptr, nullptr, nullptr, nullptr); -} - -egl::Error D3DTextureSurfaceWGL::initialize() -{ - IUnknown *device = nullptr; - ANGLE_TRY(GetD3DTextureInfo(mClientBuffer, &mWidth, &mHeight, &mObject, &device)); - - ASSERT(device != nullptr); - egl::Error error = mDisplay->registerD3DDevice(device, &mDeviceHandle); - SafeRelease(device); - if (error.isError()) - { - return error; - } - - mFunctionsGL->genRenderbuffers(1, &mRenderbufferID); - mStateManager->bindRenderbuffer(GL_RENDERBUFFER, mRenderbufferID); - mBoundObjectRenderbufferHandle = mFunctionsWGL->dxRegisterObjectNV( - mDeviceHandle, mObject, mRenderbufferID, GL_RENDERBUFFER, WGL_ACCESS_READ_WRITE_NV); - if (mBoundObjectRenderbufferHandle == nullptr) - { - return egl::Error(EGL_BAD_ALLOC, "Failed to register D3D object, error: 0x%08x.", - HRESULT_CODE(GetLastError())); - } - - mFunctionsGL->genFramebuffers(1, &mFramebufferID); - mStateManager->bindFramebuffer(GL_FRAMEBUFFER, mFramebufferID); - mFunctionsGL->framebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, - mRenderbufferID); - - return egl::Error(EGL_SUCCESS); -} - -egl::Error D3DTextureSurfaceWGL::makeCurrent() -{ - if (!mFunctionsWGL->makeCurrent(mDeviceContext, mWGLContext)) - { - // TODO(geofflang): What error type here? - return egl::Error(EGL_CONTEXT_LOST, "Failed to make the WGL context current."); - } - - if (!mFunctionsWGL->dxLockObjectsNV(mDeviceHandle, 1, &mBoundObjectRenderbufferHandle)) - { - DWORD error = GetLastError(); - return egl::Error(EGL_BAD_ALLOC, "Failed to lock object, error: 0x%08x.", - HRESULT_CODE(error)); - } - - return egl::Error(EGL_SUCCESS); -} - -egl::Error D3DTextureSurfaceWGL::unMakeCurrent() -{ - if (!mFunctionsWGL->dxUnlockObjectsNV(mDeviceHandle, 1, &mBoundObjectRenderbufferHandle)) - { - DWORD error = GetLastError(); - return egl::Error(EGL_BAD_ALLOC, "Failed to unlock object, error: 0x%08x.", - HRESULT_CODE(error)); - } - - return egl::Error(EGL_SUCCESS); -} - -egl::Error D3DTextureSurfaceWGL::swap() -{ - return egl::Error(EGL_SUCCESS); -} - -egl::Error D3DTextureSurfaceWGL::postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height) -{ - UNIMPLEMENTED(); - return egl::Error(EGL_SUCCESS); -} - -egl::Error D3DTextureSurfaceWGL::querySurfacePointerANGLE(EGLint attribute, void **value) -{ - UNIMPLEMENTED(); - return egl::Error(EGL_SUCCESS); -} - -egl::Error D3DTextureSurfaceWGL::bindTexImage(gl::Texture *texture, EGLint buffer) -{ - ASSERT(mBoundObjectTextureHandle == nullptr); - - const TextureGL *textureGL = GetImplAs(texture); - GLuint textureID = textureGL->getTextureID(); - - mBoundObjectTextureHandle = mFunctionsWGL->dxRegisterObjectNV( - mDeviceHandle, mObject, textureID, GL_TEXTURE_2D, WGL_ACCESS_READ_WRITE_NV); - if (mBoundObjectTextureHandle == nullptr) - { - DWORD error = GetLastError(); - return egl::Error(EGL_BAD_ALLOC, "Failed to register D3D object, error: 0x%08x.", - HRESULT_CODE(error)); - } - - if (!mFunctionsWGL->dxLockObjectsNV(mDeviceHandle, 1, &mBoundObjectTextureHandle)) - { - DWORD error = GetLastError(); - return egl::Error(EGL_BAD_ALLOC, "Failed to lock object, error: 0x%08x.", - HRESULT_CODE(error)); - } - - return egl::Error(EGL_SUCCESS); -} - -egl::Error D3DTextureSurfaceWGL::releaseTexImage(EGLint buffer) -{ - ASSERT(mBoundObjectTextureHandle != nullptr); - if (!mFunctionsWGL->dxUnlockObjectsNV(mDeviceHandle, 1, &mBoundObjectTextureHandle)) - { - DWORD error = GetLastError(); - return egl::Error(EGL_BAD_ALLOC, "Failed to unlock object, error: 0x%08x.", - HRESULT_CODE(error)); - } - - if (!mFunctionsWGL->dxUnregisterObjectNV(mDeviceHandle, mBoundObjectTextureHandle)) - { - DWORD error = GetLastError(); - return egl::Error(EGL_BAD_ALLOC, "Failed to unregister D3D object, error: 0x%08x.", - HRESULT_CODE(error)); - } - mBoundObjectTextureHandle = nullptr; - - return egl::Error(EGL_SUCCESS); -} - -void D3DTextureSurfaceWGL::setSwapInterval(EGLint interval) -{ - UNIMPLEMENTED(); -} - -EGLint D3DTextureSurfaceWGL::getWidth() const -{ - return static_cast(mWidth); -} - -EGLint D3DTextureSurfaceWGL::getHeight() const -{ - return static_cast(mHeight); -} - -EGLint D3DTextureSurfaceWGL::isPostSubBufferSupported() const -{ - return EGL_FALSE; -} - -EGLint D3DTextureSurfaceWGL::getSwapBehavior() const -{ - return EGL_BUFFER_PRESERVED; -} - -FramebufferImpl *D3DTextureSurfaceWGL::createDefaultFramebuffer(const gl::FramebufferState &data) -{ - return new FramebufferGL(mFramebufferID, data, mFunctionsGL, mWorkarounds, - mRenderer->getBlitter(), mStateManager); -} -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/gl/wgl/D3DTextureSurfaceWGL.h b/gfx/angle/src/libANGLE/renderer/gl/wgl/D3DTextureSurfaceWGL.h deleted file mode 100644 index 8fb1d4003..000000000 --- a/gfx/angle/src/libANGLE/renderer/gl/wgl/D3DTextureSurfaceWGL.h +++ /dev/null @@ -1,86 +0,0 @@ - -// Copyright (c) 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. -// - -// D3DTextureSurfaceWGL.h: WGL implementation of egl::Surface for D3D texture interop. - -#ifndef LIBANGLE_RENDERER_GL_WGL_D3DTEXTIRESURFACEWGL_H_ -#define LIBANGLE_RENDERER_GL_WGL_D3DTEXTIRESURFACEWGL_H_ - -#include "libANGLE/renderer/gl/SurfaceGL.h" - -#include - -namespace rx -{ - -class FunctionsGL; -class FunctionsWGL; -class DisplayWGL; -class StateManagerGL; -struct WorkaroundsGL; - -class D3DTextureSurfaceWGL : public SurfaceGL -{ - public: - D3DTextureSurfaceWGL(const egl::SurfaceState &state, - RendererGL *renderer, - EGLClientBuffer clientBuffer, - DisplayWGL *display, - HGLRC wglContext, - HDC deviceContext, - const FunctionsGL *functionsGL, - const FunctionsWGL *functionsWGL); - ~D3DTextureSurfaceWGL() override; - - static egl::Error ValidateD3DTextureClientBuffer(EGLClientBuffer clientBuffer); - - egl::Error initialize() override; - egl::Error makeCurrent() override; - egl::Error unMakeCurrent() override; - - egl::Error swap() override; - egl::Error postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height) override; - egl::Error querySurfacePointerANGLE(EGLint attribute, void **value) override; - egl::Error bindTexImage(gl::Texture *texture, EGLint buffer) override; - egl::Error releaseTexImage(EGLint buffer) override; - void setSwapInterval(EGLint interval) override; - - EGLint getWidth() const override; - EGLint getHeight() const override; - - EGLint isPostSubBufferSupported() const override; - EGLint getSwapBehavior() const override; - - FramebufferImpl *createDefaultFramebuffer(const gl::FramebufferState &data) override; - - private: - EGLClientBuffer mClientBuffer; - - RendererGL *mRenderer; - - DisplayWGL *mDisplay; - StateManagerGL *mStateManager; - const WorkaroundsGL &mWorkarounds; - const FunctionsGL *mFunctionsGL; - const FunctionsWGL *mFunctionsWGL; - - HGLRC mWGLContext; - HDC mDeviceContext; - - size_t mWidth; - size_t mHeight; - - HANDLE mDeviceHandle; - IUnknown *mObject; - HANDLE mBoundObjectTextureHandle; - HANDLE mBoundObjectRenderbufferHandle; - - GLuint mRenderbufferID; - GLuint mFramebufferID; -}; -} // namespace rx - -#endif // LIBANGLE_RENDERER_GL_WGL_D3DTEXTIRESURFACEWGL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/gl/wgl/DXGISwapChainWindowSurfaceWGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/wgl/DXGISwapChainWindowSurfaceWGL.cpp index 7c5214e82..e07457d10 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/wgl/DXGISwapChainWindowSurfaceWGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/wgl/DXGISwapChainWindowSurfaceWGL.cpp @@ -36,7 +36,6 @@ DXGISwapChainWindowSurfaceWGL::DXGISwapChainWindowSurfaceWGL(const egl::SurfaceS mWindow(window), mStateManager(renderer->getStateManager()), mWorkarounds(renderer->getWorkarounds()), - mRenderer(renderer), mFunctionsGL(functionsGL), mFunctionsWGL(functionsWGL), mDevice(device), @@ -293,8 +292,7 @@ EGLint DXGISwapChainWindowSurfaceWGL::getSwapBehavior() const FramebufferImpl *DXGISwapChainWindowSurfaceWGL::createDefaultFramebuffer( const gl::FramebufferState &data) { - return new FramebufferGL(mFramebufferID, data, mFunctionsGL, mWorkarounds, - mRenderer->getBlitter(), mStateManager); + return new FramebufferGL(mFramebufferID, data, mFunctionsGL, mWorkarounds, mStateManager); } egl::Error DXGISwapChainWindowSurfaceWGL::setObjectsLocked(bool locked) diff --git a/gfx/angle/src/libANGLE/renderer/gl/wgl/DXGISwapChainWindowSurfaceWGL.h b/gfx/angle/src/libANGLE/renderer/gl/wgl/DXGISwapChainWindowSurfaceWGL.h index f516239c9..66444da9b 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/wgl/DXGISwapChainWindowSurfaceWGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/wgl/DXGISwapChainWindowSurfaceWGL.h @@ -66,7 +66,6 @@ class DXGISwapChainWindowSurfaceWGL : public SurfaceGL StateManagerGL *mStateManager; const WorkaroundsGL &mWorkarounds; - RendererGL *mRenderer; const FunctionsGL *mFunctionsGL; const FunctionsWGL *mFunctionsWGL; diff --git a/gfx/angle/src/libANGLE/renderer/gl/wgl/DisplayWGL.cpp b/gfx/angle/src/libANGLE/renderer/gl/wgl/DisplayWGL.cpp index 188321115..4647fe589 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/wgl/DisplayWGL.cpp +++ b/gfx/angle/src/libANGLE/renderer/gl/wgl/DisplayWGL.cpp @@ -14,15 +14,12 @@ #include "libANGLE/Surface.h" #include "libANGLE/renderer/gl/RendererGL.h" #include "libANGLE/renderer/gl/renderergl_utils.h" -#include "libANGLE/renderer/gl/wgl/D3DTextureSurfaceWGL.h" #include "libANGLE/renderer/gl/wgl/DXGISwapChainWindowSurfaceWGL.h" #include "libANGLE/renderer/gl/wgl/FunctionsWGL.h" #include "libANGLE/renderer/gl/wgl/PbufferSurfaceWGL.h" #include "libANGLE/renderer/gl/wgl/WindowSurfaceWGL.h" #include "libANGLE/renderer/gl/wgl/wgl_utils.h" -#include "platform/Platform.h" - #include #include #include @@ -63,7 +60,7 @@ DisplayWGL::DisplayWGL() mOpenGLModule(nullptr), mFunctionsWGL(nullptr), mFunctionsGL(nullptr), - mHasRobustness(false), + mHasARBCreateContextRobustness(false), mWindowClass(0), mWindow(nullptr), mDeviceContext(nullptr), @@ -178,7 +175,7 @@ egl::Error DisplayWGL::initialize(egl::Display *display) // Reinitialize the wgl functions to grab the extensions mFunctionsWGL->initialize(mOpenGLModule, dummyDeviceContext); - bool hasWGLCreateContextRobustness = + mHasARBCreateContextRobustness = mFunctionsWGL->hasExtension("WGL_ARB_create_context_robustness"); // Destroy the dummy window and context @@ -267,7 +264,7 @@ egl::Error DisplayWGL::initialize(egl::Display *display) std::vector contextCreationAttributes; - if (hasWGLCreateContextRobustness) + if (mHasARBCreateContextRobustness) { contextCreationAttributes.push_back(WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB); contextCreationAttributes.push_back(WGL_LOSE_CONTEXT_ON_RESET_ARB); @@ -343,17 +340,9 @@ egl::Error DisplayWGL::initialize(egl::Display *display) mFunctionsGL = new FunctionsGLWindows(mOpenGLModule, mFunctionsWGL->getProcAddress); mFunctionsGL->initialize(); - mHasRobustness = mFunctionsGL->getGraphicsResetStatus != nullptr; - if (hasWGLCreateContextRobustness != mHasRobustness) - { - ANGLEPlatformCurrent()->logWarning( - "WGL_ARB_create_context_robustness exists but unable to OpenGL context with " - "robustness."); - } - // Intel OpenGL ES drivers are not currently supported due to bugs in the driver and ANGLE VendorID vendor = GetVendorID(mFunctionsGL); - if (requestedDisplayType == EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE && IsIntel(vendor)) + if (requestedDisplayType == EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE && vendor == VENDOR_ID_INTEL) { return egl::Error(EGL_NOT_INITIALIZED, "Intel OpenGL ES drivers are not supported."); } @@ -369,7 +358,7 @@ egl::Error DisplayWGL::initialize(egl::Display *display) GetWindowThreadProcessId(nativeWindow, &windowProcessId); // AMD drivers advertise the WGL_NV_DX_interop and WGL_NV_DX_interop2 extensions but fail - mUseDXGISwapChains = !IsAMD(vendor) && (currentProcessId != windowProcessId); + mUseDXGISwapChains = vendor != VENDOR_ID_AMD && (currentProcessId != windowProcessId); } else { @@ -465,13 +454,11 @@ SurfaceImpl *DisplayWGL::createPbufferSurface(const egl::SurfaceState &state, SurfaceImpl *DisplayWGL::createPbufferFromClientBuffer(const egl::SurfaceState &state, const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) { - ASSERT(buftype == EGL_D3D_TEXTURE_ANGLE); - return new D3DTextureSurfaceWGL(state, getRenderer(), clientBuffer, this, mWGLContext, - mDeviceContext, mFunctionsGL, mFunctionsWGL); + UNIMPLEMENTED(); + return nullptr; } SurfaceImpl *DisplayWGL::createPixmapSurface(const egl::SurfaceState &state, @@ -566,7 +553,7 @@ egl::ConfigSet DisplayWGL::generateConfigs() bool DisplayWGL::testDeviceLost() { - if (mHasRobustness) + if (mHasARBCreateContextRobustness) { return getRenderer()->getResetStatus() != GL_NO_ERROR; } @@ -584,21 +571,6 @@ bool DisplayWGL::isValidNativeWindow(EGLNativeWindowType window) const return (IsWindow(window) == TRUE); } -egl::Error DisplayWGL::validateClientBuffer(const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, - const egl::AttributeMap &attribs) const -{ - switch (buftype) - { - case EGL_D3D_TEXTURE_ANGLE: - return D3DTextureSurfaceWGL::ValidateD3DTextureClientBuffer(clientBuffer); - - default: - return DisplayGL::validateClientBuffer(configuration, buftype, clientBuffer, attribs); - } -} - std::string DisplayWGL::getVendorString() const { //UNIMPLEMENTED(); @@ -661,9 +633,7 @@ void DisplayWGL::generateExtensions(egl::DisplayExtensions *outExtensions) const outExtensions->postSubBuffer = mUseDXGISwapChains; outExtensions->surfaceOrientation = mUseDXGISwapChains; - outExtensions->createContextRobustness = mHasRobustness; - - outExtensions->d3dTextureClientBuffer = mFunctionsWGL->hasExtension("WGL_NV_DX_interop2"); + outExtensions->createContextRobustness = mHasARBCreateContextRobustness; } void DisplayWGL::generateCaps(egl::Caps *outCaps) const diff --git a/gfx/angle/src/libANGLE/renderer/gl/wgl/DisplayWGL.h b/gfx/angle/src/libANGLE/renderer/gl/wgl/DisplayWGL.h index 509ea9b39..3f56ecf4f 100755 --- a/gfx/angle/src/libANGLE/renderer/gl/wgl/DisplayWGL.h +++ b/gfx/angle/src/libANGLE/renderer/gl/wgl/DisplayWGL.h @@ -37,8 +37,7 @@ class DisplayWGL : public DisplayGL const egl::AttributeMap &attribs) override; SurfaceImpl *createPbufferFromClientBuffer(const egl::SurfaceState &state, const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) override; SurfaceImpl *createPixmapSurface(const egl::SurfaceState &state, const egl::Config *configuration, @@ -51,10 +50,6 @@ class DisplayWGL : public DisplayGL egl::Error restoreLostDevice() override; bool isValidNativeWindow(EGLNativeWindowType window) const override; - egl::Error validateClientBuffer(const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, - const egl::AttributeMap &attribs) const override; egl::Error getDevice(DeviceImpl **device) override; @@ -83,7 +78,7 @@ class DisplayWGL : public DisplayGL FunctionsWGL *mFunctionsWGL; FunctionsGL *mFunctionsGL; - bool mHasRobustness; + bool mHasARBCreateContextRobustness; ATOM mWindowClass; HWND mWindow; diff --git a/gfx/angle/src/libANGLE/renderer/null/BufferNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/BufferNULL.cpp deleted file mode 100644 index 95463c3f4..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/BufferNULL.cpp +++ /dev/null @@ -1,74 +0,0 @@ -// -// Copyright 2016 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. -// -// BufferNULL.cpp: -// Implements the class methods for BufferNULL. -// - -#include "libANGLE/renderer/null/BufferNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -BufferNULL::BufferNULL(const gl::BufferState &state) : BufferImpl(state) -{ -} - -BufferNULL::~BufferNULL() -{ -} - -gl::Error BufferNULL::setData(GLenum target, const void *data, size_t size, GLenum usage) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error BufferNULL::setSubData(GLenum target, const void *data, size_t size, size_t offset) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error BufferNULL::copySubData(BufferImpl *source, - GLintptr sourceOffset, - GLintptr destOffset, - GLsizeiptr size) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error BufferNULL::map(GLenum access, GLvoid **mapPtr) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error BufferNULL::mapRange(size_t offset, size_t length, GLbitfield access, GLvoid **mapPtr) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error BufferNULL::unmap(GLboolean *result) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error BufferNULL::getIndexRange(GLenum type, - size_t offset, - size_t count, - bool primitiveRestartEnabled, - gl::IndexRange *outRange) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/BufferNULL.h b/gfx/angle/src/libANGLE/renderer/null/BufferNULL.h deleted file mode 100644 index 1578dacbb..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/BufferNULL.h +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright 2016 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. -// -// BufferNULL.h: -// Defines the class interface for BufferNULL, implementing BufferImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_BUFFERNULL_H_ -#define LIBANGLE_RENDERER_NULL_BUFFERNULL_H_ - -#include "libANGLE/renderer/BufferImpl.h" - -namespace rx -{ - -class BufferNULL : public BufferImpl -{ - public: - BufferNULL(const gl::BufferState &state); - ~BufferNULL() override; - - gl::Error setData(GLenum target, const void *data, size_t size, GLenum usage) override; - gl::Error setSubData(GLenum target, const void *data, size_t size, size_t offset) override; - gl::Error copySubData(BufferImpl *source, - GLintptr sourceOffset, - GLintptr destOffset, - GLsizeiptr size) override; - gl::Error map(GLenum access, GLvoid **mapPtr) override; - gl::Error mapRange(size_t offset, size_t length, GLbitfield access, GLvoid **mapPtr) override; - gl::Error unmap(GLboolean *result) override; - - gl::Error getIndexRange(GLenum type, - size_t offset, - size_t count, - bool primitiveRestartEnabled, - gl::IndexRange *outRange) override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_BUFFERNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/CompilerNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/CompilerNULL.cpp deleted file mode 100644 index 547f4c4e1..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/CompilerNULL.cpp +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright 2016 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. -// -// CompilerNULL.cpp: -// Implements the class methods for CompilerNULL. -// - -#include "libANGLE/renderer/null/CompilerNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -CompilerNULL::CompilerNULL() : CompilerImpl() -{ -} - -CompilerNULL::~CompilerNULL() -{ -} - -gl::Error CompilerNULL::release() -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -ShShaderOutput CompilerNULL::getTranslatorOutputType() const -{ - UNIMPLEMENTED(); - return ShShaderOutput(); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/CompilerNULL.h b/gfx/angle/src/libANGLE/renderer/null/CompilerNULL.h deleted file mode 100644 index 5cd85e8bf..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/CompilerNULL.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright 2016 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. -// -// CompilerNULL.h: -// Defines the class interface for CompilerNULL, implementing CompilerImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_COMPILERNULL_H_ -#define LIBANGLE_RENDERER_NULL_COMPILERNULL_H_ - -#include "libANGLE/renderer/CompilerImpl.h" - -namespace rx -{ - -class CompilerNULL : public CompilerImpl -{ - public: - CompilerNULL(); - ~CompilerNULL() override; - - gl::Error release() override; - - // TODO(jmadill): Expose translator built-in resources init method. - ShShaderOutput getTranslatorOutputType() const override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_COMPILERNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/ContextNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/ContextNULL.cpp deleted file mode 100644 index 95d4c046a..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/ContextNULL.cpp +++ /dev/null @@ -1,175 +0,0 @@ -// -// Copyright 2016 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. -// -// ContextNULL.cpp: -// Implements the class methods for ContextNULL. -// - -#include "libANGLE/renderer/null/ContextNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -ContextNULL::ContextNULL(const gl::ContextState &state) : ContextImpl(state) -{ -} - -ContextNULL::~ContextNULL() -{ -} - -gl::Error ContextNULL::initialize() -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error ContextNULL::flush() -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error ContextNULL::finish() -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error ContextNULL::drawArrays(GLenum mode, GLint first, GLsizei count) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error ContextNULL::drawArraysInstanced(GLenum mode, - GLint first, - GLsizei count, - GLsizei instanceCount) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error ContextNULL::drawElements(GLenum mode, - GLsizei count, - GLenum type, - const GLvoid *indices, - const gl::IndexRange &indexRange) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error ContextNULL::drawElementsInstanced(GLenum mode, - GLsizei count, - GLenum type, - const GLvoid *indices, - GLsizei instances, - const gl::IndexRange &indexRange) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error ContextNULL::drawRangeElements(GLenum mode, - GLuint start, - GLuint end, - GLsizei count, - GLenum type, - const GLvoid *indices, - const gl::IndexRange &indexRange) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -CompilerImpl *ContextNULL::createCompiler() -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -ShaderImpl *ContextNULL::createShader(const gl::ShaderState &data) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -ProgramImpl *ContextNULL::createProgram(const gl::ProgramState &data) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -FramebufferImpl *ContextNULL::createFramebuffer(const gl::FramebufferState &data) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -TextureImpl *ContextNULL::createTexture(const gl::TextureState &state) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -RenderbufferImpl *ContextNULL::createRenderbuffer() -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -BufferImpl *ContextNULL::createBuffer(const gl::BufferState &state) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -VertexArrayImpl *ContextNULL::createVertexArray(const gl::VertexArrayState &data) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -QueryImpl *ContextNULL::createQuery(GLenum type) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -FenceNVImpl *ContextNULL::createFenceNV() -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -FenceSyncImpl *ContextNULL::createFenceSync() -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -TransformFeedbackImpl *ContextNULL::createTransformFeedback(const gl::TransformFeedbackState &state) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -SamplerImpl *ContextNULL::createSampler() -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -std::vector ContextNULL::createPaths(GLsizei range) -{ - UNIMPLEMENTED(); - return std::vector(); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/ContextNULL.h b/gfx/angle/src/libANGLE/renderer/null/ContextNULL.h deleted file mode 100644 index 9a7987b67..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/ContextNULL.h +++ /dev/null @@ -1,95 +0,0 @@ -// -// Copyright 2016 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. -// -// ContextNULL.h: -// Defines the class interface for ContextNULL, implementing ContextImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_CONTEXTNULL_H_ -#define LIBANGLE_RENDERER_NULL_CONTEXTNULL_H_ - -#include "libANGLE/renderer/ContextImpl.h" - -namespace rx -{ - -class ContextNULL : public ContextImpl -{ - public: - ContextNULL(const gl::ContextState &state); - ~ContextNULL() override; - - gl::Error initialize() override; - - // Flush and finish. - gl::Error flush() override; - gl::Error finish() override; - - // Drawing methods. - gl::Error drawArrays(GLenum mode, GLint first, GLsizei count) override; - gl::Error drawArraysInstanced(GLenum mode, - GLint first, - GLsizei count, - GLsizei instanceCount) override; - - gl::Error drawElements(GLenum mode, - GLsizei count, - GLenum type, - const GLvoid *indices, - const gl::IndexRange &indexRange) override; - gl::Error drawElementsInstanced(GLenum mode, - GLsizei count, - GLenum type, - const GLvoid *indices, - GLsizei instances, - const gl::IndexRange &indexRange) override; - gl::Error drawRangeElements(GLenum mode, - GLuint start, - GLuint end, - GLsizei count, - GLenum type, - const GLvoid *indices, - const gl::IndexRange &indexRange) override; - - // CHROMIUM_path_rendering path drawing methods. - - // Shader creation - CompilerImpl *createCompiler() override; - ShaderImpl *createShader(const gl::ShaderState &data) override; - ProgramImpl *createProgram(const gl::ProgramState &data) override; - - // Framebuffer creation - FramebufferImpl *createFramebuffer(const gl::FramebufferState &data) override; - - // Texture creation - TextureImpl *createTexture(const gl::TextureState &state) override; - - // Renderbuffer creation - RenderbufferImpl *createRenderbuffer() override; - - // Buffer creation - BufferImpl *createBuffer(const gl::BufferState &state) override; - - // Vertex Array creation - VertexArrayImpl *createVertexArray(const gl::VertexArrayState &data) override; - - // Query and Fence creation - QueryImpl *createQuery(GLenum type) override; - FenceNVImpl *createFenceNV() override; - FenceSyncImpl *createFenceSync() override; - - // Transform Feedback creation - TransformFeedbackImpl *createTransformFeedback( - const gl::TransformFeedbackState &state) override; - - // Sampler object creation - SamplerImpl *createSampler() override; - - std::vector createPaths(GLsizei range) override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_CONTEXTNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/DeviceNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/DeviceNULL.cpp deleted file mode 100644 index 4893f9466..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/DeviceNULL.cpp +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright 2016 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. -// -// DeviceNULL.cpp: -// Implements the class methods for DeviceNULL. -// - -#include "libANGLE/renderer/null/DeviceNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -DeviceNULL::DeviceNULL() : DeviceImpl() -{ -} - -DeviceNULL::~DeviceNULL() -{ -} - -egl::Error DeviceNULL::getDevice(void **outValue) -{ - UNIMPLEMENTED(); - return egl::Error(EGL_BAD_ACCESS); -} - -EGLint DeviceNULL::getType() -{ - UNIMPLEMENTED(); - return EGLint(); -} - -void DeviceNULL::generateExtensions(egl::DeviceExtensions *outExtensions) const -{ - UNIMPLEMENTED(); -} - -bool DeviceNULL::deviceExternallySourced() -{ - UNIMPLEMENTED(); - return bool(); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/DeviceNULL.h b/gfx/angle/src/libANGLE/renderer/null/DeviceNULL.h deleted file mode 100644 index ed921039e..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/DeviceNULL.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright 2016 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. -// -// DeviceNULL.h: -// Defines the class interface for DeviceNULL, implementing DeviceImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_DEVICENULL_H_ -#define LIBANGLE_RENDERER_NULL_DEVICENULL_H_ - -#include "libANGLE/renderer/DeviceImpl.h" - -namespace rx -{ - -class DeviceNULL : public DeviceImpl -{ - public: - DeviceNULL(); - ~DeviceNULL() override; - - egl::Error getDevice(void **outValue) override; - EGLint getType() override; - void generateExtensions(egl::DeviceExtensions *outExtensions) const override; - bool deviceExternallySourced() override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_DEVICENULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/DisplayNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/DisplayNULL.cpp deleted file mode 100644 index fc04e0465..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/DisplayNULL.cpp +++ /dev/null @@ -1,168 +0,0 @@ -// -// Copyright 2016 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. -// -// DisplayNULL.cpp: -// Implements the class methods for DisplayNULL. -// - -#include "libANGLE/renderer/null/DisplayNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -DisplayNULL::DisplayNULL() : DisplayImpl() -{ -} - -DisplayNULL::~DisplayNULL() -{ -} - -egl::Error DisplayNULL::initialize(egl::Display *display) -{ - UNIMPLEMENTED(); - return egl::Error(EGL_BAD_ACCESS); -} - -void DisplayNULL::terminate() -{ - UNIMPLEMENTED(); -} - -egl::Error DisplayNULL::makeCurrent(egl::Surface *drawSurface, - egl::Surface *readSurface, - gl::Context *context) -{ - UNIMPLEMENTED(); - return egl::Error(EGL_BAD_ACCESS); -} - -egl::ConfigSet DisplayNULL::generateConfigs() -{ - UNIMPLEMENTED(); - return egl::ConfigSet(); -} - -bool DisplayNULL::testDeviceLost() -{ - UNIMPLEMENTED(); - return bool(); -} - -egl::Error DisplayNULL::restoreLostDevice() -{ - UNIMPLEMENTED(); - return egl::Error(EGL_BAD_ACCESS); -} - -bool DisplayNULL::isValidNativeWindow(EGLNativeWindowType window) const -{ - UNIMPLEMENTED(); - return bool(); -} - -std::string DisplayNULL::getVendorString() const -{ - UNIMPLEMENTED(); - return std::string(); -} - -egl::Error DisplayNULL::getDevice(DeviceImpl **device) -{ - UNIMPLEMENTED(); - return egl::Error(EGL_BAD_ACCESS); -} - -egl::Error DisplayNULL::waitClient() const -{ - UNIMPLEMENTED(); - return egl::Error(EGL_BAD_ACCESS); -} - -egl::Error DisplayNULL::waitNative(EGLint engine, - egl::Surface *drawSurface, - egl::Surface *readSurface) const -{ - UNIMPLEMENTED(); - return egl::Error(EGL_BAD_ACCESS); -} - -gl::Version DisplayNULL::getMaxSupportedESVersion() const -{ - UNIMPLEMENTED(); - return gl::Version(); -} - -SurfaceImpl *DisplayNULL::createWindowSurface(const egl::SurfaceState &state, - const egl::Config *configuration, - EGLNativeWindowType window, - const egl::AttributeMap &attribs) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -SurfaceImpl *DisplayNULL::createPbufferSurface(const egl::SurfaceState &state, - const egl::Config *configuration, - const egl::AttributeMap &attribs) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -SurfaceImpl *DisplayNULL::createPbufferFromClientBuffer(const egl::SurfaceState &state, - const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer buffer, - const egl::AttributeMap &attribs) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -SurfaceImpl *DisplayNULL::createPixmapSurface(const egl::SurfaceState &state, - const egl::Config *configuration, - NativePixmapType nativePixmap, - const egl::AttributeMap &attribs) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -ImageImpl *DisplayNULL::createImage(EGLenum target, - egl::ImageSibling *buffer, - const egl::AttributeMap &attribs) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -ContextImpl *DisplayNULL::createContext(const gl::ContextState &state) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -StreamProducerImpl *DisplayNULL::createStreamProducerD3DTextureNV12( - egl::Stream::ConsumerType consumerType, - const egl::AttributeMap &attribs) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -void DisplayNULL::generateExtensions(egl::DisplayExtensions *outExtensions) const -{ - UNIMPLEMENTED(); -} - -void DisplayNULL::generateCaps(egl::Caps *outCaps) const -{ - UNIMPLEMENTED(); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/DisplayNULL.h b/gfx/angle/src/libANGLE/renderer/null/DisplayNULL.h deleted file mode 100644 index 5a453810a..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/DisplayNULL.h +++ /dev/null @@ -1,82 +0,0 @@ -// -// Copyright 2016 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. -// -// DisplayNULL.h: -// Defines the class interface for DisplayNULL, implementing DisplayImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_DISPLAYNULL_H_ -#define LIBANGLE_RENDERER_NULL_DISPLAYNULL_H_ - -#include "libANGLE/renderer/DisplayImpl.h" - -namespace rx -{ - -class DisplayNULL : public DisplayImpl -{ - public: - DisplayNULL(); - ~DisplayNULL() override; - - egl::Error initialize(egl::Display *display) override; - void terminate() override; - - egl::Error makeCurrent(egl::Surface *drawSurface, - egl::Surface *readSurface, - gl::Context *context) override; - - egl::ConfigSet generateConfigs() override; - - bool testDeviceLost() override; - egl::Error restoreLostDevice() override; - - bool isValidNativeWindow(EGLNativeWindowType window) const override; - - std::string getVendorString() const override; - - egl::Error getDevice(DeviceImpl **device) override; - - egl::Error waitClient() const override; - egl::Error waitNative(EGLint engine, - egl::Surface *drawSurface, - egl::Surface *readSurface) const override; - gl::Version getMaxSupportedESVersion() const override; - - SurfaceImpl *createWindowSurface(const egl::SurfaceState &state, - const egl::Config *configuration, - EGLNativeWindowType window, - const egl::AttributeMap &attribs) override; - SurfaceImpl *createPbufferSurface(const egl::SurfaceState &state, - const egl::Config *configuration, - const egl::AttributeMap &attribs) override; - SurfaceImpl *createPbufferFromClientBuffer(const egl::SurfaceState &state, - const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer buffer, - const egl::AttributeMap &attribs) override; - SurfaceImpl *createPixmapSurface(const egl::SurfaceState &state, - const egl::Config *configuration, - NativePixmapType nativePixmap, - const egl::AttributeMap &attribs) override; - - ImageImpl *createImage(EGLenum target, - egl::ImageSibling *buffer, - const egl::AttributeMap &attribs) override; - - ContextImpl *createContext(const gl::ContextState &state) override; - - StreamProducerImpl *createStreamProducerD3DTextureNV12( - egl::Stream::ConsumerType consumerType, - const egl::AttributeMap &attribs) override; - - private: - void generateExtensions(egl::DisplayExtensions *outExtensions) const override; - void generateCaps(egl::Caps *outCaps) const override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_DISPLAYNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/FenceNVNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/FenceNVNULL.cpp deleted file mode 100644 index 9d7f26043..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/FenceNVNULL.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright 2016 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. -// -// FenceNVNULL.cpp: -// Implements the class methods for FenceNVNULL. -// - -#include "libANGLE/renderer/null/FenceNVNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -FenceNVNULL::FenceNVNULL() : FenceNVImpl() -{ -} - -FenceNVNULL::~FenceNVNULL() -{ -} - -gl::Error FenceNVNULL::set(GLenum condition) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error FenceNVNULL::test(GLboolean *outFinished) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error FenceNVNULL::finish() -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/FenceNVNULL.h b/gfx/angle/src/libANGLE/renderer/null/FenceNVNULL.h deleted file mode 100644 index 10cf5c2cb..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/FenceNVNULL.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright 2016 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. -// -// FenceNVNULL.h: -// Defines the class interface for FenceNVNULL, implementing FenceNVImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_FENCENVNULL_H_ -#define LIBANGLE_RENDERER_NULL_FENCENVNULL_H_ - -#include "libANGLE/renderer/FenceNVImpl.h" - -namespace rx -{ - -class FenceNVNULL : public FenceNVImpl -{ - public: - FenceNVNULL(); - ~FenceNVNULL() override; - - gl::Error set(GLenum condition) override; - gl::Error test(GLboolean *outFinished) override; - gl::Error finish() override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_FENCENVNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/FenceSyncNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/FenceSyncNULL.cpp deleted file mode 100644 index 37bfdfedb..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/FenceSyncNULL.cpp +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright 2016 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. -// -// FenceSyncNULL.cpp: -// Implements the class methods for FenceSyncNULL. -// - -#include "libANGLE/renderer/null/FenceSyncNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -FenceSyncNULL::FenceSyncNULL() : FenceSyncImpl() -{ -} - -FenceSyncNULL::~FenceSyncNULL() -{ -} - -gl::Error FenceSyncNULL::set(GLenum condition, GLbitfield flags) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error FenceSyncNULL::clientWait(GLbitfield flags, GLuint64 timeout, GLenum *outResult) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error FenceSyncNULL::serverWait(GLbitfield flags, GLuint64 timeout) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error FenceSyncNULL::getStatus(GLint *outResult) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/FenceSyncNULL.h b/gfx/angle/src/libANGLE/renderer/null/FenceSyncNULL.h deleted file mode 100644 index 28a12f703..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/FenceSyncNULL.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright 2016 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. -// -// FenceSyncNULL.h: -// Defines the class interface for FenceSyncNULL, implementing FenceSyncImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_FENCESYNCNULL_H_ -#define LIBANGLE_RENDERER_NULL_FENCESYNCNULL_H_ - -#include "libANGLE/renderer/FenceSyncImpl.h" - -namespace rx -{ - -class FenceSyncNULL : public FenceSyncImpl -{ - public: - FenceSyncNULL(); - ~FenceSyncNULL() override; - - gl::Error set(GLenum condition, GLbitfield flags) override; - gl::Error clientWait(GLbitfield flags, GLuint64 timeout, GLenum *outResult) override; - gl::Error serverWait(GLbitfield flags, GLuint64 timeout) override; - gl::Error getStatus(GLint *outResult) override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_FENCESYNCNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/FramebufferNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/FramebufferNULL.cpp deleted file mode 100644 index 14ebe1eba..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/FramebufferNULL.cpp +++ /dev/null @@ -1,131 +0,0 @@ -// -// Copyright 2016 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. -// -// FramebufferNULL.cpp: -// Implements the class methods for FramebufferNULL. -// - -#include "libANGLE/renderer/null/FramebufferNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -FramebufferNULL::FramebufferNULL(const gl::FramebufferState &state) : FramebufferImpl(state) -{ -} - -FramebufferNULL::~FramebufferNULL() -{ -} - -gl::Error FramebufferNULL::discard(size_t count, const GLenum *attachments) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error FramebufferNULL::invalidate(size_t count, const GLenum *attachments) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error FramebufferNULL::invalidateSub(size_t count, - const GLenum *attachments, - const gl::Rectangle &area) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error FramebufferNULL::clear(ContextImpl *context, GLbitfield mask) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error FramebufferNULL::clearBufferfv(ContextImpl *context, - GLenum buffer, - GLint drawbuffer, - const GLfloat *values) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error FramebufferNULL::clearBufferuiv(ContextImpl *context, - GLenum buffer, - GLint drawbuffer, - const GLuint *values) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error FramebufferNULL::clearBufferiv(ContextImpl *context, - GLenum buffer, - GLint drawbuffer, - const GLint *values) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error FramebufferNULL::clearBufferfi(ContextImpl *context, - GLenum buffer, - GLint drawbuffer, - GLfloat depth, - GLint stencil) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -GLenum FramebufferNULL::getImplementationColorReadFormat() const -{ - UNIMPLEMENTED(); - return GLenum(); -} - -GLenum FramebufferNULL::getImplementationColorReadType() const -{ - UNIMPLEMENTED(); - return GLenum(); -} - -gl::Error FramebufferNULL::readPixels(ContextImpl *context, - const gl::Rectangle &area, - GLenum format, - GLenum type, - GLvoid *pixels) const -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error FramebufferNULL::blit(ContextImpl *context, - const gl::Rectangle &sourceArea, - const gl::Rectangle &destArea, - GLbitfield mask, - GLenum filter) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -bool FramebufferNULL::checkStatus() const -{ - UNIMPLEMENTED(); - return bool(); -} - -void FramebufferNULL::syncState(const gl::Framebuffer::DirtyBits &dirtyBits) -{ - UNIMPLEMENTED(); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/FramebufferNULL.h b/gfx/angle/src/libANGLE/renderer/null/FramebufferNULL.h deleted file mode 100644 index c53132c18..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/FramebufferNULL.h +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright 2016 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. -// -// FramebufferNULL.h: -// Defines the class interface for FramebufferNULL, implementing FramebufferImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_FRAMEBUFFERNULL_H_ -#define LIBANGLE_RENDERER_NULL_FRAMEBUFFERNULL_H_ - -#include "libANGLE/renderer/FramebufferImpl.h" - -namespace rx -{ - -class FramebufferNULL : public FramebufferImpl -{ - public: - FramebufferNULL(const gl::FramebufferState &state); - ~FramebufferNULL() override; - - gl::Error discard(size_t count, const GLenum *attachments) override; - gl::Error invalidate(size_t count, const GLenum *attachments) override; - gl::Error invalidateSub(size_t count, - const GLenum *attachments, - const gl::Rectangle &area) override; - - gl::Error clear(ContextImpl *context, GLbitfield mask) override; - gl::Error clearBufferfv(ContextImpl *context, - GLenum buffer, - GLint drawbuffer, - const GLfloat *values) override; - gl::Error clearBufferuiv(ContextImpl *context, - GLenum buffer, - GLint drawbuffer, - const GLuint *values) override; - gl::Error clearBufferiv(ContextImpl *context, - GLenum buffer, - GLint drawbuffer, - const GLint *values) override; - gl::Error clearBufferfi(ContextImpl *context, - GLenum buffer, - GLint drawbuffer, - GLfloat depth, - GLint stencil) override; - - GLenum getImplementationColorReadFormat() const override; - GLenum getImplementationColorReadType() const override; - gl::Error readPixels(ContextImpl *context, - const gl::Rectangle &area, - GLenum format, - GLenum type, - GLvoid *pixels) const override; - - gl::Error blit(ContextImpl *context, - const gl::Rectangle &sourceArea, - const gl::Rectangle &destArea, - GLbitfield mask, - GLenum filter) override; - - bool checkStatus() const override; - - void syncState(const gl::Framebuffer::DirtyBits &dirtyBits) override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_FRAMEBUFFERNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/ImageNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/ImageNULL.cpp deleted file mode 100644 index 23f3ca099..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/ImageNULL.cpp +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright 2016 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. -// -// ImageNULL.cpp: -// Implements the class methods for ImageNULL. -// - -#include "libANGLE/renderer/null/ImageNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -ImageNULL::ImageNULL() : ImageImpl() -{ -} - -ImageNULL::~ImageNULL() -{ -} - -egl::Error ImageNULL::initialize() -{ - UNIMPLEMENTED(); - return egl::Error(EGL_BAD_ACCESS); -} - -gl::Error ImageNULL::orphan(egl::ImageSibling *sibling) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/ImageNULL.h b/gfx/angle/src/libANGLE/renderer/null/ImageNULL.h deleted file mode 100644 index b88b346dd..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/ImageNULL.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2016 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. -// -// ImageNULL.h: -// Defines the class interface for ImageNULL, implementing ImageImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_IMAGENULL_H_ -#define LIBANGLE_RENDERER_NULL_IMAGENULL_H_ - -#include "libANGLE/renderer/ImageImpl.h" - -namespace rx -{ - -class ImageNULL : public ImageImpl -{ - public: - ImageNULL(); - ~ImageNULL() override; - egl::Error initialize() override; - - gl::Error orphan(egl::ImageSibling *sibling) override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_IMAGENULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/PathNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/PathNULL.cpp deleted file mode 100644 index bb52ea2c2..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/PathNULL.cpp +++ /dev/null @@ -1,40 +0,0 @@ -// -// Copyright 2016 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. -// -// PathNULL.cpp: -// Implements the class methods for PathNULL. -// - -#include "libANGLE/renderer/null/PathNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -PathNULL::PathNULL() : PathImpl() -{ -} - -PathNULL::~PathNULL() -{ -} - -gl::Error PathNULL::setCommands(GLsizei numCommands, - const GLubyte *commands, - GLsizei numCoords, - GLenum coordType, - const void *coords) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -void PathNULL::setPathParameter(GLenum pname, GLfloat value) -{ - UNIMPLEMENTED(); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/PathNULL.h b/gfx/angle/src/libANGLE/renderer/null/PathNULL.h deleted file mode 100644 index 4c80c1c91..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/PathNULL.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright 2016 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. -// -// PathNULL.h: -// Defines the class interface for PathNULL, implementing PathImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_PATHNULL_H_ -#define LIBANGLE_RENDERER_NULL_PATHNULL_H_ - -#include "libANGLE/renderer/PathImpl.h" - -namespace rx -{ - -class PathNULL : public PathImpl -{ - public: - PathNULL(); - ~PathNULL() override; - - gl::Error setCommands(GLsizei numCommands, - const GLubyte *commands, - GLsizei numCoords, - GLenum coordType, - const void *coords) override; - - void setPathParameter(GLenum pname, GLfloat value) override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_PATHNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/ProgramNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/ProgramNULL.cpp deleted file mode 100644 index fb44b6ee4..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/ProgramNULL.cpp +++ /dev/null @@ -1,212 +0,0 @@ -// -// Copyright 2016 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. -// -// ProgramNULL.cpp: -// Implements the class methods for ProgramNULL. -// - -#include "libANGLE/renderer/null/ProgramNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -ProgramNULL::ProgramNULL(const gl::ProgramState &state) : ProgramImpl(state) -{ -} - -ProgramNULL::~ProgramNULL() -{ -} - -LinkResult ProgramNULL::load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error ProgramNULL::save(gl::BinaryOutputStream *stream) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -void ProgramNULL::setBinaryRetrievableHint(bool retrievable) -{ - UNIMPLEMENTED(); -} - -LinkResult ProgramNULL::link(const gl::ContextState &data, gl::InfoLog &infoLog) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -GLboolean ProgramNULL::validate(const gl::Caps &caps, gl::InfoLog *infoLog) -{ - UNIMPLEMENTED(); - return GLboolean(); -} - -void ProgramNULL::setUniform1fv(GLint location, GLsizei count, const GLfloat *v) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniform2fv(GLint location, GLsizei count, const GLfloat *v) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniform3fv(GLint location, GLsizei count, const GLfloat *v) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniform4fv(GLint location, GLsizei count, const GLfloat *v) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniform1iv(GLint location, GLsizei count, const GLint *v) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniform2iv(GLint location, GLsizei count, const GLint *v) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniform3iv(GLint location, GLsizei count, const GLint *v) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniform4iv(GLint location, GLsizei count, const GLint *v) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniform1uiv(GLint location, GLsizei count, const GLuint *v) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniform2uiv(GLint location, GLsizei count, const GLuint *v) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniform3uiv(GLint location, GLsizei count, const GLuint *v) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniform4uiv(GLint location, GLsizei count, const GLuint *v) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniformMatrix2fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniformMatrix3fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniformMatrix4fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniformMatrix2x3fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniformMatrix3x2fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniformMatrix2x4fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniformMatrix4x2fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniformMatrix3x4fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniformMatrix4x3fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) -{ - UNIMPLEMENTED(); -} - -void ProgramNULL::setUniformBlockBinding(GLuint uniformBlockIndex, GLuint uniformBlockBinding) -{ - UNIMPLEMENTED(); -} - -bool ProgramNULL::getUniformBlockSize(const std::string &blockName, size_t *sizeOut) const -{ - UNIMPLEMENTED(); - return bool(); -} - -bool ProgramNULL::getUniformBlockMemberInfo(const std::string &memberUniformName, - sh::BlockMemberInfo *memberInfoOut) const -{ - UNIMPLEMENTED(); - return bool(); -} - -void ProgramNULL::setPathFragmentInputGen(const std::string &inputName, - GLenum genMode, - GLint components, - const GLfloat *coeffs) -{ - UNIMPLEMENTED(); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/ProgramNULL.h b/gfx/angle/src/libANGLE/renderer/null/ProgramNULL.h deleted file mode 100644 index 576a52c18..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/ProgramNULL.h +++ /dev/null @@ -1,101 +0,0 @@ -// -// Copyright 2016 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. -// -// ProgramNULL.h: -// Defines the class interface for ProgramNULL, implementing ProgramImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_PROGRAMNULL_H_ -#define LIBANGLE_RENDERER_NULL_PROGRAMNULL_H_ - -#include "libANGLE/renderer/ProgramImpl.h" - -namespace rx -{ - -class ProgramNULL : public ProgramImpl -{ - public: - ProgramNULL(const gl::ProgramState &state); - ~ProgramNULL() override; - - LinkResult load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream) override; - gl::Error save(gl::BinaryOutputStream *stream) override; - void setBinaryRetrievableHint(bool retrievable) override; - - LinkResult link(const gl::ContextState &data, gl::InfoLog &infoLog) override; - GLboolean validate(const gl::Caps &caps, gl::InfoLog *infoLog) override; - - void setUniform1fv(GLint location, GLsizei count, const GLfloat *v) override; - void setUniform2fv(GLint location, GLsizei count, const GLfloat *v) override; - void setUniform3fv(GLint location, GLsizei count, const GLfloat *v) override; - void setUniform4fv(GLint location, GLsizei count, const GLfloat *v) override; - void setUniform1iv(GLint location, GLsizei count, const GLint *v) override; - void setUniform2iv(GLint location, GLsizei count, const GLint *v) override; - void setUniform3iv(GLint location, GLsizei count, const GLint *v) override; - void setUniform4iv(GLint location, GLsizei count, const GLint *v) override; - void setUniform1uiv(GLint location, GLsizei count, const GLuint *v) override; - void setUniform2uiv(GLint location, GLsizei count, const GLuint *v) override; - void setUniform3uiv(GLint location, GLsizei count, const GLuint *v) override; - void setUniform4uiv(GLint location, GLsizei count, const GLuint *v) override; - void setUniformMatrix2fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) override; - void setUniformMatrix3fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) override; - void setUniformMatrix4fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) override; - void setUniformMatrix2x3fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) override; - void setUniformMatrix3x2fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) override; - void setUniformMatrix2x4fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) override; - void setUniformMatrix4x2fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) override; - void setUniformMatrix3x4fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) override; - void setUniformMatrix4x3fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value) override; - - // TODO: synchronize in syncState when dirty bits exist. - void setUniformBlockBinding(GLuint uniformBlockIndex, GLuint uniformBlockBinding) override; - - // May only be called after a successful link operation. - // Return false for inactive blocks. - bool getUniformBlockSize(const std::string &blockName, size_t *sizeOut) const override; - - // May only be called after a successful link operation. - // Returns false for inactive members. - bool getUniformBlockMemberInfo(const std::string &memberUniformName, - sh::BlockMemberInfo *memberInfoOut) const override; - // CHROMIUM_path_rendering - // Set parameters to control fragment shader input variable interpolation - void setPathFragmentInputGen(const std::string &inputName, - GLenum genMode, - GLint components, - const GLfloat *coeffs) override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_PROGRAMNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/QueryNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/QueryNULL.cpp deleted file mode 100644 index 6276a0ff1..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/QueryNULL.cpp +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright 2016 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. -// -// QueryNULL.cpp: -// Implements the class methods for QueryNULL. -// - -#include "libANGLE/renderer/null/QueryNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -QueryNULL::QueryNULL(GLenum type) : QueryImpl(type) -{ -} - -QueryNULL::~QueryNULL() -{ -} - -gl::Error QueryNULL::begin() -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error QueryNULL::end() -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error QueryNULL::queryCounter() -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error QueryNULL::getResult(GLint *params) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error QueryNULL::getResult(GLuint *params) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error QueryNULL::getResult(GLint64 *params) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error QueryNULL::getResult(GLuint64 *params) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error QueryNULL::isResultAvailable(bool *available) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/QueryNULL.h b/gfx/angle/src/libANGLE/renderer/null/QueryNULL.h deleted file mode 100644 index 40082a9b8..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/QueryNULL.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// Copyright 2016 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. -// -// QueryNULL.h: -// Defines the class interface for QueryNULL, implementing QueryImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_QUERYNULL_H_ -#define LIBANGLE_RENDERER_NULL_QUERYNULL_H_ - -#include "libANGLE/renderer/QueryImpl.h" - -namespace rx -{ - -class QueryNULL : public QueryImpl -{ - public: - QueryNULL(GLenum type); - ~QueryNULL() override; - - gl::Error begin() override; - gl::Error end() override; - gl::Error queryCounter() override; - gl::Error getResult(GLint *params) override; - gl::Error getResult(GLuint *params) override; - gl::Error getResult(GLint64 *params) override; - gl::Error getResult(GLuint64 *params) override; - gl::Error isResultAvailable(bool *available) override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_QUERYNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/RenderbufferNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/RenderbufferNULL.cpp deleted file mode 100644 index 50f54a620..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/RenderbufferNULL.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// -// Copyright 2016 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. -// -// RenderbufferNULL.cpp: -// Implements the class methods for RenderbufferNULL. -// - -#include "libANGLE/renderer/null/RenderbufferNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -RenderbufferNULL::RenderbufferNULL() : RenderbufferImpl() -{ -} - -RenderbufferNULL::~RenderbufferNULL() -{ -} - -gl::Error RenderbufferNULL::setStorage(GLenum internalformat, size_t width, size_t height) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error RenderbufferNULL::setStorageMultisample(size_t samples, - GLenum internalformat, - size_t width, - size_t height) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error RenderbufferNULL::setStorageEGLImageTarget(egl::Image *image) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/RenderbufferNULL.h b/gfx/angle/src/libANGLE/renderer/null/RenderbufferNULL.h deleted file mode 100644 index 79e529c4c..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/RenderbufferNULL.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright 2016 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. -// -// RenderbufferNULL.h: -// Defines the class interface for RenderbufferNULL, implementing RenderbufferImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_RENDERBUFFERNULL_H_ -#define LIBANGLE_RENDERER_NULL_RENDERBUFFERNULL_H_ - -#include "libANGLE/renderer/RenderbufferImpl.h" - -namespace rx -{ - -class RenderbufferNULL : public RenderbufferImpl -{ - public: - RenderbufferNULL(); - ~RenderbufferNULL() override; - - gl::Error setStorage(GLenum internalformat, size_t width, size_t height) override; - gl::Error setStorageMultisample(size_t samples, - GLenum internalformat, - size_t width, - size_t height) override; - gl::Error setStorageEGLImageTarget(egl::Image *image) override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_RENDERBUFFERNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/SamplerNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/SamplerNULL.cpp deleted file mode 100644 index e1e8c7c62..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/SamplerNULL.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2016 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. -// -// SamplerNULL.cpp: -// Implements the class methods for SamplerNULL. -// - -#include "libANGLE/renderer/null/SamplerNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -SamplerNULL::SamplerNULL() : SamplerImpl() -{ -} - -SamplerNULL::~SamplerNULL() -{ -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/SamplerNULL.h b/gfx/angle/src/libANGLE/renderer/null/SamplerNULL.h deleted file mode 100644 index 031fafa39..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/SamplerNULL.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2016 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. -// -// SamplerNULL.h: -// Defines the class interface for SamplerNULL, implementing SamplerImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_SAMPLERNULL_H_ -#define LIBANGLE_RENDERER_NULL_SAMPLERNULL_H_ - -#include "libANGLE/renderer/SamplerImpl.h" - -namespace rx -{ - -class SamplerNULL : public SamplerImpl -{ - public: - SamplerNULL(); - ~SamplerNULL() override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_SAMPLERNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/ShaderNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/ShaderNULL.cpp deleted file mode 100644 index 168f4bdca..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/ShaderNULL.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright 2016 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. -// -// ShaderNULL.cpp: -// Implements the class methods for ShaderNULL. -// - -#include "libANGLE/renderer/null/ShaderNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -ShaderNULL::ShaderNULL(const gl::ShaderState &data) : ShaderImpl(data) -{ -} - -ShaderNULL::~ShaderNULL() -{ -} - -ShCompileOptions ShaderNULL::prepareSourceAndReturnOptions(std::stringstream *sourceStream, - std::string *sourcePath) -{ - UNIMPLEMENTED(); - return ShCompileOptions(); -} - -bool ShaderNULL::postTranslateCompile(gl::Compiler *compiler, std::string *infoLog) -{ - UNIMPLEMENTED(); - return bool(); -} - -std::string ShaderNULL::getDebugInfo() const -{ - UNIMPLEMENTED(); - return std::string(); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/ShaderNULL.h b/gfx/angle/src/libANGLE/renderer/null/ShaderNULL.h deleted file mode 100644 index d29b4cfb7..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/ShaderNULL.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright 2016 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. -// -// ShaderNULL.h: -// Defines the class interface for ShaderNULL, implementing ShaderImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_SHADERNULL_H_ -#define LIBANGLE_RENDERER_NULL_SHADERNULL_H_ - -#include "libANGLE/renderer/ShaderImpl.h" - -namespace rx -{ - -class ShaderNULL : public ShaderImpl -{ - public: - ShaderNULL(const gl::ShaderState &data); - ~ShaderNULL() override; - - // Returns additional sh::Compile options. - ShCompileOptions prepareSourceAndReturnOptions(std::stringstream *sourceStream, - std::string *sourcePath) override; - // Returns success for compiling on the driver. Returns success. - bool postTranslateCompile(gl::Compiler *compiler, std::string *infoLog) override; - - std::string getDebugInfo() const override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_SHADERNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/SurfaceNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/SurfaceNULL.cpp deleted file mode 100644 index 81d763783..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/SurfaceNULL.cpp +++ /dev/null @@ -1,103 +0,0 @@ -// -// Copyright 2016 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. -// -// SurfaceNULL.cpp: -// Implements the class methods for SurfaceNULL. -// - -#include "libANGLE/renderer/null/SurfaceNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -SurfaceNULL::SurfaceNULL(const egl::SurfaceState &surfaceState) : SurfaceImpl(surfaceState) -{ -} - -SurfaceNULL::~SurfaceNULL() -{ -} - -egl::Error SurfaceNULL::initialize() -{ - UNIMPLEMENTED(); - return egl::Error(EGL_BAD_ACCESS); -} - -FramebufferImpl *SurfaceNULL::createDefaultFramebuffer(const gl::FramebufferState &state) -{ - UNIMPLEMENTED(); - return static_cast(0); -} - -egl::Error SurfaceNULL::swap() -{ - UNIMPLEMENTED(); - return egl::Error(EGL_BAD_ACCESS); -} - -egl::Error SurfaceNULL::postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height) -{ - UNIMPLEMENTED(); - return egl::Error(EGL_BAD_ACCESS); -} - -egl::Error SurfaceNULL::querySurfacePointerANGLE(EGLint attribute, void **value) -{ - UNIMPLEMENTED(); - return egl::Error(EGL_BAD_ACCESS); -} - -egl::Error SurfaceNULL::bindTexImage(gl::Texture *texture, EGLint buffer) -{ - UNIMPLEMENTED(); - return egl::Error(EGL_BAD_ACCESS); -} - -egl::Error SurfaceNULL::releaseTexImage(EGLint buffer) -{ - UNIMPLEMENTED(); - return egl::Error(EGL_BAD_ACCESS); -} - -void SurfaceNULL::setSwapInterval(EGLint interval) -{ - UNIMPLEMENTED(); -} - -EGLint SurfaceNULL::getWidth() const -{ - UNIMPLEMENTED(); - return EGLint(); -} - -EGLint SurfaceNULL::getHeight() const -{ - UNIMPLEMENTED(); - return EGLint(); -} - -EGLint SurfaceNULL::isPostSubBufferSupported() const -{ - UNIMPLEMENTED(); - return EGLint(); -} - -EGLint SurfaceNULL::getSwapBehavior() const -{ - UNIMPLEMENTED(); - return EGLint(); -} - -gl::Error SurfaceNULL::getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target, - FramebufferAttachmentRenderTarget **rtOut) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/SurfaceNULL.h b/gfx/angle/src/libANGLE/renderer/null/SurfaceNULL.h deleted file mode 100644 index 597f1c21c..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/SurfaceNULL.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// Copyright 2016 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. -// -// SurfaceNULL.h: -// Defines the class interface for SurfaceNULL, implementing SurfaceImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_SURFACENULL_H_ -#define LIBANGLE_RENDERER_NULL_SURFACENULL_H_ - -#include "libANGLE/renderer/SurfaceImpl.h" - -namespace rx -{ - -class SurfaceNULL : public SurfaceImpl -{ - public: - SurfaceNULL(const egl::SurfaceState &surfaceState); - ~SurfaceNULL() override; - - egl::Error initialize() override; - FramebufferImpl *createDefaultFramebuffer(const gl::FramebufferState &state) override; - egl::Error swap() override; - egl::Error postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height) override; - egl::Error querySurfacePointerANGLE(EGLint attribute, void **value) override; - egl::Error bindTexImage(gl::Texture *texture, EGLint buffer) override; - egl::Error releaseTexImage(EGLint buffer) override; - void setSwapInterval(EGLint interval) override; - - // width and height can change with client window resizing - EGLint getWidth() const override; - EGLint getHeight() const override; - - EGLint isPostSubBufferSupported() const override; - EGLint getSwapBehavior() const override; - - gl::Error getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target, - FramebufferAttachmentRenderTarget **rtOut) override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_SURFACENULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/TextureNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/TextureNULL.cpp deleted file mode 100644 index 2c952e528..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/TextureNULL.cpp +++ /dev/null @@ -1,143 +0,0 @@ -// -// Copyright 2016 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. -// -// TextureNULL.cpp: -// Implements the class methods for TextureNULL. -// - -#include "libANGLE/renderer/null/TextureNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -TextureNULL::TextureNULL(const gl::TextureState &state) : TextureImpl(state) -{ -} - -TextureNULL::~TextureNULL() -{ -} - -gl::Error TextureNULL::setImage(GLenum target, - size_t level, - GLenum internalFormat, - const gl::Extents &size, - GLenum format, - GLenum type, - const gl::PixelUnpackState &unpack, - const uint8_t *pixels) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error TextureNULL::setSubImage(GLenum target, - size_t level, - const gl::Box &area, - GLenum format, - GLenum type, - const gl::PixelUnpackState &unpack, - const uint8_t *pixels) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error TextureNULL::setCompressedImage(GLenum target, - size_t level, - GLenum internalFormat, - const gl::Extents &size, - const gl::PixelUnpackState &unpack, - size_t imageSize, - const uint8_t *pixels) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error TextureNULL::setCompressedSubImage(GLenum target, - size_t level, - const gl::Box &area, - GLenum format, - const gl::PixelUnpackState &unpack, - size_t imageSize, - const uint8_t *pixels) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error TextureNULL::copyImage(GLenum target, - size_t level, - const gl::Rectangle &sourceArea, - GLenum internalFormat, - const gl::Framebuffer *source) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error TextureNULL::copySubImage(GLenum target, - size_t level, - const gl::Offset &destOffset, - const gl::Rectangle &sourceArea, - const gl::Framebuffer *source) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error TextureNULL::setStorage(GLenum target, - size_t levels, - GLenum internalFormat, - const gl::Extents &size) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error TextureNULL::setEGLImageTarget(GLenum target, egl::Image *image) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error TextureNULL::setImageExternal(GLenum target, - egl::Stream *stream, - const egl::Stream::GLTextureDescription &desc) -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -gl::Error TextureNULL::generateMipmap() -{ - UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); -} - -void TextureNULL::setBaseLevel(GLuint baseLevel) -{ - UNIMPLEMENTED(); -} - -void TextureNULL::bindTexImage(egl::Surface *surface) -{ - UNIMPLEMENTED(); -} - -void TextureNULL::releaseTexImage() -{ - UNIMPLEMENTED(); -} - -void TextureNULL::syncState(const gl::Texture::DirtyBits &dirtyBits) -{ - UNIMPLEMENTED(); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/TextureNULL.h b/gfx/angle/src/libANGLE/renderer/null/TextureNULL.h deleted file mode 100644 index 10c2d3503..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/TextureNULL.h +++ /dev/null @@ -1,89 +0,0 @@ -// -// Copyright 2016 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. -// -// TextureNULL.h: -// Defines the class interface for TextureNULL, implementing TextureImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_TEXTURENULL_H_ -#define LIBANGLE_RENDERER_NULL_TEXTURENULL_H_ - -#include "libANGLE/renderer/TextureImpl.h" - -namespace rx -{ - -class TextureNULL : public TextureImpl -{ - public: - TextureNULL(const gl::TextureState &state); - ~TextureNULL() override; - - gl::Error setImage(GLenum target, - size_t level, - GLenum internalFormat, - const gl::Extents &size, - GLenum format, - GLenum type, - const gl::PixelUnpackState &unpack, - const uint8_t *pixels) override; - gl::Error setSubImage(GLenum target, - size_t level, - const gl::Box &area, - GLenum format, - GLenum type, - const gl::PixelUnpackState &unpack, - const uint8_t *pixels) override; - - gl::Error setCompressedImage(GLenum target, - size_t level, - GLenum internalFormat, - const gl::Extents &size, - const gl::PixelUnpackState &unpack, - size_t imageSize, - const uint8_t *pixels) override; - gl::Error setCompressedSubImage(GLenum target, - size_t level, - const gl::Box &area, - GLenum format, - const gl::PixelUnpackState &unpack, - size_t imageSize, - const uint8_t *pixels) override; - - gl::Error copyImage(GLenum target, - size_t level, - const gl::Rectangle &sourceArea, - GLenum internalFormat, - const gl::Framebuffer *source) override; - gl::Error copySubImage(GLenum target, - size_t level, - const gl::Offset &destOffset, - const gl::Rectangle &sourceArea, - const gl::Framebuffer *source) override; - - gl::Error setStorage(GLenum target, - size_t levels, - GLenum internalFormat, - const gl::Extents &size) override; - - gl::Error setEGLImageTarget(GLenum target, egl::Image *image) override; - - gl::Error setImageExternal(GLenum target, - egl::Stream *stream, - const egl::Stream::GLTextureDescription &desc) override; - - gl::Error generateMipmap() override; - - void setBaseLevel(GLuint baseLevel) override; - - void bindTexImage(egl::Surface *surface) override; - void releaseTexImage() override; - - void syncState(const gl::Texture::DirtyBits &dirtyBits) override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_TEXTURENULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/TransformFeedbackNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/TransformFeedbackNULL.cpp deleted file mode 100644 index e1433fb2d..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/TransformFeedbackNULL.cpp +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright 2016 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. -// -// TransformFeedbackNULL.cpp: -// Implements the class methods for TransformFeedbackNULL. -// - -#include "libANGLE/renderer/null/TransformFeedbackNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -TransformFeedbackNULL::TransformFeedbackNULL(const gl::TransformFeedbackState &state) - : TransformFeedbackImpl(state) -{ -} - -TransformFeedbackNULL::~TransformFeedbackNULL() -{ -} - -void TransformFeedbackNULL::begin(GLenum primitiveMode) -{ - UNIMPLEMENTED(); -} - -void TransformFeedbackNULL::end() -{ - UNIMPLEMENTED(); -} - -void TransformFeedbackNULL::pause() -{ - UNIMPLEMENTED(); -} - -void TransformFeedbackNULL::resume() -{ - UNIMPLEMENTED(); -} - -void TransformFeedbackNULL::bindGenericBuffer(const BindingPointer &binding) -{ - UNIMPLEMENTED(); -} - -void TransformFeedbackNULL::bindIndexedBuffer(size_t index, - const OffsetBindingPointer &binding) -{ - UNIMPLEMENTED(); -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/TransformFeedbackNULL.h b/gfx/angle/src/libANGLE/renderer/null/TransformFeedbackNULL.h deleted file mode 100644 index 477e81d85..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/TransformFeedbackNULL.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright 2016 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. -// -// TransformFeedbackNULL.h: -// Defines the class interface for TransformFeedbackNULL, implementing TransformFeedbackImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_TRANSFORMFEEDBACKNULL_H_ -#define LIBANGLE_RENDERER_NULL_TRANSFORMFEEDBACKNULL_H_ - -#include "libANGLE/renderer/TransformFeedbackImpl.h" - -namespace rx -{ - -class TransformFeedbackNULL : public TransformFeedbackImpl -{ - public: - TransformFeedbackNULL(const gl::TransformFeedbackState &state); - ~TransformFeedbackNULL() override; - - void begin(GLenum primitiveMode) override; - void end() override; - void pause() override; - void resume() override; - - void bindGenericBuffer(const BindingPointer &binding) override; - void bindIndexedBuffer(size_t index, const OffsetBindingPointer &binding) override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_TRANSFORMFEEDBACKNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/VertexArrayNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/VertexArrayNULL.cpp deleted file mode 100644 index 95a835df1..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/VertexArrayNULL.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2016 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. -// -// VertexArrayNULL.cpp: -// Implements the class methods for VertexArrayNULL. -// - -#include "libANGLE/renderer/null/VertexArrayNULL.h" - -#include "common/debug.h" - -namespace rx -{ - -VertexArrayNULL::VertexArrayNULL(const gl::VertexArrayState &data) : VertexArrayImpl(data) -{ -} - -VertexArrayNULL::~VertexArrayNULL() -{ -} - -} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/VertexArrayNULL.h b/gfx/angle/src/libANGLE/renderer/null/VertexArrayNULL.h deleted file mode 100644 index f8b2b0490..000000000 --- a/gfx/angle/src/libANGLE/renderer/null/VertexArrayNULL.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2016 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. -// -// VertexArrayNULL.h: -// Defines the class interface for VertexArrayNULL, implementing VertexArrayImpl. -// - -#ifndef LIBANGLE_RENDERER_NULL_VERTEXARRAYNULL_H_ -#define LIBANGLE_RENDERER_NULL_VERTEXARRAYNULL_H_ - -#include "libANGLE/renderer/VertexArrayImpl.h" - -namespace rx -{ - -class VertexArrayNULL : public VertexArrayImpl -{ - public: - VertexArrayNULL(const gl::VertexArrayState &data); - ~VertexArrayNULL() override; -}; - -} // namespace rx - -#endif // LIBANGLE_RENDERER_NULL_VERTEXARRAYNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/renderer_utils.cpp b/gfx/angle/src/libANGLE/renderer/renderer_utils.cpp index cc04dbb14..b93a1ff93 100755 --- a/gfx/angle/src/libANGLE/renderer/renderer_utils.cpp +++ b/gfx/angle/src/libANGLE/renderer/renderer_utils.cpp @@ -268,25 +268,8 @@ ColorWriteFunction GetColorWriteFunction(const gl::FormatType &formatType) ColorCopyFunction GetFastCopyFunction(const FastCopyFunctionMap &fastCopyFunctions, const gl::FormatType &formatType) { - return fastCopyFunctions.get(formatType); -} - -bool FastCopyFunctionMap::has(const gl::FormatType &formatType) const -{ - return (get(formatType) != nullptr); -} - -ColorCopyFunction FastCopyFunctionMap::get(const gl::FormatType &formatType) const -{ - for (size_t index = 0; index < mSize; ++index) - { - if (mData[index].format == formatType.format && mData[index].type == formatType.type) - { - return mData[index].func; - } - } - - return nullptr; + auto iter = fastCopyFunctions.find(formatType); + return (iter != fastCopyFunctions.end()) ? iter->second : nullptr; } } // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/renderer_utils.h b/gfx/angle/src/libANGLE/renderer/renderer_utils.h index 440548e9c..e08703000 100755 --- a/gfx/angle/src/libANGLE/renderer/renderer_utils.h +++ b/gfx/angle/src/libANGLE/renderer/renderer_utils.h @@ -44,27 +44,7 @@ typedef void (*ColorReadFunction)(const uint8_t *source, uint8_t *dest); typedef void (*ColorWriteFunction)(const uint8_t *source, uint8_t *dest); typedef void (*ColorCopyFunction)(const uint8_t *source, uint8_t *dest); -class FastCopyFunctionMap -{ - public: - struct Entry - { - GLenum format; - GLenum type; - ColorCopyFunction func; - }; - - constexpr FastCopyFunctionMap() : FastCopyFunctionMap(nullptr, 0) {} - - constexpr FastCopyFunctionMap(const Entry *data, size_t size) : mSize(size), mData(data) {} - - bool has(const gl::FormatType &formatType) const; - ColorCopyFunction get(const gl::FormatType &formatType) const; - - private: - size_t mSize; - const Entry *mData; -}; +typedef std::map FastCopyFunctionMap; struct PackPixelsParams { diff --git a/gfx/angle/src/libANGLE/renderer/vulkan/BufferVk.cpp b/gfx/angle/src/libANGLE/renderer/vulkan/BufferVk.cpp index 0b1babd5a..b0e01e86c 100755 --- a/gfx/angle/src/libANGLE/renderer/vulkan/BufferVk.cpp +++ b/gfx/angle/src/libANGLE/renderer/vulkan/BufferVk.cpp @@ -14,7 +14,7 @@ namespace rx { -BufferVk::BufferVk(const gl::BufferState &state) : BufferImpl(state) +BufferVk::BufferVk() : BufferImpl() { } @@ -22,13 +22,13 @@ BufferVk::~BufferVk() { } -gl::Error BufferVk::setData(GLenum target, const void *data, size_t size, GLenum usage) +gl::Error BufferVk::setData(const void *data, size_t size, GLenum usage) { UNIMPLEMENTED(); return gl::Error(GL_INVALID_OPERATION); } -gl::Error BufferVk::setSubData(GLenum target, const void *data, size_t size, size_t offset) +gl::Error BufferVk::setSubData(const void *data, size_t size, size_t offset) { UNIMPLEMENTED(); return gl::Error(GL_INVALID_OPERATION); diff --git a/gfx/angle/src/libANGLE/renderer/vulkan/BufferVk.h b/gfx/angle/src/libANGLE/renderer/vulkan/BufferVk.h index 27792962f..19bd61ea3 100755 --- a/gfx/angle/src/libANGLE/renderer/vulkan/BufferVk.h +++ b/gfx/angle/src/libANGLE/renderer/vulkan/BufferVk.h @@ -18,11 +18,11 @@ namespace rx class BufferVk : public BufferImpl { public: - BufferVk(const gl::BufferState &state); + BufferVk(); ~BufferVk() override; - gl::Error setData(GLenum target, const void *data, size_t size, GLenum usage) override; - gl::Error setSubData(GLenum target, const void *data, size_t size, size_t offset) override; + gl::Error setData(const void *data, size_t size, GLenum usage) override; + gl::Error setSubData(const void *data, size_t size, size_t offset) override; gl::Error copySubData(BufferImpl *source, GLintptr sourceOffset, GLintptr destOffset, diff --git a/gfx/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp b/gfx/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp index d0660bfdc..8bd063300 100755 --- a/gfx/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp +++ b/gfx/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp @@ -211,9 +211,9 @@ RenderbufferImpl *ContextVk::createRenderbuffer() return new RenderbufferVk(); } -BufferImpl *ContextVk::createBuffer(const gl::BufferState &state) +BufferImpl *ContextVk::createBuffer() { - return new BufferVk(state); + return new BufferVk(); } VertexArrayImpl *ContextVk::createVertexArray(const gl::VertexArrayState &state) diff --git a/gfx/angle/src/libANGLE/renderer/vulkan/ContextVk.h b/gfx/angle/src/libANGLE/renderer/vulkan/ContextVk.h index 64e85c984..61b4f5b30 100755 --- a/gfx/angle/src/libANGLE/renderer/vulkan/ContextVk.h +++ b/gfx/angle/src/libANGLE/renderer/vulkan/ContextVk.h @@ -97,7 +97,7 @@ class ContextVk : public ContextImpl RenderbufferImpl *createRenderbuffer() override; // Buffer creation - BufferImpl *createBuffer(const gl::BufferState &state) override; + BufferImpl *createBuffer() override; // Vertex Array creation VertexArrayImpl *createVertexArray(const gl::VertexArrayState &state) override; diff --git a/gfx/angle/src/libANGLE/renderer/vulkan/DisplayVk.cpp b/gfx/angle/src/libANGLE/renderer/vulkan/DisplayVk.cpp index 2c652ce3c..95e8ea653 100755 --- a/gfx/angle/src/libANGLE/renderer/vulkan/DisplayVk.cpp +++ b/gfx/angle/src/libANGLE/renderer/vulkan/DisplayVk.cpp @@ -111,8 +111,7 @@ SurfaceImpl *DisplayVk::createPbufferSurface(const egl::SurfaceState &state, SurfaceImpl *DisplayVk::createPbufferFromClientBuffer(const egl::SurfaceState &state, const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) { UNIMPLEMENTED(); diff --git a/gfx/angle/src/libANGLE/renderer/vulkan/DisplayVk.h b/gfx/angle/src/libANGLE/renderer/vulkan/DisplayVk.h index 26eab5139..91838980d 100755 --- a/gfx/angle/src/libANGLE/renderer/vulkan/DisplayVk.h +++ b/gfx/angle/src/libANGLE/renderer/vulkan/DisplayVk.h @@ -54,8 +54,7 @@ class DisplayVk : public DisplayImpl const egl::AttributeMap &attribs) override; SurfaceImpl *createPbufferFromClientBuffer(const egl::SurfaceState &state, const egl::Config *configuration, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) override; SurfaceImpl *createPixmapSurface(const egl::SurfaceState &state, const egl::Config *configuration, diff --git a/gfx/angle/src/libANGLE/renderer/vulkan/ProgramVk.cpp b/gfx/angle/src/libANGLE/renderer/vulkan/ProgramVk.cpp index a83f826e7..591cf062c 100755 --- a/gfx/angle/src/libANGLE/renderer/vulkan/ProgramVk.cpp +++ b/gfx/angle/src/libANGLE/renderer/vulkan/ProgramVk.cpp @@ -25,7 +25,7 @@ ProgramVk::~ProgramVk() LinkResult ProgramVk::load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream) { UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); + return LinkResult(false, gl::Error(GL_INVALID_OPERATION)); } gl::Error ProgramVk::save(gl::BinaryOutputStream *stream) @@ -42,7 +42,7 @@ void ProgramVk::setBinaryRetrievableHint(bool retrievable) LinkResult ProgramVk::link(const gl::ContextState &data, gl::InfoLog &infoLog) { UNIMPLEMENTED(); - return gl::Error(GL_INVALID_OPERATION); + return LinkResult(false, gl::Error(GL_INVALID_OPERATION)); } GLboolean ProgramVk::validate(const gl::Caps &caps, gl::InfoLog *infoLog) diff --git a/gfx/angle/src/libANGLE/renderer/vulkan/ShaderVk.cpp b/gfx/angle/src/libANGLE/renderer/vulkan/ShaderVk.cpp index 8bece9b45..06355c3c8 100755 --- a/gfx/angle/src/libANGLE/renderer/vulkan/ShaderVk.cpp +++ b/gfx/angle/src/libANGLE/renderer/vulkan/ShaderVk.cpp @@ -22,8 +22,8 @@ ShaderVk::~ShaderVk() { } -ShCompileOptions ShaderVk::prepareSourceAndReturnOptions(std::stringstream *sourceStream, - std::string *sourcePath) +int ShaderVk::prepareSourceAndReturnOptions(std::stringstream *sourceStream, + std::string *sourcePath) { UNIMPLEMENTED(); return int(); diff --git a/gfx/angle/src/libANGLE/renderer/vulkan/ShaderVk.h b/gfx/angle/src/libANGLE/renderer/vulkan/ShaderVk.h index 10f8fe423..f847070c4 100755 --- a/gfx/angle/src/libANGLE/renderer/vulkan/ShaderVk.h +++ b/gfx/angle/src/libANGLE/renderer/vulkan/ShaderVk.h @@ -21,9 +21,9 @@ class ShaderVk : public ShaderImpl ShaderVk(const gl::ShaderState &data); ~ShaderVk() override; - // Returns additional sh::Compile options. - ShCompileOptions prepareSourceAndReturnOptions(std::stringstream *sourceStream, - std::string *sourcePath) override; + // Returns additional ShCompile options. + int prepareSourceAndReturnOptions(std::stringstream *sourceStream, + std::string *sourcePath) override; // Returns success for compiling on the driver. Returns success. bool postTranslateCompile(gl::Compiler *compiler, std::string *infoLog) override; diff --git a/gfx/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp b/gfx/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp index a2220fcad..440f98754 100755 --- a/gfx/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp +++ b/gfx/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp @@ -142,9 +142,4 @@ gl::Error TextureVk::getAttachmentRenderTarget(const gl::FramebufferAttachment:: return gl::Error(GL_INVALID_OPERATION); } -void TextureVk::syncState(const gl::Texture::DirtyBits &dirtyBits) -{ - UNIMPLEMENTED(); -} - } // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/vulkan/TextureVk.h b/gfx/angle/src/libANGLE/renderer/vulkan/TextureVk.h index d5b9106c7..de45b93b7 100755 --- a/gfx/angle/src/libANGLE/renderer/vulkan/TextureVk.h +++ b/gfx/angle/src/libANGLE/renderer/vulkan/TextureVk.h @@ -83,8 +83,6 @@ class TextureVk : public TextureImpl gl::Error getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target, FramebufferAttachmentRenderTarget **rtOut) override; - - void syncState(const gl::Texture::DirtyBits &dirtyBits) override; }; } // namespace rx diff --git a/gfx/angle/src/libANGLE/validationEGL.cpp b/gfx/angle/src/libANGLE/validationEGL.cpp index 7ee92e83e..6b6893b37 100755 --- a/gfx/angle/src/libANGLE/validationEGL.cpp +++ b/gfx/angle/src/libANGLE/validationEGL.cpp @@ -182,7 +182,7 @@ Error ValidateDisplay(const Display *display) return Error(EGL_SUCCESS); } -Error ValidateSurface(const Display *display, const Surface *surface) +Error ValidateSurface(const Display *display, Surface *surface) { ANGLE_TRY(ValidateDisplay(display)); @@ -206,7 +206,7 @@ Error ValidateConfig(const Display *display, const Config *config) return Error(EGL_SUCCESS); } -Error ValidateContext(const Display *display, const gl::Context *context) +Error ValidateContext(const Display *display, gl::Context *context) { ANGLE_TRY(ValidateDisplay(display)); @@ -258,6 +258,7 @@ Error ValidateCreateContext(Display *display, Config *configuration, gl::Context EGLAttrib clientMinorVersion = 0; EGLAttrib contextFlags = 0; bool resetNotification = false; + bool robustAccess = false; for (AttributeMap::const_iterator attributeIter = attributes.begin(); attributeIter != attributes.end(); attributeIter++) { EGLAttrib attribute = attributeIter->first; @@ -293,6 +294,7 @@ Error ValidateCreateContext(Display *display, Config *configuration, gl::Context { return Error(EGL_BAD_ATTRIBUTE); } + robustAccess = (value == EGL_TRUE); break; case EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR: @@ -325,36 +327,6 @@ Error ValidateCreateContext(Display *display, Config *configuration, gl::Context } break; - case EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE: - if (!display->getExtensions().createContextWebGLCompatibility) - { - return Error(EGL_BAD_ATTRIBUTE, - "Attribute EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE requires " - "EGL_ANGLE_create_context_webgl_compatibility."); - } - if (value != EGL_TRUE && value != EGL_FALSE) - { - return Error( - EGL_BAD_ATTRIBUTE, - "EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE must be EGL_TRUE or EGL_FALSE."); - } - break; - - case EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM: - if (!display->getExtensions().createContextBindGeneratesResource) - { - return Error(EGL_BAD_ATTRIBUTE, - "Attribute EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM requires " - "EGL_CHROMIUM_create_context_bind_generates_resource."); - } - if (value != EGL_TRUE && value != EGL_FALSE) - { - return Error(EGL_BAD_ATTRIBUTE, - "EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM must be EGL_TRUE or " - "EGL_FALSE."); - } - break; - default: return Error(EGL_BAD_ATTRIBUTE); } @@ -397,6 +369,17 @@ Error ValidateCreateContext(Display *display, Config *configuration, gl::Context return Error(EGL_BAD_ATTRIBUTE); } + if ((contextFlags & EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR) > 0) + { + robustAccess = true; + } + + if (robustAccess) + { + // Unimplemented + return Error(EGL_BAD_CONFIG); + } + if (shareContext) { // Shared context is invalid or is owned by another display @@ -640,17 +623,6 @@ Error ValidateCreatePbufferFromClientBuffer(Display *display, EGLenum buftype, E } break; - case EGL_D3D_TEXTURE_ANGLE: - if (!displayExtensions.d3dTextureClientBuffer) - { - return Error(EGL_BAD_PARAMETER); - } - if (buffer == nullptr) - { - return Error(EGL_BAD_PARAMETER); - } - break; - default: return Error(EGL_BAD_PARAMETER); } @@ -751,8 +723,6 @@ Error ValidateCreatePbufferFromClientBuffer(Display *display, EGLenum buftype, E } } - ANGLE_TRY(display->validateClientBuffer(config, buftype, buffer, attributes)); - return Error(EGL_SUCCESS); } @@ -1576,41 +1546,4 @@ Error ValidateStreamPostD3DTextureNV12ANGLE(const Display *display, return stream->validateD3D11NV12Texture(texture); } - -Error ValidateSwapBuffersWithDamageEXT(const Display *display, - const Surface *surface, - EGLint *rects, - EGLint n_rects) -{ - Error error = ValidateSurface(display, surface); - if (error.isError()) - { - return error; - } - - if (!display->getExtensions().swapBuffersWithDamage) - { - // It is out of spec what happens when calling an extension function when the extension is - // not available. EGL_BAD_DISPLAY seems like a reasonable error. - return Error(EGL_BAD_DISPLAY, "EGL_EXT_swap_buffers_with_damage is not available."); - } - - if (surface == EGL_NO_SURFACE) - { - return Error(EGL_BAD_SURFACE, "Swap surface cannot be EGL_NO_SURFACE."); - } - - if (n_rects < 0) - { - return Error(EGL_BAD_PARAMETER, "n_rects cannot be negative."); - } - - if (n_rects > 0 && rects == nullptr) - { - return Error(EGL_BAD_PARAMETER, "n_rects cannot be greater than zero when rects is NULL."); - } - - return Error(EGL_SUCCESS); -} - } // namespace gl diff --git a/gfx/angle/src/libANGLE/validationEGL.h b/gfx/angle/src/libANGLE/validationEGL.h index c299f860c..049279087 100755 --- a/gfx/angle/src/libANGLE/validationEGL.h +++ b/gfx/angle/src/libANGLE/validationEGL.h @@ -32,9 +32,9 @@ class Surface; // Object validation Error ValidateDisplay(const Display *display); -Error ValidateSurface(const Display *display, const Surface *surface); +Error ValidateSurface(const Display *display, Surface *surface); Error ValidateConfig(const Display *display, const Config *config); -Error ValidateContext(const Display *display, const gl::Context *context); +Error ValidateContext(const Display *display, gl::Context *context); Error ValidateImage(const Display *display, const Image *image); // Entry point validation @@ -95,11 +95,6 @@ Error ValidateStreamPostD3DTextureNV12ANGLE(const Display *display, void *texture, const AttributeMap &attribs); -Error ValidateSwapBuffersWithDamageEXT(const Display *display, - const Surface *surface, - EGLint *rects, - EGLint n_rects); - // Other validation Error ValidateCompatibleConfigs(const Display *display, const Config *config1, diff --git a/gfx/angle/src/libANGLE/validationES.cpp b/gfx/angle/src/libANGLE/validationES.cpp index 79e3f6636..1bbfe866e 100755 --- a/gfx/angle/src/libANGLE/validationES.cpp +++ b/gfx/angle/src/libANGLE/validationES.cpp @@ -99,5191 +99,3004 @@ bool ValidateDrawAttribs(ValidationContext *context, GLint primcount, GLint maxV return true; } -bool ValidReadPixelsFormatType(ValidationContext *context, - GLenum framebufferComponentType, - GLenum format, - GLenum type) +} // anonymous namespace + +bool ValidCap(const Context *context, GLenum cap) { - switch (framebufferComponentType) + switch (cap) { - case GL_UNSIGNED_NORMALIZED: - // TODO(geofflang): Don't accept BGRA here. Some chrome internals appear to try to use - // ReadPixels with BGRA even if the extension is not present - return (format == GL_RGBA && type == GL_UNSIGNED_BYTE) || - (context->getExtensions().readFormatBGRA && format == GL_BGRA_EXT && - type == GL_UNSIGNED_BYTE); - - case GL_SIGNED_NORMALIZED: - return (format == GL_RGBA && type == GL_UNSIGNED_BYTE); - - case GL_INT: - return (format == GL_RGBA_INTEGER && type == GL_INT); + // EXT_multisample_compatibility + case GL_MULTISAMPLE_EXT: + case GL_SAMPLE_ALPHA_TO_ONE_EXT: + return context->getExtensions().multisampleCompatibility; + + case GL_CULL_FACE: + case GL_POLYGON_OFFSET_FILL: + case GL_SAMPLE_ALPHA_TO_COVERAGE: + case GL_SAMPLE_COVERAGE: + case GL_SCISSOR_TEST: + case GL_STENCIL_TEST: + case GL_DEPTH_TEST: + case GL_BLEND: + case GL_DITHER: + return true; - case GL_UNSIGNED_INT: - return (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_INT); + case GL_PRIMITIVE_RESTART_FIXED_INDEX: + case GL_RASTERIZER_DISCARD: + return (context->getClientMajorVersion() >= 3); - case GL_FLOAT: - return (format == GL_RGBA && type == GL_FLOAT); + case GL_DEBUG_OUTPUT_SYNCHRONOUS: + case GL_DEBUG_OUTPUT: + return context->getExtensions().debug; - default: - UNREACHABLE(); - return false; + default: + return false; } } -bool ValidCap(const Context *context, GLenum cap, bool queryOnly) +bool ValidTextureTarget(const ValidationContext *context, GLenum target) { - switch (cap) + switch (target) { - // EXT_multisample_compatibility - case GL_MULTISAMPLE_EXT: - case GL_SAMPLE_ALPHA_TO_ONE_EXT: - return context->getExtensions().multisampleCompatibility; - - case GL_CULL_FACE: - case GL_POLYGON_OFFSET_FILL: - case GL_SAMPLE_ALPHA_TO_COVERAGE: - case GL_SAMPLE_COVERAGE: - case GL_SCISSOR_TEST: - case GL_STENCIL_TEST: - case GL_DEPTH_TEST: - case GL_BLEND: - case GL_DITHER: - return true; - - case GL_PRIMITIVE_RESTART_FIXED_INDEX: - case GL_RASTERIZER_DISCARD: - return (context->getClientMajorVersion() >= 3); + case GL_TEXTURE_2D: + case GL_TEXTURE_CUBE_MAP: + return true; - case GL_DEBUG_OUTPUT_SYNCHRONOUS: - case GL_DEBUG_OUTPUT: - return context->getExtensions().debug; + case GL_TEXTURE_3D: + case GL_TEXTURE_2D_ARRAY: + return (context->getClientMajorVersion() >= 3); - case GL_BIND_GENERATES_RESOURCE_CHROMIUM: - return queryOnly && context->getExtensions().bindGeneratesResource; + default: + return false; + } +} - case GL_FRAMEBUFFER_SRGB_EXT: - return context->getExtensions().sRGBWriteControl; +bool ValidTexture2DTarget(const ValidationContext *context, GLenum target) +{ + switch (target) + { + case GL_TEXTURE_2D: + case GL_TEXTURE_CUBE_MAP: + return true; default: return false; } } -bool ValidateReadPixelsBase(ValidationContext *context, - GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLsizei bufSize, - GLsizei *length, - GLvoid *pixels) +bool ValidTexture3DTarget(const ValidationContext *context, GLenum target) { - if (length != nullptr) + switch (target) { - *length = 0; - } + case GL_TEXTURE_3D: + case GL_TEXTURE_2D_ARRAY: + return (context->getClientMajorVersion() >= 3); - if (width < 0 || height < 0) - { - context->handleError(Error(GL_INVALID_VALUE, "width and height must be positive")); - return false; + default: + return false; } +} - auto readFramebuffer = context->getGLState().getReadFramebuffer(); +// Most texture GL calls are not compatible with external textures, so we have a separate validation +// function for use in the GL calls that do +bool ValidTextureExternalTarget(const ValidationContext *context, GLenum target) +{ + return (target == GL_TEXTURE_EXTERNAL_OES) && + (context->getExtensions().eglImageExternal || + context->getExtensions().eglStreamConsumerExternal); +} - if (readFramebuffer->checkStatus(context->getContextState()) != GL_FRAMEBUFFER_COMPLETE) +// This function differs from ValidTextureTarget in that the target must be +// usable as the destination of a 2D operation-- so a cube face is valid, but +// GL_TEXTURE_CUBE_MAP is not. +// Note: duplicate of IsInternalTextureTarget +bool ValidTexture2DDestinationTarget(const ValidationContext *context, GLenum target) +{ + switch (target) { - context->handleError(Error(GL_INVALID_FRAMEBUFFER_OPERATION)); - return false; + case GL_TEXTURE_2D: + case GL_TEXTURE_CUBE_MAP_POSITIVE_X: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: + case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: + case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: + return true; + default: + return false; } +} - if (readFramebuffer->id() != 0 && readFramebuffer->getSamples(context->getContextState()) != 0) +bool ValidTexture3DDestinationTarget(const ValidationContext *context, GLenum target) +{ + switch (target) { - context->handleError(Error(GL_INVALID_OPERATION)); + case GL_TEXTURE_3D: + case GL_TEXTURE_2D_ARRAY: + return true; + default: return false; } +} - const Framebuffer *framebuffer = context->getGLState().getReadFramebuffer(); - ASSERT(framebuffer); +bool ValidFramebufferTarget(GLenum target) +{ + static_assert(GL_DRAW_FRAMEBUFFER_ANGLE == GL_DRAW_FRAMEBUFFER && GL_READ_FRAMEBUFFER_ANGLE == GL_READ_FRAMEBUFFER, + "ANGLE framebuffer enums must equal the ES3 framebuffer enums."); - if (framebuffer->getReadBufferState() == GL_NONE) + switch (target) { - context->handleError(Error(GL_INVALID_OPERATION, "Read buffer is GL_NONE")); - return false; + case GL_FRAMEBUFFER: return true; + case GL_READ_FRAMEBUFFER: return true; + case GL_DRAW_FRAMEBUFFER: return true; + default: return false; } +} - const FramebufferAttachment *readBuffer = framebuffer->getReadColorbuffer(); - if (!readBuffer) +bool ValidBufferTarget(const Context *context, GLenum target) +{ + switch (target) { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - GLenum currentFormat = framebuffer->getImplementationColorReadFormat(); - GLenum currentType = framebuffer->getImplementationColorReadType(); - GLenum currentInternalFormat = readBuffer->getFormat().asSized(); + case GL_ARRAY_BUFFER: + case GL_ELEMENT_ARRAY_BUFFER: + return true; - const gl::InternalFormat &internalFormatInfo = gl::GetInternalFormatInfo(currentInternalFormat); - bool validFormatTypeCombination = - ValidReadPixelsFormatType(context, internalFormatInfo.componentType, format, type); + case GL_PIXEL_PACK_BUFFER: + case GL_PIXEL_UNPACK_BUFFER: + return (context->getExtensions().pixelBufferObject || + context->getClientMajorVersion() >= 3); - if (!(currentFormat == format && currentType == type) && !validFormatTypeCombination) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } + case GL_COPY_READ_BUFFER: + case GL_COPY_WRITE_BUFFER: + case GL_TRANSFORM_FEEDBACK_BUFFER: + case GL_UNIFORM_BUFFER: + return (context->getClientMajorVersion() >= 3); - // Check for pixel pack buffer related API errors - gl::Buffer *pixelPackBuffer = context->getGLState().getTargetBuffer(GL_PIXEL_PACK_BUFFER); - if (pixelPackBuffer != nullptr && pixelPackBuffer->isMapped()) - { - // ...the buffer object's data store is currently mapped. - context->handleError(Error(GL_INVALID_OPERATION, "Pixel pack buffer is mapped.")); + default: return false; } +} - // .. the data would be packed to the buffer object such that the memory writes required - // would exceed the data store size. - GLenum sizedInternalFormat = GetSizedInternalFormat(format, type); - const InternalFormat &formatInfo = GetInternalFormatInfo(sizedInternalFormat); - const gl::Extents size(width, height, 1); - const auto &pack = context->getGLState().getPackState(); +bool ValidBufferParameter(const Context *context, GLenum pname) +{ + const Extensions &extensions = context->getExtensions(); - auto endByteOrErr = formatInfo.computePackUnpackEndByte(size, pack, false); - if (endByteOrErr.isError()) + switch (pname) { - context->handleError(endByteOrErr.getError()); - return false; - } + case GL_BUFFER_USAGE: + case GL_BUFFER_SIZE: + return true; - size_t endByte = endByteOrErr.getResult(); - if (bufSize >= 0) - { + case GL_BUFFER_ACCESS_OES: + return extensions.mapBuffer; - if (static_cast(bufSize) < endByte) - { - context->handleError( - Error(GL_INVALID_OPERATION, "bufSize must be at least %u bytes.", endByte)); - return false; - } - } + case GL_BUFFER_MAPPED: + static_assert(GL_BUFFER_MAPPED == GL_BUFFER_MAPPED_OES, "GL enums should be equal."); + return (context->getClientMajorVersion() >= 3) || extensions.mapBuffer || + extensions.mapBufferRange; - if (pixelPackBuffer != nullptr) - { - CheckedNumeric checkedEndByte(endByte); - CheckedNumeric checkedOffset(reinterpret_cast(pixels)); - checkedEndByte += checkedOffset; + // GL_BUFFER_MAP_POINTER is a special case, and may only be + // queried with GetBufferPointerv + case GL_BUFFER_ACCESS_FLAGS: + case GL_BUFFER_MAP_OFFSET: + case GL_BUFFER_MAP_LENGTH: + return (context->getClientMajorVersion() >= 3) || extensions.mapBufferRange; - if (checkedEndByte.ValueOrDie() > static_cast(pixelPackBuffer->getSize())) - { - // Overflow past the end of the buffer - context->handleError( - Error(GL_INVALID_OPERATION, "Writes would overflow the pixel pack buffer.")); - return false; - } + default: + return false; } +} - if (length != nullptr) +bool ValidMipLevel(const ValidationContext *context, GLenum target, GLint level) +{ + const auto &caps = context->getCaps(); + size_t maxDimension = 0; + switch (target) { - if (endByte > static_cast(std::numeric_limits::max())) - { - context->handleError( - Error(GL_INVALID_OPERATION, "length would overflow GLsizei.", endByte)); - return false; - } - - *length = static_cast(endByte); + case GL_TEXTURE_2D: + maxDimension = caps.max2DTextureSize; + break; + case GL_TEXTURE_CUBE_MAP: + case GL_TEXTURE_CUBE_MAP_POSITIVE_X: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: + case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: + case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: + maxDimension = caps.maxCubeMapTextureSize; + break; + case GL_TEXTURE_3D: + maxDimension = caps.max3DTextureSize; + break; + case GL_TEXTURE_2D_ARRAY: + maxDimension = caps.max2DTextureSize; + break; + default: UNREACHABLE(); } - return true; + return level <= gl::log2(static_cast(maxDimension)); } -bool ValidateGetRenderbufferParameterivBase(Context *context, - GLenum target, - GLenum pname, - GLsizei *length) +bool ValidImageSizeParameters(const Context *context, + GLenum target, + GLint level, + GLsizei width, + GLsizei height, + GLsizei depth, + bool isSubImage) { - if (length) + if (level < 0 || width < 0 || height < 0 || depth < 0) { - *length = 0; + return false; } - if (target != GL_RENDERBUFFER) + // TexSubImage parameters can be NPOT without textureNPOT extension, + // as long as the destination texture is POT. + if (!isSubImage && !context->getExtensions().textureNPOT && + (level != 0 && (!gl::isPow2(width) || !gl::isPow2(height) || !gl::isPow2(depth)))) { - context->handleError(Error(GL_INVALID_ENUM, "Invalid target.")); return false; } - Renderbuffer *renderbuffer = context->getGLState().getCurrentRenderbuffer(); - if (renderbuffer == nullptr) + if (!ValidMipLevel(context, target, level)) { - context->handleError(Error(GL_INVALID_OPERATION, "No renderbuffer bound.")); return false; } - switch (pname) - { - case GL_RENDERBUFFER_WIDTH: - case GL_RENDERBUFFER_HEIGHT: - case GL_RENDERBUFFER_INTERNAL_FORMAT: - case GL_RENDERBUFFER_RED_SIZE: - case GL_RENDERBUFFER_GREEN_SIZE: - case GL_RENDERBUFFER_BLUE_SIZE: - case GL_RENDERBUFFER_ALPHA_SIZE: - case GL_RENDERBUFFER_DEPTH_SIZE: - case GL_RENDERBUFFER_STENCIL_SIZE: - break; + return true; +} - case GL_RENDERBUFFER_SAMPLES_ANGLE: - if (!context->getExtensions().framebufferMultisample) - { - context->handleError( - Error(GL_INVALID_ENUM, "GL_ANGLE_framebuffer_multisample is not enabled.")); - return false; - } - break; +bool CompressedTextureFormatRequiresExactSize(GLenum internalFormat) +{ + // List of compressed format that require that the texture size is smaller than or a multiple of + // the compressed block size. + switch (internalFormat) + { + case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE: + case GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE: + case GL_ETC1_RGB8_LOSSY_DECODE_ANGLE: + return true; default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown pname.")); return false; } - - if (length) - { - *length = 1; - } - return true; } -bool ValidateGetShaderivBase(Context *context, GLuint shader, GLenum pname, GLsizei *length) +bool ValidCompressedImageSize(const ValidationContext *context, + GLenum internalFormat, + GLsizei width, + GLsizei height) { - if (length) + const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(internalFormat); + if (!formatInfo.compressed) { - *length = 0; + return false; } - if (GetValidShader(context, shader) == nullptr) + if (width < 0 || height < 0) { return false; } - switch (pname) + if (CompressedTextureFormatRequiresExactSize(internalFormat)) { - case GL_SHADER_TYPE: - case GL_DELETE_STATUS: - case GL_COMPILE_STATUS: - case GL_INFO_LOG_LENGTH: - case GL_SHADER_SOURCE_LENGTH: - break; - - case GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE: - if (!context->getExtensions().translatedShaderSource) - { - context->handleError( - Error(GL_INVALID_ENUM, "GL_ANGLE_translated_shader_source is not enabled.")); - return false; - } - break; - - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown pname.")); + if ((static_cast(width) > formatInfo.compressedBlockWidth && + width % formatInfo.compressedBlockWidth != 0) || + (static_cast(height) > formatInfo.compressedBlockHeight && + height % formatInfo.compressedBlockHeight != 0)) + { return false; + } } - if (length) - { - *length = 1; - } return true; } -bool ValidateGetTexParameterBase(Context *context, GLenum target, GLenum pname, GLsizei *length) +bool ValidQueryType(const Context *context, GLenum queryType) { - if (length) - { - *length = 0; - } - - if (!ValidTextureTarget(context, target) && !ValidTextureExternalTarget(context, target)) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid texture target")); - return false; - } + static_assert(GL_ANY_SAMPLES_PASSED == GL_ANY_SAMPLES_PASSED_EXT, "GL extension enums not equal."); + static_assert(GL_ANY_SAMPLES_PASSED_CONSERVATIVE == GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, "GL extension enums not equal."); - if (context->getTargetTexture(target) == nullptr) + switch (queryType) { - // Should only be possible for external textures - context->handleError(Error(GL_INVALID_ENUM, "No texture bound.")); + case GL_ANY_SAMPLES_PASSED: + case GL_ANY_SAMPLES_PASSED_CONSERVATIVE: + return true; + case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: + return (context->getClientMajorVersion() >= 3); + case GL_TIME_ELAPSED_EXT: + return context->getExtensions().disjointTimerQuery; + case GL_COMMANDS_COMPLETED_CHROMIUM: + return context->getExtensions().syncQuery; + default: return false; } +} - switch (pname) - { - case GL_TEXTURE_MAG_FILTER: - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - break; - - case GL_TEXTURE_USAGE_ANGLE: - if (!context->getExtensions().textureUsage) - { - context->handleError( - Error(GL_INVALID_ENUM, "GL_ANGLE_texture_usage is not enabled.")); - return false; - } - break; +Program *GetValidProgram(Context *context, GLuint id) +{ + // ES3 spec (section 2.11.1) -- "Commands that accept shader or program object names will generate the + // error INVALID_VALUE if the provided name is not the name of either a shader or program object and + // INVALID_OPERATION if the provided name identifies an object that is not the expected type." - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - if (!context->getExtensions().textureFilterAnisotropic) - { - context->handleError( - Error(GL_INVALID_ENUM, "GL_EXT_texture_filter_anisotropic is not enabled.")); - return false; - } - break; + Program *validProgram = context->getProgram(id); - case GL_TEXTURE_IMMUTABLE_FORMAT: - if (context->getClientMajorVersion() < 3 && !context->getExtensions().textureStorage) - { - context->handleError( - Error(GL_INVALID_ENUM, "GL_EXT_texture_storage is not enabled.")); - return false; - } - break; + if (!validProgram) + { + if (context->getShader(id)) + { + context->handleError( + Error(GL_INVALID_OPERATION, "Expected a program name, but found a shader name")); + } + else + { + context->handleError(Error(GL_INVALID_VALUE, "Program name is not valid")); + } + } - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_IMMUTABLE_LEVELS: - case GL_TEXTURE_SWIZZLE_R: - case GL_TEXTURE_SWIZZLE_G: - case GL_TEXTURE_SWIZZLE_B: - case GL_TEXTURE_SWIZZLE_A: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - case GL_TEXTURE_COMPARE_MODE: - case GL_TEXTURE_COMPARE_FUNC: - if (context->getClientMajorVersion() < 3) - { - context->handleError(Error(GL_INVALID_ENUM, "pname requires OpenGL ES 3.0.")); - return false; - } - break; + return validProgram; +} - case GL_TEXTURE_SRGB_DECODE_EXT: - if (!context->getExtensions().textureSRGBDecode) - { - context->handleError( - Error(GL_INVALID_ENUM, "GL_EXT_texture_sRGB_decode is not enabled.")); - return false; - } - break; +Shader *GetValidShader(Context *context, GLuint id) +{ + // See ValidProgram for spec details. - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown pname.")); - return false; - } + Shader *validShader = context->getShader(id); - if (length) + if (!validShader) { - *length = 1; + if (context->getProgram(id)) + { + context->handleError( + Error(GL_INVALID_OPERATION, "Expected a shader name, but found a program name")); + } + else + { + context->handleError(Error(GL_INVALID_VALUE, "Shader name is invalid")); + } } - return true; + + return validShader; } -template -bool ValidateTextureWrapModeValue(Context *context, ParamType *params, bool isExternalTextureTarget) +bool ValidateAttachmentTarget(gl::Context *context, GLenum attachment) { - switch (ConvertToGLenum(params[0])) + if (attachment >= GL_COLOR_ATTACHMENT0_EXT && attachment <= GL_COLOR_ATTACHMENT15_EXT) { - case GL_CLAMP_TO_EDGE: - break; - - case GL_REPEAT: - case GL_MIRRORED_REPEAT: - if (isExternalTextureTarget) - { - // OES_EGL_image_external specifies this error. - context->handleError(Error( - GL_INVALID_ENUM, "external textures only support CLAMP_TO_EDGE wrap mode")); - return false; - } - break; + const unsigned int colorAttachment = (attachment - GL_COLOR_ATTACHMENT0_EXT); - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown param value.")); + if (colorAttachment >= context->getCaps().maxColorAttachments) + { + context->handleError(Error(GL_INVALID_VALUE)); return false; + } + } + else + { + switch (attachment) + { + case GL_DEPTH_ATTACHMENT: + case GL_STENCIL_ATTACHMENT: + break; + + case GL_DEPTH_STENCIL_ATTACHMENT: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return false; + } + break; + + default: + context->handleError(Error(GL_INVALID_ENUM)); + return false; + } } return true; } -template -bool ValidateTextureMinFilterValue(Context *context, - ParamType *params, - bool isExternalTextureTarget) +bool ValidateRenderbufferStorageParametersBase(gl::Context *context, GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height) { - switch (ConvertToGLenum(params[0])) + switch (target) { - case GL_NEAREST: - case GL_LINEAR: - break; + case GL_RENDERBUFFER: + break; + default: + context->handleError(Error(GL_INVALID_ENUM)); + return false; + } - case GL_NEAREST_MIPMAP_NEAREST: - case GL_LINEAR_MIPMAP_NEAREST: - case GL_NEAREST_MIPMAP_LINEAR: - case GL_LINEAR_MIPMAP_LINEAR: - if (isExternalTextureTarget) - { - // OES_EGL_image_external specifies this error. - context->handleError( - Error(GL_INVALID_ENUM, - "external textures only support NEAREST and LINEAR filtering")); - return false; - } - break; + if (width < 0 || height < 0 || samples < 0) + { + context->handleError(Error(GL_INVALID_VALUE)); + return false; + } - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown param value.")); - return false; + const TextureCaps &formatCaps = context->getTextureCaps().get(internalformat); + if (!formatCaps.renderable) + { + context->handleError(Error(GL_INVALID_ENUM)); + return false; } - return true; -} + // ANGLE_framebuffer_multisample does not explicitly state that the internal format must be + // sized but it does state that the format must be in the ES2.0 spec table 4.5 which contains + // only sized internal formats. + const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(internalformat); + if (formatInfo.pixelBytes == 0) + { + context->handleError(Error(GL_INVALID_ENUM)); + return false; + } -template -bool ValidateTextureMagFilterValue(Context *context, ParamType *params) -{ - switch (ConvertToGLenum(params[0])) + if (static_cast(std::max(width, height)) > context->getCaps().maxRenderbufferSize) { - case GL_NEAREST: - case GL_LINEAR: - break; + context->handleError(Error(GL_INVALID_VALUE)); + return false; + } - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown param value.")); - return false; + GLuint handle = context->getGLState().getRenderbufferId(); + if (handle == 0) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; } return true; } -template -bool ValidateTextureCompareModeValue(Context *context, ParamType *params) +bool ValidateRenderbufferStorageParametersANGLE(gl::Context *context, GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height) { - // Acceptable mode parameters from GLES 3.0.2 spec, table 3.17 - switch (ConvertToGLenum(params[0])) + ASSERT(samples == 0 || context->getExtensions().framebufferMultisample); + + // ANGLE_framebuffer_multisample states that the value of samples must be less than or equal + // to MAX_SAMPLES_ANGLE (Context::getCaps().maxSamples) otherwise GL_INVALID_VALUE is + // generated. + if (static_cast(samples) > context->getCaps().maxSamples) { - case GL_NONE: - case GL_COMPARE_REF_TO_TEXTURE: - break; + context->handleError(Error(GL_INVALID_VALUE)); + return false; + } - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown param value.")); + // ANGLE_framebuffer_multisample states GL_OUT_OF_MEMORY is generated on a failure to create + // the specified storage. This is different than ES 3.0 in which a sample number higher + // than the maximum sample number supported by this format generates a GL_INVALID_VALUE. + // The TextureCaps::getMaxSamples method is only guarenteed to be valid when the context is ES3. + if (context->getClientMajorVersion() >= 3) + { + const TextureCaps &formatCaps = context->getTextureCaps().get(internalformat); + if (static_cast(samples) > formatCaps.getMaxSamples()) + { + context->handleError(Error(GL_OUT_OF_MEMORY)); return false; + } } - return true; + return ValidateRenderbufferStorageParametersBase(context, target, samples, internalformat, width, height); } -template -bool ValidateTextureCompareFuncValue(Context *context, ParamType *params) +bool ValidateFramebufferRenderbufferParameters(gl::Context *context, GLenum target, GLenum attachment, + GLenum renderbuffertarget, GLuint renderbuffer) { - // Acceptable function parameters from GLES 3.0.2 spec, table 3.17 - switch (ConvertToGLenum(params[0])) - { - case GL_LEQUAL: - case GL_GEQUAL: - case GL_LESS: - case GL_GREATER: - case GL_EQUAL: - case GL_NOTEQUAL: - case GL_ALWAYS: - case GL_NEVER: - break; - - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown param value.")); - return false; + if (!ValidFramebufferTarget(target)) + { + context->handleError(Error(GL_INVALID_ENUM)); + return false; } - return true; -} + gl::Framebuffer *framebuffer = context->getGLState().getTargetFramebuffer(target); -template -bool ValidateTextureSRGBDecodeValue(Context *context, ParamType *params) -{ - if (!context->getExtensions().textureSRGBDecode) + ASSERT(framebuffer); + if (framebuffer->id() == 0) { - context->handleError(Error(GL_INVALID_ENUM, "GL_EXT_texture_sRGB_decode is not enabled.")); + context->handleError( + Error(GL_INVALID_OPERATION, "Cannot change default FBO's attachments")); return false; } - switch (ConvertToGLenum(params[0])) + if (!ValidateAttachmentTarget(context, attachment)) { - case GL_DECODE_EXT: - case GL_SKIP_DECODE_EXT: - break; + return false; + } - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown param value.")); + // [OpenGL ES 2.0.25] Section 4.4.3 page 112 + // [OpenGL ES 3.0.2] Section 4.4.2 page 201 + // 'renderbuffer' must be either zero or the name of an existing renderbuffer object of + // type 'renderbuffertarget', otherwise an INVALID_OPERATION error is generated. + if (renderbuffer != 0) + { + if (!context->getRenderbuffer(renderbuffer)) + { + context->handleError(Error(GL_INVALID_OPERATION)); return false; + } } return true; } -template -bool ValidateTexParameterBase(Context *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - ParamType *params) +bool ValidateBlitFramebufferParameters(ValidationContext *context, + GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) { - if (!ValidTextureTarget(context, target) && !ValidTextureExternalTarget(context, target)) + switch (filter) { - context->handleError(Error(GL_INVALID_ENUM, "Invalid texture target")); + case GL_NEAREST: + break; + case GL_LINEAR: + break; + default: + context->handleError(Error(GL_INVALID_ENUM)); return false; } - if (context->getTargetTexture(target) == nullptr) + if ((mask & ~(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)) != 0) { - // Should only be possible for external textures - context->handleError(Error(GL_INVALID_ENUM, "No texture bound.")); + context->handleError(Error(GL_INVALID_VALUE)); return false; } - const GLsizei minBufSize = 1; - if (bufSize >= 0 && bufSize < minBufSize) + if (mask == 0) { - context->handleError( - Error(GL_INVALID_OPERATION, "bufSize must be at least %i.", minBufSize)); - return false; + // ES3.0 spec, section 4.3.2 specifies that a mask of zero is valid and no + // buffers are copied. + return false; } - switch (pname) + // ES3.0 spec, section 4.3.2 states that linear filtering is only available for the + // color buffer, leaving only nearest being unfiltered from above + if ((mask & ~GL_COLOR_BUFFER_BIT) != 0 && filter != GL_NEAREST) { - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_SWIZZLE_R: - case GL_TEXTURE_SWIZZLE_G: - case GL_TEXTURE_SWIZZLE_B: - case GL_TEXTURE_SWIZZLE_A: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - case GL_TEXTURE_COMPARE_MODE: - case GL_TEXTURE_COMPARE_FUNC: - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - if (context->getClientMajorVersion() < 3) - { - context->handleError(Error(GL_INVALID_ENUM, "pname requires OpenGL ES 3.0.")); - return false; - } - if (target == GL_TEXTURE_EXTERNAL_OES && - !context->getExtensions().eglImageExternalEssl3) - { - context->handleError(Error(GL_INVALID_ENUM, - "ES3 texture parameters are not available without " - "GL_OES_EGL_image_external_essl3.")); - return false; - } - break; - - default: - break; + context->handleError(Error(GL_INVALID_OPERATION)); + return false; } - switch (pname) - { - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_WRAP_R: - if (!ValidateTextureWrapModeValue(context, params, target == GL_TEXTURE_EXTERNAL_OES)) - { - return false; - } - break; - - case GL_TEXTURE_MIN_FILTER: - if (!ValidateTextureMinFilterValue(context, params, target == GL_TEXTURE_EXTERNAL_OES)) - { - return false; - } - break; - - case GL_TEXTURE_MAG_FILTER: - if (!ValidateTextureMagFilterValue(context, params)) - { - return false; - } - break; - - case GL_TEXTURE_USAGE_ANGLE: - switch (ConvertToGLenum(params[0])) - { - case GL_NONE: - case GL_FRAMEBUFFER_ATTACHMENT_ANGLE: - break; - - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown param value.")); - return false; - } - break; - - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - if (!context->getExtensions().textureFilterAnisotropic) - { - context->handleError( - Error(GL_INVALID_ENUM, "GL_EXT_texture_anisotropic is not enabled.")); - return false; - } - - // we assume the parameter passed to this validation method is truncated, not rounded - if (params[0] < 1) - { - context->handleError(Error(GL_INVALID_VALUE, "Max anisotropy must be at least 1.")); - return false; - } - break; - - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - // any value is permissible - break; - - case GL_TEXTURE_COMPARE_MODE: - if (!ValidateTextureCompareModeValue(context, params)) - { - return false; - } - break; - - case GL_TEXTURE_COMPARE_FUNC: - if (!ValidateTextureCompareFuncValue(context, params)) - { - return false; - } - break; - - case GL_TEXTURE_SWIZZLE_R: - case GL_TEXTURE_SWIZZLE_G: - case GL_TEXTURE_SWIZZLE_B: - case GL_TEXTURE_SWIZZLE_A: - switch (ConvertToGLenum(params[0])) - { - case GL_RED: - case GL_GREEN: - case GL_BLUE: - case GL_ALPHA: - case GL_ZERO: - case GL_ONE: - break; - - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown param value.")); - return false; - } - break; - - case GL_TEXTURE_BASE_LEVEL: - if (params[0] < 0) - { - context->handleError(Error(GL_INVALID_VALUE, "Base level must be at least 0.")); - return false; - } - if (target == GL_TEXTURE_EXTERNAL_OES && static_cast(params[0]) != 0) - { - context->handleError( - Error(GL_INVALID_OPERATION, "Base level must be 0 for external textures.")); - return false; - } - break; - - case GL_TEXTURE_MAX_LEVEL: - if (params[0] < 0) - { - context->handleError(Error(GL_INVALID_VALUE, "Max level must be at least 0.")); - return false; - } - break; - - case GL_TEXTURE_SRGB_DECODE_EXT: - if (!ValidateTextureSRGBDecodeValue(context, params)) - { - return false; - } - break; + const auto &glState = context->getGLState(); + gl::Framebuffer *readFramebuffer = glState.getReadFramebuffer(); + gl::Framebuffer *drawFramebuffer = glState.getDrawFramebuffer(); - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown pname.")); - return false; + if (!readFramebuffer || !drawFramebuffer) + { + context->handleError(Error(GL_INVALID_FRAMEBUFFER_OPERATION)); + return false; } - return true; -} + if (readFramebuffer->id() == drawFramebuffer->id()) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } -template -bool ValidateSamplerParameterBase(Context *context, - GLuint sampler, - GLenum pname, - GLsizei bufSize, - ParamType *params) -{ - if (context->getClientMajorVersion() < 3) + if (readFramebuffer->checkStatus(context->getContextState()) != GL_FRAMEBUFFER_COMPLETE) { - context->handleError( - Error(GL_INVALID_OPERATION, "Context does not support OpenGL ES 3.0.")); + context->handleError(Error(GL_INVALID_FRAMEBUFFER_OPERATION)); return false; } - if (!context->isSampler(sampler)) + if (drawFramebuffer->checkStatus(context->getContextState()) != GL_FRAMEBUFFER_COMPLETE) { - context->handleError(Error(GL_INVALID_OPERATION, "Sampler is not valid.")); + context->handleError(Error(GL_INVALID_FRAMEBUFFER_OPERATION)); return false; } - const GLsizei minBufSize = 1; - if (bufSize >= 0 && bufSize < minBufSize) + if (drawFramebuffer->getSamples(context->getContextState()) != 0) { - context->handleError( - Error(GL_INVALID_OPERATION, "bufSize must be at least %i.", minBufSize)); + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - switch (pname) + bool sameBounds = srcX0 == dstX0 && srcY0 == dstY0 && srcX1 == dstX1 && srcY1 == dstY1; + + if (mask & GL_COLOR_BUFFER_BIT) { - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_WRAP_R: - if (!ValidateTextureWrapModeValue(context, params, false)) - { - return false; - } - break; + const gl::FramebufferAttachment *readColorBuffer = readFramebuffer->getReadColorbuffer(); + const gl::FramebufferAttachment *drawColorBuffer = drawFramebuffer->getFirstColorbuffer(); + const Extensions &extensions = context->getExtensions(); - case GL_TEXTURE_MIN_FILTER: - if (!ValidateTextureMinFilterValue(context, params, false)) - { - return false; - } - break; + if (readColorBuffer && drawColorBuffer) + { + const Format &readFormat = readColorBuffer->getFormat(); - case GL_TEXTURE_MAG_FILTER: - if (!ValidateTextureMagFilterValue(context, params)) + for (size_t drawbufferIdx = 0; + drawbufferIdx < drawFramebuffer->getDrawbufferStateCount(); ++drawbufferIdx) { - return false; - } - break; + const FramebufferAttachment *attachment = + drawFramebuffer->getDrawBuffer(drawbufferIdx); + if (attachment) + { + const Format &drawFormat = attachment->getFormat(); - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - // any value is permissible - break; + // The GL ES 3.0.2 spec (pg 193) states that: + // 1) If the read buffer is fixed point format, the draw buffer must be as well + // 2) If the read buffer is an unsigned integer format, the draw buffer must be as well + // 3) If the read buffer is a signed integer format, the draw buffer must be as well + // Changes with EXT_color_buffer_float: + // Case 1) is changed to fixed point OR floating point + GLenum readComponentType = readFormat.info->componentType; + GLenum drawComponentType = drawFormat.info->componentType; + bool readFixedPoint = (readComponentType == GL_UNSIGNED_NORMALIZED || + readComponentType == GL_SIGNED_NORMALIZED); + bool drawFixedPoint = (drawComponentType == GL_UNSIGNED_NORMALIZED || + drawComponentType == GL_SIGNED_NORMALIZED); - case GL_TEXTURE_COMPARE_MODE: - if (!ValidateTextureCompareModeValue(context, params)) - { - return false; + if (extensions.colorBufferFloat) + { + bool readFixedOrFloat = (readFixedPoint || readComponentType == GL_FLOAT); + bool drawFixedOrFloat = (drawFixedPoint || drawComponentType == GL_FLOAT); + + if (readFixedOrFloat != drawFixedOrFloat) + { + context->handleError(Error(GL_INVALID_OPERATION, + "If the read buffer contains fixed-point or " + "floating-point values, the draw buffer " + "must as well.")); + return false; + } + } + else if (readFixedPoint != drawFixedPoint) + { + context->handleError(Error(GL_INVALID_OPERATION, + "If the read buffer contains fixed-point " + "values, the draw buffer must as well.")); + return false; + } + + if (readComponentType == GL_UNSIGNED_INT && + drawComponentType != GL_UNSIGNED_INT) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } + + if (readComponentType == GL_INT && drawComponentType != GL_INT) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } + + if (readColorBuffer->getSamples() > 0 && + (!Format::SameSized(readFormat, drawFormat) || !sameBounds)) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } + } } - break; - case GL_TEXTURE_COMPARE_FUNC: - if (!ValidateTextureCompareFuncValue(context, params)) + if ((readFormat.info->componentType == GL_INT || + readFormat.info->componentType == GL_UNSIGNED_INT) && + filter == GL_LINEAR) { + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - break; + } + } + + GLenum masks[] = {GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT}; + GLenum attachments[] = {GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT}; + for (size_t i = 0; i < 2; i++) + { + if (mask & masks[i]) + { + const gl::FramebufferAttachment *readBuffer = readFramebuffer->getAttachment(attachments[i]); + const gl::FramebufferAttachment *drawBuffer = drawFramebuffer->getAttachment(attachments[i]); - case GL_TEXTURE_SRGB_DECODE_EXT: - if (!ValidateTextureSRGBDecodeValue(context, params)) + if (readBuffer && drawBuffer) { - return false; - } - break; + if (!Format::SameSized(readBuffer->getFormat(), drawBuffer->getFormat())) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown pname.")); - return false; + if (readBuffer->getSamples() > 0 && !sameBounds) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } + } + } } return true; } -bool ValidateGetSamplerParameterBase(Context *context, - GLuint sampler, - GLenum pname, - GLsizei *length) +bool ValidateGetVertexAttribParameters(Context *context, GLenum pname) { - if (length) + switch (pname) { - *length = 0; - } + case GL_VERTEX_ATTRIB_ARRAY_ENABLED: + case GL_VERTEX_ATTRIB_ARRAY_SIZE: + case GL_VERTEX_ATTRIB_ARRAY_STRIDE: + case GL_VERTEX_ATTRIB_ARRAY_TYPE: + case GL_VERTEX_ATTRIB_ARRAY_NORMALIZED: + case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: + case GL_CURRENT_VERTEX_ATTRIB: + return true; - if (context->getClientMajorVersion() < 3) - { - context->handleError( - Error(GL_INVALID_OPERATION, "Context does not support OpenGL ES 3.0.")); - return false; - } + case GL_VERTEX_ATTRIB_ARRAY_DIVISOR: + // Don't verify ES3 context because GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE uses + // the same constant. + static_assert(GL_VERTEX_ATTRIB_ARRAY_DIVISOR == GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE, + "ANGLE extension enums not equal to GL enums."); + return true; - if (!context->isSampler(sampler)) - { - context->handleError(Error(GL_INVALID_OPERATION, "Sampler is not valid.")); - return false; + case GL_VERTEX_ATTRIB_ARRAY_INTEGER: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return false; + } + return true; + + default: + context->handleError(Error(GL_INVALID_ENUM)); + return false; } +} +bool ValidateTexParamParameters(gl::Context *context, GLenum target, GLenum pname, GLint param) +{ switch (pname) { - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_MAG_FILTER: - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - case GL_TEXTURE_COMPARE_MODE: - case GL_TEXTURE_COMPARE_FUNC: - break; - - case GL_TEXTURE_SRGB_DECODE_EXT: - if (!context->getExtensions().textureSRGBDecode) - { - context->handleError( - Error(GL_INVALID_ENUM, "GL_EXT_texture_sRGB_decode is not enabled.")); - return false; - } - break; - - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown pname.")); - return false; - } - - if (length) - { - *length = 1; - } - return true; -} - -bool ValidateGetVertexAttribBase(Context *context, - GLuint index, - GLenum pname, - GLsizei *length, - bool pointer, - bool pureIntegerEntryPoint) -{ - if (length) - { - *length = 0; - } - - if (pureIntegerEntryPoint && context->getClientMajorVersion() < 3) - { - context->handleError( - Error(GL_INVALID_OPERATION, "Context does not support OpenGL ES 3.0.")); - return false; - } - - if (index >= context->getCaps().maxVertexAttributes) - { - context->handleError(Error( - GL_INVALID_VALUE, "index must be less than the value of GL_MAX_VERTEX_ATTRIBUTES.")); - return false; - } - - if (pointer) - { - if (pname != GL_VERTEX_ATTRIB_ARRAY_POINTER) - { - context->handleError(Error(GL_INVALID_ENUM, "Unknown pname.")); - return false; - } - } - else - { - switch (pname) - { - case GL_VERTEX_ATTRIB_ARRAY_ENABLED: - case GL_VERTEX_ATTRIB_ARRAY_SIZE: - case GL_VERTEX_ATTRIB_ARRAY_STRIDE: - case GL_VERTEX_ATTRIB_ARRAY_TYPE: - case GL_VERTEX_ATTRIB_ARRAY_NORMALIZED: - case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: - case GL_CURRENT_VERTEX_ATTRIB: - break; - - case GL_VERTEX_ATTRIB_ARRAY_DIVISOR: - static_assert( - GL_VERTEX_ATTRIB_ARRAY_DIVISOR == GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE, - "ANGLE extension enums not equal to GL enums."); - if (context->getClientMajorVersion() < 3 && - !context->getExtensions().instancedArrays) - { - context->handleError(Error(GL_INVALID_ENUM, - "GL_VERTEX_ATTRIB_ARRAY_DIVISOR requires OpenGL ES " - "3.0 or GL_ANGLE_instanced_arrays.")); - return false; - } - break; - - case GL_VERTEX_ATTRIB_ARRAY_INTEGER: - if (context->getClientMajorVersion() < 3) - { - context->handleError(Error(GL_INVALID_ENUM, "pname requires OpenGL ES 3.0.")); - return false; - } - break; - - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown pname.")); - return false; - } - } - - if (length) - { - if (pname == GL_CURRENT_VERTEX_ATTRIB) - { - *length = 4; - } - else - { - *length = 1; - } - } - - return true; -} - -bool ValidateGetActiveUniformBlockivBase(Context *context, - GLuint program, - GLuint uniformBlockIndex, - GLenum pname, - GLsizei *length) -{ - if (length) - { - *length = 0; - } - - if (context->getClientMajorVersion() < 3) - { - context->handleError( - Error(GL_INVALID_OPERATION, "Context does not support OpenGL ES 3.0.")); - return false; - } - - Program *programObject = GetValidProgram(context, program); - if (!programObject) - { - return false; - } - - if (uniformBlockIndex >= programObject->getActiveUniformBlockCount()) - { - context->handleError( - Error(GL_INVALID_VALUE, "uniformBlockIndex exceeds active uniform block count.")); - return false; - } - - switch (pname) - { - case GL_UNIFORM_BLOCK_BINDING: - case GL_UNIFORM_BLOCK_DATA_SIZE: - case GL_UNIFORM_BLOCK_NAME_LENGTH: - case GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS: - case GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: - case GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: - case GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: - break; - - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown pname.")); - return false; - } - - if (length) - { - if (pname == GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES) - { - const UniformBlock &uniformBlock = - programObject->getUniformBlockByIndex(uniformBlockIndex); - *length = static_cast(uniformBlock.memberUniformIndexes.size()); - } - else - { - *length = 1; - } - } - - return true; -} - -bool ValidateGetBufferParameterBase(ValidationContext *context, - GLenum target, - GLenum pname, - bool pointerVersion, - GLsizei *numParams) -{ - if (numParams) - { - *numParams = 0; - } - - if (!ValidBufferTarget(context, target)) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid buffer target.")); - return false; - } - - const Buffer *buffer = context->getGLState().getTargetBuffer(target); - if (!buffer) - { - // A null buffer means that "0" is bound to the requested buffer target - context->handleError(Error(GL_INVALID_OPERATION, "No buffer bound.")); - return false; - } - - const Extensions &extensions = context->getExtensions(); - - switch (pname) - { - case GL_BUFFER_USAGE: - case GL_BUFFER_SIZE: - break; - - case GL_BUFFER_ACCESS_OES: - if (!extensions.mapBuffer) - { - context->handleError( - Error(GL_INVALID_ENUM, "pname requires OpenGL ES 3.0 or GL_OES_map_buffer.")); - return false; - } - break; - - case GL_BUFFER_MAPPED: - static_assert(GL_BUFFER_MAPPED == GL_BUFFER_MAPPED_OES, "GL enums should be equal."); - if (context->getClientMajorVersion() < 3 && !extensions.mapBuffer && - !extensions.mapBufferRange) - { - context->handleError(Error( - GL_INVALID_ENUM, - "pname requires OpenGL ES 3.0, GL_OES_map_buffer or GL_EXT_map_buffer_range.")); - return false; - } - break; - - case GL_BUFFER_MAP_POINTER: - if (!pointerVersion) - { - context->handleError( - Error(GL_INVALID_ENUM, - "GL_BUFFER_MAP_POINTER can only be queried with GetBufferPointerv.")); - return false; - } - break; - - case GL_BUFFER_ACCESS_FLAGS: - case GL_BUFFER_MAP_OFFSET: - case GL_BUFFER_MAP_LENGTH: - if (context->getClientMajorVersion() < 3 && !extensions.mapBufferRange) - { - context->handleError(Error( - GL_INVALID_ENUM, "pname requires OpenGL ES 3.0 or GL_EXT_map_buffer_range.")); - return false; - } - break; - - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown pname.")); - return false; - } - - // All buffer parameter queries return one value. - if (numParams) - { - *numParams = 1; - } - - return true; -} - -bool ValidateGetInternalFormativBase(Context *context, - GLenum target, - GLenum internalformat, - GLenum pname, - GLsizei bufSize, - GLsizei *numParams) -{ - if (numParams) - { - *numParams = 0; - } - - if (context->getClientMajorVersion() < 3) - { - context->handleError( - Error(GL_INVALID_OPERATION, "Context does not support OpenGL ES 3.0.")); - return false; - } - - const TextureCaps &formatCaps = context->getTextureCaps().get(internalformat); - if (!formatCaps.renderable) - { - context->handleError(Error(GL_INVALID_ENUM, "Internal format is not renderable.")); - return false; - } - - switch (target) - { - case GL_RENDERBUFFER: - break; - - default: - context->handleError(Error(GL_INVALID_ENUM, "Invalid target.")); - return false; - } - - if (bufSize < 0) - { - context->handleError(Error(GL_INVALID_VALUE, "bufSize cannot be negative.")); - return false; - } - - GLsizei maxWriteParams = 0; - switch (pname) - { - case GL_NUM_SAMPLE_COUNTS: - maxWriteParams = 1; - break; - - case GL_SAMPLES: - maxWriteParams = static_cast(formatCaps.sampleCounts.size()); - break; - - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown pname.")); - return false; - } - - if (numParams) - { - // glGetInternalFormativ will not overflow bufSize - *numParams = std::min(bufSize, maxWriteParams); - } - - return true; -} - -} // anonymous namespace - -bool ValidTextureTarget(const ValidationContext *context, GLenum target) -{ - switch (target) - { - case GL_TEXTURE_2D: - case GL_TEXTURE_CUBE_MAP: - return true; - - case GL_TEXTURE_3D: - case GL_TEXTURE_2D_ARRAY: - return (context->getClientMajorVersion() >= 3); - - default: - return false; - } -} - -bool ValidTexture2DTarget(const ValidationContext *context, GLenum target) -{ - switch (target) - { - case GL_TEXTURE_2D: - case GL_TEXTURE_CUBE_MAP: - return true; - - default: - return false; - } -} - -bool ValidTexture3DTarget(const ValidationContext *context, GLenum target) -{ - switch (target) - { - case GL_TEXTURE_3D: - case GL_TEXTURE_2D_ARRAY: - return (context->getClientMajorVersion() >= 3); - - default: - return false; - } -} - -// Most texture GL calls are not compatible with external textures, so we have a separate validation -// function for use in the GL calls that do -bool ValidTextureExternalTarget(const ValidationContext *context, GLenum target) -{ - return (target == GL_TEXTURE_EXTERNAL_OES) && - (context->getExtensions().eglImageExternal || - context->getExtensions().eglStreamConsumerExternal); -} - -// This function differs from ValidTextureTarget in that the target must be -// usable as the destination of a 2D operation-- so a cube face is valid, but -// GL_TEXTURE_CUBE_MAP is not. -// Note: duplicate of IsInternalTextureTarget -bool ValidTexture2DDestinationTarget(const ValidationContext *context, GLenum target) -{ - switch (target) - { - case GL_TEXTURE_2D: - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - return true; - default: - return false; - } -} - -bool ValidTexture3DDestinationTarget(const ValidationContext *context, GLenum target) -{ - switch (target) - { - case GL_TEXTURE_3D: - case GL_TEXTURE_2D_ARRAY: - return true; - default: - return false; - } -} - -bool ValidFramebufferTarget(GLenum target) -{ - static_assert(GL_DRAW_FRAMEBUFFER_ANGLE == GL_DRAW_FRAMEBUFFER && GL_READ_FRAMEBUFFER_ANGLE == GL_READ_FRAMEBUFFER, - "ANGLE framebuffer enums must equal the ES3 framebuffer enums."); - - switch (target) - { - case GL_FRAMEBUFFER: return true; - case GL_READ_FRAMEBUFFER: return true; - case GL_DRAW_FRAMEBUFFER: return true; - default: return false; - } -} - -bool ValidBufferTarget(const ValidationContext *context, GLenum target) -{ - switch (target) - { - case GL_ARRAY_BUFFER: - case GL_ELEMENT_ARRAY_BUFFER: - return true; - - case GL_PIXEL_PACK_BUFFER: - case GL_PIXEL_UNPACK_BUFFER: - return (context->getExtensions().pixelBufferObject || - context->getClientMajorVersion() >= 3); - - case GL_COPY_READ_BUFFER: - case GL_COPY_WRITE_BUFFER: - case GL_TRANSFORM_FEEDBACK_BUFFER: - case GL_UNIFORM_BUFFER: - return (context->getClientMajorVersion() >= 3); - - default: - return false; - } -} - -bool ValidMipLevel(const ValidationContext *context, GLenum target, GLint level) -{ - const auto &caps = context->getCaps(); - size_t maxDimension = 0; - switch (target) - { - case GL_TEXTURE_2D: - maxDimension = caps.max2DTextureSize; - break; - case GL_TEXTURE_CUBE_MAP: - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - maxDimension = caps.maxCubeMapTextureSize; - break; - case GL_TEXTURE_3D: - maxDimension = caps.max3DTextureSize; - break; - case GL_TEXTURE_2D_ARRAY: - maxDimension = caps.max2DTextureSize; - break; - default: UNREACHABLE(); - } - - return level <= gl::log2(static_cast(maxDimension)); -} - -bool ValidImageSizeParameters(const Context *context, - GLenum target, - GLint level, - GLsizei width, - GLsizei height, - GLsizei depth, - bool isSubImage) -{ - if (level < 0 || width < 0 || height < 0 || depth < 0) - { - return false; - } - - // TexSubImage parameters can be NPOT without textureNPOT extension, - // as long as the destination texture is POT. - if (!isSubImage && !context->getExtensions().textureNPOT && - (level != 0 && (!gl::isPow2(width) || !gl::isPow2(height) || !gl::isPow2(depth)))) - { - return false; - } - - if (!ValidMipLevel(context, target, level)) - { - return false; - } - - return true; -} - -bool CompressedTextureFormatRequiresExactSize(GLenum internalFormat) -{ - // List of compressed format that require that the texture size is smaller than or a multiple of - // the compressed block size. - switch (internalFormat) - { - case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE: - case GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE: - case GL_ETC1_RGB8_LOSSY_DECODE_ANGLE: - return true; - - default: - return false; - } -} - -bool ValidCompressedImageSize(const ValidationContext *context, - GLenum internalFormat, - GLsizei width, - GLsizei height) -{ - const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(internalFormat); - if (!formatInfo.compressed) - { - return false; - } - - if (width < 0 || height < 0) - { - return false; - } - - if (CompressedTextureFormatRequiresExactSize(internalFormat)) - { - if ((static_cast(width) > formatInfo.compressedBlockWidth && - width % formatInfo.compressedBlockWidth != 0) || - (static_cast(height) > formatInfo.compressedBlockHeight && - height % formatInfo.compressedBlockHeight != 0)) - { - return false; - } - } - - return true; -} - -bool ValidImageDataSize(ValidationContext *context, - GLenum textureTarget, - GLsizei width, - GLsizei height, - GLsizei depth, - GLenum internalFormat, - GLenum type, - const GLvoid *pixels, - GLsizei imageSize) -{ - gl::Buffer *pixelUnpackBuffer = context->getGLState().getTargetBuffer(GL_PIXEL_UNPACK_BUFFER); - if (pixelUnpackBuffer == nullptr && imageSize < 0) - { - // Checks are not required - return true; - } - - // ...the data would be unpacked from the buffer object such that the memory reads required - // would exceed the data store size. - GLenum sizedFormat = GetSizedInternalFormat(internalFormat, type); - const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(sizedFormat); - const gl::Extents size(width, height, depth); - const auto &unpack = context->getGLState().getUnpackState(); - - bool targetIs3D = textureTarget == GL_TEXTURE_3D || textureTarget == GL_TEXTURE_2D_ARRAY; - auto endByteOrErr = formatInfo.computePackUnpackEndByte(size, unpack, targetIs3D); - if (endByteOrErr.isError()) - { - context->handleError(endByteOrErr.getError()); - return false; - } - - GLuint endByte = endByteOrErr.getResult(); - - if (pixelUnpackBuffer) - { - CheckedNumeric checkedEndByte(endByteOrErr.getResult()); - CheckedNumeric checkedOffset(reinterpret_cast(pixels)); - checkedEndByte += checkedOffset; - - if (!checkedEndByte.IsValid() || - (checkedEndByte.ValueOrDie() > static_cast(pixelUnpackBuffer->getSize()))) - { - // Overflow past the end of the buffer - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - } - else - { - ASSERT(imageSize >= 0); - if (pixels == nullptr && imageSize != 0) - { - context->handleError( - Error(GL_INVALID_OPERATION, "imageSize must be 0 if no texture data is provided.")); - return false; - } - - if (pixels != nullptr && endByte > static_cast(imageSize)) - { - context->handleError( - Error(GL_INVALID_OPERATION, "imageSize must be at least %u.", endByte)); - return false; - } - } - - return true; -} - -bool ValidQueryType(const Context *context, GLenum queryType) -{ - static_assert(GL_ANY_SAMPLES_PASSED == GL_ANY_SAMPLES_PASSED_EXT, "GL extension enums not equal."); - static_assert(GL_ANY_SAMPLES_PASSED_CONSERVATIVE == GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, "GL extension enums not equal."); - - switch (queryType) - { - case GL_ANY_SAMPLES_PASSED: - case GL_ANY_SAMPLES_PASSED_CONSERVATIVE: - return true; - case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: - return (context->getClientMajorVersion() >= 3); - case GL_TIME_ELAPSED_EXT: - return context->getExtensions().disjointTimerQuery; - case GL_COMMANDS_COMPLETED_CHROMIUM: - return context->getExtensions().syncQuery; - default: - return false; - } -} - -Program *GetValidProgram(ValidationContext *context, GLuint id) -{ - // ES3 spec (section 2.11.1) -- "Commands that accept shader or program object names will generate the - // error INVALID_VALUE if the provided name is not the name of either a shader or program object and - // INVALID_OPERATION if the provided name identifies an object that is not the expected type." - - Program *validProgram = context->getProgram(id); - - if (!validProgram) - { - if (context->getShader(id)) - { - context->handleError( - Error(GL_INVALID_OPERATION, "Expected a program name, but found a shader name")); - } - else - { - context->handleError(Error(GL_INVALID_VALUE, "Program name is not valid")); - } - } - - return validProgram; -} - -Shader *GetValidShader(ValidationContext *context, GLuint id) -{ - // See ValidProgram for spec details. - - Shader *validShader = context->getShader(id); - - if (!validShader) - { - if (context->getProgram(id)) - { - context->handleError( - Error(GL_INVALID_OPERATION, "Expected a shader name, but found a program name")); - } - else - { - context->handleError(Error(GL_INVALID_VALUE, "Shader name is invalid")); - } - } - - return validShader; -} - -bool ValidateAttachmentTarget(gl::Context *context, GLenum attachment) -{ - if (attachment >= GL_COLOR_ATTACHMENT0_EXT && attachment <= GL_COLOR_ATTACHMENT15_EXT) - { - const unsigned int colorAttachment = (attachment - GL_COLOR_ATTACHMENT0_EXT); - - if (colorAttachment >= context->getCaps().maxColorAttachments) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - } - else - { - switch (attachment) - { - case GL_DEPTH_ATTACHMENT: - case GL_STENCIL_ATTACHMENT: - break; - - case GL_DEPTH_STENCIL_ATTACHMENT: - if (!context->getExtensions().webglCompatibility && - context->getClientMajorVersion() < 3) - { - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - break; - - default: - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - } - - return true; -} - -bool ValidateRenderbufferStorageParametersBase(gl::Context *context, GLenum target, GLsizei samples, - GLenum internalformat, GLsizei width, GLsizei height) -{ - switch (target) - { - case GL_RENDERBUFFER: - break; - default: - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - - if (width < 0 || height < 0 || samples < 0) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - - const TextureCaps &formatCaps = context->getTextureCaps().get(internalformat); - if (!formatCaps.renderable) - { - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - - // ANGLE_framebuffer_multisample does not explicitly state that the internal format must be - // sized but it does state that the format must be in the ES2.0 spec table 4.5 which contains - // only sized internal formats. - const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(internalformat); - if (formatInfo.pixelBytes == 0) - { - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - - if (static_cast(std::max(width, height)) > context->getCaps().maxRenderbufferSize) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - - GLuint handle = context->getGLState().getRenderbufferId(); - if (handle == 0) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - return true; -} - -bool ValidateRenderbufferStorageParametersANGLE(gl::Context *context, GLenum target, GLsizei samples, - GLenum internalformat, GLsizei width, GLsizei height) -{ - ASSERT(samples == 0 || context->getExtensions().framebufferMultisample); - - // ANGLE_framebuffer_multisample states that the value of samples must be less than or equal - // to MAX_SAMPLES_ANGLE (Context::getCaps().maxSamples) otherwise GL_INVALID_VALUE is - // generated. - if (static_cast(samples) > context->getCaps().maxSamples) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - - // ANGLE_framebuffer_multisample states GL_OUT_OF_MEMORY is generated on a failure to create - // the specified storage. This is different than ES 3.0 in which a sample number higher - // than the maximum sample number supported by this format generates a GL_INVALID_VALUE. - // The TextureCaps::getMaxSamples method is only guarenteed to be valid when the context is ES3. - if (context->getClientMajorVersion() >= 3) - { - const TextureCaps &formatCaps = context->getTextureCaps().get(internalformat); - if (static_cast(samples) > formatCaps.getMaxSamples()) - { - context->handleError(Error(GL_OUT_OF_MEMORY)); - return false; - } - } - - return ValidateRenderbufferStorageParametersBase(context, target, samples, internalformat, width, height); -} - -bool ValidateFramebufferRenderbufferParameters(gl::Context *context, GLenum target, GLenum attachment, - GLenum renderbuffertarget, GLuint renderbuffer) -{ - if (!ValidFramebufferTarget(target)) - { - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - - gl::Framebuffer *framebuffer = context->getGLState().getTargetFramebuffer(target); - - ASSERT(framebuffer); - if (framebuffer->id() == 0) - { - context->handleError( - Error(GL_INVALID_OPERATION, "Cannot change default FBO's attachments")); - return false; - } - - if (!ValidateAttachmentTarget(context, attachment)) - { - return false; - } - - // [OpenGL ES 2.0.25] Section 4.4.3 page 112 - // [OpenGL ES 3.0.2] Section 4.4.2 page 201 - // 'renderbuffer' must be either zero or the name of an existing renderbuffer object of - // type 'renderbuffertarget', otherwise an INVALID_OPERATION error is generated. - if (renderbuffer != 0) - { - if (!context->getRenderbuffer(renderbuffer)) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - } - - return true; -} - -bool ValidateBlitFramebufferParameters(ValidationContext *context, - GLint srcX0, - GLint srcY0, - GLint srcX1, - GLint srcY1, - GLint dstX0, - GLint dstY0, - GLint dstX1, - GLint dstY1, - GLbitfield mask, - GLenum filter) -{ - switch (filter) - { - case GL_NEAREST: - break; - case GL_LINEAR: - break; - default: - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - - if ((mask & ~(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)) != 0) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - - if (mask == 0) - { - // ES3.0 spec, section 4.3.2 specifies that a mask of zero is valid and no - // buffers are copied. - return false; - } - - // ES3.0 spec, section 4.3.2 states that linear filtering is only available for the - // color buffer, leaving only nearest being unfiltered from above - if ((mask & ~GL_COLOR_BUFFER_BIT) != 0 && filter != GL_NEAREST) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - const auto &glState = context->getGLState(); - gl::Framebuffer *readFramebuffer = glState.getReadFramebuffer(); - gl::Framebuffer *drawFramebuffer = glState.getDrawFramebuffer(); - - if (!readFramebuffer || !drawFramebuffer) - { - context->handleError(Error(GL_INVALID_FRAMEBUFFER_OPERATION)); - return false; - } - - if (readFramebuffer->id() == drawFramebuffer->id()) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - if (readFramebuffer->checkStatus(context->getContextState()) != GL_FRAMEBUFFER_COMPLETE) - { - context->handleError(Error(GL_INVALID_FRAMEBUFFER_OPERATION)); - return false; - } - - if (drawFramebuffer->checkStatus(context->getContextState()) != GL_FRAMEBUFFER_COMPLETE) - { - context->handleError(Error(GL_INVALID_FRAMEBUFFER_OPERATION)); - return false; - } - - if (drawFramebuffer->getSamples(context->getContextState()) != 0) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - bool sameBounds = srcX0 == dstX0 && srcY0 == dstY0 && srcX1 == dstX1 && srcY1 == dstY1; - - if (mask & GL_COLOR_BUFFER_BIT) - { - const gl::FramebufferAttachment *readColorBuffer = readFramebuffer->getReadColorbuffer(); - const gl::FramebufferAttachment *drawColorBuffer = drawFramebuffer->getFirstColorbuffer(); - const Extensions &extensions = context->getExtensions(); - - if (readColorBuffer && drawColorBuffer) - { - const Format &readFormat = readColorBuffer->getFormat(); - - for (size_t drawbufferIdx = 0; - drawbufferIdx < drawFramebuffer->getDrawbufferStateCount(); ++drawbufferIdx) - { - const FramebufferAttachment *attachment = - drawFramebuffer->getDrawBuffer(drawbufferIdx); - if (attachment) - { - const Format &drawFormat = attachment->getFormat(); - - // The GL ES 3.0.2 spec (pg 193) states that: - // 1) If the read buffer is fixed point format, the draw buffer must be as well - // 2) If the read buffer is an unsigned integer format, the draw buffer must be as well - // 3) If the read buffer is a signed integer format, the draw buffer must be as well - // Changes with EXT_color_buffer_float: - // Case 1) is changed to fixed point OR floating point - GLenum readComponentType = readFormat.info->componentType; - GLenum drawComponentType = drawFormat.info->componentType; - bool readFixedPoint = (readComponentType == GL_UNSIGNED_NORMALIZED || - readComponentType == GL_SIGNED_NORMALIZED); - bool drawFixedPoint = (drawComponentType == GL_UNSIGNED_NORMALIZED || - drawComponentType == GL_SIGNED_NORMALIZED); - - if (extensions.colorBufferFloat) - { - bool readFixedOrFloat = (readFixedPoint || readComponentType == GL_FLOAT); - bool drawFixedOrFloat = (drawFixedPoint || drawComponentType == GL_FLOAT); - - if (readFixedOrFloat != drawFixedOrFloat) - { - context->handleError(Error(GL_INVALID_OPERATION, - "If the read buffer contains fixed-point or " - "floating-point values, the draw buffer " - "must as well.")); - return false; - } - } - else if (readFixedPoint != drawFixedPoint) - { - context->handleError(Error(GL_INVALID_OPERATION, - "If the read buffer contains fixed-point " - "values, the draw buffer must as well.")); - return false; - } - - if (readComponentType == GL_UNSIGNED_INT && - drawComponentType != GL_UNSIGNED_INT) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - if (readComponentType == GL_INT && drawComponentType != GL_INT) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - if (readColorBuffer->getSamples() > 0 && - (!Format::SameSized(readFormat, drawFormat) || !sameBounds)) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - } - } - - if ((readFormat.info->componentType == GL_INT || - readFormat.info->componentType == GL_UNSIGNED_INT) && - filter == GL_LINEAR) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - } - } - - GLenum masks[] = {GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT}; - GLenum attachments[] = {GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT}; - for (size_t i = 0; i < 2; i++) - { - if (mask & masks[i]) - { - const gl::FramebufferAttachment *readBuffer = readFramebuffer->getAttachment(attachments[i]); - const gl::FramebufferAttachment *drawBuffer = drawFramebuffer->getAttachment(attachments[i]); - - if (readBuffer && drawBuffer) - { - if (!Format::SameSized(readBuffer->getFormat(), drawBuffer->getFormat())) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - if (readBuffer->getSamples() > 0 && !sameBounds) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - } - } - } - - return true; -} - -bool ValidateReadPixels(ValidationContext *context, - GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLvoid *pixels) -{ - return ValidateReadPixelsBase(context, x, y, width, height, format, type, -1, nullptr, pixels); -} - -bool ValidateReadPixelsRobustANGLE(ValidationContext *context, - GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLsizei bufSize, - GLsizei *length, - GLvoid *pixels) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - - if (!ValidateReadPixelsBase(context, x, y, width, height, format, type, bufSize, length, - pixels)) - { - return false; - } - - if (!ValidateRobustBufferSize(context, bufSize, *length)) - { - return false; - } - - return true; -} - -bool ValidateReadnPixelsEXT(Context *context, - GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLsizei bufSize, - GLvoid *pixels) -{ - if (bufSize < 0) - { - context->handleError(Error(GL_INVALID_VALUE, "bufSize must be a positive number")); - return false; - } - - return ValidateReadPixelsBase(context, x, y, width, height, format, type, bufSize, nullptr, - pixels); -} - -bool ValidateReadnPixelsRobustANGLE(ValidationContext *context, - GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLsizei bufSize, - GLsizei *length, - GLvoid *data) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - - if (!ValidateReadPixelsBase(context, x, y, width, height, format, type, bufSize, length, data)) - { - return false; - } - - if (!ValidateRobustBufferSize(context, bufSize, *length)) - { - return false; - } - - return true; -} - -bool ValidateGenQueriesEXT(gl::Context *context, GLsizei n) -{ - if (!context->getExtensions().occlusionQueryBoolean && - !context->getExtensions().disjointTimerQuery) - { - context->handleError(Error(GL_INVALID_OPERATION, "Query extension not enabled")); - return false; - } - - return ValidateGenOrDelete(context, n); -} - -bool ValidateDeleteQueriesEXT(gl::Context *context, GLsizei n) -{ - if (!context->getExtensions().occlusionQueryBoolean && - !context->getExtensions().disjointTimerQuery) - { - context->handleError(Error(GL_INVALID_OPERATION, "Query extension not enabled")); - return false; - } - - return ValidateGenOrDelete(context, n); -} - -bool ValidateBeginQueryBase(gl::Context *context, GLenum target, GLuint id) -{ - if (!ValidQueryType(context, target)) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid query target")); - return false; - } - - if (id == 0) - { - context->handleError(Error(GL_INVALID_OPERATION, "Query id is 0")); - return false; - } - - // From EXT_occlusion_query_boolean: If BeginQueryEXT is called with an - // of zero, if the active query object name for is non-zero (for the - // targets ANY_SAMPLES_PASSED_EXT and ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, if - // the active query for either target is non-zero), if is the name of an - // existing query object whose type does not match , or if is the - // active query object name for any query type, the error INVALID_OPERATION is - // generated. - - // Ensure no other queries are active - // NOTE: If other queries than occlusion are supported, we will need to check - // separately that: - // a) The query ID passed is not the current active query for any target/type - // b) There are no active queries for the requested target (and in the case - // of GL_ANY_SAMPLES_PASSED_EXT and GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, - // no query may be active for either if glBeginQuery targets either. - - if (context->getGLState().isQueryActive(target)) - { - context->handleError(Error(GL_INVALID_OPERATION, "Other query is active")); - return false; - } - - Query *queryObject = context->getQuery(id, true, target); - - // check that name was obtained with glGenQueries - if (!queryObject) - { - context->handleError(Error(GL_INVALID_OPERATION, "Invalid query id")); - return false; - } - - // check for type mismatch - if (queryObject->getType() != target) - { - context->handleError(Error(GL_INVALID_OPERATION, "Query type does not match target")); - return false; - } - - return true; -} - -bool ValidateBeginQueryEXT(gl::Context *context, GLenum target, GLuint id) -{ - if (!context->getExtensions().occlusionQueryBoolean && - !context->getExtensions().disjointTimerQuery && !context->getExtensions().syncQuery) - { - context->handleError(Error(GL_INVALID_OPERATION, "Query extension not enabled")); - return false; - } - - return ValidateBeginQueryBase(context, target, id); -} - -bool ValidateEndQueryBase(gl::Context *context, GLenum target) -{ - if (!ValidQueryType(context, target)) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid query target")); - return false; - } - - const Query *queryObject = context->getGLState().getActiveQuery(target); - - if (queryObject == nullptr) - { - context->handleError(Error(GL_INVALID_OPERATION, "Query target not active")); - return false; - } - - return true; -} - -bool ValidateEndQueryEXT(gl::Context *context, GLenum target) -{ - if (!context->getExtensions().occlusionQueryBoolean && - !context->getExtensions().disjointTimerQuery && !context->getExtensions().syncQuery) - { - context->handleError(Error(GL_INVALID_OPERATION, "Query extension not enabled")); - return false; - } - - return ValidateEndQueryBase(context, target); -} - -bool ValidateQueryCounterEXT(Context *context, GLuint id, GLenum target) -{ - if (!context->getExtensions().disjointTimerQuery) - { - context->handleError(Error(GL_INVALID_OPERATION, "Disjoint timer query not enabled")); - return false; - } - - if (target != GL_TIMESTAMP_EXT) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid query target")); - return false; - } - - Query *queryObject = context->getQuery(id, true, target); - if (queryObject == nullptr) - { - context->handleError(Error(GL_INVALID_OPERATION, "Invalid query id")); - return false; - } - - if (context->getGLState().isQueryActive(queryObject)) - { - context->handleError(Error(GL_INVALID_OPERATION, "Query is active")); - return false; - } - - return true; -} - -bool ValidateGetQueryivBase(Context *context, GLenum target, GLenum pname, GLsizei *numParams) -{ - if (numParams) - { - *numParams = 0; - } - - if (!ValidQueryType(context, target) && target != GL_TIMESTAMP_EXT) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid query type")); - return false; - } - - switch (pname) - { - case GL_CURRENT_QUERY_EXT: - if (target == GL_TIMESTAMP_EXT) - { - context->handleError( - Error(GL_INVALID_ENUM, "Cannot use current query for timestamp")); - return false; - } - break; - case GL_QUERY_COUNTER_BITS_EXT: - if (!context->getExtensions().disjointTimerQuery || - (target != GL_TIMESTAMP_EXT && target != GL_TIME_ELAPSED_EXT)) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid pname")); - return false; - } - break; - default: - context->handleError(Error(GL_INVALID_ENUM, "Invalid pname")); - return false; - } - - if (numParams) - { - // All queries return only one value - *numParams = 1; - } - - return true; -} - -bool ValidateGetQueryivEXT(Context *context, GLenum target, GLenum pname, GLint *params) -{ - if (!context->getExtensions().occlusionQueryBoolean && - !context->getExtensions().disjointTimerQuery && !context->getExtensions().syncQuery) - { - context->handleError(Error(GL_INVALID_OPERATION, "Query extension not enabled")); - return false; - } - - return ValidateGetQueryivBase(context, target, pname, nullptr); -} - -bool ValidateGetQueryivRobustANGLE(Context *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - - if (!ValidateGetQueryivBase(context, target, pname, length)) - { - return false; - } - - if (!ValidateRobustBufferSize(context, bufSize, *length)) - { - return false; - } - - return true; -} - -bool ValidateGetQueryObjectValueBase(Context *context, GLuint id, GLenum pname, GLsizei *numParams) -{ - if (numParams) - { - *numParams = 0; - } - - Query *queryObject = context->getQuery(id, false, GL_NONE); - - if (!queryObject) - { - context->handleError(Error(GL_INVALID_OPERATION, "Query does not exist")); - return false; - } - - if (context->getGLState().isQueryActive(queryObject)) - { - context->handleError(Error(GL_INVALID_OPERATION, "Query currently active")); - return false; - } - - switch (pname) - { - case GL_QUERY_RESULT_EXT: - case GL_QUERY_RESULT_AVAILABLE_EXT: - break; - - default: - context->handleError(Error(GL_INVALID_ENUM, "Invalid pname enum")); - return false; - } - - if (numParams) - { - *numParams = 1; - } - - return true; -} - -bool ValidateGetQueryObjectivEXT(Context *context, GLuint id, GLenum pname, GLint *params) -{ - if (!context->getExtensions().disjointTimerQuery) - { - context->handleError(Error(GL_INVALID_OPERATION, "Timer query extension not enabled")); - return false; - } - return ValidateGetQueryObjectValueBase(context, id, pname, nullptr); -} - -bool ValidateGetQueryObjectivRobustANGLE(Context *context, - GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - if (!context->getExtensions().disjointTimerQuery) - { - context->handleError(Error(GL_INVALID_OPERATION, "Timer query extension not enabled")); - return false; - } - - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - - if (!ValidateGetQueryObjectValueBase(context, id, pname, length)) - { - return false; - } - - if (!ValidateRobustBufferSize(context, bufSize, *length)) - { - return false; - } - - return true; -} - -bool ValidateGetQueryObjectuivEXT(Context *context, GLuint id, GLenum pname, GLuint *params) -{ - if (!context->getExtensions().disjointTimerQuery && - !context->getExtensions().occlusionQueryBoolean && !context->getExtensions().syncQuery) - { - context->handleError(Error(GL_INVALID_OPERATION, "Query extension not enabled")); - return false; - } - return ValidateGetQueryObjectValueBase(context, id, pname, nullptr); -} - -bool ValidateGetQueryObjectuivRobustANGLE(Context *context, - GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint *params) -{ - if (!context->getExtensions().disjointTimerQuery && - !context->getExtensions().occlusionQueryBoolean && !context->getExtensions().syncQuery) - { - context->handleError(Error(GL_INVALID_OPERATION, "Query extension not enabled")); - return false; - } - - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - - if (!ValidateGetQueryObjectValueBase(context, id, pname, length)) - { - return false; - } - - if (!ValidateRobustBufferSize(context, bufSize, *length)) - { - return false; - } - - return true; -} - -bool ValidateGetQueryObjecti64vEXT(Context *context, GLuint id, GLenum pname, GLint64 *params) -{ - if (!context->getExtensions().disjointTimerQuery) - { - context->handleError(Error(GL_INVALID_OPERATION, "Timer query extension not enabled")); - return false; - } - return ValidateGetQueryObjectValueBase(context, id, pname, nullptr); -} - -bool ValidateGetQueryObjecti64vRobustANGLE(Context *context, - GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint64 *params) -{ - if (!context->getExtensions().disjointTimerQuery) - { - context->handleError(Error(GL_INVALID_OPERATION, "Timer query extension not enabled")); - return false; - } - - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - - if (!ValidateGetQueryObjectValueBase(context, id, pname, length)) - { - return false; - } - - if (!ValidateRobustBufferSize(context, bufSize, *length)) - { - return false; - } - - return true; -} - -bool ValidateGetQueryObjectui64vEXT(Context *context, GLuint id, GLenum pname, GLuint64 *params) -{ - if (!context->getExtensions().disjointTimerQuery) - { - context->handleError(Error(GL_INVALID_OPERATION, "Timer query extension not enabled")); - return false; - } - return ValidateGetQueryObjectValueBase(context, id, pname, nullptr); -} - -bool ValidateGetQueryObjectui64vRobustANGLE(Context *context, - GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint64 *params) -{ - if (!context->getExtensions().disjointTimerQuery) - { - context->handleError(Error(GL_INVALID_OPERATION, "Timer query extension not enabled")); - return false; - } - - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - - if (!ValidateGetQueryObjectValueBase(context, id, pname, length)) - { - return false; - } - - if (!ValidateRobustBufferSize(context, bufSize, *length)) - { - return false; - } - - return true; -} - -static bool ValidateUniformCommonBase(gl::Context *context, - GLenum targetUniformType, - GLint location, - GLsizei count, - const LinkedUniform **uniformOut) -{ - if (count < 0) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - - gl::Program *program = context->getGLState().getProgram(); - if (!program) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - if (program->isIgnoredUniformLocation(location)) - { - // Silently ignore the uniform command - return false; - } - - if (!program->isValidUniformLocation(location)) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - const LinkedUniform &uniform = program->getUniformByLocation(location); - - // attempting to write an array to a non-array uniform is an INVALID_OPERATION - if (!uniform.isArray() && count > 1) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - *uniformOut = &uniform; - return true; -} - -bool ValidateUniform(gl::Context *context, GLenum uniformType, GLint location, GLsizei count) -{ - // Check for ES3 uniform entry points - if (VariableComponentType(uniformType) == GL_UNSIGNED_INT && - context->getClientMajorVersion() < 3) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - const LinkedUniform *uniform = nullptr; - if (!ValidateUniformCommonBase(context, uniformType, location, count, &uniform)) - { - return false; - } - - GLenum targetBoolType = VariableBoolVectorType(uniformType); - bool samplerUniformCheck = (IsSamplerType(uniform->type) && uniformType == GL_INT); - if (!samplerUniformCheck && uniformType != uniform->type && targetBoolType != uniform->type) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - return true; -} - -bool ValidateUniformMatrix(gl::Context *context, GLenum matrixType, GLint location, GLsizei count, - GLboolean transpose) -{ - // Check for ES3 uniform entry points - int rows = VariableRowCount(matrixType); - int cols = VariableColumnCount(matrixType); - if (rows != cols && context->getClientMajorVersion() < 3) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - if (transpose != GL_FALSE && context->getClientMajorVersion() < 3) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - - const LinkedUniform *uniform = nullptr; - if (!ValidateUniformCommonBase(context, matrixType, location, count, &uniform)) - { - return false; - } - - if (uniform->type != matrixType) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - return true; -} - -bool ValidateStateQuery(ValidationContext *context, - GLenum pname, - GLenum *nativeType, - unsigned int *numParams) -{ - if (!context->getQueryParameterInfo(pname, nativeType, numParams)) - { - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - - const Caps &caps = context->getCaps(); - - if (pname >= GL_DRAW_BUFFER0 && pname <= GL_DRAW_BUFFER15) - { - unsigned int colorAttachment = (pname - GL_DRAW_BUFFER0); - - if (colorAttachment >= caps.maxDrawBuffers) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - } - - switch (pname) - { - case GL_TEXTURE_BINDING_2D: - case GL_TEXTURE_BINDING_CUBE_MAP: - case GL_TEXTURE_BINDING_3D: - case GL_TEXTURE_BINDING_2D_ARRAY: - break; - case GL_TEXTURE_BINDING_EXTERNAL_OES: - if (!context->getExtensions().eglStreamConsumerExternal && - !context->getExtensions().eglImageExternal) - { - context->handleError(Error(GL_INVALID_ENUM, - "Neither NV_EGL_stream_consumer_external nor " - "GL_OES_EGL_image_external extensions enabled")); - return false; - } - break; - - case GL_IMPLEMENTATION_COLOR_READ_TYPE: - case GL_IMPLEMENTATION_COLOR_READ_FORMAT: - { - if (context->getGLState().getReadFramebuffer()->checkStatus( - context->getContextState()) != GL_FRAMEBUFFER_COMPLETE) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - const Framebuffer *framebuffer = context->getGLState().getReadFramebuffer(); - ASSERT(framebuffer); - - if (framebuffer->getReadBufferState() == GL_NONE) - { - context->handleError(Error(GL_INVALID_OPERATION, "Read buffer is GL_NONE")); - return false; - } - - const FramebufferAttachment *attachment = framebuffer->getReadColorbuffer(); - if (!attachment) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - } - break; - - default: - break; - } - - // pname is valid, but there are no parameters to return - if (*numParams == 0) - { - return false; - } - - return true; -} - -bool ValidateRobustStateQuery(ValidationContext *context, - GLenum pname, - GLsizei bufSize, - GLenum *nativeType, - unsigned int *numParams) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - - if (!ValidateStateQuery(context, pname, nativeType, numParams)) - { - return false; - } - - if (!ValidateRobustBufferSize(context, bufSize, *numParams)) - { - return false; - } - - return true; -} - -bool ValidateCopyTexImageParametersBase(ValidationContext *context, - GLenum target, - GLint level, - GLenum internalformat, - bool isSubImage, - GLint xoffset, - GLint yoffset, - GLint zoffset, - GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLint border, - Format *textureFormatOut) -{ - if (level < 0 || xoffset < 0 || yoffset < 0 || zoffset < 0 || width < 0 || height < 0) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - - if (std::numeric_limits::max() - xoffset < width || std::numeric_limits::max() - yoffset < height) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - - if (border != 0) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - - if (!ValidMipLevel(context, target, level)) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - - const auto &state = context->getGLState(); - auto readFramebuffer = state.getReadFramebuffer(); - if (readFramebuffer->checkStatus(context->getContextState()) != GL_FRAMEBUFFER_COMPLETE) - { - context->handleError(Error(GL_INVALID_FRAMEBUFFER_OPERATION)); - return false; - } - - if (readFramebuffer->id() != 0 && readFramebuffer->getSamples(context->getContextState()) != 0) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - if (readFramebuffer->getReadBufferState() == GL_NONE) - { - context->handleError(Error(GL_INVALID_OPERATION, "Read buffer is GL_NONE")); - return false; - } - - const gl::Caps &caps = context->getCaps(); - - GLuint maxDimension = 0; - switch (target) - { - case GL_TEXTURE_2D: - maxDimension = caps.max2DTextureSize; - break; - - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - maxDimension = caps.maxCubeMapTextureSize; - break; - - case GL_TEXTURE_2D_ARRAY: - maxDimension = caps.max2DTextureSize; - break; - - case GL_TEXTURE_3D: - maxDimension = caps.max3DTextureSize; - break; - - default: - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - - gl::Texture *texture = - state.getTargetTexture(IsCubeMapTextureTarget(target) ? GL_TEXTURE_CUBE_MAP : target); - if (!texture) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - if (texture->getImmutableFormat() && !isSubImage) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(internalformat); - - if (formatInfo.depthBits > 0) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } + case GL_TEXTURE_WRAP_R: + case GL_TEXTURE_SWIZZLE_R: + case GL_TEXTURE_SWIZZLE_G: + case GL_TEXTURE_SWIZZLE_B: + case GL_TEXTURE_SWIZZLE_A: + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_COMPARE_MODE: + case GL_TEXTURE_COMPARE_FUNC: + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return false; + } + if (target == GL_TEXTURE_EXTERNAL_OES && !context->getExtensions().eglImageExternalEssl3) + { + context->handleError(Error(GL_INVALID_ENUM, + "ES3 texture parameters are not available without " + "GL_OES_EGL_image_external_essl3.")); + return false; + } + break; - if (formatInfo.compressed && !ValidCompressedImageSize(context, internalformat, width, height)) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; + default: break; } - if (isSubImage) + switch (pname) { - if (static_cast(xoffset + width) > texture->getWidth(target, level) || - static_cast(yoffset + height) > texture->getHeight(target, level) || - static_cast(zoffset) >= texture->getDepth(target, level)) + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_WRAP_R: + switch (param) { - context->handleError(Error(GL_INVALID_VALUE)); + case GL_CLAMP_TO_EDGE: + return true; + case GL_REPEAT: + case GL_MIRRORED_REPEAT: + if (target == GL_TEXTURE_EXTERNAL_OES) + { + // OES_EGL_image_external specifies this error. + context->handleError(Error( + GL_INVALID_ENUM, "external textures only support CLAMP_TO_EDGE wrap mode")); + return false; + } + return true; + default: + context->handleError(Error(GL_INVALID_ENUM)); return false; } - } - else - { - if (IsCubeMapTextureTarget(target) && width != height) + + case GL_TEXTURE_MIN_FILTER: + switch (param) { - context->handleError(Error(GL_INVALID_VALUE)); + case GL_NEAREST: + case GL_LINEAR: + return true; + case GL_NEAREST_MIPMAP_NEAREST: + case GL_LINEAR_MIPMAP_NEAREST: + case GL_NEAREST_MIPMAP_LINEAR: + case GL_LINEAR_MIPMAP_LINEAR: + if (target == GL_TEXTURE_EXTERNAL_OES) + { + // OES_EGL_image_external specifies this error. + context->handleError( + Error(GL_INVALID_ENUM, + "external textures only support NEAREST and LINEAR filtering")); + return false; + } + return true; + default: + context->handleError(Error(GL_INVALID_ENUM)); return false; } + break; - if (!formatInfo.textureSupport(context->getClientVersion(), context->getExtensions())) + case GL_TEXTURE_MAG_FILTER: + switch (param) { - context->handleError(Error(GL_INVALID_ENUM)); + case GL_NEAREST: + case GL_LINEAR: + return true; + default: + context->handleError(Error(GL_INVALID_ENUM)); return false; } + break; - int maxLevelDimension = (maxDimension >> level); - if (static_cast(width) > maxLevelDimension || static_cast(height) > maxLevelDimension) + case GL_TEXTURE_USAGE_ANGLE: + switch (param) { - context->handleError(Error(GL_INVALID_VALUE)); + case GL_NONE: + case GL_FRAMEBUFFER_ATTACHMENT_ANGLE: + return true; + default: + context->handleError(Error(GL_INVALID_ENUM)); return false; } - } - - if (textureFormatOut) - { - *textureFormatOut = texture->getFormat(target, level); - } - return true; -} - -static bool ValidateDrawBase(ValidationContext *context, - GLenum mode, - GLsizei count, - GLsizei primcount) -{ - switch (mode) - { - case GL_POINTS: - case GL_LINES: - case GL_LINE_LOOP: - case GL_LINE_STRIP: - case GL_TRIANGLES: - case GL_TRIANGLE_STRIP: - case GL_TRIANGLE_FAN: break; - default: - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - - if (count < 0) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - - const State &state = context->getGLState(); - - // Check for mapped buffers - if (state.hasMappedBuffer(GL_ARRAY_BUFFER)) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - Framebuffer *framebuffer = state.getDrawFramebuffer(); - if (context->getLimitations().noSeparateStencilRefsAndMasks) - { - const FramebufferAttachment *stencilBuffer = framebuffer->getStencilbuffer(); - GLuint stencilBits = stencilBuffer ? stencilBuffer->getStencilSize() : 0; - GLuint minimumRequiredStencilMask = (1 << stencilBits) - 1; - const DepthStencilState &depthStencilState = state.getDepthStencilState(); - if ((depthStencilState.stencilWritemask & minimumRequiredStencilMask) != - (depthStencilState.stencilBackWritemask & minimumRequiredStencilMask) || - state.getStencilRef() != state.getStencilBackRef() || - (depthStencilState.stencilMask & minimumRequiredStencilMask) != - (depthStencilState.stencilBackMask & minimumRequiredStencilMask)) + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + if (!context->getExtensions().textureFilterAnisotropic) { - // Note: these separate values are not supported in WebGL, due to D3D's limitations. See - // Section 6.10 of the WebGL 1.0 spec - ERR( - "This ANGLE implementation does not support separate front/back stencil " - "writemasks, reference values, or stencil mask values."); - context->handleError(Error(GL_INVALID_OPERATION)); + context->handleError(Error(GL_INVALID_ENUM)); return false; } - } - - if (framebuffer->checkStatus(context->getContextState()) != GL_FRAMEBUFFER_COMPLETE) - { - context->handleError(Error(GL_INVALID_FRAMEBUFFER_OPERATION)); - return false; - } - - gl::Program *program = state.getProgram(); - if (!program) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - if (!program->validateSamplers(NULL, context->getCaps())) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } + // we assume the parameter passed to this validation method is truncated, not rounded + if (param < 1) + { + context->handleError(Error(GL_INVALID_VALUE)); + return false; + } + return true; - // Uniform buffer validation - for (unsigned int uniformBlockIndex = 0; uniformBlockIndex < program->getActiveUniformBlockCount(); uniformBlockIndex++) - { - const gl::UniformBlock &uniformBlock = program->getUniformBlockByIndex(uniformBlockIndex); - GLuint blockBinding = program->getUniformBlockBinding(uniformBlockIndex); - const OffsetBindingPointer &uniformBuffer = - state.getIndexedUniformBuffer(blockBinding); + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + // any value is permissible + return true; - if (uniformBuffer.get() == nullptr) + case GL_TEXTURE_COMPARE_MODE: + // Acceptable mode parameters from GLES 3.0.2 spec, table 3.17 + switch (param) { - // undefined behaviour - context->handleError( - Error(GL_INVALID_OPERATION, - "It is undefined behaviour to have a used but unbound uniform buffer.")); + case GL_NONE: + case GL_COMPARE_REF_TO_TEXTURE: + return true; + default: + context->handleError(Error(GL_INVALID_ENUM)); return false; } + break; - size_t uniformBufferSize = uniformBuffer.getSize(); - if (uniformBufferSize == 0) + case GL_TEXTURE_COMPARE_FUNC: + // Acceptable function parameters from GLES 3.0.2 spec, table 3.17 + switch (param) { - // Bind the whole buffer. - uniformBufferSize = static_cast(uniformBuffer->getSize()); + case GL_LEQUAL: + case GL_GEQUAL: + case GL_LESS: + case GL_GREATER: + case GL_EQUAL: + case GL_NOTEQUAL: + case GL_ALWAYS: + case GL_NEVER: + return true; + default: + context->handleError(Error(GL_INVALID_ENUM)); + return false; } + break; - if (uniformBufferSize < uniformBlock.dataSize) + case GL_TEXTURE_SWIZZLE_R: + case GL_TEXTURE_SWIZZLE_G: + case GL_TEXTURE_SWIZZLE_B: + case GL_TEXTURE_SWIZZLE_A: + switch (param) { - // undefined behaviour - context->handleError( - Error(GL_INVALID_OPERATION, - "It is undefined behaviour to use a uniform buffer that is too small.")); + case GL_RED: + case GL_GREEN: + case GL_BLUE: + case GL_ALPHA: + case GL_ZERO: + case GL_ONE: + return true; + default: + context->handleError(Error(GL_INVALID_ENUM)); return false; } - } - - // No-op if zero count - return (count > 0); -} - -bool ValidateDrawArrays(ValidationContext *context, - GLenum mode, - GLint first, - GLsizei count, - GLsizei primcount) -{ - if (first < 0) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - - const State &state = context->getGLState(); - gl::TransformFeedback *curTransformFeedback = state.getCurrentTransformFeedback(); - if (curTransformFeedback && curTransformFeedback->isActive() && !curTransformFeedback->isPaused() && - curTransformFeedback->getPrimitiveMode() != mode) - { - // It is an invalid operation to call DrawArrays or DrawArraysInstanced with a draw mode - // that does not match the current transform feedback object's draw mode (if transform feedback - // is active), (3.0.2, section 2.14, pg 86) - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } + break; - if (!ValidateDrawBase(context, mode, count, primcount)) - { - return false; - } + case GL_TEXTURE_BASE_LEVEL: + if (param < 0) + { + context->handleError(Error(GL_INVALID_VALUE)); + return false; + } + if (target == GL_TEXTURE_EXTERNAL_OES && param != 0) + { + context->handleError( + Error(GL_INVALID_OPERATION, "Base level must be 0 for external textures.")); + return false; + } + return true; - if (!ValidateDrawAttribs(context, primcount, count)) - { - return false; + case GL_TEXTURE_MAX_LEVEL: + if (param < 0) + { + context->handleError(Error(GL_INVALID_VALUE)); + return false; + } + return true; + default: + context->handleError(Error(GL_INVALID_ENUM)); + return false; } - - return true; } -bool ValidateDrawArraysInstanced(Context *context, GLenum mode, GLint first, GLsizei count, GLsizei primcount) +bool ValidateSamplerObjectParameter(gl::Context *context, GLenum pname) { - if (primcount < 0) + switch (pname) { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_MAG_FILTER: + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_WRAP_R: + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_COMPARE_MODE: + case GL_TEXTURE_COMPARE_FUNC: + return true; - if (!ValidateDrawArrays(context, mode, first, count, primcount)) - { + default: + context->handleError(Error(GL_INVALID_ENUM)); return false; } - - // No-op if zero primitive count - return (primcount > 0); -} - -static bool ValidateDrawInstancedANGLE(Context *context) -{ - // Verify there is at least one active attribute with a divisor of zero - const gl::State &state = context->getGLState(); - - gl::Program *program = state.getProgram(); - - const VertexArray *vao = state.getVertexArray(); - for (size_t attributeIndex = 0; attributeIndex < MAX_VERTEX_ATTRIBS; attributeIndex++) - { - const VertexAttribute &attrib = vao->getVertexAttribute(attributeIndex); - if (program->isAttribLocationActive(attributeIndex) && attrib.divisor == 0) - { - return true; - } - } - - context->handleError(Error(GL_INVALID_OPERATION, - "ANGLE_instanced_arrays requires that at least one active attribute" - "has a divisor of zero.")); - return false; } -bool ValidateDrawArraysInstancedANGLE(Context *context, GLenum mode, GLint first, GLsizei count, GLsizei primcount) +bool ValidateReadPixels(ValidationContext *context, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLvoid *pixels) { - if (!ValidateDrawInstancedANGLE(context)) + if (width < 0 || height < 0) { + context->handleError(Error(GL_INVALID_VALUE, "width and height must be positive")); return false; } - return ValidateDrawArraysInstanced(context, mode, first, count, primcount); -} + auto readFramebuffer = context->getGLState().getReadFramebuffer(); -bool ValidateDrawElements(ValidationContext *context, - GLenum mode, - GLsizei count, - GLenum type, - const GLvoid *indices, - GLsizei primcount, - IndexRange *indexRangeOut) -{ - switch (type) + if (readFramebuffer->checkStatus(context->getContextState()) != GL_FRAMEBUFFER_COMPLETE) { - case GL_UNSIGNED_BYTE: - case GL_UNSIGNED_SHORT: - break; - case GL_UNSIGNED_INT: - if (context->getClientMajorVersion() < 3 && !context->getExtensions().elementIndexUint) - { - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - break; - default: - context->handleError(Error(GL_INVALID_ENUM)); - return false; + context->handleError(Error(GL_INVALID_FRAMEBUFFER_OPERATION)); + return false; } - const State &state = context->getGLState(); - - gl::TransformFeedback *curTransformFeedback = state.getCurrentTransformFeedback(); - if (curTransformFeedback && curTransformFeedback->isActive() && !curTransformFeedback->isPaused()) + if (readFramebuffer->id() != 0 && readFramebuffer->getSamples(context->getContextState()) != 0) { - // It is an invalid operation to call DrawElements, DrawRangeElements or DrawElementsInstanced - // while transform feedback is active, (3.0.2, section 2.14, pg 86) context->handleError(Error(GL_INVALID_OPERATION)); return false; } - // Check for mapped buffers - if (state.hasMappedBuffer(GL_ELEMENT_ARRAY_BUFFER)) + const Framebuffer *framebuffer = context->getGLState().getReadFramebuffer(); + ASSERT(framebuffer); + + if (framebuffer->getReadBufferState() == GL_NONE) { - context->handleError(Error(GL_INVALID_OPERATION)); + context->handleError(Error(GL_INVALID_OPERATION, "Read buffer is GL_NONE")); return false; } - const gl::VertexArray *vao = state.getVertexArray(); - gl::Buffer *elementArrayBuffer = vao->getElementArrayBuffer().get(); - if (!indices && !elementArrayBuffer) + const FramebufferAttachment *readBuffer = framebuffer->getReadColorbuffer(); + if (!readBuffer) { context->handleError(Error(GL_INVALID_OPERATION)); return false; } - if (elementArrayBuffer) - { - const gl::Type &typeInfo = gl::GetTypeInfo(type); - - GLint64 offset = reinterpret_cast(indices); - GLint64 byteCount = static_cast(typeInfo.bytes) * static_cast(count)+offset; + GLenum currentFormat = framebuffer->getImplementationColorReadFormat(); + GLenum currentType = framebuffer->getImplementationColorReadType(); + GLenum currentInternalFormat = readBuffer->getFormat().asSized(); + GLuint clientVersion = context->getClientMajorVersion(); - // check for integer overflows - if (static_cast(count) > (std::numeric_limits::max() / typeInfo.bytes) || - byteCount > static_cast(std::numeric_limits::max())) - { - context->handleError(Error(GL_OUT_OF_MEMORY)); - return false; - } + bool validReadFormat = (clientVersion < 3) ? ValidES2ReadFormatType(context, format, type) : + ValidES3ReadFormatType(context, currentInternalFormat, format, type); - // Check for reading past the end of the bound buffer object - if (byteCount > elementArrayBuffer->getSize()) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - } - else if (!indices) + if (!(currentFormat == format && currentType == type) && !validReadFormat) { - // Catch this programming error here context->handleError(Error(GL_INVALID_OPERATION)); return false; } - if (!ValidateDrawBase(context, mode, count, primcount)) + return true; +} + +bool ValidateReadnPixelsEXT(Context *context, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLsizei bufSize, + GLvoid *pixels) +{ + if (bufSize < 0) { + context->handleError(Error(GL_INVALID_VALUE, "bufSize must be a positive number")); return false; } - // Use max index to validate if our vertex buffers are large enough for the pull. - // TODO: offer fast path, with disabled index validation. - // TODO: also disable index checking on back-ends that are robust to out-of-range accesses. - if (elementArrayBuffer) - { - uintptr_t offset = reinterpret_cast(indices); - Error error = - elementArrayBuffer->getIndexRange(type, static_cast(offset), count, - state.isPrimitiveRestartEnabled(), indexRangeOut); - if (error.isError()) - { - context->handleError(error); - return false; - } - } - else - { - *indexRangeOut = ComputeIndexRange(type, indices, count, state.isPrimitiveRestartEnabled()); - } + GLenum sizedInternalFormat = GetSizedInternalFormat(format, type); + const InternalFormat &sizedFormatInfo = GetInternalFormatInfo(sizedInternalFormat); - // If we use an index greater than our maximum supported index range, return an error. - // The ES3 spec does not specify behaviour here, it is undefined, but ANGLE should always - // return an error if possible here. - if (static_cast(indexRangeOut->end) >= context->getCaps().maxElementIndex) - { - context->handleError(Error(GL_INVALID_OPERATION, g_ExceedsMaxElementErrorMessage)); - return false; - } + auto outputPitchOrErr = + sizedFormatInfo.computeRowPitch(type, width, context->getGLState().getPackAlignment(), + context->getGLState().getPackRowLength()); - if (!ValidateDrawAttribs(context, primcount, static_cast(indexRangeOut->end + 1))) + if (outputPitchOrErr.isError()) { + context->handleError(outputPitchOrErr.getError()); return false; } - // No op if there are no real indices in the index data (all are primitive restart). - return (indexRangeOut->vertexIndexCount > 0); -} - -bool ValidateDrawElementsInstanced(Context *context, - GLenum mode, - GLsizei count, - GLenum type, - const GLvoid *indices, - GLsizei primcount, - IndexRange *indexRangeOut) -{ - if (primcount < 0) + CheckedNumeric checkedOutputPitch(outputPitchOrErr.getResult()); + auto checkedRequiredSize = checkedOutputPitch * height; + if (!checkedRequiredSize.IsValid()) { - context->handleError(Error(GL_INVALID_VALUE)); + context->handleError(Error(GL_INVALID_OPERATION, "Unsigned multiplication overflow.")); return false; } - if (!ValidateDrawElements(context, mode, count, type, indices, primcount, indexRangeOut)) + // sized query sanity check + if (checkedRequiredSize.ValueOrDie() > static_cast(bufSize)) { + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - // No-op zero primitive count - return (primcount > 0); + return ValidateReadPixels(context, x, y, width, height, format, type, pixels); } -bool ValidateDrawElementsInstancedANGLE(Context *context, - GLenum mode, - GLsizei count, - GLenum type, - const GLvoid *indices, - GLsizei primcount, - IndexRange *indexRangeOut) +bool ValidateGenQueriesEXT(gl::Context *context, GLsizei n) { - if (!ValidateDrawInstancedANGLE(context)) + if (!context->getExtensions().occlusionQueryBoolean && + !context->getExtensions().disjointTimerQuery) { + context->handleError(Error(GL_INVALID_OPERATION, "Query extension not enabled")); return false; } - return ValidateDrawElementsInstanced(context, mode, count, type, indices, primcount, indexRangeOut); + return ValidateGenOrDelete(context, n); } -bool ValidateFramebufferTextureBase(Context *context, GLenum target, GLenum attachment, - GLuint texture, GLint level) +bool ValidateDeleteQueriesEXT(gl::Context *context, GLsizei n) { - if (!ValidFramebufferTarget(target)) + if (!context->getExtensions().occlusionQueryBoolean && + !context->getExtensions().disjointTimerQuery) { - context->handleError(Error(GL_INVALID_ENUM)); + context->handleError(Error(GL_INVALID_OPERATION, "Query extension not enabled")); return false; } - if (!ValidateAttachmentTarget(context, attachment)) + return ValidateGenOrDelete(context, n); +} + +bool ValidateBeginQueryBase(gl::Context *context, GLenum target, GLuint id) +{ + if (!ValidQueryType(context, target)) { + context->handleError(Error(GL_INVALID_ENUM, "Invalid query target")); return false; } - if (texture != 0) + if (id == 0) { - gl::Texture *tex = context->getTexture(texture); + context->handleError(Error(GL_INVALID_OPERATION, "Query id is 0")); + return false; + } - if (tex == NULL) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } + // From EXT_occlusion_query_boolean: If BeginQueryEXT is called with an + // of zero, if the active query object name for is non-zero (for the + // targets ANY_SAMPLES_PASSED_EXT and ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, if + // the active query for either target is non-zero), if is the name of an + // existing query object whose type does not match , or if is the + // active query object name for any query type, the error INVALID_OPERATION is + // generated. - if (level < 0) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } + // Ensure no other queries are active + // NOTE: If other queries than occlusion are supported, we will need to check + // separately that: + // a) The query ID passed is not the current active query for any target/type + // b) There are no active queries for the requested target (and in the case + // of GL_ANY_SAMPLES_PASSED_EXT and GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, + // no query may be active for either if glBeginQuery targets either. + + if (context->getGLState().isQueryActive(target)) + { + context->handleError(Error(GL_INVALID_OPERATION, "Other query is active")); + return false; } - const gl::Framebuffer *framebuffer = context->getGLState().getTargetFramebuffer(target); - ASSERT(framebuffer); + Query *queryObject = context->getQuery(id, true, target); - if (framebuffer->id() == 0) + // check that name was obtained with glGenQueries + if (!queryObject) { - context->handleError( - Error(GL_INVALID_OPERATION, "Cannot change default FBO's attachments")); + context->handleError(Error(GL_INVALID_OPERATION, "Invalid query id")); + return false; + } + + // check for type mismatch + if (queryObject->getType() != target) + { + context->handleError(Error(GL_INVALID_OPERATION, "Query type does not match target")); return false; } return true; } -bool ValidateFramebufferTexture2D(Context *context, GLenum target, GLenum attachment, - GLenum textarget, GLuint texture, GLint level) +bool ValidateBeginQueryEXT(gl::Context *context, GLenum target, GLuint id) { - // Attachments are required to be bound to level 0 without ES3 or the GL_OES_fbo_render_mipmap extension - if (context->getClientMajorVersion() < 3 && !context->getExtensions().fboRenderMipmap && - level != 0) + if (!context->getExtensions().occlusionQueryBoolean && + !context->getExtensions().disjointTimerQuery && !context->getExtensions().syncQuery) { - context->handleError(Error(GL_INVALID_VALUE)); + context->handleError(Error(GL_INVALID_OPERATION, "Query extension not enabled")); return false; } - if (!ValidateFramebufferTextureBase(context, target, attachment, texture, level)) + return ValidateBeginQueryBase(context, target, id); +} + +bool ValidateEndQueryBase(gl::Context *context, GLenum target) +{ + if (!ValidQueryType(context, target)) { + context->handleError(Error(GL_INVALID_ENUM, "Invalid query target")); return false; } - if (texture != 0) - { - gl::Texture *tex = context->getTexture(texture); - ASSERT(tex); - - const gl::Caps &caps = context->getCaps(); - - switch (textarget) - { - case GL_TEXTURE_2D: - { - if (level > gl::log2(caps.max2DTextureSize)) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - if (tex->getTarget() != GL_TEXTURE_2D) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - } - break; + const Query *queryObject = context->getGLState().getActiveQuery(target); - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - { - if (level > gl::log2(caps.maxCubeMapTextureSize)) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - if (tex->getTarget() != GL_TEXTURE_CUBE_MAP) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - } - break; + if (queryObject == nullptr) + { + context->handleError(Error(GL_INVALID_OPERATION, "Query target not active")); + return false; + } - default: - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } + return true; +} - const Format &format = tex->getFormat(textarget, level); - if (format.info->compressed) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } +bool ValidateEndQueryEXT(gl::Context *context, GLenum target) +{ + if (!context->getExtensions().occlusionQueryBoolean && + !context->getExtensions().disjointTimerQuery && !context->getExtensions().syncQuery) + { + context->handleError(Error(GL_INVALID_OPERATION, "Query extension not enabled")); + return false; } - return true; + return ValidateEndQueryBase(context, target); } -bool ValidateGetUniformBase(Context *context, GLuint program, GLint location) +bool ValidateQueryCounterEXT(Context *context, GLuint id, GLenum target) { - if (program == 0) + if (!context->getExtensions().disjointTimerQuery) { - context->handleError(Error(GL_INVALID_VALUE)); + context->handleError(Error(GL_INVALID_OPERATION, "Disjoint timer query not enabled")); return false; } - gl::Program *programObject = GetValidProgram(context, program); - if (!programObject) + if (target != GL_TIMESTAMP_EXT) { + context->handleError(Error(GL_INVALID_ENUM, "Invalid query target")); return false; } - if (!programObject || !programObject->isLinked()) + Query *queryObject = context->getQuery(id, true, target); + if (queryObject == nullptr) { - context->handleError(Error(GL_INVALID_OPERATION)); + context->handleError(Error(GL_INVALID_OPERATION, "Invalid query id")); return false; } - if (!programObject->isValidUniformLocation(location)) + if (context->getGLState().isQueryActive(queryObject)) { - context->handleError(Error(GL_INVALID_OPERATION)); + context->handleError(Error(GL_INVALID_OPERATION, "Query is active")); return false; } return true; } -bool ValidateGetUniformfv(Context *context, GLuint program, GLint location, GLfloat* params) +bool ValidateGetQueryivBase(Context *context, GLenum target, GLenum pname) { - return ValidateGetUniformBase(context, program, location); -} + if (!ValidQueryType(context, target) && target != GL_TIMESTAMP_EXT) + { + context->handleError(Error(GL_INVALID_ENUM, "Invalid query type")); + return false; + } -bool ValidateGetUniformiv(Context *context, GLuint program, GLint location, GLint* params) -{ - return ValidateGetUniformBase(context, program, location); + switch (pname) + { + case GL_CURRENT_QUERY_EXT: + if (target == GL_TIMESTAMP_EXT) + { + context->handleError( + Error(GL_INVALID_ENUM, "Cannot use current query for timestamp")); + return false; + } + break; + case GL_QUERY_COUNTER_BITS_EXT: + if (!context->getExtensions().disjointTimerQuery || + (target != GL_TIMESTAMP_EXT && target != GL_TIME_ELAPSED_EXT)) + { + context->handleError(Error(GL_INVALID_ENUM, "Invalid pname")); + return false; + } + break; + default: + context->handleError(Error(GL_INVALID_ENUM, "Invalid pname")); + return false; + } + + return true; } -static bool ValidateSizedGetUniform(Context *context, - GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length) +bool ValidateGetQueryivEXT(Context *context, GLenum target, GLenum pname, GLint *params) { - if (length) + if (!context->getExtensions().occlusionQueryBoolean && + !context->getExtensions().disjointTimerQuery && !context->getExtensions().syncQuery) { - *length = 0; + context->handleError(Error(GL_INVALID_OPERATION, "Query extension not enabled")); + return false; } - if (!ValidateGetUniformBase(context, program, location)) + return ValidateGetQueryivBase(context, target, pname); +} + +bool ValidateGetQueryObjectValueBase(Context *context, GLuint id, GLenum pname) +{ + Query *queryObject = context->getQuery(id, false, GL_NONE); + + if (!queryObject) { + context->handleError(Error(GL_INVALID_OPERATION, "Query does not exist")); return false; } - if (bufSize < 0) + if (context->getGLState().isQueryActive(queryObject)) { - context->handleError(Error(GL_INVALID_VALUE, "bufSize cannot be negative.")); + context->handleError(Error(GL_INVALID_OPERATION, "Query currently active")); return false; } - gl::Program *programObject = context->getProgram(program); - ASSERT(programObject); - - // sized queries -- ensure the provided buffer is large enough - const LinkedUniform &uniform = programObject->getUniformByLocation(location); - size_t requiredBytes = VariableExternalSize(uniform.type); - if (static_cast(bufSize) < requiredBytes) + switch (pname) { - context->handleError( - Error(GL_INVALID_OPERATION, "bufSize of at least %u is required.", requiredBytes)); - return false; - } + case GL_QUERY_RESULT_EXT: + case GL_QUERY_RESULT_AVAILABLE_EXT: + break; - if (length) - { - *length = VariableComponentCount(uniform.type); + default: + context->handleError(Error(GL_INVALID_ENUM, "Invalid pname enum")); + return false; } return true; } -bool ValidateGetnUniformfvEXT(Context *context, GLuint program, GLint location, GLsizei bufSize, GLfloat* params) +bool ValidateGetQueryObjectivEXT(Context *context, GLuint id, GLenum pname, GLint *params) { - return ValidateSizedGetUniform(context, program, location, bufSize, nullptr); + if (!context->getExtensions().disjointTimerQuery) + { + context->handleError(Error(GL_INVALID_OPERATION, "Timer query extension not enabled")); + return false; + } + return ValidateGetQueryObjectValueBase(context, id, pname); } -bool ValidateGetnUniformivEXT(Context *context, GLuint program, GLint location, GLsizei bufSize, GLint* params) +bool ValidateGetQueryObjectuivEXT(Context *context, GLuint id, GLenum pname, GLuint *params) { - return ValidateSizedGetUniform(context, program, location, bufSize, nullptr); + if (!context->getExtensions().disjointTimerQuery && + !context->getExtensions().occlusionQueryBoolean && !context->getExtensions().syncQuery) + { + context->handleError(Error(GL_INVALID_OPERATION, "Query extension not enabled")); + return false; + } + return ValidateGetQueryObjectValueBase(context, id, pname); } -bool ValidateGetUniformfvRobustANGLE(Context *context, - GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLfloat *params) +bool ValidateGetQueryObjecti64vEXT(Context *context, GLuint id, GLenum pname, GLint64 *params) { - if (!ValidateRobustEntryPoint(context, bufSize)) + if (!context->getExtensions().disjointTimerQuery) { + context->handleError(Error(GL_INVALID_OPERATION, "Timer query extension not enabled")); return false; } - - // bufSize is validated in ValidateSizedGetUniform - return ValidateSizedGetUniform(context, program, location, bufSize, length); + return ValidateGetQueryObjectValueBase(context, id, pname); } -bool ValidateGetUniformivRobustANGLE(Context *context, - GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLint *params) +bool ValidateGetQueryObjectui64vEXT(Context *context, GLuint id, GLenum pname, GLuint64 *params) { - if (!ValidateRobustEntryPoint(context, bufSize)) + if (!context->getExtensions().disjointTimerQuery) { + context->handleError(Error(GL_INVALID_OPERATION, "Timer query extension not enabled")); return false; } - - // bufSize is validated in ValidateSizedGetUniform - return ValidateSizedGetUniform(context, program, location, bufSize, length); + return ValidateGetQueryObjectValueBase(context, id, pname); } -bool ValidateGetUniformuivRobustANGLE(Context *context, - GLuint program, +static bool ValidateUniformCommonBase(gl::Context *context, + GLenum targetUniformType, GLint location, - GLsizei bufSize, - GLsizei *length, - GLuint *params) + GLsizei count, + const LinkedUniform **uniformOut) { - if (!ValidateRobustEntryPoint(context, bufSize)) + if (count < 0) { + context->handleError(Error(GL_INVALID_VALUE)); return false; } - if (context->getClientMajorVersion() < 3) + gl::Program *program = context->getGLState().getProgram(); + if (!program) { - context->handleError( - Error(GL_INVALID_OPERATION, "Entry point requires at least OpenGL ES 3.0.")); + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - // bufSize is validated in ValidateSizedGetUniform - return ValidateSizedGetUniform(context, program, location, bufSize, length); -} - -bool ValidateDiscardFramebufferBase(Context *context, GLenum target, GLsizei numAttachments, - const GLenum *attachments, bool defaultFramebuffer) -{ - if (numAttachments < 0) + if (program->isIgnoredUniformLocation(location)) { - context->handleError(Error(GL_INVALID_VALUE, "numAttachments must not be less than zero")); + // Silently ignore the uniform command return false; } - for (GLsizei i = 0; i < numAttachments; ++i) + if (!program->isValidUniformLocation(location)) { - if (attachments[i] >= GL_COLOR_ATTACHMENT0 && attachments[i] <= GL_COLOR_ATTACHMENT31) - { - if (defaultFramebuffer) - { - context->handleError(Error( - GL_INVALID_ENUM, "Invalid attachment when the default framebuffer is bound")); - return false; - } + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } - if (attachments[i] >= GL_COLOR_ATTACHMENT0 + context->getCaps().maxColorAttachments) - { - context->handleError(Error(GL_INVALID_OPERATION, - "Requested color attachment is greater than the maximum " - "supported color attachments")); - return false; - } - } - else - { - switch (attachments[i]) - { - case GL_DEPTH_ATTACHMENT: - case GL_STENCIL_ATTACHMENT: - case GL_DEPTH_STENCIL_ATTACHMENT: - if (defaultFramebuffer) - { - context->handleError( - Error(GL_INVALID_ENUM, - "Invalid attachment when the default framebuffer is bound")); - return false; - } - break; - case GL_COLOR: - case GL_DEPTH: - case GL_STENCIL: - if (!defaultFramebuffer) - { - context->handleError( - Error(GL_INVALID_ENUM, - "Invalid attachment when the default framebuffer is not bound")); - return false; - } - break; - default: - context->handleError(Error(GL_INVALID_ENUM, "Invalid attachment")); - return false; - } - } + const LinkedUniform &uniform = program->getUniformByLocation(location); + + // attempting to write an array to a non-array uniform is an INVALID_OPERATION + if (!uniform.isArray() && count > 1) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; } + *uniformOut = &uniform; return true; } -bool ValidateInsertEventMarkerEXT(Context *context, GLsizei length, const char *marker) +bool ValidateUniform(gl::Context *context, GLenum uniformType, GLint location, GLsizei count) { - // Note that debug marker calls must not set error state + // Check for ES3 uniform entry points + if (VariableComponentType(uniformType) == GL_UNSIGNED_INT && + context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } - if (length < 0) + const LinkedUniform *uniform = nullptr; + if (!ValidateUniformCommonBase(context, uniformType, location, count, &uniform)) { return false; } - if (marker == nullptr) + GLenum targetBoolType = VariableBoolVectorType(uniformType); + bool samplerUniformCheck = (IsSamplerType(uniform->type) && uniformType == GL_INT); + if (!samplerUniformCheck && uniformType != uniform->type && targetBoolType != uniform->type) { + context->handleError(Error(GL_INVALID_OPERATION)); return false; } return true; } -bool ValidatePushGroupMarkerEXT(Context *context, GLsizei length, const char *marker) +bool ValidateUniformMatrix(gl::Context *context, GLenum matrixType, GLint location, GLsizei count, + GLboolean transpose) { - // Note that debug marker calls must not set error state + // Check for ES3 uniform entry points + int rows = VariableRowCount(matrixType); + int cols = VariableColumnCount(matrixType); + if (rows != cols && context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } - if (length < 0) + if (transpose != GL_FALSE && context->getClientMajorVersion() < 3) { + context->handleError(Error(GL_INVALID_VALUE)); return false; } - if (length > 0 && marker == nullptr) + const LinkedUniform *uniform = nullptr; + if (!ValidateUniformCommonBase(context, matrixType, location, count, &uniform)) + { + return false; + } + + if (uniform->type != matrixType) { + context->handleError(Error(GL_INVALID_OPERATION)); return false; } return true; } -bool ValidateEGLImageTargetTexture2DOES(Context *context, - egl::Display *display, - GLenum target, - egl::Image *image) +bool ValidateStateQuery(ValidationContext *context, + GLenum pname, + GLenum *nativeType, + unsigned int *numParams) { - if (!context->getExtensions().eglImage && !context->getExtensions().eglImageExternal) + if (!context->getQueryParameterInfo(pname, nativeType, numParams)) { - context->handleError(Error(GL_INVALID_OPERATION)); + context->handleError(Error(GL_INVALID_ENUM)); return false; } - switch (target) + const Caps &caps = context->getCaps(); + + if (pname >= GL_DRAW_BUFFER0 && pname <= GL_DRAW_BUFFER15) { - case GL_TEXTURE_2D: - if (!context->getExtensions().eglImage) + unsigned int colorAttachment = (pname - GL_DRAW_BUFFER0); + + if (colorAttachment >= caps.maxDrawBuffers) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } + } + + switch (pname) + { + case GL_TEXTURE_BINDING_2D: + case GL_TEXTURE_BINDING_CUBE_MAP: + case GL_TEXTURE_BINDING_3D: + case GL_TEXTURE_BINDING_2D_ARRAY: + break; + case GL_TEXTURE_BINDING_EXTERNAL_OES: + if (!context->getExtensions().eglStreamConsumerExternal) + { + context->handleError( + Error(GL_INVALID_ENUM, "NV_EGL_stream_consumer_external extension not enabled")); + return false; + } + break; + + case GL_IMPLEMENTATION_COLOR_READ_TYPE: + case GL_IMPLEMENTATION_COLOR_READ_FORMAT: + { + if (context->getGLState().getReadFramebuffer()->checkStatus( + context->getContextState()) != GL_FRAMEBUFFER_COMPLETE) { - context->handleError(Error( - GL_INVALID_ENUM, "GL_TEXTURE_2D texture target requires GL_OES_EGL_image.")); + context->handleError(Error(GL_INVALID_OPERATION)); + return false; } - break; - case GL_TEXTURE_EXTERNAL_OES: - if (!context->getExtensions().eglImageExternal) + const Framebuffer *framebuffer = context->getGLState().getReadFramebuffer(); + ASSERT(framebuffer); + + if (framebuffer->getReadBufferState() == GL_NONE) { - context->handleError(Error( - GL_INVALID_ENUM, - "GL_TEXTURE_EXTERNAL_OES texture target requires GL_OES_EGL_image_external.")); + context->handleError(Error(GL_INVALID_OPERATION, "Read buffer is GL_NONE")); + return false; } - break; - default: - context->handleError(Error(GL_INVALID_ENUM, "invalid texture target.")); - return false; - } + const FramebufferAttachment *attachment = framebuffer->getReadColorbuffer(); + if (!attachment) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } + } + break; - if (!display->isValidImage(image)) - { - context->handleError(Error(GL_INVALID_VALUE, "EGL image is not valid.")); - return false; + default: + break; } - if (image->getSamples() > 0) + // pname is valid, but there are no parameters to return + if (numParams == 0) { - context->handleError(Error(GL_INVALID_OPERATION, - "cannot create a 2D texture from a multisampled EGL image.")); return false; } - const TextureCaps &textureCaps = context->getTextureCaps().get(image->getFormat().asSized()); - if (!textureCaps.texturable) + return true; +} + +bool ValidateCopyTexImageParametersBase(ValidationContext *context, + GLenum target, + GLint level, + GLenum internalformat, + bool isSubImage, + GLint xoffset, + GLint yoffset, + GLint zoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border, + Format *textureFormatOut) +{ + if (level < 0 || xoffset < 0 || yoffset < 0 || zoffset < 0 || width < 0 || height < 0) { - context->handleError(Error(GL_INVALID_OPERATION, - "EGL image internal format is not supported as a texture.")); + context->handleError(Error(GL_INVALID_VALUE)); return false; } - return true; -} - -bool ValidateEGLImageTargetRenderbufferStorageOES(Context *context, - egl::Display *display, - GLenum target, - egl::Image *image) -{ - if (!context->getExtensions().eglImage) + if (std::numeric_limits::max() - xoffset < width || std::numeric_limits::max() - yoffset < height) { - context->handleError(Error(GL_INVALID_OPERATION)); + context->handleError(Error(GL_INVALID_VALUE)); return false; } - switch (target) + if (border != 0) { - case GL_RENDERBUFFER: - break; - - default: - context->handleError(Error(GL_INVALID_ENUM, "invalid renderbuffer target.")); - return false; + context->handleError(Error(GL_INVALID_VALUE)); + return false; } - if (!display->isValidImage(image)) + if (!ValidMipLevel(context, target, level)) { - context->handleError(Error(GL_INVALID_VALUE, "EGL image is not valid.")); + context->handleError(Error(GL_INVALID_VALUE)); return false; } - const TextureCaps &textureCaps = context->getTextureCaps().get(image->getFormat().asSized()); - if (!textureCaps.renderable) + const auto &state = context->getGLState(); + auto readFramebuffer = state.getReadFramebuffer(); + if (readFramebuffer->checkStatus(context->getContextState()) != GL_FRAMEBUFFER_COMPLETE) { - context->handleError(Error( - GL_INVALID_OPERATION, "EGL image internal format is not supported as a renderbuffer.")); + context->handleError(Error(GL_INVALID_FRAMEBUFFER_OPERATION)); return false; } - return true; -} - -bool ValidateBindVertexArrayBase(Context *context, GLuint array) -{ - if (!context->isVertexArrayGenerated(array)) + if (readFramebuffer->id() != 0 && readFramebuffer->getSamples(context->getContextState()) != 0) { - // The default VAO should always exist - ASSERT(array != 0); context->handleError(Error(GL_INVALID_OPERATION)); return false; } - return true; -} - -bool ValidateLinkProgram(Context *context, GLuint program) -{ - if (context->hasActiveTransformFeedback(program)) + if (readFramebuffer->getReadBufferState() == GL_NONE) { - // ES 3.0.4 section 2.15 page 91 - context->handleError(Error(GL_INVALID_OPERATION, - "Cannot link program while program is associated with an active " - "transform feedback object.")); + context->handleError(Error(GL_INVALID_OPERATION, "Read buffer is GL_NONE")); return false; } - return true; -} -bool ValidateProgramBinaryBase(Context *context, - GLuint program, - GLenum binaryFormat, - const void *binary, - GLint length) -{ - Program *programObject = GetValidProgram(context, program); - if (programObject == nullptr) + const gl::Caps &caps = context->getCaps(); + + GLuint maxDimension = 0; + switch (target) { + case GL_TEXTURE_2D: + maxDimension = caps.max2DTextureSize; + break; + + case GL_TEXTURE_CUBE_MAP_POSITIVE_X: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: + case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: + case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: + maxDimension = caps.maxCubeMapTextureSize; + break; + + case GL_TEXTURE_2D_ARRAY: + maxDimension = caps.max2DTextureSize; + break; + + case GL_TEXTURE_3D: + maxDimension = caps.max3DTextureSize; + break; + + default: + context->handleError(Error(GL_INVALID_ENUM)); return false; } - const std::vector &programBinaryFormats = context->getCaps().programBinaryFormats; - if (std::find(programBinaryFormats.begin(), programBinaryFormats.end(), binaryFormat) == - programBinaryFormats.end()) + gl::Texture *texture = + state.getTargetTexture(IsCubeMapTextureTarget(target) ? GL_TEXTURE_CUBE_MAP : target); + if (!texture) { - context->handleError(Error(GL_INVALID_ENUM, "Program binary format is not valid.")); + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - if (context->hasActiveTransformFeedback(program)) + if (texture->getImmutableFormat() && !isSubImage) { - // ES 3.0.4 section 2.15 page 91 - context->handleError(Error(GL_INVALID_OPERATION, - "Cannot change program binary while program is associated with " - "an active transform feedback object.")); + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - return true; -} + const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(internalformat); -bool ValidateGetProgramBinaryBase(Context *context, - GLuint program, - GLsizei bufSize, - GLsizei *length, - GLenum *binaryFormat, - void *binary) -{ - Program *programObject = GetValidProgram(context, program); - if (programObject == nullptr) + if (formatInfo.depthBits > 0) { + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - if (!programObject->isLinked()) + if (formatInfo.compressed && !ValidCompressedImageSize(context, internalformat, width, height)) { - context->handleError(Error(GL_INVALID_OPERATION, "Program is not linked.")); + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - return true; -} - -bool ValidateUseProgram(Context *context, GLuint program) -{ - if (program != 0) + if (isSubImage) { - Program *programObject = context->getProgram(program); - if (!programObject) + if (static_cast(xoffset + width) > texture->getWidth(target, level) || + static_cast(yoffset + height) > texture->getHeight(target, level) || + static_cast(zoffset) >= texture->getDepth(target, level)) { - // ES 3.1.0 section 7.3 page 72 - if (context->getShader(program)) - { - context->handleError( - Error(GL_INVALID_OPERATION, - "Attempted to use a single shader instead of a shader program.")); - return false; - } - else - { - context->handleError(Error(GL_INVALID_VALUE, "Program invalid.")); - return false; - } + context->handleError(Error(GL_INVALID_VALUE)); + return false; } - if (!programObject->isLinked()) + } + else + { + if (IsCubeMapTextureTarget(target) && width != height) { - context->handleError(Error(GL_INVALID_OPERATION, "Program not linked.")); + context->handleError(Error(GL_INVALID_VALUE)); + return false; + } + + if (!formatInfo.textureSupport(context->getClientMajorVersion(), context->getExtensions())) + { + context->handleError(Error(GL_INVALID_ENUM)); + return false; + } + + int maxLevelDimension = (maxDimension >> level); + if (static_cast(width) > maxLevelDimension || static_cast(height) > maxLevelDimension) + { + context->handleError(Error(GL_INVALID_VALUE)); return false; } } - if (context->getGLState().isTransformFeedbackActiveUnpaused()) + + if (textureFormatOut) { - // ES 3.0.4 section 2.15 page 91 - context->handleError( - Error(GL_INVALID_OPERATION, - "Cannot change active program while transform feedback is unpaused.")); - return false; + *textureFormatOut = texture->getFormat(target, level); } - return true; } -bool ValidateCopyTexImage2D(ValidationContext *context, - GLenum target, - GLint level, - GLenum internalformat, - GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLint border) +static bool ValidateDrawBase(ValidationContext *context, + GLenum mode, + GLsizei count, + GLsizei primcount) { - if (context->getClientMajorVersion() < 3) + switch (mode) { - return ValidateES2CopyTexImageParameters(context, target, level, internalformat, false, 0, - 0, x, y, width, height, border); + case GL_POINTS: + case GL_LINES: + case GL_LINE_LOOP: + case GL_LINE_STRIP: + case GL_TRIANGLES: + case GL_TRIANGLE_STRIP: + case GL_TRIANGLE_FAN: + break; + default: + context->handleError(Error(GL_INVALID_ENUM)); + return false; } - ASSERT(context->getClientMajorVersion() == 3); - return ValidateES3CopyTexImage2DParameters(context, target, level, internalformat, false, 0, 0, - 0, x, y, width, height, border); -} + if (count < 0) + { + context->handleError(Error(GL_INVALID_VALUE)); + return false; + } -bool ValidateFramebufferRenderbuffer(Context *context, - GLenum target, - GLenum attachment, - GLenum renderbuffertarget, - GLuint renderbuffer) -{ - if (!ValidFramebufferTarget(target) || - (renderbuffertarget != GL_RENDERBUFFER && renderbuffer != 0)) + const State &state = context->getGLState(); + + // Check for mapped buffers + if (state.hasMappedBuffer(GL_ARRAY_BUFFER)) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } + + Framebuffer *framebuffer = state.getDrawFramebuffer(); + if (context->getLimitations().noSeparateStencilRefsAndMasks) + { + const FramebufferAttachment *stencilBuffer = framebuffer->getStencilbuffer(); + GLuint stencilBits = stencilBuffer ? stencilBuffer->getStencilSize() : 0; + GLuint minimumRequiredStencilMask = (1 << stencilBits) - 1; + const DepthStencilState &depthStencilState = state.getDepthStencilState(); + if ((depthStencilState.stencilWritemask & minimumRequiredStencilMask) != + (depthStencilState.stencilBackWritemask & minimumRequiredStencilMask) || + state.getStencilRef() != state.getStencilBackRef() || + (depthStencilState.stencilMask & minimumRequiredStencilMask) != + (depthStencilState.stencilBackMask & minimumRequiredStencilMask)) + { + // Note: these separate values are not supported in WebGL, due to D3D's limitations. See + // Section 6.10 of the WebGL 1.0 spec + ERR( + "This ANGLE implementation does not support separate front/back stencil " + "writemasks, reference values, or stencil mask values."); + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } + } + + if (framebuffer->checkStatus(context->getContextState()) != GL_FRAMEBUFFER_COMPLETE) { - context->handleError(Error(GL_INVALID_ENUM)); + context->handleError(Error(GL_INVALID_FRAMEBUFFER_OPERATION)); return false; } - return ValidateFramebufferRenderbufferParameters(context, target, attachment, - renderbuffertarget, renderbuffer); -} - -bool ValidateDrawBuffersBase(ValidationContext *context, GLsizei n, const GLenum *bufs) -{ - // INVALID_VALUE is generated if n is negative or greater than value of MAX_DRAW_BUFFERS - if (n < 0 || static_cast(n) > context->getCaps().maxDrawBuffers) + gl::Program *program = state.getProgram(); + if (!program) { - context->handleError( - Error(GL_INVALID_VALUE, "n must be non-negative and no greater than MAX_DRAW_BUFFERS")); + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - ASSERT(context->getGLState().getDrawFramebuffer()); - GLuint frameBufferId = context->getGLState().getDrawFramebuffer()->id(); - GLuint maxColorAttachment = GL_COLOR_ATTACHMENT0_EXT + context->getCaps().maxColorAttachments; + if (!program->validateSamplers(NULL, context->getCaps())) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } - // This should come first before the check for the default frame buffer - // because when we switch to ES3.1+, invalid enums will return INVALID_ENUM - // rather than INVALID_OPERATION - for (int colorAttachment = 0; colorAttachment < n; colorAttachment++) + // Uniform buffer validation + for (unsigned int uniformBlockIndex = 0; uniformBlockIndex < program->getActiveUniformBlockCount(); uniformBlockIndex++) { - const GLenum attachment = GL_COLOR_ATTACHMENT0_EXT + colorAttachment; + const gl::UniformBlock &uniformBlock = program->getUniformBlockByIndex(uniformBlockIndex); + GLuint blockBinding = program->getUniformBlockBinding(uniformBlockIndex); + const OffsetBindingPointer &uniformBuffer = + state.getIndexedUniformBuffer(blockBinding); - if (bufs[colorAttachment] != GL_NONE && bufs[colorAttachment] != GL_BACK && - (bufs[colorAttachment] < GL_COLOR_ATTACHMENT0 || - bufs[colorAttachment] > GL_COLOR_ATTACHMENT31)) - { - // Value in bufs is not NONE, BACK, or GL_COLOR_ATTACHMENTi - // The 3.0.4 spec says to generate GL_INVALID_OPERATION here, but this - // was changed to GL_INVALID_ENUM in 3.1, which dEQP also expects. - // 3.1 is still a bit ambiguous about the error, but future specs are - // expected to clarify that GL_INVALID_ENUM is the correct error. - context->handleError(Error(GL_INVALID_ENUM, "Invalid buffer value")); - return false; - } - else if (bufs[colorAttachment] >= maxColorAttachment) - { - context->handleError( - Error(GL_INVALID_OPERATION, "Buffer value is greater than MAX_DRAW_BUFFERS")); - return false; - } - else if (bufs[colorAttachment] != GL_NONE && bufs[colorAttachment] != attachment && - frameBufferId != 0) + if (uniformBuffer.get() == nullptr) { - // INVALID_OPERATION-GL is bound to buffer and ith argument - // is not COLOR_ATTACHMENTi or NONE + // undefined behaviour context->handleError( - Error(GL_INVALID_OPERATION, "Ith value does not match COLOR_ATTACHMENTi or NONE")); + Error(GL_INVALID_OPERATION, + "It is undefined behaviour to have a used but unbound uniform buffer.")); return false; } - } - // INVALID_OPERATION is generated if GL is bound to the default framebuffer - // and n is not 1 or bufs is bound to value other than BACK and NONE - if (frameBufferId == 0) - { - if (n != 1) + size_t uniformBufferSize = uniformBuffer.getSize(); + if (uniformBufferSize == 0) { - context->handleError(Error(GL_INVALID_OPERATION, - "n must be 1 when GL is bound to the default framebuffer")); - return false; + // Bind the whole buffer. + uniformBufferSize = static_cast(uniformBuffer->getSize()); } - if (bufs[0] != GL_NONE && bufs[0] != GL_BACK) + if (uniformBufferSize < uniformBlock.dataSize) { - context->handleError(Error( - GL_INVALID_OPERATION, - "Only NONE or BACK are valid values when drawing to the default framebuffer")); + // undefined behaviour + context->handleError( + Error(GL_INVALID_OPERATION, + "It is undefined behaviour to use a uniform buffer that is too small.")); return false; } } - return true; + // No-op if zero count + return (count > 0); } -bool ValidateCopyTexSubImage2D(Context *context, - GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLint x, - GLint y, - GLsizei width, - GLsizei height) +bool ValidateDrawArrays(ValidationContext *context, + GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount) { - if (context->getClientMajorVersion() < 3) + if (first < 0) { - return ValidateES2CopyTexImageParameters(context, target, level, GL_NONE, true, xoffset, - yoffset, x, y, width, height, 0); + context->handleError(Error(GL_INVALID_VALUE)); + return false; } - return ValidateES3CopyTexImage2DParameters(context, target, level, GL_NONE, true, xoffset, - yoffset, 0, x, y, width, height, 0); -} - -bool ValidateGetBufferPointervBase(Context *context, - GLenum target, - GLenum pname, - GLsizei *length, - void **params) -{ - if (length) + const State &state = context->getGLState(); + gl::TransformFeedback *curTransformFeedback = state.getCurrentTransformFeedback(); + if (curTransformFeedback && curTransformFeedback->isActive() && !curTransformFeedback->isPaused() && + curTransformFeedback->getPrimitiveMode() != mode) { - *length = 0; + // It is an invalid operation to call DrawArrays or DrawArraysInstanced with a draw mode + // that does not match the current transform feedback object's draw mode (if transform feedback + // is active), (3.0.2, section 2.14, pg 86) + context->handleError(Error(GL_INVALID_OPERATION)); + return false; } - if (context->getClientMajorVersion() < 3 && !context->getExtensions().mapBuffer) + if (!ValidateDrawBase(context, mode, count, primcount)) { - context->handleError( - Error(GL_INVALID_OPERATION, - "Context does not support OpenGL ES 3.0 or GL_OES_map_buffer is not enabled.")); return false; } - if (!ValidBufferTarget(context, target)) + if (!ValidateDrawAttribs(context, primcount, count)) { - context->handleError(Error(GL_INVALID_ENUM, "Buffer target not valid: 0x%X", target)); return false; } - switch (pname) - { - case GL_BUFFER_MAP_POINTER: - break; - - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown pname.")); - return false; - } + return true; +} - // GLES 3.0 section 2.10.1: "Attempts to attempts to modify or query buffer object state for a - // target bound to zero generate an INVALID_OPERATION error." - // GLES 3.1 section 6.6 explicitly specifies this error. - if (context->getGLState().getTargetBuffer(target) == nullptr) +bool ValidateDrawArraysInstanced(Context *context, GLenum mode, GLint first, GLsizei count, GLsizei primcount) +{ + if (primcount < 0) { - context->handleError( - Error(GL_INVALID_OPERATION, "Can not get pointer for reserved buffer name zero.")); + context->handleError(Error(GL_INVALID_VALUE)); return false; } - if (length) + if (!ValidateDrawArrays(context, mode, first, count, primcount)) { - *length = 1; + return false; } - return true; + // No-op if zero primitive count + return (primcount > 0); } -bool ValidateUnmapBufferBase(Context *context, GLenum target) +static bool ValidateDrawInstancedANGLE(Context *context) { - if (!ValidBufferTarget(context, target)) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid buffer target.")); - return false; - } + // Verify there is at least one active attribute with a divisor of zero + const gl::State &state = context->getGLState(); - Buffer *buffer = context->getGLState().getTargetBuffer(target); + gl::Program *program = state.getProgram(); - if (buffer == nullptr || !buffer->isMapped()) + const VertexArray *vao = state.getVertexArray(); + for (size_t attributeIndex = 0; attributeIndex < MAX_VERTEX_ATTRIBS; attributeIndex++) { - context->handleError(Error(GL_INVALID_OPERATION, "Buffer not mapped.")); - return false; + const VertexAttribute &attrib = vao->getVertexAttribute(attributeIndex); + if (program->isAttribLocationActive(attributeIndex) && attrib.divisor == 0) + { + return true; + } } - return true; + context->handleError(Error(GL_INVALID_OPERATION, + "ANGLE_instanced_arrays requires that at least one active attribute" + "has a divisor of zero.")); + return false; } -bool ValidateMapBufferRangeBase(Context *context, - GLenum target, - GLintptr offset, - GLsizeiptr length, - GLbitfield access) +bool ValidateDrawArraysInstancedANGLE(Context *context, GLenum mode, GLint first, GLsizei count, GLsizei primcount) { - if (!ValidBufferTarget(context, target)) + if (!ValidateDrawInstancedANGLE(context)) { - context->handleError(Error(GL_INVALID_ENUM, "Invalid buffer target.")); return false; } - if (offset < 0 || length < 0) + return ValidateDrawArraysInstanced(context, mode, first, count, primcount); +} + +bool ValidateDrawElements(ValidationContext *context, + GLenum mode, + GLsizei count, + GLenum type, + const GLvoid *indices, + GLsizei primcount, + IndexRange *indexRangeOut) +{ + switch (type) { - context->handleError(Error(GL_INVALID_VALUE, "Invalid offset or length.")); - return false; + case GL_UNSIGNED_BYTE: + case GL_UNSIGNED_SHORT: + break; + case GL_UNSIGNED_INT: + if (context->getClientMajorVersion() < 3 && !context->getExtensions().elementIndexUint) + { + context->handleError(Error(GL_INVALID_ENUM)); + return false; + } + break; + default: + context->handleError(Error(GL_INVALID_ENUM)); + return false; } - Buffer *buffer = context->getGLState().getTargetBuffer(target); + const State &state = context->getGLState(); - if (!buffer) + gl::TransformFeedback *curTransformFeedback = state.getCurrentTransformFeedback(); + if (curTransformFeedback && curTransformFeedback->isActive() && !curTransformFeedback->isPaused()) { - context->handleError(Error(GL_INVALID_OPERATION, "Attempted to map buffer object zero.")); + // It is an invalid operation to call DrawElements, DrawRangeElements or DrawElementsInstanced + // while transform feedback is active, (3.0.2, section 2.14, pg 86) + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - // Check for buffer overflow - CheckedNumeric checkedOffset(offset); - auto checkedSize = checkedOffset + length; - - if (!checkedSize.IsValid() || checkedSize.ValueOrDie() > static_cast(buffer->getSize())) + // Check for mapped buffers + if (state.hasMappedBuffer(GL_ELEMENT_ARRAY_BUFFER)) { - context->handleError( - Error(GL_INVALID_VALUE, "Mapped range does not fit into buffer dimensions.")); + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - // Check for invalid bits in the mask - GLbitfield allAccessBits = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_RANGE_BIT | - GL_MAP_INVALIDATE_BUFFER_BIT | GL_MAP_FLUSH_EXPLICIT_BIT | - GL_MAP_UNSYNCHRONIZED_BIT; - - if (access & ~(allAccessBits)) + const gl::VertexArray *vao = state.getVertexArray(); + gl::Buffer *elementArrayBuffer = vao->getElementArrayBuffer().get(); + if (!indices && !elementArrayBuffer) { - context->handleError(Error(GL_INVALID_VALUE, "Invalid access bits: 0x%X.", access)); + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - if (length == 0) - { - context->handleError(Error(GL_INVALID_OPERATION, "Buffer mapping length is zero.")); - return false; + if (elementArrayBuffer) + { + const gl::Type &typeInfo = gl::GetTypeInfo(type); + + GLint64 offset = reinterpret_cast(indices); + GLint64 byteCount = static_cast(typeInfo.bytes) * static_cast(count)+offset; + + // check for integer overflows + if (static_cast(count) > (std::numeric_limits::max() / typeInfo.bytes) || + byteCount > static_cast(std::numeric_limits::max())) + { + context->handleError(Error(GL_OUT_OF_MEMORY)); + return false; + } + + // Check for reading past the end of the bound buffer object + if (byteCount > elementArrayBuffer->getSize()) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } } - - if (buffer->isMapped()) + else if (!indices) { - context->handleError(Error(GL_INVALID_OPERATION, "Buffer is already mapped.")); + // Catch this programming error here + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - // Check for invalid bit combinations - if ((access & (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT)) == 0) + if (!ValidateDrawBase(context, mode, count, primcount)) { - context->handleError( - Error(GL_INVALID_OPERATION, "Need to map buffer for either reading or writing.")); return false; } - GLbitfield writeOnlyBits = - GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT | GL_MAP_UNSYNCHRONIZED_BIT; - - if ((access & GL_MAP_READ_BIT) != 0 && (access & writeOnlyBits) != 0) + // Use max index to validate if our vertex buffers are large enough for the pull. + // TODO: offer fast path, with disabled index validation. + // TODO: also disable index checking on back-ends that are robust to out-of-range accesses. + if (elementArrayBuffer) { - context->handleError(Error(GL_INVALID_OPERATION, - "Invalid access bits when mapping buffer for reading: 0x%X.", - access)); - return false; + uintptr_t offset = reinterpret_cast(indices); + Error error = + elementArrayBuffer->getIndexRange(type, static_cast(offset), count, + state.isPrimitiveRestartEnabled(), indexRangeOut); + if (error.isError()) + { + context->handleError(error); + return false; + } } - - if ((access & GL_MAP_WRITE_BIT) == 0 && (access & GL_MAP_FLUSH_EXPLICIT_BIT) != 0) + else { - context->handleError(Error( - GL_INVALID_OPERATION, - "The explicit flushing bit may only be set if the buffer is mapped for writing.")); - return false; + *indexRangeOut = ComputeIndexRange(type, indices, count, state.isPrimitiveRestartEnabled()); } - return true; -} -bool ValidateFlushMappedBufferRangeBase(Context *context, - GLenum target, - GLintptr offset, - GLsizeiptr length) -{ - if (offset < 0 || length < 0) + // If we use an index greater than our maximum supported index range, return an error. + // The ES3 spec does not specify behaviour here, it is undefined, but ANGLE should always + // return an error if possible here. + if (static_cast(indexRangeOut->end) >= context->getCaps().maxElementIndex) { - context->handleError(Error(GL_INVALID_VALUE, "Invalid offset/length parameters.")); + context->handleError(Error(GL_INVALID_OPERATION, g_ExceedsMaxElementErrorMessage)); return false; } - if (!ValidBufferTarget(context, target)) + if (!ValidateDrawAttribs(context, primcount, static_cast(indexRangeOut->vertexCount()))) { - context->handleError(Error(GL_INVALID_ENUM, "Invalid buffer target.")); return false; } - Buffer *buffer = context->getGLState().getTargetBuffer(target); + // No op if there are no real indices in the index data (all are primitive restart). + return (indexRangeOut->vertexIndexCount > 0); +} - if (buffer == nullptr) +bool ValidateDrawElementsInstanced(Context *context, + GLenum mode, + GLsizei count, + GLenum type, + const GLvoid *indices, + GLsizei primcount, + IndexRange *indexRangeOut) +{ + if (primcount < 0) { - context->handleError(Error(GL_INVALID_OPERATION, "Attempted to flush buffer object zero.")); + context->handleError(Error(GL_INVALID_VALUE)); return false; } - if (!buffer->isMapped() || (buffer->getAccessFlags() & GL_MAP_FLUSH_EXPLICIT_BIT) == 0) + if (!ValidateDrawElements(context, mode, count, type, indices, primcount, indexRangeOut)) { - context->handleError(Error( - GL_INVALID_OPERATION, "Attempted to flush a buffer not mapped for explicit flushing.")); return false; } - // Check for buffer overflow - CheckedNumeric checkedOffset(offset); - auto checkedSize = checkedOffset + length; + // No-op zero primitive count + return (primcount > 0); +} - if (!checkedSize.IsValid() || - checkedSize.ValueOrDie() > static_cast(buffer->getMapLength())) +bool ValidateDrawElementsInstancedANGLE(Context *context, + GLenum mode, + GLsizei count, + GLenum type, + const GLvoid *indices, + GLsizei primcount, + IndexRange *indexRangeOut) +{ + if (!ValidateDrawInstancedANGLE(context)) { - context->handleError( - Error(GL_INVALID_VALUE, "Flushed range does not fit into buffer mapping dimensions.")); return false; } - return true; + return ValidateDrawElementsInstanced(context, mode, count, type, indices, primcount, indexRangeOut); } -bool ValidateGenerateMipmap(Context *context, GLenum target) +bool ValidateFramebufferTextureBase(Context *context, GLenum target, GLenum attachment, + GLuint texture, GLint level) { - if (!ValidTextureTarget(context, target)) + if (!ValidFramebufferTarget(target)) { context->handleError(Error(GL_INVALID_ENUM)); return false; } - Texture *texture = context->getTargetTexture(target); - - if (texture == nullptr) + if (!ValidateAttachmentTarget(context, attachment)) { - context->handleError(Error(GL_INVALID_OPERATION)); return false; } - const GLuint effectiveBaseLevel = texture->getTextureState().getEffectiveBaseLevel(); - - // This error isn't spelled out in the spec in a very explicit way, but we interpret the spec so - // that out-of-range base level has a non-color-renderable / non-texture-filterable format. - if (effectiveBaseLevel >= gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS) + if (texture != 0) { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } + gl::Texture *tex = context->getTexture(texture); - GLenum baseTarget = (target == GL_TEXTURE_CUBE_MAP) ? GL_TEXTURE_CUBE_MAP_POSITIVE_X : target; - const auto &format = texture->getFormat(baseTarget, effectiveBaseLevel); - const TextureCaps &formatCaps = context->getTextureCaps().get(format.asSized()); + if (tex == NULL) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } - // GenerateMipmap should not generate an INVALID_OPERATION for textures created with - // unsized formats or that are color renderable and filterable. Since we do not track if - // the texture was created with sized or unsized format (only sized formats are stored), - // it is not possible to make sure the the LUMA formats can generate mipmaps (they should - // be able to) because they aren't color renderable. Simply do a special case for LUMA - // textures since they're the only texture format that can be created with unsized formats - // that is not color renderable. New unsized formats are unlikely to be added, since ES2 - // was the last version to use add them. - if (format.info->depthBits > 0 || format.info->stencilBits > 0 || !formatCaps.filterable || - (!formatCaps.renderable && !format.info->isLUMA()) || format.info->compressed) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; + if (level < 0) + { + context->handleError(Error(GL_INVALID_VALUE)); + return false; + } } - // GL_EXT_sRGB does not support mipmap generation on sRGB textures - if (context->getClientMajorVersion() == 2 && format.info->colorEncoding == GL_SRGB) + const gl::Framebuffer *framebuffer = context->getGLState().getTargetFramebuffer(target); + ASSERT(framebuffer); + + if (framebuffer->id() == 0) { - context->handleError(Error(GL_INVALID_OPERATION)); + context->handleError( + Error(GL_INVALID_OPERATION, "Cannot change default FBO's attachments")); return false; } - // Non-power of 2 ES2 check - if (!context->getExtensions().textureNPOT && - (!isPow2(static_cast(texture->getWidth(baseTarget, 0))) || - !isPow2(static_cast(texture->getHeight(baseTarget, 0))))) + return true; +} + +bool ValidateFramebufferTexture2D(Context *context, GLenum target, GLenum attachment, + GLenum textarget, GLuint texture, GLint level) +{ + // Attachments are required to be bound to level 0 without ES3 or the GL_OES_fbo_render_mipmap extension + if (context->getClientMajorVersion() < 3 && !context->getExtensions().fboRenderMipmap && + level != 0) { - ASSERT(context->getClientMajorVersion() <= 2 && - (target == GL_TEXTURE_2D || target == GL_TEXTURE_CUBE_MAP)); - context->handleError(Error(GL_INVALID_OPERATION)); + context->handleError(Error(GL_INVALID_VALUE)); return false; } - // Cube completeness check - if (target == GL_TEXTURE_CUBE_MAP && !texture->getTextureState().isCubeComplete()) + if (!ValidateFramebufferTextureBase(context, target, attachment, texture, level)) { - context->handleError(Error(GL_INVALID_OPERATION)); return false; } - return true; -} - -bool ValidateGenBuffers(Context *context, GLint n, GLuint *) -{ - return ValidateGenOrDelete(context, n); -} - -bool ValidateDeleteBuffers(Context *context, GLint n, const GLuint *) -{ - return ValidateGenOrDelete(context, n); -} + if (texture != 0) + { + gl::Texture *tex = context->getTexture(texture); + ASSERT(tex); -bool ValidateGenFramebuffers(Context *context, GLint n, GLuint *) -{ - return ValidateGenOrDelete(context, n); -} + const gl::Caps &caps = context->getCaps(); -bool ValidateDeleteFramebuffers(Context *context, GLint n, const GLuint *) -{ - return ValidateGenOrDelete(context, n); -} + switch (textarget) + { + case GL_TEXTURE_2D: + { + if (level > gl::log2(caps.max2DTextureSize)) + { + context->handleError(Error(GL_INVALID_VALUE)); + return false; + } + if (tex->getTarget() != GL_TEXTURE_2D) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } + } + break; -bool ValidateGenRenderbuffers(Context *context, GLint n, GLuint *) -{ - return ValidateGenOrDelete(context, n); -} + case GL_TEXTURE_CUBE_MAP_POSITIVE_X: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: + case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: + case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: + { + if (level > gl::log2(caps.maxCubeMapTextureSize)) + { + context->handleError(Error(GL_INVALID_VALUE)); + return false; + } + if (tex->getTarget() != GL_TEXTURE_CUBE_MAP) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } + } + break; -bool ValidateDeleteRenderbuffers(Context *context, GLint n, const GLuint *) -{ - return ValidateGenOrDelete(context, n); -} + default: + context->handleError(Error(GL_INVALID_ENUM)); + return false; + } -bool ValidateGenTextures(Context *context, GLint n, GLuint *) -{ - return ValidateGenOrDelete(context, n); -} + const Format &format = tex->getFormat(textarget, level); + if (format.info->compressed) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } + } -bool ValidateDeleteTextures(Context *context, GLint n, const GLuint *) -{ - return ValidateGenOrDelete(context, n); + return true; } -bool ValidateGenOrDelete(Context *context, GLint n) +bool ValidateGetUniformBase(Context *context, GLuint program, GLint location) { - if (n < 0) + if (program == 0) { - context->handleError(Error(GL_INVALID_VALUE, "n < 0")); + context->handleError(Error(GL_INVALID_VALUE)); return false; } - return true; -} -bool ValidateEnable(Context *context, GLenum cap) -{ - if (!ValidCap(context, cap, false)) + gl::Program *programObject = GetValidProgram(context, program); + if (!programObject) { - context->handleError(Error(GL_INVALID_ENUM, "Invalid cap.")); return false; } - if (context->getLimitations().noSampleAlphaToCoverageSupport && - cap == GL_SAMPLE_ALPHA_TO_COVERAGE) + if (!programObject || !programObject->isLinked()) { - const char *errorMessage = "Current renderer doesn't support alpha-to-coverage"; - context->handleError(Error(GL_INVALID_OPERATION, errorMessage)); - - // We also output an error message to the debugger window if tracing is active, so that - // developers can see the error message. - ERR("%s", errorMessage); + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - return true; -} - -bool ValidateDisable(Context *context, GLenum cap) -{ - if (!ValidCap(context, cap, false)) + if (!programObject->isValidUniformLocation(location)) { - context->handleError(Error(GL_INVALID_ENUM, "Invalid cap.")); + context->handleError(Error(GL_INVALID_OPERATION)); return false; } return true; } -bool ValidateIsEnabled(Context *context, GLenum cap) +bool ValidateGetUniformfv(Context *context, GLuint program, GLint location, GLfloat* params) { - if (!ValidCap(context, cap, true)) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid cap.")); - return false; - } + return ValidateGetUniformBase(context, program, location); +} - return true; +bool ValidateGetUniformiv(Context *context, GLuint program, GLint location, GLint* params) +{ + return ValidateGetUniformBase(context, program, location); } -bool ValidateRobustEntryPoint(ValidationContext *context, GLsizei bufSize) +static bool ValidateSizedGetUniform(Context *context, GLuint program, GLint location, GLsizei bufSize) { - if (!context->getExtensions().robustClientMemory) + if (!ValidateGetUniformBase(context, program, location)) { - context->handleError( - Error(GL_INVALID_OPERATION, "GL_ANGLE_robust_client_memory is not available.")); return false; } - if (bufSize < 0) + gl::Program *programObject = context->getProgram(program); + ASSERT(programObject); + + // sized queries -- ensure the provided buffer is large enough + const LinkedUniform &uniform = programObject->getUniformByLocation(location); + size_t requiredBytes = VariableExternalSize(uniform.type); + if (static_cast(bufSize) < requiredBytes) { - context->handleError(Error(GL_INVALID_VALUE, "bufSize cannot be negative.")); + context->handleError(Error(GL_INVALID_OPERATION)); return false; } return true; } -bool ValidateRobustBufferSize(ValidationContext *context, GLsizei bufSize, GLsizei numParams) +bool ValidateGetnUniformfvEXT(Context *context, GLuint program, GLint location, GLsizei bufSize, GLfloat* params) { - if (bufSize < numParams) - { - context->handleError(Error(GL_INVALID_OPERATION, - "%u parameters are required but %i were provided.", numParams, - bufSize)); - return false; - } - - return true; + return ValidateSizedGetUniform(context, program, location, bufSize); } -bool ValidateGetFramebufferAttachmentParameteriv(ValidationContext *context, - GLenum target, - GLenum attachment, - GLenum pname, - GLsizei *numParams) +bool ValidateGetnUniformivEXT(Context *context, GLuint program, GLint location, GLsizei bufSize, GLint* params) { - // Only one parameter is returned from glGetFramebufferAttachmentParameteriv - *numParams = 1; + return ValidateSizedGetUniform(context, program, location, bufSize); +} - if (!ValidFramebufferTarget(target)) +bool ValidateDiscardFramebufferBase(Context *context, GLenum target, GLsizei numAttachments, + const GLenum *attachments, bool defaultFramebuffer) +{ + if (numAttachments < 0) { - context->handleError(Error(GL_INVALID_ENUM)); + context->handleError(Error(GL_INVALID_VALUE, "numAttachments must not be less than zero")); return false; } - int clientVersion = context->getClientMajorVersion(); - - switch (pname) - { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: - break; - - case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: - if (clientVersion < 3 && !context->getExtensions().sRGB) - { - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - break; - - case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE: - case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: - case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: - case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: - case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: - case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: - case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: - if (clientVersion < 3) - { - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - break; - - default: - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - - // Determine if the attachment is a valid enum - switch (attachment) + for (GLsizei i = 0; i < numAttachments; ++i) { - case GL_BACK: - case GL_FRONT: - case GL_DEPTH: - case GL_STENCIL: - case GL_DEPTH_STENCIL_ATTACHMENT: - if (clientVersion < 3) + if (attachments[i] >= GL_COLOR_ATTACHMENT0 && attachments[i] <= GL_COLOR_ATTACHMENT31) + { + if (defaultFramebuffer) { - context->handleError(Error(GL_INVALID_ENUM)); + context->handleError(Error( + GL_INVALID_ENUM, "Invalid attachment when the default framebuffer is bound")); return false; } - break; - - case GL_DEPTH_ATTACHMENT: - case GL_STENCIL_ATTACHMENT: - break; - default: - if (attachment < GL_COLOR_ATTACHMENT0_EXT || - (attachment - GL_COLOR_ATTACHMENT0_EXT) >= context->getCaps().maxColorAttachments) + if (attachments[i] >= GL_COLOR_ATTACHMENT0 + context->getCaps().maxColorAttachments) { - context->handleError(Error(GL_INVALID_ENUM)); + context->handleError(Error(GL_INVALID_OPERATION, + "Requested color attachment is greater than the maximum " + "supported color attachments")); return false; } - break; - } - - const Framebuffer *framebuffer = context->getGLState().getTargetFramebuffer(target); - ASSERT(framebuffer); - - if (framebuffer->id() == 0) - { - if (clientVersion < 3) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - switch (attachment) - { - case GL_BACK: - case GL_DEPTH: - case GL_STENCIL: - break; - - default: - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - } - else - { - if (attachment >= GL_COLOR_ATTACHMENT0_EXT && attachment <= GL_COLOR_ATTACHMENT15_EXT) - { - // Valid attachment query } else { - switch (attachment) + switch (attachments[i]) { - case GL_DEPTH_ATTACHMENT: - case GL_STENCIL_ATTACHMENT: - break; - - case GL_DEPTH_STENCIL_ATTACHMENT: - if (!framebuffer->hasValidDepthStencil()) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - break; - - default: - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - } - } - - const FramebufferAttachment *attachmentObject = framebuffer->getAttachment(attachment); - if (attachmentObject) - { - ASSERT(attachmentObject->type() == GL_RENDERBUFFER || - attachmentObject->type() == GL_TEXTURE || - attachmentObject->type() == GL_FRAMEBUFFER_DEFAULT); - - switch (pname) - { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: - if (attachmentObject->type() != GL_RENDERBUFFER && - attachmentObject->type() != GL_TEXTURE) - { - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - break; - - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: - if (attachmentObject->type() != GL_TEXTURE) + case GL_DEPTH_ATTACHMENT: + case GL_STENCIL_ATTACHMENT: + case GL_DEPTH_STENCIL_ATTACHMENT: + if (defaultFramebuffer) { - context->handleError(Error(GL_INVALID_ENUM)); + context->handleError( + Error(GL_INVALID_ENUM, + "Invalid attachment when the default framebuffer is bound")); return false; } break; - - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: - if (attachmentObject->type() != GL_TEXTURE) + case GL_COLOR: + case GL_DEPTH: + case GL_STENCIL: + if (!defaultFramebuffer) { - context->handleError(Error(GL_INVALID_ENUM)); + context->handleError( + Error(GL_INVALID_ENUM, + "Invalid attachment when the default framebuffer is not bound")); return false; } break; + default: + context->handleError(Error(GL_INVALID_ENUM, "Invalid attachment")); + return false; + } + } + } - case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: - if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - break; + return true; +} - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: - if (attachmentObject->type() != GL_TEXTURE) - { - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - break; +bool ValidateInsertEventMarkerEXT(Context *context, GLsizei length, const char *marker) +{ + // Note that debug marker calls must not set error state - default: - break; - } + if (length < 0) + { + return false; } - else + + if (marker == nullptr) { - // ES 2.0.25 spec pg 127 states that if the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE - // is NONE, then querying any other pname will generate INVALID_ENUM. + return false; + } - // ES 3.0.2 spec pg 235 states that if the attachment type is none, - // GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME will return zero and be an - // INVALID_OPERATION for all other pnames + return true; +} - switch (pname) - { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: - break; +bool ValidatePushGroupMarkerEXT(Context *context, GLsizei length, const char *marker) +{ + // Note that debug marker calls must not set error state - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: - if (clientVersion < 3) - { - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - break; + if (length < 0) + { + return false; + } - default: - if (clientVersion < 3) - { - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - else - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - } + if (length > 0 && marker == nullptr) + { + return false; + } + + return true; +} + +bool ValidateEGLImageTargetTexture2DOES(Context *context, + egl::Display *display, + GLenum target, + egl::Image *image) +{ + if (!context->getExtensions().eglImage && !context->getExtensions().eglImageExternal) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; } - return true; -} + switch (target) + { + case GL_TEXTURE_2D: + if (!context->getExtensions().eglImage) + { + context->handleError(Error( + GL_INVALID_ENUM, "GL_TEXTURE_2D texture target requires GL_OES_EGL_image.")); + } + break; + + case GL_TEXTURE_EXTERNAL_OES: + if (!context->getExtensions().eglImageExternal) + { + context->handleError(Error( + GL_INVALID_ENUM, + "GL_TEXTURE_EXTERNAL_OES texture target requires GL_OES_EGL_image_external.")); + } + break; + + default: + context->handleError(Error(GL_INVALID_ENUM, "invalid texture target.")); + return false; + } -bool ValidateGetFramebufferAttachmentParameterivRobustANGLE(ValidationContext *context, - GLenum target, - GLenum attachment, - GLenum pname, - GLsizei bufSize, - GLsizei *numParams) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) + if (!display->isValidImage(image)) { + context->handleError(Error(GL_INVALID_VALUE, "EGL image is not valid.")); return false; } - if (!ValidateGetFramebufferAttachmentParameteriv(context, target, attachment, pname, numParams)) + if (image->getSamples() > 0) { + context->handleError(Error(GL_INVALID_OPERATION, + "cannot create a 2D texture from a multisampled EGL image.")); return false; } - if (!ValidateRobustBufferSize(context, bufSize, *numParams)) + const TextureCaps &textureCaps = context->getTextureCaps().get(image->getFormat().asSized()); + if (!textureCaps.texturable) { + context->handleError(Error(GL_INVALID_OPERATION, + "EGL image internal format is not supported as a texture.")); return false; } return true; } -bool ValidateGetBufferParameteriv(ValidationContext *context, - GLenum target, - GLenum pname, - GLint *params) +bool ValidateEGLImageTargetRenderbufferStorageOES(Context *context, + egl::Display *display, + GLenum target, + egl::Image *image) { - return ValidateGetBufferParameterBase(context, target, pname, false, nullptr); -} + if (!context->getExtensions().eglImage) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } -bool ValidateGetBufferParameterivRobustANGLE(ValidationContext *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) + switch (target) + { + case GL_RENDERBUFFER: + break; + + default: + context->handleError(Error(GL_INVALID_ENUM, "invalid renderbuffer target.")); + return false; + } + + if (!display->isValidImage(image)) { + context->handleError(Error(GL_INVALID_VALUE, "EGL image is not valid.")); return false; } - if (!ValidateGetBufferParameterBase(context, target, pname, false, length)) + const TextureCaps &textureCaps = context->getTextureCaps().get(image->getFormat().asSized()); + if (!textureCaps.renderable) { + context->handleError(Error( + GL_INVALID_OPERATION, "EGL image internal format is not supported as a renderbuffer.")); return false; } - if (!ValidateRobustBufferSize(context, bufSize, *length)) + return true; +} + +bool ValidateBindVertexArrayBase(Context *context, GLuint array) +{ + if (!context->isVertexArrayGenerated(array)) { + // The default VAO should always exist + ASSERT(array != 0); + context->handleError(Error(GL_INVALID_OPERATION)); return false; } return true; } -bool ValidateGetBufferParameteri64v(ValidationContext *context, - GLenum target, - GLenum pname, - GLint64 *params) +bool ValidateLinkProgram(Context *context, GLuint program) { - return ValidateGetBufferParameterBase(context, target, pname, false, nullptr); + if (context->hasActiveTransformFeedback(program)) + { + // ES 3.0.4 section 2.15 page 91 + context->handleError(Error(GL_INVALID_OPERATION, + "Cannot link program while program is associated with an active " + "transform feedback object.")); + return false; + } + return true; } -bool ValidateGetBufferParameteri64vRobustANGLE(ValidationContext *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint64 *params) +bool ValidateProgramBinaryBase(Context *context, + GLuint program, + GLenum binaryFormat, + const void *binary, + GLint length) { - if (!ValidateRobustEntryPoint(context, bufSize)) + Program *programObject = GetValidProgram(context, program); + if (programObject == nullptr) { return false; } - if (!ValidateGetBufferParameterBase(context, target, pname, false, length)) + const std::vector &programBinaryFormats = context->getCaps().programBinaryFormats; + if (std::find(programBinaryFormats.begin(), programBinaryFormats.end(), binaryFormat) == + programBinaryFormats.end()) { + context->handleError(Error(GL_INVALID_ENUM, "Program binary format is not valid.")); return false; } - if (!ValidateRobustBufferSize(context, bufSize, *length)) + if (context->hasActiveTransformFeedback(program)) { + // ES 3.0.4 section 2.15 page 91 + context->handleError(Error(GL_INVALID_OPERATION, + "Cannot change program binary while program is associated with " + "an active transform feedback object.")); return false; } return true; } -bool ValidateGetProgramiv(Context *context, GLuint program, GLenum pname, GLsizei *numParams) +bool ValidateGetProgramBinaryBase(Context *context, + GLuint program, + GLsizei bufSize, + GLsizei *length, + GLenum *binaryFormat, + void *binary) { - // Currently, all GetProgramiv queries return 1 parameter - *numParams = 1; - Program *programObject = GetValidProgram(context, program); - if (!programObject) + if (programObject == nullptr) { return false; } - switch (pname) + if (!programObject->isLinked()) { - case GL_DELETE_STATUS: - case GL_LINK_STATUS: - case GL_VALIDATE_STATUS: - case GL_INFO_LOG_LENGTH: - case GL_ATTACHED_SHADERS: - case GL_ACTIVE_ATTRIBUTES: - case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: - case GL_ACTIVE_UNIFORMS: - case GL_ACTIVE_UNIFORM_MAX_LENGTH: - break; + context->handleError(Error(GL_INVALID_OPERATION, "Program is not linked.")); + return false; + } - case GL_PROGRAM_BINARY_LENGTH: - if (context->getClientMajorVersion() < 3 && !context->getExtensions().getProgramBinary) + return true; +} + +bool ValidateUseProgram(Context *context, GLuint program) +{ + if (program != 0) + { + Program *programObject = context->getProgram(program); + if (!programObject) + { + // ES 3.1.0 section 7.3 page 72 + if (context->getShader(program)) { - context->handleError(Error(GL_INVALID_ENUM, - "Querying GL_PROGRAM_BINARY_LENGTH requires " - "GL_OES_get_program_binary or ES 3.0.")); + context->handleError( + Error(GL_INVALID_OPERATION, + "Attempted to use a single shader instead of a shader program.")); return false; } - break; - - case GL_ACTIVE_UNIFORM_BLOCKS: - case GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH: - case GL_TRANSFORM_FEEDBACK_BUFFER_MODE: - case GL_TRANSFORM_FEEDBACK_VARYINGS: - case GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH: - case GL_PROGRAM_BINARY_RETRIEVABLE_HINT: - if (context->getClientMajorVersion() < 3) + else { - context->handleError(Error(GL_INVALID_ENUM, "Querying requires at least ES 3.0.")); + context->handleError(Error(GL_INVALID_VALUE, "Program invalid.")); return false; } - break; - - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown parameter name.")); + } + if (!programObject->isLinked()) + { + context->handleError(Error(GL_INVALID_OPERATION, "Program not linked.")); return false; + } } - - return true; -} - -bool ValidateGetProgramivRobustANGLE(Context *context, - GLuint program, - GLenum pname, - GLsizei bufSize, - GLsizei *numParams) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - - if (!ValidateGetProgramiv(context, program, pname, numParams)) - { - return false; - } - - if (!ValidateRobustBufferSize(context, bufSize, *numParams)) + if (context->getGLState().isTransformFeedbackActiveUnpaused()) { + // ES 3.0.4 section 2.15 page 91 + context->handleError( + Error(GL_INVALID_OPERATION, + "Cannot change active program while transform feedback is unpaused.")); return false; } return true; } -bool ValidateGetRenderbufferParameteriv(Context *context, - GLenum target, - GLenum pname, - GLint *params) -{ - return ValidateGetRenderbufferParameterivBase(context, target, pname, nullptr); -} - -bool ValidateGetRenderbufferParameterivRobustANGLE(Context *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) +bool ValidateCopyTexImage2D(ValidationContext *context, + GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border) { - if (!ValidateRobustEntryPoint(context, bufSize)) + if (context->getClientMajorVersion() < 3) { - return false; + return ValidateES2CopyTexImageParameters(context, target, level, internalformat, false, 0, + 0, x, y, width, height, border); } - if (!ValidateGetRenderbufferParameterivBase(context, target, pname, length)) - { - return false; - } + ASSERT(context->getClientMajorVersion() == 3); + return ValidateES3CopyTexImage2DParameters(context, target, level, internalformat, false, 0, 0, + 0, x, y, width, height, border); +} - if (!ValidateRobustBufferSize(context, bufSize, *length)) +bool ValidateFramebufferRenderbuffer(Context *context, + GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) +{ + if (!ValidFramebufferTarget(target) || + (renderbuffertarget != GL_RENDERBUFFER && renderbuffer != 0)) { + context->handleError(Error(GL_INVALID_ENUM)); return false; } - return true; -} - -bool ValidateGetShaderiv(Context *context, GLuint shader, GLenum pname, GLint *params) -{ - return ValidateGetShaderivBase(context, shader, pname, nullptr); + return ValidateFramebufferRenderbufferParameters(context, target, attachment, + renderbuffertarget, renderbuffer); } -bool ValidateGetShaderivRobustANGLE(Context *context, - GLuint shader, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) +bool ValidateDrawBuffersBase(ValidationContext *context, GLsizei n, const GLenum *bufs) { - if (!ValidateRobustEntryPoint(context, bufSize)) + // INVALID_VALUE is generated if n is negative or greater than value of MAX_DRAW_BUFFERS + if (n < 0 || static_cast(n) > context->getCaps().maxDrawBuffers) { + context->handleError( + Error(GL_INVALID_VALUE, "n must be non-negative and no greater than MAX_DRAW_BUFFERS")); return false; } - if (!ValidateGetShaderivBase(context, shader, pname, length)) + ASSERT(context->getGLState().getDrawFramebuffer()); + GLuint frameBufferId = context->getGLState().getDrawFramebuffer()->id(); + GLuint maxColorAttachment = GL_COLOR_ATTACHMENT0_EXT + context->getCaps().maxColorAttachments; + + // This should come first before the check for the default frame buffer + // because when we switch to ES3.1+, invalid enums will return INVALID_ENUM + // rather than INVALID_OPERATION + for (int colorAttachment = 0; colorAttachment < n; colorAttachment++) { - return false; + const GLenum attachment = GL_COLOR_ATTACHMENT0_EXT + colorAttachment; + + if (bufs[colorAttachment] != GL_NONE && bufs[colorAttachment] != GL_BACK && + (bufs[colorAttachment] < GL_COLOR_ATTACHMENT0 || + bufs[colorAttachment] > GL_COLOR_ATTACHMENT31)) + { + // Value in bufs is not NONE, BACK, or GL_COLOR_ATTACHMENTi + // The 3.0.4 spec says to generate GL_INVALID_OPERATION here, but this + // was changed to GL_INVALID_ENUM in 3.1, which dEQP also expects. + // 3.1 is still a bit ambiguous about the error, but future specs are + // expected to clarify that GL_INVALID_ENUM is the correct error. + context->handleError(Error(GL_INVALID_ENUM, "Invalid buffer value")); + return false; + } + else if (bufs[colorAttachment] >= maxColorAttachment) + { + context->handleError( + Error(GL_INVALID_OPERATION, "Buffer value is greater than MAX_DRAW_BUFFERS")); + return false; + } + else if (bufs[colorAttachment] != GL_NONE && bufs[colorAttachment] != attachment && + frameBufferId != 0) + { + // INVALID_OPERATION-GL is bound to buffer and ith argument + // is not COLOR_ATTACHMENTi or NONE + context->handleError( + Error(GL_INVALID_OPERATION, "Ith value does not match COLOR_ATTACHMENTi or NONE")); + return false; + } } - if (!ValidateRobustBufferSize(context, bufSize, *length)) + // INVALID_OPERATION is generated if GL is bound to the default framebuffer + // and n is not 1 or bufs is bound to value other than BACK and NONE + if (frameBufferId == 0) { - return false; + if (n != 1) + { + context->handleError(Error(GL_INVALID_OPERATION, + "n must be 1 when GL is bound to the default framebuffer")); + return false; + } + + if (bufs[0] != GL_NONE && bufs[0] != GL_BACK) + { + context->handleError(Error( + GL_INVALID_OPERATION, + "Only NONE or BACK are valid values when drawing to the default framebuffer")); + return false; + } } return true; } -bool ValidateGetTexParameterfv(Context *context, GLenum target, GLenum pname, GLfloat *params) +bool ValidateCopyTexSubImage2D(Context *context, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) { - return ValidateGetTexParameterBase(context, target, pname, nullptr); + if (context->getClientMajorVersion() < 3) + { + return ValidateES2CopyTexImageParameters(context, target, level, GL_NONE, true, xoffset, + yoffset, x, y, width, height, 0); + } + + return ValidateES3CopyTexImage2DParameters(context, target, level, GL_NONE, true, xoffset, + yoffset, 0, x, y, width, height, 0); } -bool ValidateGetTexParameterfvRobustANGLE(Context *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLfloat *params) +bool ValidateGetBufferPointervBase(Context *context, GLenum target, GLenum pname, void **params) { - if (!ValidateRobustEntryPoint(context, bufSize)) + if (!ValidBufferTarget(context, target)) { + context->handleError(Error(GL_INVALID_ENUM, "Buffer target not valid: 0x%X", target)); return false; } - if (!ValidateGetTexParameterBase(context, target, pname, length)) + if (pname != GL_BUFFER_MAP_POINTER) { + context->handleError(Error(GL_INVALID_ENUM, "pname not valid: 0x%X", pname)); return false; } - if (!ValidateRobustBufferSize(context, bufSize, *length)) + Buffer *buffer = context->getGLState().getTargetBuffer(target); + + // GLES 3.0 section 2.10.1: "Attempts to attempts to modify or query buffer object state for a + // target bound to zero generate an INVALID_OPERATION error." + // GLES 3.1 section 6.6 explicitly specifies this error. + if (!buffer) { + context->handleError( + Error(GL_INVALID_OPERATION, "Can not get pointer for reserved buffer name zero.")); return false; } return true; } -bool ValidateGetTexParameteriv(Context *context, GLenum target, GLenum pname, GLint *params) -{ - return ValidateGetTexParameterBase(context, target, pname, nullptr); -} - -bool ValidateGetTexParameterivRobustANGLE(Context *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) +bool ValidateUnmapBufferBase(Context *context, GLenum target) { - if (!ValidateRobustEntryPoint(context, bufSize)) + if (!ValidBufferTarget(context, target)) { + context->handleError(Error(GL_INVALID_ENUM, "Invalid buffer target.")); return false; } - if (!ValidateGetTexParameterBase(context, target, pname, length)) - { - return false; - } + Buffer *buffer = context->getGLState().getTargetBuffer(target); - if (!ValidateRobustBufferSize(context, bufSize, *length)) + if (buffer == nullptr || !buffer->isMapped()) { + context->handleError(Error(GL_INVALID_OPERATION, "Buffer not mapped.")); return false; } return true; } -bool ValidateTexParameterf(Context *context, GLenum target, GLenum pname, GLfloat param) -{ - return ValidateTexParameterBase(context, target, pname, -1, ¶m); -} - -bool ValidateTexParameterfv(Context *context, GLenum target, GLenum pname, const GLfloat *params) -{ - return ValidateTexParameterBase(context, target, pname, -1, params); -} - -bool ValidateTexParameterfvRobustANGLE(Context *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - const GLfloat *params) +bool ValidateMapBufferRangeBase(Context *context, + GLenum target, + GLintptr offset, + GLsizeiptr length, + GLbitfield access) { - if (!ValidateRobustEntryPoint(context, bufSize)) + if (!ValidBufferTarget(context, target)) { + context->handleError(Error(GL_INVALID_ENUM, "Invalid buffer target.")); return false; } - return ValidateTexParameterBase(context, target, pname, bufSize, params); -} - -bool ValidateTexParameteri(Context *context, GLenum target, GLenum pname, GLint param) -{ - return ValidateTexParameterBase(context, target, pname, -1, ¶m); -} - -bool ValidateTexParameteriv(Context *context, GLenum target, GLenum pname, const GLint *params) -{ - return ValidateTexParameterBase(context, target, pname, -1, params); -} - -bool ValidateTexParameterivRobustANGLE(Context *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - const GLint *params) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) + if (offset < 0 || length < 0) { + context->handleError(Error(GL_INVALID_VALUE, "Invalid offset or length.")); return false; } - return ValidateTexParameterBase(context, target, pname, bufSize, params); -} - -bool ValidateGetSamplerParameterfv(Context *context, GLuint sampler, GLenum pname, GLfloat *params) -{ - return ValidateGetSamplerParameterBase(context, sampler, pname, nullptr); -} + Buffer *buffer = context->getGLState().getTargetBuffer(target); -bool ValidateGetSamplerParameterfvRobustANGLE(Context *context, - GLuint sampler, - GLenum pname, - GLuint bufSize, - GLsizei *length, - GLfloat *params) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) + if (!buffer) { + context->handleError(Error(GL_INVALID_OPERATION, "Attempted to map buffer object zero.")); return false; } - if (!ValidateGetSamplerParameterBase(context, sampler, pname, length)) - { - return false; - } + // Check for buffer overflow + CheckedNumeric checkedOffset(offset); + auto checkedSize = checkedOffset + length; - if (!ValidateRobustBufferSize(context, bufSize, *length)) + if (!checkedSize.IsValid() || checkedSize.ValueOrDie() > static_cast(buffer->getSize())) { + context->handleError( + Error(GL_INVALID_VALUE, "Mapped range does not fit into buffer dimensions.")); return false; } - return true; -} - -bool ValidateGetSamplerParameteriv(Context *context, GLuint sampler, GLenum pname, GLint *params) -{ - return ValidateGetSamplerParameterBase(context, sampler, pname, nullptr); -} + // Check for invalid bits in the mask + GLbitfield allAccessBits = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_RANGE_BIT | + GL_MAP_INVALIDATE_BUFFER_BIT | GL_MAP_FLUSH_EXPLICIT_BIT | + GL_MAP_UNSYNCHRONIZED_BIT; -bool ValidateGetSamplerParameterivRobustANGLE(Context *context, - GLuint sampler, - GLenum pname, - GLuint bufSize, - GLsizei *length, - GLint *params) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) + if (access & ~(allAccessBits)) { + context->handleError(Error(GL_INVALID_VALUE, "Invalid access bits: 0x%X.", access)); return false; } - if (!ValidateGetSamplerParameterBase(context, sampler, pname, length)) + if (length == 0) { + context->handleError(Error(GL_INVALID_OPERATION, "Buffer mapping length is zero.")); return false; } - if (!ValidateRobustBufferSize(context, bufSize, *length)) + if (buffer->isMapped()) { + context->handleError(Error(GL_INVALID_OPERATION, "Buffer is already mapped.")); return false; } - return true; -} - -bool ValidateSamplerParameterf(Context *context, GLuint sampler, GLenum pname, GLfloat param) -{ - return ValidateSamplerParameterBase(context, sampler, pname, -1, ¶m); -} - -bool ValidateSamplerParameterfv(Context *context, - GLuint sampler, - GLenum pname, - const GLfloat *params) -{ - return ValidateSamplerParameterBase(context, sampler, pname, -1, params); -} - -bool ValidateSamplerParameterfvRobustANGLE(Context *context, - GLuint sampler, - GLenum pname, - GLsizei bufSize, - const GLfloat *params) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) + // Check for invalid bit combinations + if ((access & (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT)) == 0) { + context->handleError( + Error(GL_INVALID_OPERATION, "Need to map buffer for either reading or writing.")); return false; } - return ValidateSamplerParameterBase(context, sampler, pname, bufSize, params); -} - -bool ValidateSamplerParameteri(Context *context, GLuint sampler, GLenum pname, GLint param) -{ - return ValidateSamplerParameterBase(context, sampler, pname, -1, ¶m); -} - -bool ValidateSamplerParameteriv(Context *context, GLuint sampler, GLenum pname, const GLint *params) -{ - return ValidateSamplerParameterBase(context, sampler, pname, -1, params); -} + GLbitfield writeOnlyBits = + GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT | GL_MAP_UNSYNCHRONIZED_BIT; -bool ValidateSamplerParameterivRobustANGLE(Context *context, - GLuint sampler, - GLenum pname, - GLsizei bufSize, - const GLint *params) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) + if ((access & GL_MAP_READ_BIT) != 0 && (access & writeOnlyBits) != 0) { + context->handleError(Error(GL_INVALID_OPERATION, + "Invalid access bits when mapping buffer for reading: 0x%X.", + access)); return false; } - return ValidateSamplerParameterBase(context, sampler, pname, bufSize, params); -} - -bool ValidateGetVertexAttribfv(Context *context, GLuint index, GLenum pname, GLfloat *params) -{ - return ValidateGetVertexAttribBase(context, index, pname, nullptr, false, false); -} - -bool ValidateGetVertexAttribfvRobustANGLE(Context *context, - GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLfloat *params) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) + if ((access & GL_MAP_WRITE_BIT) == 0 && (access & GL_MAP_FLUSH_EXPLICIT_BIT) != 0) { + context->handleError(Error( + GL_INVALID_OPERATION, + "The explicit flushing bit may only be set if the buffer is mapped for writing.")); return false; } + return true; +} - if (!ValidateGetVertexAttribBase(context, index, pname, length, false, false)) +bool ValidateFlushMappedBufferRangeBase(Context *context, + GLenum target, + GLintptr offset, + GLsizeiptr length) +{ + if (offset < 0 || length < 0) { + context->handleError(Error(GL_INVALID_VALUE, "Invalid offset/length parameters.")); return false; } - if (!ValidateRobustBufferSize(context, bufSize, *length)) + if (!ValidBufferTarget(context, target)) { + context->handleError(Error(GL_INVALID_ENUM, "Invalid buffer target.")); return false; } - return true; -} - -bool ValidateGetVertexAttribiv(Context *context, GLuint index, GLenum pname, GLint *params) -{ - return ValidateGetVertexAttribBase(context, index, pname, nullptr, false, false); -} + Buffer *buffer = context->getGLState().getTargetBuffer(target); -bool ValidateGetVertexAttribivRobustANGLE(Context *context, - GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) + if (buffer == nullptr) { + context->handleError(Error(GL_INVALID_OPERATION, "Attempted to flush buffer object zero.")); return false; } - if (!ValidateGetVertexAttribBase(context, index, pname, length, false, false)) + if (!buffer->isMapped() || (buffer->getAccessFlags() & GL_MAP_FLUSH_EXPLICIT_BIT) == 0) { + context->handleError(Error( + GL_INVALID_OPERATION, "Attempted to flush a buffer not mapped for explicit flushing.")); return false; } - if (!ValidateRobustBufferSize(context, bufSize, *length)) + // Check for buffer overflow + CheckedNumeric checkedOffset(offset); + auto checkedSize = checkedOffset + length; + + if (!checkedSize.IsValid() || + checkedSize.ValueOrDie() > static_cast(buffer->getMapLength())) { + context->handleError( + Error(GL_INVALID_VALUE, "Flushed range does not fit into buffer mapping dimensions.")); return false; } return true; } -bool ValidateGetVertexAttribPointerv(Context *context, GLuint index, GLenum pname, void **pointer) -{ - return ValidateGetVertexAttribBase(context, index, pname, nullptr, true, false); -} - -bool ValidateGetVertexAttribPointervRobustANGLE(Context *context, - GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - void **pointer) +bool ValidateGenerateMipmap(Context *context, GLenum target) { - if (!ValidateRobustEntryPoint(context, bufSize)) + if (!ValidTextureTarget(context, target)) { + context->handleError(Error(GL_INVALID_ENUM)); return false; } - if (!ValidateGetVertexAttribBase(context, index, pname, length, true, false)) - { - return false; - } + Texture *texture = context->getTargetTexture(target); - if (!ValidateRobustBufferSize(context, bufSize, *length)) + if (texture == nullptr) { + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - return true; -} - -bool ValidateGetVertexAttribIiv(Context *context, GLuint index, GLenum pname, GLint *params) -{ - return ValidateGetVertexAttribBase(context, index, pname, nullptr, false, true); -} + const GLuint effectiveBaseLevel = texture->getTextureState().getEffectiveBaseLevel(); -bool ValidateGetVertexAttribIivRobustANGLE(Context *context, - GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) + // This error isn't spelled out in the spec in a very explicit way, but we interpret the spec so + // that out-of-range base level has a non-color-renderable / non-texture-filterable format. + if (effectiveBaseLevel >= gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS) { + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - if (!ValidateGetVertexAttribBase(context, index, pname, length, false, true)) - { - return false; - } + GLenum baseTarget = (target == GL_TEXTURE_CUBE_MAP) ? GL_TEXTURE_CUBE_MAP_POSITIVE_X : target; + const auto &format = texture->getFormat(baseTarget, effectiveBaseLevel); + const TextureCaps &formatCaps = context->getTextureCaps().get(format.asSized()); - if (!ValidateRobustBufferSize(context, bufSize, *length)) + // GenerateMipmap should not generate an INVALID_OPERATION for textures created with + // unsized formats or that are color renderable and filterable. Since we do not track if + // the texture was created with sized or unsized format (only sized formats are stored), + // it is not possible to make sure the the LUMA formats can generate mipmaps (they should + // be able to) because they aren't color renderable. Simply do a special case for LUMA + // textures since they're the only texture format that can be created with unsized formats + // that is not color renderable. New unsized formats are unlikely to be added, since ES2 + // was the last version to use add them. + if (format.info->depthBits > 0 || format.info->stencilBits > 0 || !formatCaps.filterable || + (!formatCaps.renderable && !format.info->isLUMA()) || format.info->compressed) { + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - return true; -} - -bool ValidateGetVertexAttribIuiv(Context *context, GLuint index, GLenum pname, GLuint *params) -{ - return ValidateGetVertexAttribBase(context, index, pname, nullptr, false, true); -} - -bool ValidateGetVertexAttribIuivRobustANGLE(Context *context, - GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint *params) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) + // GL_EXT_sRGB does not support mipmap generation on sRGB textures + if (context->getClientMajorVersion() == 2 && format.info->colorEncoding == GL_SRGB) { + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - if (!ValidateGetVertexAttribBase(context, index, pname, length, false, true)) + // Non-power of 2 ES2 check + if (!context->getExtensions().textureNPOT && + (!isPow2(static_cast(texture->getWidth(baseTarget, 0))) || + !isPow2(static_cast(texture->getHeight(baseTarget, 0))))) { + ASSERT(context->getClientMajorVersion() <= 2 && + (target == GL_TEXTURE_2D || target == GL_TEXTURE_CUBE_MAP)); + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - if (!ValidateRobustBufferSize(context, bufSize, *length)) + // Cube completeness check + if (target == GL_TEXTURE_CUBE_MAP && !texture->getTextureState().isCubeComplete()) { + context->handleError(Error(GL_INVALID_OPERATION)); return false; } return true; } -bool ValidateGetActiveUniformBlockiv(Context *context, - GLuint program, - GLuint uniformBlockIndex, - GLenum pname, - GLint *params) +bool ValidateGenBuffers(Context *context, GLint n, GLuint *) { - return ValidateGetActiveUniformBlockivBase(context, program, uniformBlockIndex, pname, nullptr); + return ValidateGenOrDelete(context, n); } -bool ValidateGetActiveUniformBlockivRobustANGLE(Context *context, - GLuint program, - GLuint uniformBlockIndex, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) +bool ValidateDeleteBuffers(Context *context, GLint n, const GLuint *) { - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } + return ValidateGenOrDelete(context, n); +} - if (!ValidateGetActiveUniformBlockivBase(context, program, uniformBlockIndex, pname, length)) - { - return false; - } +bool ValidateGenFramebuffers(Context *context, GLint n, GLuint *) +{ + return ValidateGenOrDelete(context, n); +} - if (!ValidateRobustBufferSize(context, bufSize, *length)) - { - return false; - } +bool ValidateDeleteFramebuffers(Context *context, GLint n, const GLuint *) +{ + return ValidateGenOrDelete(context, n); +} - return true; +bool ValidateGenRenderbuffers(Context *context, GLint n, GLuint *) +{ + return ValidateGenOrDelete(context, n); } -bool ValidateGetInternalFormativ(Context *context, - GLenum target, - GLenum internalformat, - GLenum pname, - GLsizei bufSize, - GLint *params) +bool ValidateDeleteRenderbuffers(Context *context, GLint n, const GLuint *) { - return ValidateGetInternalFormativBase(context, target, internalformat, pname, bufSize, - nullptr); + return ValidateGenOrDelete(context, n); } -bool ValidateGetInternalFormativRobustANGLE(Context *context, - GLenum target, - GLenum internalformat, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) +bool ValidateGenTextures(Context *context, GLint n, GLuint *) { - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } + return ValidateGenOrDelete(context, n); +} - if (!ValidateGetInternalFormativBase(context, target, internalformat, pname, bufSize, length)) - { - return false; - } +bool ValidateDeleteTextures(Context *context, GLint n, const GLuint *) +{ + return ValidateGenOrDelete(context, n); +} - if (!ValidateRobustBufferSize(context, bufSize, *length)) +bool ValidateGenOrDelete(Context *context, GLint n) +{ + if (n < 0) { + context->handleError(Error(GL_INVALID_VALUE, "n < 0")); return false; } - return true; } diff --git a/gfx/angle/src/libANGLE/validationES.h b/gfx/angle/src/libANGLE/validationES.h index 06da37690..d42575311 100755 --- a/gfx/angle/src/libANGLE/validationES.h +++ b/gfx/angle/src/libANGLE/validationES.h @@ -29,6 +29,7 @@ class Program; class Shader; class ValidationContext; +bool ValidCap(const Context *context, GLenum cap); bool ValidTextureTarget(const ValidationContext *context, GLenum target); bool ValidTexture2DTarget(const ValidationContext *context, GLenum target); bool ValidTexture3DTarget(const ValidationContext *context, GLenum target); @@ -36,8 +37,8 @@ bool ValidTextureExternalTarget(const ValidationContext *context, GLenum target) bool ValidTexture2DDestinationTarget(const ValidationContext *context, GLenum target); bool ValidTexture3DDestinationTarget(const ValidationContext *context, GLenum target); bool ValidFramebufferTarget(GLenum target); -bool ValidBufferTarget(const ValidationContext *context, GLenum target); -bool ValidBufferParameter(const ValidationContext *context, GLenum pname, GLsizei *numParams); +bool ValidBufferTarget(const Context *context, GLenum target); +bool ValidBufferParameter(const Context *context, GLenum pname); bool ValidMipLevel(const ValidationContext *context, GLenum target, GLint level); bool ValidImageSizeParameters(const Context *context, GLenum target, @@ -50,27 +51,17 @@ bool ValidCompressedImageSize(const ValidationContext *context, GLenum internalFormat, GLsizei width, GLsizei height); -bool ValidImageDataSize(ValidationContext *context, - GLenum textureTarget, - GLsizei width, - GLsizei height, - GLsizei depth, - GLenum internalFormat, - GLenum type, - const GLvoid *pixels, - GLsizei imageSize); - bool ValidQueryType(const Context *context, GLenum queryType); // Returns valid program if id is a valid program name // Errors INVALID_OPERATION if valid shader is given and returns NULL // Errors INVALID_VALUE otherwise and returns NULL -Program *GetValidProgram(ValidationContext *context, GLuint id); +Program *GetValidProgram(Context *context, GLuint id); // Returns valid shader if id is a valid shader name // Errors INVALID_OPERATION if valid program is given and returns NULL // Errors INVALID_VALUE otherwise and returns NULL -Shader *GetValidShader(ValidationContext *context, GLuint id); +Shader *GetValidShader(Context *context, GLuint id); bool ValidateAttachmentTarget(Context *context, GLenum attachment); bool ValidateRenderbufferStorageParametersBase(Context *context, GLenum target, GLsizei samples, @@ -93,6 +84,12 @@ bool ValidateBlitFramebufferParameters(ValidationContext *context, GLbitfield mask, GLenum filter); +bool ValidateGetVertexAttribParameters(Context *context, GLenum pname); + +bool ValidateTexParamParameters(Context *context, GLenum target, GLenum pname, GLint param); + +bool ValidateSamplerObjectParameter(Context *context, GLenum pname); + bool ValidateReadPixels(ValidationContext *context, GLint x, GLint y, @@ -101,16 +98,6 @@ bool ValidateReadPixels(ValidationContext *context, GLenum format, GLenum type, GLvoid *pixels); -bool ValidateReadPixelsRobustANGLE(ValidationContext *context, - GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLsizei bufSize, - GLsizei *length, - GLvoid *pixels); bool ValidateReadnPixelsEXT(Context *context, GLint x, GLint y, @@ -120,16 +107,6 @@ bool ValidateReadnPixelsEXT(Context *context, GLenum type, GLsizei bufSize, GLvoid *pixels); -bool ValidateReadnPixelsRobustANGLE(ValidationContext *context, - GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLsizei bufSize, - GLsizei *length, - GLvoid *data); bool ValidateGenQueriesEXT(gl::Context *context, GLsizei n); bool ValidateDeleteQueriesEXT(gl::Context *context, GLsizei n); @@ -138,46 +115,13 @@ bool ValidateBeginQueryEXT(Context *context, GLenum target, GLuint id); bool ValidateEndQueryBase(Context *context, GLenum target); bool ValidateEndQueryEXT(Context *context, GLenum target); bool ValidateQueryCounterEXT(Context *context, GLuint id, GLenum target); -bool ValidateGetQueryivBase(Context *context, GLenum target, GLenum pname, GLsizei *numParams); +bool ValidateGetQueryivBase(Context *context, GLenum target, GLenum pname); bool ValidateGetQueryivEXT(Context *context, GLenum target, GLenum pname, GLint *params); -bool ValidateGetQueryivRobustANGLE(Context *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -bool ValidateGetQueryObjectValueBase(Context *context, - GLenum target, - GLenum pname, - GLsizei *numParams); +bool ValidateGetQueryObjectValueBase(Context *context, GLenum target, GLenum pname); bool ValidateGetQueryObjectivEXT(Context *context, GLuint id, GLenum pname, GLint *params); -bool ValidateGetQueryObjectivRobustANGLE(Context *context, - GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); bool ValidateGetQueryObjectuivEXT(Context *context, GLuint id, GLenum pname, GLuint *params); -bool ValidateGetQueryObjectuivRobustANGLE(Context *context, - GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint *params); bool ValidateGetQueryObjecti64vEXT(Context *context, GLuint id, GLenum pname, GLint64 *params); -bool ValidateGetQueryObjecti64vRobustANGLE(Context *context, - GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint64 *params); bool ValidateGetQueryObjectui64vEXT(Context *context, GLuint id, GLenum pname, GLuint64 *params); -bool ValidateGetQueryObjectui64vRobustANGLE(Context *context, - GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint64 *params); bool ValidateUniform(Context *context, GLenum uniformType, GLint location, GLsizei count); bool ValidateUniformMatrix(Context *context, GLenum matrixType, GLint location, GLsizei count, @@ -188,12 +132,6 @@ bool ValidateStateQuery(ValidationContext *context, GLenum *nativeType, unsigned int *numParams); -bool ValidateRobustStateQuery(ValidationContext *context, - GLenum pname, - GLsizei bufSize, - GLenum *nativeType, - unsigned int *numParams); - bool ValidateCopyTexImageParametersBase(ValidationContext *context, GLenum target, GLint level, @@ -255,24 +193,6 @@ bool ValidateGetUniformfv(Context *context, GLuint program, GLint location, GLfl bool ValidateGetUniformiv(Context *context, GLuint program, GLint location, GLint* params); bool ValidateGetnUniformfvEXT(Context *context, GLuint program, GLint location, GLsizei bufSize, GLfloat* params); bool ValidateGetnUniformivEXT(Context *context, GLuint program, GLint location, GLsizei bufSize, GLint* params); -bool ValidateGetUniformfvRobustANGLE(Context *context, - GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLfloat *params); -bool ValidateGetUniformivRobustANGLE(Context *context, - GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLint *params); -bool ValidateGetUniformuivRobustANGLE(Context *context, - GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLuint *params); bool ValidateDiscardFramebufferBase(Context *context, GLenum target, GLsizei numAttachments, const GLenum *attachments, bool defaultFramebuffer); @@ -325,11 +245,7 @@ bool ValidateCopyTexSubImage2D(Context *context, GLsizei width, GLsizei height); -bool ValidateGetBufferPointervBase(Context *context, - GLenum target, - GLenum pname, - GLsizei *length, - void **params); +bool ValidateGetBufferPointervBase(Context *context, GLenum target, GLenum pname, void **params); bool ValidateUnmapBufferBase(Context *context, GLenum target); bool ValidateMapBufferRangeBase(Context *context, GLenum target, @@ -354,206 +270,6 @@ bool ValidateDeleteTextures(Context *context, GLint n, const GLuint *textures); bool ValidateGenOrDelete(Context *context, GLint n); -bool ValidateEnable(Context *context, GLenum cap); -bool ValidateDisable(Context *context, GLenum cap); -bool ValidateIsEnabled(Context *context, GLenum cap); - -bool ValidateRobustEntryPoint(ValidationContext *context, GLsizei bufSize); -bool ValidateRobustBufferSize(ValidationContext *context, GLsizei bufSize, GLsizei numParams); - -bool ValidateGetFramebufferAttachmentParameteriv(ValidationContext *context, - GLenum target, - GLenum attachment, - GLenum pname, - GLsizei *numParams); -bool ValidateGetFramebufferAttachmentParameterivRobustANGLE(ValidationContext *context, - GLenum target, - GLenum attachment, - GLenum pname, - GLsizei bufSize, - GLsizei *numParams); - -bool ValidateGetBufferParameteriv(ValidationContext *context, - GLenum target, - GLenum pname, - GLint *params); -bool ValidateGetBufferParameterivRobustANGLE(ValidationContext *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); - -bool ValidateGetBufferParameteri64v(ValidationContext *context, - GLenum target, - GLenum pname, - GLint64 *params); -bool ValidateGetBufferParameteri64vRobustANGLE(ValidationContext *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint64 *params); - -bool ValidateGetProgramiv(Context *context, GLuint program, GLenum pname, GLsizei *numParams); -bool ValidateGetProgramivRobustANGLE(Context *context, - GLuint program, - GLenum pname, - GLsizei bufSize, - GLsizei *numParams); - -bool ValidateGetRenderbufferParameteriv(Context *context, - GLenum target, - GLenum pname, - GLint *params); -bool ValidateGetRenderbufferParameterivRobustANGLE(Context *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); - -bool ValidateGetShaderiv(Context *context, GLuint shader, GLenum pname, GLint *params); -bool ValidateGetShaderivRobustANGLE(Context *context, - GLuint shader, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); - -bool ValidateGetTexParameterfv(Context *context, GLenum target, GLenum pname, GLfloat *params); -bool ValidateGetTexParameterfvRobustANGLE(Context *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLfloat *params); -bool ValidateGetTexParameteriv(Context *context, GLenum target, GLenum pname, GLint *params); -bool ValidateGetTexParameterivRobustANGLE(Context *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); - -bool ValidateTexParameterf(Context *context, GLenum target, GLenum pname, GLfloat param); -bool ValidateTexParameterfv(Context *context, GLenum target, GLenum pname, const GLfloat *params); -bool ValidateTexParameterfvRobustANGLE(Context *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - const GLfloat *params); -bool ValidateTexParameteri(Context *context, GLenum target, GLenum pname, GLint param); -bool ValidateTexParameteriv(Context *context, GLenum target, GLenum pname, const GLint *params); -bool ValidateTexParameterivRobustANGLE(Context *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - const GLint *params); - -bool ValidateGetSamplerParameterfv(Context *context, GLuint sampler, GLenum pname, GLfloat *params); -bool ValidateGetSamplerParameterfvRobustANGLE(Context *context, - GLuint sampler, - GLenum pname, - GLuint bufSize, - GLsizei *length, - GLfloat *params); -bool ValidateGetSamplerParameteriv(Context *context, GLuint sampler, GLenum pname, GLint *params); -bool ValidateGetSamplerParameterivRobustANGLE(Context *context, - GLuint sampler, - GLenum pname, - GLuint bufSize, - GLsizei *length, - GLint *params); - -bool ValidateSamplerParameterf(Context *context, GLuint sampler, GLenum pname, GLfloat param); -bool ValidateSamplerParameterfv(Context *context, - GLuint sampler, - GLenum pname, - const GLfloat *params); -bool ValidateSamplerParameterfvRobustANGLE(Context *context, - GLuint sampler, - GLenum pname, - GLsizei bufSize, - const GLfloat *params); -bool ValidateSamplerParameteri(Context *context, GLuint sampler, GLenum pname, GLint param); -bool ValidateSamplerParameteriv(Context *context, - GLuint sampler, - GLenum pname, - const GLint *params); -bool ValidateSamplerParameterivRobustANGLE(Context *context, - GLuint sampler, - GLenum pname, - GLsizei bufSize, - const GLint *params); - -bool ValidateGetVertexAttribfv(Context *context, GLuint index, GLenum pname, GLfloat *params); -bool ValidateGetVertexAttribfvRobustANGLE(Context *context, - GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLfloat *params); - -bool ValidateGetVertexAttribiv(Context *context, GLuint index, GLenum pname, GLint *params); -bool ValidateGetVertexAttribivRobustANGLE(Context *context, - GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); - -bool ValidateGetVertexAttribPointerv(Context *context, GLuint index, GLenum pname, void **pointer); -bool ValidateGetVertexAttribPointervRobustANGLE(Context *context, - GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - void **pointer); - -bool ValidateGetVertexAttribIiv(Context *context, GLuint index, GLenum pname, GLint *params); -bool ValidateGetVertexAttribIivRobustANGLE(Context *context, - GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); - -bool ValidateGetVertexAttribIuiv(Context *context, GLuint index, GLenum pname, GLuint *params); -bool ValidateGetVertexAttribIuivRobustANGLE(Context *context, - GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint *params); - -bool ValidateGetActiveUniformBlockiv(Context *context, - GLuint program, - GLuint uniformBlockIndex, - GLenum pname, - GLint *params); -bool ValidateGetActiveUniformBlockivRobustANGLE(Context *context, - GLuint program, - GLuint uniformBlockIndex, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); - -bool ValidateGetInternalFormativ(Context *context, - GLenum target, - GLenum internalformat, - GLenum pname, - GLsizei bufSize, - GLint *params); -bool ValidateGetInternalFormativRobustANGLE(Context *context, - GLenum target, - GLenum internalformat, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); - // Error messages shared here for use in testing. extern const char *g_ExceedsMaxElementErrorMessage; } // namespace gl diff --git a/gfx/angle/src/libANGLE/validationES2.cpp b/gfx/angle/src/libANGLE/validationES2.cpp index 3133102f3..f68958cba 100755 --- a/gfx/angle/src/libANGLE/validationES2.cpp +++ b/gfx/angle/src/libANGLE/validationES2.cpp @@ -10,19 +10,19 @@ #include -#include "common/mathutil.h" -#include "common/string_utils.h" -#include "common/utilities.h" +#include "libANGLE/validationES.h" +#include "libANGLE/validationES3.h" #include "libANGLE/Context.h" #include "libANGLE/Texture.h" #include "libANGLE/Framebuffer.h" -#include "libANGLE/FramebufferAttachment.h" #include "libANGLE/Renderbuffer.h" -#include "libANGLE/Shader.h" -#include "libANGLE/Uniform.h" #include "libANGLE/formatutils.h" -#include "libANGLE/validationES.h" -#include "libANGLE/validationES3.h" +#include "libANGLE/FramebufferAttachment.h" +#include "libANGLE/Uniform.h" + +#include "common/mathutil.h" +#include "common/string_utils.h" +#include "common/utilities.h" namespace gl { @@ -285,21 +285,9 @@ bool IsValidCopyTextureSourceTarget(Context *context, GLenum target) } // anonymous namespace -bool ValidateES2TexImageParameters(Context *context, - GLenum target, - GLint level, - GLenum internalformat, - bool isCompressed, - bool isSubImage, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - GLint border, - GLenum format, - GLenum type, - GLsizei imageSize, - const GLvoid *pixels) +bool ValidateES2TexImageParameters(Context *context, GLenum target, GLint level, GLenum internalformat, bool isCompressed, bool isSubImage, + GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, const GLvoid *pixels) { if (!ValidTexture2DDestinationTarget(context, target)) { @@ -368,16 +356,10 @@ bool ValidateES2TexImageParameters(Context *context, if (isSubImage) { - GLenum textureFormat = texture->getFormat(target, level).asSized(); - if (textureFormat == GL_NONE) - { - context->handleError(Error(GL_INVALID_OPERATION, "Texture level does not exist.")); - return false; - } - if (format != GL_NONE) { - if (gl::GetSizedInternalFormat(format, type) != textureFormat) + if (gl::GetSizedInternalFormat(format, type) != + texture->getFormat(target, level).asSized()) { context->handleError(Error(GL_INVALID_OPERATION)); return false; @@ -710,12 +692,6 @@ bool ValidateES2TexImageParameters(Context *context, } } - if (!ValidImageDataSize(context, target, width, height, 1, internalformat, type, pixels, - imageSize)) - { - return false; - } - return true; } @@ -1217,6 +1193,52 @@ bool ValidateES2TexStorageParameters(Context *context, GLenum target, GLsizei le return true; } +// check for combinations of format and type that are valid for ReadPixels +bool ValidES2ReadFormatType(ValidationContext *context, GLenum format, GLenum type) +{ + switch (format) + { + case GL_RGBA: + switch (type) + { + case GL_UNSIGNED_BYTE: + break; + default: + return false; + } + break; + case GL_BGRA_EXT: + switch (type) + { + case GL_UNSIGNED_BYTE: + case GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT: + case GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT: + break; + default: + return false; + } + break; + case GL_RG_EXT: + case GL_RED_EXT: + if (!context->getExtensions().textureRG) + { + return false; + } + switch (type) + { + case GL_UNSIGNED_BYTE: + break; + default: + return false; + } + break; + + default: + return false; + } + return true; +} + bool ValidateDiscardFramebufferEXT(Context *context, GLenum target, GLsizei numAttachments, const GLenum *attachments) { @@ -1992,43 +2014,12 @@ bool ValidateTexImage2D(Context *context, if (context->getClientMajorVersion() < 3) { return ValidateES2TexImageParameters(context, target, level, internalformat, false, false, - 0, 0, width, height, border, format, type, -1, pixels); + 0, 0, width, height, border, format, type, pixels); } ASSERT(context->getClientMajorVersion() >= 3); return ValidateES3TexImage2DParameters(context, target, level, internalformat, false, false, 0, - 0, 0, width, height, 1, border, format, type, -1, - pixels); -} - -bool ValidateTexImage2DRobust(Context *context, - GLenum target, - GLint level, - GLint internalformat, - GLsizei width, - GLsizei height, - GLint border, - GLenum format, - GLenum type, - GLsizei bufSize, - const GLvoid *pixels) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - - if (context->getClientMajorVersion() < 3) - { - return ValidateES2TexImageParameters(context, target, level, internalformat, false, false, - 0, 0, width, height, border, format, type, bufSize, - pixels); - } - - ASSERT(context->getClientMajorVersion() >= 3); - return ValidateES3TexImage2DParameters(context, target, level, internalformat, false, false, 0, - 0, 0, width, height, 1, border, format, type, bufSize, - pixels); + 0, 0, width, height, 1, border, format, type, pixels); } bool ValidateTexSubImage2D(Context *context, @@ -2046,43 +2037,12 @@ bool ValidateTexSubImage2D(Context *context, if (context->getClientMajorVersion() < 3) { return ValidateES2TexImageParameters(context, target, level, GL_NONE, false, true, xoffset, - yoffset, width, height, 0, format, type, -1, pixels); + yoffset, width, height, 0, format, type, pixels); } ASSERT(context->getClientMajorVersion() >= 3); return ValidateES3TexImage2DParameters(context, target, level, GL_NONE, false, true, xoffset, - yoffset, 0, width, height, 1, 0, format, type, -1, - pixels); -} - -bool ValidateTexSubImage2DRobustANGLE(Context *context, - GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLsizei bufSize, - const GLvoid *pixels) -{ - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - - if (context->getClientMajorVersion() < 3) - { - return ValidateES2TexImageParameters(context, target, level, GL_NONE, false, true, xoffset, - yoffset, width, height, 0, format, type, bufSize, - pixels); - } - - ASSERT(context->getClientMajorVersion() >= 3); - return ValidateES3TexImage2DParameters(context, target, level, GL_NONE, false, true, xoffset, - yoffset, 0, width, height, 1, 0, format, type, bufSize, - pixels); + yoffset, 0, width, height, 1, 0, format, type, pixels); } bool ValidateCompressedTexImage2D(Context *context, @@ -2098,7 +2058,7 @@ bool ValidateCompressedTexImage2D(Context *context, if (context->getClientMajorVersion() < 3) { if (!ValidateES2TexImageParameters(context, target, level, internalformat, true, false, 0, - 0, width, height, border, GL_NONE, GL_NONE, -1, data)) + 0, width, height, border, GL_NONE, GL_NONE, data)) { return false; } @@ -2107,7 +2067,7 @@ bool ValidateCompressedTexImage2D(Context *context, { ASSERT(context->getClientMajorVersion() >= 3); if (!ValidateES3TexImage2DParameters(context, target, level, internalformat, true, false, 0, - 0, 0, width, height, 1, border, GL_NONE, GL_NONE, -1, + 0, 0, width, height, 1, border, GL_NONE, GL_NONE, data)) { return false; @@ -2116,7 +2076,7 @@ bool ValidateCompressedTexImage2D(Context *context, const InternalFormat &formatInfo = GetInternalFormatInfo(internalformat); auto blockSizeOrErr = - formatInfo.computeCompressedImageSize(gl::Extents(width, height, 1)); + formatInfo.computeCompressedImageSize(GL_UNSIGNED_BYTE, gl::Extents(width, height, 1)); if (blockSizeOrErr.isError()) { context->handleError(blockSizeOrErr.getError()); @@ -2146,7 +2106,7 @@ bool ValidateCompressedTexSubImage2D(Context *context, if (context->getClientMajorVersion() < 3) { if (!ValidateES2TexImageParameters(context, target, level, GL_NONE, true, true, xoffset, - yoffset, width, height, 0, GL_NONE, GL_NONE, -1, data)) + yoffset, width, height, 0, GL_NONE, GL_NONE, data)) { return false; } @@ -2155,7 +2115,7 @@ bool ValidateCompressedTexSubImage2D(Context *context, { ASSERT(context->getClientMajorVersion() >= 3); if (!ValidateES3TexImage2DParameters(context, target, level, GL_NONE, true, true, xoffset, - yoffset, 0, width, height, 1, 0, GL_NONE, GL_NONE, -1, + yoffset, 0, width, height, 1, 0, GL_NONE, GL_NONE, data)) { return false; @@ -2164,7 +2124,7 @@ bool ValidateCompressedTexSubImage2D(Context *context, const InternalFormat &formatInfo = GetInternalFormatInfo(format); auto blockSizeOrErr = - formatInfo.computeCompressedImageSize(gl::Extents(width, height, 1)); + formatInfo.computeCompressedImageSize(GL_UNSIGNED_BYTE, gl::Extents(width, height, 1)); if (blockSizeOrErr.isError()) { context->handleError(blockSizeOrErr.getError()); @@ -2182,7 +2142,13 @@ bool ValidateCompressedTexSubImage2D(Context *context, bool ValidateGetBufferPointervOES(Context *context, GLenum target, GLenum pname, void **params) { - return ValidateGetBufferPointervBase(context, target, pname, nullptr, params); + if (!context->getExtensions().mapBuffer) + { + context->handleError(Error(GL_INVALID_OPERATION, "Map buffer extension not available.")); + return false; + } + + return ValidateGetBufferPointervBase(context, target, pname, params); } bool ValidateMapBufferOES(Context *context, GLenum target, GLenum access) @@ -2273,13 +2239,6 @@ bool ValidateBindTexture(Context *context, GLenum target, GLuint texture) return false; } - if (!context->getGLState().isBindGeneratesResourceEnabled() && - !context->isTextureGenerated(texture)) - { - context->handleError(Error(GL_INVALID_OPERATION, "Texture was not generated")); - return false; - } - switch (target) { case GL_TEXTURE_2D: @@ -3356,68 +3315,6 @@ bool ValidateCopySubTextureCHROMIUM(Context *context, return true; } -bool ValidateCompressedCopyTextureCHROMIUM(Context *context, GLuint sourceId, GLuint destId) -{ - if (!context->getExtensions().copyCompressedTexture) - { - context->handleError(Error(GL_INVALID_OPERATION, - "GL_CHROMIUM_copy_compressed_texture extension not available.")); - return false; - } - - const gl::Texture *source = context->getTexture(sourceId); - if (source == nullptr) - { - context->handleError( - Error(GL_INVALID_VALUE, "Source texture is not a valid texture object.")); - return false; - } - - if (source->getTarget() != GL_TEXTURE_2D) - { - context->handleError( - Error(GL_INVALID_VALUE, "Source texture must be of type GL_TEXTURE_2D.")); - return false; - } - - if (source->getWidth(GL_TEXTURE_2D, 0) == 0 || source->getHeight(GL_TEXTURE_2D, 0) == 0) - { - context->handleError(Error(GL_INVALID_VALUE, "Source texture must level 0 defined.")); - return false; - } - - const gl::Format &sourceFormat = source->getFormat(GL_TEXTURE_2D, 0); - if (!sourceFormat.info->compressed) - { - context->handleError( - Error(GL_INVALID_OPERATION, "Source texture must have a compressed internal format.")); - return false; - } - - const gl::Texture *dest = context->getTexture(destId); - if (dest == nullptr) - { - context->handleError( - Error(GL_INVALID_VALUE, "Destination texture is not a valid texture object.")); - return false; - } - - if (dest->getTarget() != GL_TEXTURE_2D) - { - context->handleError( - Error(GL_INVALID_VALUE, "Destination texture must be of type GL_TEXTURE_2D.")); - return false; - } - - if (dest->getImmutableFormat()) - { - context->handleError(Error(GL_INVALID_OPERATION, "Destination cannot be immutable.")); - return false; - } - - return true; -} - bool ValidateCreateShader(Context *context, GLenum type) { switch (type) @@ -3425,442 +3322,15 @@ bool ValidateCreateShader(Context *context, GLenum type) case GL_VERTEX_SHADER: case GL_FRAGMENT_SHADER: break; - case GL_COMPUTE_SHADER: - if (context->getClientVersion() < Version(3, 1)) - { - context->handleError( - Error(GL_INVALID_ENUM, "GL_COMPUTE_SHADER requires OpenGL ES 3.1.")); - return false; - } - break; - - default: - context->handleError(Error(GL_INVALID_ENUM, "Unknown shader type.")); - return false; - } - - return true; -} - -bool ValidateBufferData(ValidationContext *context, - GLenum target, - GLsizeiptr size, - const GLvoid *data, - GLenum usage) -{ - if (size < 0) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - - switch (usage) - { - case GL_STREAM_DRAW: - case GL_STATIC_DRAW: - case GL_DYNAMIC_DRAW: - break; - - case GL_STREAM_READ: - case GL_STREAM_COPY: - case GL_STATIC_READ: - case GL_STATIC_COPY: - case GL_DYNAMIC_READ: - case GL_DYNAMIC_COPY: - if (context->getClientMajorVersion() < 3) + if (context->getGLVersion().isES31()) { - context->handleError(Error(GL_INVALID_ENUM)); - return false; + break; } - break; - default: context->handleError(Error(GL_INVALID_ENUM)); return false; } - - if (!ValidBufferTarget(context, target)) - { - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - - Buffer *buffer = context->getGLState().getTargetBuffer(target); - - if (!buffer) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - return true; -} - -bool ValidateBufferSubData(ValidationContext *context, - GLenum target, - GLintptr offset, - GLsizeiptr size, - const GLvoid *data) -{ - if (size < 0 || offset < 0) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - - if (!ValidBufferTarget(context, target)) - { - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - - Buffer *buffer = context->getGLState().getTargetBuffer(target); - - if (!buffer) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - if (buffer->isMapped()) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - // Check for possible overflow of size + offset - angle::CheckedNumeric checkedSize(size); - checkedSize += offset; - if (!checkedSize.IsValid()) - { - context->handleError(Error(GL_OUT_OF_MEMORY)); - return false; - } - - if (size + offset > buffer->getSize()) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - - return true; -} - -bool ValidateEnableExtensionANGLE(ValidationContext *context, const GLchar *name) -{ - if (!context->getExtensions().webglCompatibility) - { - context->handleError( - Error(GL_INVALID_OPERATION, "GL_ANGLE_webgl_compatibility is not available.")); - return false; - } - - const ExtensionInfoMap &extensionInfos = GetExtensionInfoMap(); - auto extension = extensionInfos.find(name); - if (extension == extensionInfos.end() || !extension->second.Enableable) - { - context->handleError(Error(GL_INVALID_OPERATION, "Extension %s is not enableable.", name)); - return false; - } - - return true; -} - -bool ValidateActiveTexture(ValidationContext *context, GLenum texture) -{ - if (texture < GL_TEXTURE0 || - texture > GL_TEXTURE0 + context->getCaps().maxCombinedTextureImageUnits - 1) - { - context->handleError(Error(GL_INVALID_ENUM)); - return false; - } - - return true; -} - -bool ValidateAttachShader(ValidationContext *context, GLuint program, GLuint shader) -{ - Program *programObject = GetValidProgram(context, program); - if (!programObject) - { - return false; - } - - Shader *shaderObject = GetValidShader(context, shader); - if (!shaderObject) - { - return false; - } - - switch (shaderObject->getType()) - { - case GL_VERTEX_SHADER: - { - if (programObject->getAttachedVertexShader()) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - break; - } - case GL_FRAGMENT_SHADER: - { - if (programObject->getAttachedFragmentShader()) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - break; - } - case GL_COMPUTE_SHADER: - { - if (programObject->getAttachedComputeShader()) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - break; - } - default: - UNREACHABLE(); - break; - } - - return true; -} - -bool ValidateBindAttribLocation(ValidationContext *context, - GLuint program, - GLuint index, - const GLchar *name) -{ - if (index >= MAX_VERTEX_ATTRIBS) - { - context->handleError(Error(GL_INVALID_VALUE, "Index exceeds MAX_VERTEX_ATTRIBS")); - return false; - } - - if (strncmp(name, "gl_", 3) == 0) - { - context->handleError(Error(GL_INVALID_OPERATION, "Cannot Bind built-in attributes")); - return false; - } - - return GetValidProgram(context, program) != nullptr; -} - -bool ValidateBindBuffer(ValidationContext *context, GLenum target, GLuint buffer) -{ - if (!ValidBufferTarget(context, target)) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid Buffer target")); - return false; - } - - if (!context->getGLState().isBindGeneratesResourceEnabled() && - !context->isBufferGenerated(buffer)) - { - context->handleError(Error(GL_INVALID_OPERATION, "Buffer was not generated")); - return false; - } - - return true; -} - -bool ValidateBindFramebuffer(ValidationContext *context, GLenum target, GLuint framebuffer) -{ - if (!ValidFramebufferTarget(target)) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid Framebuffer target")); - return false; - } - - if (!context->getGLState().isBindGeneratesResourceEnabled() && - !context->isFramebufferGenerated(framebuffer)) - { - context->handleError(Error(GL_INVALID_OPERATION, "Framebuffer was not generated")); - return false; - } - - return true; -} - -bool ValidateBindRenderbuffer(ValidationContext *context, GLenum target, GLuint renderbuffer) -{ - if (target != GL_RENDERBUFFER) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid Renderbuffer target")); - return false; - } - - if (!context->getGLState().isBindGeneratesResourceEnabled() && - !context->isRenderbufferGenerated(renderbuffer)) - { - context->handleError(Error(GL_INVALID_OPERATION, "Renderbuffer was not generated")); - return false; - } - - return true; -} - -static bool ValidBlendEquationMode(GLenum mode) -{ - switch (mode) - { - case GL_FUNC_ADD: - case GL_FUNC_SUBTRACT: - case GL_FUNC_REVERSE_SUBTRACT: - case GL_MIN: - case GL_MAX: - return true; - - default: - return false; - } -} - -bool ValidateBlendEquation(ValidationContext *context, GLenum mode) -{ - if (!ValidBlendEquationMode(mode)) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid blend equation")); - return false; - } - - return true; -} - -bool ValidateBlendEquationSeparate(ValidationContext *context, GLenum modeRGB, GLenum modeAlpha) -{ - if (!ValidBlendEquationMode(modeRGB)) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid RGB blend equation")); - return false; - } - - if (!ValidBlendEquationMode(modeAlpha)) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid alpha blend equation")); - return false; - } - - return true; -} - -bool ValidateBlendFunc(ValidationContext *context, GLenum sfactor, GLenum dfactor) -{ - return ValidateBlendFuncSeparate(context, sfactor, dfactor, sfactor, dfactor); -} - -static bool ValidSrcBlendFunc(GLenum srcBlend) -{ - switch (srcBlend) - { - case GL_ZERO: - case GL_ONE: - case GL_SRC_COLOR: - case GL_ONE_MINUS_SRC_COLOR: - case GL_DST_COLOR: - case GL_ONE_MINUS_DST_COLOR: - case GL_SRC_ALPHA: - case GL_ONE_MINUS_SRC_ALPHA: - case GL_DST_ALPHA: - case GL_ONE_MINUS_DST_ALPHA: - case GL_CONSTANT_COLOR: - case GL_ONE_MINUS_CONSTANT_COLOR: - case GL_CONSTANT_ALPHA: - case GL_ONE_MINUS_CONSTANT_ALPHA: - case GL_SRC_ALPHA_SATURATE: - return true; - - default: - return false; - } -} - -static bool ValidDstBlendFunc(GLenum dstBlend, GLint contextMajorVersion) -{ - switch (dstBlend) - { - case GL_ZERO: - case GL_ONE: - case GL_SRC_COLOR: - case GL_ONE_MINUS_SRC_COLOR: - case GL_DST_COLOR: - case GL_ONE_MINUS_DST_COLOR: - case GL_SRC_ALPHA: - case GL_ONE_MINUS_SRC_ALPHA: - case GL_DST_ALPHA: - case GL_ONE_MINUS_DST_ALPHA: - case GL_CONSTANT_COLOR: - case GL_ONE_MINUS_CONSTANT_COLOR: - case GL_CONSTANT_ALPHA: - case GL_ONE_MINUS_CONSTANT_ALPHA: - return true; - - case GL_SRC_ALPHA_SATURATE: - return (contextMajorVersion >= 3); - - default: - return false; - } -} - -bool ValidateBlendFuncSeparate(ValidationContext *context, - GLenum srcRGB, - GLenum dstRGB, - GLenum srcAlpha, - GLenum dstAlpha) -{ - if (!ValidSrcBlendFunc(srcRGB)) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid blend function")); - return false; - } - - if (!ValidDstBlendFunc(dstRGB, context->getClientMajorVersion())) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid blend function")); - return false; - } - - if (!ValidSrcBlendFunc(srcAlpha)) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid blend function")); - return false; - } - - if (!ValidDstBlendFunc(dstAlpha, context->getClientMajorVersion())) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid blend function")); - return false; - } - - if (context->getLimitations().noSimultaneousConstantColorAndAlphaBlendFunc) - { - bool constantColorUsed = - (srcRGB == GL_CONSTANT_COLOR || srcRGB == GL_ONE_MINUS_CONSTANT_COLOR || - dstRGB == GL_CONSTANT_COLOR || dstRGB == GL_ONE_MINUS_CONSTANT_COLOR); - - bool constantAlphaUsed = - (srcRGB == GL_CONSTANT_ALPHA || srcRGB == GL_ONE_MINUS_CONSTANT_ALPHA || - dstRGB == GL_CONSTANT_ALPHA || dstRGB == GL_ONE_MINUS_CONSTANT_ALPHA); - - if (constantColorUsed && constantAlphaUsed) - { - ERR("Simultaneous use of GL_CONSTANT_ALPHA/GL_ONE_MINUS_CONSTANT_ALPHA and " - "GL_CONSTANT_COLOR/GL_ONE_MINUS_CONSTANT_COLOR not supported by this " - "implementation."); - context->handleError(Error(GL_INVALID_OPERATION, - "Simultaneous use of " - "GL_CONSTANT_ALPHA/GL_ONE_MINUS_CONSTANT_ALPHA and " - "GL_CONSTANT_COLOR/GL_ONE_MINUS_CONSTANT_COLOR not " - "supported by this implementation.")); - return false; - } - } - return true; } diff --git a/gfx/angle/src/libANGLE/validationES2.h b/gfx/angle/src/libANGLE/validationES2.h index d40a62606..09451f4c2 100755 --- a/gfx/angle/src/libANGLE/validationES2.h +++ b/gfx/angle/src/libANGLE/validationES2.h @@ -18,21 +18,9 @@ class Context; class ValidationContext; class Texture; -bool ValidateES2TexImageParameters(Context *context, - GLenum target, - GLint level, - GLenum internalformat, - bool isCompressed, - bool isSubImage, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - GLint border, - GLenum format, - GLenum type, - GLsizei imageSize, - const GLvoid *pixels); +bool ValidateES2TexImageParameters(Context *context, GLenum target, GLint level, GLenum internalformat, bool isCompressed, bool isSubImage, + GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, const GLvoid *pixels); bool ValidateES2CopyTexImageParameters(ValidationContext *context, GLenum target, @@ -50,6 +38,8 @@ bool ValidateES2CopyTexImageParameters(ValidationContext *context, bool ValidateES2TexStorageParameters(Context *context, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +bool ValidES2ReadFormatType(ValidationContext *context, GLenum format, GLenum type); + bool ValidateDiscardFramebufferEXT(Context *context, GLenum target, GLsizei numAttachments, const GLenum *attachments); @@ -149,17 +139,6 @@ bool ValidateTexImage2D(Context *context, GLenum format, GLenum type, const GLvoid *pixels); -bool ValidateTexImage2DRobust(Context *context, - GLenum target, - GLint level, - GLint internalformat, - GLsizei width, - GLsizei height, - GLint border, - GLenum format, - GLenum type, - GLsizei bufSize, - const GLvoid *pixels); bool ValidateTexSubImage2D(Context *context, GLenum target, GLint level, @@ -170,17 +149,6 @@ bool ValidateTexSubImage2D(Context *context, GLenum format, GLenum type, const GLvoid *pixels); -bool ValidateTexSubImage2DRobustANGLE(Context *context, - GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLsizei bufSize, - const GLvoid *pixels); bool ValidateCompressedTexImage2D(Context *context, GLenum target, GLint level, @@ -336,39 +304,8 @@ bool ValidateCopySubTextureCHROMIUM(Context *context, GLboolean unpackFlipY, GLboolean unpackPremultiplyAlpha, GLboolean unpackUnmultiplyAlpha); -bool ValidateCompressedCopyTextureCHROMIUM(Context *context, GLuint sourceId, GLuint destId); bool ValidateCreateShader(Context *context, GLenum type); -bool ValidateBufferData(ValidationContext *context, - GLenum target, - GLsizeiptr size, - const GLvoid *data, - GLenum usage); -bool ValidateBufferSubData(ValidationContext *context, - GLenum target, - GLintptr offset, - GLsizeiptr size, - const GLvoid *data); - -bool ValidateEnableExtensionANGLE(ValidationContext *context, const GLchar *name); - -bool ValidateActiveTexture(ValidationContext *context, GLenum texture); -bool ValidateAttachShader(ValidationContext *context, GLuint program, GLuint shader); -bool ValidateBindAttribLocation(ValidationContext *context, - GLuint program, - GLuint index, - const GLchar *name); -bool ValidateBindBuffer(ValidationContext *context, GLenum target, GLuint buffer); -bool ValidateBindFramebuffer(ValidationContext *context, GLenum target, GLuint framebuffer); -bool ValidateBindRenderbuffer(ValidationContext *context, GLenum target, GLuint renderbuffer); -bool ValidateBlendEquation(ValidationContext *context, GLenum mode); -bool ValidateBlendEquationSeparate(ValidationContext *context, GLenum modeRGB, GLenum modeAlpha); -bool ValidateBlendFunc(ValidationContext *context, GLenum sfactor, GLenum dfactor); -bool ValidateBlendFuncSeparate(ValidationContext *context, - GLenum srcRGB, - GLenum dstRGB, - GLenum srcAlpha, - GLenum dstAlpha); } // namespace gl diff --git a/gfx/angle/src/libANGLE/validationES3.cpp b/gfx/angle/src/libANGLE/validationES3.cpp index a4cb71e6a..6f3d8002a 100755 --- a/gfx/angle/src/libANGLE/validationES3.cpp +++ b/gfx/angle/src/libANGLE/validationES3.cpp @@ -8,9 +8,6 @@ #include "libANGLE/validationES3.h" -#include "base/numerics/safe_conversions.h" -#include "common/mathutil.h" -#include "common/utilities.h" #include "libANGLE/validationES.h" #include "libANGLE/Context.h" #include "libANGLE/Texture.h" @@ -19,11 +16,209 @@ #include "libANGLE/formatutils.h" #include "libANGLE/FramebufferAttachment.h" +#include "common/mathutil.h" +#include "common/utilities.h" + using namespace angle; namespace gl { +struct ES3FormatCombination +{ + GLenum internalFormat; + GLenum format; + GLenum type; +}; + +bool operator<(const ES3FormatCombination& a, const ES3FormatCombination& b) +{ + return memcmp(&a, &b, sizeof(ES3FormatCombination)) < 0; +} + +typedef std::set ES3FormatCombinationSet; + +static inline void InsertES3FormatCombo(ES3FormatCombinationSet *set, GLenum internalFormat, GLenum format, GLenum type) +{ + ES3FormatCombination info; + info.internalFormat = internalFormat; + info.format = format; + info.type = type; + set->insert(info); +} + +ES3FormatCombinationSet BuildES3FormatSet() +{ + ES3FormatCombinationSet set; + + // Format combinations from ES 3.0.1 spec, table 3.2 + + // clang-format off + // | Internal format | Format | Type | + // | | | | + InsertES3FormatCombo(&set, GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_RGB5_A1, GL_RGBA, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_RGBA4, GL_RGBA, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_RGBA8_SNORM, GL_RGBA, GL_BYTE ); + InsertES3FormatCombo(&set, GL_RGBA4, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4 ); + InsertES3FormatCombo(&set, GL_RGB10_A2, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV ); + InsertES3FormatCombo(&set, GL_RGB5_A1, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV ); + InsertES3FormatCombo(&set, GL_RGB5_A1, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1 ); + InsertES3FormatCombo(&set, GL_RGBA16F, GL_RGBA, GL_HALF_FLOAT ); + InsertES3FormatCombo(&set, GL_RGBA16F, GL_RGBA, GL_HALF_FLOAT_OES ); + InsertES3FormatCombo(&set, GL_RGBA32F, GL_RGBA, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_RGBA16F, GL_RGBA, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_RGBA8UI, GL_RGBA_INTEGER, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_RGBA8I, GL_RGBA_INTEGER, GL_BYTE ); + InsertES3FormatCombo(&set, GL_RGBA16UI, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT ); + InsertES3FormatCombo(&set, GL_RGBA16I, GL_RGBA_INTEGER, GL_SHORT ); + InsertES3FormatCombo(&set, GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT ); + InsertES3FormatCombo(&set, GL_RGBA32I, GL_RGBA_INTEGER, GL_INT ); + InsertES3FormatCombo(&set, GL_RGB10_A2UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT_2_10_10_10_REV ); + InsertES3FormatCombo(&set, GL_RGB8, GL_RGB, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_RGB565, GL_RGB, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_SRGB8, GL_RGB, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_RGB8_SNORM, GL_RGB, GL_BYTE ); + InsertES3FormatCombo(&set, GL_RGB565, GL_RGB, GL_UNSIGNED_SHORT_5_6_5 ); + InsertES3FormatCombo(&set, GL_R11F_G11F_B10F, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV ); + InsertES3FormatCombo(&set, GL_RGB9_E5, GL_RGB, GL_UNSIGNED_INT_5_9_9_9_REV ); + InsertES3FormatCombo(&set, GL_RGB16F, GL_RGB, GL_HALF_FLOAT ); + InsertES3FormatCombo(&set, GL_RGB16F, GL_RGB, GL_HALF_FLOAT_OES ); + InsertES3FormatCombo(&set, GL_R11F_G11F_B10F, GL_RGB, GL_HALF_FLOAT ); + InsertES3FormatCombo(&set, GL_R11F_G11F_B10F, GL_RGB, GL_HALF_FLOAT_OES ); + InsertES3FormatCombo(&set, GL_RGB9_E5, GL_RGB, GL_HALF_FLOAT ); + InsertES3FormatCombo(&set, GL_RGB9_E5, GL_RGB, GL_HALF_FLOAT_OES ); + InsertES3FormatCombo(&set, GL_RGB32F, GL_RGB, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_RGB16F, GL_RGB, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_R11F_G11F_B10F, GL_RGB, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_RGB9_E5, GL_RGB, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_RGB8UI, GL_RGB_INTEGER, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_RGB8I, GL_RGB_INTEGER, GL_BYTE ); + InsertES3FormatCombo(&set, GL_RGB16UI, GL_RGB_INTEGER, GL_UNSIGNED_SHORT ); + InsertES3FormatCombo(&set, GL_RGB16I, GL_RGB_INTEGER, GL_SHORT ); + InsertES3FormatCombo(&set, GL_RGB32UI, GL_RGB_INTEGER, GL_UNSIGNED_INT ); + InsertES3FormatCombo(&set, GL_RGB32I, GL_RGB_INTEGER, GL_INT ); + InsertES3FormatCombo(&set, GL_RG8, GL_RG, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_RG8_SNORM, GL_RG, GL_BYTE ); + InsertES3FormatCombo(&set, GL_RG16F, GL_RG, GL_HALF_FLOAT ); + InsertES3FormatCombo(&set, GL_RG16F, GL_RG, GL_HALF_FLOAT_OES ); + InsertES3FormatCombo(&set, GL_RG32F, GL_RG, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_RG16F, GL_RG, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_RG8UI, GL_RG_INTEGER, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_RG8I, GL_RG_INTEGER, GL_BYTE ); + InsertES3FormatCombo(&set, GL_RG16UI, GL_RG_INTEGER, GL_UNSIGNED_SHORT ); + InsertES3FormatCombo(&set, GL_RG16I, GL_RG_INTEGER, GL_SHORT ); + InsertES3FormatCombo(&set, GL_RG32UI, GL_RG_INTEGER, GL_UNSIGNED_INT ); + InsertES3FormatCombo(&set, GL_RG32I, GL_RG_INTEGER, GL_INT ); + InsertES3FormatCombo(&set, GL_R8, GL_RED, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_R8_SNORM, GL_RED, GL_BYTE ); + InsertES3FormatCombo(&set, GL_R16F, GL_RED, GL_HALF_FLOAT ); + InsertES3FormatCombo(&set, GL_R16F, GL_RED, GL_HALF_FLOAT_OES ); + InsertES3FormatCombo(&set, GL_R32F, GL_RED, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_R16F, GL_RED, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_R8UI, GL_RED_INTEGER, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_R8I, GL_RED_INTEGER, GL_BYTE ); + InsertES3FormatCombo(&set, GL_R16UI, GL_RED_INTEGER, GL_UNSIGNED_SHORT ); + InsertES3FormatCombo(&set, GL_R16I, GL_RED_INTEGER, GL_SHORT ); + InsertES3FormatCombo(&set, GL_R32UI, GL_RED_INTEGER, GL_UNSIGNED_INT ); + InsertES3FormatCombo(&set, GL_R32I, GL_RED_INTEGER, GL_INT ); + + // Unsized formats + InsertES3FormatCombo(&set, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_RGBA, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4 ); + InsertES3FormatCombo(&set, GL_RGBA, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1 ); + InsertES3FormatCombo(&set, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5 ); + InsertES3FormatCombo(&set, GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_LUMINANCE, GL_LUMINANCE, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_SRGB_ALPHA_EXT, GL_SRGB_ALPHA_EXT, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_SRGB_EXT, GL_SRGB_EXT, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_RG, GL_RG, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_RG, GL_RG, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_RG, GL_RG, GL_HALF_FLOAT ); + InsertES3FormatCombo(&set, GL_RG, GL_RG, GL_HALF_FLOAT_OES ); + InsertES3FormatCombo(&set, GL_RED, GL_RED, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_RED, GL_RED, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_RED, GL_RED, GL_HALF_FLOAT ); + InsertES3FormatCombo(&set, GL_RED, GL_RED, GL_HALF_FLOAT_OES ); + InsertES3FormatCombo(&set, GL_DEPTH_STENCIL, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8 ); + + // Depth stencil formats + InsertES3FormatCombo(&set, GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT ); + InsertES3FormatCombo(&set, GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT ); + InsertES3FormatCombo(&set, GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT ); + InsertES3FormatCombo(&set, GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8 ); + InsertES3FormatCombo(&set, GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV); + + // From GL_EXT_sRGB + InsertES3FormatCombo(&set, GL_SRGB8_ALPHA8_EXT, GL_SRGB_ALPHA_EXT, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_SRGB8, GL_SRGB_EXT, GL_UNSIGNED_BYTE ); + + // From GL_OES_texture_float + InsertES3FormatCombo(&set, GL_RGBA, GL_RGBA, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_RGB, GL_RGB, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_LUMINANCE, GL_LUMINANCE, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_ALPHA, GL_ALPHA, GL_FLOAT ); + + // From GL_OES_texture_half_float + InsertES3FormatCombo(&set, GL_RGBA, GL_RGBA, GL_HALF_FLOAT_OES ); + InsertES3FormatCombo(&set, GL_RGB, GL_RGB, GL_HALF_FLOAT_OES ); + InsertES3FormatCombo(&set, GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, GL_HALF_FLOAT ); + InsertES3FormatCombo(&set, GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, GL_HALF_FLOAT_OES ); + InsertES3FormatCombo(&set, GL_LUMINANCE, GL_LUMINANCE, GL_HALF_FLOAT ); + InsertES3FormatCombo(&set, GL_LUMINANCE, GL_LUMINANCE, GL_HALF_FLOAT_OES ); + InsertES3FormatCombo(&set, GL_ALPHA, GL_ALPHA, GL_HALF_FLOAT ); + InsertES3FormatCombo(&set, GL_ALPHA, GL_ALPHA, GL_HALF_FLOAT_OES ); + + // From GL_EXT_texture_format_BGRA8888 + InsertES3FormatCombo(&set, GL_BGRA_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE ); + + // From GL_EXT_texture_storage + // | Internal format | Format | Type | + // | | | | + InsertES3FormatCombo(&set, GL_ALPHA8_EXT, GL_ALPHA, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_LUMINANCE8_EXT, GL_LUMINANCE, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_LUMINANCE8_ALPHA8_EXT, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_ALPHA32F_EXT, GL_ALPHA, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_LUMINANCE32F_EXT, GL_LUMINANCE, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_LUMINANCE_ALPHA32F_EXT, GL_LUMINANCE_ALPHA, GL_FLOAT ); + InsertES3FormatCombo(&set, GL_ALPHA16F_EXT, GL_ALPHA, GL_HALF_FLOAT ); + InsertES3FormatCombo(&set, GL_ALPHA16F_EXT, GL_ALPHA, GL_HALF_FLOAT_OES ); + InsertES3FormatCombo(&set, GL_LUMINANCE16F_EXT, GL_LUMINANCE, GL_HALF_FLOAT ); + InsertES3FormatCombo(&set, GL_LUMINANCE16F_EXT, GL_LUMINANCE, GL_HALF_FLOAT_OES ); + InsertES3FormatCombo(&set, GL_LUMINANCE_ALPHA16F_EXT, GL_LUMINANCE_ALPHA, GL_HALF_FLOAT ); + InsertES3FormatCombo(&set, GL_LUMINANCE_ALPHA16F_EXT, GL_LUMINANCE_ALPHA, GL_HALF_FLOAT_OES ); + + // From GL_EXT_texture_storage and GL_EXT_texture_format_BGRA8888 + InsertES3FormatCombo(&set, GL_BGRA8_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_BGRA4_ANGLEX, GL_BGRA_EXT, GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT); + InsertES3FormatCombo(&set, GL_BGRA4_ANGLEX, GL_BGRA_EXT, GL_UNSIGNED_BYTE ); + InsertES3FormatCombo(&set, GL_BGR5_A1_ANGLEX, GL_BGRA_EXT, GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT); + InsertES3FormatCombo(&set, GL_BGR5_A1_ANGLEX, GL_BGRA_EXT, GL_UNSIGNED_BYTE ); + + // From GL_ANGLE_depth_texture and OES_depth_texture + InsertES3FormatCombo(&set, GL_DEPTH_COMPONENT32_OES, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT_24_8_OES ); + InsertES3FormatCombo(&set, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT ); + InsertES3FormatCombo(&set, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT ); + + // From GL_EXT_texture_norm16 + InsertES3FormatCombo(&set, GL_R16_EXT, GL_RED, GL_UNSIGNED_SHORT); + InsertES3FormatCombo(&set, GL_RG16_EXT, GL_RG, GL_UNSIGNED_SHORT); + InsertES3FormatCombo(&set, GL_RGB16_EXT, GL_RGB, GL_UNSIGNED_SHORT); + InsertES3FormatCombo(&set, GL_RGBA16_EXT, GL_RGBA, GL_UNSIGNED_SHORT); + InsertES3FormatCombo(&set, GL_R16_SNORM_EXT, GL_RED, GL_SHORT); + InsertES3FormatCombo(&set, GL_RG16_SNORM_EXT, GL_RG, GL_SHORT); + InsertES3FormatCombo(&set, GL_RGB16_SNORM_EXT, GL_RGB, GL_SHORT); + InsertES3FormatCombo(&set, GL_RGBA16_SNORM_EXT, GL_RGBA, GL_SHORT); + // clang-format on + + return set; +} + static bool ValidateTexImageFormatCombination(gl::Context *context, GLenum internalFormat, GLenum format, GLenum type) { // For historical reasons, glTexImage2D and glTexImage3D pass in their internal format as a @@ -31,21 +226,54 @@ static bool ValidateTexImageFormatCombination(gl::Context *context, GLenum inter // error instead of a GL_INVALID_ENUM error. As this validation function is only called in // the validation codepaths for glTexImage2D/3D, we record a GL_INVALID_VALUE error. const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(internalFormat); - if (!formatInfo.textureSupport(context->getClientVersion(), context->getExtensions())) + if (!formatInfo.textureSupport(context->getClientMajorVersion(), context->getExtensions())) { context->handleError(Error(GL_INVALID_VALUE)); return false; } // The type and format are valid if any supported internal format has that type and format - if (!ValidES3Format(format) || !ValidES3Type(type)) + bool formatSupported = false; + bool typeSupported = false; + + static const ES3FormatCombinationSet es3FormatSet = BuildES3FormatSet(); + for (ES3FormatCombinationSet::const_iterator i = es3FormatSet.begin(); i != es3FormatSet.end(); i++) + { + if (i->format == format || i->type == type) + { + const gl::InternalFormat &info = gl::GetInternalFormatInfo(i->internalFormat); + bool supported = + info.textureSupport(context->getClientMajorVersion(), context->getExtensions()); + if (supported && i->type == type) + { + typeSupported = true; + } + if (supported && i->format == format) + { + formatSupported = true; + } + + // Early-out if both type and format are supported now + if (typeSupported && formatSupported) + { + break; + } + } + } + + if (!typeSupported || !formatSupported) { context->handleError(Error(GL_INVALID_ENUM)); return false; } // Check if this is a valid format combination to load texture data - if (!ValidES3FormatCombination(format, type, internalFormat)) + ES3FormatCombination searchFormat; + searchFormat.internalFormat = internalFormat; + searchFormat.format = format; + searchFormat.type = type; + + if (es3FormatSet.find(searchFormat) == es3FormatSet.end()) { context->handleError(Error(GL_INVALID_OPERATION)); return false; @@ -69,7 +297,6 @@ bool ValidateES3TexImageParametersBase(Context *context, GLint border, GLenum format, GLenum type, - GLsizei imageSize, const GLvoid *pixels) { // Validate image size @@ -168,12 +395,6 @@ bool ValidateES3TexImageParametersBase(Context *context, // Validate texture formats GLenum actualInternalFormat = isSubImage ? texture->getFormat(target, level).asSized() : internalformat; - if (isSubImage && actualInternalFormat == GL_NONE) - { - context->handleError(Error(GL_INVALID_OPERATION, "Texture level does not exist.")); - return false; - } - const gl::InternalFormat &actualFormatInfo = gl::GetInternalFormatInfo(actualInternalFormat); if (isCompressed) { @@ -190,7 +411,8 @@ bool ValidateES3TexImageParametersBase(Context *context, return false; } - if (!actualFormatInfo.textureSupport(context->getClientVersion(), context->getExtensions())) + if (!actualFormatInfo.textureSupport(context->getClientMajorVersion(), + context->getExtensions())) { context->handleError(Error(GL_INVALID_ENUM)); return false; @@ -253,27 +475,70 @@ bool ValidateES3TexImageParametersBase(Context *context, } } - if (!ValidImageDataSize(context, target, width, height, 1, actualInternalFormat, type, pixels, - imageSize)) - { - return false; - } - // Check for pixel unpack buffer related API errors gl::Buffer *pixelUnpackBuffer = context->getGLState().getTargetBuffer(GL_PIXEL_UNPACK_BUFFER); - if (pixelUnpackBuffer != nullptr) + if (pixelUnpackBuffer != NULL) { + // ...the data would be unpacked from the buffer object such that the memory reads required + // would exceed the data store size. + GLenum sizedFormat = GetSizedInternalFormat(actualInternalFormat, type); + const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(sizedFormat); + const gl::Extents size(width, height, depth); + const auto &unpack = context->getGLState().getUnpackState(); + + auto copyBytesOrErr = formatInfo.computeUnpackSize(type, size, unpack); + if (copyBytesOrErr.isError()) + { + context->handleError(copyBytesOrErr.getError()); + return false; + } + CheckedNumeric checkedCopyBytes(copyBytesOrErr.getResult()); + CheckedNumeric checkedOffset(reinterpret_cast(pixels)); + checkedCopyBytes += checkedOffset; + + auto rowPitchOrErr = + formatInfo.computeRowPitch(type, width, unpack.alignment, unpack.rowLength); + if (rowPitchOrErr.isError()) + { + context->handleError(rowPitchOrErr.getError()); + return false; + } + auto depthPitchOrErr = formatInfo.computeDepthPitch(type, width, height, unpack.alignment, + unpack.rowLength, unpack.imageHeight); + if (depthPitchOrErr.isError()) + { + context->handleError(depthPitchOrErr.getError()); + return false; + } + + bool targetIs3D = target == GL_TEXTURE_3D || target == GL_TEXTURE_2D_ARRAY; + auto skipBytesOrErr = formatInfo.computeSkipBytes( + rowPitchOrErr.getResult(), depthPitchOrErr.getResult(), unpack.skipImages, + unpack.skipRows, unpack.skipPixels, targetIs3D); + if (skipBytesOrErr.isError()) + { + context->handleError(skipBytesOrErr.getError()); + return false; + } + checkedCopyBytes += skipBytesOrErr.getResult(); + + if (!checkedCopyBytes.IsValid() || + (checkedCopyBytes.ValueOrDie() > static_cast(pixelUnpackBuffer->getSize()))) + { + // Overflow past the end of the buffer + context->handleError(Error(GL_INVALID_OPERATION)); + return false; + } + // ...data is not evenly divisible into the number of bytes needed to store in memory a datum // indicated by type. if (!isCompressed) { - size_t offset = reinterpret_cast(pixels); size_t dataBytesPerPixel = static_cast(gl::GetTypeInfo(type).bytes); - if ((offset % dataBytesPerPixel) != 0) + if ((checkedOffset.ValueOrDie() % dataBytesPerPixel) != 0) { - context->handleError( - Error(GL_INVALID_OPERATION, "Reads would overflow the pixel unpack buffer.")); + context->handleError(Error(GL_INVALID_OPERATION)); return false; } } @@ -281,7 +546,7 @@ bool ValidateES3TexImageParametersBase(Context *context, // ...the buffer object's data store is currently mapped. if (pixelUnpackBuffer->isMapped()) { - context->handleError(Error(GL_INVALID_OPERATION, "Pixel unpack buffer is mapped.")); + context->handleError(Error(GL_INVALID_OPERATION)); return false; } } @@ -304,7 +569,6 @@ bool ValidateES3TexImage2DParameters(Context *context, GLint border, GLenum format, GLenum type, - GLsizei imageSize, const GLvoid *pixels) { if (!ValidTexture2DDestinationTarget(context, target)) @@ -315,7 +579,7 @@ bool ValidateES3TexImage2DParameters(Context *context, return ValidateES3TexImageParametersBase(context, target, level, internalformat, isCompressed, isSubImage, xoffset, yoffset, zoffset, width, height, - depth, border, format, type, imageSize, pixels); + depth, border, format, type, pixels); } bool ValidateES3TexImage3DParameters(Context *context, @@ -333,7 +597,6 @@ bool ValidateES3TexImage3DParameters(Context *context, GLint border, GLenum format, GLenum type, - GLsizei bufSize, const GLvoid *pixels) { if (!ValidTexture3DDestinationTarget(context, target)) @@ -344,115 +607,169 @@ bool ValidateES3TexImage3DParameters(Context *context, return ValidateES3TexImageParametersBase(context, target, level, internalformat, isCompressed, isSubImage, xoffset, yoffset, zoffset, width, height, - depth, border, format, type, bufSize, pixels); + depth, border, format, type, pixels); } struct EffectiveInternalFormatInfo { - GLenum effectiveFormat; - GLenum destFormat; - GLuint minRedBits; - GLuint maxRedBits; - GLuint minGreenBits; - GLuint maxGreenBits; - GLuint minBlueBits; - GLuint maxBlueBits; - GLuint minAlphaBits; - GLuint maxAlphaBits; + GLenum mEffectiveFormat; + GLenum mDestFormat; + GLuint mMinRedBits; + GLuint mMaxRedBits; + GLuint mMinGreenBits; + GLuint mMaxGreenBits; + GLuint mMinBlueBits; + GLuint mMaxBlueBits; + GLuint mMinAlphaBits; + GLuint mMaxAlphaBits; + + EffectiveInternalFormatInfo(GLenum effectiveFormat, GLenum destFormat, GLuint minRedBits, GLuint maxRedBits, + GLuint minGreenBits, GLuint maxGreenBits, GLuint minBlueBits, GLuint maxBlueBits, + GLuint minAlphaBits, GLuint maxAlphaBits) + : mEffectiveFormat(effectiveFormat), mDestFormat(destFormat), mMinRedBits(minRedBits), + mMaxRedBits(maxRedBits), mMinGreenBits(minGreenBits), mMaxGreenBits(maxGreenBits), + mMinBlueBits(minBlueBits), mMaxBlueBits(maxBlueBits), mMinAlphaBits(minAlphaBits), + mMaxAlphaBits(maxAlphaBits) {}; }; -static bool QueryEffectiveFormatList(const InternalFormat &srcFormat, - GLenum targetFormat, - const EffectiveInternalFormatInfo *list, - size_t size, - GLenum *outEffectiveFormat) -{ - for (size_t curFormat = 0; curFormat < size; ++curFormat) - { - const EffectiveInternalFormatInfo &formatInfo = list[curFormat]; - if ((formatInfo.destFormat == targetFormat) && - (formatInfo.minRedBits <= srcFormat.redBits && - formatInfo.maxRedBits >= srcFormat.redBits) && - (formatInfo.minGreenBits <= srcFormat.greenBits && - formatInfo.maxGreenBits >= srcFormat.greenBits) && - (formatInfo.minBlueBits <= srcFormat.blueBits && - formatInfo.maxBlueBits >= srcFormat.blueBits) && - (formatInfo.minAlphaBits <= srcFormat.alphaBits && - formatInfo.maxAlphaBits >= srcFormat.alphaBits)) - { - *outEffectiveFormat = formatInfo.effectiveFormat; - return true; - } - } +typedef std::vector EffectiveInternalFormatList; - *outEffectiveFormat = GL_NONE; - return false; -} - -bool GetSizedEffectiveInternalFormatInfo(const InternalFormat &srcFormat, - GLenum *outEffectiveFormat) +static EffectiveInternalFormatList BuildSizedEffectiveInternalFormatList() { - // OpenGL ES 3.0.3 Specification, Table 3.17, pg 141: - // Effective internal format coresponding to destination internal format and linear source - // buffer component sizes. - // | Source channel min/max sizes | - // Effective Internal Format | N/A | R | G | B | A | - // clang-format off - constexpr EffectiveInternalFormatInfo list[] = { - { GL_ALPHA8_EXT, GL_NONE, 0, 0, 0, 0, 0, 0, 1, 8 }, - { GL_R8, GL_NONE, 1, 8, 0, 0, 0, 0, 0, 0 }, - { GL_RG8, GL_NONE, 1, 8, 1, 8, 0, 0, 0, 0 }, - { GL_RGB565, GL_NONE, 1, 5, 1, 6, 1, 5, 0, 0 }, - { GL_RGB8, GL_NONE, 6, 8, 7, 8, 6, 8, 0, 0 }, - { GL_RGBA4, GL_NONE, 1, 4, 1, 4, 1, 4, 1, 4 }, - { GL_RGB5_A1, GL_NONE, 5, 5, 5, 5, 5, 5, 1, 1 }, - { GL_RGBA8, GL_NONE, 5, 8, 5, 8, 5, 8, 2, 8 }, - { GL_RGB10_A2, GL_NONE, 9, 10, 9, 10, 9, 10, 2, 2 }, - }; - // clang-format on + EffectiveInternalFormatList list; - return QueryEffectiveFormatList(srcFormat, GL_NONE, list, ArraySize(list), outEffectiveFormat); + // OpenGL ES 3.0.3 Specification, Table 3.17, pg 141: Effective internal format coresponding to destination internal format and + // linear source buffer component sizes. + // | Source channel min/max sizes | + // Effective Internal Format | N/A | R | G | B | A | + list.push_back(EffectiveInternalFormatInfo(GL_ALPHA8_EXT, GL_NONE, 0, 0, 0, 0, 0, 0, 1, 8)); + list.push_back(EffectiveInternalFormatInfo(GL_R8, GL_NONE, 1, 8, 0, 0, 0, 0, 0, 0)); + list.push_back(EffectiveInternalFormatInfo(GL_RG8, GL_NONE, 1, 8, 1, 8, 0, 0, 0, 0)); + list.push_back(EffectiveInternalFormatInfo(GL_RGB565, GL_NONE, 1, 5, 1, 6, 1, 5, 0, 0)); + list.push_back(EffectiveInternalFormatInfo(GL_RGB8, GL_NONE, 6, 8, 7, 8, 6, 8, 0, 0)); + list.push_back(EffectiveInternalFormatInfo(GL_RGBA4, GL_NONE, 1, 4, 1, 4, 1, 4, 1, 4)); + list.push_back(EffectiveInternalFormatInfo(GL_RGB5_A1, GL_NONE, 5, 5, 5, 5, 5, 5, 1, 1)); + list.push_back(EffectiveInternalFormatInfo(GL_RGBA8, GL_NONE, 5, 8, 5, 8, 5, 8, 2, 8)); + list.push_back(EffectiveInternalFormatInfo(GL_RGB10_A2, GL_NONE, 9, 10, 9, 10, 9, 10, 2, 2)); + + return list; } -bool GetUnsizedEffectiveInternalFormatInfo(const InternalFormat &srcFormat, - const InternalFormat &destFormat, - GLenum *outEffectiveFormat) +static EffectiveInternalFormatList BuildUnsizedEffectiveInternalFormatList() { - constexpr GLuint umax = UINT_MAX; + EffectiveInternalFormatList list; - // OpenGL ES 3.0.3 Specification, Table 3.17, pg 141: - // Effective internal format coresponding to destination internal format andlinear source buffer - // component sizes. - // | Source channel min/max sizes | - // Effective Internal Format | Dest Format | R | G | B | A | - // clang-format off - constexpr EffectiveInternalFormatInfo list[] = { - { GL_ALPHA8_EXT, GL_ALPHA, 0, umax, 0, umax, 0, umax, 1, 8 }, - { GL_LUMINANCE8_EXT, GL_LUMINANCE, 1, 8, 0, umax, 0, umax, 0, umax }, - { GL_LUMINANCE8_ALPHA8_EXT, GL_LUMINANCE_ALPHA, 1, 8, 0, umax, 0, umax, 1, 8 }, - { GL_RGB565, GL_RGB, 1, 5, 1, 6, 1, 5, 0, umax }, - { GL_RGB8, GL_RGB, 6, 8, 7, 8, 6, 8, 0, umax }, - { GL_RGBA4, GL_RGBA, 1, 4, 1, 4, 1, 4, 1, 4 }, - { GL_RGB5_A1, GL_RGBA, 5, 5, 5, 5, 5, 5, 1, 1 }, - { GL_RGBA8, GL_RGBA, 5, 8, 5, 8, 5, 8, 5, 8 }, - }; - // clang-format on + // OpenGL ES 3.0.3 Specification, Table 3.17, pg 141: Effective internal format coresponding to destination internal format and + // linear source buffer component sizes. + // | Source channel min/max sizes | + // Effective Internal Format | Dest Format | R | G | B | A | + list.push_back(EffectiveInternalFormatInfo(GL_ALPHA8_EXT, GL_ALPHA, 0, UINT_MAX, 0, UINT_MAX, 0, UINT_MAX, 1, 8)); + list.push_back(EffectiveInternalFormatInfo(GL_LUMINANCE8_EXT, GL_LUMINANCE, 1, 8, 0, UINT_MAX, 0, UINT_MAX, 0, UINT_MAX)); + list.push_back(EffectiveInternalFormatInfo(GL_LUMINANCE8_ALPHA8_EXT, GL_LUMINANCE_ALPHA, 1, 8, 0, UINT_MAX, 0, UINT_MAX, 1, 8)); + list.push_back(EffectiveInternalFormatInfo(GL_RGB565, GL_RGB, 1, 5, 1, 6, 1, 5, 0, UINT_MAX)); + list.push_back(EffectiveInternalFormatInfo(GL_RGB8, GL_RGB, 6, 8, 7, 8, 6, 8, 0, UINT_MAX)); + list.push_back(EffectiveInternalFormatInfo(GL_RGBA4, GL_RGBA, 1, 4, 1, 4, 1, 4, 1, 4)); + list.push_back(EffectiveInternalFormatInfo(GL_RGB5_A1, GL_RGBA, 5, 5, 5, 5, 5, 5, 1, 1)); + list.push_back(EffectiveInternalFormatInfo(GL_RGBA8, GL_RGBA, 5, 8, 5, 8, 5, 8, 5, 8)); - return QueryEffectiveFormatList(srcFormat, destFormat.format, list, ArraySize(list), - outEffectiveFormat); + return list; } static bool GetEffectiveInternalFormat(const InternalFormat &srcFormat, const InternalFormat &destFormat, GLenum *outEffectiveFormat) { + const EffectiveInternalFormatList *list = NULL; + GLenum targetFormat = GL_NONE; + if (destFormat.pixelBytes > 0) { - return GetSizedEffectiveInternalFormatInfo(srcFormat, outEffectiveFormat); + static const EffectiveInternalFormatList sizedList = BuildSizedEffectiveInternalFormatList(); + list = &sizedList; } else { - return GetUnsizedEffectiveInternalFormatInfo(srcFormat, destFormat, outEffectiveFormat); + static const EffectiveInternalFormatList unsizedList = BuildUnsizedEffectiveInternalFormatList(); + list = &unsizedList; + targetFormat = destFormat.format; } + + for (size_t curFormat = 0; curFormat < list->size(); ++curFormat) + { + const EffectiveInternalFormatInfo& formatInfo = list->at(curFormat); + if ((formatInfo.mDestFormat == targetFormat) && + (formatInfo.mMinRedBits <= srcFormat.redBits && formatInfo.mMaxRedBits >= srcFormat.redBits) && + (formatInfo.mMinGreenBits <= srcFormat.greenBits && formatInfo.mMaxGreenBits >= srcFormat.greenBits) && + (formatInfo.mMinBlueBits <= srcFormat.blueBits && formatInfo.mMaxBlueBits >= srcFormat.blueBits) && + (formatInfo.mMinAlphaBits <= srcFormat.alphaBits && formatInfo.mMaxAlphaBits >= srcFormat.alphaBits)) + { + *outEffectiveFormat = formatInfo.mEffectiveFormat; + return true; + } + } + + return false; +} + +struct CopyConversion +{ + GLenum mTextureFormat; + GLenum mFramebufferFormat; + + CopyConversion(GLenum textureFormat, GLenum framebufferFormat) + : mTextureFormat(textureFormat), mFramebufferFormat(framebufferFormat) { } + + bool operator<(const CopyConversion& other) const + { + return memcmp(this, &other, sizeof(CopyConversion)) < 0; + } +}; + +typedef std::set CopyConversionSet; + +static CopyConversionSet BuildValidES3CopyTexImageCombinations() +{ + CopyConversionSet set; + + // From ES 3.0.1 spec, table 3.15 + set.insert(CopyConversion(GL_ALPHA, GL_RGBA)); + set.insert(CopyConversion(GL_LUMINANCE, GL_RED)); + set.insert(CopyConversion(GL_LUMINANCE, GL_RG)); + set.insert(CopyConversion(GL_LUMINANCE, GL_RGB)); + set.insert(CopyConversion(GL_LUMINANCE, GL_RGBA)); + set.insert(CopyConversion(GL_LUMINANCE_ALPHA, GL_RGBA)); + set.insert(CopyConversion(GL_RED, GL_RED)); + set.insert(CopyConversion(GL_RED, GL_RG)); + set.insert(CopyConversion(GL_RED, GL_RGB)); + set.insert(CopyConversion(GL_RED, GL_RGBA)); + set.insert(CopyConversion(GL_RG, GL_RG)); + set.insert(CopyConversion(GL_RG, GL_RGB)); + set.insert(CopyConversion(GL_RG, GL_RGBA)); + set.insert(CopyConversion(GL_RGB, GL_RGB)); + set.insert(CopyConversion(GL_RGB, GL_RGBA)); + set.insert(CopyConversion(GL_RGBA, GL_RGBA)); + + // Necessary for ANGLE back-buffers + set.insert(CopyConversion(GL_ALPHA, GL_BGRA_EXT)); + set.insert(CopyConversion(GL_LUMINANCE, GL_BGRA_EXT)); + set.insert(CopyConversion(GL_LUMINANCE_ALPHA, GL_BGRA_EXT)); + set.insert(CopyConversion(GL_RED, GL_BGRA_EXT)); + set.insert(CopyConversion(GL_RG, GL_BGRA_EXT)); + set.insert(CopyConversion(GL_RGB, GL_BGRA_EXT)); + set.insert(CopyConversion(GL_RGBA, GL_BGRA_EXT)); + set.insert(CopyConversion(GL_BGRA_EXT, GL_BGRA_EXT)); + + set.insert(CopyConversion(GL_RED_INTEGER, GL_RED_INTEGER)); + set.insert(CopyConversion(GL_RED_INTEGER, GL_RG_INTEGER)); + set.insert(CopyConversion(GL_RED_INTEGER, GL_RGB_INTEGER)); + set.insert(CopyConversion(GL_RED_INTEGER, GL_RGBA_INTEGER)); + set.insert(CopyConversion(GL_RG_INTEGER, GL_RG_INTEGER)); + set.insert(CopyConversion(GL_RG_INTEGER, GL_RGB_INTEGER)); + set.insert(CopyConversion(GL_RG_INTEGER, GL_RGBA_INTEGER)); + set.insert(CopyConversion(GL_RGB_INTEGER, GL_RGB_INTEGER)); + set.insert(CopyConversion(GL_RGB_INTEGER, GL_RGBA_INTEGER)); + set.insert(CopyConversion(GL_RGBA_INTEGER, GL_RGBA_INTEGER)); + + return set; } static bool EqualOrFirstZero(GLuint first, GLuint second) @@ -467,129 +784,129 @@ static bool IsValidES3CopyTexImageCombination(const Format &textureFormat, const auto &textureFormatInfo = *textureFormat.info; const auto &framebufferFormatInfo = *framebufferFormat.info; - if (!ValidES3CopyConversion(textureFormatInfo.format, framebufferFormatInfo.format)) + static const CopyConversionSet conversionSet = BuildValidES3CopyTexImageCombinations(); + if (conversionSet.find(CopyConversion(textureFormatInfo.format, + framebufferFormatInfo.format)) != conversionSet.end()) { - return false; - } - - // Section 3.8.5 of the GLES 3.0.3 spec states that source and destination formats - // must both be signed, unsigned, or fixed point and both source and destinations - // must be either both SRGB or both not SRGB. EXT_color_buffer_float adds allowed - // conversion between fixed and floating point. + // Section 3.8.5 of the GLES 3.0.3 spec states that source and destination formats + // must both be signed, unsigned, or fixed point and both source and destinations + // must be either both SRGB or both not SRGB. EXT_color_buffer_float adds allowed + // conversion between fixed and floating point. - if ((textureFormatInfo.colorEncoding == GL_SRGB) != - (framebufferFormatInfo.colorEncoding == GL_SRGB)) - { - return false; - } - - if (((textureFormatInfo.componentType == GL_INT) != - (framebufferFormatInfo.componentType == GL_INT)) || - ((textureFormatInfo.componentType == GL_UNSIGNED_INT) != - (framebufferFormatInfo.componentType == GL_UNSIGNED_INT))) - { - return false; - } - - if ((textureFormatInfo.componentType == GL_UNSIGNED_NORMALIZED || - textureFormatInfo.componentType == GL_SIGNED_NORMALIZED || - textureFormatInfo.componentType == GL_FLOAT) && - !(framebufferFormatInfo.componentType == GL_UNSIGNED_NORMALIZED || - framebufferFormatInfo.componentType == GL_SIGNED_NORMALIZED || - framebufferFormatInfo.componentType == GL_FLOAT)) - { - return false; - } + if ((textureFormatInfo.colorEncoding == GL_SRGB) != + (framebufferFormatInfo.colorEncoding == GL_SRGB)) + { + return false; + } - // GLES specification 3.0.3, sec 3.8.5, pg 139-140: - // The effective internal format of the source buffer is determined with the following rules - // applied in order: - // * If the source buffer is a texture or renderbuffer that was created with a sized internal - // format then the effective internal format is the source buffer's sized internal format. - // * If the source buffer is a texture that was created with an unsized base internal format, - // then the effective internal format is the source image array's effective internal - // format, as specified by table 3.12, which is determined from the and - // that were used when the source image array was specified by TexImage*. - // * Otherwise the effective internal format is determined by the row in table 3.17 or 3.18 - // where Destination Internal Format matches internalformat and where the [source channel - // sizes] are consistent with the values of the source buffer's [channel sizes]. Table 3.17 - // is used if the FRAMEBUFFER_ATTACHMENT_ENCODING is LINEAR and table 3.18 is used if the - // FRAMEBUFFER_ATTACHMENT_ENCODING is SRGB. - const InternalFormat *sourceEffectiveFormat = NULL; - if (readBufferHandle != 0) - { - // Not the default framebuffer, therefore the read buffer must be a user-created texture or - // renderbuffer - if (framebufferFormat.sized) + if (((textureFormatInfo.componentType == GL_INT) != + (framebufferFormatInfo.componentType == GL_INT)) || + ((textureFormatInfo.componentType == GL_UNSIGNED_INT) != + (framebufferFormatInfo.componentType == GL_UNSIGNED_INT))) { - sourceEffectiveFormat = &framebufferFormatInfo; + return false; } - else + + if ((textureFormatInfo.componentType == GL_UNSIGNED_NORMALIZED || + textureFormatInfo.componentType == GL_SIGNED_NORMALIZED || + textureFormatInfo.componentType == GL_FLOAT) && + !(framebufferFormatInfo.componentType == GL_UNSIGNED_NORMALIZED || + framebufferFormatInfo.componentType == GL_SIGNED_NORMALIZED || + framebufferFormatInfo.componentType == GL_FLOAT)) { - // Renderbuffers cannot be created with an unsized internal format, so this must be an - // unsized-format texture. We can use the same table we use when creating textures to - // get its effective sized format. - GLenum sizedInternalFormat = - GetSizedInternalFormat(framebufferFormatInfo.format, framebufferFormatInfo.type); - sourceEffectiveFormat = &GetInternalFormatInfo(sizedInternalFormat); + return false; } - } - else - { - // The effective internal format must be derived from the source framebuffer's channel - // sizes. This is done in GetEffectiveInternalFormat for linear buffers (table 3.17) - if (framebufferFormatInfo.colorEncoding == GL_LINEAR) + + // GLES specification 3.0.3, sec 3.8.5, pg 139-140: + // The effective internal format of the source buffer is determined with the following rules applied in order: + // * If the source buffer is a texture or renderbuffer that was created with a sized internal format then the + // effective internal format is the source buffer's sized internal format. + // * If the source buffer is a texture that was created with an unsized base internal format, then the + // effective internal format is the source image array's effective internal format, as specified by table + // 3.12, which is determined from the and that were used when the source image array was + // specified by TexImage*. + // * Otherwise the effective internal format is determined by the row in table 3.17 or 3.18 where + // Destination Internal Format matches internalformat and where the [source channel sizes] are consistent + // with the values of the source buffer's [channel sizes]. Table 3.17 is used if the + // FRAMEBUFFER_ATTACHMENT_ENCODING is LINEAR and table 3.18 is used if the FRAMEBUFFER_ATTACHMENT_ENCODING + // is SRGB. + const InternalFormat *sourceEffectiveFormat = NULL; + if (readBufferHandle != 0) { - GLenum effectiveFormat; - if (GetEffectiveInternalFormat(framebufferFormatInfo, textureFormatInfo, - &effectiveFormat)) + // Not the default framebuffer, therefore the read buffer must be a user-created texture or renderbuffer + if (framebufferFormat.sized) { - sourceEffectiveFormat = &GetInternalFormatInfo(effectiveFormat); + sourceEffectiveFormat = &framebufferFormatInfo; } else { - return false; + // Renderbuffers cannot be created with an unsized internal format, so this must be an unsized-format + // texture. We can use the same table we use when creating textures to get its effective sized format. + GLenum sizedInternalFormat = GetSizedInternalFormat(framebufferFormatInfo.format, + framebufferFormatInfo.type); + sourceEffectiveFormat = &GetInternalFormatInfo(sizedInternalFormat); } } - else if (framebufferFormatInfo.colorEncoding == GL_SRGB) + else { - // SRGB buffers can only be copied to sized format destinations according to table 3.18 - if (textureFormat.sized && - (framebufferFormatInfo.redBits >= 1 && framebufferFormatInfo.redBits <= 8) && - (framebufferFormatInfo.greenBits >= 1 && framebufferFormatInfo.greenBits <= 8) && - (framebufferFormatInfo.blueBits >= 1 && framebufferFormatInfo.blueBits <= 8) && - (framebufferFormatInfo.alphaBits >= 1 && framebufferFormatInfo.alphaBits <= 8)) + // The effective internal format must be derived from the source framebuffer's channel sizes. + // This is done in GetEffectiveInternalFormat for linear buffers (table 3.17) + if (framebufferFormatInfo.colorEncoding == GL_LINEAR) { - sourceEffectiveFormat = &GetInternalFormatInfo(GL_SRGB8_ALPHA8); + GLenum effectiveFormat; + if (GetEffectiveInternalFormat(framebufferFormatInfo, textureFormatInfo, + &effectiveFormat)) + { + sourceEffectiveFormat = &GetInternalFormatInfo(effectiveFormat); + } + else + { + return false; + } + } + else if (framebufferFormatInfo.colorEncoding == GL_SRGB) + { + // SRGB buffers can only be copied to sized format destinations according to table 3.18 + if (textureFormat.sized && + (framebufferFormatInfo.redBits >= 1 && framebufferFormatInfo.redBits <= 8) && + (framebufferFormatInfo.greenBits >= 1 && + framebufferFormatInfo.greenBits <= 8) && + (framebufferFormatInfo.blueBits >= 1 && framebufferFormatInfo.blueBits <= 8) && + (framebufferFormatInfo.alphaBits >= 1 && framebufferFormatInfo.alphaBits <= 8)) + { + sourceEffectiveFormat = &GetInternalFormatInfo(GL_SRGB8_ALPHA8); + } + else + { + return false; + } } else { + UNREACHABLE(); return false; } } - else - { - UNREACHABLE(); - return false; - } - } - if (textureFormat.sized) - { - // Section 3.8.5 of the GLES 3.0.3 spec, pg 139, requires that, if the destination format is - // sized, component sizes of the source and destination formats must exactly match if the - // destination format exists. - if (!EqualOrFirstZero(textureFormatInfo.redBits, sourceEffectiveFormat->redBits) || - !EqualOrFirstZero(textureFormatInfo.greenBits, sourceEffectiveFormat->greenBits) || - !EqualOrFirstZero(textureFormatInfo.blueBits, sourceEffectiveFormat->blueBits) || - !EqualOrFirstZero(textureFormatInfo.alphaBits, sourceEffectiveFormat->alphaBits)) + if (textureFormat.sized) { - return false; + // Section 3.8.5 of the GLES 3.0.3 spec, pg 139, requires that, if the destination + // format is sized, component sizes of the source and destination formats must exactly + // match if the destination format exists. + if (!EqualOrFirstZero(textureFormatInfo.redBits, sourceEffectiveFormat->redBits) || + !EqualOrFirstZero(textureFormatInfo.greenBits, sourceEffectiveFormat->greenBits) || + !EqualOrFirstZero(textureFormatInfo.blueBits, sourceEffectiveFormat->blueBits) || + !EqualOrFirstZero(textureFormatInfo.alphaBits, sourceEffectiveFormat->alphaBits)) + { + return false; + } } + + return true; // A conversion function exists, and no rule in the specification has precluded conversion + // between these formats. } - return true; // A conversion function exists, and no rule in the specification has precluded - // conversion between these formats. + return false; } bool ValidateES3CopyTexImageParametersBase(ValidationContext *context, @@ -808,7 +1125,7 @@ bool ValidateES3TexStorageParametersBase(Context *context, } const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(internalformat); - if (!formatInfo.textureSupport(context->getClientVersion(), context->getExtensions())) + if (!formatInfo.textureSupport(context->getClientMajorVersion(), context->getExtensions())) { context->handleError(Error(GL_INVALID_ENUM)); return false; @@ -889,7 +1206,7 @@ bool ValidateGetQueryiv(Context *context, GLenum target, GLenum pname, GLint *pa return false; } - return ValidateGetQueryivBase(context, target, pname, nullptr); + return ValidateGetQueryivBase(context, target, pname); } bool ValidateGetQueryObjectuiv(Context *context, GLuint id, GLenum pname, GLuint *params) @@ -900,7 +1217,7 @@ bool ValidateGetQueryObjectuiv(Context *context, GLuint id, GLenum pname, GLuint return false; } - return ValidateGetQueryObjectValueBase(context, id, pname, nullptr); + return ValidateGetQueryObjectValueBase(context, id, pname); } bool ValidateFramebufferTextureLayer(Context *context, GLenum target, GLenum attachment, @@ -979,6 +1296,100 @@ bool ValidateFramebufferTextureLayer(Context *context, GLenum target, GLenum att return true; } +bool ValidES3ReadFormatType(ValidationContext *context, + GLenum internalFormat, + GLenum format, + GLenum type) +{ + const gl::InternalFormat &internalFormatInfo = gl::GetInternalFormatInfo(internalFormat); + + switch (format) + { + case GL_RGBA: + switch (type) + { + case GL_UNSIGNED_BYTE: + break; + case GL_UNSIGNED_SHORT: + if (internalFormatInfo.componentType != GL_UNSIGNED_NORMALIZED && + internalFormatInfo.type != GL_UNSIGNED_SHORT) + { + return false; + } + break; + case GL_UNSIGNED_INT_2_10_10_10_REV: + if (internalFormat != GL_RGB10_A2) + { + return false; + } + break; + case GL_FLOAT: + if (internalFormatInfo.componentType != GL_FLOAT) + { + return false; + } + break; + default: + return false; + } + break; + case GL_RGBA_INTEGER: + switch (type) + { + case GL_INT: + if (internalFormatInfo.componentType != GL_INT) + { + return false; + } + break; + case GL_UNSIGNED_INT: + if (internalFormatInfo.componentType != GL_UNSIGNED_INT) + { + return false; + } + break; + default: + return false; + } + break; + case GL_BGRA_EXT: + switch (type) + { + case GL_UNSIGNED_BYTE: + case GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT: + case GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT: + break; + default: + return false; + } + break; + case GL_RG_EXT: + case GL_RED_EXT: + if (!context->getExtensions().textureRG) + { + return false; + } + switch (type) + { + case GL_UNSIGNED_BYTE: + break; + case GL_UNSIGNED_SHORT: + if (internalFormatInfo.componentType != GL_UNSIGNED_NORMALIZED && + internalFormatInfo.type != GL_UNSIGNED_SHORT) + { + return false; + } + break; + default: + return false; + } + break; + default: + return false; + } + return true; +} + bool ValidateES3RenderbufferStorageParameters(gl::Context *context, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { @@ -1191,7 +1602,7 @@ bool ValidateCompressedTexImage3D(Context *context, } auto blockSizeOrErr = - formatInfo.computeCompressedImageSize(gl::Extents(width, height, depth)); + formatInfo.computeCompressedImageSize(GL_UNSIGNED_BYTE, gl::Extents(width, height, depth)); if (blockSizeOrErr.isError()) { context->handleError(Error(GL_INVALID_VALUE)); @@ -1213,8 +1624,7 @@ bool ValidateCompressedTexImage3D(Context *context, // validateES3TexImageFormat sets the error code if there is an error if (!ValidateES3TexImage3DParameters(context, target, level, internalformat, true, false, 0, 0, - 0, width, height, depth, border, GL_NONE, GL_NONE, -1, - data)) + 0, width, height, depth, border, GL_NONE, GL_NONE, data)) { return false; } @@ -1491,38 +1901,9 @@ bool ValidateTexImage3D(Context *context, return false; } - return ValidateES3TexImage3DParameters(context, target, level, internalformat, false, false, 0, - 0, 0, width, height, depth, border, format, type, -1, - pixels); -} - -bool ValidateTexImage3DRobustANGLE(Context *context, - GLenum target, - GLint level, - GLint internalformat, - GLsizei width, - GLsizei height, - GLsizei depth, - GLint border, - GLenum format, - GLenum type, - GLsizei bufSize, - const GLvoid *pixels) -{ - if (context->getClientMajorVersion() < 3) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - return ValidateES3TexImage3DParameters(context, target, level, internalformat, false, false, 0, 0, 0, width, height, depth, border, format, type, - bufSize, pixels); + pixels); } bool ValidateTexSubImage3D(Context *context, @@ -1546,37 +1927,7 @@ bool ValidateTexSubImage3D(Context *context, return ValidateES3TexImage3DParameters(context, target, level, GL_NONE, false, true, xoffset, yoffset, zoffset, width, height, depth, 0, format, type, - -1, pixels); -} - -bool ValidateTexSubImage3DRobustANGLE(Context *context, - GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLint zoffset, - GLsizei width, - GLsizei height, - GLsizei depth, - GLenum format, - GLenum type, - GLsizei bufSize, - const GLvoid *pixels) -{ - if (context->getClientMajorVersion() < 3) - { - context->handleError(Error(GL_INVALID_OPERATION)); - return false; - } - - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - - return ValidateES3TexImage3DParameters(context, target, level, GL_NONE, false, true, xoffset, - yoffset, zoffset, width, height, depth, 0, format, type, - bufSize, pixels); + pixels); } bool ValidateCompressedTexSubImage3D(Context *context, @@ -1600,7 +1951,7 @@ bool ValidateCompressedTexSubImage3D(Context *context, const InternalFormat &formatInfo = GetInternalFormatInfo(format); auto blockSizeOrErr = - formatInfo.computeCompressedImageSize(gl::Extents(width, height, depth)); + formatInfo.computeCompressedImageSize(GL_UNSIGNED_BYTE, gl::Extents(width, height, depth)); if (blockSizeOrErr.isError()) { context->handleError(blockSizeOrErr.getError()); @@ -1619,7 +1970,7 @@ bool ValidateCompressedTexSubImage3D(Context *context, } return ValidateES3TexImage3DParameters(context, target, level, GL_NONE, true, true, 0, 0, 0, - width, height, depth, 0, GL_NONE, GL_NONE, -1, data); + width, height, depth, 0, GL_NONE, GL_NONE, data); } bool ValidateGenQueries(Context *context, GLint n, GLuint *) @@ -1732,36 +2083,50 @@ bool ValidateBeginTransformFeedback(Context *context, GLenum primitiveMode) return true; } -bool ValidateGetBufferPointerv(Context *context, GLenum target, GLenum pname, GLvoid **params) -{ - return ValidateGetBufferPointervBase(context, target, pname, nullptr, params); -} - -bool ValidateGetBufferPointervRobustANGLE(Context *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLvoid **params) +bool ValidateSamplerParameteri(Context *context, GLuint sampler, GLenum pname, GLint param) { - if (!ValidateRobustEntryPoint(context, bufSize)) + if (context->getClientMajorVersion() < 3) { + context->handleError(Error(GL_INVALID_OPERATION, "Context does not support GLES3.")); return false; } - if (!ValidateGetBufferPointervBase(context, target, pname, length, params)) + if (!context->isSampler(sampler)) { + context->handleError(Error(GL_INVALID_OPERATION)); return false; } - if (!ValidateRobustBufferSize(context, bufSize, *length)) + if (!ValidateSamplerObjectParameter(context, pname)) { return false; } + if (!ValidateTexParamParameters(context, GL_TEXTURE_2D, pname, param)) + { + return false; + } return true; } +bool ValidateSamplerParameterf(Context *context, GLuint sampler, GLenum pname, GLfloat param) +{ + // The only float parameters are MIN_LOD and MAX_LOD. For these any value is permissible, so + // ValidateSamplerParameteri can be used for validation here. + return ValidateSamplerParameteri(context, sampler, pname, static_cast(param)); +} + +bool ValidateGetBufferPointerv(Context *context, GLenum target, GLenum pname, GLvoid **params) +{ + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_OPERATION, "Context does not support GLES3.")); + return false; + } + + return ValidateGetBufferPointervBase(context, target, pname, params); +} + bool ValidateUnmapBuffer(Context *context, GLenum target) { if (context->getClientMajorVersion() < 3) @@ -1802,16 +2167,8 @@ bool ValidateFlushMappedBufferRange(Context *context, return ValidateFlushMappedBufferRangeBase(context, target, offset, length); } -bool ValidateIndexedStateQuery(ValidationContext *context, - GLenum pname, - GLuint index, - GLsizei *length) +bool ValidateIndexedStateQuery(ValidationContext *context, GLenum pname, GLuint index) { - if (length) - { - *length = 0; - } - GLenum nativeType; unsigned int numParams; if (!context->getIndexedQueryParameterInfo(pname, &nativeType, &numParams)) @@ -1855,9 +2212,10 @@ bool ValidateIndexedStateQuery(ValidationContext *context, return false; } - if (length) + // pname is valid, but there are no parameters to return + if (numParams == 0) { - *length = 1; + return false; } return true; @@ -1865,174 +2223,22 @@ bool ValidateIndexedStateQuery(ValidationContext *context, bool ValidateGetIntegeri_v(ValidationContext *context, GLenum target, GLuint index, GLint *data) { - if (context->getClientVersion() < ES_3_0) - { - context->handleError(Error(GL_INVALID_OPERATION, "Context does not support GLES3.0")); - return false; - } - return ValidateIndexedStateQuery(context, target, index, nullptr); -} - -bool ValidateGetIntegeri_vRobustANGLE(ValidationContext *context, - GLenum target, - GLuint index, - GLsizei bufSize, - GLsizei *length, - GLint *data) -{ - if (context->getClientVersion() < ES_3_0) + if (!context->getGLVersion().isES3OrGreater()) { context->handleError(Error(GL_INVALID_OPERATION, "Context does not support GLES3.0")); return false; } - - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - - if (!ValidateIndexedStateQuery(context, target, index, length)) - { - return false; - } - - if (!ValidateRobustBufferSize(context, bufSize, *length)) - { - return false; - } - - return true; + return ValidateIndexedStateQuery(context, target, index); } bool ValidateGetInteger64i_v(ValidationContext *context, GLenum target, GLuint index, GLint64 *data) { - if (context->getClientVersion() < ES_3_0) + if (!context->getGLVersion().isES3OrGreater()) { context->handleError(Error(GL_INVALID_OPERATION, "Context does not support GLES3.0")); return false; } - return ValidateIndexedStateQuery(context, target, index, nullptr); -} - -bool ValidateGetInteger64i_vRobustANGLE(ValidationContext *context, - GLenum target, - GLuint index, - GLsizei bufSize, - GLsizei *length, - GLint64 *data) -{ - if (context->getClientVersion() < ES_3_0) - { - context->handleError(Error(GL_INVALID_OPERATION, "Context does not support GLES3.0")); - return false; - } - - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - - if (!ValidateIndexedStateQuery(context, target, index, length)) - { - return false; - } - - if (!ValidateRobustBufferSize(context, bufSize, *length)) - { - return false; - } - - return true; -} - -bool ValidateCopyBufferSubData(ValidationContext *context, - GLenum readTarget, - GLenum writeTarget, - GLintptr readOffset, - GLintptr writeOffset, - GLsizeiptr size) -{ - if (context->getClientMajorVersion() < 3) - { - context->handleError( - Error(GL_INVALID_OPERATION, "CopyBufferSubData requires ES 3 or greater")); - return false; - } - - if (!ValidBufferTarget(context, readTarget) || !ValidBufferTarget(context, writeTarget)) - { - context->handleError(Error(GL_INVALID_ENUM, "Invalid buffer target")); - return false; - } - - Buffer *readBuffer = context->getGLState().getTargetBuffer(readTarget); - Buffer *writeBuffer = context->getGLState().getTargetBuffer(writeTarget); - - if (!readBuffer || !writeBuffer) - { - context->handleError(Error(GL_INVALID_OPERATION, "No buffer bound to target")); - return false; - } - - // Verify that readBuffer and writeBuffer are not currently mapped - if (readBuffer->isMapped() || writeBuffer->isMapped()) - { - context->handleError( - Error(GL_INVALID_OPERATION, "Cannot call CopyBufferSubData on a mapped buffer")); - return false; - } - - CheckedNumeric checkedReadOffset(readOffset); - CheckedNumeric checkedWriteOffset(writeOffset); - CheckedNumeric checkedSize(size); - - auto checkedReadSum = checkedReadOffset + checkedSize; - auto checkedWriteSum = checkedWriteOffset + checkedSize; - - if (!checkedReadSum.IsValid() || !checkedWriteSum.IsValid() || - !IsValueInRangeForNumericType(readBuffer->getSize()) || - !IsValueInRangeForNumericType(writeBuffer->getSize())) - { - context->handleError( - Error(GL_INVALID_VALUE, "Integer overflow when validating copy offsets.")); - return false; - } - - if (readOffset < 0 || writeOffset < 0 || size < 0) - { - context->handleError( - Error(GL_INVALID_VALUE, "readOffset, writeOffset and size must all be non-negative")); - return false; - } - - if (checkedReadSum.ValueOrDie() > readBuffer->getSize() || - checkedWriteSum.ValueOrDie() > writeBuffer->getSize()) - { - context->handleError( - Error(GL_INVALID_VALUE, "Buffer offset overflow in CopyBufferSubData")); - return false; - } - - if (readBuffer == writeBuffer) - { - auto checkedOffsetDiff = (checkedReadOffset - checkedWriteOffset).Abs(); - if (!checkedOffsetDiff.IsValid()) - { - // This shold not be possible. - UNREACHABLE(); - context->handleError( - Error(GL_INVALID_VALUE, "Integer overflow when validating same buffer copy.")); - return false; - } - - if (checkedOffsetDiff.ValueOrDie() < size) - { - context->handleError(Error(GL_INVALID_VALUE)); - return false; - } - } - - return true; + return ValidateIndexedStateQuery(context, target, index); } } // namespace gl diff --git a/gfx/angle/src/libANGLE/validationES3.h b/gfx/angle/src/libANGLE/validationES3.h index ba98c998a..eeef800a8 100755 --- a/gfx/angle/src/libANGLE/validationES3.h +++ b/gfx/angle/src/libANGLE/validationES3.h @@ -32,7 +32,6 @@ bool ValidateES3TexImageParametersBase(ValidationContext *context, GLint border, GLenum format, GLenum type, - GLsizei imageSize, const GLvoid *pixels); bool ValidateES3TexStorageParameters(Context *context, @@ -58,7 +57,6 @@ bool ValidateES3TexImage2DParameters(Context *context, GLint border, GLenum format, GLenum type, - GLsizei imageSize, const GLvoid *pixels); bool ValidateES3TexImage3DParameters(Context *context, @@ -76,7 +74,6 @@ bool ValidateES3TexImage3DParameters(Context *context, GLint border, GLenum format, GLenum type, - GLsizei bufSize, const GLvoid *pixels); bool ValidateES3CopyTexImageParametersBase(ValidationContext *context, @@ -156,6 +153,11 @@ bool ValidateGetQueryObjectuiv(Context *context, GLuint id, GLenum pname, GLuint bool ValidateFramebufferTextureLayer(Context *context, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +bool ValidES3ReadFormatType(ValidationContext *context, + GLenum internalFormat, + GLenum format, + GLenum type); + bool ValidateES3RenderbufferStorageParameters(Context *context, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); @@ -253,18 +255,6 @@ bool ValidateTexImage3D(Context *context, GLenum format, GLenum type, const GLvoid *pixels); -bool ValidateTexImage3DRobustANGLE(Context *context, - GLenum target, - GLint level, - GLint internalformat, - GLsizei width, - GLsizei height, - GLsizei depth, - GLint border, - GLenum format, - GLenum type, - GLsizei bufSize, - const GLvoid *pixels); bool ValidateTexSubImage3D(Context *context, GLenum target, GLint level, @@ -277,19 +267,6 @@ bool ValidateTexSubImage3D(Context *context, GLenum format, GLenum type, const GLvoid *pixels); -bool ValidateTexSubImage3DRobustANGLE(Context *context, - GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLint zoffset, - GLsizei width, - GLsizei height, - GLsizei depth, - GLenum format, - GLenum type, - GLsizei bufSize, - const GLvoid *pixels); bool ValidateCompressedTexSubImage3D(Context *context, GLenum target, GLint level, @@ -317,13 +294,10 @@ bool ValidateGenOrDeleteCountES3(Context *context, GLint count); bool ValidateBeginTransformFeedback(Context *context, GLenum primitiveMode); +bool ValidateSamplerParameteri(Context *context, GLuint sampler, GLenum pname, GLint param); +bool ValidateSamplerParameterf(Context *context, GLuint sampler, GLenum pname, GLfloat param); + bool ValidateGetBufferPointerv(Context *context, GLenum target, GLenum pname, GLvoid **params); -bool ValidateGetBufferPointervRobustANGLE(Context *context, - GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLvoid **params); bool ValidateUnmapBuffer(Context *context, GLenum target); bool ValidateMapBufferRange(Context *context, GLenum target, @@ -335,35 +309,12 @@ bool ValidateFlushMappedBufferRange(Context *context, GLintptr offset, GLsizeiptr length); -bool ValidateIndexedStateQuery(ValidationContext *context, - GLenum pname, - GLuint index, - GLsizei *length); +bool ValidateIndexedStateQuery(ValidationContext *context, GLenum pname, GLuint index); bool ValidateGetIntegeri_v(ValidationContext *context, GLenum target, GLuint index, GLint *data); -bool ValidateGetIntegeri_vRobustANGLE(ValidationContext *context, - GLenum target, - GLuint index, - GLsizei bufSize, - GLsizei *length, - GLint *data); bool ValidateGetInteger64i_v(ValidationContext *context, GLenum target, GLuint index, GLint64 *data); -bool ValidateGetInteger64i_vRobustANGLE(ValidationContext *context, - GLenum target, - GLuint index, - GLsizei bufSize, - GLsizei *length, - GLint64 *data); - -bool ValidateCopyBufferSubData(ValidationContext *context, - GLenum readTarget, - GLenum writeTarget, - GLintptr readOffset, - GLintptr writeOffset, - GLsizeiptr size); - } // namespace gl #endif // LIBANGLE_VALIDATION_ES3_H_ diff --git a/gfx/angle/src/libANGLE/validationES31.cpp b/gfx/angle/src/libANGLE/validationES31.cpp index 4cea05e47..f7406090d 100755 --- a/gfx/angle/src/libANGLE/validationES31.cpp +++ b/gfx/angle/src/libANGLE/validationES31.cpp @@ -6,11 +6,10 @@ // validationES31.cpp: Validation functions for OpenGL ES 3.1 entry point parameters +#include "libANGLE/validationES3.h" #include "libANGLE/validationES31.h" #include "libANGLE/Context.h" -#include "libANGLE/validationES.h" -#include "libANGLE/validationES3.h" using namespace angle; @@ -19,44 +18,13 @@ namespace gl bool ValidateGetBooleani_v(Context *context, GLenum target, GLuint index, GLboolean *data) { - if (context->getClientVersion() < ES_3_1) + if (!context->getGLVersion().isES31()) { context->handleError(Error(GL_INVALID_OPERATION, "Context does not support GLES3.1")); return false; } - if (!ValidateIndexedStateQuery(context, target, index, nullptr)) - { - return false; - } - - return true; -} - -bool ValidateGetBooleani_vRobustANGLE(Context *context, - GLenum target, - GLuint index, - GLsizei bufSize, - GLsizei *length, - GLboolean *data) -{ - if (context->getClientVersion() < ES_3_1) - { - context->handleError(Error(GL_INVALID_OPERATION, "Context does not support GLES3.1")); - return false; - } - - if (!ValidateRobustEntryPoint(context, bufSize)) - { - return false; - } - - if (!ValidateIndexedStateQuery(context, target, index, length)) - { - return false; - } - - if (!ValidateRobustBufferSize(context, bufSize, *length)) + if (!ValidateIndexedStateQuery(context, target, index)) { return false; } diff --git a/gfx/angle/src/libANGLE/validationES31.h b/gfx/angle/src/libANGLE/validationES31.h index 63ca0db5b..517720cae 100755 --- a/gfx/angle/src/libANGLE/validationES31.h +++ b/gfx/angle/src/libANGLE/validationES31.h @@ -16,12 +16,6 @@ namespace gl class Context; bool ValidateGetBooleani_v(Context *context, GLenum target, GLuint index, GLboolean *data); -bool ValidateGetBooleani_vRobustANGLE(Context *context, - GLenum target, - GLuint index, - GLsizei bufSize, - GLsizei *length, - GLboolean *data); } // namespace gl diff --git a/gfx/angle/src/libANGLE/validationES_unittest.cpp b/gfx/angle/src/libANGLE/validationES_unittest.cpp index 925005a6e..9d99c32a8 100755 --- a/gfx/angle/src/libANGLE/validationES_unittest.cpp +++ b/gfx/angle/src/libANGLE/validationES_unittest.cpp @@ -29,36 +29,36 @@ namespace class MockValidationContext : public ValidationContext { public: - MockValidationContext(const Version &version, + MockValidationContext(GLint majorClientVersion, + GLint minorClientVersion, State *state, const Caps &caps, const TextureCapsMap &textureCaps, const Extensions &extensions, const ResourceManager *resourceManager, const Limitations &limitations, - const ResourceMap &framebufferMap, bool skipValidation); MOCK_METHOD1(handleError, void(const Error &)); }; -MockValidationContext::MockValidationContext(const Version &version, +MockValidationContext::MockValidationContext(GLint majorClientVersion, + GLint minorClientVersion, State *state, const Caps &caps, const TextureCapsMap &textureCaps, const Extensions &extensions, const ResourceManager *resourceManager, const Limitations &limitations, - const ResourceMap &framebufferMap, bool skipValidation) - : ValidationContext(version, + : ValidationContext(majorClientVersion, + minorClientVersion, state, caps, textureCaps, extensions, resourceManager, limitations, - framebufferMap, skipValidation) { } @@ -82,13 +82,12 @@ TEST(ValidationESTest, DrawElementsWithMaxIndexGivesError) TextureCapsMap textureCaps; Extensions extensions; Limitations limitations; - ResourceMap framebufferMap; // Set some basic caps. caps.maxElementIndex = 100; caps.maxDrawBuffers = 1; caps.maxColorAttachments = 1; - state.initialize(caps, extensions, Version(3, 0), false, true); + state.initialize(caps, extensions, 3, false); NiceMock *textureImpl = new NiceMock(); EXPECT_CALL(mockFactory, createTexture(_)).WillOnce(Return(textureImpl)); @@ -109,9 +108,8 @@ TEST(ValidationESTest, DrawElementsWithMaxIndexGivesError) state.setDrawFramebufferBinding(framebuffer); state.setProgram(program); - NiceMock testContext(Version(3, 0), &state, caps, textureCaps, - extensions, nullptr, limitations, framebufferMap, - false); + NiceMock testContext(3, 0, &state, caps, textureCaps, extensions, + nullptr, limitations, false); // Set the expectation for the validation error here. Error expectedError(GL_INVALID_OPERATION, g_ExceedsMaxElementErrorMessage); diff --git a/gfx/angle/src/libEGL.gypi b/gfx/angle/src/libEGL.gypi index 86158a6e9..813b006c5 100755 --- a/gfx/angle/src/libEGL.gypi +++ b/gfx/angle/src/libEGL.gypi @@ -17,7 +17,7 @@ ], 'includes': [ - '../gyp/common_defines.gypi', + '../build/common_defines.gypi', ], 'include_dirs': [ diff --git a/gfx/angle/src/libEGL/libEGL.cpp b/gfx/angle/src/libEGL/libEGL.cpp index 4501ccf95..511565379 100755 --- a/gfx/angle/src/libEGL/libEGL.cpp +++ b/gfx/angle/src/libEGL/libEGL.cpp @@ -358,12 +358,4 @@ EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureNV12ANGLE(EGLDisplay dpy, { return egl::StreamPostD3DTextureNV12ANGLE(dpy, stream, texture, attrib_list); } - -EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT(EGLDisplay dpy, - EGLSurface surface, - EGLint *rects, - EGLint n_rects) -{ - return egl::SwapBuffersWithDamageEXT(dpy, surface, rects, n_rects); -} } diff --git a/gfx/angle/src/libEGL/libEGL.def b/gfx/angle/src/libEGL/libEGL.def index 4888d465e..d4596c23d 100755 --- a/gfx/angle/src/libEGL/libEGL.def +++ b/gfx/angle/src/libEGL/libEGL.def @@ -57,7 +57,6 @@ EXPORTS eglStreamConsumerGLTextureExternalAttribsNV @63 eglCreateStreamProducerD3DTextureNV12ANGLE @64 eglStreamPostD3DTextureNV12ANGLE @65 - eglSwapBuffersWithDamageEXT @66 ; 1.5 entry points eglCreateSync @38 diff --git a/gfx/angle/src/libEGL/moz.build b/gfx/angle/src/libEGL/moz.build index c1e33c86e..8e99d44ff 100755 --- a/gfx/angle/src/libEGL/moz.build +++ b/gfx/angle/src/libEGL/moz.build @@ -32,6 +32,9 @@ if CONFIG['GNU_CXX']: '-Wno-shadow-local', ] +if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']: + LOCAL_INCLUDES += ['%' + '%s/include/' % CONFIG['MOZ_DIRECTX_SDK_PATH']] + DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True DEFINES['_HAS_EXCEPTIONS'] = 0 @@ -64,6 +67,11 @@ DEFINES['ANGLE_ENABLE_KEYEDMUTEX'] = "1" if CONFIG['MOZ_HAS_WINSDK_WITH_D3D']: OS_LIBS += [ 'd3d9', 'dxguid' ] +else: + EXTRA_DSO_LDOPTS += [ + '\'%s/lib/%s/d3d9.lib\'' % (CONFIG['MOZ_DIRECTX_SDK_PATH'], CONFIG['MOZ_D3D_CPU_SUFFIX']), + '\'%s/lib/%s/dxguid.lib\'' % (CONFIG['MOZ_DIRECTX_SDK_PATH'], CONFIG['MOZ_D3D_CPU_SUFFIX']), + ] GeckoSharedLibrary('libEGL', linkage=None) diff --git a/gfx/angle/src/libGLESv2.gypi b/gfx/angle/src/libGLESv2.gypi index b28eecaf1..a22adeb4e 100755 --- a/gfx/angle/src/libGLESv2.gypi +++ b/gfx/angle/src/libGLESv2.gypi @@ -138,8 +138,6 @@ 'libANGLE/Surface.h', 'libANGLE/Texture.cpp', 'libANGLE/Texture.h', - 'libANGLE/Thread.cpp', - 'libANGLE/Thread.h', 'libANGLE/TransformFeedback.cpp', 'libANGLE/TransformFeedback.h', 'libANGLE/Uniform.cpp', @@ -154,22 +152,16 @@ 'libANGLE/angletypes.cpp', 'libANGLE/angletypes.h', 'libANGLE/angletypes.inl', - 'libANGLE/es3_copy_conversion_table_autogen.cpp', 'libANGLE/features.h', - 'libANGLE/format_map_autogen.cpp', 'libANGLE/formatutils.cpp', 'libANGLE/formatutils.h', 'libANGLE/histogram_macros.h', 'libANGLE/queryconversions.cpp', 'libANGLE/queryconversions.h', - 'libANGLE/queryutils.cpp', - 'libANGLE/queryutils.h', 'libANGLE/renderer/BufferImpl.h', 'libANGLE/renderer/CompilerImpl.h', 'libANGLE/renderer/ContextImpl.cpp', 'libANGLE/renderer/ContextImpl.h', - 'libANGLE/renderer/driver_utils.cpp', - 'libANGLE/renderer/driver_utils.h', 'libANGLE/renderer/DeviceImpl.cpp', 'libANGLE/renderer/DeviceImpl.h', 'libANGLE/renderer/DisplayImpl.cpp', @@ -178,7 +170,8 @@ 'libANGLE/renderer/FenceNVImpl.h', 'libANGLE/renderer/FenceSyncImpl.h', 'libANGLE/renderer/Format_ID_autogen.inl', - 'libANGLE/renderer/Format_table_autogen.cpp', + 'libANGLE/renderer/Format_autogen.cpp', + 'libANGLE/renderer/Format.cpp', 'libANGLE/renderer/Format.h', 'libANGLE/renderer/FramebufferAttachmentObjectImpl.h', 'libANGLE/renderer/FramebufferImpl.h', @@ -257,7 +250,6 @@ 'libANGLE/renderer/d3d/ShaderExecutableD3D.h', 'libANGLE/renderer/d3d/SurfaceD3D.cpp', 'libANGLE/renderer/d3d/SurfaceD3D.h', - 'libANGLE/renderer/d3d/SwapChainD3D.cpp', 'libANGLE/renderer/d3d/SwapChainD3D.h', 'libANGLE/renderer/d3d/TextureD3D.cpp', 'libANGLE/renderer/d3d/TextureD3D.h', @@ -335,7 +327,6 @@ 'libANGLE/renderer/d3d/d3d11/copyvertex.inl', 'libANGLE/renderer/d3d/d3d11/DebugAnnotator11.cpp', 'libANGLE/renderer/d3d/d3d11/DebugAnnotator11.h', - 'libANGLE/renderer/d3d/d3d11/dxgi_format_map_autogen.cpp', 'libANGLE/renderer/d3d/d3d11/dxgi_support_table.cpp', 'libANGLE/renderer/d3d/d3d11/dxgi_support_table.h', 'libANGLE/renderer/d3d/d3d11/Fence11.cpp', @@ -514,8 +505,6 @@ ], 'libangle_gl_wgl_sources': [ - 'libANGLE/renderer/gl/wgl/D3DTextureSurfaceWGL.cpp', - 'libANGLE/renderer/gl/wgl/D3DTextureSurfaceWGL.h', 'libANGLE/renderer/gl/wgl/DisplayWGL.cpp', 'libANGLE/renderer/gl/wgl/DisplayWGL.h', 'libANGLE/renderer/gl/wgl/DXGISwapChainWindowSurfaceWGL.cpp', @@ -626,47 +615,6 @@ 'libANGLE/renderer/vulkan/VertexArrayVk.cpp', 'libANGLE/renderer/vulkan/VertexArrayVk.h', ], - 'libangle_null_sources': - [ - 'libANGLE/renderer/null/BufferNULL.cpp', - 'libANGLE/renderer/null/BufferNULL.h', - 'libANGLE/renderer/null/CompilerNULL.cpp', - 'libANGLE/renderer/null/CompilerNULL.h', - 'libANGLE/renderer/null/ContextNULL.cpp', - 'libANGLE/renderer/null/ContextNULL.h', - 'libANGLE/renderer/null/DeviceNULL.cpp', - 'libANGLE/renderer/null/DeviceNULL.h', - 'libANGLE/renderer/null/DisplayNULL.cpp', - 'libANGLE/renderer/null/DisplayNULL.h', - 'libANGLE/renderer/null/FenceNVNULL.cpp', - 'libANGLE/renderer/null/FenceNVNULL.h', - 'libANGLE/renderer/null/FenceSyncNULL.cpp', - 'libANGLE/renderer/null/FenceSyncNULL.h', - 'libANGLE/renderer/null/FramebufferNULL.cpp', - 'libANGLE/renderer/null/FramebufferNULL.h', - 'libANGLE/renderer/null/ImageNULL.cpp', - 'libANGLE/renderer/null/ImageNULL.h', - 'libANGLE/renderer/null/PathNULL.cpp', - 'libANGLE/renderer/null/PathNULL.h', - 'libANGLE/renderer/null/ProgramNULL.cpp', - 'libANGLE/renderer/null/ProgramNULL.h', - 'libANGLE/renderer/null/QueryNULL.cpp', - 'libANGLE/renderer/null/QueryNULL.h', - 'libANGLE/renderer/null/RenderbufferNULL.cpp', - 'libANGLE/renderer/null/RenderbufferNULL.h', - 'libANGLE/renderer/null/SamplerNULL.cpp', - 'libANGLE/renderer/null/SamplerNULL.h', - 'libANGLE/renderer/null/ShaderNULL.cpp', - 'libANGLE/renderer/null/ShaderNULL.h', - 'libANGLE/renderer/null/SurfaceNULL.cpp', - 'libANGLE/renderer/null/SurfaceNULL.h', - 'libANGLE/renderer/null/TextureNULL.cpp', - 'libANGLE/renderer/null/TextureNULL.h', - 'libANGLE/renderer/null/TransformFeedbackNULL.cpp', - 'libANGLE/renderer/null/TransformFeedbackNULL.h', - 'libANGLE/renderer/null/VertexArrayNULL.cpp', - 'libANGLE/renderer/null/VertexArrayNULL.h', - ], 'libglesv2_sources': [ 'common/angleutils.h', @@ -707,12 +655,12 @@ 'type': 'static_library', 'dependencies': [ - 'translator', + 'translator_static', 'commit_id', 'angle_common', 'angle_image_util', ], - 'includes': [ '../gyp/common_defines.gypi', ], + 'includes': [ '../build/common_defines.gypi', ], 'include_dirs': [ '.', @@ -741,7 +689,6 @@ ], 'defines': [ - 'LIBANGLE_IMPLEMENTATION', 'GL_GLEXT_PROTOTYPES', 'ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ "d3dcompiler_47.dll", "d3dcompiler_46.dll", "d3dcompiler_43.dll" }', ], @@ -1012,17 +959,6 @@ 'ANGLE_ENABLE_VULKAN', ], }], - ['angle_enable_null==1', - { - 'sources': - [ - '<@(libangle_null_sources)', - ], - 'defines': - [ - 'ANGLE_ENABLE_NULL', - ], - }], ['angle_build_winrt==0 and OS=="win"', { 'dependencies': @@ -1040,7 +976,7 @@ 'target_name': 'libGLESv2', 'type': '<(angle_gl_library_type)', 'dependencies': [ 'libANGLE', 'angle_common' ], - 'includes': [ '../gyp/common_defines.gypi', ], + 'includes': [ '../build/common_defines.gypi', ], 'sources': [ '<@(libglesv2_sources)', diff --git a/gfx/angle/src/libGLESv2/entry_points_egl.cpp b/gfx/angle/src/libGLESv2/entry_points_egl.cpp index dc0ccb5f7..1ed04eaf1 100755 --- a/gfx/angle/src/libGLESv2/entry_points_egl.cpp +++ b/gfx/angle/src/libGLESv2/entry_points_egl.cpp @@ -17,15 +17,12 @@ #include "libANGLE/Context.h" #include "libANGLE/Display.h" #include "libANGLE/Texture.h" -#include "libANGLE/Thread.h" #include "libANGLE/Surface.h" #include "libANGLE/validationEGL.h" #include "common/debug.h" #include "common/version.h" -#include "platform/Platform.h" - #include namespace egl @@ -35,10 +32,9 @@ namespace egl EGLint EGLAPIENTRY GetError(void) { EVENT("()"); - Thread *thread = GetCurrentThread(); - EGLint error = thread->getError(); - thread->setError(Error(EGL_SUCCESS)); + EGLint error = GetGlobalError(); + SetGlobalError(Error(EGL_SUCCESS)); return error; } @@ -51,58 +47,58 @@ EGLDisplay EGLAPIENTRY GetDisplay(EGLNativeDisplayType display_id) EGLBoolean EGLAPIENTRY Initialize(EGLDisplay dpy, EGLint *major, EGLint *minor) { - EVENT("(EGLDisplay dpy = 0x%0.8p, EGLint *major = 0x%0.8p, EGLint *minor = 0x%0.8p)", dpy, - major, minor); - Thread *thread = GetCurrentThread(); + EVENT("(EGLDisplay dpy = 0x%0.8p, EGLint *major = 0x%0.8p, EGLint *minor = 0x%0.8p)", + dpy, major, minor); Display *display = static_cast(dpy); if (dpy == EGL_NO_DISPLAY || !Display::isValidDisplay(display)) { - thread->setError(Error(EGL_BAD_DISPLAY)); + SetGlobalError(Error(EGL_BAD_DISPLAY)); return EGL_FALSE; } Error error = display->initialize(); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } if (major) *major = 1; if (minor) *minor = 4; - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } EGLBoolean EGLAPIENTRY Terminate(EGLDisplay dpy) { EVENT("(EGLDisplay dpy = 0x%0.8p)", dpy); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); if (dpy == EGL_NO_DISPLAY || !Display::isValidDisplay(display)) { - thread->setError(Error(EGL_BAD_DISPLAY)); + SetGlobalError(Error(EGL_BAD_DISPLAY)); return EGL_FALSE; } - if (display->isValidContext(thread->getContext())) + gl::Context *context = GetGlobalContext(); + + if (display->isValidContext(context)) { - thread->setCurrent(nullptr, nullptr, nullptr, nullptr); + SetGlobalContext(NULL); + SetGlobalDisplay(NULL); } display->terminate(); - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } const char *EGLAPIENTRY QueryString(EGLDisplay dpy, EGLint name) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLint name = %d)", dpy, name); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); if (!(display == EGL_NO_DISPLAY && name == EGL_EXTENSIONS)) @@ -110,7 +106,7 @@ const char *EGLAPIENTRY QueryString(EGLDisplay dpy, EGLint name) Error error = ValidateDisplay(display); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return NULL; } } @@ -138,34 +134,32 @@ const char *EGLAPIENTRY QueryString(EGLDisplay dpy, EGLint name) result = "1.4 (ANGLE " ANGLE_VERSION_STRING ")"; break; default: - thread->setError(Error(EGL_BAD_PARAMETER)); - return NULL; + SetGlobalError(Error(EGL_BAD_PARAMETER)); + return NULL; } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return result; } EGLBoolean EGLAPIENTRY GetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config) { - EVENT( - "(EGLDisplay dpy = 0x%0.8p, EGLConfig *configs = 0x%0.8p, " - "EGLint config_size = %d, EGLint *num_config = 0x%0.8p)", - dpy, configs, config_size, num_config); - Thread *thread = GetCurrentThread(); + EVENT("(EGLDisplay dpy = 0x%0.8p, EGLConfig *configs = 0x%0.8p, " + "EGLint config_size = %d, EGLint *num_config = 0x%0.8p)", + dpy, configs, config_size, num_config); Display *display = static_cast(dpy); Error error = ValidateDisplay(display); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } if (!num_config) { - thread->setError(Error(EGL_BAD_PARAMETER)); + SetGlobalError(Error(EGL_BAD_PARAMETER)); return EGL_FALSE; } @@ -180,30 +174,28 @@ EGLBoolean EGLAPIENTRY GetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint con } *num_config = static_cast(filteredConfigs.size()); - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } EGLBoolean EGLAPIENTRY ChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config) { - EVENT( - "(EGLDisplay dpy = 0x%0.8p, const EGLint *attrib_list = 0x%0.8p, " - "EGLConfig *configs = 0x%0.8p, EGLint config_size = %d, EGLint *num_config = 0x%0.8p)", - dpy, attrib_list, configs, config_size, num_config); - Thread *thread = GetCurrentThread(); + EVENT("(EGLDisplay dpy = 0x%0.8p, const EGLint *attrib_list = 0x%0.8p, " + "EGLConfig *configs = 0x%0.8p, EGLint config_size = %d, EGLint *num_config = 0x%0.8p)", + dpy, attrib_list, configs, config_size, num_config); Display *display = static_cast(dpy); Error error = ValidateDisplay(display); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } if (!num_config) { - thread->setError(Error(EGL_BAD_PARAMETER)); + SetGlobalError(Error(EGL_BAD_PARAMETER)); return EGL_FALSE; } @@ -219,17 +211,14 @@ EGLBoolean EGLAPIENTRY ChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, E } *num_config = static_cast(filteredConfigs.size()); - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } EGLBoolean EGLAPIENTRY GetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value) { - EVENT( - "(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, EGLint attribute = %d, EGLint " - "*value = 0x%0.8p)", - dpy, config, attribute, value); - Thread *thread = GetCurrentThread(); + EVENT("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, EGLint attribute = %d, EGLint *value = 0x%0.8p)", + dpy, config, attribute, value); Display *display = static_cast(dpy); Config *configuration = static_cast(config); @@ -237,27 +226,24 @@ EGLBoolean EGLAPIENTRY GetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint Error error = ValidateConfig(display, configuration); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } if (!display->getConfigAttrib(configuration, attribute, value)) { - thread->setError(Error(EGL_BAD_ATTRIBUTE)); + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); return EGL_FALSE; } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } EGLSurface EGLAPIENTRY CreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list) { - EVENT( - "(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, EGLNativeWindowType win = 0x%0.8p, " - "const EGLint *attrib_list = 0x%0.8p)", - dpy, config, win, attrib_list); - Thread *thread = GetCurrentThread(); + EVENT("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, EGLNativeWindowType win = 0x%0.8p, " + "const EGLint *attrib_list = 0x%0.8p)", dpy, config, win, attrib_list); Display *display = static_cast(dpy); Config *configuration = static_cast(config); @@ -266,7 +252,7 @@ EGLSurface EGLAPIENTRY CreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGL Error error = ValidateCreateWindowSurface(display, configuration, win, attributes); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_NO_SURFACE; } @@ -274,7 +260,7 @@ EGLSurface EGLAPIENTRY CreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGL error = display->createWindowSurface(configuration, win, attributes, &surface); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_NO_SURFACE; } @@ -283,11 +269,8 @@ EGLSurface EGLAPIENTRY CreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGL EGLSurface EGLAPIENTRY CreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) { - EVENT( - "(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, const EGLint *attrib_list = " - "0x%0.8p)", - dpy, config, attrib_list); - Thread *thread = GetCurrentThread(); + EVENT("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, const EGLint *attrib_list = 0x%0.8p)", + dpy, config, attrib_list); Display *display = static_cast(dpy); Config *configuration = static_cast(config); @@ -296,7 +279,7 @@ EGLSurface EGLAPIENTRY CreatePbufferSurface(EGLDisplay dpy, EGLConfig config, co Error error = ValidateCreatePbufferSurface(display, configuration, attributes); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_NO_SURFACE; } @@ -304,7 +287,7 @@ EGLSurface EGLAPIENTRY CreatePbufferSurface(EGLDisplay dpy, EGLConfig config, co error = display->createPbufferSurface(configuration, attributes, &surface); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_NO_SURFACE; } @@ -315,7 +298,6 @@ EGLSurface EGLAPIENTRY CreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGL { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, EGLNativePixmapType pixmap = 0x%0.8p, " "const EGLint *attrib_list = 0x%0.8p)", dpy, config, pixmap, attrib_list); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Config *configuration = static_cast(config); @@ -323,20 +305,19 @@ EGLSurface EGLAPIENTRY CreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGL Error error = ValidateConfig(display, configuration); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_NO_SURFACE; } UNIMPLEMENTED(); // FIXME - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_NO_SURFACE; } EGLBoolean EGLAPIENTRY DestroySurface(EGLDisplay dpy, EGLSurface surface) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p)", dpy, surface); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Surface *eglSurface = static_cast(surface); @@ -344,19 +325,19 @@ EGLBoolean EGLAPIENTRY DestroySurface(EGLDisplay dpy, EGLSurface surface) Error error = ValidateSurface(display, eglSurface); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } if (surface == EGL_NO_SURFACE) { - thread->setError(Error(EGL_BAD_SURFACE)); + SetGlobalError(Error(EGL_BAD_SURFACE)); return EGL_FALSE; } display->destroySurface((Surface*)surface); - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } @@ -364,7 +345,6 @@ EGLBoolean EGLAPIENTRY QuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint a { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLint attribute = %d, EGLint *value = 0x%0.8p)", dpy, surface, attribute, value); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Surface *eglSurface = (Surface*)surface; @@ -372,13 +352,13 @@ EGLBoolean EGLAPIENTRY QuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint a Error error = ValidateSurface(display, eglSurface); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } if (surface == EGL_NO_SURFACE) { - thread->setError(Error(EGL_BAD_SURFACE)); + SetGlobalError(Error(EGL_BAD_SURFACE)); return EGL_FALSE; } @@ -435,7 +415,7 @@ EGLBoolean EGLAPIENTRY QuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint a case EGL_POST_SUB_BUFFER_SUPPORTED_NV: if (!display->getExtensions().postSubBuffer) { - thread->setError(Error(EGL_BAD_ATTRIBUTE)); + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); return EGL_FALSE; } *value = eglSurface->isPostSubBufferSupported(); @@ -443,7 +423,7 @@ EGLBoolean EGLAPIENTRY QuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint a case EGL_FIXED_SIZE_ANGLE: if (!display->getExtensions().windowFixedSize) { - thread->setError(Error(EGL_BAD_ATTRIBUTE)); + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); return EGL_FALSE; } *value = eglSurface->isFixedSize(); @@ -451,7 +431,7 @@ EGLBoolean EGLAPIENTRY QuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint a case EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE: if (!display->getExtensions().flexibleSurfaceCompatibility) { - thread->setError( + SetGlobalError( Error(EGL_BAD_ATTRIBUTE, "EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE cannot be used without " "EGL_ANGLE_flexible_surface_compatibility support.")); @@ -462,9 +442,9 @@ EGLBoolean EGLAPIENTRY QuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint a case EGL_SURFACE_ORIENTATION_ANGLE: if (!display->getExtensions().surfaceOrientation) { - thread->setError(Error(EGL_BAD_ATTRIBUTE, - "EGL_SURFACE_ORIENTATION_ANGLE cannot be queried without " - "EGL_ANGLE_surface_orientation support.")); + SetGlobalError(Error(EGL_BAD_ATTRIBUTE, + "EGL_SURFACE_ORIENTATION_ANGLE cannot be queried without " + "EGL_ANGLE_surface_orientation support.")); return EGL_FALSE; } *value = eglSurface->getOrientation(); @@ -472,19 +452,19 @@ EGLBoolean EGLAPIENTRY QuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint a case EGL_DIRECT_COMPOSITION_ANGLE: if (!display->getExtensions().directComposition) { - thread->setError(Error(EGL_BAD_ATTRIBUTE, - "EGL_DIRECT_COMPOSITION_ANGLE cannot be used without " - "EGL_ANGLE_direct_composition support.")); + SetGlobalError(Error(EGL_BAD_ATTRIBUTE, + "EGL_DIRECT_COMPOSITION_ANGLE cannot be used without " + "EGL_ANGLE_direct_composition support.")); return EGL_FALSE; } *value = eglSurface->directComposition(); break; default: - thread->setError(Error(EGL_BAD_ATTRIBUTE)); - return EGL_FALSE; + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); + return EGL_FALSE; } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } @@ -492,7 +472,6 @@ EGLContext EGLAPIENTRY CreateContext(EGLDisplay dpy, EGLConfig config, EGLContex { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, EGLContext share_context = 0x%0.8p, " "const EGLint *attrib_list = 0x%0.8p)", dpy, config, share_context, attrib_list); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Config *configuration = static_cast(config); @@ -502,7 +481,7 @@ EGLContext EGLAPIENTRY CreateContext(EGLDisplay dpy, EGLConfig config, EGLContex Error error = ValidateCreateContext(display, configuration, sharedGLContext, attributes); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_NO_CONTEXT; } @@ -510,18 +489,17 @@ EGLContext EGLAPIENTRY CreateContext(EGLDisplay dpy, EGLConfig config, EGLContex error = display->createContext(configuration, sharedGLContext, attributes, &context); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_NO_CONTEXT; } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return static_cast(context); } EGLBoolean EGLAPIENTRY DestroyContext(EGLDisplay dpy, EGLContext ctx) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLContext ctx = 0x%0.8p)", dpy, ctx); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); gl::Context *context = static_cast(ctx); @@ -529,24 +507,25 @@ EGLBoolean EGLAPIENTRY DestroyContext(EGLDisplay dpy, EGLContext ctx) Error error = ValidateContext(display, context); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } if (ctx == EGL_NO_CONTEXT) { - thread->setError(Error(EGL_BAD_CONTEXT)); + SetGlobalError(Error(EGL_BAD_CONTEXT)); return EGL_FALSE; } - if (context == thread->getContext()) + if (context == GetGlobalContext()) { - thread->setCurrent(nullptr, thread->getDrawSurface(), thread->getReadSurface(), nullptr); + SetGlobalDisplay(NULL); + SetGlobalContext(NULL); } display->destroyContext(context); - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } @@ -554,7 +533,6 @@ EGLBoolean EGLAPIENTRY MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface r { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface draw = 0x%0.8p, EGLSurface read = 0x%0.8p, EGLContext ctx = 0x%0.8p)", dpy, draw, read, ctx); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); gl::Context *context = static_cast(ctx); @@ -563,13 +541,13 @@ EGLBoolean EGLAPIENTRY MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface r // error is generated. if (ctx == EGL_NO_CONTEXT && (draw != EGL_NO_SURFACE || read != EGL_NO_SURFACE)) { - thread->setError(Error(EGL_BAD_MATCH)); + SetGlobalError(Error(EGL_BAD_MATCH)); return EGL_FALSE; } if (ctx != EGL_NO_CONTEXT && draw == EGL_NO_SURFACE && read == EGL_NO_SURFACE) { - thread->setError(Error(EGL_BAD_MATCH)); + SetGlobalError(Error(EGL_BAD_MATCH)); return EGL_FALSE; } @@ -577,21 +555,21 @@ EGLBoolean EGLAPIENTRY MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface r // EGL_BAD_MATCH error is generated. if ((read == EGL_NO_SURFACE) != (draw == EGL_NO_SURFACE)) { - thread->setError(Error( + SetGlobalError(Error( EGL_BAD_MATCH, "read and draw must both be valid surfaces, or both be EGL_NO_SURFACE")); return EGL_FALSE; } if (dpy == EGL_NO_DISPLAY || !Display::isValidDisplay(display)) { - thread->setError(Error(EGL_BAD_DISPLAY, "'dpy' not a valid EGLDisplay handle")); + SetGlobalError(Error(EGL_BAD_DISPLAY, "'dpy' not a valid EGLDisplay handle")); return EGL_FALSE; } // EGL 1.5 spec: dpy can be uninitialized if all other parameters are null if (!display->isInitialized() && (ctx != EGL_NO_CONTEXT || draw != EGL_NO_SURFACE || read != EGL_NO_SURFACE)) { - thread->setError(Error(EGL_NOT_INITIALIZED, "'dpy' not initialized")); + SetGlobalError(Error(EGL_NOT_INITIALIZED, "'dpy' not initialized")); return EGL_FALSE; } @@ -600,14 +578,14 @@ EGLBoolean EGLAPIENTRY MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface r Error error = ValidateContext(display, context); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } } if (display->isInitialized() && display->testDeviceLost()) { - thread->setError(Error(EGL_CONTEXT_LOST)); + SetGlobalError(Error(EGL_CONTEXT_LOST)); return EGL_FALSE; } @@ -617,7 +595,7 @@ EGLBoolean EGLAPIENTRY MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface r Error error = ValidateSurface(display, drawSurface); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } } @@ -628,7 +606,7 @@ EGLBoolean EGLAPIENTRY MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface r Error error = ValidateSurface(display, readSurface); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } } @@ -640,7 +618,7 @@ EGLBoolean EGLAPIENTRY MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface r context->getConfig(), readSurface->getType()); if (readCompatError.isError()) { - thread->setError(readCompatError); + SetGlobalError(readCompatError); return EGL_FALSE; } } @@ -656,7 +634,7 @@ EGLBoolean EGLAPIENTRY MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface r context->getConfig(), drawSurface->getType()); if (drawCompatError.isError()) { - thread->setError(drawCompatError); + SetGlobalError(drawCompatError); return EGL_FALSE; } } @@ -665,12 +643,16 @@ EGLBoolean EGLAPIENTRY MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface r Error makeCurrentError = display->makeCurrent(drawSurface, readSurface, context); if (makeCurrentError.isError()) { - thread->setError(makeCurrentError); + SetGlobalError(makeCurrentError); return EGL_FALSE; } - gl::Context *previousContext = thread->getContext(); - thread->setCurrent(display, drawSurface, readSurface, context); + gl::Context *previousContext = GetGlobalContext(); + + SetGlobalDisplay(display); + SetGlobalDrawSurface(drawSurface); + SetGlobalReadSurface(readSurface); + SetGlobalContext(context); // Release the surface from the previously-current context, to allow // destroyed surfaces to delete themselves. @@ -679,28 +661,27 @@ EGLBoolean EGLAPIENTRY MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface r previousContext->releaseSurface(); } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } EGLSurface EGLAPIENTRY GetCurrentSurface(EGLint readdraw) { EVENT("(EGLint readdraw = %d)", readdraw); - Thread *thread = GetCurrentThread(); if (readdraw == EGL_READ) { - thread->setError(Error(EGL_SUCCESS)); - return thread->getReadSurface(); + SetGlobalError(Error(EGL_SUCCESS)); + return GetGlobalReadSurface(); } else if (readdraw == EGL_DRAW) { - thread->setError(Error(EGL_SUCCESS)); - return thread->getDrawSurface(); + SetGlobalError(Error(EGL_SUCCESS)); + return GetGlobalDrawSurface(); } else { - thread->setError(Error(EGL_BAD_PARAMETER)); + SetGlobalError(Error(EGL_BAD_PARAMETER)); return EGL_NO_SURFACE; } } @@ -708,11 +689,10 @@ EGLSurface EGLAPIENTRY GetCurrentSurface(EGLint readdraw) EGLDisplay EGLAPIENTRY GetCurrentDisplay(void) { EVENT("()"); - Thread *thread = GetCurrentThread(); - EGLDisplay dpy = thread->getDisplay(); + EGLDisplay dpy = GetGlobalDisplay(); - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return dpy; } @@ -720,7 +700,6 @@ EGLBoolean EGLAPIENTRY QueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attri { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLContext ctx = 0x%0.8p, EGLint attribute = %d, EGLint *value = 0x%0.8p)", dpy, ctx, attribute, value); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); gl::Context *context = static_cast(ctx); @@ -728,7 +707,7 @@ EGLBoolean EGLAPIENTRY QueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attri Error error = ValidateContext(display, context); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } @@ -747,25 +726,24 @@ EGLBoolean EGLAPIENTRY QueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attri *value = context->getRenderBuffer(); break; default: - thread->setError(Error(EGL_BAD_ATTRIBUTE)); - return EGL_FALSE; + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); + return EGL_FALSE; } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } EGLBoolean EGLAPIENTRY WaitGL(void) { EVENT("()"); - Thread *thread = GetCurrentThread(); - Display *display = thread->getDisplay(); + Display *display = GetGlobalDisplay(); Error error = ValidateDisplay(display); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } @@ -774,49 +752,47 @@ EGLBoolean EGLAPIENTRY WaitGL(void) error = display->waitClient(); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } EGLBoolean EGLAPIENTRY WaitNative(EGLint engine) { EVENT("(EGLint engine = %d)", engine); - Thread *thread = GetCurrentThread(); - Display *display = thread->getDisplay(); + Display *display = GetGlobalDisplay(); Error error = ValidateDisplay(display); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } if (engine != EGL_CORE_NATIVE_ENGINE) { - thread->setError( + SetGlobalError( Error(EGL_BAD_PARAMETER, "the 'engine' parameter has an unrecognized value")); } - error = display->waitNative(engine, thread->getDrawSurface(), thread->getReadSurface()); + error = display->waitNative(engine, GetGlobalDrawSurface(), GetGlobalReadSurface()); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } EGLBoolean EGLAPIENTRY SwapBuffers(EGLDisplay dpy, EGLSurface surface) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p)", dpy, surface); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Surface *eglSurface = (Surface*)surface; @@ -824,37 +800,36 @@ EGLBoolean EGLAPIENTRY SwapBuffers(EGLDisplay dpy, EGLSurface surface) Error error = ValidateSurface(display, eglSurface); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } if (display->testDeviceLost()) { - thread->setError(Error(EGL_CONTEXT_LOST)); + SetGlobalError(Error(EGL_CONTEXT_LOST)); return EGL_FALSE; } if (surface == EGL_NO_SURFACE) { - thread->setError(Error(EGL_BAD_SURFACE)); + SetGlobalError(Error(EGL_BAD_SURFACE)); return EGL_FALSE; } error = eglSurface->swap(); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } EGLBoolean EGLAPIENTRY CopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLNativePixmapType target = 0x%0.8p)", dpy, surface, target); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Surface *eglSurface = static_cast(surface); @@ -862,19 +837,19 @@ EGLBoolean EGLAPIENTRY CopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNative Error error = ValidateSurface(display, eglSurface); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } if (display->testDeviceLost()) { - thread->setError(Error(EGL_CONTEXT_LOST)); + SetGlobalError(Error(EGL_CONTEXT_LOST)); return EGL_FALSE; } UNIMPLEMENTED(); // FIXME - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return 0; } @@ -882,7 +857,6 @@ EGLBoolean EGLAPIENTRY CopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNative EGLBoolean EGLAPIENTRY BindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLint buffer = %d)", dpy, surface, buffer); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Surface *eglSurface = static_cast(surface); @@ -890,35 +864,35 @@ EGLBoolean EGLAPIENTRY BindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint b Error error = ValidateSurface(display, eglSurface); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } if (buffer != EGL_BACK_BUFFER) { - thread->setError(Error(EGL_BAD_PARAMETER)); + SetGlobalError(Error(EGL_BAD_PARAMETER)); return EGL_FALSE; } if (surface == EGL_NO_SURFACE || eglSurface->getType() == EGL_WINDOW_BIT) { - thread->setError(Error(EGL_BAD_SURFACE)); + SetGlobalError(Error(EGL_BAD_SURFACE)); return EGL_FALSE; } if (eglSurface->getBoundTexture()) { - thread->setError(Error(EGL_BAD_ACCESS)); + SetGlobalError(Error(EGL_BAD_ACCESS)); return EGL_FALSE; } if (eglSurface->getTextureFormat() == EGL_NO_TEXTURE) { - thread->setError(Error(EGL_BAD_MATCH)); + SetGlobalError(Error(EGL_BAD_MATCH)); return EGL_FALSE; } - gl::Context *context = thread->getContext(); + gl::Context *context = GetGlobalContext(); if (context) { gl::Texture *textureObject = context->getTargetTexture(GL_TEXTURE_2D); @@ -926,19 +900,19 @@ EGLBoolean EGLAPIENTRY BindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint b if (textureObject->getImmutableFormat()) { - thread->setError(Error(EGL_BAD_MATCH)); + SetGlobalError(Error(EGL_BAD_MATCH)); return EGL_FALSE; } error = eglSurface->bindTexImage(textureObject, buffer); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } @@ -946,7 +920,6 @@ EGLBoolean EGLAPIENTRY SurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLint attribute = %d, EGLint value = %d)", dpy, surface, attribute, value); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Surface *eglSurface = static_cast(surface); @@ -954,20 +927,19 @@ EGLBoolean EGLAPIENTRY SurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint Error error = ValidateSurface(display, eglSurface); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } UNIMPLEMENTED(); // FIXME - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } EGLBoolean EGLAPIENTRY ReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLint buffer = %d)", dpy, surface, buffer); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Surface *eglSurface = static_cast(surface); @@ -975,25 +947,25 @@ EGLBoolean EGLAPIENTRY ReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLin Error error = ValidateSurface(display, eglSurface); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } if (buffer != EGL_BACK_BUFFER) { - thread->setError(Error(EGL_BAD_PARAMETER)); + SetGlobalError(Error(EGL_BAD_PARAMETER)); return EGL_FALSE; } if (surface == EGL_NO_SURFACE || eglSurface->getType() == EGL_WINDOW_BIT) { - thread->setError(Error(EGL_BAD_SURFACE)); + SetGlobalError(Error(EGL_BAD_SURFACE)); return EGL_FALSE; } if (eglSurface->getTextureFormat() == EGL_NO_TEXTURE) { - thread->setError(Error(EGL_BAD_MATCH)); + SetGlobalError(Error(EGL_BAD_MATCH)); return EGL_FALSE; } @@ -1004,34 +976,33 @@ EGLBoolean EGLAPIENTRY ReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLin error = eglSurface->releaseTexImage(buffer); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } EGLBoolean EGLAPIENTRY SwapInterval(EGLDisplay dpy, EGLint interval) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLint interval = %d)", dpy, interval); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Error error = ValidateDisplay(display); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } - Surface *draw_surface = static_cast(thread->getDrawSurface()); + Surface *draw_surface = static_cast(GetGlobalDrawSurface()); if (draw_surface == NULL) { - thread->setError(Error(EGL_BAD_SURFACE)); + SetGlobalError(Error(EGL_BAD_SURFACE)); return EGL_FALSE; } @@ -1040,7 +1011,7 @@ EGLBoolean EGLAPIENTRY SwapInterval(EGLDisplay dpy, EGLint interval) draw_surface->setSwapInterval(clampedInterval); - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } @@ -1049,35 +1020,33 @@ EGLBoolean EGLAPIENTRY SwapInterval(EGLDisplay dpy, EGLint interval) EGLBoolean EGLAPIENTRY BindAPI(EGLenum api) { EVENT("(EGLenum api = 0x%X)", api); - Thread *thread = GetCurrentThread(); switch (api) { case EGL_OPENGL_API: case EGL_OPENVG_API: - thread->setError(Error(EGL_BAD_PARAMETER)); - return EGL_FALSE; // Not supported by this implementation + SetGlobalError(Error(EGL_BAD_PARAMETER)); + return EGL_FALSE; // Not supported by this implementation case EGL_OPENGL_ES_API: break; default: - thread->setError(Error(EGL_BAD_PARAMETER)); - return EGL_FALSE; + SetGlobalError(Error(EGL_BAD_PARAMETER)); + return EGL_FALSE; } - thread->setAPI(api); + SetGlobalAPI(api); - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } EGLenum EGLAPIENTRY QueryAPI(void) { EVENT("()"); - Thread *thread = GetCurrentThread(); - EGLenum API = thread->getAPI(); + EGLenum API = GetGlobalAPI(); - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return API; } @@ -1086,7 +1055,6 @@ EGLSurface EGLAPIENTRY CreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buf EVENT("(EGLDisplay dpy = 0x%0.8p, EGLenum buftype = 0x%X, EGLClientBuffer buffer = 0x%0.8p, " "EGLConfig config = 0x%0.8p, const EGLint *attrib_list = 0x%0.8p)", dpy, buftype, buffer, config, attrib_list); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Config *configuration = static_cast(config); @@ -1095,16 +1063,15 @@ EGLSurface EGLAPIENTRY CreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buf Error error = ValidateCreatePbufferFromClientBuffer(display, buftype, buffer, configuration, attributes); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_NO_SURFACE; } egl::Surface *surface = nullptr; - error = display->createPbufferFromClientBuffer(configuration, buftype, buffer, attributes, - &surface); + error = display->createPbufferFromClientBuffer(configuration, buffer, attributes, &surface); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_NO_SURFACE; } @@ -1114,36 +1081,34 @@ EGLSurface EGLAPIENTRY CreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buf EGLBoolean EGLAPIENTRY ReleaseThread(void) { EVENT("()"); - Thread *thread = GetCurrentThread(); MakeCurrent(EGL_NO_DISPLAY, EGL_NO_CONTEXT, EGL_NO_SURFACE, EGL_NO_SURFACE); - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } EGLBoolean EGLAPIENTRY WaitClient(void) { EVENT("()"); - Thread *thread = GetCurrentThread(); - Display *display = thread->getDisplay(); + Display *display = GetGlobalDisplay(); Error error = ValidateDisplay(display); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } error = display->waitClient(); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } @@ -1151,11 +1116,10 @@ EGLBoolean EGLAPIENTRY WaitClient(void) EGLContext EGLAPIENTRY GetCurrentContext(void) { EVENT("()"); - Thread *thread = GetCurrentThread(); - gl::Context *context = thread->getContext(); + gl::Context *context = GetGlobalContext(); - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return static_cast(context); } @@ -1163,40 +1127,32 @@ EGLContext EGLAPIENTRY GetCurrentContext(void) EGLSync EGLAPIENTRY CreateSync(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLenum type = 0x%X, const EGLint* attrib_list = 0x%0.8p)", dpy, type, attrib_list); - Thread *thread = GetCurrentThread(); UNIMPLEMENTED(); - thread->setError(Error(EGL_BAD_DISPLAY, "eglCreateSync unimplemented.")); return EGL_NO_SYNC; } EGLBoolean EGLAPIENTRY DestroySync(EGLDisplay dpy, EGLSync sync) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSync sync = 0x%0.8p)", dpy, sync); - Thread *thread = GetCurrentThread(); UNIMPLEMENTED(); - thread->setError(Error(EGL_BAD_DISPLAY, "eglDestroySync unimplemented.")); return EGL_FALSE; } EGLint EGLAPIENTRY ClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSync sync = 0x%0.8p, EGLint flags = 0x%X, EGLTime timeout = %d)", dpy, sync, flags, timeout); - Thread *thread = GetCurrentThread(); UNIMPLEMENTED(); - thread->setError(Error(EGL_BAD_DISPLAY, "eglClientWaitSync unimplemented.")); return 0; } EGLBoolean EGLAPIENTRY GetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSync sync = 0x%0.8p, EGLint attribute = 0x%X, EGLAttrib *value = 0x%0.8p)", dpy, sync, attribute, value); - Thread *thread = GetCurrentThread(); UNIMPLEMENTED(); - thread->setError(Error(EGL_BAD_DISPLAY, "eglSyncAttrib unimplemented.")); return EGL_FALSE; } @@ -1205,20 +1161,16 @@ EGLImage EGLAPIENTRY CreateImage(EGLDisplay dpy, EGLContext ctx, EGLenum target, EVENT("(EGLDisplay dpy = 0x%0.8p, EGLContext ctx = 0x%0.8p, EGLenum target = 0x%X, " "EGLClientBuffer buffer = 0x%0.8p, const EGLAttrib *attrib_list = 0x%0.8p)", dpy, ctx, target, buffer, attrib_list); - Thread *thread = GetCurrentThread(); UNIMPLEMENTED(); - thread->setError(Error(EGL_BAD_DISPLAY, "eglCreateImage unimplemented.")); return EGL_NO_IMAGE; } EGLBoolean EGLAPIENTRY DestroyImage(EGLDisplay dpy, EGLImage image) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLImage image = 0x%0.8p)", dpy, image); - Thread *thread = GetCurrentThread(); UNIMPLEMENTED(); - thread->setError(Error(EGL_BAD_DISPLAY, "eglDestroyImage unimplemented.")); return EGL_FALSE; } @@ -1226,10 +1178,8 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplay(EGLenum platform, void *native_display { EVENT("(EGLenum platform = %d, void* native_display = 0x%0.8p, const EGLint* attrib_list = 0x%0.8p)", platform, native_display, attrib_list); - Thread *thread = GetCurrentThread(); UNIMPLEMENTED(); - thread->setError(Error(EGL_BAD_DISPLAY, "eglGetPlatformDisplay unimplemented.")); return EGL_NO_DISPLAY; } @@ -1237,10 +1187,8 @@ EGLSurface EGLAPIENTRY CreatePlatformWindowSurface(EGLDisplay dpy, EGLConfig con { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, void* native_window = 0x%0.8p, const EGLint* attrib_list = 0x%0.8p)", dpy, config, native_window, attrib_list); - Thread *thread = GetCurrentThread(); UNIMPLEMENTED(); - thread->setError(Error(EGL_BAD_DISPLAY, "eglCreatePlatformWindowSurface unimplemented.")); return EGL_NO_SURFACE; } @@ -1248,27 +1196,22 @@ EGLSurface EGLAPIENTRY CreatePlatformPixmapSurface(EGLDisplay dpy, EGLConfig con { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, void* native_pixmap = 0x%0.8p, const EGLint* attrib_list = 0x%0.8p)", dpy, config, native_pixmap, attrib_list); - Thread *thread = GetCurrentThread(); UNIMPLEMENTED(); - thread->setError(Error(EGL_BAD_DISPLAY, "eglCraetePlatformPixmaSurface unimplemented.")); return EGL_NO_SURFACE; } EGLBoolean EGLAPIENTRY WaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSync sync = 0x%0.8p, EGLint flags = 0x%X)", dpy, sync, flags); - Thread *thread = GetCurrentThread(); UNIMPLEMENTED(); - thread->setError(Error(EGL_BAD_DISPLAY, "eglWaitSync unimplemented.")); return EGL_FALSE; } __eglMustCastToProperFunctionPointerType EGLAPIENTRY GetProcAddress(const char *procname) { EVENT("(const char *procname = \"%s\")", procname); - Thread *thread = GetCurrentThread(); typedef std::map ProcAddressMap; auto generateProcAddressMap = []() @@ -1277,9 +1220,6 @@ __eglMustCastToProperFunctionPointerType EGLAPIENTRY GetProcAddress(const char * #define INSERT_PROC_ADDRESS(ns, proc) \ map[#ns #proc] = reinterpret_cast<__eglMustCastToProperFunctionPointerType>(ns::proc) -#define INSERT_PROC_ADDRESS_NO_NS(name, proc) \ - map[name] = reinterpret_cast<__eglMustCastToProperFunctionPointerType>(proc) - // GLES2 core INSERT_PROC_ADDRESS(gl, ActiveTexture); INSERT_PROC_ADDRESS(gl, AttachShader); @@ -1532,74 +1472,6 @@ __eglMustCastToProperFunctionPointerType EGLAPIENTRY GetProcAddress(const char * INSERT_PROC_ADDRESS(gl, CopyTextureCHROMIUM); INSERT_PROC_ADDRESS(gl, CopySubTextureCHROMIUM); - // GL_CHROMIUM_copy_compressed_texture - INSERT_PROC_ADDRESS(gl, CompressedCopyTextureCHROMIUM); - - // GL_ANGLE_webgl_compatibility - INSERT_PROC_ADDRESS(gl, EnableExtensionANGLE); - - // GL_ANGLE_robust_client_memory - INSERT_PROC_ADDRESS(gl, GetBooleanvRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetBufferParameterivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetFloatvRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetFramebufferAttachmentParameterivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetIntegervRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetProgramivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetRenderbufferParameterivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetShaderivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetTexParameterfvRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetTexParameterivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetUniformfvRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetUniformivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetVertexAttribfvRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetVertexAttribivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetVertexAttribPointervRobustANGLE); - INSERT_PROC_ADDRESS(gl, ReadPixelsRobustANGLE); - INSERT_PROC_ADDRESS(gl, TexImage2DRobustANGLE); - INSERT_PROC_ADDRESS(gl, TexParameterfvRobustANGLE); - INSERT_PROC_ADDRESS(gl, TexParameterivRobustANGLE); - INSERT_PROC_ADDRESS(gl, TexSubImage2DRobustANGLE); - INSERT_PROC_ADDRESS(gl, TexImage3DRobustANGLE); - INSERT_PROC_ADDRESS(gl, TexSubImage3DRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetQueryivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetQueryObjectuivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetBufferPointervRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetIntegeri_vRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetInternalformativRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetVertexAttribIivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetVertexAttribIuivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetUniformuivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetActiveUniformBlockivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetInteger64vRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetInteger64i_vRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetBufferParameteri64vRobustANGLE); - INSERT_PROC_ADDRESS(gl, SamplerParameterivRobustANGLE); - INSERT_PROC_ADDRESS(gl, SamplerParameterfvRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetSamplerParameterivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetSamplerParameterfvRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetFramebufferParameterivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetProgramInterfaceivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetBooleani_vRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetMultisamplefvRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetTexLevelParameterivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetTexLevelParameterfvRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetPointervRobustANGLERobustANGLE); - INSERT_PROC_ADDRESS(gl, ReadnPixelsRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetnUniformfvRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetnUniformivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetnUniformuivRobustANGLE); - INSERT_PROC_ADDRESS(gl, TexParameterIivRobustANGLE); - INSERT_PROC_ADDRESS(gl, TexParameterIuivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetTexParameterIivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetTexParameterIuivRobustANGLE); - INSERT_PROC_ADDRESS(gl, SamplerParameterIivRobustANGLE); - INSERT_PROC_ADDRESS(gl, SamplerParameterIuivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetSamplerParameterIivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetSamplerParameterIuivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetQueryObjectivRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetQueryObjecti64vRobustANGLE); - INSERT_PROC_ADDRESS(gl, GetQueryObjectui64vRobustANGLE); - // GLES3 core INSERT_PROC_ADDRESS(gl, ReadBuffer); INSERT_PROC_ADDRESS(gl, DrawRangeElements); @@ -1671,8 +1543,8 @@ __eglMustCastToProperFunctionPointerType EGLAPIENTRY GetProcAddress(const char * INSERT_PROC_ADDRESS(gl, UniformBlockBinding); INSERT_PROC_ADDRESS(gl, DrawArraysInstanced); INSERT_PROC_ADDRESS(gl, DrawElementsInstanced); - // FenceSync is the name of a class, the function has an added _ to prevent a name conflict. - INSERT_PROC_ADDRESS_NO_NS("glFenceSync", gl::FenceSync_); + map["glFenceSync"] = + reinterpret_cast<__eglMustCastToProperFunctionPointerType>(gl::FenceSync_); INSERT_PROC_ADDRESS(gl, IsSync); INSERT_PROC_ADDRESS(gl, DeleteSync); INSERT_PROC_ADDRESS(gl, ClientWaitSync); @@ -1872,24 +1744,21 @@ __eglMustCastToProperFunctionPointerType EGLAPIENTRY GetProcAddress(const char * INSERT_PROC_ADDRESS(egl, CreateStreamProducerD3DTextureNV12ANGLE); INSERT_PROC_ADDRESS(egl, StreamPostD3DTextureNV12ANGLE); - // EGL_EXT_swap_buffers_with_damage - INSERT_PROC_ADDRESS(egl, SwapBuffersWithDamageEXT); - - // angle::Platform related entry points - INSERT_PROC_ADDRESS_NO_NS("ANGLEPlatformInitialize", ANGLEPlatformInitialize); - INSERT_PROC_ADDRESS_NO_NS("ANGLEPlatformShutdown", ANGLEPlatformShutdown); - #undef INSERT_PROC_ADDRESS -#undef INSERT_PROC_ADDRESS_NO_NS - return map; }; static const ProcAddressMap procAddressMap = generateProcAddressMap(); - thread->setError(Error(EGL_SUCCESS)); auto iter = procAddressMap.find(procname); - return iter != procAddressMap.end() ? iter->second : nullptr; + if (iter != procAddressMap.end()) + { + return iter->second; + } + else + { + return nullptr; + } } } diff --git a/gfx/angle/src/libGLESv2/entry_points_egl_ext.cpp b/gfx/angle/src/libGLESv2/entry_points_egl_ext.cpp index b18a10d92..3b7a9c870 100755 --- a/gfx/angle/src/libGLESv2/entry_points_egl_ext.cpp +++ b/gfx/angle/src/libGLESv2/entry_points_egl_ext.cpp @@ -14,7 +14,6 @@ #include "libANGLE/Device.h" #include "libANGLE/Surface.h" #include "libANGLE/Stream.h" -#include "libANGLE/Thread.h" #include "libANGLE/validationEGL.h" #include "common/debug.h" @@ -27,7 +26,6 @@ EGLBoolean EGLAPIENTRY QuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surfa { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLint attribute = %d, void **value = 0x%0.8p)", dpy, surface, attribute, value); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Surface *eglSurface = static_cast(surface); @@ -35,19 +33,19 @@ EGLBoolean EGLAPIENTRY QuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surfa Error error = ValidateSurface(display, eglSurface); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } if (!display->getExtensions().querySurfacePointer) { - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_FALSE; } if (surface == EGL_NO_SURFACE) { - thread->setError(Error(EGL_BAD_SURFACE)); + SetGlobalError(Error(EGL_BAD_SURFACE)); return EGL_FALSE; } @@ -57,24 +55,24 @@ EGLBoolean EGLAPIENTRY QuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surfa case EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE: if (!display->getExtensions().surfaceD3DTexture2DShareHandle) { - thread->setError(Error(EGL_BAD_ATTRIBUTE)); + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); return EGL_FALSE; } break; case EGL_DXGI_KEYED_MUTEX_ANGLE: if (!display->getExtensions().keyedMutex) { - thread->setError(Error(EGL_BAD_ATTRIBUTE)); + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); return EGL_FALSE; } break; default: - thread->setError(Error(EGL_BAD_ATTRIBUTE)); - return EGL_FALSE; + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); + return EGL_FALSE; } error = eglSurface->querySurfacePointerANGLE(attribute, value); - thread->setError(error); + SetGlobalError(error); return (error.isError() ? EGL_FALSE : EGL_TRUE); } @@ -83,11 +81,10 @@ EGLBoolean EGLAPIENTRY QuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surfa EGLBoolean EGLAPIENTRY PostSubBufferNV(EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLint x = %d, EGLint y = %d, EGLint width = %d, EGLint height = %d)", dpy, surface, x, y, width, height); - Thread *thread = GetCurrentThread(); if (x < 0 || y < 0 || width < 0 || height < 0) { - thread->setError(Error(EGL_BAD_PARAMETER)); + SetGlobalError(Error(EGL_BAD_PARAMETER)); return EGL_FALSE; } @@ -97,37 +94,37 @@ EGLBoolean EGLAPIENTRY PostSubBufferNV(EGLDisplay dpy, EGLSurface surface, EGLin Error error = ValidateSurface(display, eglSurface); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } if (display->testDeviceLost()) { - thread->setError(Error(EGL_CONTEXT_LOST)); + SetGlobalError(Error(EGL_CONTEXT_LOST)); return EGL_FALSE; } if (surface == EGL_NO_SURFACE) { - thread->setError(Error(EGL_BAD_SURFACE)); + SetGlobalError(Error(EGL_BAD_SURFACE)); return EGL_FALSE; } if (!display->getExtensions().postSubBuffer) { // Spec is not clear about how this should be handled. - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } error = eglSurface->postSubBuffer(x, y, width, height); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return EGL_TRUE; } @@ -136,7 +133,6 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp { EVENT("(EGLenum platform = %d, void* native_display = 0x%0.8p, const EGLint* attrib_list = 0x%0.8p)", platform, native_display, attrib_list); - Thread *thread = GetCurrentThread(); const ClientExtensions &clientExtensions = Display::getClientExtensions(); @@ -145,20 +141,20 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp case EGL_PLATFORM_ANGLE_ANGLE: if (!clientExtensions.platformANGLE) { - thread->setError(Error(EGL_BAD_PARAMETER)); + SetGlobalError(Error(EGL_BAD_PARAMETER)); return EGL_NO_DISPLAY; } break; case EGL_PLATFORM_DEVICE_EXT: if (!clientExtensions.platformDevice) { - thread->setError(Error(EGL_BAD_PARAMETER, "Platform Device extension is not active")); + SetGlobalError(Error(EGL_BAD_PARAMETER, "Platform Device extension is not active")); return EGL_NO_DISPLAY; } break; default: - thread->setError(Error(EGL_BAD_CONFIG)); - return EGL_NO_DISPLAY; + SetGlobalError(Error(EGL_BAD_CONFIG)); + return EGL_NO_DISPLAY; } if (platform == EGL_PLATFORM_ANGLE_ANGLE) @@ -187,7 +183,7 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp case EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE: if (!clientExtensions.platformANGLED3D) { - thread->setError(Error(EGL_BAD_ATTRIBUTE)); + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); return EGL_NO_DISPLAY; } break; @@ -196,25 +192,14 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp case EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE: if (!clientExtensions.platformANGLEOpenGL) { - thread->setError(Error(EGL_BAD_ATTRIBUTE)); - return EGL_NO_DISPLAY; - } - break; - - case EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE: - if (!clientExtensions.platformANGLENULL) - { - thread->setError(Error(EGL_BAD_ATTRIBUTE, - "Display type " - "EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE " - "requires EGL_ANGLE_platform_angle_null.")); + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); return EGL_NO_DISPLAY; } break; default: - thread->setError(Error(EGL_BAD_ATTRIBUTE)); - return EGL_NO_DISPLAY; + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); + return EGL_NO_DISPLAY; } platformType = curAttrib[1]; break; @@ -240,8 +225,8 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp case EGL_FALSE: break; default: - thread->setError(Error(EGL_BAD_ATTRIBUTE)); - return EGL_NO_DISPLAY; + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); + return EGL_NO_DISPLAY; } enableAutoTrimSpecified = true; break; @@ -249,7 +234,7 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp case EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE: if (!clientExtensions.experimentalPresentPath) { - thread->setError( + SetGlobalError( Error(EGL_BAD_ATTRIBUTE, "EGL_ANGLE_experimental_present_path extension not active")); return EGL_NO_DISPLAY; @@ -261,7 +246,7 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp case EGL_EXPERIMENTAL_PRESENT_PATH_COPY_ANGLE: break; default: - thread->setError( + SetGlobalError( Error(EGL_BAD_ATTRIBUTE, "Invalid value for EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE")); return EGL_NO_DISPLAY; @@ -283,10 +268,10 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp break; default: - thread->setError(Error(EGL_BAD_ATTRIBUTE, - "Invalid value for " - "EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE " - "attrib")); + SetGlobalError(Error(EGL_BAD_ATTRIBUTE, + "Invalid value for " + "EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE " + "attrib")); return EGL_NO_DISPLAY; } deviceType = curAttrib[1]; @@ -300,14 +285,14 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp if (!majorVersionSpecified && minorVersionSpecified) { - thread->setError(Error(EGL_BAD_ATTRIBUTE)); + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); return EGL_NO_DISPLAY; } if (deviceType == EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE && platformType != EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE) { - thread->setError( + SetGlobalError( Error(EGL_BAD_ATTRIBUTE, "EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE requires a device type of " "EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE.")); @@ -316,7 +301,7 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp if (enableAutoTrimSpecified && platformType != EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE) { - thread->setError( + SetGlobalError( Error(EGL_BAD_ATTRIBUTE, "EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE requires a device type of " "EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE.")); @@ -325,23 +310,23 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp if (presentPathSpecified && platformType != EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE) { - thread->setError(Error(EGL_BAD_ATTRIBUTE, - "EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE requires a device type of " - "EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE.")); + SetGlobalError(Error(EGL_BAD_ATTRIBUTE, + "EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE requires a device type of " + "EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE.")); return EGL_NO_DISPLAY; } if (deviceTypeSpecified && platformType != EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE && platformType != EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE) { - thread->setError( + SetGlobalError( Error(EGL_BAD_ATTRIBUTE, "EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE requires a device type of " "EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE or EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE.")); return EGL_NO_DISPLAY; } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return Display::GetDisplayFromAttribs(native_display, AttributeMap::CreateFromIntArray(attrib_list)); } @@ -350,13 +335,13 @@ EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_disp Device *eglDevice = reinterpret_cast(native_display); if (eglDevice == nullptr || !Device::IsValidDevice(eglDevice)) { - thread->setError(Error(EGL_BAD_ATTRIBUTE, - "native_display should be a valid EGL device if platform equals " - "EGL_PLATFORM_DEVICE_EXT")); + SetGlobalError(Error(EGL_BAD_ATTRIBUTE, + "native_display should be a valid EGL device if platform equals " + "EGL_PLATFORM_DEVICE_EXT")); return EGL_NO_DISPLAY; } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return Display::GetDisplayFromDevice(native_display); } else @@ -371,12 +356,11 @@ EGLBoolean EGLAPIENTRY QueryDeviceAttribEXT(EGLDeviceEXT device, EGLint attribut { EVENT("(EGLDeviceEXT device = 0x%0.8p, EGLint attribute = %d, EGLAttrib *value = 0x%0.8p)", device, attribute, value); - Thread *thread = GetCurrentThread(); Device *dev = static_cast(device); if (dev == EGL_NO_DEVICE_EXT || !Device::IsValidDevice(dev)) { - thread->setError(Error(EGL_BAD_ACCESS)); + SetGlobalError(Error(EGL_BAD_ACCESS)); return EGL_FALSE; } @@ -385,9 +369,9 @@ EGLBoolean EGLAPIENTRY QueryDeviceAttribEXT(EGLDeviceEXT device, EGLint attribut Display *owningDisplay = dev->getOwningDisplay(); if (owningDisplay != nullptr && !owningDisplay->getExtensions().deviceQuery) { - thread->setError(Error(EGL_BAD_ACCESS, - "Device wasn't created using eglCreateDeviceANGLE, and the Display " - "that created it doesn't support device querying")); + SetGlobalError(Error(EGL_BAD_ACCESS, + "Device wasn't created using eglCreateDeviceANGLE, and the Display " + "that created it doesn't support device querying")); return EGL_FALSE; } @@ -400,17 +384,17 @@ EGLBoolean EGLAPIENTRY QueryDeviceAttribEXT(EGLDeviceEXT device, EGLint attribut case EGL_D3D9_DEVICE_ANGLE: if (!dev->getExtensions().deviceD3D || dev->getType() != attribute) { - thread->setError(Error(EGL_BAD_ATTRIBUTE)); + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); return EGL_FALSE; } error = dev->getDevice(value); break; default: - thread->setError(Error(EGL_BAD_ATTRIBUTE)); - return EGL_FALSE; + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); + return EGL_FALSE; } - thread->setError(error); + SetGlobalError(error); return (error.isError() ? EGL_FALSE : EGL_TRUE); } @@ -419,12 +403,11 @@ const char * EGLAPIENTRY QueryDeviceStringEXT(EGLDeviceEXT device, EGLint name) { EVENT("(EGLDeviceEXT device = 0x%0.8p, EGLint name = %d)", device, name); - Thread *thread = GetCurrentThread(); Device *dev = static_cast(device); if (dev == EGL_NO_DEVICE_EXT || !Device::IsValidDevice(dev)) { - thread->setError(Error(EGL_BAD_DEVICE_EXT)); + SetGlobalError(Error(EGL_BAD_DEVICE_EXT)); return nullptr; } @@ -435,11 +418,11 @@ const char * EGLAPIENTRY QueryDeviceStringEXT(EGLDeviceEXT device, EGLint name) result = dev->getExtensionString().c_str(); break; default: - thread->setError(Error(EGL_BAD_DEVICE_EXT)); - return nullptr; + SetGlobalError(Error(EGL_BAD_DEVICE_EXT)); + return nullptr; } - thread->setError(Error(EGL_SUCCESS)); + SetGlobalError(Error(EGL_SUCCESS)); return result; } @@ -448,20 +431,19 @@ EGLBoolean EGLAPIENTRY QueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, E { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLint attribute = %d, EGLAttrib *value = 0x%0.8p)", dpy, attribute, value); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Error error = ValidateDisplay(display); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } if (!display->getExtensions().deviceQuery) { - thread->setError(Error(EGL_BAD_ACCESS)); + SetGlobalError(Error(EGL_BAD_ACCESS)); return EGL_FALSE; } @@ -473,11 +455,11 @@ EGLBoolean EGLAPIENTRY QueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, E break; default: - thread->setError(Error(EGL_BAD_ATTRIBUTE)); - return EGL_FALSE; + SetGlobalError(Error(EGL_BAD_ATTRIBUTE)); + return EGL_FALSE; } - thread->setError(error); + SetGlobalError(error); return (error.isError() ? EGL_FALSE : EGL_TRUE); } @@ -491,7 +473,6 @@ ANGLE_EXPORT EGLImageKHR EGLAPIENTRY CreateImageKHR(EGLDisplay dpy, "(EGLDisplay dpy = 0x%0.8p, EGLContext ctx = 0x%0.8p, EGLenum target = 0x%X, " "EGLClientBuffer buffer = 0x%0.8p, const EGLAttrib *attrib_list = 0x%0.8p)", dpy, ctx, target, buffer, attrib_list); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); gl::Context *context = static_cast(ctx); @@ -500,7 +481,7 @@ ANGLE_EXPORT EGLImageKHR EGLAPIENTRY CreateImageKHR(EGLDisplay dpy, Error error = ValidateCreateImageKHR(display, context, target, buffer, attributes); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_NO_IMAGE; } @@ -508,7 +489,7 @@ ANGLE_EXPORT EGLImageKHR EGLAPIENTRY CreateImageKHR(EGLDisplay dpy, error = display->createImage(context, target, buffer, attributes, &image); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_NO_IMAGE; } @@ -518,7 +499,6 @@ ANGLE_EXPORT EGLImageKHR EGLAPIENTRY CreateImageKHR(EGLDisplay dpy, ANGLE_EXPORT EGLBoolean EGLAPIENTRY DestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLImage image = 0x%0.8p)", dpy, image); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Image *img = static_cast(image); @@ -526,7 +506,7 @@ ANGLE_EXPORT EGLBoolean EGLAPIENTRY DestroyImageKHR(EGLDisplay dpy, EGLImageKHR Error error = ValidateDestroyImageKHR(display, img); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } @@ -543,12 +523,11 @@ ANGLE_EXPORT EGLDeviceEXT EGLAPIENTRY CreateDeviceANGLE(EGLint device_type, "(EGLint device_type = %d, void* native_device = 0x%0.8p, const EGLAttrib* attrib_list = " "0x%0.8p)", device_type, native_device, attrib_list); - Thread *thread = GetCurrentThread(); Error error = ValidateCreateDeviceANGLE(device_type, native_device, attrib_list); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_NO_DEVICE_EXT; } @@ -557,7 +536,7 @@ ANGLE_EXPORT EGLDeviceEXT EGLAPIENTRY CreateDeviceANGLE(EGLint device_type, if (error.isError()) { ASSERT(device == nullptr); - thread->setError(error); + SetGlobalError(error); return EGL_NO_DEVICE_EXT; } @@ -567,14 +546,13 @@ ANGLE_EXPORT EGLDeviceEXT EGLAPIENTRY CreateDeviceANGLE(EGLint device_type, ANGLE_EXPORT EGLBoolean EGLAPIENTRY ReleaseDeviceANGLE(EGLDeviceEXT device) { EVENT("(EGLDeviceEXT device = 0x%0.8p)", device); - Thread *thread = GetCurrentThread(); Device *dev = static_cast(device); Error error = ValidateReleaseDeviceANGLE(dev); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } @@ -587,7 +565,6 @@ ANGLE_EXPORT EGLBoolean EGLAPIENTRY ReleaseDeviceANGLE(EGLDeviceEXT device) EGLStreamKHR EGLAPIENTRY CreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list) { EVENT("(EGLDisplay dpy = 0x%0.8p, const EGLAttrib* attrib_list = 0x%0.8p)", dpy, attrib_list); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); AttributeMap attributes = AttributeMap::CreateFromIntArray(attrib_list); @@ -595,7 +572,7 @@ EGLStreamKHR EGLAPIENTRY CreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_li Error error = ValidateCreateStreamKHR(display, attributes); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_NO_STREAM_KHR; } @@ -603,18 +580,17 @@ EGLStreamKHR EGLAPIENTRY CreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_li error = display->createStream(attributes, &stream); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_NO_STREAM_KHR; } - thread->setError(error); + SetGlobalError(error); return static_cast(stream); } EGLBoolean EGLAPIENTRY DestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLStreamKHR = 0x%0.8p)", dpy, stream); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Stream *streamObject = static_cast(stream); @@ -622,12 +598,12 @@ EGLBoolean EGLAPIENTRY DestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream) Error error = ValidateDestroyStreamKHR(display, streamObject); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } display->destroyStream(streamObject); - thread->setError(error); + SetGlobalError(error); return EGL_TRUE; } @@ -640,7 +616,6 @@ EGLBoolean EGLAPIENTRY StreamAttribKHR(EGLDisplay dpy, "(EGLDisplay dpy = 0x%0.8p, EGLStreamKHR stream = 0x%0.8p, EGLenum attribute = 0x%X, " "EGLint value = 0x%X)", dpy, stream, attribute, value); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Stream *streamObject = static_cast(stream); @@ -648,7 +623,7 @@ EGLBoolean EGLAPIENTRY StreamAttribKHR(EGLDisplay dpy, Error error = ValidateStreamAttribKHR(display, streamObject, attribute, value); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } @@ -664,7 +639,7 @@ EGLBoolean EGLAPIENTRY StreamAttribKHR(EGLDisplay dpy, UNREACHABLE(); } - thread->setError(error); + SetGlobalError(error); return EGL_TRUE; } @@ -677,7 +652,6 @@ EGLBoolean EGLAPIENTRY QueryStreamKHR(EGLDisplay dpy, "(EGLDisplay dpy = 0x%0.8p, EGLStreamKHR stream = 0x%0.8p, EGLenum attribute = 0x%X, " "EGLint value = 0x%0.8p)", dpy, stream, attribute, value); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Stream *streamObject = static_cast(stream); @@ -685,7 +659,7 @@ EGLBoolean EGLAPIENTRY QueryStreamKHR(EGLDisplay dpy, Error error = ValidateQueryStreamKHR(display, streamObject, attribute, value); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } @@ -704,7 +678,7 @@ EGLBoolean EGLAPIENTRY QueryStreamKHR(EGLDisplay dpy, UNREACHABLE(); } - thread->setError(error); + SetGlobalError(error); return EGL_TRUE; } @@ -717,7 +691,6 @@ EGLBoolean EGLAPIENTRY QueryStreamu64KHR(EGLDisplay dpy, "(EGLDisplay dpy = 0x%0.8p, EGLStreamKHR stream = 0x%0.8p, EGLenum attribute = 0x%X, " "EGLuint64KHR value = 0x%0.8p)", dpy, stream, attribute, value); - Thread *thread = GetCurrentThread(); Display *display = static_cast(dpy); Stream *streamObject = static_cast(stream); @@ -725,7 +698,7 @@ EGLBoolean EGLAPIENTRY QueryStreamu64KHR(EGLDisplay dpy, Error error = ValidateQueryStreamu64KHR(display, streamObject, attribute, value); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } @@ -741,15 +714,13 @@ EGLBoolean EGLAPIENTRY QueryStreamu64KHR(EGLDisplay dpy, UNREACHABLE(); } - thread->setError(error); + SetGlobalError(error); return EGL_TRUE; } EGLBoolean EGLAPIENTRY StreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLStreamKHR = 0x%0.8p)", dpy, stream); - Thread *thread = GetCurrentThread(); - Display *display = static_cast(dpy); Stream *streamObject = static_cast(stream); gl::Context *context = gl::GetValidGlobalContext(); @@ -757,26 +728,24 @@ EGLBoolean EGLAPIENTRY StreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStr Error error = ValidateStreamConsumerGLTextureExternalKHR(display, context, streamObject); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } error = streamObject->createConsumerGLTextureExternal(AttributeMap(), context); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } - thread->setError(error); + SetGlobalError(error); return EGL_TRUE; } EGLBoolean EGLAPIENTRY StreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLStreamKHR = 0x%0.8p)", dpy, stream); - Thread *thread = GetCurrentThread(); - Display *display = static_cast(dpy); Stream *streamObject = static_cast(stream); gl::Context *context = gl::GetValidGlobalContext(); @@ -784,26 +753,24 @@ EGLBoolean EGLAPIENTRY StreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR str Error error = ValidateStreamConsumerAcquireKHR(display, context, streamObject); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } error = streamObject->consumerAcquire(); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } - thread->setError(error); + SetGlobalError(error); return EGL_TRUE; } EGLBoolean EGLAPIENTRY StreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream) { EVENT("(EGLDisplay dpy = 0x%0.8p, EGLStreamKHR = 0x%0.8p)", dpy, stream); - Thread *thread = GetCurrentThread(); - Display *display = static_cast(dpy); Stream *streamObject = static_cast(stream); gl::Context *context = gl::GetValidGlobalContext(); @@ -811,18 +778,18 @@ EGLBoolean EGLAPIENTRY StreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR str Error error = ValidateStreamConsumerReleaseKHR(display, context, streamObject); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } error = streamObject->consumerRelease(); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } - thread->setError(error); + SetGlobalError(error); return EGL_TRUE; } @@ -833,8 +800,6 @@ EGLBoolean EGLAPIENTRY StreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy, EVENT( "(EGLDisplay dpy = 0x%0.8p, EGLStreamKHR stream = 0x%0.8p, EGLAttrib attrib_list = 0x%0.8p", dpy, stream, attrib_list); - Thread *thread = GetCurrentThread(); - Display *display = static_cast(dpy); Stream *streamObject = static_cast(stream); gl::Context *context = gl::GetValidGlobalContext(); @@ -844,18 +809,18 @@ EGLBoolean EGLAPIENTRY StreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy, attributes); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } error = streamObject->createConsumerGLTextureExternal(attributes, context); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } - thread->setError(error); + SetGlobalError(error); return EGL_TRUE; } @@ -866,8 +831,6 @@ EGLBoolean EGLAPIENTRY CreateStreamProducerD3DTextureNV12ANGLE(EGLDisplay dpy, EVENT( "(EGLDisplay dpy = 0x%0.8p, EGLStreamKHR stream = 0x%0.8p, EGLAttrib attrib_list = 0x%0.8p", dpy, stream, attrib_list); - Thread *thread = GetCurrentThread(); - Display *display = static_cast(dpy); Stream *streamObject = static_cast(stream); AttributeMap attributes = AttributeMap::CreateFromAttribArray(attrib_list); @@ -876,18 +839,18 @@ EGLBoolean EGLAPIENTRY CreateStreamProducerD3DTextureNV12ANGLE(EGLDisplay dpy, ValidateCreateStreamProducerD3DTextureNV12ANGLE(display, streamObject, attributes); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } error = streamObject->createProducerD3D11TextureNV12(attributes); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } - thread->setError(error); + SetGlobalError(error); return EGL_TRUE; } @@ -900,8 +863,6 @@ EGLBoolean EGLAPIENTRY StreamPostD3DTextureNV12ANGLE(EGLDisplay dpy, "(EGLDisplay dpy = 0x%0.8p, EGLStreamKHR stream = 0x%0.8p, void* texture = 0x%0.8p, " "EGLAttrib attrib_list = 0x%0.8p", dpy, stream, texture, attrib_list); - Thread *thread = GetCurrentThread(); - Display *display = static_cast(dpy); Stream *streamObject = static_cast(stream); AttributeMap attributes = AttributeMap::CreateFromAttribArray(attrib_list); @@ -909,49 +870,18 @@ EGLBoolean EGLAPIENTRY StreamPostD3DTextureNV12ANGLE(EGLDisplay dpy, Error error = ValidateStreamPostD3DTextureNV12ANGLE(display, streamObject, texture, attributes); if (error.isError()) { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } error = streamObject->postD3D11NV12Texture(texture, attributes); if (error.isError()) { - thread->setError(error); - return EGL_FALSE; - } - - thread->setError(error); - return EGL_TRUE; -} - -ANGLE_EXPORT EGLBoolean SwapBuffersWithDamageEXT(EGLDisplay dpy, - EGLSurface surface, - EGLint *rects, - EGLint n_rects) -{ - EVENT( - "(EGLDisplay dpy = 0x%0.8p, EGLSurface surface = 0x%0.8p, EGLint *rects = 0x%0.8p, EGLint " - "n_rects = %d)", - dpy, surface, rects, n_rects); - Thread *thread = GetCurrentThread(); - - Display *display = static_cast(dpy); - Surface *eglSurface = static_cast(surface); - - Error error = ValidateSwapBuffersWithDamageEXT(display, eglSurface, rects, n_rects); - if (error.isError()) - { - thread->setError(error); - return EGL_FALSE; - } - - error = eglSurface->swapWithDamage(rects, n_rects); - if (error.isError()) - { - thread->setError(error); + SetGlobalError(error); return EGL_FALSE; } + SetGlobalError(error); return EGL_TRUE; } } diff --git a/gfx/angle/src/libGLESv2/entry_points_egl_ext.h b/gfx/angle/src/libGLESv2/entry_points_egl_ext.h index eb57ad05e..4ec0450bf 100755 --- a/gfx/angle/src/libGLESv2/entry_points_egl_ext.h +++ b/gfx/angle/src/libGLESv2/entry_points_egl_ext.h @@ -79,13 +79,6 @@ ANGLE_EXPORT EGLBoolean EGLAPIENTRY StreamPostD3DTextureNV12ANGLE(EGLDisplay dpy EGLStreamKHR stream, void *texture, const EGLAttrib *attrib_list); - -// EGL_EXT_swap_buffers_with_damage -ANGLE_EXPORT EGLBoolean SwapBuffersWithDamageEXT(EGLDisplay dpy, - EGLSurface surface, - EGLint *rects, - EGLint n_rects); - } // namespace egl #endif // LIBGLESV2_ENTRYPOINTSEGLEXT_H_ diff --git a/gfx/angle/src/libGLESv2/entry_points_gles_2_0.cpp b/gfx/angle/src/libGLESv2/entry_points_gles_2_0.cpp index ca6129800..c3e9ad875 100755 --- a/gfx/angle/src/libGLESv2/entry_points_gles_2_0.cpp +++ b/gfx/angle/src/libGLESv2/entry_points_gles_2_0.cpp @@ -28,7 +28,6 @@ #include "libANGLE/validationES2.h" #include "libANGLE/validationES3.h" #include "libANGLE/queryconversions.h" -#include "libANGLE/queryutils.h" #include "common/debug.h" #include "common/utilities.h" @@ -44,8 +43,9 @@ void GL_APIENTRY ActiveTexture(GLenum texture) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && !ValidateActiveTexture(context, texture)) + if (texture < GL_TEXTURE0 || texture > GL_TEXTURE0 + context->getCaps().maxCombinedTextureImageUnits - 1) { + context->handleError(Error(GL_INVALID_ENUM)); return; } @@ -60,12 +60,23 @@ void GL_APIENTRY AttachShader(GLuint program, GLuint shader) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && !ValidateAttachShader(context, program, shader)) + Program *programObject = GetValidProgram(context, program); + if (!programObject) + { + return; + } + + Shader *shaderObject = GetValidShader(context, shader); + if (!shaderObject) { return; } - context->attachShader(program, shader); + if (!programObject->attachShader(shaderObject)) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } } } @@ -76,13 +87,26 @@ void GL_APIENTRY BindAttribLocation(GLuint program, GLuint index, const GLchar* Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateBindAttribLocation(context, program, index, name)) + if (index >= MAX_VERTEX_ATTRIBS) + { + context->handleError(Error(GL_INVALID_VALUE)); + return; + } + + Program *programObject = GetValidProgram(context, program); + + if (!programObject) + { + return; + } + + if (strncmp(name, "gl_", 3) == 0) { + context->handleError(Error(GL_INVALID_OPERATION)); return; } - context->bindAttribLocation(program, index, name); + programObject->bindAttributeLocation(index, name); } } @@ -93,12 +117,43 @@ void GL_APIENTRY BindBuffer(GLenum target, GLuint buffer) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && !ValidateBindBuffer(context, target, buffer)) + if (!ValidBufferTarget(context, target)) { + context->handleError(Error(GL_INVALID_ENUM)); return; } - context->bindBuffer(target, buffer); + switch (target) + { + case GL_ARRAY_BUFFER: + context->bindArrayBuffer(buffer); + return; + case GL_ELEMENT_ARRAY_BUFFER: + context->bindElementArrayBuffer(buffer); + return; + case GL_COPY_READ_BUFFER: + context->bindCopyReadBuffer(buffer); + return; + case GL_COPY_WRITE_BUFFER: + context->bindCopyWriteBuffer(buffer); + return; + case GL_PIXEL_PACK_BUFFER: + context->bindPixelPackBuffer(buffer); + return; + case GL_PIXEL_UNPACK_BUFFER: + context->bindPixelUnpackBuffer(buffer); + return; + case GL_UNIFORM_BUFFER: + context->bindGenericUniformBuffer(buffer); + return; + case GL_TRANSFORM_FEEDBACK_BUFFER: + context->bindGenericTransformFeedbackBuffer(buffer); + return; + + default: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } } } @@ -109,12 +164,21 @@ void GL_APIENTRY BindFramebuffer(GLenum target, GLuint framebuffer) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && !ValidateBindFramebuffer(context, target, framebuffer)) + if (!ValidFramebufferTarget(target)) { + context->handleError(Error(GL_INVALID_ENUM)); return; } - context->bindFramebuffer(target, framebuffer); + if (target == GL_READ_FRAMEBUFFER_ANGLE || target == GL_FRAMEBUFFER) + { + context->bindReadFramebuffer(framebuffer); + } + + if (target == GL_DRAW_FRAMEBUFFER_ANGLE || target == GL_FRAMEBUFFER) + { + context->bindDrawFramebuffer(framebuffer); + } } } @@ -125,12 +189,13 @@ void GL_APIENTRY BindRenderbuffer(GLenum target, GLuint renderbuffer) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && !ValidateBindRenderbuffer(context, target, renderbuffer)) + if (target != GL_RENDERBUFFER) { + context->handleError(Error(GL_INVALID_ENUM)); return; } - context->bindRenderbuffer(target, renderbuffer); + context->bindRenderbuffer(renderbuffer); } } @@ -141,7 +206,7 @@ void GL_APIENTRY BindTexture(GLenum target, GLuint texture) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && !ValidateBindTexture(context, target, texture)) + if (!ValidateBindTexture(context, target, texture)) { return; } @@ -164,18 +229,7 @@ void GL_APIENTRY BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclamp void GL_APIENTRY BlendEquation(GLenum mode) { - EVENT("(GLenum mode = 0x%X)", mode); - - Context *context = GetValidGlobalContext(); - if (context) - { - if (!context->skipValidation() && !ValidateBlendEquation(context, mode)) - { - return; - } - - context->blendEquation(mode); - } + BlendEquationSeparate(mode, mode); } void GL_APIENTRY BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) @@ -185,9 +239,31 @@ void GL_APIENTRY BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateBlendEquationSeparate(context, modeRGB, modeAlpha)) + switch (modeRGB) + { + case GL_FUNC_ADD: + case GL_FUNC_SUBTRACT: + case GL_FUNC_REVERSE_SUBTRACT: + case GL_MIN: + case GL_MAX: + break; + + default: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + switch (modeAlpha) { + case GL_FUNC_ADD: + case GL_FUNC_SUBTRACT: + case GL_FUNC_REVERSE_SUBTRACT: + case GL_MIN: + case GL_MAX: + break; + + default: + context->handleError(Error(GL_INVALID_ENUM)); return; } @@ -197,18 +273,7 @@ void GL_APIENTRY BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) void GL_APIENTRY BlendFunc(GLenum sfactor, GLenum dfactor) { - EVENT("(GLenum sfactor = 0x%X, GLenum dfactor = 0x%X)", sfactor, dfactor); - - Context *context = GetValidGlobalContext(); - if (context) - { - if (!context->skipValidation() && !ValidateBlendFunc(context, sfactor, dfactor)) - { - return; - } - - context->blendFunc(sfactor, dfactor); - } + BlendFuncSeparate(sfactor, dfactor, sfactor, dfactor); } void GL_APIENTRY BlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) @@ -219,10 +284,135 @@ void GL_APIENTRY BlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateBlendFuncSeparate(context, srcRGB, dstRGB, srcAlpha, dstAlpha)) + switch (srcRGB) { - return; + case GL_ZERO: + case GL_ONE: + case GL_SRC_COLOR: + case GL_ONE_MINUS_SRC_COLOR: + case GL_DST_COLOR: + case GL_ONE_MINUS_DST_COLOR: + case GL_SRC_ALPHA: + case GL_ONE_MINUS_SRC_ALPHA: + case GL_DST_ALPHA: + case GL_ONE_MINUS_DST_ALPHA: + case GL_CONSTANT_COLOR: + case GL_ONE_MINUS_CONSTANT_COLOR: + case GL_CONSTANT_ALPHA: + case GL_ONE_MINUS_CONSTANT_ALPHA: + case GL_SRC_ALPHA_SATURATE: + break; + + default: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + switch (dstRGB) + { + case GL_ZERO: + case GL_ONE: + case GL_SRC_COLOR: + case GL_ONE_MINUS_SRC_COLOR: + case GL_DST_COLOR: + case GL_ONE_MINUS_DST_COLOR: + case GL_SRC_ALPHA: + case GL_ONE_MINUS_SRC_ALPHA: + case GL_DST_ALPHA: + case GL_ONE_MINUS_DST_ALPHA: + case GL_CONSTANT_COLOR: + case GL_ONE_MINUS_CONSTANT_COLOR: + case GL_CONSTANT_ALPHA: + case GL_ONE_MINUS_CONSTANT_ALPHA: + break; + + case GL_SRC_ALPHA_SATURATE: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + break; + + default: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + switch (srcAlpha) + { + case GL_ZERO: + case GL_ONE: + case GL_SRC_COLOR: + case GL_ONE_MINUS_SRC_COLOR: + case GL_DST_COLOR: + case GL_ONE_MINUS_DST_COLOR: + case GL_SRC_ALPHA: + case GL_ONE_MINUS_SRC_ALPHA: + case GL_DST_ALPHA: + case GL_ONE_MINUS_DST_ALPHA: + case GL_CONSTANT_COLOR: + case GL_ONE_MINUS_CONSTANT_COLOR: + case GL_CONSTANT_ALPHA: + case GL_ONE_MINUS_CONSTANT_ALPHA: + case GL_SRC_ALPHA_SATURATE: + break; + + default: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + switch (dstAlpha) + { + case GL_ZERO: + case GL_ONE: + case GL_SRC_COLOR: + case GL_ONE_MINUS_SRC_COLOR: + case GL_DST_COLOR: + case GL_ONE_MINUS_DST_COLOR: + case GL_SRC_ALPHA: + case GL_ONE_MINUS_SRC_ALPHA: + case GL_DST_ALPHA: + case GL_ONE_MINUS_DST_ALPHA: + case GL_CONSTANT_COLOR: + case GL_ONE_MINUS_CONSTANT_COLOR: + case GL_CONSTANT_ALPHA: + case GL_ONE_MINUS_CONSTANT_ALPHA: + break; + + case GL_SRC_ALPHA_SATURATE: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + break; + + default: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + if (context->getLimitations().noSimultaneousConstantColorAndAlphaBlendFunc) + { + bool constantColorUsed = + (srcRGB == GL_CONSTANT_COLOR || srcRGB == GL_ONE_MINUS_CONSTANT_COLOR || + dstRGB == GL_CONSTANT_COLOR || dstRGB == GL_ONE_MINUS_CONSTANT_COLOR); + + bool constantAlphaUsed = + (srcRGB == GL_CONSTANT_ALPHA || srcRGB == GL_ONE_MINUS_CONSTANT_ALPHA || + dstRGB == GL_CONSTANT_ALPHA || dstRGB == GL_ONE_MINUS_CONSTANT_ALPHA); + + if (constantColorUsed && constantAlphaUsed) + { + ERR( + "Simultaneous use of GL_CONSTANT_ALPHA/GL_ONE_MINUS_CONSTANT_ALPHA and " + "GL_CONSTANT_COLOR/GL_ONE_MINUS_CONSTANT_COLOR not supported by this " + "implementation."); + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } } context->blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); @@ -237,12 +427,57 @@ void GL_APIENTRY BufferData(GLenum target, GLsizeiptr size, const GLvoid* data, Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && !ValidateBufferData(context, target, size, data, usage)) + if (size < 0) + { + context->handleError(Error(GL_INVALID_VALUE)); + return; + } + + switch (usage) + { + case GL_STREAM_DRAW: + case GL_STATIC_DRAW: + case GL_DYNAMIC_DRAW: + break; + + case GL_STREAM_READ: + case GL_STREAM_COPY: + case GL_STATIC_READ: + case GL_STATIC_COPY: + case GL_DYNAMIC_READ: + case GL_DYNAMIC_COPY: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + break; + + default: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + if (!ValidBufferTarget(context, target)) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + Buffer *buffer = context->getGLState().getTargetBuffer(target); + + if (!buffer) { + context->handleError(Error(GL_INVALID_OPERATION)); return; } - context->bufferData(target, size, data, usage); + Error error = buffer->bufferData(data, size, usage); + if (error.isError()) + { + context->handleError(error); + return; + } } } @@ -254,13 +489,58 @@ void GL_APIENTRY BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateBufferSubData(context, target, offset, size, data)) + if (size < 0 || offset < 0) + { + context->handleError(Error(GL_INVALID_VALUE)); + return; + } + + if (!ValidBufferTarget(context, target)) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + Buffer *buffer = context->getGLState().getTargetBuffer(target); + + if (!buffer) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + + if (buffer->isMapped()) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + + // Check for possible overflow of size + offset + angle::CheckedNumeric checkedSize(size); + checkedSize += offset; + if (!checkedSize.IsValid()) + { + context->handleError(Error(GL_OUT_OF_MEMORY)); + return; + } + + if (size + offset > buffer->getSize()) + { + context->handleError(Error(GL_INVALID_VALUE)); + return; + } + + if (data == NULL) { return; } - context->bufferSubData(target, offset, size, data); + Error error = buffer->bufferSubData(data, size, offset); + if (error.isError()) + { + context->handleError(error); + return; + } } } @@ -360,7 +640,7 @@ void GL_APIENTRY CompileShader(GLuint shader) { return; } - shaderObject->compile(context); + shaderObject->compile(context->getCompiler()); } } @@ -727,8 +1007,9 @@ void GL_APIENTRY Disable(GLenum cap) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && !ValidateDisable(context, cap)) + if (!ValidCap(context, cap)) { + context->handleError(Error(GL_INVALID_ENUM)); return; } @@ -760,7 +1041,7 @@ void GL_APIENTRY DrawArrays(GLenum mode, GLint first, GLsizei count) Context *context = GetValidGlobalContext(); if (context) { - if (!ValidateDrawArrays(context, mode, first, count, 1)) + if (!ValidateDrawArrays(context, mode, first, count, 0)) { return; } @@ -783,7 +1064,7 @@ void GL_APIENTRY DrawElements(GLenum mode, GLsizei count, GLenum type, const GLv if (context) { IndexRange indexRange; - if (!ValidateDrawElements(context, mode, count, type, indices, 1, &indexRange)) + if (!ValidateDrawElements(context, mode, count, type, indices, 0, &indexRange)) { return; } @@ -804,11 +1085,26 @@ void GL_APIENTRY Enable(GLenum cap) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && !ValidateEnable(context, cap)) + if (!ValidCap(context, cap)) { + context->handleError(Error(GL_INVALID_ENUM)); return; } + if (context->getLimitations().noSampleAlphaToCoverageSupport) + { + if (cap == GL_SAMPLE_ALPHA_TO_COVERAGE) + { + const char *errorMessage = "Current renderer doesn't support alpha-to-coverage"; + context->handleError(Error(GL_INVALID_OPERATION, errorMessage)); + + // We also output an error message to the debugger window if tracing is active, so that developers can see the error message. + ERR("%s", errorMessage); + + return; + } + } + context->enable(cap); } } @@ -1160,14 +1456,53 @@ void GL_APIENTRY GetBufferParameteriv(GLenum target, GLenum pname, GLint* params Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateGetBufferParameteriv(context, target, pname, params)) + if (!ValidBufferTarget(context, target)) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + if (!ValidBufferParameter(context, pname)) { + context->handleError(Error(GL_INVALID_ENUM)); return; } Buffer *buffer = context->getGLState().getTargetBuffer(target); - QueryBufferParameteriv(buffer, pname, params); + + if (!buffer) + { + // A null buffer means that "0" is bound to the requested buffer target + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + + switch (pname) + { + case GL_BUFFER_USAGE: + *params = static_cast(buffer->getUsage()); + break; + case GL_BUFFER_SIZE: + *params = clampCast(buffer->getSize()); + break; + case GL_BUFFER_ACCESS_FLAGS: + *params = buffer->getAccessFlags(); + break; + case GL_BUFFER_ACCESS_OES: + *params = buffer->getAccess(); + break; + case GL_BUFFER_MAPPED: + static_assert(GL_BUFFER_MAPPED == GL_BUFFER_MAPPED_OES, "GL enums should be equal."); + *params = static_cast(buffer->isMapped()); + break; + case GL_BUFFER_MAP_OFFSET: + *params = clampCast(buffer->getMapOffset()); + break; + case GL_BUFFER_MAP_LENGTH: + *params = clampCast(buffer->getMapLength()); + break; + default: UNREACHABLE(); break; + } } } @@ -1218,37 +1553,280 @@ void GL_APIENTRY GetFramebufferAttachmentParameteriv(GLenum target, GLenum attac Context *context = GetValidGlobalContext(); if (context) { - GLsizei numParams = 0; - if (!context->skipValidation() && - !ValidateGetFramebufferAttachmentParameteriv(context, target, attachment, pname, - &numParams)) + if (!ValidFramebufferTarget(target)) { + context->handleError(Error(GL_INVALID_ENUM)); return; } - const Framebuffer *framebuffer = context->getGLState().getTargetFramebuffer(target); - QueryFramebufferAttachmentParameteriv(framebuffer, attachment, pname, params); - } -} - -void GL_APIENTRY GetIntegerv(GLenum pname, GLint* params) -{ - EVENT("(GLenum pname = 0x%X, GLint* params = 0x%0.8p)", pname, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLenum nativeType; - unsigned int numParams = 0; + int clientVersion = context->getClientMajorVersion(); - if (!ValidateStateQuery(context, pname, &nativeType, &numParams)) + switch (pname) { - return; - } + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: + break; - if (nativeType == GL_INT) - { - context->getIntegerv(pname, params); + case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: + if (clientVersion < 3 && !context->getExtensions().sRGB) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + break; + + case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE: + case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: + case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: + case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: + case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: + case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: + case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: + if (clientVersion < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + break; + + default: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + // Determine if the attachment is a valid enum + switch (attachment) + { + case GL_BACK: + case GL_FRONT: + case GL_DEPTH: + case GL_STENCIL: + case GL_DEPTH_STENCIL_ATTACHMENT: + if (clientVersion < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + break; + + case GL_DEPTH_ATTACHMENT: + case GL_STENCIL_ATTACHMENT: + break; + + default: + if (attachment < GL_COLOR_ATTACHMENT0_EXT || + (attachment - GL_COLOR_ATTACHMENT0_EXT) >= context->getCaps().maxColorAttachments) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + break; + } + + const Framebuffer *framebuffer = context->getGLState().getTargetFramebuffer(target); + ASSERT(framebuffer); + + if (framebuffer->id() == 0) + { + if (clientVersion < 3) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + + switch (attachment) + { + case GL_BACK: + case GL_DEPTH: + case GL_STENCIL: + break; + + default: + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + } + else + { + if (attachment >= GL_COLOR_ATTACHMENT0_EXT && attachment <= GL_COLOR_ATTACHMENT15_EXT) + { + // Valid attachment query + } + else + { + switch (attachment) + { + case GL_DEPTH_ATTACHMENT: + case GL_STENCIL_ATTACHMENT: + break; + + case GL_DEPTH_STENCIL_ATTACHMENT: + if (!framebuffer->hasValidDepthStencil()) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + break; + + default: + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + } + } + + const FramebufferAttachment *attachmentObject = framebuffer->getAttachment(attachment); + if (attachmentObject) + { + ASSERT(attachmentObject->type() == GL_RENDERBUFFER || + attachmentObject->type() == GL_TEXTURE || + attachmentObject->type() == GL_FRAMEBUFFER_DEFAULT); + + switch (pname) + { + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: + *params = attachmentObject->type(); + break; + + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: + if (attachmentObject->type() != GL_RENDERBUFFER && attachmentObject->type() != GL_TEXTURE) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = attachmentObject->id(); + break; + + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: + if (attachmentObject->type() != GL_TEXTURE) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = attachmentObject->mipLevel(); + break; + + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: + if (attachmentObject->type() != GL_TEXTURE) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = attachmentObject->cubeMapFace(); + break; + + case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE: + *params = attachmentObject->getRedSize(); + break; + + case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: + *params = attachmentObject->getGreenSize(); + break; + + case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: + *params = attachmentObject->getBlueSize(); + break; + + case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: + *params = attachmentObject->getAlphaSize(); + break; + + case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: + *params = attachmentObject->getDepthSize(); + break; + + case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: + *params = attachmentObject->getStencilSize(); + break; + + case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: + if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + *params = attachmentObject->getComponentType(); + break; + + case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: + *params = attachmentObject->getColorEncoding(); + break; + + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: + if (attachmentObject->type() != GL_TEXTURE) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = attachmentObject->layer(); + break; + + default: + UNREACHABLE(); + break; + } + } + else + { + // ES 2.0.25 spec pg 127 states that if the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE + // is NONE, then querying any other pname will generate INVALID_ENUM. + + // ES 3.0.2 spec pg 235 states that if the attachment type is none, + // GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME will return zero and be an + // INVALID_OPERATION for all other pnames + + switch (pname) + { + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: + *params = GL_NONE; + break; + + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: + if (clientVersion < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = 0; + break; + + default: + if (clientVersion < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + else + { + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + } + } + } +} + +void GL_APIENTRY GetIntegerv(GLenum pname, GLint* params) +{ + EVENT("(GLenum pname = 0x%X, GLint* params = 0x%0.8p)", pname, params); + + Context *context = GetValidGlobalContext(); + if (context) + { + GLenum nativeType; + unsigned int numParams = 0; + + if (!ValidateStateQuery(context, pname, &nativeType, &numParams)) + { + return; + } + + if (nativeType == GL_INT) + { + context->getIntegerv(pname, params); } else { @@ -1264,15 +1842,83 @@ void GL_APIENTRY GetProgramiv(GLuint program, GLenum pname, GLint* params) Context *context = GetValidGlobalContext(); if (context) { - GLsizei numParams = 0; - if (!context->skipValidation() && - !ValidateGetProgramiv(context, program, pname, &numParams)) + Program *programObject = GetValidProgram(context, program); + + if (!programObject) { return; } - Program *programObject = context->getProgram(program); - QueryProgramiv(programObject, pname, params); + if (context->getClientMajorVersion() < 3) + { + switch (pname) + { + case GL_ACTIVE_UNIFORM_BLOCKS: + case GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH: + case GL_TRANSFORM_FEEDBACK_BUFFER_MODE: + case GL_TRANSFORM_FEEDBACK_VARYINGS: + case GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH: + case GL_PROGRAM_BINARY_RETRIEVABLE_HINT: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + } + + switch (pname) + { + case GL_DELETE_STATUS: + *params = programObject->isFlaggedForDeletion(); + return; + case GL_LINK_STATUS: + *params = programObject->isLinked(); + return; + case GL_VALIDATE_STATUS: + *params = programObject->isValidated(); + return; + case GL_INFO_LOG_LENGTH: + *params = programObject->getInfoLogLength(); + return; + case GL_ATTACHED_SHADERS: + *params = programObject->getAttachedShadersCount(); + return; + case GL_ACTIVE_ATTRIBUTES: + *params = programObject->getActiveAttributeCount(); + return; + case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: + *params = programObject->getActiveAttributeMaxLength(); + return; + case GL_ACTIVE_UNIFORMS: + *params = programObject->getActiveUniformCount(); + return; + case GL_ACTIVE_UNIFORM_MAX_LENGTH: + *params = programObject->getActiveUniformMaxLength(); + return; + case GL_PROGRAM_BINARY_LENGTH_OES: + *params = programObject->getBinaryLength(); + return; + case GL_ACTIVE_UNIFORM_BLOCKS: + *params = programObject->getActiveUniformBlockCount(); + return; + case GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH: + *params = programObject->getActiveUniformBlockMaxLength(); + break; + case GL_TRANSFORM_FEEDBACK_BUFFER_MODE: + *params = programObject->getTransformFeedbackBufferMode(); + break; + case GL_TRANSFORM_FEEDBACK_VARYINGS: + *params = programObject->getTransformFeedbackVaryingCount(); + break; + case GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH: + *params = programObject->getTransformFeedbackVaryingMaxLength(); + break; + case GL_PROGRAM_BINARY_RETRIEVABLE_HINT: + *params = programObject->getBinaryRetrievableHint(); + break; + + default: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } } } @@ -1307,14 +1953,64 @@ void GL_APIENTRY GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateGetRenderbufferParameteriv(context, target, pname, params)) + if (target != GL_RENDERBUFFER) { + context->handleError(Error(GL_INVALID_ENUM)); return; } - Renderbuffer *renderbuffer = context->getGLState().getCurrentRenderbuffer(); - QueryRenderbufferiv(renderbuffer, pname, params); + if (context->getGLState().getRenderbufferId() == 0) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + + Renderbuffer *renderbuffer = + context->getRenderbuffer(context->getGLState().getRenderbufferId()); + + switch (pname) + { + case GL_RENDERBUFFER_WIDTH: + *params = renderbuffer->getWidth(); + break; + case GL_RENDERBUFFER_HEIGHT: + *params = renderbuffer->getHeight(); + break; + case GL_RENDERBUFFER_INTERNAL_FORMAT: + *params = renderbuffer->getFormat().info->internalFormat; + break; + case GL_RENDERBUFFER_RED_SIZE: + *params = renderbuffer->getRedSize(); + break; + case GL_RENDERBUFFER_GREEN_SIZE: + *params = renderbuffer->getGreenSize(); + break; + case GL_RENDERBUFFER_BLUE_SIZE: + *params = renderbuffer->getBlueSize(); + break; + case GL_RENDERBUFFER_ALPHA_SIZE: + *params = renderbuffer->getAlphaSize(); + break; + case GL_RENDERBUFFER_DEPTH_SIZE: + *params = renderbuffer->getDepthSize(); + break; + case GL_RENDERBUFFER_STENCIL_SIZE: + *params = renderbuffer->getStencilSize(); + break; + + case GL_RENDERBUFFER_SAMPLES_ANGLE: + if (!context->getExtensions().framebufferMultisample) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = renderbuffer->getSamples(); + break; + + default: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } } } @@ -1325,13 +2021,37 @@ void GL_APIENTRY GetShaderiv(GLuint shader, GLenum pname, GLint* params) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && !ValidateGetShaderiv(context, shader, pname, params)) + Shader *shaderObject = GetValidShader(context, shader); + if (!shaderObject) { return; } - Shader *shaderObject = context->getShader(shader); - QueryShaderiv(shaderObject, pname, params); + switch (pname) + { + case GL_SHADER_TYPE: + *params = shaderObject->getType(); + return; + case GL_DELETE_STATUS: + *params = shaderObject->isFlaggedForDeletion(); + return; + case GL_COMPILE_STATUS: + *params = shaderObject->isCompiled() ? GL_TRUE : GL_FALSE; + return; + case GL_INFO_LOG_LENGTH: + *params = shaderObject->getInfoLogLength(); + return; + case GL_SHADER_SOURCE_LENGTH: + *params = shaderObject->getSourceLength(); + return; + case GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE: + *params = shaderObject->getTranslatedSourceWithDebugInfoLength(); + return; + + default: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } } } @@ -1471,7 +2191,7 @@ const GLubyte *GL_APIENTRY GetString(GLenum name) return reinterpret_cast("Google Inc."); case GL_RENDERER: - return reinterpret_cast(context->getRendererString()); + return reinterpret_cast(context->getRendererString().c_str()); case GL_VERSION: if (context->getClientMajorVersion() == 2) @@ -1498,7 +2218,7 @@ const GLubyte *GL_APIENTRY GetString(GLenum name) } case GL_EXTENSIONS: - return reinterpret_cast(context->getExtensionString()); + return reinterpret_cast(context->getExtensionString().c_str()); default: context->handleError(Error(GL_INVALID_ENUM)); @@ -1516,14 +2236,153 @@ void GL_APIENTRY GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateGetTexParameterfv(context, target, pname, params)) + if (!ValidTextureTarget(context, target) && !ValidTextureExternalTarget(context, target)) { + context->handleError(Error(GL_INVALID_ENUM, "Invalid texture target")); return; } Texture *texture = context->getTargetTexture(target); - QueryTexParameterfv(texture, pname, params); + + if (!texture) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + switch (pname) + { + case GL_TEXTURE_MAG_FILTER: + *params = (GLfloat)texture->getMagFilter(); + break; + case GL_TEXTURE_MIN_FILTER: + *params = (GLfloat)texture->getMinFilter(); + break; + case GL_TEXTURE_WRAP_S: + *params = (GLfloat)texture->getWrapS(); + break; + case GL_TEXTURE_WRAP_T: + *params = (GLfloat)texture->getWrapT(); + break; + case GL_TEXTURE_WRAP_R: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = (GLfloat)texture->getWrapR(); + break; + case GL_TEXTURE_IMMUTABLE_FORMAT: + // Exposed to ES2.0 through EXT_texture_storage, no client version validation. + *params = (GLfloat)(texture->getImmutableFormat() ? GL_TRUE : GL_FALSE); + break; + case GL_TEXTURE_IMMUTABLE_LEVELS: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = (GLfloat)texture->getImmutableLevels(); + break; + case GL_TEXTURE_USAGE_ANGLE: + *params = (GLfloat)texture->getUsage(); + break; + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + if (!context->getExtensions().textureFilterAnisotropic) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = (GLfloat)texture->getMaxAnisotropy(); + break; + case GL_TEXTURE_SWIZZLE_R: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = (GLfloat)texture->getSwizzleRed(); + break; + case GL_TEXTURE_SWIZZLE_G: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = (GLfloat)texture->getSwizzleGreen(); + break; + case GL_TEXTURE_SWIZZLE_B: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = (GLfloat)texture->getSwizzleBlue(); + break; + case GL_TEXTURE_SWIZZLE_A: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = (GLfloat)texture->getSwizzleAlpha(); + break; + case GL_TEXTURE_BASE_LEVEL: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = (GLfloat)texture->getBaseLevel(); + break; + case GL_TEXTURE_MAX_LEVEL: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = (GLfloat)texture->getMaxLevel(); + break; + case GL_TEXTURE_MIN_LOD: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = texture->getSamplerState().minLod; + break; + case GL_TEXTURE_MAX_LOD: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = texture->getSamplerState().maxLod; + break; + case GL_TEXTURE_COMPARE_MODE: + if (context->getClientMajorVersion() < 3) + { + context->handleError( + Error(GL_INVALID_ENUM, + "GL_TEXTURE_COMPARE_MODE not available in ES versions < 3.0")); + return; + } + *params = static_cast(texture->getCompareMode()); + break; + case GL_TEXTURE_COMPARE_FUNC: + if (context->getClientMajorVersion() < 3) + { + context->handleError( + Error(GL_INVALID_ENUM, + "GL_TEXTURE_COMPARE_FUNC not available in ES versions < 3.0")); + return; + } + *params = static_cast(texture->getCompareFunc()); + break; + default: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } } } @@ -1534,14 +2393,153 @@ void GL_APIENTRY GetTexParameteriv(GLenum target, GLenum pname, GLint* params) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateGetTexParameteriv(context, target, pname, params)) + if (!ValidTextureTarget(context, target) && !ValidTextureExternalTarget(context, target)) { + context->handleError(Error(GL_INVALID_ENUM, "Invalid texture target")); return; } Texture *texture = context->getTargetTexture(target); - QueryTexParameteriv(texture, pname, params); + + if (!texture) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + switch (pname) + { + case GL_TEXTURE_MAG_FILTER: + *params = texture->getSamplerState().magFilter; + break; + case GL_TEXTURE_MIN_FILTER: + *params = texture->getSamplerState().minFilter; + break; + case GL_TEXTURE_WRAP_S: + *params = texture->getSamplerState().wrapS; + break; + case GL_TEXTURE_WRAP_T: + *params = texture->getSamplerState().wrapT; + break; + case GL_TEXTURE_WRAP_R: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = texture->getSamplerState().wrapR; + break; + case GL_TEXTURE_IMMUTABLE_FORMAT: + // Exposed to ES2.0 through EXT_texture_storage, no client version validation. + *params = texture->getImmutableFormat() ? GL_TRUE : GL_FALSE; + break; + case GL_TEXTURE_IMMUTABLE_LEVELS: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = static_cast(texture->getImmutableLevels()); + break; + case GL_TEXTURE_USAGE_ANGLE: + *params = texture->getUsage(); + break; + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + if (!context->getExtensions().textureFilterAnisotropic) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = (GLint)texture->getMaxAnisotropy(); + break; + case GL_TEXTURE_SWIZZLE_R: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = texture->getSwizzleRed(); + break; + case GL_TEXTURE_SWIZZLE_G: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = texture->getSwizzleGreen(); + break; + case GL_TEXTURE_SWIZZLE_B: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = texture->getSwizzleBlue(); + break; + case GL_TEXTURE_SWIZZLE_A: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = texture->getSwizzleAlpha(); + break; + case GL_TEXTURE_BASE_LEVEL: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = texture->getBaseLevel(); + break; + case GL_TEXTURE_MAX_LEVEL: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = texture->getMaxLevel(); + break; + case GL_TEXTURE_MIN_LOD: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = iround(texture->getMinLod()); + break; + case GL_TEXTURE_MAX_LOD: + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + *params = iround(texture->getMaxLod()); + break; + case GL_TEXTURE_COMPARE_MODE: + if (context->getClientMajorVersion() < 3) + { + context->handleError( + Error(GL_INVALID_ENUM, + "GL_TEXTURE_COMPARE_MODE not available in ES versions < 3.0")); + return; + } + *params = texture->getCompareMode(); + break; + case GL_TEXTURE_COMPARE_FUNC: + if (context->getClientMajorVersion() < 3) + { + context->handleError( + Error(GL_INVALID_ENUM, + "GL_TEXTURE_COMPARE_FUNC not available in ES versions < 3.0")); + return; + } + *params = texture->getCompareFunc(); + break; + default: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } } } @@ -1621,16 +2619,32 @@ void GL_APIENTRY GetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && !ValidateGetVertexAttribfv(context, index, pname, params)) + if (index >= MAX_VERTEX_ATTRIBS) { + context->handleError(Error(GL_INVALID_VALUE)); return; } - const VertexAttribCurrentValueData ¤tValues = - context->getGLState().getVertexAttribCurrentValue(index); - const VertexAttribute &attrib = - context->getGLState().getVertexArray()->getVertexAttribute(index); - QueryVertexAttribfv(attrib, currentValues, pname, params); + if (!ValidateGetVertexAttribParameters(context, pname)) + { + return; + } + + if (pname == GL_CURRENT_VERTEX_ATTRIB) + { + const VertexAttribCurrentValueData ¤tValueData = + context->getGLState().getVertexAttribCurrentValue(index); + for (int i = 0; i < 4; ++i) + { + params[i] = currentValueData.FloatValues[i]; + } + } + else + { + const VertexAttribute &attribState = + context->getGLState().getVertexArray()->getVertexAttribute(index); + *params = QuerySingleVertexAttributeParameter(attribState, pname); + } } } @@ -1641,16 +2655,33 @@ void GL_APIENTRY GetVertexAttribiv(GLuint index, GLenum pname, GLint* params) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && !ValidateGetVertexAttribiv(context, index, pname, params)) + if (index >= MAX_VERTEX_ATTRIBS) { + context->handleError(Error(GL_INVALID_VALUE)); return; } - const VertexAttribCurrentValueData ¤tValues = - context->getGLState().getVertexAttribCurrentValue(index); - const VertexAttribute &attrib = - context->getGLState().getVertexArray()->getVertexAttribute(index); - QueryVertexAttribiv(attrib, currentValues, pname, params); + if (!ValidateGetVertexAttribParameters(context, pname)) + { + return; + } + + if (pname == GL_CURRENT_VERTEX_ATTRIB) + { + const VertexAttribCurrentValueData ¤tValueData = + context->getGLState().getVertexAttribCurrentValue(index); + for (int i = 0; i < 4; ++i) + { + float currentValue = currentValueData.FloatValues[i]; + params[i] = iround(currentValue); + } + } + else + { + const VertexAttribute &attribState = + context->getGLState().getVertexArray()->getVertexAttribute(index); + *params = QuerySingleVertexAttributeParameter(attribState, pname); + } } } @@ -1661,15 +2692,19 @@ void GL_APIENTRY GetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** po Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateGetVertexAttribPointerv(context, index, pname, pointer)) + if (index >= MAX_VERTEX_ATTRIBS) { + context->handleError(Error(GL_INVALID_VALUE)); return; } - const VertexAttribute &attrib = - context->getGLState().getVertexArray()->getVertexAttribute(index); - QueryVertexAttribPointerv(attrib, pname, pointer); + if (pname != GL_VERTEX_ATTRIB_ARRAY_POINTER) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + *pointer = const_cast(context->getGLState().getVertexAttribPointer(index)); } } @@ -1732,8 +2767,9 @@ GLboolean GL_APIENTRY IsEnabled(GLenum cap) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && !ValidateIsEnabled(context, cap)) + if (!ValidCap(context, cap)) { + context->handleError(Error(GL_INVALID_ENUM)); return GL_FALSE; } @@ -2288,34 +3324,56 @@ void GL_APIENTRY TexParameterf(GLenum target, GLenum pname, GLfloat param) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && !ValidateTexParameterf(context, target, pname, param)) + if (!ValidTextureTarget(context, target) && !ValidTextureExternalTarget(context, target)) { + context->handleError(Error(GL_INVALID_ENUM, "Invalid texture target")); return; } - Texture *texture = context->getTargetTexture(target); - SetTexParameterf(texture, pname, param); - } -} + if (!ValidateTexParamParameters(context, target, pname, static_cast(param))) + { + return; + } -void GL_APIENTRY TexParameterfv(GLenum target, GLenum pname, const GLfloat *params) -{ - EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, const GLfloat* params = 0x%0.8p)", target, - pname, params); + Texture *texture = context->getTargetTexture(target); - Context *context = GetValidGlobalContext(); - if (context) - { - if (!context->skipValidation() && !ValidateTexParameterfv(context, target, pname, params)) + if (!texture) { + context->handleError(Error(GL_INVALID_ENUM)); return; } - Texture *texture = context->getTargetTexture(target); - SetTexParameterfv(texture, pname, params); + // clang-format off + switch (pname) + { + case GL_TEXTURE_WRAP_S: texture->setWrapS(uiround(param)); break; + case GL_TEXTURE_WRAP_T: texture->setWrapT(uiround(param)); break; + case GL_TEXTURE_WRAP_R: texture->setWrapR(uiround(param)); break; + case GL_TEXTURE_MIN_FILTER: texture->setMinFilter(uiround(param)); break; + case GL_TEXTURE_MAG_FILTER: texture->setMagFilter(uiround(param)); break; + case GL_TEXTURE_USAGE_ANGLE: texture->setUsage(uiround(param)); break; + case GL_TEXTURE_MAX_ANISOTROPY_EXT: texture->setMaxAnisotropy(std::min(param, context->getExtensions().maxTextureAnisotropy)); break; + case GL_TEXTURE_COMPARE_MODE: texture->setCompareMode(uiround(param)); break; + case GL_TEXTURE_COMPARE_FUNC: texture->setCompareFunc(uiround(param)); break; + case GL_TEXTURE_SWIZZLE_R: texture->setSwizzleRed(uiround(param)); break; + case GL_TEXTURE_SWIZZLE_G: texture->setSwizzleGreen(uiround(param)); break; + case GL_TEXTURE_SWIZZLE_B: texture->setSwizzleBlue(uiround(param)); break; + case GL_TEXTURE_SWIZZLE_A: texture->setSwizzleAlpha(uiround(param)); break; + case GL_TEXTURE_BASE_LEVEL: texture->setBaseLevel(uiround(param)); break; + case GL_TEXTURE_MAX_LEVEL: texture->setMaxLevel(uiround(param)); break; + case GL_TEXTURE_MIN_LOD: texture->setMinLod(param); break; + case GL_TEXTURE_MAX_LOD: texture->setMaxLod(param); break; + default: UNREACHABLE(); break; + } + // clang-format on } } +void GL_APIENTRY TexParameterfv(GLenum target, GLenum pname, const GLfloat* params) +{ + TexParameterf(target, pname, (GLfloat)*params); +} + void GL_APIENTRY TexParameteri(GLenum target, GLenum pname, GLint param) { EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint param = %d)", target, pname, param); @@ -2323,34 +3381,56 @@ void GL_APIENTRY TexParameteri(GLenum target, GLenum pname, GLint param) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && !ValidateTexParameteri(context, target, pname, param)) + if (!ValidTextureTarget(context, target) && !ValidTextureExternalTarget(context, target)) { + context->handleError(Error(GL_INVALID_ENUM, "Invalid Texture target")); return; } - Texture *texture = context->getTargetTexture(target); - SetTexParameteri(texture, pname, param); - } -} + if (!ValidateTexParamParameters(context, target, pname, param)) + { + return; + } -void GL_APIENTRY TexParameteriv(GLenum target, GLenum pname, const GLint *params) -{ - EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, const GLint* params = 0x%0.8p)", target, - pname, params); + Texture *texture = context->getTargetTexture(target); - Context *context = GetValidGlobalContext(); - if (context) - { - if (!context->skipValidation() && !ValidateTexParameteriv(context, target, pname, params)) + if (!texture) { + context->handleError(Error(GL_INVALID_ENUM)); return; } - Texture *texture = context->getTargetTexture(target); - SetTexParameteriv(texture, pname, params); + // clang-format off + switch (pname) + { + case GL_TEXTURE_WRAP_S: texture->setWrapS(static_cast(param)); break; + case GL_TEXTURE_WRAP_T: texture->setWrapT(static_cast(param)); break; + case GL_TEXTURE_WRAP_R: texture->setWrapR(static_cast(param)); break; + case GL_TEXTURE_MIN_FILTER: texture->setMinFilter(static_cast(param)); break; + case GL_TEXTURE_MAG_FILTER: texture->setMagFilter(static_cast(param)); break; + case GL_TEXTURE_USAGE_ANGLE: texture->setUsage(static_cast(param)); break; + case GL_TEXTURE_MAX_ANISOTROPY_EXT: texture->setMaxAnisotropy(std::min(static_cast(param), context->getExtensions().maxTextureAnisotropy)); break; + case GL_TEXTURE_COMPARE_MODE: texture->setCompareMode(static_cast(param)); break; + case GL_TEXTURE_COMPARE_FUNC: texture->setCompareFunc(static_cast(param)); break; + case GL_TEXTURE_SWIZZLE_R: texture->setSwizzleRed(static_cast(param)); break; + case GL_TEXTURE_SWIZZLE_G: texture->setSwizzleGreen(static_cast(param)); break; + case GL_TEXTURE_SWIZZLE_B: texture->setSwizzleBlue(static_cast(param)); break; + case GL_TEXTURE_SWIZZLE_A: texture->setSwizzleAlpha(static_cast(param)); break; + case GL_TEXTURE_BASE_LEVEL: texture->setBaseLevel(static_cast(param)); break; + case GL_TEXTURE_MAX_LEVEL: texture->setMaxLevel(static_cast(param)); break; + case GL_TEXTURE_MIN_LOD: texture->setMinLod(static_cast(param)); break; + case GL_TEXTURE_MAX_LOD: texture->setMaxLod(static_cast(param)); break; + default: UNREACHABLE(); break; + } + // clang-format on } } +void GL_APIENTRY TexParameteriv(GLenum target, GLenum pname, const GLint* params) +{ + TexParameteri(target, pname, *params); +} + void GL_APIENTRY TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) { diff --git a/gfx/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp b/gfx/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp index bf96affdb..cfd64c8f5 100755 --- a/gfx/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp +++ b/gfx/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp @@ -16,15 +16,10 @@ #include "libANGLE/Framebuffer.h" #include "libANGLE/Shader.h" #include "libANGLE/Query.h" -#include "libANGLE/queryconversions.h" -#include "libANGLE/queryutils.h" -#include "libANGLE/Thread.h" -#include "libANGLE/VertexArray.h" #include "libANGLE/validationES.h" #include "libANGLE/validationES2.h" #include "libANGLE/validationES3.h" -#include "libANGLE/validationES31.h" #include "common/debug.h" #include "common/utilities.h" @@ -32,19 +27,6 @@ namespace gl { -namespace -{ - -void SetRobustLengthParam(GLsizei *length, GLsizei value) -{ - if (length) - { - *length = value; - } -} - -} // anonymous namespace - void GL_APIENTRY GenQueriesEXT(GLsizei n, GLuint *ids) { EVENT("(GLsizei n = %d, GLuint* ids = 0x%0.8p)", n, ids); @@ -188,7 +170,12 @@ void GL_APIENTRY GetQueryObjectivEXT(GLuint id, GLenum pname, GLint *params) return; } - context->getQueryObjectiv(id, pname, params); + Error error = context->getQueryObjectiv(id, pname, params); + if (error.isError()) + { + context->handleError(error); + return; + } } } @@ -204,7 +191,12 @@ void GL_APIENTRY GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params) return; } - context->getQueryObjectuiv(id, pname, params); + Error error = context->getQueryObjectuiv(id, pname, params); + if (error.isError()) + { + context->handleError(error); + return; + } } } @@ -220,7 +212,12 @@ void GL_APIENTRY GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 *params) return; } - context->getQueryObjecti64v(id, pname, params); + Error error = context->getQueryObjecti64v(id, pname, params); + if (error.isError()) + { + context->handleError(error); + return; + } } } @@ -236,7 +233,12 @@ void GL_APIENTRY GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 *param return; } - context->getQueryObjectui64v(id, pname, params); + Error error = context->getQueryObjectui64v(id, pname, params); + if (error.isError()) + { + context->handleError(error); + return; + } } } @@ -991,11 +993,10 @@ ANGLE_EXPORT void GL_APIENTRY EGLImageTargetTexture2DOES(GLenum target, GLeglIma { EVENT("(GLenum target = 0x%X, GLeglImageOES image = 0x%0.8p)", target, image); - egl::Thread *thread = egl::GetCurrentThread(); - Context *context = thread->getValidContext(); + Context *context = GetValidGlobalContext(); if (context) { - egl::Display *display = thread->getDisplay(); + egl::Display *display = egl::GetGlobalDisplay(); egl::Image *imageObject = reinterpret_cast(image); if (!ValidateEGLImageTargetTexture2DOES(context, display, target, imageObject)) { @@ -1017,11 +1018,10 @@ ANGLE_EXPORT void GL_APIENTRY EGLImageTargetRenderbufferStorageOES(GLenum target { EVENT("(GLenum target = 0x%X, GLeglImageOES image = 0x%0.8p)", target, image); - egl::Thread *thread = egl::GetCurrentThread(); - Context *context = thread->getValidContext(); + Context *context = GetValidGlobalContext(); if (context) { - egl::Display *display = thread->getDisplay(); + egl::Display *display = egl::GetGlobalDisplay(); egl::Image *imageObject = reinterpret_cast(image); if (!ValidateEGLImageTargetRenderbufferStorageOES(context, display, target, imageObject)) { @@ -1935,1442 +1935,4 @@ ANGLE_EXPORT void GL_APIENTRY CopySubTextureCHROMIUM(GLuint sourceId, } } -ANGLE_EXPORT void GL_APIENTRY CompressedCopyTextureCHROMIUM(GLuint sourceId, GLuint destId) -{ - EVENT("(GLuint sourceId = %u, GLuint destId = %u)", sourceId, destId); - - Context *context = GetValidGlobalContext(); - if (context) - { - if (!context->skipValidation() && - !ValidateCompressedCopyTextureCHROMIUM(context, sourceId, destId)) - { - return; - } - - context->compressedCopyTextureCHROMIUM(sourceId, destId); - } -} - -GL_APICALL GLboolean GL_APIENTRY EnableExtensionANGLE(const GLchar *name) -{ - EVENT("(const GLchar *name = %p)", name); - - Context *context = GetValidGlobalContext(); - if (context) - { - if (!context->skipValidation() && !ValidateEnableExtensionANGLE(context, name)) - { - return GL_FALSE; - } - - return context->enableExtension(name) ? GL_TRUE : GL_FALSE; - } - - return GL_FALSE; -} - -ANGLE_EXPORT void GL_APIENTRY GetBooleanvRobustANGLE(GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLboolean *params) -{ - EVENT( - "(GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, GLboolean* params " - "= 0x%0.8p)", - pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLenum nativeType; - unsigned int numParams = 0; - if (!ValidateRobustStateQuery(context, pname, bufSize, &nativeType, &numParams)) - { - return; - } - - if (nativeType == GL_BOOL) - { - context->getBooleanv(pname, params); - } - else - { - CastStateValues(context, nativeType, pname, numParams, params); - } - - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetBufferParameterivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", target, pname, - params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetBufferParameterivRobustANGLE(context, target, pname, bufSize, &numParams, - params)) - { - return; - } - - Buffer *buffer = context->getGLState().getTargetBuffer(target); - QueryBufferParameteriv(buffer, pname, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetFloatvRobustANGLE(GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLfloat *params) -{ - EVENT( - "(GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, GLfloat* params = " - "0x%0.8p)", - pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLenum nativeType; - unsigned int numParams = 0; - if (!ValidateRobustStateQuery(context, pname, bufSize, &nativeType, &numParams)) - { - return; - } - - if (nativeType == GL_FLOAT) - { - context->getFloatv(pname, params); - } - else - { - CastStateValues(context, nativeType, pname, numParams, params); - } - - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetFramebufferAttachmentParameterivRobustANGLE(GLenum target, - GLenum attachment, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLenum target = 0x%X, GLenum attachment = 0x%X, GLenum pname = 0x%X, GLsizei bufsize = " - "%d, GLsizei* length = 0x%0.8p, GLint* params = 0x%0.8p)", - target, attachment, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetFramebufferAttachmentParameterivRobustANGLE(context, target, attachment, - pname, bufSize, &numParams)) - { - return; - } - - const Framebuffer *framebuffer = context->getGLState().getTargetFramebuffer(target); - QueryFramebufferAttachmentParameteriv(framebuffer, attachment, pname, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetIntegervRobustANGLE(GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *data) -{ - EVENT( - "(GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, GLint* params = " - "0x%0.8p)", - pname, bufSize, length, data); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLenum nativeType; - unsigned int numParams = 0; - if (!ValidateRobustStateQuery(context, pname, bufSize, &nativeType, &numParams)) - { - return; - } - - if (nativeType == GL_INT) - { - context->getIntegerv(pname, data); - } - else - { - CastStateValues(context, nativeType, pname, numParams, data); - } - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetProgramivRobustANGLE(GLuint program, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLuint program = %d, GLenum pname = %d, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, " - "GLint* params = 0x%0.8p)", - program, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetProgramivRobustANGLE(context, program, pname, bufSize, &numParams)) - { - return; - } - - Program *programObject = context->getProgram(program); - QueryProgramiv(programObject, pname, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetRenderbufferParameterivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLenum target = 0x%X, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLint* params = 0x%0.8p)", - target, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetRenderbufferParameterivRobustANGLE(context, target, pname, bufSize, - &numParams, params)) - { - return; - } - - Renderbuffer *renderbuffer = context->getGLState().getCurrentRenderbuffer(); - QueryRenderbufferiv(renderbuffer, pname, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY -GetShaderivRobustANGLE(GLuint shader, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params) -{ - EVENT( - "(GLuint shader = %d, GLenum pname = %d, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, " - "GLint* params = 0x%0.8p)", - shader, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetShaderivRobustANGLE(context, shader, pname, bufSize, &numParams, params)) - { - return; - } - - Shader *shaderObject = context->getShader(shader); - QueryShaderiv(shaderObject, pname, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetTexParameterfvRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLfloat *params) -{ - EVENT( - "(GLenum target = 0x%X, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLfloat* params = 0x%0.8p)", - target, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetTexParameterfvRobustANGLE(context, target, pname, bufSize, &numParams, - params)) - { - return; - } - - Texture *texture = context->getTargetTexture(target); - QueryTexParameterfv(texture, pname, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetTexParameterivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLenum target = 0x%X, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLfloat* params = 0x%0.8p)", - target, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetTexParameterivRobustANGLE(context, target, pname, bufSize, &numParams, - params)) - { - return; - } - - Texture *texture = context->getTargetTexture(target); - QueryTexParameteriv(texture, pname, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetUniformfvRobustANGLE(GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLfloat *params) -{ - EVENT( - "(GLuint program = %d, GLint location = %d, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLfloat* params = 0x%0.8p)", - program, location, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei writeLength = 0; - if (!ValidateGetUniformfvRobustANGLE(context, program, location, bufSize, &writeLength, - params)) - { - return; - } - - Program *programObject = context->getProgram(program); - ASSERT(programObject); - - programObject->getUniformfv(location, params); - SetRobustLengthParam(length, writeLength); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetUniformivRobustANGLE(GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLuint program = %d, GLint location = %d, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLint* params = 0x%0.8p)", - program, location, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei writeLength = 0; - if (!ValidateGetUniformivRobustANGLE(context, program, location, bufSize, &writeLength, - params)) - { - return; - } - - Program *programObject = context->getProgram(program); - ASSERT(programObject); - - programObject->getUniformiv(location, params); - SetRobustLengthParam(length, writeLength); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetVertexAttribfvRobustANGLE(GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLfloat *params) -{ - EVENT( - "(GLuint index = %d, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, " - "GLfloat* params = 0x%0.8p)", - index, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei writeLength = 0; - if (!ValidateGetVertexAttribfvRobustANGLE(context, index, pname, bufSize, &writeLength, - params)) - { - return; - } - - const VertexAttribCurrentValueData ¤tValues = - context->getGLState().getVertexAttribCurrentValue(index); - const VertexAttribute &attrib = - context->getGLState().getVertexArray()->getVertexAttribute(index); - QueryVertexAttribfv(attrib, currentValues, pname, params); - SetRobustLengthParam(length, writeLength); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetVertexAttribivRobustANGLE(GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLuint index = %d, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, " - "GLint* params = 0x%0.8p)", - index, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei writeLength = 0; - if (!ValidateGetVertexAttribivRobustANGLE(context, index, pname, bufSize, &writeLength, - params)) - { - return; - } - - const VertexAttribCurrentValueData ¤tValues = - context->getGLState().getVertexAttribCurrentValue(index); - const VertexAttribute &attrib = - context->getGLState().getVertexArray()->getVertexAttribute(index); - QueryVertexAttribiv(attrib, currentValues, pname, params); - SetRobustLengthParam(length, writeLength); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetVertexAttribPointervRobustANGLE(GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - void **pointer) -{ - EVENT( - "(GLuint index = %d, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, " - "GLvoid** pointer = 0x%0.8p)", - index, pname, bufSize, length, pointer); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei writeLength = 0; - if (!ValidateGetVertexAttribPointervRobustANGLE(context, index, pname, bufSize, - &writeLength, pointer)) - { - return; - } - - const VertexAttribute &attrib = - context->getGLState().getVertexArray()->getVertexAttribute(index); - QueryVertexAttribPointerv(attrib, pname, pointer); - SetRobustLengthParam(length, writeLength); - } -} - -ANGLE_EXPORT void GL_APIENTRY ReadPixelsRobustANGLE(GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLsizei bufSize, - GLsizei *length, - void *pixels) -{ - EVENT( - "(GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d, " - "GLenum format = 0x%X, GLenum type = 0x%X, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLvoid* pixels = 0x%0.8p)", - x, y, width, height, format, type, bufSize, length, pixels); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei writeLength = 0; - if (!ValidateReadPixelsRobustANGLE(context, x, y, width, height, format, type, bufSize, - &writeLength, pixels)) - { - return; - } - - context->readPixels(x, y, width, height, format, type, pixels); - - SetRobustLengthParam(length, writeLength); - } -} - -ANGLE_EXPORT void GL_APIENTRY TexImage2DRobustANGLE(GLenum target, - GLint level, - GLint internalformat, - GLsizei width, - GLsizei height, - GLint border, - GLenum format, - GLenum type, - GLsizei bufSize, - const void *pixels) -{ - EVENT( - "(GLenum target = 0x%X, GLint level = %d, GLint internalformat = %d, GLsizei width = %d, " - "GLsizei height = %d, GLint border = %d, GLenum format = 0x%X, GLenum type = 0x%X, GLsizei " - "bufSize = %d, const GLvoid* pixels = 0x%0.8p)", - target, level, internalformat, width, height, border, format, type, bufSize, pixels); - - Context *context = GetValidGlobalContext(); - if (context) - { - if (!ValidateTexImage2DRobust(context, target, level, internalformat, width, height, border, - format, type, bufSize, pixels)) - { - return; - } - - context->texImage2D(target, level, internalformat, width, height, border, format, type, - pixels); - } -} - -ANGLE_EXPORT void GL_APIENTRY TexParameterfvRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - const GLfloat *params) -{ - EVENT( - "(GLenum target = 0x%X, GLenum pname = 0x%X, GLsizei bufsize = %d, GLfloat* params = " - "0x%0.8p)", - target, pname, bufSize, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - if (!ValidateTexParameterfvRobustANGLE(context, target, pname, bufSize, params)) - { - return; - } - - Texture *texture = context->getTargetTexture(target); - SetTexParameterfv(texture, pname, params); - } -} - -ANGLE_EXPORT void GL_APIENTRY TexParameterivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - const GLint *params) -{ - EVENT( - "(GLenum target = 0x%X, GLenum pname = 0x%X, GLsizei bufsize = %d, GLfloat* params = " - "0x%0.8p)", - target, pname, bufSize, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - if (!ValidateTexParameterivRobustANGLE(context, target, pname, bufSize, params)) - { - return; - } - - Texture *texture = context->getTargetTexture(target); - SetTexParameteriv(texture, pname, params); - } -} - -ANGLE_EXPORT void GL_APIENTRY TexSubImage2DRobustANGLE(GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLsizei bufSize, - const void *pixels) -{ - EVENT( - "(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, " - "GLsizei width = %d, GLsizei height = %d, GLenum format = 0x%X, GLenum type = 0x%X, " - "GLsizei bufsize = %d, const GLvoid* pixels = 0x%0.8p)", - target, level, xoffset, yoffset, width, height, format, type, bufSize, pixels); - - Context *context = GetValidGlobalContext(); - if (context) - { - if (!ValidateTexSubImage2DRobustANGLE(context, target, level, xoffset, yoffset, width, - height, format, type, bufSize, pixels)) - { - return; - } - - context->texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, - pixels); - } -} - -ANGLE_EXPORT void GL_APIENTRY TexImage3DRobustANGLE(GLenum target, - GLint level, - GLint internalformat, - GLsizei width, - GLsizei height, - GLsizei depth, - GLint border, - GLenum format, - GLenum type, - GLsizei bufSize, - const void *pixels) -{ - EVENT( - "(GLenum target = 0x%X, GLint level = %d, GLint internalformat = %d, GLsizei width = %d, " - "GLsizei height = %d, GLsizei depth = %d, GLint border = %d, GLenum format = 0x%X, " - "GLenum type = 0x%X, GLsizei bufsize = %d, const GLvoid* pixels = 0x%0.8p)", - target, level, internalformat, width, height, depth, border, format, type, bufSize, pixels); - - Context *context = GetValidGlobalContext(); - if (context) - { - if (!ValidateTexImage3DRobustANGLE(context, target, level, internalformat, width, height, - depth, border, format, type, bufSize, pixels)) - { - return; - } - - context->texImage3D(target, level, internalformat, width, height, depth, border, format, - type, pixels); - } -} - -ANGLE_EXPORT void GL_APIENTRY TexSubImage3DRobustANGLE(GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLint zoffset, - GLsizei width, - GLsizei height, - GLsizei depth, - GLenum format, - GLenum type, - GLsizei bufSize, - const void *pixels) -{ - EVENT( - "(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, " - "GLint zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, " - "GLenum format = 0x%X, GLenum type = 0x%X, GLsizei bufsize = %d, const GLvoid* pixels = " - "0x%0.8p)", - target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, bufSize, - pixels); - - Context *context = GetValidGlobalContext(); - if (context) - { - if (!ValidateTexSubImage3DRobustANGLE(context, target, level, xoffset, yoffset, zoffset, - width, height, depth, format, type, bufSize, pixels)) - { - return; - } - - context->texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, - format, type, pixels); - } -} - -ANGLE_EXPORT void GL_APIENTRY -GetQueryivRobustANGLE(GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params) -{ - EVENT( - "(GLenum target = 0x%X, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLint* params = 0x%0.8p)", - target, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetQueryivRobustANGLE(context, target, pname, bufSize, &numParams, params)) - { - return; - } - - context->getQueryiv(target, pname, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetQueryObjectuivRobustANGLE(GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint *params) -{ - EVENT( - "(GLuint id = %u, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, " - "GLint* params = 0x%0.8p)", - id, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetQueryObjectuivRobustANGLE(context, id, pname, bufSize, &numParams, params)) - { - return; - } - - context->getQueryObjectuiv(id, pname, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetBufferPointervRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - void **params) -{ - EVENT( - "(GLenum target = 0x%X, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLvoid** params = 0x%0.8p)", - target, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetBufferPointervRobustANGLE(context, target, pname, bufSize, &numParams, - params)) - { - return; - } - - context->getBufferPointerv(target, pname, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY -GetIntegeri_vRobustANGLE(GLenum target, GLuint index, GLsizei bufSize, GLsizei *length, GLint *data) -{ - EVENT( - "(GLenum target = 0x%X, GLuint index = %u, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLint* data = 0x%0.8p)", - target, index, bufSize, length, data); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetIntegeri_vRobustANGLE(context, target, index, bufSize, &numParams, data)) - { - return; - } - - context->getIntegeri_v(target, index, data); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetInternalformativRobustANGLE(GLenum target, - GLenum internalformat, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLenum target = 0x%X, GLenum internalformat = 0x%X, GLenum pname = 0x%X, GLsizei bufSize " - "= %d, GLsizei* length = 0x%0.8p, GLint* params = 0x%0.8p)", - target, internalformat, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetInternalFormativRobustANGLE(context, target, internalformat, pname, bufSize, - &numParams, params)) - { - return; - } - - const TextureCaps &formatCaps = context->getTextureCaps().get(internalformat); - QueryInternalFormativ(formatCaps, pname, bufSize, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetVertexAttribIivRobustANGLE(GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLuint index = %u, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, " - "GLint* params = 0x%0.8p)", - index, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei writeLength = 0; - if (!ValidateGetVertexAttribIivRobustANGLE(context, index, pname, bufSize, &writeLength, - params)) - { - return; - } - - const VertexAttribCurrentValueData ¤tValues = - context->getGLState().getVertexAttribCurrentValue(index); - const VertexAttribute &attrib = - context->getGLState().getVertexArray()->getVertexAttribute(index); - QueryVertexAttribIiv(attrib, currentValues, pname, params); - SetRobustLengthParam(length, writeLength); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetVertexAttribIuivRobustANGLE(GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint *params) -{ - EVENT( - "(GLuint index = %u, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, " - "GLuint* params = 0x%0.8p)", - index, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei writeLength = 0; - if (!ValidateGetVertexAttribIuivRobustANGLE(context, index, pname, bufSize, &writeLength, - params)) - { - return; - } - - const VertexAttribCurrentValueData ¤tValues = - context->getGLState().getVertexAttribCurrentValue(index); - const VertexAttribute &attrib = - context->getGLState().getVertexArray()->getVertexAttribute(index); - QueryVertexAttribIuiv(attrib, currentValues, pname, params); - SetRobustLengthParam(length, writeLength); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetUniformuivRobustANGLE(GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLuint *params) -{ - EVENT( - "(GLuint program = %u, GLint location = %d, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLuint* params = 0x%0.8p)", - program, location, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei writeLength = 0; - if (!ValidateGetUniformuivRobustANGLE(context, program, location, bufSize, &writeLength, - params)) - { - return; - } - - Program *programObject = context->getProgram(program); - ASSERT(programObject); - - programObject->getUniformuiv(location, params); - SetRobustLengthParam(length, writeLength); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetActiveUniformBlockivRobustANGLE(GLuint program, - GLuint uniformBlockIndex, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLuint program = %u, GLuint uniformBlockIndex = %u, GLenum pname = 0x%X, GLsizei bufsize " - "= %d, GLsizei* length = 0x%0.8p, GLint* params = 0x%0.8p)", - program, uniformBlockIndex, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei writeLength = 0; - if (!ValidateGetActiveUniformBlockivRobustANGLE(context, program, uniformBlockIndex, pname, - bufSize, &writeLength, params)) - { - return; - } - - const Program *programObject = context->getProgram(program); - QueryActiveUniformBlockiv(programObject, uniformBlockIndex, pname, params); - SetRobustLengthParam(length, writeLength); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetInteger64vRobustANGLE(GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint64 *data) -{ - EVENT( - "(GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, GLint64* params = " - "0x%0.8p)", - pname, bufSize, length, data); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLenum nativeType; - unsigned int numParams = 0; - if (!ValidateRobustStateQuery(context, pname, bufSize, &nativeType, &numParams)) - { - return; - } - - if (nativeType == GL_INT_64_ANGLEX) - { - context->getInteger64v(pname, data); - } - else - { - CastStateValues(context, nativeType, pname, numParams, data); - } - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetInteger64i_vRobustANGLE(GLenum target, - GLuint index, - GLsizei bufSize, - GLsizei *length, - GLint64 *data) -{ - EVENT( - "(GLenum target = 0x%X, GLuint index = %u, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLint64* data = 0x%0.8p)", - target, index, bufSize, length, data); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetInteger64i_vRobustANGLE(context, target, index, bufSize, &numParams, data)) - { - return; - } - - context->getInteger64i_v(target, index, data); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetBufferParameteri64vRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint64 *params) -{ - EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint64* params = 0x%0.8p)", target, pname, - bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetBufferParameteri64vRobustANGLE(context, target, pname, bufSize, &numParams, - params)) - { - return; - } - - Buffer *buffer = context->getGLState().getTargetBuffer(target); - QueryBufferParameteri64v(buffer, pname, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY SamplerParameterivRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - const GLint *param) -{ - EVENT( - "(GLuint sampler = %u, GLenum pname = 0x%X, GLsizei bufsize = %d, const GLint* params = " - "0x%0.8p)", - sampler, pname, bufSize, param); - - Context *context = GetValidGlobalContext(); - if (context) - { - if (!ValidateSamplerParameterivRobustANGLE(context, sampler, pname, bufSize, param)) - { - return; - } - - context->samplerParameteriv(sampler, pname, param); - } -} - -ANGLE_EXPORT void GL_APIENTRY SamplerParameterfvRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - const GLfloat *param) -{ - EVENT( - "(GLuint sampler = %u, GLenum pname = 0x%X, GLsizei bufsize = %d, const GLfloat* params = " - "0x%0.8p)", - sampler, pname, bufSize, param); - - Context *context = GetValidGlobalContext(); - if (context) - { - if (!ValidateSamplerParameterfvRobustANGLE(context, sampler, pname, bufSize, param)) - { - return; - } - - context->samplerParameterfv(sampler, pname, param); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetSamplerParameterivRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLuint sampler = %u, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLint* params = 0x%0.8p)", - sampler, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetSamplerParameterivRobustANGLE(context, sampler, pname, bufSize, &numParams, - params)) - { - return; - } - - context->getSamplerParameteriv(sampler, pname, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetSamplerParameterfvRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLfloat *params) -{ - EVENT( - "(GLuint sample = %ur, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLfloat* params = 0x%0.8p)", - sampler, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetSamplerParameterfvRobustANGLE(context, sampler, pname, bufSize, &numParams, - params)) - { - return; - } - - context->getSamplerParameterfv(sampler, pname, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetFramebufferParameterivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLenum target = 0x%X, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLint* params = 0x%0.8p)", - target, pname, bufSize, length, params); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY GetProgramInterfaceivRobustANGLE(GLuint program, - GLenum programInterface, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLuint program = %u, GLenum programInterface = 0x%X, GLenum pname = 0x%X, GLsizei " - "bufsize = %d, GLsizei* length = 0x%0.8p, GLint* params = 0x%0.8p)", - program, programInterface, pname, bufSize, length, params); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY GetBooleani_vRobustANGLE(GLenum target, - GLuint index, - GLsizei bufSize, - GLsizei *length, - GLboolean *data) -{ - EVENT( - "(GLenum target = 0x%X, GLuint index = %u, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLboolean* data = 0x%0.8p)", - target, index, bufSize, length, data); - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetBooleani_vRobustANGLE(context, target, index, bufSize, &numParams, data)) - { - return; - } - - context->getBooleani_v(target, index, data); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetMultisamplefvRobustANGLE(GLenum pname, - GLuint index, - GLsizei bufSize, - GLsizei *length, - GLfloat *val) -{ - EVENT( - "(GLenum pname = 0x%X, GLuint index = %u, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, " - "GLfloat* val = 0x%0.8p)", - pname, index, bufSize, length, val); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY GetTexLevelParameterivRobustANGLE(GLenum target, - GLint level, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLenum target = 0x%X, GLint level = %d, GLenum pname = 0x%X, GLsizei bufsize = %d, " - "GLsizei* length = 0x%0.8p, GLint* params = 0x%0.8p)", - target, level, pname, bufSize, length, params); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY GetTexLevelParameterfvRobustANGLE(GLenum target, - GLint level, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLfloat *params) -{ - EVENT( - "(GLenum target = 0x%X, GLint level = %d, GLenum pname = 0x%X, GLsizei bufsize = %d, " - "GLsizei* length = 0x%0.8p, GLfloat* params = 0x%0.8p)", - target, level, pname, bufSize, length, params); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY GetPointervRobustANGLERobustANGLE(GLenum pname, - GLsizei bufSize, - GLsizei *length, - void **params) -{ - EVENT( - "(GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, void **params = " - "0x%0.8p)", - pname, bufSize, length, params); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY ReadnPixelsRobustANGLE(GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLsizei bufSize, - GLsizei *length, - void *data) -{ - EVENT( - "(GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d, " - "GLenum format = 0x%X, GLenum type = 0x%X, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLvoid *data = 0x%0.8p)", - x, y, width, height, format, type, bufSize, length, data); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei writeLength = 0; - if (!ValidateReadnPixelsRobustANGLE(context, x, y, width, height, format, type, bufSize, - &writeLength, data)) - { - return; - } - - context->readPixels(x, y, width, height, format, type, data); - - SetRobustLengthParam(length, writeLength); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetnUniformfvRobustANGLE(GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLfloat *params) -{ - EVENT( - "(GLuint program = %d, GLint location = %d, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLfloat* params = 0x%0.8p)", - program, location, bufSize, length, params); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY GetnUniformivRobustANGLE(GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLuint program = %d, GLint location = %d, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLint* params = 0x%0.8p)", - program, location, bufSize, length, params); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY GetnUniformuivRobustANGLE(GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLuint *params) -{ - EVENT( - "(GLuint program = %u, GLint location = %d, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLuint* params = 0x%0.8p)", - program, location, bufSize, length, params); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY TexParameterIivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - const GLint *params) -{ - EVENT( - "(GLenum target = 0x%X, GLenum pname = 0x%X, GLsizei bufsize = %d, const GLint *params = " - "0x%0.8p)", - target, pname, bufSize, params); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY TexParameterIuivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - const GLuint *params) -{ - EVENT( - "(GLenum target = 0x%X, GLenum pname = 0x%X, GLsizei bufsize = %d, const GLuint *params = " - "0x%0.8p)", - target, pname, bufSize, params); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY GetTexParameterIivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLenum target = 0x%X, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLint *params = 0x%0.8p)", - target, pname, bufSize, length, params); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY GetTexParameterIuivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint *params) -{ - EVENT( - "(GLenum target = 0x%X, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLuint *params = 0x%0.8p)", - target, pname, bufSize, length, params); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY SamplerParameterIivRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - const GLint *param) -{ - EVENT( - "(GLuint sampler = %d, GLenum pname = 0x%X, GLsizei bufsize = %d, const GLint *param = " - "0x%0.8p)", - sampler, pname, bufSize, param); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY SamplerParameterIuivRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - const GLuint *param) -{ - EVENT( - "(GLuint sampler = %d, GLenum pname = 0x%X, GLsizei bufsize = %d, const GLuint *param = " - "0x%0.8p)", - sampler, pname, bufSize, param); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY GetSamplerParameterIivRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLuint sampler = %d, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLint *params = 0x%0.8p)", - sampler, pname, bufSize, length, params); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY GetSamplerParameterIuivRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint *params) -{ - EVENT( - "(GLuint sampler = %d, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = " - "0x%0.8p, GLuint *params = 0x%0.8p)", - sampler, pname, bufSize, length, params); - UNIMPLEMENTED(); -} - -ANGLE_EXPORT void GL_APIENTRY GetQueryObjectivRobustANGLE(GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params) -{ - EVENT( - "(GLuint id = %d, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, " - "GLuint *params = 0x%0.8p)", - id, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetQueryObjectivRobustANGLE(context, id, pname, bufSize, &numParams, params)) - { - return; - } - - context->getQueryObjectiv(id, pname, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetQueryObjecti64vRobustANGLE(GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint64 *params) -{ - EVENT( - "(GLuint id = %d, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, " - "GLint64 *params = 0x%0.8p)", - id, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetQueryObjecti64vRobustANGLE(context, id, pname, bufSize, &numParams, params)) - { - return; - } - - context->getQueryObjecti64v(id, pname, params); - SetRobustLengthParam(length, numParams); - } -} - -ANGLE_EXPORT void GL_APIENTRY GetQueryObjectui64vRobustANGLE(GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint64 *params) -{ - EVENT( - "(GLuint id = %d, GLenum pname = 0x%X, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, " - "GLuint64 *params = 0x%0.8p)", - id, pname, bufSize, length, params); - - Context *context = GetValidGlobalContext(); - if (context) - { - GLsizei numParams = 0; - if (!ValidateGetQueryObjectui64vRobustANGLE(context, id, pname, bufSize, &numParams, - params)) - { - return; - } - - context->getQueryObjectui64v(id, pname, params); - SetRobustLengthParam(length, numParams); - } -} - } // gl diff --git a/gfx/angle/src/libGLESv2/entry_points_gles_2_0_ext.h b/gfx/angle/src/libGLESv2/entry_points_gles_2_0_ext.h index 69d549224..86216d2a5 100755 --- a/gfx/angle/src/libGLESv2/entry_points_gles_2_0_ext.h +++ b/gfx/angle/src/libGLESv2/entry_points_gles_2_0_ext.h @@ -259,338 +259,6 @@ ANGLE_EXPORT void GL_APIENTRY CopySubTextureCHROMIUM(GLuint sourceId, GLboolean unpackPremultiplyAlpha, GLboolean unpackUnmultiplyAlpha); -// GL_CHROMIUM_copy_compressed_texture -ANGLE_EXPORT void GL_APIENTRY CompressedCopyTextureCHROMIUM(GLuint sourceId, GLuint destId); - -// GL_ANGLE_webgl_compatibility -GL_APICALL GLboolean GL_APIENTRY EnableExtensionANGLE(const GLchar *name); - -// GL_ANGLE_robust_client_memory -ANGLE_EXPORT void GL_APIENTRY GetBooleanvRobustANGLE(GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLboolean *data); -ANGLE_EXPORT void GL_APIENTRY GetBufferParameterivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetFloatvRobustANGLE(GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLfloat *data); -ANGLE_EXPORT void GL_APIENTRY GetFramebufferAttachmentParameterivRobustANGLE(GLenum target, - GLenum attachment, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetIntegervRobustANGLE(GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *data); -ANGLE_EXPORT void GL_APIENTRY GetProgramivRobustANGLE(GLuint program, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetRenderbufferParameterivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetShaderivRobustANGLE(GLuint shader, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetTexParameterfvRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLfloat *params); -ANGLE_EXPORT void GL_APIENTRY GetTexParameterivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetUniformfvRobustANGLE(GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLfloat *params); -ANGLE_EXPORT void GL_APIENTRY GetUniformivRobustANGLE(GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetVertexAttribfvRobustANGLE(GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLfloat *params); -ANGLE_EXPORT void GL_APIENTRY GetVertexAttribivRobustANGLE(GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetVertexAttribPointervRobustANGLE(GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - void **pointer); -ANGLE_EXPORT void GL_APIENTRY ReadPixelsRobustANGLE(GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLsizei bufSize, - GLsizei *length, - void *pixels); -ANGLE_EXPORT void GL_APIENTRY TexImage2DRobustANGLE(GLenum target, - GLint level, - GLint internalformat, - GLsizei width, - GLsizei height, - GLint border, - GLenum format, - GLenum type, - GLsizei bufSize, - const void *pixels); -ANGLE_EXPORT void GL_APIENTRY TexParameterfvRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - const GLfloat *params); -ANGLE_EXPORT void GL_APIENTRY TexParameterivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - const GLint *params); -ANGLE_EXPORT void GL_APIENTRY TexSubImage2DRobustANGLE(GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLsizei bufSize, - const void *pixels); - -ANGLE_EXPORT void GL_APIENTRY TexImage3DRobustANGLE(GLenum target, - GLint level, - GLint internalformat, - GLsizei width, - GLsizei height, - GLsizei depth, - GLint border, - GLenum format, - GLenum type, - GLsizei bufSize, - const void *pixels); -ANGLE_EXPORT void GL_APIENTRY TexSubImage3DRobustANGLE(GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLint zoffset, - GLsizei width, - GLsizei height, - GLsizei depth, - GLenum format, - GLenum type, - GLsizei bufSize, - const void *pixels); -ANGLE_EXPORT void GL_APIENTRY -GetQueryivRobustANGLE(GLenum target, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetQueryObjectuivRobustANGLE(GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint *params); -ANGLE_EXPORT void GL_APIENTRY GetBufferPointervRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - void **params); -ANGLE_EXPORT void GL_APIENTRY GetIntegeri_vRobustANGLE(GLenum target, - GLuint index, - GLsizei bufSize, - GLsizei *length, - GLint *data); -ANGLE_EXPORT void GL_APIENTRY GetInternalformativRobustANGLE(GLenum target, - GLenum internalformat, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetVertexAttribIivRobustANGLE(GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetVertexAttribIuivRobustANGLE(GLuint index, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint *params); -ANGLE_EXPORT void GL_APIENTRY GetUniformuivRobustANGLE(GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLuint *params); -ANGLE_EXPORT void GL_APIENTRY GetActiveUniformBlockivRobustANGLE(GLuint program, - GLuint uniformBlockIndex, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetInteger64vRobustANGLE(GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint64 *data); -ANGLE_EXPORT void GL_APIENTRY GetInteger64i_vRobustANGLE(GLenum target, - GLuint index, - GLsizei bufSize, - GLsizei *length, - GLint64 *data); -ANGLE_EXPORT void GL_APIENTRY GetBufferParameteri64vRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint64 *params); -ANGLE_EXPORT void GL_APIENTRY SamplerParameterivRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - const GLint *param); -ANGLE_EXPORT void GL_APIENTRY SamplerParameterfvRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - const GLfloat *param); -ANGLE_EXPORT void GL_APIENTRY GetSamplerParameterivRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetSamplerParameterfvRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLfloat *params); - -ANGLE_EXPORT void GL_APIENTRY GetFramebufferParameterivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetProgramInterfaceivRobustANGLE(GLuint program, - GLenum programInterface, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetBooleani_vRobustANGLE(GLenum target, - GLuint index, - GLsizei bufSize, - GLsizei *length, - GLboolean *data); -ANGLE_EXPORT void GL_APIENTRY GetMultisamplefvRobustANGLE(GLenum pname, - GLuint index, - GLsizei bufSize, - GLsizei *length, - GLfloat *val); -ANGLE_EXPORT void GL_APIENTRY GetTexLevelParameterivRobustANGLE(GLenum target, - GLint level, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetTexLevelParameterfvRobustANGLE(GLenum target, - GLint level, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLfloat *params); - -ANGLE_EXPORT void GL_APIENTRY GetPointervRobustANGLERobustANGLE(GLenum pname, - GLsizei bufSize, - GLsizei *length, - void **params); -ANGLE_EXPORT void GL_APIENTRY ReadnPixelsRobustANGLE(GLint x, - GLint y, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLsizei bufSize, - GLsizei *length, - void *data); -ANGLE_EXPORT void GL_APIENTRY GetnUniformfvRobustANGLE(GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLfloat *params); -ANGLE_EXPORT void GL_APIENTRY GetnUniformivRobustANGLE(GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetnUniformuivRobustANGLE(GLuint program, - GLint location, - GLsizei bufSize, - GLsizei *length, - GLuint *params); -ANGLE_EXPORT void GL_APIENTRY TexParameterIivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - const GLint *params); -ANGLE_EXPORT void GL_APIENTRY TexParameterIuivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - const GLuint *params); -ANGLE_EXPORT void GL_APIENTRY GetTexParameterIivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetTexParameterIuivRobustANGLE(GLenum target, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint *params); -ANGLE_EXPORT void GL_APIENTRY SamplerParameterIivRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - const GLint *param); -ANGLE_EXPORT void GL_APIENTRY SamplerParameterIuivRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - const GLuint *param); -ANGLE_EXPORT void GL_APIENTRY GetSamplerParameterIivRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetSamplerParameterIuivRobustANGLE(GLuint sampler, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint *params); -ANGLE_EXPORT void GL_APIENTRY GetQueryObjectivRobustANGLE(GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint *params); -ANGLE_EXPORT void GL_APIENTRY GetQueryObjecti64vRobustANGLE(GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLint64 *params); -ANGLE_EXPORT void GL_APIENTRY GetQueryObjectui64vRobustANGLE(GLuint id, - GLenum pname, - GLsizei bufSize, - GLsizei *length, - GLuint64 *params); - } // namespace gl #endif // LIBGLESV2_ENTRYPOINTGLES20EXT_H_ diff --git a/gfx/angle/src/libGLESv2/entry_points_gles_3_0.cpp b/gfx/angle/src/libGLESv2/entry_points_gles_3_0.cpp index b0b485e36..dabb33452 100755 --- a/gfx/angle/src/libGLESv2/entry_points_gles_3_0.cpp +++ b/gfx/angle/src/libGLESv2/entry_points_gles_3_0.cpp @@ -22,7 +22,6 @@ #include "libANGLE/validationES.h" #include "libANGLE/validationES3.h" #include "libANGLE/queryconversions.h" -#include "libANGLE/queryutils.h" #include "common/debug.h" @@ -310,7 +309,12 @@ void GL_APIENTRY GetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params) return; } - context->getQueryObjectuiv(id, pname, params); + Error error = context->getQueryObjectuiv(id, pname, params); + if (error.isError()) + { + context->handleError(error); + return; + } } } @@ -755,13 +759,6 @@ void GL_APIENTRY BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLi return; } - if (!context->getGLState().isBindGeneratesResourceEnabled() && - !context->isBufferGenerated(buffer)) - { - context->handleError(Error(GL_INVALID_OPERATION, "Buffer was not generated")); - return; - } - switch (target) { case GL_TRANSFORM_FEEDBACK_BUFFER: @@ -844,13 +841,6 @@ void GL_APIENTRY BindBufferBase(GLenum target, GLuint index, GLuint buffer) return; } - if (!context->getGLState().isBindGeneratesResourceEnabled() && - !context->isBufferGenerated(buffer)) - { - context->handleError(Error(GL_INVALID_OPERATION, "Buffer was not generated")); - return; - } - switch (target) { case GL_TRANSFORM_FEEDBACK_BUFFER: @@ -1033,17 +1023,38 @@ void GL_APIENTRY GetVertexAttribIiv(GLuint index, GLenum pname, GLint* params) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateGetVertexAttribIiv(context, index, pname, params)) + if (context->getClientMajorVersion() < 3) { + context->handleError(Error(GL_INVALID_OPERATION)); return; } - const VertexAttribCurrentValueData ¤tValues = - context->getGLState().getVertexAttribCurrentValue(index); - const VertexAttribute &attrib = - context->getGLState().getVertexArray()->getVertexAttribute(index); - QueryVertexAttribIiv(attrib, currentValues, pname, params); + if (index >= MAX_VERTEX_ATTRIBS) + { + context->handleError(Error(GL_INVALID_VALUE)); + return; + } + + if (!ValidateGetVertexAttribParameters(context, pname)) + { + return; + } + + if (pname == GL_CURRENT_VERTEX_ATTRIB) + { + const VertexAttribCurrentValueData ¤tValueData = + context->getGLState().getVertexAttribCurrentValue(index); + for (int i = 0; i < 4; ++i) + { + params[i] = currentValueData.IntValues[i]; + } + } + else + { + const VertexAttribute &attribState = + context->getGLState().getVertexArray()->getVertexAttribute(index); + *params = QuerySingleVertexAttributeParameter(attribState, pname); + } } } @@ -1055,17 +1066,38 @@ void GL_APIENTRY GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params) Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateGetVertexAttribIuiv(context, index, pname, params)) + if (context->getClientMajorVersion() < 3) { + context->handleError(Error(GL_INVALID_OPERATION)); return; } - const VertexAttribCurrentValueData ¤tValues = - context->getGLState().getVertexAttribCurrentValue(index); - const VertexAttribute &attrib = - context->getGLState().getVertexArray()->getVertexAttribute(index); - QueryVertexAttribIuiv(attrib, currentValues, pname, params); + if (index >= MAX_VERTEX_ATTRIBS) + { + context->handleError(Error(GL_INVALID_VALUE)); + return; + } + + if (!ValidateGetVertexAttribParameters(context, pname)) + { + return; + } + + if (pname == GL_CURRENT_VERTEX_ATTRIB) + { + const VertexAttribCurrentValueData ¤tValueData = + context->getGLState().getVertexAttribCurrentValue(index); + for (int i = 0; i < 4; ++i) + { + params[i] = currentValueData.UnsignedIntValues[i]; + } + } + else + { + const VertexAttribute &attribState = + context->getGLState().getVertexArray()->getVertexAttribute(index); + *params = QuerySingleVertexAttributeParameter(attribState, pname); + } } } @@ -1409,7 +1441,7 @@ const GLubyte *GL_APIENTRY GetStringi(GLenum name, GLuint index) return NULL; } - return reinterpret_cast(context->getExtensionString(index)); + return reinterpret_cast(context->getExtensionString(index).c_str()); } return NULL; @@ -1423,14 +1455,58 @@ void GL_APIENTRY CopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintp Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateCopyBufferSubData(context, readTarget, writeTarget, readOffset, writeOffset, - size)) + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + + if (!ValidBufferTarget(context, readTarget) || !ValidBufferTarget(context, writeTarget)) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + Buffer *readBuffer = context->getGLState().getTargetBuffer(readTarget); + Buffer *writeBuffer = context->getGLState().getTargetBuffer(writeTarget); + + if (!readBuffer || !writeBuffer) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + + // Verify that readBuffer and writeBuffer are not currently mapped + if (readBuffer->isMapped() || writeBuffer->isMapped()) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + + if (readOffset < 0 || writeOffset < 0 || size < 0 || + static_cast(readOffset + size) > readBuffer->getSize() || + static_cast(writeOffset + size) > writeBuffer->getSize()) + { + context->handleError(Error(GL_INVALID_VALUE)); + return; + } + + if (readBuffer == writeBuffer && std::abs(readOffset - writeOffset) < size) { + context->handleError(Error(GL_INVALID_VALUE)); return; } - context->copyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); + // if size is zero, the copy is a successful no-op + if (size > 0) + { + Error error = writeBuffer->copyBufferSubData(readBuffer, readOffset, writeOffset, size); + if (error.isError()) + { + context->handleError(error); + return; + } + } } } @@ -1580,14 +1656,43 @@ void GL_APIENTRY GetActiveUniformBlockiv(GLuint program, GLuint uniformBlockInde Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateGetActiveUniformBlockiv(context, program, uniformBlockIndex, pname, params)) + if (context->getClientMajorVersion() < 3) { + context->handleError(Error(GL_INVALID_OPERATION)); return; } + Program *programObject = GetValidProgram(context, program); + + if (!programObject) + { + return; + } + + if (uniformBlockIndex >= programObject->getActiveUniformBlockCount()) + { + context->handleError(Error(GL_INVALID_VALUE)); + return; + } + + switch (pname) + { + case GL_UNIFORM_BLOCK_BINDING: + *params = static_cast(programObject->getUniformBlockBinding(uniformBlockIndex)); + break; + + case GL_UNIFORM_BLOCK_DATA_SIZE: + case GL_UNIFORM_BLOCK_NAME_LENGTH: + case GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS: + case GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: + case GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: + case GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: + programObject->getActiveUniformBlockiv(uniformBlockIndex, pname, params); + break; - const Program *programObject = context->getProgram(program); - QueryActiveUniformBlockiv(programObject, uniformBlockIndex, pname, params); + default: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } } } @@ -1994,14 +2099,55 @@ void GL_APIENTRY GetBufferParameteri64v(GLenum target, GLenum pname, GLint64* pa Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateGetBufferParameteri64v(context, target, pname, params)) + if (context->getClientMajorVersion() < 3) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + + if (!ValidBufferTarget(context, target)) { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + if (!ValidBufferParameter(context, pname)) + { + context->handleError(Error(GL_INVALID_ENUM)); return; } Buffer *buffer = context->getGLState().getTargetBuffer(target); - QueryBufferParameteri64v(buffer, pname, params); + + if (!buffer) + { + // A null buffer means that "0" is bound to the requested buffer target + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + + switch (pname) + { + case GL_BUFFER_USAGE: + *params = static_cast(buffer->getUsage()); + break; + case GL_BUFFER_SIZE: + *params = buffer->getSize(); + break; + case GL_BUFFER_ACCESS_FLAGS: + *params = static_cast(buffer->getAccessFlags()); + break; + case GL_BUFFER_MAPPED: + *params = static_cast(buffer->isMapped()); + break; + case GL_BUFFER_MAP_OFFSET: + *params = buffer->getMapOffset(); + break; + case GL_BUFFER_MAP_LENGTH: + *params = buffer->getMapLength(); + break; + default: UNREACHABLE(); break; + } } } @@ -2110,20 +2256,7 @@ void GL_APIENTRY SamplerParameteri(GLuint sampler, GLenum pname, GLint param) void GL_APIENTRY SamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param) { - EVENT("(GLuint sampler = %u, GLenum pname = 0x%X, const GLint* params = 0x%0.8p)", sampler, - pname, param); - - Context *context = GetValidGlobalContext(); - if (context) - { - if (!context->skipValidation() && - !ValidateSamplerParameteriv(context, sampler, pname, param)) - { - return; - } - - context->samplerParameteriv(sampler, pname, param); - } + SamplerParameteri(sampler, pname, *param); } void GL_APIENTRY SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) @@ -2145,37 +2278,34 @@ void GL_APIENTRY SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) void GL_APIENTRY SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param) { - EVENT("(GLuint sampler = %u, GLenum pname = 0x%X, const GLfloat* params = 0x%0.8p)", sampler, - pname, param); + SamplerParameterf(sampler, pname, *param); +} + +void GL_APIENTRY GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params) +{ + EVENT("(GLuint sampler = %u, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", sampler, pname, params); Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateSamplerParameterfv(context, sampler, pname, param)) + if (context->getClientMajorVersion() < 3) { + context->handleError(Error(GL_INVALID_OPERATION)); return; } - context->samplerParameterfv(sampler, pname, param); - } -} - -void GL_APIENTRY GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params) -{ - EVENT("(GLuint sampler = %u, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", sampler, pname, - params); + if (!ValidateSamplerObjectParameter(context, pname)) + { + return; + } - Context *context = GetValidGlobalContext(); - if (context) - { - if (!context->skipValidation() && - !ValidateGetSamplerParameteriv(context, sampler, pname, params)) + if (!context->isSampler(sampler)) { + context->handleError(Error(GL_INVALID_OPERATION)); return; } - context->getSamplerParameteriv(sampler, pname, params); + *params = context->getSamplerParameteri(sampler, pname); } } @@ -2186,13 +2316,24 @@ void GL_APIENTRY GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* pa Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateGetSamplerParameterfv(context, sampler, pname, params)) + if (context->getClientMajorVersion() < 3) { + context->handleError(Error(GL_INVALID_OPERATION)); return; } - context->getSamplerParameterfv(sampler, pname, params); + if (!ValidateSamplerObjectParameter(context, pname)) + { + return; + } + + if (!context->isSampler(sampler)) + { + context->handleError(Error(GL_INVALID_OPERATION)); + return; + } + + *params = context->getSamplerParameterf(sampler, pname); } } @@ -2561,14 +2702,55 @@ void GL_APIENTRY GetInternalformativ(GLenum target, GLenum internalformat, GLenu Context *context = GetValidGlobalContext(); if (context) { - if (!context->skipValidation() && - !ValidateGetInternalFormativ(context, target, internalformat, pname, bufSize, params)) + if (context->getClientMajorVersion() < 3) { + context->handleError(Error(GL_INVALID_OPERATION)); return; } const TextureCaps &formatCaps = context->getTextureCaps().get(internalformat); - QueryInternalFormativ(formatCaps, pname, bufSize, params); + if (!formatCaps.renderable) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + if (target != GL_RENDERBUFFER) + { + context->handleError(Error(GL_INVALID_ENUM)); + return; + } + + if (bufSize < 0) + { + context->handleError(Error(GL_INVALID_VALUE)); + return; + } + + switch (pname) + { + case GL_NUM_SAMPLE_COUNTS: + if (bufSize != 0) + { + *params = static_cast(formatCaps.sampleCounts.size()); + } + break; + + case GL_SAMPLES: + { + size_t returnCount = std::min(bufSize, formatCaps.sampleCounts.size()); + auto sampleReverseIt = formatCaps.sampleCounts.rbegin(); + for (size_t sampleIndex = 0; sampleIndex < returnCount; ++sampleIndex) + { + params[sampleIndex] = *sampleReverseIt++;; + } + } + break; + + default: + context->handleError(Error(GL_INVALID_ENUM)); + return; + } } } diff --git a/gfx/angle/src/libGLESv2/global_state.cpp b/gfx/angle/src/libGLESv2/global_state.cpp index bc776b1f7..fa681bde1 100755 --- a/gfx/angle/src/libGLESv2/global_state.cpp +++ b/gfx/angle/src/libGLESv2/global_state.cpp @@ -8,141 +8,229 @@ #include "libGLESv2/global_state.h" +#include "libANGLE/Context.h" +#include "libANGLE/Error.h" + #include "common/debug.h" #include "common/platform.h" #include "common/tls.h" -#include "libANGLE/Thread.h" - -namespace gl +namespace { -Context *GetGlobalContext() +static TLSIndex currentTLS = TLS_INVALID_INDEX; + +struct Current +{ + EGLint error; + EGLenum API; + egl::Display *display; + egl::Surface *drawSurface; + egl::Surface *readSurface; + gl::Context *context; +}; + +Current *AllocateCurrent() { - egl::Thread *thread = egl::GetCurrentThread(); - return thread->getContext(); + ASSERT(currentTLS != TLS_INVALID_INDEX); + if (currentTLS == TLS_INVALID_INDEX) + { + return NULL; + } + + Current *current = new Current(); + current->error = EGL_SUCCESS; + current->API = EGL_OPENGL_ES_API; + current->display = reinterpret_cast(EGL_NO_DISPLAY); + current->drawSurface = reinterpret_cast(EGL_NO_SURFACE); + current->readSurface = reinterpret_cast(EGL_NO_SURFACE); + current->context = reinterpret_cast(EGL_NO_CONTEXT); + + if (!SetTLSValue(currentTLS, current)) + { + ERR("Could not set thread local storage."); + return NULL; + } + + return current; } -Context *GetValidGlobalContext() +Current *GetCurrentData() { - egl::Thread *thread = egl::GetCurrentThread(); - return thread->getValidContext(); + // Create a TLS index if one has not been created for this DLL + if (currentTLS == TLS_INVALID_INDEX) + { + currentTLS = CreateTLSIndex(); + } + + Current *current = reinterpret_cast(GetTLSValue(currentTLS)); + + // ANGLE issue 488: when the dll is loaded after thread initialization, + // thread local storage (current) might not exist yet. + return (current ? current : AllocateCurrent()); } -} // namespace gl +#ifdef ANGLE_PLATFORM_WINDOWS -namespace egl +void DeallocateCurrent() { + Current *current = reinterpret_cast(GetTLSValue(currentTLS)); + SafeDelete(current); + SetTLSValue(currentTLS, NULL); +} -namespace +extern "C" BOOL WINAPI DllMain(HINSTANCE, DWORD reason, LPVOID) { + switch (reason) + { + case DLL_PROCESS_ATTACH: + currentTLS = CreateTLSIndex(); + if (currentTLS == TLS_INVALID_INDEX) + { + return FALSE; + } + AllocateCurrent(); + break; -static TLSIndex threadTLS = TLS_INVALID_INDEX; + case DLL_THREAD_ATTACH: + AllocateCurrent(); + break; -Thread *AllocateCurrentThread() -{ - ASSERT(threadTLS != TLS_INVALID_INDEX); - if (threadTLS == TLS_INVALID_INDEX) - { - return nullptr; - } + case DLL_THREAD_DETACH: + DeallocateCurrent(); + break; - Thread *thread = new Thread(); - if (!SetTLSValue(threadTLS, thread)) - { - ERR("Could not set thread local storage."); - return nullptr; + case DLL_PROCESS_DETACH: + DeallocateCurrent(); + if (currentTLS != TLS_INVALID_INDEX) + { + DestroyTLSIndex(currentTLS); + currentTLS = TLS_INVALID_INDEX; + } + break; } - return thread; + return TRUE; } +#endif -} // anonymous namespace +} -Thread *GetCurrentThread() +namespace gl { - // Create a TLS index if one has not been created for this DLL - if (threadTLS == TLS_INVALID_INDEX) + +Context *GetGlobalContext() +{ + Current *current = GetCurrentData(); + + return current->context; +} + +Context *GetValidGlobalContext() +{ + gl::Context *context = GetGlobalContext(); + if (context) { - threadTLS = CreateTLSIndex(); + if (context->isContextLost()) + { + context->handleError(gl::Error(GL_OUT_OF_MEMORY, "Context has been lost.")); + return nullptr; + } + else + { + return context; + } } + return nullptr; +} - Thread *current = static_cast(GetTLSValue(threadTLS)); +} - // ANGLE issue 488: when the dll is loaded after thread initialization, - // thread local storage (current) might not exist yet. - return (current ? current : AllocateCurrentThread()); +namespace egl +{ + +void SetGlobalError(const Error &error) +{ + Current *current = GetCurrentData(); + + current->error = error.getCode(); } -} // namespace egl +EGLint GetGlobalError() +{ + Current *current = GetCurrentData(); -#ifdef ANGLE_PLATFORM_WINDOWS -namespace egl + return current->error; +} + +EGLenum GetGlobalAPI() { + Current *current = GetCurrentData(); -namespace + return current->API; +} + +void SetGlobalAPI(EGLenum API) { + Current *current = GetCurrentData(); -bool DeallocateCurrentThread() + current->API = API; +} + +void SetGlobalDisplay(Display *dpy) { - Thread *thread = static_cast(GetTLSValue(threadTLS)); - SafeDelete(thread); - return SetTLSValue(threadTLS, nullptr); + Current *current = GetCurrentData(); + + current->display = dpy; } -bool InitializeProcess() +Display *GetGlobalDisplay() { - threadTLS = CreateTLSIndex(); - if (threadTLS == TLS_INVALID_INDEX) - { - return false; - } + Current *current = GetCurrentData(); - return AllocateCurrentThread() != nullptr; + return current->display; } -bool TerminateProcess() +void SetGlobalDrawSurface(Surface *surface) { - if (!DeallocateCurrentThread()) - { - return false; - } + Current *current = GetCurrentData(); - if (threadTLS != TLS_INVALID_INDEX) - { - TLSIndex tlsCopy = threadTLS; - threadTLS = TLS_INVALID_INDEX; + current->drawSurface = surface; +} - if (!DestroyTLSIndex(tlsCopy)) - { - return false; - } - } +Surface *GetGlobalDrawSurface() +{ + Current *current = GetCurrentData(); + + return current->drawSurface; +} - return true; +void SetGlobalReadSurface(Surface *surface) +{ + Current *current = GetCurrentData(); + + current->readSurface = surface; } -} // anonymous namespace +Surface *GetGlobalReadSurface() +{ + Current *current = GetCurrentData(); -} // namespace egl + return current->readSurface; +} -extern "C" BOOL WINAPI DllMain(HINSTANCE, DWORD reason, LPVOID) +void SetGlobalContext(gl::Context *context) { - switch (reason) - { - case DLL_PROCESS_ATTACH: - return static_cast(egl::InitializeProcess()); + Current *current = GetCurrentData(); - case DLL_THREAD_ATTACH: - return static_cast(egl::AllocateCurrentThread() != nullptr); + current->context = context; +} - case DLL_THREAD_DETACH: - return static_cast(egl::DeallocateCurrentThread()); +gl::Context *GetGlobalContext() +{ + Current *current = GetCurrentData(); - case DLL_PROCESS_DETACH: - return static_cast(egl::TerminateProcess()); - } + return current->context; +} - return TRUE; } -#endif // ANGLE_PLATFORM_WINDOWS diff --git a/gfx/angle/src/libGLESv2/global_state.h b/gfx/angle/src/libGLESv2/global_state.h index 3e3740c90..db202539c 100755 --- a/gfx/angle/src/libGLESv2/global_state.h +++ b/gfx/angle/src/libGLESv2/global_state.h @@ -9,6 +9,8 @@ #ifndef LIBGLESV2_GLOBALSTATE_H_ #define LIBGLESV2_GLOBALSTATE_H_ +#include + namespace gl { class Context; @@ -16,14 +18,32 @@ class Context; Context *GetGlobalContext(); Context *GetValidGlobalContext(); -} // namespace gl +} namespace egl { -class Thread; +class Error; +class Display; +class Surface; + +void SetGlobalError(const Error &error); +EGLint GetGlobalError(); + +void SetGlobalAPI(EGLenum API); +EGLenum GetGlobalAPI(); + +void SetGlobalDisplay(Display *dpy); +Display *GetGlobalDisplay(); + +void SetGlobalDrawSurface(Surface *surface); +Surface *GetGlobalDrawSurface(); + +void SetGlobalReadSurface(Surface *surface); +Surface *GetGlobalReadSurface(); -Thread *GetCurrentThread(); +void SetGlobalContext(gl::Context *context); +gl::Context *GetGlobalContext(); -} // namespace egl +} #endif // LIBGLESV2_GLOBALSTATE_H_ diff --git a/gfx/angle/src/libGLESv2/moz.build b/gfx/angle/src/libGLESv2/moz.build index 08c60c213..1d40b3b67 100755 --- a/gfx/angle/src/libGLESv2/moz.build +++ b/gfx/angle/src/libGLESv2/moz.build @@ -39,6 +39,9 @@ if CONFIG['GNU_CXX']: '-Wno-shadow-local', ] +if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']: + LOCAL_INCLUDES += ['%' + '%s/include/' % CONFIG['MOZ_DIRECTX_SDK_PATH']] + DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True DEFINES['_HAS_EXCEPTIONS'] = 0 @@ -70,6 +73,11 @@ DEFINES['ANGLE_ENABLE_KEYEDMUTEX'] = "1" if CONFIG['MOZ_HAS_WINSDK_WITH_D3D']: OS_LIBS += [ 'd3d9', 'dxguid' ] +else: + EXTRA_DSO_LDOPTS += [ + '\'%s/lib/%s/d3d9.lib\'' % (CONFIG['MOZ_DIRECTX_SDK_PATH'], CONFIG['MOZ_D3D_CPU_SUFFIX']), + '\'%s/lib/%s/dxguid.lib\'' % (CONFIG['MOZ_DIRECTX_SDK_PATH'], CONFIG['MOZ_D3D_CPU_SUFFIX']), + ] GeckoSharedLibrary('libGLESv2', linkage=None) diff --git a/gfx/angle/src/tests/BUILD.gn b/gfx/angle/src/tests/BUILD.gn index cd6c60d82..d4899da2c 100755 --- a/gfx/angle/src/tests/BUILD.gn +++ b/gfx/angle/src/tests/BUILD.gn @@ -4,7 +4,7 @@ import("//testing/test.gni") import("//build/config/chromecast_build.gni") -import("//third_party/angle/gni/angle.gni") +import("//third_party/angle/build/angle_common.gni") unittests_gypi = exec_script("//build/gypi_to_gn.py", [ @@ -37,7 +37,7 @@ test("angle_unittests") { "//testing/gtest", "//third_party/angle:libANGLE", "//third_party/angle:preprocessor", - "//third_party/angle:translator", + "//third_party/angle:translator_static", ] } @@ -97,7 +97,7 @@ if (is_win || is_linux || is_mac || is_android) { "//third_party/angle:libEGL", "//third_party/angle:libGLESv2", "//third_party/angle:preprocessor", - "//third_party/angle:translator", + "//third_party/angle:translator_static", ] } } @@ -303,7 +303,6 @@ if (build_angle_deqp_tests) { shared_library(shared_library_name) { deps = [ ":angle_deqp_libtester", - "//third_party/angle:angle_util", ] configs -= deqp_undefine_configs diff --git a/gfx/angle/src/tests/angle_end2end_tests.gypi b/gfx/angle/src/tests/angle_end2end_tests.gypi index 56705ba12..9941e9606 100755 --- a/gfx/angle/src/tests/angle_end2end_tests.gypi +++ b/gfx/angle/src/tests/angle_end2end_tests.gypi @@ -15,7 +15,6 @@ { 'angle_end2end_tests_sources': [ - '<(angle_path)/src/tests/gl_tests/BindGeneratesResourceTest.cpp', '<(angle_path)/src/tests/gl_tests/BindUniformLocationTest.cpp', '<(angle_path)/src/tests/gl_tests/BlendMinMaxTest.cpp', '<(angle_path)/src/tests/gl_tests/BlitFramebufferANGLETest.cpp', @@ -24,7 +23,6 @@ '<(angle_path)/src/tests/gl_tests/ClearTest.cpp', '<(angle_path)/src/tests/gl_tests/ColorMaskTest.cpp', '<(angle_path)/src/tests/gl_tests/ComputeShaderTest.cpp', - '<(angle_path)/src/tests/gl_tests/CopyCompressedTextureTest.cpp', '<(angle_path)/src/tests/gl_tests/CopyTexImageTest.cpp', '<(angle_path)/src/tests/gl_tests/CopyTextureTest.cpp', '<(angle_path)/src/tests/gl_tests/CubeMapTextureTest.cpp', @@ -62,10 +60,8 @@ '<(angle_path)/src/tests/gl_tests/ProgramBinaryTest.cpp', '<(angle_path)/src/tests/gl_tests/ReadPixelsTest.cpp', '<(angle_path)/src/tests/gl_tests/RendererTest.cpp', - '<(angle_path)/src/tests/gl_tests/RobustClientMemoryTest.cpp', '<(angle_path)/src/tests/gl_tests/SimpleOperationTest.cpp', '<(angle_path)/src/tests/gl_tests/SixteenBppTextureTest.cpp', - '<(angle_path)/src/tests/gl_tests/SRGBFramebufferTest.cpp', '<(angle_path)/src/tests/gl_tests/SRGBTextureTest.cpp', '<(angle_path)/src/tests/gl_tests/StateChangeTest.cpp', '<(angle_path)/src/tests/gl_tests/SwizzleTest.cpp', @@ -79,7 +75,6 @@ '<(angle_path)/src/tests/gl_tests/UnpackRowLength.cpp', '<(angle_path)/src/tests/gl_tests/VertexAttributeTest.cpp', '<(angle_path)/src/tests/gl_tests/ViewportTest.cpp', - '<(angle_path)/src/tests/gl_tests/WebGLCompatibilityTest.cpp', '<(angle_path)/src/tests/egl_tests/EGLContextCompatibilityTest.cpp', '<(angle_path)/src/tests/egl_tests/EGLContextSharingTest.cpp', '<(angle_path)/src/tests/egl_tests/EGLQueryContextTest.cpp', @@ -97,7 +92,6 @@ 'angle_end2end_tests_win_sources': [ '<(angle_path)/src/tests/gl_tests/D3DImageFormatConversionTest.cpp', - '<(angle_path)/src/tests/gl_tests/D3DTextureTest.cpp', '<(angle_path)/src/tests/gl_tests/D3D11EmulatedIndexedBufferTest.cpp', '<(angle_path)/src/tests/gl_tests/D3D11FormatTablesTest.cpp', '<(angle_path)/src/tests/gl_tests/D3D11InputLayoutCacheTest.cpp', diff --git a/gfx/angle/src/tests/angle_perftests.gypi b/gfx/angle/src/tests/angle_perftests.gypi index 6a86da9c0..5252adde8 100755 --- a/gfx/angle/src/tests/angle_perftests.gypi +++ b/gfx/angle/src/tests/angle_perftests.gypi @@ -27,7 +27,6 @@ '<(angle_path)/src/tests/perf_tests/PointSprites.cpp', '<(angle_path)/src/tests/perf_tests/TexSubImage.cpp', '<(angle_path)/src/tests/perf_tests/TextureSampling.cpp', - '<(angle_path)/src/tests/perf_tests/TexturesPerf.cpp', '<(angle_path)/src/tests/perf_tests/UniformsPerf.cpp', '<(angle_path)/src/tests/perf_tests/third_party/perf/perf_test.cc', '<(angle_path)/src/tests/perf_tests/third_party/perf/perf_test.h', diff --git a/gfx/angle/src/tests/angle_unittests.gypi b/gfx/angle/src/tests/angle_unittests.gypi index b22490173..9eeb21e9c 100755 --- a/gfx/angle/src/tests/angle_unittests.gypi +++ b/gfx/angle/src/tests/angle_unittests.gypi @@ -42,6 +42,7 @@ '<(angle_path)/src/libANGLE/validationES_unittest.cpp', '<(angle_path)/src/tests/angle_unittests_utils.h', '<(angle_path)/src/tests/compiler_tests/API_test.cpp', + '<(angle_path)/src/tests/compiler_tests/BuiltInFunctionEmulator_test.cpp', '<(angle_path)/src/tests/compiler_tests/CollectVariables_test.cpp', '<(angle_path)/src/tests/compiler_tests/ConstantFolding_test.cpp', '<(angle_path)/src/tests/compiler_tests/DebugShaderPrecision_test.cpp', @@ -56,12 +57,9 @@ '<(angle_path)/src/tests/compiler_tests/Pack_Unpack_test.cpp', '<(angle_path)/src/tests/compiler_tests/PruneEmptyDeclarations_test.cpp', '<(angle_path)/src/tests/compiler_tests/PruneUnusedFunctions_test.cpp', - '<(angle_path)/src/tests/compiler_tests/QualificationOrderESSL31_test.cpp', - '<(angle_path)/src/tests/compiler_tests/QualificationOrder_test.cpp', '<(angle_path)/src/tests/compiler_tests/RecordConstantPrecision_test.cpp', '<(angle_path)/src/tests/compiler_tests/RemovePow_test.cpp', '<(angle_path)/src/tests/compiler_tests/ShaderExtension_test.cpp', - '<(angle_path)/src/tests/compiler_tests/ShaderImage_test.cpp', '<(angle_path)/src/tests/compiler_tests/ShaderVariable_test.cpp', '<(angle_path)/src/tests/compiler_tests/ShCompile_test.cpp', '<(angle_path)/src/tests/compiler_tests/TypeTracking_test.cpp', @@ -101,7 +99,7 @@ [ '<(angle_path)/src/angle.gyp:libANGLE', '<(angle_path)/src/angle.gyp:preprocessor', - '<(angle_path)/src/angle.gyp:translator', + '<(angle_path)/src/angle.gyp:translator_static', '<(angle_path)/src/tests/tests.gyp:angle_test_support', ], 'include_dirs': diff --git a/gfx/angle/src/tests/angle_unittests_main.cpp b/gfx/angle/src/tests/angle_unittests_main.cpp index 1b44dbbcc..c52df1487 100755 --- a/gfx/angle/src/tests/angle_unittests_main.cpp +++ b/gfx/angle/src/tests/angle_unittests_main.cpp @@ -10,17 +10,17 @@ class CompilerTestEnvironment : public testing::Environment { public: - void SetUp() override + virtual void SetUp() { - if (!sh::Initialize()) + if (!ShInitialize()) { FAIL() << "Failed to initialize the compiler."; } } - void TearDown() override + virtual void TearDown() { - if (!sh::Finalize()) + if (!ShFinalize()) { FAIL() << "Failed to finalize the compiler."; } diff --git a/gfx/angle/src/tests/angle_unittests_utils.h b/gfx/angle/src/tests/angle_unittests_utils.h index 790d3455d..487c1685c 100755 --- a/gfx/angle/src/tests/angle_unittests_utils.h +++ b/gfx/angle/src/tests/angle_unittests_utils.h @@ -41,7 +41,7 @@ class NullFactory : public GLImplFactory RenderbufferImpl *createRenderbuffer() override { return nullptr; } // Buffer creation - BufferImpl *createBuffer(const gl::BufferState &state) override { return nullptr; } + BufferImpl *createBuffer() override { return nullptr; } // Vertex Array creation VertexArrayImpl *createVertexArray(const gl::VertexArrayState &data) override @@ -80,7 +80,7 @@ class MockGLFactory : public GLImplFactory MOCK_METHOD1(createFramebuffer, FramebufferImpl *(const gl::FramebufferState &)); MOCK_METHOD1(createTexture, TextureImpl *(const gl::TextureState &)); MOCK_METHOD0(createRenderbuffer, RenderbufferImpl *()); - MOCK_METHOD1(createBuffer, BufferImpl *(const gl::BufferState &)); + MOCK_METHOD0(createBuffer, BufferImpl *()); MOCK_METHOD1(createVertexArray, VertexArrayImpl *(const gl::VertexArrayState &)); MOCK_METHOD1(createQuery, QueryImpl *(GLenum type)); MOCK_METHOD0(createFenceNV, FenceNVImpl *()); @@ -103,10 +103,9 @@ class MockEGLFactory : public EGLImplFactory SurfaceImpl *(const egl::SurfaceState &, const egl::Config *, const egl::AttributeMap &)); - MOCK_METHOD5(createPbufferFromClientBuffer, + MOCK_METHOD4(createPbufferFromClientBuffer, SurfaceImpl *(const egl::SurfaceState &, const egl::Config *, - EGLenum, EGLClientBuffer, const egl::AttributeMap &)); MOCK_METHOD4(createPixmapSurface, diff --git a/gfx/angle/src/tests/compiler_tests/API_test.cpp b/gfx/angle/src/tests/compiler_tests/API_test.cpp index 090e31ebc..217a260fa 100755 --- a/gfx/angle/src/tests/compiler_tests/API_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/API_test.cpp @@ -15,11 +15,11 @@ TEST(APITest, CompareShBuiltInResources) { ShBuiltInResources a_resources; memset(&a_resources, 88, sizeof(a_resources)); - sh::InitBuiltInResources(&a_resources); + ShInitBuiltInResources(&a_resources); ShBuiltInResources b_resources; memset(&b_resources, 77, sizeof(b_resources)); - sh::InitBuiltInResources(&b_resources); + ShInitBuiltInResources(&b_resources); EXPECT_TRUE(memcmp(&a_resources, &b_resources, sizeof(a_resources)) == 0); } diff --git a/gfx/angle/src/tests/compiler_tests/BuiltInFunctionEmulator_test.cpp b/gfx/angle/src/tests/compiler_tests/BuiltInFunctionEmulator_test.cpp new file mode 100644 index 000000000..edf979f53 --- /dev/null +++ b/gfx/angle/src/tests/compiler_tests/BuiltInFunctionEmulator_test.cpp @@ -0,0 +1,43 @@ +// +// Copyright (c) 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. +// +// BuiltInFunctionEmulator_test.cpp: +// Tests for writing the code for built-in function emulation. +// + +#include "angle_gl.h" +#include "gtest/gtest.h" +#include "GLSLANG/ShaderLang.h" +#include "tests/test_utils/compiler_test.h" + +namespace +{ + +// Test for the SH_EMULATE_BUILT_IN_FUNCTIONS flag. +class EmulateBuiltInFunctionsTest : public MatchOutputCodeTest +{ + public: + EmulateBuiltInFunctionsTest() + : MatchOutputCodeTest(GL_VERTEX_SHADER, + SH_EMULATE_BUILT_IN_FUNCTIONS, + SH_GLSL_COMPATIBILITY_OUTPUT) + { + } +}; + +TEST_F(EmulateBuiltInFunctionsTest, DotEmulated) +{ + const std::string shaderString = + "precision mediump float;\n" + "uniform float u;\n" + "void main()\n" + "{\n" + " gl_Position = vec4(dot(u, 1.0), 1.0, 1.0, 1.0);\n" + "}\n"; + compile(shaderString); + ASSERT_TRUE(foundInCode("webgl_dot_emu(")); +} + +} // namespace diff --git a/gfx/angle/src/tests/compiler_tests/CollectVariables_test.cpp b/gfx/angle/src/tests/compiler_tests/CollectVariables_test.cpp index a93411668..f29374f54 100755 --- a/gfx/angle/src/tests/compiler_tests/CollectVariables_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/CollectVariables_test.cpp @@ -14,21 +14,19 @@ #include "GLSLANG/ShaderLang.h" #include "compiler/translator/TranslatorGLSL.h" -using namespace sh; - #define EXPECT_GLENUM_EQ(expected, actual) \ - EXPECT_EQ(static_cast<::GLenum>(expected), static_cast<::GLenum>(actual)) + EXPECT_EQ(static_cast(expected), static_cast(actual)) class CollectVariablesTest : public testing::Test { public: - CollectVariablesTest(::GLenum shaderType) : mShaderType(shaderType) {} + CollectVariablesTest(GLenum shaderType) : mShaderType(shaderType) {} protected: void SetUp() override { ShBuiltInResources resources; - InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); resources.MaxDrawBuffers = 8; initTranslator(resources); @@ -47,10 +45,10 @@ class CollectVariablesTest : public testing::Test const char *shaderStrings[] = { shaderString.c_str() }; ASSERT_TRUE(mTranslator->compile(shaderStrings, 1, SH_VARIABLES)); - const std::vector &uniforms = mTranslator->getUniforms(); + const std::vector &uniforms = mTranslator->getUniforms(); ASSERT_EQ(1u, uniforms.size()); - const Uniform &uniform = uniforms[0]; + const sh::Uniform &uniform = uniforms[0]; EXPECT_EQ("gl_DepthRange", uniform.name); ASSERT_TRUE(uniform.isStruct()); ASSERT_EQ(3u, uniform.fields.size()); @@ -92,7 +90,7 @@ class CollectVariablesTest : public testing::Test void validateOutputVariableForShader(const std::string &shaderString, unsigned int varIndex, const char *varName, - const OutputVariable **outResult) + const sh::OutputVariable **outResult) { const char *shaderStrings[] = {shaderString.c_str()}; ASSERT_TRUE(mTranslator->compile(shaderStrings, 1, SH_VARIABLES)) @@ -100,7 +98,7 @@ class CollectVariablesTest : public testing::Test const auto &outputVariables = mTranslator->getOutputVariables(); ASSERT_LT(varIndex, outputVariables.size()); - const OutputVariable &outputVariable = outputVariables[varIndex]; + const sh::OutputVariable &outputVariable = outputVariables[varIndex]; EXPECT_EQ(-1, outputVariable.location); EXPECT_TRUE(outputVariable.staticUse); EXPECT_EQ(varName, outputVariable.name); @@ -113,7 +111,7 @@ class CollectVariablesTest : public testing::Test ASSERT_TRUE(mTranslator->compile(shaderStrings, 1, SH_VARIABLES)); } - ::GLenum mShaderType; + GLenum mShaderType; std::unique_ptr mTranslator; }; @@ -144,7 +142,7 @@ TEST_F(CollectFragmentVariablesTest, SimpleOutputVar) const auto &outputVariables = mTranslator->getOutputVariables(); ASSERT_EQ(1u, outputVariables.size()); - const OutputVariable &outputVariable = outputVariables[0]; + const sh::OutputVariable &outputVariable = outputVariables[0]; EXPECT_EQ(0u, outputVariable.arraySize); EXPECT_EQ(-1, outputVariable.location); @@ -169,7 +167,7 @@ TEST_F(CollectFragmentVariablesTest, LocationOutputVar) const auto &outputVariables = mTranslator->getOutputVariables(); ASSERT_EQ(1u, outputVariables.size()); - const OutputVariable &outputVariable = outputVariables[0]; + const sh::OutputVariable &outputVariable = outputVariables[0]; EXPECT_EQ(0u, outputVariable.arraySize); EXPECT_EQ(5, outputVariable.location); @@ -190,10 +188,10 @@ TEST_F(CollectVertexVariablesTest, LocationAttribute) compile(shaderString); - const std::vector &attributes = mTranslator->getAttributes(); + const std::vector &attributes = mTranslator->getAttributes(); ASSERT_EQ(1u, attributes.size()); - const Attribute &attribute = attributes[0]; + const sh::Attribute &attribute = attributes[0]; EXPECT_EQ(0u, attribute.arraySize); EXPECT_EQ(5, attribute.location); @@ -216,20 +214,20 @@ TEST_F(CollectVertexVariablesTest, SimpleInterfaceBlock) compile(shaderString); - const std::vector &interfaceBlocks = mTranslator->getInterfaceBlocks(); + const std::vector &interfaceBlocks = mTranslator->getInterfaceBlocks(); ASSERT_EQ(1u, interfaceBlocks.size()); - const InterfaceBlock &interfaceBlock = interfaceBlocks[0]; + const sh::InterfaceBlock &interfaceBlock = interfaceBlocks[0]; EXPECT_EQ(0u, interfaceBlock.arraySize); EXPECT_FALSE(interfaceBlock.isRowMajorLayout); - EXPECT_EQ(BLOCKLAYOUT_SHARED, interfaceBlock.layout); + EXPECT_EQ(sh::BLOCKLAYOUT_SHARED, interfaceBlock.layout); EXPECT_EQ("b", interfaceBlock.name); EXPECT_TRUE(interfaceBlock.staticUse); ASSERT_EQ(1u, interfaceBlock.fields.size()); - const InterfaceBlockField &field = interfaceBlock.fields[0]; + const sh::InterfaceBlockField &field = interfaceBlock.fields[0]; EXPECT_GLENUM_EQ(GL_HIGH_FLOAT, field.precision); EXPECT_TRUE(field.staticUse); @@ -252,21 +250,21 @@ TEST_F(CollectVertexVariablesTest, SimpleInstancedInterfaceBlock) compile(shaderString); - const std::vector &interfaceBlocks = mTranslator->getInterfaceBlocks(); + const std::vector &interfaceBlocks = mTranslator->getInterfaceBlocks(); ASSERT_EQ(1u, interfaceBlocks.size()); - const InterfaceBlock &interfaceBlock = interfaceBlocks[0]; + const sh::InterfaceBlock &interfaceBlock = interfaceBlocks[0]; EXPECT_EQ(0u, interfaceBlock.arraySize); EXPECT_FALSE(interfaceBlock.isRowMajorLayout); - EXPECT_EQ(BLOCKLAYOUT_SHARED, interfaceBlock.layout); + EXPECT_EQ(sh::BLOCKLAYOUT_SHARED, interfaceBlock.layout); EXPECT_EQ("b", interfaceBlock.name); EXPECT_EQ("blockInstance", interfaceBlock.instanceName); EXPECT_TRUE(interfaceBlock.staticUse); ASSERT_EQ(1u, interfaceBlock.fields.size()); - const InterfaceBlockField &field = interfaceBlock.fields[0]; + const sh::InterfaceBlockField &field = interfaceBlock.fields[0]; EXPECT_GLENUM_EQ(GL_HIGH_FLOAT, field.precision); EXPECT_TRUE(field.staticUse); @@ -290,27 +288,27 @@ TEST_F(CollectVertexVariablesTest, StructInterfaceBlock) compile(shaderString); - const std::vector &interfaceBlocks = mTranslator->getInterfaceBlocks(); + const std::vector &interfaceBlocks = mTranslator->getInterfaceBlocks(); ASSERT_EQ(1u, interfaceBlocks.size()); - const InterfaceBlock &interfaceBlock = interfaceBlocks[0]; + const sh::InterfaceBlock &interfaceBlock = interfaceBlocks[0]; EXPECT_EQ(0u, interfaceBlock.arraySize); EXPECT_FALSE(interfaceBlock.isRowMajorLayout); - EXPECT_EQ(BLOCKLAYOUT_SHARED, interfaceBlock.layout); + EXPECT_EQ(sh::BLOCKLAYOUT_SHARED, interfaceBlock.layout); EXPECT_EQ("b", interfaceBlock.name); EXPECT_TRUE(interfaceBlock.staticUse); ASSERT_EQ(1u, interfaceBlock.fields.size()); - const InterfaceBlockField &field = interfaceBlock.fields[0]; + const sh::InterfaceBlockField &field = interfaceBlock.fields[0]; EXPECT_TRUE(field.isStruct()); EXPECT_TRUE(field.staticUse); EXPECT_EQ("s", field.name); EXPECT_FALSE(field.isRowMajorLayout); - const ShaderVariable &member = field.fields[0]; + const sh::ShaderVariable &member = field.fields[0]; // NOTE: we don't currently mark struct members as statically used or not EXPECT_FALSE(member.isStruct()); @@ -333,28 +331,28 @@ TEST_F(CollectVertexVariablesTest, StructInstancedInterfaceBlock) compile(shaderString); - const std::vector &interfaceBlocks = mTranslator->getInterfaceBlocks(); + const std::vector &interfaceBlocks = mTranslator->getInterfaceBlocks(); ASSERT_EQ(1u, interfaceBlocks.size()); - const InterfaceBlock &interfaceBlock = interfaceBlocks[0]; + const sh::InterfaceBlock &interfaceBlock = interfaceBlocks[0]; EXPECT_EQ(0u, interfaceBlock.arraySize); EXPECT_FALSE(interfaceBlock.isRowMajorLayout); - EXPECT_EQ(BLOCKLAYOUT_SHARED, interfaceBlock.layout); + EXPECT_EQ(sh::BLOCKLAYOUT_SHARED, interfaceBlock.layout); EXPECT_EQ("b", interfaceBlock.name); EXPECT_EQ("instanceName", interfaceBlock.instanceName); EXPECT_TRUE(interfaceBlock.staticUse); ASSERT_EQ(1u, interfaceBlock.fields.size()); - const InterfaceBlockField &field = interfaceBlock.fields[0]; + const sh::InterfaceBlockField &field = interfaceBlock.fields[0]; EXPECT_TRUE(field.isStruct()); EXPECT_TRUE(field.staticUse); EXPECT_EQ("s", field.name); EXPECT_FALSE(field.isRowMajorLayout); - const ShaderVariable &member = field.fields[0]; + const sh::ShaderVariable &member = field.fields[0]; // NOTE: we don't currently mark struct members as statically used or not EXPECT_FALSE(member.isStruct()); @@ -377,27 +375,27 @@ TEST_F(CollectVertexVariablesTest, NestedStructRowMajorInterfaceBlock) compile(shaderString); - const std::vector &interfaceBlocks = mTranslator->getInterfaceBlocks(); + const std::vector &interfaceBlocks = mTranslator->getInterfaceBlocks(); ASSERT_EQ(1u, interfaceBlocks.size()); - const InterfaceBlock &interfaceBlock = interfaceBlocks[0]; + const sh::InterfaceBlock &interfaceBlock = interfaceBlocks[0]; EXPECT_EQ(0u, interfaceBlock.arraySize); EXPECT_TRUE(interfaceBlock.isRowMajorLayout); - EXPECT_EQ(BLOCKLAYOUT_SHARED, interfaceBlock.layout); + EXPECT_EQ(sh::BLOCKLAYOUT_SHARED, interfaceBlock.layout); EXPECT_EQ("b", interfaceBlock.name); EXPECT_TRUE(interfaceBlock.staticUse); ASSERT_EQ(1u, interfaceBlock.fields.size()); - const InterfaceBlockField &field = interfaceBlock.fields[0]; + const sh::InterfaceBlockField &field = interfaceBlock.fields[0]; EXPECT_TRUE(field.isStruct()); EXPECT_TRUE(field.staticUse); EXPECT_EQ("s", field.name); EXPECT_TRUE(field.isRowMajorLayout); - const ShaderVariable &member = field.fields[0]; + const sh::ShaderVariable &member = field.fields[0]; // NOTE: we don't currently mark struct members as statically used or not EXPECT_FALSE(member.isStruct()); @@ -419,10 +417,10 @@ TEST_F(CollectVertexVariablesTest, VaryingInterpolation) compile(shaderString); - const std::vector &varyings = mTranslator->getVaryings(); + const std::vector &varyings = mTranslator->getVaryings(); ASSERT_EQ(2u, varyings.size()); - const Varying *varying = &varyings[0]; + const sh::Varying *varying = &varyings[0]; if (varying->name == "gl_Position") { @@ -434,7 +432,7 @@ TEST_F(CollectVertexVariablesTest, VaryingInterpolation) EXPECT_TRUE(varying->staticUse); EXPECT_GLENUM_EQ(GL_FLOAT, varying->type); EXPECT_EQ("vary", varying->name); - EXPECT_EQ(INTERPOLATION_CENTROID, varying->interpolation); + EXPECT_EQ(sh::INTERPOLATION_CENTROID, varying->interpolation); } // Test for builtin uniform "gl_DepthRange" (Vertex shader) @@ -471,7 +469,7 @@ TEST_F(CollectFragmentVariablesTest, OutputVarESSL1FragColor) " gl_FragColor = vec4(1.0);\n" "}\n"; - const OutputVariable *outputVariable = nullptr; + const sh::OutputVariable *outputVariable = nullptr; validateOutputVariableForShader(fragColorShader, 0u, "gl_FragColor", &outputVariable); ASSERT_NE(outputVariable, nullptr); EXPECT_EQ(0u, outputVariable->arraySize); @@ -497,7 +495,7 @@ TEST_F(CollectFragmentVariablesTest, OutputVarESSL1FragData) resources.MaxDrawBuffers = kMaxDrawBuffers; initTranslator(resources); - const OutputVariable *outputVariable = nullptr; + const sh::OutputVariable *outputVariable = nullptr; validateOutputVariableForShader(fragDataShader, 0u, "gl_FragData", &outputVariable); ASSERT_NE(outputVariable, nullptr); EXPECT_EQ(kMaxDrawBuffers, outputVariable->arraySize); @@ -520,7 +518,7 @@ TEST_F(CollectFragmentVariablesTest, OutputVarESSL1FragDepthMediump) resources.EXT_frag_depth = 1; initTranslator(resources); - const OutputVariable *outputVariable = nullptr; + const sh::OutputVariable *outputVariable = nullptr; validateOutputVariableForShader(fragDepthShader, 0u, "gl_FragDepthEXT", &outputVariable); ASSERT_NE(outputVariable, nullptr); EXPECT_EQ(0u, outputVariable->arraySize); @@ -543,7 +541,7 @@ TEST_F(CollectFragmentVariablesTest, OutputVarESSL1FragDepthHighp) resources.FragmentPrecisionHigh = 1; initTranslator(resources); - const OutputVariable *outputVariable = nullptr; + const sh::OutputVariable *outputVariable = nullptr; validateOutputVariableForShader(fragDepthHighShader, 0u, "gl_FragDepthEXT", &outputVariable); ASSERT_NE(outputVariable, nullptr); EXPECT_EQ(0u, outputVariable->arraySize); @@ -566,7 +564,7 @@ TEST_F(CollectFragmentVariablesTest, OutputVarESSL3FragDepthHighp) resources.EXT_frag_depth = 1; initTranslator(resources); - const OutputVariable *outputVariable = nullptr; + const sh::OutputVariable *outputVariable = nullptr; validateOutputVariableForShader(fragDepthHighShader, 0u, "gl_FragDepth", &outputVariable); ASSERT_NE(outputVariable, nullptr); EXPECT_EQ(0u, outputVariable->arraySize); @@ -594,7 +592,7 @@ TEST_F(CollectFragmentVariablesTest, OutputVarESSL1EXTBlendFuncExtendedSecondary resources.MaxDualSourceDrawBuffers = resources.MaxDrawBuffers; initTranslator(resources); - const OutputVariable *outputVariable = nullptr; + const sh::OutputVariable *outputVariable = nullptr; validateOutputVariableForShader(secondaryFragColorShader, 0u, "gl_FragColor", &outputVariable); ASSERT_NE(outputVariable, nullptr); EXPECT_EQ(0u, outputVariable->arraySize); @@ -632,7 +630,7 @@ TEST_F(CollectFragmentVariablesTest, OutputVarESSL1EXTBlendFuncExtendedSecondary resources.MaxDualSourceDrawBuffers = resources.MaxDrawBuffers; initTranslator(resources); - const OutputVariable *outputVariable = nullptr; + const sh::OutputVariable *outputVariable = nullptr; validateOutputVariableForShader(secondaryFragDataShader, 0u, "gl_FragData", &outputVariable); ASSERT_NE(outputVariable, nullptr); EXPECT_EQ(kMaxDrawBuffers, outputVariable->arraySize); @@ -660,7 +658,7 @@ class CollectHashedVertexVariablesTest : public CollectVertexVariablesTest { // Initialize the translate with a hash function ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); resources.HashFunction = SimpleTestHash; initTranslator(resources); } @@ -679,14 +677,14 @@ TEST_F(CollectHashedVertexVariablesTest, InstancedInterfaceBlock) compile(shaderString); - const std::vector &interfaceBlocks = mTranslator->getInterfaceBlocks(); + const std::vector &interfaceBlocks = mTranslator->getInterfaceBlocks(); ASSERT_EQ(1u, interfaceBlocks.size()); - const InterfaceBlock &interfaceBlock = interfaceBlocks[0]; + const sh::InterfaceBlock &interfaceBlock = interfaceBlocks[0]; EXPECT_EQ(0u, interfaceBlock.arraySize); EXPECT_FALSE(interfaceBlock.isRowMajorLayout); - EXPECT_EQ(BLOCKLAYOUT_SHARED, interfaceBlock.layout); + EXPECT_EQ(sh::BLOCKLAYOUT_SHARED, interfaceBlock.layout); EXPECT_EQ("blockName", interfaceBlock.name); EXPECT_EQ("blockInstance", interfaceBlock.instanceName); EXPECT_EQ("webgl_9", interfaceBlock.mappedName); @@ -694,7 +692,7 @@ TEST_F(CollectHashedVertexVariablesTest, InstancedInterfaceBlock) ASSERT_EQ(1u, interfaceBlock.fields.size()); - const InterfaceBlockField &field = interfaceBlock.fields[0]; + const sh::InterfaceBlockField &field = interfaceBlock.fields[0]; EXPECT_GLENUM_EQ(GL_HIGH_FLOAT, field.precision); EXPECT_TRUE(field.staticUse); @@ -722,7 +720,7 @@ TEST_F(CollectHashedVertexVariablesTest, StructUniform) const auto &uniforms = mTranslator->getUniforms(); ASSERT_EQ(1u, uniforms.size()); - const Uniform &uniform = uniforms[0]; + const sh::Uniform &uniform = uniforms[0]; EXPECT_EQ(0u, uniform.arraySize); EXPECT_EQ("u", uniform.name); @@ -731,7 +729,7 @@ TEST_F(CollectHashedVertexVariablesTest, StructUniform) ASSERT_EQ(1u, uniform.fields.size()); - const ShaderVariable &field = uniform.fields[0]; + const sh::ShaderVariable &field = uniform.fields[0]; EXPECT_GLENUM_EQ(GL_HIGH_FLOAT, field.precision); // EXPECT_TRUE(field.staticUse); // we don't yet support struct static use diff --git a/gfx/angle/src/tests/compiler_tests/ConstantFolding_test.cpp b/gfx/angle/src/tests/compiler_tests/ConstantFolding_test.cpp index 4c5baffe7..1185613de 100755 --- a/gfx/angle/src/tests/compiler_tests/ConstantFolding_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/ConstantFolding_test.cpp @@ -15,8 +15,6 @@ #include "compiler/translator/PoolAlloc.h" #include "compiler/translator/TranslatorESSL.h" -using namespace sh; - template class ConstantFinder : public TIntermTraverser { @@ -109,7 +107,7 @@ class ConstantFoldingTest : public testing::Test allocator.push(); SetGlobalPoolAllocator(&allocator); ShBuiltInResources resources; - InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); mTranslatorESSL = new TranslatorESSL(GL_FRAGMENT_SHADER, SH_GLES3_SPEC); ASSERT_TRUE(mTranslatorESSL->Init(resources)); @@ -794,271 +792,3 @@ TEST_F(ConstantFoldingTest, FoldNonSquareOuterProduct) std::vector result(outputElements, outputElements + 6); ASSERT_TRUE(constantColumnMajorMatrixFoundInAST(result)); } - -// Test that folding bit shift left with non-matching signedness works. -TEST_F(ConstantFoldingTest, FoldBitShiftLeftDifferentSignedness) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " uint u = 0xffffffffu << 31;\n" - " my_FragColor = vec4(u);\n" - "}\n"; - compile(shaderString); - ASSERT_TRUE(constantFoundInAST(0x80000000u)); -} - -// Test that folding bit shift right with non-matching signedness works. -TEST_F(ConstantFoldingTest, FoldBitShiftRightDifferentSignedness) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " uint u = 0xffffffffu >> 30;\n" - " my_FragColor = vec4(u);\n" - "}\n"; - compile(shaderString); - ASSERT_TRUE(constantFoundInAST(0x3u)); -} - -// Test that folding signed bit shift right extends the sign bit. -// ESSL 3.00.6 section 5.9 Expressions. -TEST_F(ConstantFoldingTest, FoldBitShiftRightExtendSignBit) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " const int i = 0x8fffe000 >> 6;\n" - " uint u = uint(i);" - " my_FragColor = vec4(u);\n" - "}\n"; - compile(shaderString); - // The bits of the operand are 0x8fffe000 = 1000 1111 1111 1111 1110 0000 0000 0000 - // After shifting, they become 1111 1110 0011 1111 1111 1111 1000 0000 = 0xfe3fff80 - ASSERT_TRUE(constantFoundInAST(0xfe3fff80u)); -} - -// Signed bit shift left should interpret its operand as a bit pattern. As a consequence a number -// may turn from positive to negative when shifted left. -// ESSL 3.00.6 section 5.9 Expressions. -TEST_F(ConstantFoldingTest, FoldBitShiftLeftInterpretedAsBitPattern) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " const int i = 0x1fffffff << 3;\n" - " uint u = uint(i);" - " my_FragColor = vec4(u);\n" - "}\n"; - compile(shaderString); - ASSERT_TRUE(constantFoundInAST(0xfffffff8u)); -} - -// Test that dividing the minimum signed integer by -1 works. -// ESSL 3.00.6 section 4.1.3 Integers: -// "However, for the case where the minimum representable value is divided by -1, it is allowed to -// return either the minimum representable value or the maximum representable value." -TEST_F(ConstantFoldingTest, FoldDivideMinimumIntegerByMinusOne) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " int i = 0x80000000 / (-1);\n" - " my_FragColor = vec4(i);\n" - "}\n"; - compile(shaderString); - ASSERT_TRUE(constantFoundInAST(0x7fffffff) || constantFoundInAST(-0x7fffffff - 1)); -} - -// Test that folding an unsigned integer addition that overflows works. -// ESSL 3.00.6 section 4.1.3 Integers: -// "For all precisions, operations resulting in overflow or underflow will not cause any exception, -// nor will they saturate, rather they will 'wrap' to yield the low-order n bits of the result where -// n is the size in bits of the integer." -TEST_F(ConstantFoldingTest, FoldUnsignedIntegerAddOverflow) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " uint u = 0xffffffffu + 43u;\n" - " my_FragColor = vec4(u);\n" - "}\n"; - compile(shaderString); - ASSERT_TRUE(constantFoundInAST(42u)); -} - -// Test that folding a signed integer addition that overflows works. -// ESSL 3.00.6 section 4.1.3 Integers: -// "For all precisions, operations resulting in overflow or underflow will not cause any exception, -// nor will they saturate, rather they will 'wrap' to yield the low-order n bits of the result where -// n is the size in bits of the integer." -TEST_F(ConstantFoldingTest, FoldSignedIntegerAddOverflow) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " int i = 0x7fffffff + 4;\n" - " my_FragColor = vec4(i);\n" - "}\n"; - compile(shaderString); - ASSERT_TRUE(constantFoundInAST(-0x7ffffffd)); -} - -// Test that folding an unsigned integer subtraction that overflows works. -// ESSL 3.00.6 section 4.1.3 Integers: -// "For all precisions, operations resulting in overflow or underflow will not cause any exception, -// nor will they saturate, rather they will 'wrap' to yield the low-order n bits of the result where -// n is the size in bits of the integer." -TEST_F(ConstantFoldingTest, FoldUnsignedIntegerDiffOverflow) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " uint u = 0u - 5u;\n" - " my_FragColor = vec4(u);\n" - "}\n"; - compile(shaderString); - ASSERT_TRUE(constantFoundInAST(0xfffffffbu)); -} - -// Test that folding a signed integer subtraction that overflows works. -// ESSL 3.00.6 section 4.1.3 Integers: -// "For all precisions, operations resulting in overflow or underflow will not cause any exception, -// nor will they saturate, rather they will 'wrap' to yield the low-order n bits of the result where -// n is the size in bits of the integer." -TEST_F(ConstantFoldingTest, FoldSignedIntegerDiffOverflow) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " int i = -0x7fffffff - 7;\n" - " my_FragColor = vec4(i);\n" - "}\n"; - compile(shaderString); - ASSERT_TRUE(constantFoundInAST(0x7ffffffa)); -} - -// Test that folding an unsigned integer multiplication that overflows works. -// ESSL 3.00.6 section 4.1.3 Integers: -// "For all precisions, operations resulting in overflow or underflow will not cause any exception, -// nor will they saturate, rather they will 'wrap' to yield the low-order n bits of the result where -// n is the size in bits of the integer." -TEST_F(ConstantFoldingTest, FoldUnsignedIntegerMultiplyOverflow) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " uint u = 0xffffffffu * 10u;\n" - " my_FragColor = vec4(u);\n" - "}\n"; - compile(shaderString); - ASSERT_TRUE(constantFoundInAST(0xfffffff6u)); -} - -// Test that folding a signed integer multiplication that overflows works. -// ESSL 3.00.6 section 4.1.3 Integers: -// "For all precisions, operations resulting in overflow or underflow will not cause any exception, -// nor will they saturate, rather they will 'wrap' to yield the low-order n bits of the result where -// n is the size in bits of the integer." -TEST_F(ConstantFoldingTest, FoldSignedIntegerMultiplyOverflow) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " int i = 0x7fffffff * 42;\n" - " my_FragColor = vec4(i);\n" - "}\n"; - compile(shaderString); - ASSERT_TRUE(constantFoundInAST(-42)); -} - -// Test that folding of negating the minimum representable integer works. Note that in the test -// "0x80000000" is a negative literal, and the minus sign before it is the negation operator. -// ESSL 3.00.6 section 4.1.3 Integers: -// "For all precisions, operations resulting in overflow or underflow will not cause any exception, -// nor will they saturate, rather they will 'wrap' to yield the low-order n bits of the result where -// n is the size in bits of the integer." -TEST_F(ConstantFoldingTest, FoldMinimumSignedIntegerNegation) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " int i = -0x80000000;\n" - " my_FragColor = vec4(i);\n" - "}\n"; - compile(shaderString); - // Negating the minimum signed integer overflows the positive range, so it wraps back to itself. - ASSERT_TRUE(constantFoundInAST(-0x7fffffff - 1)); -} - -// Test that folding of shifting the minimum representable integer works. -TEST_F(ConstantFoldingTest, FoldMinimumSignedIntegerRightShift) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " int i = (0x80000000 >> 1);\n" - " int j = (0x80000000 >> 7);\n" - " my_FragColor = vec4(i, j, i, j);\n" - "}\n"; - compile(shaderString); - ASSERT_TRUE(constantFoundInAST(-0x40000000)); - ASSERT_TRUE(constantFoundInAST(-0x01000000)); -} - -// Test that folding of shifting by 0 works. -TEST_F(ConstantFoldingTest, FoldShiftByZero) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " int i = (3 >> 0);\n" - " int j = (73 << 0);\n" - " my_FragColor = vec4(i, j, i, j);\n" - "}\n"; - compile(shaderString); - ASSERT_TRUE(constantFoundInAST(3)); - ASSERT_TRUE(constantFoundInAST(73)); -} diff --git a/gfx/angle/src/tests/compiler_tests/DebugShaderPrecision_test.cpp b/gfx/angle/src/tests/compiler_tests/DebugShaderPrecision_test.cpp index d1bee424a..dbaffa5d4 100755 --- a/gfx/angle/src/tests/compiler_tests/DebugShaderPrecision_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/DebugShaderPrecision_test.cpp @@ -12,8 +12,6 @@ #include "GLSLANG/ShaderLang.h" #include "tests/test_utils/compiler_test.h" -using namespace sh; - class DebugShaderPrecisionTest : public MatchOutputCodeTest { public: @@ -1025,23 +1023,3 @@ TEST_F(DebugShaderPrecisionTest, ModfOutParameter) ASSERT_TRUE(foundInAllGLSLCode("modf(angle_frm(u), o)")); ASSERT_TRUE(foundInHLSLCode("modf(angle_frm(_u), _o)")); } - -#if defined(ANGLE_ENABLE_HLSL) -// Tests precision emulation with HLSL 3.0 output -- should error gracefully. -TEST(DebugShaderPrecisionNegativeTest, HLSL3Unsupported) -{ - const std::string &shaderString = - "precision mediump float;\n" - "uniform float u;\n" - "void main() {\n" - " gl_FragColor = vec4(u);\n" - "}\n"; - std::string infoLog; - std::string translatedCode; - ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); - resources.WEBGL_debug_shader_precision = 1; - ASSERT_FALSE(compileTestShader(GL_FRAGMENT_SHADER, SH_GLES3_SPEC, SH_HLSL_3_0_OUTPUT, - shaderString, &resources, 0, &translatedCode, &infoLog)); -} -#endif // defined(ANGLE_ENABLE_HLSL) diff --git a/gfx/angle/src/tests/compiler_tests/EXT_blend_func_extended_test.cpp b/gfx/angle/src/tests/compiler_tests/EXT_blend_func_extended_test.cpp index 3ac0ff6d8..40aeed28d 100755 --- a/gfx/angle/src/tests/compiler_tests/EXT_blend_func_extended_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/EXT_blend_func_extended_test.cpp @@ -124,7 +124,7 @@ class EXTBlendFuncExtendedTest protected: virtual void SetUp() { - sh::InitBuiltInResources(&mResources); + ShInitBuiltInResources(&mResources); // EXT_draw_buffers is used in some of the shaders for test purposes. mResources.EXT_draw_buffers = 1; mResources.NV_draw_buffers = 2; @@ -137,7 +137,7 @@ class EXTBlendFuncExtendedTest { if (mCompiler) { - sh::Destruct(mCompiler); + ShDestruct(mCompiler); mCompiler = NULL; } } @@ -145,8 +145,8 @@ class EXTBlendFuncExtendedTest void InitializeCompiler() { DestroyCompiler(); - mCompiler = sh::ConstructCompiler(GL_FRAGMENT_SHADER, testing::get<0>(GetParam()), - SH_GLSL_COMPATIBILITY_OUTPUT, &mResources); + mCompiler = ShConstructCompiler(GL_FRAGMENT_SHADER, testing::get<0>(GetParam()), + SH_GLSL_COMPATIBILITY_OUTPUT, &mResources); ASSERT_TRUE(mCompiler != NULL) << "Compiler could not be constructed."; } @@ -163,12 +163,12 @@ class EXTBlendFuncExtendedTest const char *shader) { const char *shaderStrings[] = {version, pragma, shader}; - bool success = sh::Compile(mCompiler, shaderStrings, 3, 0); + bool success = ShCompile(mCompiler, shaderStrings, 3, 0); if (success) { return ::testing::AssertionSuccess() << "Compilation success"; } - return ::testing::AssertionFailure() << sh::GetInfoLog(mCompiler); + return ::testing::AssertionFailure() << ShGetInfoLog(mCompiler); } protected: diff --git a/gfx/angle/src/tests/compiler_tests/EmulateGLFragColorBroadcast_test.cpp b/gfx/angle/src/tests/compiler_tests/EmulateGLFragColorBroadcast_test.cpp index 07cf3fd68..dc286b814 100755 --- a/gfx/angle/src/tests/compiler_tests/EmulateGLFragColorBroadcast_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/EmulateGLFragColorBroadcast_test.cpp @@ -12,8 +12,6 @@ #include "GLSLANG/ShaderLang.h" #include "tests/test_utils/compiler_test.h" -using namespace sh; - namespace { diff --git a/gfx/angle/src/tests/compiler_tests/ExpressionLimit_test.cpp b/gfx/angle/src/tests/compiler_tests/ExpressionLimit_test.cpp index 8f7d7ef4f..5d80f2acf 100755 --- a/gfx/angle/src/tests/compiler_tests/ExpressionLimit_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/ExpressionLimit_test.cpp @@ -32,7 +32,7 @@ protected: // Set up the per compile resources static void GenerateResources(ShBuiltInResources *res) { - sh::InitBuiltInResources(res); + ShInitBuiltInResources(res); res->MaxVertexAttribs = 8; res->MaxVertexUniformVectors = 128; @@ -176,17 +176,17 @@ protected: // to the issue we are testing. bool CheckShaderCompilation(ShHandle compiler, const char *source, - ShCompileOptions compileOptions, + int compileOptions, const char *expected_error) { - bool success = sh::Compile(compiler, &source, 1, compileOptions) != 0; - if (success) - { - success = !expected_error; + bool success = ShCompile(compiler, &source, 1, compileOptions) != 0; + if (success) + { + success = !expected_error; } else { - std::string log = sh::GetInfoLog(compiler); + std::string log = ShGetInfoLog(compiler); if (expected_error) success = log.find(expected_error) != std::string::npos; @@ -211,8 +211,9 @@ TEST_F(ExpressionLimitTest, ExpressionComplexity) { ShShaderSpec spec = SH_WEBGL_SPEC; ShShaderOutput output = SH_ESSL_OUTPUT; - ShHandle vertexCompiler = sh::ConstructCompiler(GL_FRAGMENT_SHADER, spec, output, &resources); - ShCompileOptions compileOptions = SH_LIMIT_EXPRESSION_COMPLEXITY; + ShHandle vertexCompiler = ShConstructCompiler( + GL_FRAGMENT_SHADER, spec, output, &resources); + int compileOptions = SH_LIMIT_EXPRESSION_COMPLEXITY; // Test expression under the limit passes. EXPECT_TRUE(CheckShaderCompilation( @@ -232,15 +233,16 @@ TEST_F(ExpressionLimitTest, ExpressionComplexity) GenerateShaderWithLongExpression( kMaxExpressionComplexity + 10).c_str(), compileOptions & ~SH_LIMIT_EXPRESSION_COMPLEXITY, NULL)); - sh::Destruct(vertexCompiler); + ShDestruct(vertexCompiler); } TEST_F(ExpressionLimitTest, UnusedExpressionComplexity) { ShShaderSpec spec = SH_WEBGL_SPEC; ShShaderOutput output = SH_ESSL_OUTPUT; - ShHandle vertexCompiler = sh::ConstructCompiler(GL_FRAGMENT_SHADER, spec, output, &resources); - ShCompileOptions compileOptions = SH_LIMIT_EXPRESSION_COMPLEXITY; + ShHandle vertexCompiler = ShConstructCompiler( + GL_FRAGMENT_SHADER, spec, output, &resources); + int compileOptions = SH_LIMIT_EXPRESSION_COMPLEXITY; // Test expression under the limit passes. EXPECT_TRUE(CheckShaderCompilation( @@ -260,15 +262,16 @@ TEST_F(ExpressionLimitTest, UnusedExpressionComplexity) GenerateShaderWithUnusedLongExpression( kMaxExpressionComplexity + 10).c_str(), compileOptions & ~SH_LIMIT_EXPRESSION_COMPLEXITY, NULL)); - sh::Destruct(vertexCompiler); + ShDestruct(vertexCompiler); } TEST_F(ExpressionLimitTest, CallStackDepth) { ShShaderSpec spec = SH_WEBGL_SPEC; ShShaderOutput output = SH_ESSL_OUTPUT; - ShHandle vertexCompiler = sh::ConstructCompiler(GL_FRAGMENT_SHADER, spec, output, &resources); - ShCompileOptions compileOptions = SH_LIMIT_CALL_STACK_DEPTH; + ShHandle vertexCompiler = ShConstructCompiler( + GL_FRAGMENT_SHADER, spec, output, &resources); + int compileOptions = SH_LIMIT_CALL_STACK_DEPTH; // Test call stack under the limit passes. EXPECT_TRUE(CheckShaderCompilation( @@ -288,15 +291,16 @@ TEST_F(ExpressionLimitTest, CallStackDepth) GenerateShaderWithDeepFunctionStack( kMaxCallStackDepth + 10).c_str(), compileOptions & ~SH_LIMIT_CALL_STACK_DEPTH, NULL)); - sh::Destruct(vertexCompiler); + ShDestruct(vertexCompiler); } TEST_F(ExpressionLimitTest, UnusedCallStackDepth) { ShShaderSpec spec = SH_WEBGL_SPEC; ShShaderOutput output = SH_ESSL_OUTPUT; - ShHandle vertexCompiler = sh::ConstructCompiler(GL_FRAGMENT_SHADER, spec, output, &resources); - ShCompileOptions compileOptions = SH_LIMIT_CALL_STACK_DEPTH; + ShHandle vertexCompiler = ShConstructCompiler( + GL_FRAGMENT_SHADER, spec, output, &resources); + int compileOptions = SH_LIMIT_CALL_STACK_DEPTH; // Test call stack under the limit passes. EXPECT_TRUE(CheckShaderCompilation( @@ -316,15 +320,16 @@ TEST_F(ExpressionLimitTest, UnusedCallStackDepth) GenerateShaderWithUnusedDeepFunctionStack( kMaxCallStackDepth + 10).c_str(), compileOptions & ~SH_LIMIT_CALL_STACK_DEPTH, NULL)); - sh::Destruct(vertexCompiler); + ShDestruct(vertexCompiler); } TEST_F(ExpressionLimitTest, Recursion) { ShShaderSpec spec = SH_WEBGL_SPEC; ShShaderOutput output = SH_ESSL_OUTPUT; - ShHandle vertexCompiler = sh::ConstructCompiler(GL_FRAGMENT_SHADER, spec, output, &resources); - ShCompileOptions compileOptions = 0; + ShHandle vertexCompiler = ShConstructCompiler( + GL_FRAGMENT_SHADER, spec, output, &resources); + int compileOptions = 0; static const char* shaderWithRecursion0 = SHADER( precision mediump float; @@ -531,15 +536,15 @@ TEST_F(ExpressionLimitTest, Recursion) EXPECT_TRUE(CheckShaderCompilation( vertexCompiler, shaderWithNoRecursion, compileOptions | SH_LIMIT_CALL_STACK_DEPTH, NULL)); - sh::Destruct(vertexCompiler); + ShDestruct(vertexCompiler); } TEST_F(ExpressionLimitTest, FunctionParameterCount) { ShShaderSpec spec = SH_WEBGL_SPEC; ShShaderOutput output = SH_ESSL_OUTPUT; - ShHandle compiler = sh::ConstructCompiler(GL_FRAGMENT_SHADER, spec, output, &resources); - ShCompileOptions compileOptions = SH_LIMIT_EXPRESSION_COMPLEXITY; + ShHandle compiler = ShConstructCompiler(GL_FRAGMENT_SHADER, spec, output, &resources); + int compileOptions = SH_LIMIT_EXPRESSION_COMPLEXITY; // Test parameters under the limit succeeds. EXPECT_TRUE(CheckShaderCompilation( @@ -553,5 +558,5 @@ TEST_F(ExpressionLimitTest, FunctionParameterCount) EXPECT_TRUE(CheckShaderCompilation( compiler, GenerateShaderWithFunctionParameters(kMaxFunctionParameters + 1).c_str(), compileOptions & ~SH_LIMIT_EXPRESSION_COMPLEXITY, nullptr)); - sh::Destruct(compiler); + ShDestruct(compiler); } diff --git a/gfx/angle/src/tests/compiler_tests/FragDepth_test.cpp b/gfx/angle/src/tests/compiler_tests/FragDepth_test.cpp index 1d3e358ca..d3c87987a 100755 --- a/gfx/angle/src/tests/compiler_tests/FragDepth_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/FragDepth_test.cpp @@ -23,7 +23,7 @@ class FragDepthTest : public testing::TestWithParam protected: void SetUp() override { - sh::InitBuiltInResources(&mResources); + ShInitBuiltInResources(&mResources); mCompiler = nullptr; mResources.EXT_frag_depth = GetParam(); } @@ -33,7 +33,7 @@ class FragDepthTest : public testing::TestWithParam { if (mCompiler) { - sh::Destruct(mCompiler); + ShDestruct(mCompiler); mCompiler = nullptr; } } @@ -41,8 +41,8 @@ class FragDepthTest : public testing::TestWithParam void InitializeCompiler() { DestroyCompiler(); - mCompiler = sh::ConstructCompiler(GL_FRAGMENT_SHADER, SH_GLES3_SPEC, - SH_GLSL_COMPATIBILITY_OUTPUT, &mResources); + mCompiler = ShConstructCompiler(GL_FRAGMENT_SHADER, SH_GLES3_SPEC, + SH_GLSL_COMPATIBILITY_OUTPUT, &mResources); ASSERT_TRUE(mCompiler != nullptr) << "Compiler could not be constructed."; } @@ -51,12 +51,12 @@ class FragDepthTest : public testing::TestWithParam const char *shader) { const char *shaderStrings[] = {version, pragma, shader}; - bool success = sh::Compile(mCompiler, shaderStrings, 3, 0); + bool success = ShCompile(mCompiler, shaderStrings, 3, 0); if (success) { return ::testing::AssertionSuccess() << "Compilation success"; } - return ::testing::AssertionFailure() << sh::GetInfoLog(mCompiler); + return ::testing::AssertionFailure() << ShGetInfoLog(mCompiler); } protected: diff --git a/gfx/angle/src/tests/compiler_tests/GLSLCompatibilityOutput_test.cpp b/gfx/angle/src/tests/compiler_tests/GLSLCompatibilityOutput_test.cpp index 8adec774a..326d70d29 100755 --- a/gfx/angle/src/tests/compiler_tests/GLSLCompatibilityOutput_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/GLSLCompatibilityOutput_test.cpp @@ -12,8 +12,6 @@ #include "GLSLANG/ShaderLang.h" #include "tests/test_utils/compiler_test.h" -using namespace sh; - class GLSLCompatibilityOutputTest : public MatchOutputCodeTest { public: diff --git a/gfx/angle/src/tests/compiler_tests/IntermNode_test.cpp b/gfx/angle/src/tests/compiler_tests/IntermNode_test.cpp index 1a14ad86c..b0f7404d3 100755 --- a/gfx/angle/src/tests/compiler_tests/IntermNode_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/IntermNode_test.cpp @@ -13,8 +13,6 @@ #include "compiler/translator/IntermNode.h" #include "compiler/translator/PoolAlloc.h" -using namespace sh; - class IntermNodeTest : public testing::Test { public: @@ -149,8 +147,10 @@ TEST_F(IntermNodeTest, DeepCopyBinaryNode) { TType type(EbtFloat, EbpHigh); - TIntermBinary *original = new TIntermBinary(EOpAdd, createTestSymbol(), createTestSymbol()); + TIntermBinary *original = new TIntermBinary(EOpAdd); original->setLine(getTestSourceLoc()); + original->setLeft(createTestSymbol()); + original->setRight(createTestSymbol()); TIntermTyped *copyTyped = original->deepCopy(); TIntermBinary *copy = copyTyped->getAsBinaryNode(); ASSERT_NE(nullptr, copy); @@ -168,8 +168,9 @@ TEST_F(IntermNodeTest, DeepCopyUnaryNode) { TType type(EbtFloat, EbpHigh); - TIntermUnary *original = new TIntermUnary(EOpPreIncrement, createTestSymbol()); + TIntermUnary *original = new TIntermUnary(EOpPreIncrement); original->setLine(getTestSourceLoc()); + original->setOperand(createTestSymbol()); TIntermTyped *copyTyped = original->deepCopy(); TIntermUnary *copy = copyTyped->getAsUnaryNode(); ASSERT_NE(nullptr, copy); @@ -209,24 +210,24 @@ TEST_F(IntermNodeTest, DeepCopyAggregateNode) } } -// Check that the deep copy of a ternary node is an actual copy with the same attributes as the +// Check that the deep copy of a selection node is an actual copy with the same attributes as the // original. Child nodes also need to be copies with the same attributes as the original children. -TEST_F(IntermNodeTest, DeepCopyTernaryNode) +TEST_F(IntermNodeTest, DeepCopySelectionNode) { TType type(EbtFloat, EbpHigh); - TIntermTernary *original = new TIntermTernary(createTestSymbol(TType(EbtBool, EbpUndefined)), - createTestSymbol(), createTestSymbol()); + TIntermSelection *original = new TIntermSelection( + createTestSymbol(TType(EbtBool, EbpUndefined)), createTestSymbol(), createTestSymbol()); original->setLine(getTestSourceLoc()); TIntermTyped *copyTyped = original->deepCopy(); - TIntermTernary *copy = copyTyped->getAsTernaryNode(); + TIntermSelection *copy = copyTyped->getAsSelectionNode(); ASSERT_NE(nullptr, copy); ASSERT_NE(original, copy); checkTestSourceLoc(copy->getLine()); checkTypeEqualWithQualifiers(original->getType(), copy->getType()); checkSymbolCopy(original->getCondition(), copy->getCondition()); - checkSymbolCopy(original->getTrueExpression(), copy->getTrueExpression()); - checkSymbolCopy(original->getFalseExpression(), copy->getFalseExpression()); + checkSymbolCopy(original->getTrueBlock(), copy->getTrueBlock()); + checkSymbolCopy(original->getFalseBlock(), copy->getFalseBlock()); } diff --git a/gfx/angle/src/tests/compiler_tests/MalformedShader_test.cpp b/gfx/angle/src/tests/compiler_tests/MalformedShader_test.cpp index e84fc7014..51ad72a0f 100755 --- a/gfx/angle/src/tests/compiler_tests/MalformedShader_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/MalformedShader_test.cpp @@ -12,8 +12,6 @@ #include "GLSLANG/ShaderLang.h" #include "compiler/translator/TranslatorESSL.h" -using namespace sh; - class MalformedShaderTest : public testing::Test { public: @@ -23,7 +21,7 @@ class MalformedShaderTest : public testing::Test virtual void SetUp() { ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); mTranslator = new TranslatorESSL(GL_FRAGMENT_SHADER, SH_GLES3_SPEC); ASSERT_TRUE(mTranslator->Init(resources)); @@ -53,7 +51,7 @@ class MalformedShaderTest : public testing::Test protected: std::string mInfoLog; TranslatorESSL *mTranslator; - ShCompileOptions mExtraCompileOptions; + int mExtraCompileOptions; }; class MalformedVertexShaderTest : public MalformedShaderTest @@ -65,7 +63,7 @@ class MalformedVertexShaderTest : public MalformedShaderTest void SetUp() override { ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); mTranslator = new TranslatorESSL(GL_VERTEX_SHADER, SH_GLES3_SPEC); ASSERT_TRUE(mTranslator->Init(resources)); @@ -81,7 +79,7 @@ class MalformedWebGL2ShaderTest : public MalformedShaderTest void SetUp() override { ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); mTranslator = new TranslatorESSL(GL_FRAGMENT_SHADER, SH_WEBGL2_SPEC); ASSERT_TRUE(mTranslator->Init(resources)); @@ -97,7 +95,7 @@ class MalformedWebGL1ShaderTest : public MalformedShaderTest void SetUp() override { ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); mTranslator = new TranslatorESSL(GL_FRAGMENT_SHADER, SH_WEBGL_SPEC); ASSERT_TRUE(mTranslator->Init(resources)); @@ -113,7 +111,7 @@ class MalformedVertexShaderGLES31Test : public MalformedShaderTest void SetUp() override { ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); mTranslator = new TranslatorESSL(GL_VERTEX_SHADER, SH_GLES3_1_SPEC); ASSERT_TRUE(mTranslator->Init(resources)); } @@ -128,7 +126,7 @@ class MalformedFragmentShaderGLES31Test : public MalformedShaderTest void SetUp() override { ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); mTranslator = new TranslatorESSL(GL_FRAGMENT_SHADER, SH_GLES3_1_SPEC); ASSERT_TRUE(mTranslator->Init(resources)); } @@ -143,7 +141,7 @@ class MalformedComputeShaderTest : public MalformedShaderTest void SetUp() override { ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); mTranslator = new TranslatorESSL(GL_COMPUTE_SHADER, SH_GLES3_1_SPEC); ASSERT_TRUE(mTranslator->Init(resources)); } @@ -2325,7 +2323,7 @@ TEST_F(MalformedComputeShaderTest, CorrectUsageOfComputeBuiltins) } } -// It is illegal to write to a special variable. +// It is illegal to write to a special variable TEST_F(MalformedComputeShaderTest, SpecialVariableNumWorkGroups) { const std::string &shaderString = @@ -2341,7 +2339,7 @@ TEST_F(MalformedComputeShaderTest, SpecialVariableNumWorkGroups) } } -// It is illegal to write to a special variable. +// It is illegal to write to a special variable TEST_F(MalformedComputeShaderTest, SpecialVariableWorkGroupID) { const std::string &shaderString = @@ -2357,7 +2355,7 @@ TEST_F(MalformedComputeShaderTest, SpecialVariableWorkGroupID) } } -// It is illegal to write to a special variable. +// It is illegal to write to a special variable TEST_F(MalformedComputeShaderTest, SpecialVariableLocalInvocationID) { const std::string &shaderString = @@ -2373,7 +2371,7 @@ TEST_F(MalformedComputeShaderTest, SpecialVariableLocalInvocationID) } } -// It is illegal to write to a special variable. +// It is illegal to write to a special variable TEST_F(MalformedComputeShaderTest, SpecialVariableGlobalInvocationID) { const std::string &shaderString = @@ -2389,7 +2387,7 @@ TEST_F(MalformedComputeShaderTest, SpecialVariableGlobalInvocationID) } } -// It is illegal to write to a special variable. +// It is illegal to write to a special variable TEST_F(MalformedComputeShaderTest, SpecialVariableLocalInvocationIndex) { const std::string &shaderString = @@ -2405,7 +2403,7 @@ TEST_F(MalformedComputeShaderTest, SpecialVariableLocalInvocationIndex) } } -// It is illegal to write to a special variable. +// It is illegal to write to a special variable TEST_F(MalformedComputeShaderTest, SpecialVariableWorkGroupSize) { const std::string &shaderString = @@ -2437,722 +2435,3 @@ TEST_F(MalformedShaderTest, SamplerUnaryOperator) FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; } } - -// Invariant cannot be used with a work group size declaration. -TEST_F(MalformedComputeShaderTest, InvariantBlockSize) -{ - const std::string &shaderString = - "#version 310 es\n" - "invariant layout(local_size_x = 15) in;\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Invariant cannot be used with a non-output variable in ESSL3. -TEST_F(MalformedShaderTest, InvariantNonOuput) -{ - const std::string &shaderString = - "#version 300 es\n" - "invariant int value;\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Invariant declaration should follow the following format "invariant ". -// Test having an incorrect qualifier in the invariant declaration. -TEST_F(MalformedShaderTest, InvariantDeclarationWithStorageQualifier) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 foo;\n" - "invariant centroid foo;\n" - "void main() {\n" - "}\n"; - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Invariant declaration should follow the following format "invariant ". -// Test having an incorrect precision qualifier in the invariant declaration. -TEST_F(MalformedShaderTest, InvariantDeclarationWithPrecisionQualifier) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 foo;\n" - "invariant highp foo;\n" - "void main() {\n" - "}\n"; - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Invariant declaration should follow the following format "invariant ". -// Test having an incorrect layout qualifier in the invariant declaration. -TEST_F(MalformedShaderTest, InvariantDeclarationWithLayoutQualifier) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 foo;\n" - "invariant layout(location=0) foo;\n" - "void main() {\n" - "}\n"; - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Variable declaration with both invariant and layout qualifiers is not valid in the formal grammar -// provided in the ESSL 3.00 spec. ESSL 3.10 starts allowing this combination, but ESSL 3.00 should -// still disallow it. -TEST_F(MalformedShaderTest, VariableDeclarationWithInvariantAndLayoutQualifierESSL300) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "invariant layout(location = 0) out vec4 my_FragColor;\n" - "void main() {\n" - "}\n"; - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Bit shift with a rhs value > 31 has an undefined result in the GLSL spec. We disallow it. -// ESSL 3.00.6 section 5.9. -TEST_F(MalformedShaderTest, ShiftBy32) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "void main() {\n" - " uint u = 1u << 32u;\n" - "}\n"; - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Test that deferring global variable init works with an empty main(). -TEST_F(MalformedShaderTest, DeferGlobalVariableInitWithEmptyMain) -{ - const std::string &shaderString = - "precision mediump float;\n" - "uniform float u;\n" - "float foo = u;\n" - "void main() {}\n"; - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed, expecting success " << mInfoLog; - } -} - -// Test that pruning empty declarations from loop init expression works. -TEST_F(MalformedShaderTest, EmptyDeclarationAsLoopInit) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " int i = 0;\n" - " for (int; i < 3; i++)\n" - " {\n" - " my_FragColor = vec4(i);\n" - " }\n" - "}\n"; - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed, expecting success " << mInfoLog; - } -} -// r32f, r32i, r32ui do not require either the writeonly or readonly memory qualifiers. -// GLSL ES 3.10, Revision 4, 4.9 Memory Access Qualifiers -TEST_F(MalformedFragmentShaderGLES31Test, ImageR32FNoMemoryQualifier) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "in vec4 myInput;\n" - "layout(r32f) uniform image2D myImage;\n" - "void main() {\n" - "}\n"; - - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed, expecting success " << mInfoLog; - } -} - -// Images which do not have r32f, r32i or r32ui as internal format, must have readonly or writeonly -// specified. -// GLSL ES 3.10, Revision 4, 4.9 Memory Access Qualifiers -TEST_F(MalformedFragmentShaderGLES31Test, ImageR32FWithCorrectMemoryQualifier) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "in vec4 myInput;\n" - "layout(rgba32f) uniform image2D myImage;\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// It is a compile-time error to call imageStore when the image is qualified as readonly. -// GLSL ES 3.10 Revision 4, 4.9 Memory Access Qualifiers -TEST_F(MalformedFragmentShaderGLES31Test, StoreInReadOnlyImage) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "in vec4 myInput;\n" - "layout(r32f) uniform readonly image2D myImage;\n" - "void main() {\n" - " imageStore(myImage, ivec2(0), vec4(1.0));\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// It is a compile-time error to call imageLoad when the image is qualified as writeonly. -// GLSL ES 3.10 Revision 4, 4.9 Memory Access Qualifiers -TEST_F(MalformedFragmentShaderGLES31Test, LoadFromWriteOnlyImage) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "in vec4 myInput;\n" - "layout(r32f) uniform writeonly image2D myImage;\n" - "void main() {\n" - " imageLoad(myImage, ivec2(0));\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// A valid declaration and usage of an image3D. -TEST_F(MalformedFragmentShaderGLES31Test, ValidImage3D) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image3D;\n" - "in vec4 myInput;\n" - "layout(rgba32f) uniform readonly image3D myImage;\n" - "void main() {\n" - " imageLoad(myImage, ivec3(0));\n" - "}\n"; - - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed, expecting success " << mInfoLog; - } -} - -// A valid declaration and usage of an imageCube. -TEST_F(MalformedFragmentShaderGLES31Test, ValidImageCube) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump imageCube;\n" - "in vec4 myInput;\n" - "layout(rgba32f) uniform readonly imageCube myImage;\n" - "void main() {\n" - " imageLoad(myImage, ivec3(0));\n" - "}\n"; - - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed, expecting success " << mInfoLog; - } -} - -// A valid declaration and usage of an image2DArray. -TEST_F(MalformedFragmentShaderGLES31Test, ValidImage2DArray) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2DArray;\n" - "in vec4 myInput;\n" - "layout(rgba32f) uniform readonly image2DArray myImage;\n" - "void main() {\n" - " imageLoad(myImage, ivec3(0));\n" - "}\n"; - - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed, expecting success " << mInfoLog; - } -} - -// Images cannot be l-values. -// GLSL ES 3.10 Revision 4, 4.1.7 Opaque Types -TEST_F(MalformedFragmentShaderGLES31Test, ImageLValueFunctionDefinitionInOut) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "void myFunc(inout image2D someImage) {}\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Cannot assign to images. -// GLSL ES 3.10 Revision 4, 4.1.7 Opaque Types -TEST_F(MalformedFragmentShaderGLES31Test, ImageAssignment) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "layout(rgba32f) uniform readonly image2D myImage;\n" - "layout(rgba32f) uniform readonly image2D myImage2;\n" - "void main() {\n" - " myImage = myImage2;\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Passing an image qualifier to a function should not be able to discard the readonly qualifier. -// GLSL ES 3.10 Revision 4, 4.9 Memory Access Qualifiers -TEST_F(MalformedFragmentShaderGLES31Test, ReadOnlyQualifierMissingInFunctionArgument) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "layout(rgba32f) uniform readonly image2D myImage;\n" - "void myFunc(in image2D someImage) {}\n" - "void main() {\n" - " myFunc(myImage);\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Passing an image qualifier to a function should not be able to discard the writeonly qualifier. -// GLSL ES 3.10 Revision 4, 4.9 Memory Access Qualifiers -TEST_F(MalformedFragmentShaderGLES31Test, WriteOnlyQualifierMissingInFunctionArgument) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "layout(rgba32f) uniform writeonly image2D myImage;\n" - "void myFunc(in image2D someImage) {}\n" - "void main() {\n" - " myFunc(myImage);\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Passing an image parameter as an argument to another function should not be able to discard the -// writeonly qualifier. -// GLSL ES 3.10 Revision 4, 4.9 Memory Access Qualifiers -TEST_F(MalformedFragmentShaderGLES31Test, DiscardWriteonlyInFunctionBody) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "layout(rgba32f) uniform writeonly image2D myImage;\n" - "void myFunc1(in image2D someImage) {}\n" - "void myFunc2(in writeonly image2D someImage) { myFunc1(someImage); }\n" - "void main() {\n" - " myFunc2(myImage);\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// The memory qualifiers for the image declaration and function argument match and the test should -// pass. -TEST_F(MalformedFragmentShaderGLES31Test, CorrectImageMemoryQualifierSpecified) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "layout(r32f) uniform image2D myImage;\n" - "void myFunc(in image2D someImage) {}\n" - "void main() {\n" - " myFunc(myImage);\n" - "}\n"; - - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed, expecting success " << mInfoLog; - } -} - -// The test adds additional qualifiers to the argument in the function header. -// This is correct since no memory qualifiers are discarded upon the function call. -// GLSL ES 3.10 Revision 4, 4.9 Memory Access Qualifiers -TEST_F(MalformedFragmentShaderGLES31Test, CorrectImageMemoryQualifierSpecified2) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "layout(r32f) uniform image2D myImage;\n" - "void myFunc(in readonly writeonly image2D someImage) {}\n" - "void main() {\n" - " myFunc(myImage);\n" - "}\n"; - - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed, expecting success " << mInfoLog; - } -} - -// Images are not allowed in structs. -// GLSL ES 3.10 Revision 4, 4.1.8 Structures -TEST_F(MalformedFragmentShaderGLES31Test, ImageInStruct) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "struct myStruct { layout(r32f) image2D myImage; };\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Images are not allowed in interface blocks. -// GLSL ES 3.10 Revision 4, 4.3.9 Interface Blocks -TEST_F(MalformedFragmentShaderGLES31Test, ImageInInterfaceBlock) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "uniform myBlock { layout(r32f) image2D myImage; };\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Readonly used with an interface block. -TEST_F(MalformedFragmentShaderGLES31Test, ReadonlyWithInterfaceBlock) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "uniform readonly myBlock { float something; };\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Readonly used with an invariant. -TEST_F(MalformedFragmentShaderGLES31Test, ReadonlyWithInvariant) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "out vec4 something;\n" - "invariant readonly something;\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Readonly used with a member of a structure. -TEST_F(MalformedFragmentShaderGLES31Test, ReadonlyWithStructMember) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "out vec4 something;\n" - "struct MyStruct { readonly float myMember; };\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// It should not be possible to use an internal format layout qualifier with an interface block. -TEST_F(MalformedFragmentShaderGLES31Test, ImageInternalFormatWithInterfaceBlock) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "out vec4 something;\n" - "layout(rgba32f) uniform MyStruct { float myMember; };\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// It should not be possible to use an internal format layout qualifier with a uniform without a -// type. -TEST_F(MalformedFragmentShaderGLES31Test, ImageInternalFormatInGlobalLayoutQualifier) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "out vec4 something;\n" - "layout(rgba32f) uniform;\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// ESSL 1.00 section 4.1.7. -// Samplers are not allowed as operands for most operations. Test this for ternary operator. -TEST_F(MalformedShaderTest, SamplerAsTernaryOperand) -{ - const std::string &shaderString = - "precision mediump float;\n" - "uniform bool u;\n" - "uniform sampler2D s1;\n" - "uniform sampler2D s2;\n" - "void main() {\n" - " gl_FragColor = texture2D(u ? s1 : s2, vec2(0, 0));\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// ESSL 1.00.17 section 4.5.2. -// ESSL 3.00.6 section 4.5.3. -// Precision must be specified for floats. Test this with a declaration with no qualifiers. -TEST_F(MalformedShaderTest, FloatDeclarationNoQualifiersNoPrecision) -{ - const std::string &shaderString = - "vec4 foo = vec4(0.0);\n" - "void main()\n" - "{\n" - " gl_FragColor = foo;\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Check compiler doesn't crash on incorrect unsized array declarations. -TEST_F(MalformedShaderTest, IncorrectUnsizedArray) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "float foo[] = 0.0;\n" - "out vec4 my_FragColor;\n" - "void main()\n" - "{\n" - " foo[0] = 1.0;\n" - " my_FragColor = vec4(foo[0]);\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Check compiler doesn't crash when a bvec is on the right hand side of a logical operator. -// ESSL 3.00.6 section 5.9. -TEST_F(MalformedShaderTest, LogicalOpRHSIsBVec) -{ - const std::string &shaderString = - "#version 300 es\n" - "void main()\n" - "{\n" - " bool b;\n" - " bvec3 b3;\n" - " b && b3;\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Check compiler doesn't crash when there's an unsized array constructor with no parameters. -// ESSL 3.00.6 section 4.1.9: Array size must be greater than zero. -TEST_F(MalformedShaderTest, UnsizedArrayConstructorNoParameters) -{ - const std::string &shaderString = - "#version 300 es\n" - "void main()\n" - "{\n" - " int[]();\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Passing an image parameter as an argument to another function should not be able to discard the -// coherent qualifier. -TEST_F(MalformedFragmentShaderGLES31Test, CoherentQualifierMissingInFunctionArgument) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "layout(r32f) uniform coherent image2D myImage;\n" - "void myFunc(in image2D someImage) {}\n" - "void main() {\n" - " myFunc(myImage);\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Passing an image parameter as an argument to another function should not be able to discard the -// volatile qualifier. -TEST_F(MalformedFragmentShaderGLES31Test, VolatileQualifierMissingInFunctionArgument) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "layout(r32f) uniform volatile image2D myImage;\n" - "void myFunc(in image2D someImage) {}\n" - "void main() {\n" - " myFunc(myImage);\n" - "}\n"; - - if (compile(shaderString)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// The restrict qualifier can be discarded from a function argument. -// GLSL ES 3.10 Revision 4, 4.9 Memory Access Qualifiers -TEST_F(MalformedFragmentShaderGLES31Test, RestrictQualifierDiscardedInFunctionArgument) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "layout(r32f) uniform restrict image2D myImage;\n" - "void myFunc(in image2D someImage) {}\n" - "void main() {\n" - " myFunc(myImage);\n" - "}\n"; - - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed, expecting success " << mInfoLog; - } -} - -// Function image arguments can be overqualified. -// GLSL ES 3.10 Revision 4, 4.9 Memory Access Qualifiers -TEST_F(MalformedFragmentShaderGLES31Test, OverqualifyingImageParameter) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision mediump float;\n" - "precision mediump image2D;\n" - "layout(r32f) uniform image2D myImage;\n" - "void myFunc(in coherent volatile image2D someImage) {}\n" - "void main() {\n" - " myFunc(myImage);\n" - "}\n"; - - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed, expecting success " << mInfoLog; - } -} \ No newline at end of file diff --git a/gfx/angle/src/tests/compiler_tests/NV_draw_buffers_test.cpp b/gfx/angle/src/tests/compiler_tests/NV_draw_buffers_test.cpp index 13a44fd59..49c43c93c 100755 --- a/gfx/angle/src/tests/compiler_tests/NV_draw_buffers_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/NV_draw_buffers_test.cpp @@ -12,8 +12,6 @@ #include "GLSLANG/ShaderLang.h" #include "tests/test_utils/compiler_test.h" -using namespace sh; - class NVDrawBuffersTest : public MatchOutputCodeTest { public: diff --git a/gfx/angle/src/tests/compiler_tests/Pack_Unpack_test.cpp b/gfx/angle/src/tests/compiler_tests/Pack_Unpack_test.cpp index a6333e78e..85673d5f7 100755 --- a/gfx/angle/src/tests/compiler_tests/Pack_Unpack_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/Pack_Unpack_test.cpp @@ -12,8 +12,6 @@ #include "GLSLANG/ShaderLang.h" #include "tests/test_utils/compiler_test.h" -using namespace sh; - namespace { diff --git a/gfx/angle/src/tests/compiler_tests/PruneEmptyDeclarations_test.cpp b/gfx/angle/src/tests/compiler_tests/PruneEmptyDeclarations_test.cpp index 6b59e0cd5..4652117c4 100755 --- a/gfx/angle/src/tests/compiler_tests/PruneEmptyDeclarations_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/PruneEmptyDeclarations_test.cpp @@ -12,8 +12,6 @@ #include "GLSLANG/ShaderLang.h" #include "tests/test_utils/compiler_test.h" -using namespace sh; - namespace { diff --git a/gfx/angle/src/tests/compiler_tests/PruneUnusedFunctions_test.cpp b/gfx/angle/src/tests/compiler_tests/PruneUnusedFunctions_test.cpp index fe710d8e6..8880abe3f 100755 --- a/gfx/angle/src/tests/compiler_tests/PruneUnusedFunctions_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/PruneUnusedFunctions_test.cpp @@ -12,8 +12,6 @@ #include "GLSLANG/ShaderLang.h" #include "tests/test_utils/compiler_test.h" -using namespace sh; - namespace { diff --git a/gfx/angle/src/tests/compiler_tests/QualificationOrderESSL31_test.cpp b/gfx/angle/src/tests/compiler_tests/QualificationOrderESSL31_test.cpp deleted file mode 100644 index dd3aa9a65..000000000 --- a/gfx/angle/src/tests/compiler_tests/QualificationOrderESSL31_test.cpp +++ /dev/null @@ -1,184 +0,0 @@ -// -// Copyright (c) 2016 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. -// -// QualificationOrderESSL31_test.cpp: -// OpenGL ES 3.1 removes the strict order of qualifiers imposed by the grammar. -// This file contains tests for invalid order and usage of qualifiers in GLSL ES 3.10. - -#include "gtest/gtest.h" - -#include "angle_gl.h" -#include "compiler/translator/TranslatorESSL.h" -#include "GLSLANG/ShaderLang.h" -#include "tests/test_utils/compiler_test.h" - -using namespace sh; - -class QualificationVertexShaderTestESSL31 : public testing::Test -{ - public: - QualificationVertexShaderTestESSL31() {} - protected: - virtual void SetUp() - { - ShBuiltInResources resources; - InitBuiltInResources(&resources); - - mTranslator = new TranslatorESSL(GL_VERTEX_SHADER, SH_GLES3_1_SPEC); - ASSERT_TRUE(mTranslator->Init(resources)); - } - - virtual void TearDown() { delete mTranslator; } - - // Return true when compilation succeeds - bool compile(const std::string &shaderString) - { - const char *shaderStrings[] = {shaderString.c_str()}; - mASTRoot = mTranslator->compileTreeForTesting(shaderStrings, 1, - SH_INTERMEDIATE_TREE | SH_VARIABLES); - TInfoSink &infoSink = mTranslator->getInfoSink(); - mInfoLog = infoSink.info.c_str(); - return mASTRoot != nullptr; - } - - const TIntermSymbol *findSymbolInAST(const TString &symbolName, TBasicType basicType) - { - return FindSymbolNode(mASTRoot, symbolName, basicType); - } - - protected: - TranslatorESSL *mTranslator; - TIntermNode *mASTRoot; - std::string mInfoLog; -}; - -// GLSL ES 3.10 has relaxed checks on qualifier order. Any order is correct. -TEST_F(QualificationVertexShaderTestESSL31, CentroidOut) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision lowp float;\n" - "out centroid float something;\n" - "void main(){\n" - " something = 1.0;\n" - "}\n"; - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed, expecting success" << mInfoLog; - } - else - { - const TIntermSymbol *node = findSymbolInAST("something", EbtFloat); - ASSERT_NE(nullptr, node); - - const TType &type = node->getType(); - EXPECT_EQ(EvqCentroidOut, type.getQualifier()); - } -} - -// GLSL ES 3.10 has relaxed checks on qualifier order. Any order is correct. -TEST_F(QualificationVertexShaderTestESSL31, AllQualifiersMixed) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision lowp float;\n" - "highp out invariant centroid flat vec4 something;\n" - "void main(){\n" - "}\n"; - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed, expecting success" << mInfoLog; - } - else - { - const TIntermSymbol *node = findSymbolInAST("something", EbtFloat); - ASSERT_NE(nullptr, node); - - const TType &type = node->getType(); - EXPECT_TRUE(type.isInvariant()); - EXPECT_EQ(EvqFlatOut, type.getQualifier()); - EXPECT_EQ(EbpHigh, type.getPrecision()); - } -} - -// GLSL ES 3.10 allows multiple layout qualifiers to be specified. -TEST_F(QualificationVertexShaderTestESSL31, MultipleLayouts) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision lowp float;\n" - "in layout(location=1) layout(location=2) vec4 something;\n" - "void main(){\n" - "}\n"; - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed, expecting success" << mInfoLog; - } - else - { - const TIntermSymbol *node = findSymbolInAST("something", EbtFloat); - ASSERT_NE(nullptr, node); - - const TType &type = node->getType(); - EXPECT_EQ(EvqVertexIn, type.getQualifier()); - EXPECT_EQ(2, type.getLayoutQualifier().location); - } -} - -// The test checks layout qualifier overriding when multiple layouts are specified. -TEST_F(QualificationVertexShaderTestESSL31, MultipleLayoutsInterfaceBlock) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision lowp float;\n" - "out float someValue;\n" - "layout(shared) layout(std140) layout(column_major) uniform MyInterface\n" - "{ vec4 something; } MyInterfaceName;\n" - "void main(){\n" - " someValue = MyInterfaceName.something.r;\n" - "}\n"; - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed, expecting success" << mInfoLog; - } - else - { - const TIntermSymbol *node = findSymbolInAST("MyInterfaceName", EbtInterfaceBlock); - ASSERT_NE(nullptr, node); - - const TType &type = node->getType(); - TLayoutQualifier layoutQualifier = type.getLayoutQualifier(); - EXPECT_EQ(EbsStd140, layoutQualifier.blockStorage); - EXPECT_EQ(EmpColumnMajor, layoutQualifier.matrixPacking); - } -} - -// The test checks layout qualifier overriding when multiple layouts are specified. -TEST_F(QualificationVertexShaderTestESSL31, MultipleLayoutsInterfaceBlock2) -{ - const std::string &shaderString = - "#version 310 es\n" - "precision lowp float;\n" - "out float someValue;\n" - "layout(row_major) layout(std140) layout(shared) uniform MyInterface\n" - "{ vec4 something; } MyInterfaceName;\n" - "void main(){\n" - " someValue = MyInterfaceName.something.r;\n" - "}\n"; - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed, expecting success" << mInfoLog; - } - else - { - const TIntermSymbol *node = findSymbolInAST("MyInterfaceName", EbtInterfaceBlock); - ASSERT_NE(nullptr, node); - - const TType &type = node->getType(); - TLayoutQualifier layoutQualifier = type.getLayoutQualifier(); - EXPECT_EQ(EbsShared, layoutQualifier.blockStorage); - EXPECT_EQ(EmpRowMajor, layoutQualifier.matrixPacking); - } -} diff --git a/gfx/angle/src/tests/compiler_tests/QualificationOrder_test.cpp b/gfx/angle/src/tests/compiler_tests/QualificationOrder_test.cpp deleted file mode 100644 index 33ecbf77d..000000000 --- a/gfx/angle/src/tests/compiler_tests/QualificationOrder_test.cpp +++ /dev/null @@ -1,571 +0,0 @@ -// -// Copyright (c) 2016 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. -// -// QualificationOrder_test.cpp: -// OpenGL ES 3.1 removes the strict order of qualifiers imposed by the grammar. -// This file contains tests for invalid order and usage of qualifiers. - -#include "angle_gl.h" -#include "gtest/gtest.h" -#include "GLSLANG/ShaderLang.h" -#include "compiler/translator/TranslatorESSL.h" - -using namespace sh; - -class QualificationOrderShaderTest : public testing::Test -{ - public: - QualificationOrderShaderTest() {} - - protected: - virtual void SetUp() {} - - virtual void TearDown() {} - - // Return true when compilation succeeds - bool compile(const std::string &shaderString, ::GLenum shaderType, ShShaderSpec spec) - { - ShBuiltInResources resources; - InitBuiltInResources(&resources); - resources.MaxDrawBuffers = (spec == SH_GLES2_SPEC) ? 1 : 8; - - TranslatorESSL *translator = new TranslatorESSL(shaderType, spec); - EXPECT_TRUE(translator->Init(resources)); - - const char *shaderStrings[] = {shaderString.c_str()}; - bool compilationSuccess = translator->compile(shaderStrings, 1, SH_INTERMEDIATE_TREE); - TInfoSink &infoSink = translator->getInfoSink(); - mInfoLog = infoSink.info.c_str(); - - delete translator; - - return compilationSuccess; - } - - protected: - std::string mInfoLog; -}; - -// Repeating centroid qualifier is invalid. -TEST_F(QualificationOrderShaderTest, RepeatingCentroid) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "flat centroid centroid in float myValue;\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_1_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Repeating uniform storage qualifiers is invalid. -TEST_F(QualificationOrderShaderTest, RepeatingUniforms) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "uniform uniform float myValue;\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_1_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Repeating varying storage qualifiers is invalid. -TEST_F(QualificationOrderShaderTest, RepeatingVaryings) -{ - const std::string &shaderString = - "precision mediump float;\n" - "varying varying vec4 myColor;\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_1_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Layout qualifier should be before the storage qualifiers. -TEST_F(QualificationOrderShaderTest, WrongOrderQualifiers) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "out layout(location=1) vec4 myColor;\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_1_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Centroid out is the correct order. Out centroid is incorrect. -TEST_F(QualificationOrderShaderTest, WrongOrderCentroidOut) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "in vec4 uv;\n" - "out centroid vec4 position;\n" - "void main() {\n" - "position = uv;\n" - "gl_Position = uv;\n" - "}\n"; - - if (compile(shaderString, GL_VERTEX_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Centroid in is the correct order. In centroid is incorrect. -TEST_F(QualificationOrderShaderTest, WrongOrderCentroidIn) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "in centroid vec4 colorIN;\n" - "out vec4 colorOUT;\n" - "void main() {\n" - "colorOUT = colorIN;\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Type cannot be before the storage qualifier. -TEST_F(QualificationOrderShaderTest, WrongOrderTypeStorage) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "centroid in vec4 colorIN;\n" - "vec4 out colorOUT;\n" - "void main() {\n" - "colorOUT = colorIN;\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// A variable cannot have two conflicting storage qualifiers. -TEST_F(QualificationOrderShaderTest, RepeatingDifferentStorageQualifiers) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "centroid in vec4 colorIN;\n" - "uniform out vec4 colorOUT;\n" - "void main() {\n" - "colorOUT = colorIN;\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// A variable cannot have two different layout qualifiers. -TEST_F(QualificationOrderShaderTest, RepeatingLayoutQualifiers) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "in vec4 colorIN;\n" - "layout(location=0) layout(location=0) out vec4 colorOUT;\n" - "void main() {\n" - "colorOUT = colorIN;\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// A variable cannot have repeating invariant qualifiers. -TEST_F(QualificationOrderShaderTest, RepeatingInvariantQualifiers) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "in vec4 colorIN;\n" - "invariant invariant out vec4 colorOUT;\n" - "void main() {\n" - "colorOUT = colorIN;\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// A variable cannot have repeating storage qualifiers. -TEST_F(QualificationOrderShaderTest, RepeatingAttributes) -{ - const std::string &shaderString = - "precision mediump float;\n" - "attribute attribute vec4 positionIN;\n" - "void main() {\n" - "gl_Position = positionIN;\n" - "}\n"; - - if (compile(shaderString, GL_VERTEX_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Wrong order for invariant varying. It should be 'invariant varying', not 'varying invariant'. -TEST_F(QualificationOrderShaderTest, VaryingInvariantWrongOrder) -{ - const std::string &shaderString = - "precision mediump float;\n" - "attribute vec4 positionIN;\n" - "varying invariant vec4 dataOUT;\n" - "void main() {\n" - "gl_Position = positionIN;\n" - "dataOUT = 0.5 * dataOUT + vec4(0.5);\n" - "}\n"; - - if (compile(shaderString, GL_VERTEX_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// A variable cannot have repeating storage qualifiers. -TEST_F(QualificationOrderShaderTest, AttributeVaryingMix) -{ - const std::string &shaderString1 = - "precision mediump float;\n" - "attribute varying vec4 positionIN;\n" - "void main() {\n" - "gl_Position = positionIN;\n" - "}\n"; - - const std::string &shaderString2 = - "precision mediump float;\n" - "varying attribute vec4 positionIN;\n" - "void main() {\n" - "gl_Position = positionIN;\n" - "}\n"; - - if (compile(shaderString1, GL_VERTEX_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } - - if (compile(shaderString2, GL_VERTEX_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// A variable cannot have repeating interpolation qualifiers. -TEST_F(QualificationOrderShaderTest, RepeatingInterpolationQualifiers) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "in vec4 positionIN;\n" - "flat flat out vec4 dataOUT;\n" - "void main() {\n" - "gl_Position = positionIN;\n" - "dataOUT = 0.5 * dataOUT + vec4(0.5);\n" - "}\n"; - - if (compile(shaderString, GL_VERTEX_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Wrong order for the interpolation and storage qualifier. The correct order is interpolation -// qualifier and then storage qualifier. -TEST_F(QualificationOrderShaderTest, WrongOrderInterpolationStorageQualifiers) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "in vec4 positionIN;\n" - "out flat vec4 dataOUT;\n" - "void main() {\n" - "gl_Position = positionIN;\n" - "dataOUT = 0.5 * dataOUT + vec4(0.5);\n" - "}\n"; - - if (compile(shaderString, GL_VERTEX_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// The correct order is invariant, interpolation, storage. -TEST_F(QualificationOrderShaderTest, WrongOrderInvariantInterpolationStorageQualifiers) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "in vec4 positionIN;\n" - "flat invariant out vec4 dataOUT;\n" - "void main() {\n" - "gl_Position = positionIN;\n" - "dataOUT = 0.5 * dataOUT + vec4(0.5);\n" - "}\n"; - - if (compile(shaderString, GL_VERTEX_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// The invariant qualifer has to be before the storage qualifiers. -TEST_F(QualificationOrderShaderTest, WrongOrderInvariantNotFirst) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "in vec4 positionIN;\n" - "centroid out invariant vec4 dataOUT;\n" - "void main() {\n" - "gl_Position = positionIN;\n" - "dataOUT = 0.5 * dataOUT + vec4(0.5);\n" - "}\n"; - - if (compile(shaderString, GL_VERTEX_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// The precision qualifier is after the storage qualifiers. -TEST_F(QualificationOrderShaderTest, WrongOrderPrecision) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "in vec4 positionIN;\n" - "highp centroid out vec4 dataOUT;\n" - "void main() {\n" - "gl_Position = positionIN;\n" - "dataOUT = 0.5 * dataOUT + vec4(0.5);\n" - "}\n"; - - if (compile(shaderString, GL_VERTEX_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// A variable cannot have multiple declarations of the 'in' storage qualifier. -TEST_F(QualificationOrderShaderTest, RepeatingInQualifier) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "in in vec4 positionIN;\n" - "void main() {\n" - "gl_Position = positionIN;\n" - "}\n"; - - if (compile(shaderString, GL_VERTEX_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// A variable cannot have multiple declarations of the 'attribute' storage qualifier. -TEST_F(QualificationOrderShaderTest, RepeatingAttributeQualifier) -{ - const std::string &shaderString = - "precision mediump float;\n" - "attribute attribute vec4 positionIN;\n" - "void main() {\n" - "gl_Position = positionIN;\n" - "}\n"; - - if (compile(shaderString, GL_VERTEX_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Vertex input cannot be qualified with invariant. -TEST_F(QualificationOrderShaderTest, InvariantVertexInput) -{ - const std::string &shaderString = - "precision mediump float;\n" - "invariant attribute vec4 positionIN;\n" - "void main() {\n" - "gl_Position = positionIN;\n" - "}\n"; - - if (compile(shaderString, GL_VERTEX_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} - -// Cannot have a function parameter with the invariant qualifier. -TEST_F(QualificationOrderShaderTest, InvalidFunctionParametersInvariant) -{ - const std::string &shaderString = - "precision lowp float;\n" - "varying float value;\n" - "float foo0 (invariant in float x) {\n" - " return 2.0*x;\n" - "}\n" - "void main()\n" - "{\n" - " gl_FragColor = vec4(foo0(value));\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure" << mInfoLog; - } -} - -// Cannot have a function parameter with the attribute qualifier. -TEST_F(QualificationOrderShaderTest, InvalidFunctionParametersAttribute) -{ - const std::string &shaderString = - "precision lowp float;\n" - "varying float value;\n" - "float foo0 (attribute float x) {\n" - " return 2.0*x;\n" - "}\n" - "void main()\n" - "{\n" - " gl_FragColor = vec4(foo0(value));\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure" << mInfoLog; - } -} - -// Cannot have a function parameter with the varying qualifier. -TEST_F(QualificationOrderShaderTest, InvalidFunctionParametersVarying) -{ - const std::string &shaderString = - "precision lowp float;\n" - "varying float value;\n" - "float foo0 (varying float x) {\n" - " return 2.0*x;\n" - "}\n" - "void main()\n" - "{\n" - " gl_FragColor = vec4(foo0(value));\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure" << mInfoLog; - } -} - -// Cannot have a function parameter with the layout qualifier -TEST_F(QualificationOrderShaderTest, InvalidFunctionParametersLayout) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision lowp float;\n" - "in float value;\n" - "float foo0 (layout(location = 3) in float x) {\n" - " return 2.0*x;\n" - "}\n" - "out vec4 colorOUT;\n" - "void main()\n" - "{\n" - " colorOUT = vec4(foo0(value));\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure" << mInfoLog; - } -} - -// Cannot have a function parameter with the centroid qualifier -TEST_F(QualificationOrderShaderTest, InvalidFunctionParametersCentroidIn) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision lowp float;\n" - "in float value;\n" - "float foo0 (centroid in float x) {\n" - " return 2.0*x;\n" - "}\n" - "out vec4 colorOUT;\n" - "void main()\n" - "{\n" - " colorOUT = vec4(foo0(value));\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure" << mInfoLog; - } -} - -// Cannot have a function parameter with the flat qualifier -TEST_F(QualificationOrderShaderTest, InvalidFunctionParametersFlatIn) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision lowp float;\n" - "in float value;\n" - "float foo0 (flat in float x) {\n" - " return 2.0*x;\n" - "}\n" - "out vec4 colorOUT;\n" - "void main()\n" - "{\n" - " colorOUT = vec4(foo0(value));\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure" << mInfoLog; - } -} - -// Output layout location qualifier can't appear more than once within a declaration. -// GLSL ES 3.00.6 section 4.3.8.2 Output Layout Qualifiers. -TEST_F(QualificationOrderShaderTest, TwoOutputLocations) -{ - const std::string &shaderString = - "#version 300 es\n" - "precision mediump float;\n" - "layout(location=1, location=2) out vec4 myColor;\n" - "void main() {\n" - "}\n"; - - if (compile(shaderString, GL_FRAGMENT_SHADER, SH_GLES3_SPEC)) - { - FAIL() << "Shader compilation succeeded, expecting failure " << mInfoLog; - } -} diff --git a/gfx/angle/src/tests/compiler_tests/RecordConstantPrecision_test.cpp b/gfx/angle/src/tests/compiler_tests/RecordConstantPrecision_test.cpp index 2cd2bfdf4..783a93c10 100755 --- a/gfx/angle/src/tests/compiler_tests/RecordConstantPrecision_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/RecordConstantPrecision_test.cpp @@ -12,8 +12,6 @@ #include "GLSLANG/ShaderLang.h" #include "tests/test_utils/compiler_test.h" -using namespace sh; - class RecordConstantPrecisionTest : public MatchOutputCodeTest { public: @@ -33,7 +31,7 @@ TEST_F(RecordConstantPrecisionTest, HigherPrecisionConstantAsParameter) " gl_FragColor = vec4(b);\n" "}\n"; compile(shaderString); - ASSERT_TRUE(foundInCode("const highp float webgl_angle_s")); + ASSERT_TRUE(foundInCode("const highp float s")); ASSERT_FALSE(foundInCode("fract(4096.5")); ASSERT_FALSE(foundInCode("fract((4096.5")); } @@ -51,7 +49,7 @@ TEST_F(RecordConstantPrecisionTest, EqualPrecisionConstantAsParameter) " gl_FragColor = vec4(b);\n" "}\n"; compile(shaderString); - ASSERT_FALSE(foundInCode("const mediump float webgl_angle_s")); + ASSERT_FALSE(foundInCode("const mediump float s")); ASSERT_TRUE(foundInCode("fract((4096.5")); } @@ -69,7 +67,7 @@ TEST_F(RecordConstantPrecisionTest, FoldedBinaryConstantPrecisionIsHigher) " gl_FragColor = vec4(b);\n" "}\n"; compile(shaderString); - ASSERT_TRUE(foundInCode("const highp float webgl_angle_s")); + ASSERT_TRUE(foundInCode("const highp float s")); ASSERT_FALSE(foundInCode("fract(4096.5")); ASSERT_FALSE(foundInCode("fract((4096.5")); } @@ -89,7 +87,7 @@ TEST_F(RecordConstantPrecisionTest, FoldedUnaryConstantPrecisionIsHigher) " gl_FragColor = vec4(b);\n" "}\n"; compile(shaderString); - ASSERT_TRUE(foundInCode("const highp float webgl_angle_s")); + ASSERT_TRUE(foundInCode("const highp float s")); ASSERT_FALSE(foundInCode("sin(0.5")); ASSERT_FALSE(foundInCode("sin((0.5")); } diff --git a/gfx/angle/src/tests/compiler_tests/RemovePow_test.cpp b/gfx/angle/src/tests/compiler_tests/RemovePow_test.cpp index 8367ac745..2434f09a0 100755 --- a/gfx/angle/src/tests/compiler_tests/RemovePow_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/RemovePow_test.cpp @@ -13,8 +13,6 @@ #include "compiler/translator/NodeSearch.h" #include "compiler/translator/TranslatorGLSL.h" -using namespace sh; - class RemovePowTest : public testing::Test { public: @@ -26,9 +24,8 @@ class RemovePowTest : public testing::Test allocator.push(); SetGlobalPoolAllocator(&allocator); ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); - mTranslatorGLSL = - new sh::TranslatorGLSL(GL_FRAGMENT_SHADER, SH_GLES2_SPEC, SH_GLSL_COMPATIBILITY_OUTPUT); + ShInitBuiltInResources(&resources); + mTranslatorGLSL = new TranslatorGLSL(GL_FRAGMENT_SHADER, SH_GLES2_SPEC, SH_GLSL_COMPATIBILITY_OUTPUT); ASSERT_TRUE(mTranslatorGLSL->Init(resources)); } @@ -58,7 +55,7 @@ class RemovePowTest : public testing::Test } private: - sh::TranslatorGLSL *mTranslatorGLSL; + TranslatorGLSL *mTranslatorGLSL; TIntermNode *mASTRoot; TPoolAllocator allocator; diff --git a/gfx/angle/src/tests/compiler_tests/ShCompile_test.cpp b/gfx/angle/src/tests/compiler_tests/ShCompile_test.cpp index 21e4a3cbe..2a514a9e4 100755 --- a/gfx/angle/src/tests/compiler_tests/ShCompile_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/ShCompile_test.cpp @@ -4,7 +4,7 @@ // found in the LICENSE file. // // ShCompile_test.cpp -// Test the sh::Compile interface with different parameters. +// Test the ShCompile interface with different parameters. // #include "angle_gl.h" @@ -19,9 +19,9 @@ class ShCompileTest : public testing::Test protected: void SetUp() override { - sh::InitBuiltInResources(&mResources); - mCompiler = sh::ConstructCompiler(GL_FRAGMENT_SHADER, SH_WEBGL_SPEC, - SH_GLSL_COMPATIBILITY_OUTPUT, &mResources); + ShInitBuiltInResources(&mResources); + mCompiler = ShConstructCompiler(GL_FRAGMENT_SHADER, SH_WEBGL_SPEC, + SH_GLSL_COMPATIBILITY_OUTPUT, &mResources); ASSERT_TRUE(mCompiler != nullptr) << "Compiler could not be constructed."; } @@ -29,15 +29,15 @@ class ShCompileTest : public testing::Test { if (mCompiler) { - sh::Destruct(mCompiler); + ShDestruct(mCompiler); mCompiler = nullptr; } } void testCompile(const char **shaderStrings, int stringCount, bool expectation) { - bool success = sh::Compile(mCompiler, shaderStrings, stringCount, 0); - const std::string &compileLog = sh::GetInfoLog(mCompiler); + bool success = ShCompile(mCompiler, shaderStrings, stringCount, 0); + const std::string &compileLog = ShGetInfoLog(mCompiler); EXPECT_EQ(expectation, success) << compileLog; } @@ -46,7 +46,7 @@ class ShCompileTest : public testing::Test ShHandle mCompiler; }; -// Test calling sh::Compile with more than one shader source string. +// Test calling ShCompile with more than one shader source string. TEST_F(ShCompileTest, MultipleShaderStrings) { const std::string &shaderString1 = @@ -61,7 +61,7 @@ TEST_F(ShCompileTest, MultipleShaderStrings) testCompile(shaderStrings, 2, true); } -// Test calling sh::Compile with a tokens split into different shader source strings. +// Test calling ShCompile with a tokens split into different shader source strings. TEST_F(ShCompileTest, TokensSplitInShaderStrings) { const std::string &shaderString1 = diff --git a/gfx/angle/src/tests/compiler_tests/ShaderExtension_test.cpp b/gfx/angle/src/tests/compiler_tests/ShaderExtension_test.cpp index eb2d9b9bd..a23de3dee 100755 --- a/gfx/angle/src/tests/compiler_tests/ShaderExtension_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/ShaderExtension_test.cpp @@ -52,7 +52,7 @@ class ShaderExtensionTest : public testing::Test protected: virtual void SetUp() { - sh::InitBuiltInResources(&mResources); + ShInitBuiltInResources(&mResources); mCompiler = NULL; } @@ -65,7 +65,7 @@ class ShaderExtensionTest : public testing::Test { if (mCompiler) { - sh::Destruct(mCompiler); + ShDestruct(mCompiler); mCompiler = NULL; } } @@ -73,15 +73,15 @@ class ShaderExtensionTest : public testing::Test void InitializeCompiler() { DestroyCompiler(); - mCompiler = sh::ConstructCompiler(GL_FRAGMENT_SHADER, SH_WEBGL_SPEC, - SH_GLSL_COMPATIBILITY_OUTPUT, &mResources); + mCompiler = ShConstructCompiler(GL_FRAGMENT_SHADER, SH_WEBGL_SPEC, + SH_GLSL_COMPATIBILITY_OUTPUT, &mResources); ASSERT_TRUE(mCompiler != NULL) << "Compiler could not be constructed."; } void TestShaderExtension(const char **shaderStrings, int stringCount, bool expectation) { - bool success = sh::Compile(mCompiler, shaderStrings, stringCount, 0); - const std::string &compileLog = sh::GetInfoLog(mCompiler); + bool success = ShCompile(mCompiler, shaderStrings, stringCount, 0); + const std::string& compileLog = ShGetInfoLog(mCompiler); EXPECT_EQ(expectation, success) << compileLog; } diff --git a/gfx/angle/src/tests/compiler_tests/ShaderImage_test.cpp b/gfx/angle/src/tests/compiler_tests/ShaderImage_test.cpp deleted file mode 100644 index b069c6547..000000000 --- a/gfx/angle/src/tests/compiler_tests/ShaderImage_test.cpp +++ /dev/null @@ -1,259 +0,0 @@ -// -// Copyright (c) 2016 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. -// -// ShaderImage_test.cpp: -// Tests for images -// - -#include "angle_gl.h" -#include "gtest/gtest.h" -#include "GLSLANG/ShaderLang.h" -#include "compiler/translator/TranslatorESSL.h" -#include "tests/test_utils/compiler_test.h" - -using namespace sh; - -namespace -{ - -// Checks that the imageStore call with mangled name imageStoreMangledName exists in the AST. -// Further each argument is checked whether it matches the expected properties given the compiled -// shader. -void CheckImageStoreCall(TIntermNode *astRoot, - const TString &imageStoreMangledName, - TBasicType imageType, - int storeLocationNominalSize, - TBasicType storeValueType, - int storeValueNominalSize) -{ - const TIntermAggregate *imageStoreFunctionCall = - FindFunctionCallNode(astRoot, imageStoreMangledName); - ASSERT_NE(nullptr, imageStoreFunctionCall); - - const TIntermSequence *storeArguments = imageStoreFunctionCall->getSequence(); - ASSERT_EQ(3u, storeArguments->size()); - - const TIntermTyped *storeArgument1Typed = (*storeArguments)[0]->getAsTyped(); - ASSERT_EQ(imageType, storeArgument1Typed->getBasicType()); - - const TIntermTyped *storeArgument2Typed = (*storeArguments)[1]->getAsTyped(); - ASSERT_EQ(EbtInt, storeArgument2Typed->getBasicType()); - ASSERT_EQ(storeLocationNominalSize, storeArgument2Typed->getNominalSize()); - - const TIntermTyped *storeArgument3Typed = (*storeArguments)[2]->getAsTyped(); - ASSERT_EQ(storeValueType, storeArgument3Typed->getBasicType()); - ASSERT_EQ(storeValueNominalSize, storeArgument3Typed->getNominalSize()); -} - -// Checks that the imageLoad call with mangled name imageLoadMangledName exists in the AST. -// Further each argument is checked whether it matches the expected properties given the compiled -// shader. -void CheckImageLoadCall(TIntermNode *astRoot, - const TString &imageLoadMangledName, - TBasicType imageType, - int loadLocationNominalSize) -{ - const TIntermAggregate *imageLoadFunctionCall = - FindFunctionCallNode(astRoot, imageLoadMangledName); - ASSERT_NE(nullptr, imageLoadFunctionCall); - - const TIntermSequence *loadArguments = imageLoadFunctionCall->getSequence(); - ASSERT_EQ(2u, loadArguments->size()); - - const TIntermTyped *loadArgument1Typed = (*loadArguments)[0]->getAsTyped(); - ASSERT_EQ(imageType, loadArgument1Typed->getBasicType()); - - const TIntermTyped *loadArgument2Typed = (*loadArguments)[1]->getAsTyped(); - ASSERT_EQ(EbtInt, loadArgument2Typed->getBasicType()); - ASSERT_EQ(loadLocationNominalSize, loadArgument2Typed->getNominalSize()); -} - -// Checks whether the image is properly exported as a uniform by the compiler. -void CheckExportedImageUniform(const std::vector &uniforms, - size_t uniformIndex, - ::GLenum imageTypeGL, - const TString &imageName) -{ - ASSERT_EQ(1u, uniforms.size()); - - const auto &imageUniform = uniforms[uniformIndex]; - ASSERT_EQ(imageTypeGL, imageUniform.type); - ASSERT_STREQ(imageUniform.name.c_str(), imageName.c_str()); -} - -// Checks whether the image is saved in the AST as a node with the correct properties given the -// shader. -void CheckImageDeclaration(TIntermNode *astRoot, - const TString &imageName, - TBasicType imageType, - TLayoutImageInternalFormat internalFormat, - bool readonly, - bool writeonly, - bool coherent, - bool restrictQualifier, - bool volatileQualifier) -{ - const TIntermSymbol *myImageNode = FindSymbolNode(astRoot, imageName, imageType); - ASSERT_NE(nullptr, myImageNode); - - const TType &myImageType = myImageNode->getType(); - TLayoutQualifier myImageLayoutQualifier = myImageType.getLayoutQualifier(); - ASSERT_EQ(internalFormat, myImageLayoutQualifier.imageInternalFormat); - TMemoryQualifier myImageMemoryQualifier = myImageType.getMemoryQualifier(); - ASSERT_EQ(readonly, myImageMemoryQualifier.readonly); - ASSERT_EQ(writeonly, myImageMemoryQualifier.writeonly); - ASSERT_EQ(coherent, myImageMemoryQualifier.coherent); - ASSERT_EQ(restrictQualifier, myImageMemoryQualifier.restrictQualifier); - ASSERT_EQ(volatileQualifier, myImageMemoryQualifier.volatileQualifier); -} - -} // namespace - -class ShaderImageTest : public testing::Test -{ - public: - ShaderImageTest() {} - - protected: - virtual void SetUp() - { - ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); - - mTranslator = new sh::TranslatorESSL(GL_COMPUTE_SHADER, SH_GLES3_1_SPEC); - ASSERT_TRUE(mTranslator->Init(resources)); - } - - virtual void TearDown() { delete mTranslator; } - - // Return true when compilation succeeds - bool compile(const std::string &shaderString) - { - const char *shaderStrings[] = {shaderString.c_str()}; - mASTRoot = mTranslator->compileTreeForTesting(shaderStrings, 1, - SH_INTERMEDIATE_TREE | SH_VARIABLES); - TInfoSink &infoSink = mTranslator->getInfoSink(); - mInfoLog = infoSink.info.c_str(); - return mASTRoot != nullptr; - } - - protected: - std::string mTranslatedCode; - std::string mInfoLog; - sh::TranslatorESSL *mTranslator; - TIntermNode *mASTRoot; -}; - -// Test that an image2D is properly parsed and exported as a uniform. -TEST_F(ShaderImageTest, Image2DDeclaration) -{ - const std::string &shaderString = - "#version 310 es\n" - "layout(local_size_x = 4) in;\n" - "layout(rgba32f) uniform highp readonly image2D myImage;\n" - "void main() {\n" - " ivec2 sz = imageSize(myImage);\n" - "}"; - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed" << mInfoLog; - } - - CheckExportedImageUniform(mTranslator->getUniforms(), 0, GL_IMAGE_2D, "myImage"); - CheckImageDeclaration(mASTRoot, "myImage", EbtImage2D, EiifRGBA32F, true, false, false, false, - false); -} - -// Test that an image3D is properly parsed and exported as a uniform. -TEST_F(ShaderImageTest, Image3DDeclaration) -{ - const std::string &shaderString = - "#version 310 es\n" - "layout(local_size_x = 4) in;\n" - "layout(rgba32ui) uniform highp writeonly readonly uimage3D myImage;\n" - "void main() {\n" - " ivec3 sz = imageSize(myImage);\n" - "}"; - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed" << mInfoLog; - } - - CheckExportedImageUniform(mTranslator->getUniforms(), 0, GL_UNSIGNED_INT_IMAGE_3D, "myImage"); - CheckImageDeclaration(mASTRoot, "myImage", EbtUImage3D, EiifRGBA32UI, true, true, false, false, - false); -} - -// Check that imageLoad calls get correctly parsed. -TEST_F(ShaderImageTest, ImageLoad) -{ - const std::string &shaderString = - "#version 310 es\n" - "layout(local_size_x = 4) in;\n" - "layout(rgba32f) uniform highp readonly image2D my2DImageInput;\n" - "layout(rgba32i) uniform highp readonly iimage3D my3DImageInput;\n" - "void main() {\n" - " vec4 result = imageLoad(my2DImageInput, ivec2(gl_LocalInvocationID.xy));\n" - " ivec4 result2 = imageLoad(my3DImageInput, ivec3(gl_LocalInvocationID.xyz));\n" - "}"; - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed" << mInfoLog; - } - - // imageLoad call with image2D passed - CheckImageLoadCall(mASTRoot, "imageLoad(im21;vi2;", EbtImage2D, 2); - - // imageLoad call with image3D passed - CheckImageLoadCall(mASTRoot, "imageLoad(iim31;vi3;", EbtIImage3D, 3); -} - -// Check that imageStore calls get correctly parsed. -TEST_F(ShaderImageTest, ImageStore) -{ - const std::string &shaderString = - "#version 310 es\n" - "layout(local_size_x = 4) in;\n" - "layout(rgba32f) uniform highp writeonly image2D my2DImageOutput;\n" - "layout(rgba32ui) uniform highp writeonly uimage2DArray my2DImageArrayOutput;\n" - "void main() {\n" - " imageStore(my2DImageOutput, ivec2(gl_LocalInvocationID.xy), vec4(0.0));\n" - " imageStore(my2DImageArrayOutput, ivec3(gl_LocalInvocationID.xyz), uvec4(0));\n" - "}"; - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed" << mInfoLog; - } - - // imageStore call with image2D - CheckImageStoreCall(mASTRoot, "imageStore(im21;vi2;vf4;", EbtImage2D, 2, EbtFloat, 4); - - // imageStore call with image2DArray - CheckImageStoreCall(mASTRoot, "imageStore(uim2a1;vi3;vu4;", EbtUImage2DArray, 3, EbtUInt, 4); -} - -// Check that memory qualifiers are correctly parsed. -TEST_F(ShaderImageTest, ImageMemoryQualifiers) -{ - const std::string &shaderString = - "#version 310 es\n" - "layout(local_size_x = 4) in;" - "layout(rgba32f) uniform highp coherent readonly image2D image1;\n" - "layout(rgba32f) uniform highp volatile writeonly image2D image2;\n" - "layout(rgba32f) uniform highp volatile restrict readonly writeonly image2D image3;\n" - "void main() {\n" - "}"; - if (!compile(shaderString)) - { - FAIL() << "Shader compilation failed" << mInfoLog; - } - - CheckImageDeclaration(mASTRoot, "image1", EbtImage2D, EiifRGBA32F, true, false, true, false, - false); - CheckImageDeclaration(mASTRoot, "image2", EbtImage2D, EiifRGBA32F, false, true, true, false, - true); - CheckImageDeclaration(mASTRoot, "image3", EbtImage2D, EiifRGBA32F, true, true, true, true, - true); -} diff --git a/gfx/angle/src/tests/compiler_tests/ShaderVariable_test.cpp b/gfx/angle/src/tests/compiler_tests/ShaderVariable_test.cpp index 53dd93fe4..6b90f1f5d 100755 --- a/gfx/angle/src/tests/compiler_tests/ShaderVariable_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/ShaderVariable_test.cpp @@ -229,10 +229,10 @@ TEST(ShaderVariableTest, IsSameVaryingWithDifferentInvariance) TEST(ShaderVariableTest, InvariantDoubleDeleteBug) { ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); - ShHandle compiler = sh::ConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC, - SH_GLSL_COMPATIBILITY_OUTPUT, &resources); + ShHandle compiler = ShConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC, + SH_GLSL_COMPATIBILITY_OUTPUT, &resources); EXPECT_NE(static_cast(0), compiler); const char *program[] = @@ -246,18 +246,18 @@ TEST(ShaderVariableTest, InvariantDoubleDeleteBug) "}" }; - EXPECT_TRUE(sh::Compile(compiler, program, 1, SH_OBJECT_CODE)); - EXPECT_TRUE(sh::Compile(compiler, program, 1, SH_OBJECT_CODE)); - sh::Destruct(compiler); + EXPECT_TRUE(ShCompile(compiler, program, 1, SH_OBJECT_CODE)); + EXPECT_TRUE(ShCompile(compiler, program, 1, SH_OBJECT_CODE)); + ShDestruct(compiler); } TEST(ShaderVariableTest, IllegalInvariantVarying) { ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); - ShHandle compiler = sh::ConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC, - SH_GLSL_COMPATIBILITY_OUTPUT, &resources); + ShHandle compiler = ShConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC, + SH_GLSL_COMPATIBILITY_OUTPUT, &resources); EXPECT_NE(static_cast(0), compiler); const char *program1[] = @@ -284,17 +284,17 @@ TEST(ShaderVariableTest, IllegalInvariantVarying) "}" }; - EXPECT_TRUE(sh::Compile(compiler, program1, 1, SH_VARIABLES)); - EXPECT_FALSE(sh::Compile(compiler, program2, 1, SH_VARIABLES)); + EXPECT_TRUE(ShCompile(compiler, program1, 1, SH_VARIABLES)); + EXPECT_FALSE(ShCompile(compiler, program2, 1, SH_VARIABLES)); } TEST(ShaderVariableTest, InvariantLeakAcrossShaders) { ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); - ShHandle compiler = sh::ConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC, - SH_GLSL_COMPATIBILITY_OUTPUT, &resources); + ShHandle compiler = ShConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC, + SH_GLSL_COMPATIBILITY_OUTPUT, &resources); EXPECT_NE(static_cast(0), compiler); const char *program1[] = @@ -313,15 +313,15 @@ TEST(ShaderVariableTest, InvariantLeakAcrossShaders) "}" }; - EXPECT_TRUE(sh::Compile(compiler, program1, 1, SH_VARIABLES)); - const std::vector *varyings = sh::GetVaryings(compiler); + EXPECT_TRUE(ShCompile(compiler, program1, 1, SH_VARIABLES)); + const std::vector *varyings = ShGetVaryings(compiler); for (const sh::Varying &varying : *varyings) { if (varying.name == "v_varying") EXPECT_TRUE(varying.isInvariant); } - EXPECT_TRUE(sh::Compile(compiler, program2, 1, SH_VARIABLES)); - varyings = sh::GetVaryings(compiler); + EXPECT_TRUE(ShCompile(compiler, program2, 1, SH_VARIABLES)); + varyings = ShGetVaryings(compiler); for (const sh::Varying &varying : *varyings) { if (varying.name == "v_varying") @@ -332,10 +332,10 @@ TEST(ShaderVariableTest, InvariantLeakAcrossShaders) TEST(ShaderVariableTest, GlobalInvariantLeakAcrossShaders) { ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); - ShHandle compiler = sh::ConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC, - SH_GLSL_COMPATIBILITY_OUTPUT, &resources); + ShHandle compiler = ShConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC, + SH_GLSL_COMPATIBILITY_OUTPUT, &resources); EXPECT_NE(static_cast(0), compiler); const char *program1[] = @@ -354,15 +354,15 @@ TEST(ShaderVariableTest, GlobalInvariantLeakAcrossShaders) "}" }; - EXPECT_TRUE(sh::Compile(compiler, program1, 1, SH_VARIABLES)); - const std::vector *varyings = sh::GetVaryings(compiler); + EXPECT_TRUE(ShCompile(compiler, program1, 1, SH_VARIABLES)); + const std::vector *varyings = ShGetVaryings(compiler); for (const sh::Varying &varying : *varyings) { if (varying.name == "v_varying") EXPECT_TRUE(varying.isInvariant); } - EXPECT_TRUE(sh::Compile(compiler, program2, 1, SH_VARIABLES)); - varyings = sh::GetVaryings(compiler); + EXPECT_TRUE(ShCompile(compiler, program2, 1, SH_VARIABLES)); + varyings = ShGetVaryings(compiler); for (const sh::Varying &varying : *varyings) { if (varying.name == "v_varying") @@ -374,10 +374,10 @@ TEST(ShaderVariableTest, BuiltinInvariantVarying) { ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); - ShHandle compiler = sh::ConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC, - SH_GLSL_COMPATIBILITY_OUTPUT, &resources); + ShHandle compiler = ShConstructCompiler(GL_VERTEX_SHADER, SH_GLES2_SPEC, + SH_GLSL_COMPATIBILITY_OUTPUT, &resources); EXPECT_NE(static_cast(0), compiler); const char *program1[] = @@ -401,21 +401,21 @@ TEST(ShaderVariableTest, BuiltinInvariantVarying) "}" }; - EXPECT_TRUE(sh::Compile(compiler, program1, 1, SH_VARIABLES)); - const std::vector *varyings = sh::GetVaryings(compiler); + EXPECT_TRUE(ShCompile(compiler, program1, 1, SH_VARIABLES)); + const std::vector *varyings = ShGetVaryings(compiler); for (const sh::Varying &varying : *varyings) { if (varying.name == "gl_Position") EXPECT_TRUE(varying.isInvariant); } - EXPECT_TRUE(sh::Compile(compiler, program2, 1, SH_VARIABLES)); - varyings = sh::GetVaryings(compiler); + EXPECT_TRUE(ShCompile(compiler, program2, 1, SH_VARIABLES)); + varyings = ShGetVaryings(compiler); for (const sh::Varying &varying : *varyings) { if (varying.name == "gl_Position") EXPECT_FALSE(varying.isInvariant); } - EXPECT_FALSE(sh::Compile(compiler, program3, 1, SH_VARIABLES)); + EXPECT_FALSE(ShCompile(compiler, program3, 1, SH_VARIABLES)); } } // namespace sh diff --git a/gfx/angle/src/tests/compiler_tests/TypeTracking_test.cpp b/gfx/angle/src/tests/compiler_tests/TypeTracking_test.cpp index ac8ee70f6..516c94a16 100755 --- a/gfx/angle/src/tests/compiler_tests/TypeTracking_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/TypeTracking_test.cpp @@ -13,32 +13,33 @@ #include "GLSLANG/ShaderLang.h" #include "compiler/translator/TranslatorESSL.h" -using namespace sh; - class TypeTrackingTest : public testing::Test { public: TypeTrackingTest() {} protected: - void SetUp() override + virtual void SetUp() { ShBuiltInResources resources; - InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); resources.FragmentPrecisionHigh = 1; mTranslator = new TranslatorESSL(GL_FRAGMENT_SHADER, SH_GLES3_SPEC); ASSERT_TRUE(mTranslator->Init(resources)); } - void TearDown() override { delete mTranslator; } + virtual void TearDown() + { + delete mTranslator; + } void compile(const std::string& shaderString) { const char *shaderStrings[] = { shaderString.c_str() }; bool compilationSuccess = mTranslator->compile(shaderStrings, 1, SH_INTERMEDIATE_TREE); TInfoSink &infoSink = mTranslator->getInfoSink(); - mInfoLog = RemoveSymbolIdsFromInfoLog(infoSink.info.c_str()); + mInfoLog = infoSink.info.c_str(); if (!compilationSuccess) FAIL() << "Shader compilation failed " << mInfoLog; } @@ -54,23 +55,6 @@ class TypeTrackingTest : public testing::Test } private: - // Remove symbol ids from info log - the tests don't care about them. - static std::string RemoveSymbolIdsFromInfoLog(const char *infoLog) - { - std::string filteredLog(infoLog); - size_t idPrefixPos = 0u; - do - { - idPrefixPos = filteredLog.find(" (symbol id"); - if (idPrefixPos != std::string::npos) - { - size_t idSuffixPos = filteredLog.find(")", idPrefixPos); - filteredLog.erase(idPrefixPos, idSuffixPos - idPrefixPos + 1u); - } - } while (idPrefixPos != std::string::npos); - return filteredLog; - } - TranslatorESSL *mTranslator; std::string mInfoLog; }; diff --git a/gfx/angle/src/tests/compiler_tests/UnrollFlatten_test.cpp b/gfx/angle/src/tests/compiler_tests/UnrollFlatten_test.cpp index 78f388a44..3819c3bea 100755 --- a/gfx/angle/src/tests/compiler_tests/UnrollFlatten_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/UnrollFlatten_test.cpp @@ -14,8 +14,6 @@ #include "GLSLANG/ShaderLang.h" #include "tests/test_utils/compiler_test.h" -using namespace sh; - namespace { diff --git a/gfx/angle/src/tests/compiler_tests/WorkGroupSize_test.cpp b/gfx/angle/src/tests/compiler_tests/WorkGroupSize_test.cpp index 980617f84..f2a9d4e8d 100755 --- a/gfx/angle/src/tests/compiler_tests/WorkGroupSize_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/WorkGroupSize_test.cpp @@ -13,8 +13,6 @@ #include "compiler/translator/TranslatorESSL.h" #include "tests/test_utils/compiler_test.h" -using namespace sh; - class WorkGroupSizeTest : public testing::Test { public: @@ -24,7 +22,7 @@ class WorkGroupSizeTest : public testing::Test void SetUp() override { ShBuiltInResources resources; - InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); mTranslator = new TranslatorESSL(GL_COMPUTE_SHADER, SH_GLES3_1_SPEC); ASSERT_TRUE(mTranslator->Init(resources)); @@ -58,7 +56,7 @@ TEST_F(WorkGroupSizeTest, OnlyLocalSizeXSpecified) compile(shaderString); - const WorkGroupSize &localSize = mTranslator->getComputeShaderLocalSize(); + const sh::WorkGroupSize &localSize = mTranslator->getComputeShaderLocalSize(); ASSERT_EQ(5, localSize[0]); ASSERT_EQ(1, localSize[1]); ASSERT_EQ(1, localSize[2]); @@ -75,7 +73,7 @@ TEST_F(WorkGroupSizeTest, LocalSizeXandZ) compile(shaderString); - const WorkGroupSize &localSize = mTranslator->getComputeShaderLocalSize(); + const sh::WorkGroupSize &localSize = mTranslator->getComputeShaderLocalSize(); ASSERT_EQ(5, localSize[0]); ASSERT_EQ(1, localSize[1]); ASSERT_EQ(10, localSize[2]); @@ -92,7 +90,7 @@ TEST_F(WorkGroupSizeTest, LocalSizeAll) compile(shaderString); - const WorkGroupSize &localSize = mTranslator->getComputeShaderLocalSize(); + const sh::WorkGroupSize &localSize = mTranslator->getComputeShaderLocalSize(); ASSERT_EQ(5, localSize[0]); ASSERT_EQ(15, localSize[1]); ASSERT_EQ(10, localSize[2]); diff --git a/gfx/angle/src/tests/deqp.gypi b/gfx/angle/src/tests/deqp.gypi index 1c1e3e5e2..8be7d60cb 100755 --- a/gfx/angle/src/tests/deqp.gypi +++ b/gfx/angle/src/tests/deqp.gypi @@ -1250,7 +1250,7 @@ { 'target_name': 'angle_zlib', 'type': 'static_library', - 'includes': [ '../../gyp/common_defines.gypi', ], + 'includes': [ '../../build/common_defines.gypi', ], 'include_dirs': [ '<(zlib_path)', @@ -1326,7 +1326,7 @@ { 'target_name': 'angle_libpng', 'type': 'static_library', - 'includes': [ '../../gyp/common_defines.gypi', ], + 'includes': [ '../../build/common_defines.gypi', ], 'dependencies': [ 'angle_zlib' @@ -1547,7 +1547,6 @@ 'AdditionalOptions': [ '/bigobj', # needed for glsBuiltinPrecisionTests.cpp - '/wd4251', # needed for angle_util STL objects not having DLL interface ], }, }, @@ -1763,7 +1762,6 @@ [ 'angle_test_support', '<(angle_path)/util/util.gyp:angle_util', - '<(angle_path)/src/angle.gyp:angle_common', ], 'export_dependent_settings': [ @@ -1842,7 +1840,7 @@ { 'target_name': 'angle_deqp_gtest_gles2_tests', 'type': 'executable', - 'includes': [ '../../gyp/common_defines.gypi', ], + 'includes': [ '../../build/common_defines.gypi', ], 'dependencies': [ 'angle_deqp_gtest_support', @@ -1857,7 +1855,7 @@ { 'target_name': 'angle_deqp_gtest_gles3_tests', 'type': 'executable', - 'includes': [ '../../gyp/common_defines.gypi', ], + 'includes': [ '../../build/common_defines.gypi', ], 'dependencies': [ 'angle_deqp_gtest_support', @@ -1872,7 +1870,7 @@ { 'target_name': 'angle_deqp_gtest_gles31_tests', 'type': 'executable', - 'includes': [ '../../gyp/common_defines.gypi', ], + 'includes': [ '../../build/common_defines.gypi', ], 'dependencies': [ 'angle_deqp_gtest_support', @@ -1887,7 +1885,7 @@ { 'target_name': 'angle_deqp_gtest_egl_tests', 'type': 'executable', - 'includes': [ '../../gyp/common_defines.gypi', ], + 'includes': [ '../../build/common_defines.gypi', ], 'dependencies': [ 'angle_deqp_gtest_support', diff --git a/gfx/angle/src/tests/deqp_support/angle_deqp_gtest.cpp b/gfx/angle/src/tests/deqp_support/angle_deqp_gtest.cpp index 89f3f8a42..f3dbb5cad 100755 --- a/gfx/angle/src/tests/deqp_support/angle_deqp_gtest.cpp +++ b/gfx/angle/src/tests/deqp_support/angle_deqp_gtest.cpp @@ -45,50 +45,6 @@ const char *g_TestExpectationsFiles[] = { "deqp_gles31_test_expectations.txt", "deqp_egl_test_expectations.txt", }; -using APIInfo = std::pair; - -const APIInfo g_eglDisplayAPIs[] = { - {"angle-d3d9", gpu::GPUTestConfig::kAPID3D9}, - {"angle-d3d11", gpu::GPUTestConfig::kAPID3D11}, - {"angle-gl", gpu::GPUTestConfig::kAPIGLDesktop}, - {"angle-gles", gpu::GPUTestConfig::kAPIGLES}, -}; - -const APIInfo *g_initAPI = nullptr; - -// Returns the default API for a platform. -const char *GetDefaultAPIName() -{ -#if defined(ANGLE_PLATFORM_WINDOWS) - return "angle-d3d11"; -#elif defined(ANGLE_PLATFORM_APPLE) || defined(ANGLE_PLATFORM_LINUX) - return "angle-gl"; -#elif defined(ANGLE_PLATFORM_ANDROID) - return "angle-gles"; -#else -#error Unknown platform. -#endif -} - -const APIInfo *FindAPIInfo(const std::string &arg) -{ - for (auto &displayAPI : g_eglDisplayAPIs) - { - if (arg == displayAPI.first) - { - return &displayAPI; - } - } - return nullptr; -} - -const APIInfo *GetDefaultAPIInfo() -{ - const APIInfo *defaultInfo = FindAPIInfo(GetDefaultAPIName()); - ASSERT(defaultInfo); - return defaultInfo; -} - // During the CaseList initialization we cannot use the GTEST FAIL macro to quit the program because // the initialization is called outside of tests the first time. void Die() @@ -206,16 +162,6 @@ void dEQPCaseList::initialize() Die(); } - // Set the API from the command line, or using the default platform API. - if (g_initAPI) - { - mTestConfig.set_api(g_initAPI->second); - } - else - { - mTestConfig.set_api(GetDefaultAPIInfo()->second); - } - std::ifstream caseListStream(caseListPath); if (caseListStream.fail()) { @@ -269,7 +215,13 @@ class dEQPTest : public testing::TestWithParam return sCaseList; } - static void SetUpTestCase(); + static void SetUpTestCase() + { + sPasses = 0; + sFails = 0; + sUnexpectedPasses = 0; + } + static void TearDownTestCase(); protected: @@ -309,33 +261,6 @@ unsigned int dEQPTest::sFails = 0; template unsigned int dEQPTest::sUnexpectedPasses = 0; -// static -template -void dEQPTest::SetUpTestCase() -{ - sPasses = 0; - sFails = 0; - sUnexpectedPasses = 0; - - int argc = 0; - std::vector argv; - - // Reserve one argument for the binary name. - argc++; - argv.push_back(""); - - // Add init api. - argc++; - argv.push_back(g_initAPI ? g_initAPI->first : GetDefaultAPIName()); - - // Init the platform. - if (!deqp_libtester_init_platform(argc, argv.data())) - { - std::cout << "Aborting test due to dEQP initialization error." << std::endl; - exit(1); - } -} - // static template void dEQPTest::TearDownTestCase() @@ -354,10 +279,9 @@ void dEQPTest::TearDownTestCase() { std::cout << sUnexpectedPasses << " tests unexpectedly passed." << std::endl; } - - deqp_libtester_shutdown_platform(); } +// TODO(jmadill): add different platform configs, or ability to choose platform #define ANGLE_INSTANTIATE_DEQP_TEST_CASE(DEQP_TEST, N) \ class DEQP_TEST : public dEQPTest \ { \ @@ -385,69 +309,4 @@ ANGLE_INSTANTIATE_DEQP_TEST_CASE(dEQP_GLES31, 2); ANGLE_INSTANTIATE_DEQP_TEST_CASE(dEQP_EGL, 3); #endif -const char *g_deqpEGLString = "--deqp-egl-display-type="; -const char *g_angleEGLString = "--use-angle="; - -void HandleDisplayType(const char *displayTypeString) -{ - std::stringstream argStream; - - if (g_initAPI) - { - std::cout << "Cannot specify two EGL displays!" << std::endl; - exit(1); - } - - if (strncmp(displayTypeString, "angle-", strlen("angle-")) != 0) - { - argStream << "angle-"; - } - - argStream << displayTypeString; - std::string arg = argStream.str(); - - g_initAPI = FindAPIInfo(arg); - - if (!g_initAPI) - { - std::cout << "Unknown ANGLE back-end API: " << displayTypeString << std::endl; - exit(1); - } -} - -void DeleteArg(int *argc, int argIndex, char **argv) -{ - (*argc)--; - for (int moveIndex = argIndex; moveIndex < *argc; ++moveIndex) - { - argv[moveIndex] = argv[moveIndex + 1]; - } -} - } // anonymous namespace - -// Called from main() to process command-line arguments. -namespace angle -{ -void InitTestHarness(int *argc, char **argv) -{ - int argIndex = 0; - while (argIndex < *argc) - { - if (strncmp(argv[argIndex], g_deqpEGLString, strlen(g_deqpEGLString)) == 0) - { - HandleDisplayType(argv[argIndex] + strlen(g_deqpEGLString)); - DeleteArg(argc, argIndex, argv); - } - else if (strncmp(argv[argIndex], g_angleEGLString, strlen(g_angleEGLString)) == 0) - { - HandleDisplayType(argv[argIndex] + strlen(g_angleEGLString)); - DeleteArg(argc, argIndex, argv); - } - else - { - argIndex++; - } - } -} -} // namespace angle diff --git a/gfx/angle/src/tests/deqp_support/angle_deqp_gtest_main.cpp b/gfx/angle/src/tests/deqp_support/angle_deqp_gtest_main.cpp index e72417f0a..154820a26 100755 --- a/gfx/angle/src/tests/deqp_support/angle_deqp_gtest_main.cpp +++ b/gfx/angle/src/tests/deqp_support/angle_deqp_gtest_main.cpp @@ -8,17 +8,12 @@ #include -// Defined in angle_deqp_gtest.cpp. Declared here so we don't need to make a header that we import -// in Chromium. -namespace angle -{ -void InitTestHarness(int *argc, char **argv); -} // namespace angle +#include "angle_deqp_libtester.h" int main(int argc, char **argv) { - angle::InitTestHarness(&argc, argv); testing::InitGoogleTest(&argc, argv); int rt = RUN_ALL_TESTS(); + deqp_libtester_shutdown_platform(); return rt; } diff --git a/gfx/angle/src/tests/deqp_support/angle_deqp_libtester.h b/gfx/angle/src/tests/deqp_support/angle_deqp_libtester.h index 7f35ddb06..3e60f74fe 100755 --- a/gfx/angle/src/tests/deqp_support/angle_deqp_libtester.h +++ b/gfx/angle/src/tests/deqp_support/angle_deqp_libtester.h @@ -28,7 +28,6 @@ // Exported to the tester app. ANGLE_LIBTESTER_EXPORT int deqp_libtester_main(int argc, const char *argv[]); -ANGLE_LIBTESTER_EXPORT bool deqp_libtester_init_platform(int argc, const char *argv[]); ANGLE_LIBTESTER_EXPORT void deqp_libtester_shutdown_platform(); ANGLE_LIBTESTER_EXPORT bool deqp_libtester_run(const char *caseName); diff --git a/gfx/angle/src/tests/deqp_support/angle_deqp_libtester_main.cpp b/gfx/angle/src/tests/deqp_support/angle_deqp_libtester_main.cpp index 90727f390..f5407d570 100755 --- a/gfx/angle/src/tests/deqp_support/angle_deqp_libtester_main.cpp +++ b/gfx/angle/src/tests/deqp_support/angle_deqp_libtester_main.cpp @@ -81,25 +81,20 @@ deBool deIsDir(const char *filename) #error TODO(jmadill): support other platforms #endif -bool FindDataDir(std::string *dataDirOut) +bool FindDataDir(std::string *dataDir) { for (auto searchDir : g_dEQPDataSearchDirs) { if (deIsDir((std::string(searchDir) + "/gles2").c_str())) { - *dataDirOut = searchDir; + *dataDir = searchDir; return true; } - std::stringstream dirStream; - dirStream << angle::GetExecutableDirectory() << "/" << searchDir; - std::string dataDir = dirStream.str(); - dirStream << "/gles2"; - std::string searchPath = dirStream.str(); - - if (deIsDir(searchPath.c_str())) + std::string directory = angle::GetExecutableDirectory() + "/" + searchDir; + if (deIsDir((directory + "/gles2").c_str())) { - *dataDirOut = dataDir; + *dataDir = directory; return true; } } @@ -117,9 +112,7 @@ std::string GetLogFileName(std::string deqpDataDir) #endif } -} // anonymous namespace - -ANGLE_LIBTESTER_EXPORT bool deqp_libtester_init_platform(int argc, const char *argv[]) +bool InitPlatform(int argc, const char *argv[]) { try { @@ -158,10 +151,12 @@ ANGLE_LIBTESTER_EXPORT bool deqp_libtester_init_platform(int argc, const char *a return true; } +} // anonymous namespace + // Exported to the tester app. ANGLE_LIBTESTER_EXPORT int deqp_libtester_main(int argc, const char *argv[]) { - if (!deqp_libtester_init_platform(argc, argv)) + if (!InitPlatform(argc, argv)) { tcu::die("Could not initialize the dEQP platform"); } @@ -190,25 +185,18 @@ ANGLE_LIBTESTER_EXPORT int deqp_libtester_main(int argc, const char *argv[]) ANGLE_LIBTESTER_EXPORT void deqp_libtester_shutdown_platform() { delete g_executor; - g_executor = nullptr; delete g_root; - g_root = nullptr; delete g_testCtx; - g_testCtx = nullptr; delete g_log; - g_log = nullptr; delete g_archive; - g_archive = nullptr; delete g_cmdLine; - g_cmdLine = nullptr; delete g_platform; - g_platform = nullptr; } ANGLE_LIBTESTER_EXPORT bool deqp_libtester_run(const char *caseName) { const char *emptyString = ""; - if (g_platform == nullptr && !deqp_libtester_init_platform(1, &emptyString)) + if (g_platform == nullptr && !InitPlatform(1, &emptyString)) { tcu::die("Failed to initialize platform."); } diff --git a/gfx/angle/src/tests/deqp_support/deqp_egl_test_expectations.txt b/gfx/angle/src/tests/deqp_support/deqp_egl_test_expectations.txt index 789d3a6fe..45fc543bb 100755 --- a/gfx/angle/src/tests/deqp_support/deqp_egl_test_expectations.txt +++ b/gfx/angle/src/tests/deqp_support/deqp_egl_test_expectations.txt @@ -35,66 +35,66 @@ //////////////////////////////////////////////////////////////////////////////// // TODO(jmadill): Triage these into permananent and temporary failures. -1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgb565_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgb565_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgb565_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgb888_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgb888_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgb888_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba4444_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba4444_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba4444_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba5551_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba5551_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba5551_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba8888_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba8888_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba8888_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgb565_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgb565_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgb565_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgb888_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgb888_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgb888_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba4444_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba4444_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba4444_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba5551_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba5551_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba5551_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba8888_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba8888_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba8888_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgb565_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgb565_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgb565_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgb888_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgb888_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgb888_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba4444_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba4444_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba4444_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba5551_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba5551_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba5551_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba8888_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba8888_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba8888_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgb565_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgb565_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgb565_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgb888_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgb888_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgb888_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba4444_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba4444_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba4444_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba5551_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba5551_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba5551_depth_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba8888_no_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba8888_depth_no_stencil = SKIP -1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba8888_depth_stencil = SKIP +1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgb565_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgb565_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgb565_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgb888_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgb888_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgb888_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba4444_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba4444_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba4444_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba5551_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba5551_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba5551_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba8888_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba8888_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.window.rgba8888_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgb565_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgb565_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgb565_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgb888_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgb888_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgb888_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba4444_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba4444_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba4444_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba5551_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba5551_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba5551_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba8888_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba8888_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgba8888_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgb565_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgb565_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgb565_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgb888_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgb888_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgb888_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba4444_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba4444_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba4444_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba5551_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba5551_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba5551_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba8888_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba8888_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.window.rgba8888_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgb565_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgb565_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgb565_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgb888_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgb888_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgb888_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba4444_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba4444_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba4444_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba5551_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba5551_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba5551_depth_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba8888_no_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba8888_depth_no_stencil = FAIL +1340 WIN : dEQP-EGL.functional.query_surface.set_attribute.pbuffer.rgba8888_depth_stencil = FAIL 1340 WIN : dEQP-EGL.functional.query_config.get_configs.get_configs_bounds = FAIL 1340 WIN : dEQP-EGL.functional.choose_config.simple.selection_only.buffer_size = FAIL 1340 WIN : dEQP-EGL.functional.choose_config.simple.selection_only.red_size = FAIL @@ -174,9 +174,9 @@ 1340 WIN : dEQP-EGL.functional.image.modify.renderbuffer_rgb5_a1_tex_subimage_rgba8 = FAIL 1340 WIN : dEQP-EGL.functional.image.modify.renderbuffer_rgb5_a1_tex_subimage_rgba4 = FAIL 1340 WIN : dEQP-EGL.functional.image.modify.renderbuffer_rgb565_tex_subimage_rgb8 = FAIL -1340 WIN : dEQP-EGL.functional.negative_api.choose_config = SKIP +1340 WIN : dEQP-EGL.functional.negative_api.choose_config = FAIL 1340 WIN : dEQP-EGL.functional.negative_api.get_display = FAIL -1340 WIN : dEQP-EGL.functional.negative_api.surface_attrib = SKIP +1340 WIN : dEQP-EGL.functional.negative_api.surface_attrib = FAIL 1340 WIN : dEQP-EGL.functional.negative_api.swap_interval = FAIL 1340 WIN : dEQP-EGL.functional.swap_buffers.rgb565_no_depth_no_stencil = FAIL 1340 WIN : dEQP-EGL.functional.swap_buffers.rgb565_depth_no_stencil = FAIL @@ -254,7 +254,3 @@ 1340 WIN : dEQP-EGL.functional.native_coord_mapping.native_window.rgba8888_depth_stencil_clear = FAIL 1340 WIN : dEQP-EGL.functional.native_coord_mapping.native_window.rgba8888_depth_stencil_render = FAIL 1340 WIN : dEQP-EGL.functional.get_proc_address.extension.egl_ext_platform_base = FAIL -1340 WIN : dEQP-EGL.functional.preserve_swap.preserve.no_read_before_swap.* = SKIP -1340 WIN : dEQP-EGL.functional.preserve_swap.preserve.read_before_swap.* = SKIP -1340 WIN : dEQP-EGL.functional.resize.back_buffer.* = SKIP -1340 WIN : dEQP-EGL.functional.resize.pixel_density.* = SKIP diff --git a/gfx/angle/src/tests/deqp_support/deqp_gles2_test_expectations.txt b/gfx/angle/src/tests/deqp_support/deqp_gles2_test_expectations.txt index b0ca48b72..5ea0f1348 100755 --- a/gfx/angle/src/tests/deqp_support/deqp_gles2_test_expectations.txt +++ b/gfx/angle/src/tests/deqp_support/deqp_gles2_test_expectations.txt @@ -35,7 +35,7 @@ 998 WIN LINUX MAC : dEQP-GLES2.stress.* = SKIP // Tests that we fail because they're not in line with the WebGL spec -1335 WIN LINUX MAC ANDROID : dEQP-GLES2.functional.shaders.preprocessor.conditional_inclusion.basic_2* = FAIL +1335 WIN LINUX MAC : dEQP-GLES2.functional.shaders.preprocessor.conditional_inclusion.basic_2* = FAIL //////////////////////////////////////////////////////////////////////////////// // @@ -45,6 +45,11 @@ // Windows only failures +// These tests crash for unknown reason under a newer D3DCompiler_47.dll +// TODO(jmadill): Figure out if we can solve these crashes +1252 WIN : dEQP-GLES2.functional.shaders.random.trigonometric.vertex.63 = SKIP +1252 WIN : dEQP-GLES2.functional.shaders.random.trigonometric.fragment.63 = SKIP + // TODO(jmadill): triage these into temporary and permanent suppressions 1027 WIN : dEQP-GLES2.functional.fbo.render.color_clear.rbo_rgb5_a1 = FAIL @@ -64,6 +69,7 @@ 1027 WIN : dEQP-GLES2.functional.fbo.render.recreate_colorbuffer.no_rebind_tex2d_rgb_stencil_index8 = FAIL 1027 WIN : dEQP-GLES2.functional.fbo.render.recreate_colorbuffer.no_rebind_tex2d_rgba_stencil_index8 = FAIL 1033 WIN : dEQP-GLES2.functional.polygon_offset.fixed16_render_with_units = FAIL +1017 WIN : dEQP-GLES2.functional.shaders.loops.for_constant_iterations.nested_sequence_* = FAIL 1017 WIN : dEQP-GLES2.functional.shaders.loops.for_constant_iterations.nested_tricky_dataflow_* = FAIL 1017 WIN : dEQP-GLES2.functional.shaders.loops.while_constant_iterations.nested_tricky_dataflow_* = FAIL 1017 WIN : dEQP-GLES2.functional.shaders.loops.do_while_constant_iterations.nested_tricky_dataflow_* = FAIL @@ -123,51 +129,29 @@ 1143 LINUX : dEQP-GLES2.functional.texture.mipmap.cube.projected.linear_nearest = FAIL // Mac specific failures +1143 MAC : dEQP-GLES2.functional.shaders.invariance.mediump.common_subexpression_1 = FAIL +1143 MAC : dEQP-GLES2.functional.shaders.invariance.highp.common_subexpression_1 = FAIL +1143 MAC : dEQP-GLES2.functional.shaders.preprocessor.pragmas.pragma_* = FAIL +1143 MAC : dEQP-GLES2.functional.shaders.linkage.varying_4 = FAIL 1143 MAC : dEQP-GLES2.functional.shaders.scoping.valid.local_int_variable_hides_struct_type_* = FAIL 1143 MAC : dEQP-GLES2.functional.shaders.scoping.valid.local_struct_variable_hides_struct_type_* = FAIL 1143 MAC : dEQP-GLES2.functional.shaders.scoping.valid.function_parameter_hides_struct_type_* = FAIL +1143 MAC : dEQP-GLES2.functional.shaders.invariance.highp.common_subexpression_3 = FAIL +1143 MAC : dEQP-GLES2.functional.shaders.invariance.highp.loop_0 = FAIL +1143 MAC : dEQP-GLES2.functional.shaders.invariance.highp.loop_1 = FAIL +1143 MAC : dEQP-GLES2.functional.shaders.invariance.mediump.common_subexpression_3 = FAIL +1143 MAC : dEQP-GLES2.functional.shaders.invariance.mediump.loop_0 = FAIL +1143 MAC : dEQP-GLES2.functional.shaders.invariance.mediump.loop_1 = FAIL +1143 MAC : dEQP-GLES2.functional.shaders.invariance.lowp.common_subexpression_1 = FAIL +1143 MAC : dEQP-GLES2.functional.shaders.invariance.lowp.common_subexpression_3 = FAIL +1143 MAC : dEQP-GLES2.functional.shaders.invariance.lowp.loop_0 = FAIL +1143 MAC : dEQP-GLES2.functional.shaders.invariance.lowp.loop_1 = FAIL +1143 MAC : dEQP-GLES2.functional.shaders.random.trigonometric.vertex.43 = FAIL 1143 MAC : dEQP-GLES2.functional.shaders.random.trigonometric.vertex.65 = FAIL - -// Android only failures -1484 ANDROID : dEQP-GLES2.functional.vertex_arrays.* = SKIP -1485 ANDROID : dEQP-GLES2.functional.clipping.triangle_vertex.clip_three.clip_neg_x_neg_z_and_pos_x_pos_z_and_neg_x_neg_y_pos_z = FAIL -1486 ANDROID : dEQP-GLES2.functional.fbo.completeness.attachment_combinations.none_none_none_tex = FAIL -1486 ANDROID : dEQP-GLES2.functional.fbo.completeness.attachment_combinations.none_none_rbo_tex = FAIL -1486 ANDROID : dEQP-GLES2.functional.fbo.completeness.attachment_combinations.none_none_tex_none = FAIL -1486 ANDROID : dEQP-GLES2.functional.fbo.completeness.attachment_combinations.none_none_tex_rbo = FAIL -1486 ANDROID : dEQP-GLES2.functional.fbo.completeness.attachment_combinations.none_none_tex_tex = FAIL -1486 ANDROID : dEQP-GLES2.functional.fbo.completeness.attachment_combinations.rbo_none_none_tex = FAIL -1486 ANDROID : dEQP-GLES2.functional.fbo.completeness.attachment_combinations.rbo_none_rbo_tex = FAIL -1486 ANDROID : dEQP-GLES2.functional.fbo.completeness.attachment_combinations.rbo_none_tex_none = FAIL -1486 ANDROID : dEQP-GLES2.functional.fbo.completeness.attachment_combinations.rbo_none_tex_rbo = FAIL -1486 ANDROID : dEQP-GLES2.functional.fbo.completeness.attachment_combinations.rbo_none_tex_tex = FAIL -1486 ANDROID : dEQP-GLES2.functional.fbo.completeness.attachment_combinations.tex_none_none_tex = FAIL -1486 ANDROID : dEQP-GLES2.functional.fbo.completeness.attachment_combinations.tex_none_rbo_tex = FAIL -1486 ANDROID : dEQP-GLES2.functional.fbo.completeness.attachment_combinations.tex_none_tex_none = FAIL -1486 ANDROID : dEQP-GLES2.functional.fbo.completeness.attachment_combinations.tex_none_tex_rbo = FAIL -1486 ANDROID : dEQP-GLES2.functional.fbo.completeness.attachment_combinations.tex_none_tex_tex = FAIL -1487 ANDROID : dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.depth_stencil_unsigned_int_24_8 = FAIL -1487 ANDROID : dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.srgb8 = FAIL -1487 ANDROID : dEQP-GLES2.functional.fbo.completeness.renderable.texture.stencil.depth_stencil_unsigned_int_24_8 = FAIL -1487 ANDROID : dEQP-GLES2.functional.fbo.completeness.renderable.texture.stencil.srgb8 = FAIL -1487 ANDROID : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.depth_stencil_unsigned_int_24_8 = FAIL -1487 ANDROID : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.srgb8 = FAIL -1488 ANDROID : dEQP-GLES2.functional.shaders.return.conditional_return_always_vertex = FAIL -1488 ANDROID : dEQP-GLES2.functional.shaders.return.conditional_return_always_fragment = FAIL -1488 ANDROID : dEQP-GLES2.functional.shaders.return.output_write_always_vertex = FAIL -1488 ANDROID : dEQP-GLES2.functional.shaders.return.output_write_always_fragment = FAIL -1489 ANDROID : dEQP-GLES2.functional.texture.mipmap.2d.generate.a8_fastest = FAIL -1489 ANDROID : dEQP-GLES2.functional.texture.mipmap.2d.generate.a8_nicest = FAIL -1489 ANDROID : dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_fastest = FAIL -1489 ANDROID : dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_nicest = FAIL -1489 ANDROID : dEQP-GLES2.functional.texture.mipmap.2d.generate.la88_fastest = FAIL -1489 ANDROID : dEQP-GLES2.functional.texture.mipmap.2d.generate.la88_nicest = FAIL -1489 ANDROID : dEQP-GLES2.functional.texture.mipmap.cube.generate.a8_fastest = FAIL -1489 ANDROID : dEQP-GLES2.functional.texture.mipmap.cube.generate.a8_nicest = FAIL -1489 ANDROID : dEQP-GLES2.functional.texture.mipmap.cube.generate.l8_fastest = FAIL -1489 ANDROID : dEQP-GLES2.functional.texture.mipmap.cube.generate.l8_nicest = FAIL -1489 ANDROID : dEQP-GLES2.functional.texture.mipmap.cube.generate.la88_fastest = FAIL -1489 ANDROID : dEQP-GLES2.functional.texture.mipmap.cube.generate.la88_nicest = FAIL +1143 MAC : dEQP-GLES2.functional.texture.size.cube.256x256_rgba4444 = FAIL +1143 MAC : dEQP-GLES2.functional.texture.size.cube.512x512_rgba4444 = FAIL +1143 MAC : dEQP-GLES2.functional.texture.mipmap.cube.projected.linear_linear = FAIL +1143 MAC : dEQP-GLES2.functional.texture.specification.basic_copyteximage2d.cube_* = FAIL // Windows and Linux failures 1020 WIN LINUX : dEQP-GLES2.functional.texture.mipmap.cube.projected.linear_linear = FAIL @@ -193,11 +177,9 @@ 1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgba_half_float_oes = FAIL 1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.srgb8 = FAIL 1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.texture.stencil.srgb8 = FAIL -1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.texture.stencil.srgb8_alpha8 = FAIL 1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.depth_component_unsigned_short = FAIL 1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.depth_component_unsigned_int = FAIL 1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.srgb8 = FAIL -1028 WIN LINUX MAC : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.srgb8_alpha8 = FAIL 1128 WIN LINUX MAC : dEQP-GLES2.functional.negative_api.texture.compressedtexsubimage2d_invalid_size = FAIL 1029 WIN LINUX MAC : dEQP-GLES2.functional.negative_api.texture.teximage2d_invalid_format = FAIL 1029 WIN LINUX MAC : dEQP-GLES2.functional.negative_api.texture.teximage2d_invalid_internalformat = FAIL diff --git a/gfx/angle/src/tests/deqp_support/deqp_gles31_test_expectations.txt b/gfx/angle/src/tests/deqp_support/deqp_gles31_test_expectations.txt index 84d327692..49acb746e 100755 --- a/gfx/angle/src/tests/deqp_support/deqp_gles31_test_expectations.txt +++ b/gfx/angle/src/tests/deqp_support/deqp_gles31_test_expectations.txt @@ -23,11506 +23,5 @@ // 91531 MAC WIN LINUX : conformance_more_* = SKIP // 91532 MAC NVIDIA 0x0640 : tex_image_and_sub_image_2d_with_video = PASS FAIL -// Crashing Tests -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image2d.vertex_binding_array = SKIP -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image2d.vertex_binding_max_array = SKIP -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image2d.fragment_binding_array = SKIP -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image2d.fragment_binding_max_array = SKIP -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image3d.vertex_binding_array = SKIP -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image3d.vertex_binding_max_array = SKIP -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image3d.fragment_binding_array = SKIP -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image3d.fragment_binding_max_array = SKIP -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.negative.image.image2d.vertex_binding_over_max_array = SKIP -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.negative.image.image2d.fragment_binding_over_max_array = SKIP -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.negative.image.image2d.binding_contradictory_array = SKIP -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.negative.image.image3d.vertex_binding_over_max_array = SKIP -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.negative.image.image3d.fragment_binding_over_max_array = SKIP -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.negative.image.image3d.binding_contradictory_array = SKIP - -// Failing Tests -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_var.compute.num_work_groups = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_var.compute.work_group_size = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_var.compute.work_group_id = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_var.compute.local_invocation_id = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_var.compute.global_invocation_id = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_var.compute.local_invocation_index = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.float_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.float_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.float_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.vec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.vec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.vec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.vec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.vec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.vec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.vec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.vec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.vec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.int_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.int_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.int_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.ivec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.ivec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.ivec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.ivec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.ivec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.ivec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.ivec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.ivec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.abs.ivec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.float_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.float_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.float_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.vec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.vec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.vec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.vec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.vec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.vec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.vec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.vec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.vec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.int_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.int_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.int_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.ivec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.ivec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.ivec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.ivec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.ivec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.ivec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.ivec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.ivec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.sign.ivec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floor.float_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floor.float_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floor.float_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floor.vec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floor.vec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floor.vec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floor.vec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floor.vec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floor.vec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floor.vec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floor.vec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floor.vec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.trunc.float_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.trunc.float_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.trunc.float_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.trunc.vec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.trunc.vec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.trunc.vec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.trunc.vec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.trunc.vec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.trunc.vec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.trunc.vec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.trunc.vec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.trunc.vec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.round.float_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.round.float_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.round.float_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.round.vec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.round.vec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.round.vec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.round.vec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.round.vec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.round.vec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.round.vec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.round.vec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.round.vec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.roundeven.float_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.roundeven.float_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.roundeven.float_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.roundeven.vec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.roundeven.vec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.roundeven.vec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.roundeven.vec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.roundeven.vec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.roundeven.vec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.roundeven.vec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.roundeven.vec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.roundeven.vec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ceil.float_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ceil.float_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ceil.float_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ceil.vec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ceil.vec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ceil.vec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ceil.vec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ceil.vec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ceil.vec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ceil.vec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ceil.vec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ceil.vec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.fract.float_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.fract.float_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.fract.float_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.fract.vec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.fract.vec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.fract.vec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.fract.vec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.fract.vec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.fract.vec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.fract.vec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.fract.vec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.fract.vec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.modf.float_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.modf.float_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.modf.float_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.modf.vec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.modf.vec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.modf.vec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.modf.vec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.modf.vec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.modf.vec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.modf.vec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.modf.vec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.modf.vec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isnan.float_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isnan.float_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isnan.float_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isnan.vec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isnan.vec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isnan.vec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isnan.vec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isnan.vec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isnan.vec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isnan.vec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isnan.vec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isnan.vec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isinf.float_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isinf.float_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isinf.float_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isinf.vec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isinf.vec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isinf.vec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isinf.vec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isinf.vec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isinf.vec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isinf.vec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isinf.vec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.isinf.vec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstoint.float_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstoint.float_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstoint.float_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstoint.vec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstoint.vec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstoint.vec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstoint.vec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstoint.vec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstoint.vec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstoint.vec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstoint.vec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstoint.vec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstouint.float_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstouint.float_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstouint.float_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstouint.vec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstouint.vec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstouint.vec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstouint.vec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstouint.vec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstouint.vec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstouint.vec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstouint.vec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.floatbitstouint.vec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.float_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.float_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.float_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.float_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.float_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.float_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.float_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.float_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.float_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.frexp.vec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.float_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.float_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.float_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.float_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.float_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.float_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.float_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.float_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.float_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.ldexp.vec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.intbitstofloat.int_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.intbitstofloat.ivec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.intbitstofloat.ivec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.uintbitstofloat.uint_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.uintbitstofloat.uvec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.common.uintbitstofloat.uvec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packsnorm4x8_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packsnorm4x8_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packsnorm4x8_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packsnorm4x8_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packsnorm4x8_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packsnorm4x8_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packsnorm4x8_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packsnorm4x8_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packsnorm4x8_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.unpacksnorm4x8_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.unpacksnorm4x8_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.unpacksnorm4x8_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packunorm4x8_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packunorm4x8_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packunorm4x8_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packunorm4x8_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packunorm4x8_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packunorm4x8_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packunorm4x8_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packunorm4x8_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packunorm4x8_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.unpackunorm4x8_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.unpackunorm4x8_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.unpackunorm4x8_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packsnorm2x16_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packsnorm2x16_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packsnorm2x16_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.unpacksnorm2x16_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packunorm2x16_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packunorm2x16_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packunorm2x16_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.unpackunorm2x16_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packhalf2x16_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.unpackhalf2x16_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uint_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uint_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uint_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uint_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uint_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uint_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uint_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uint_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uint_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.uaddcarry.uvec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uint_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uint_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uint_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uint_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uint_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uint_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uint_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uint_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uint_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.usubborrow.uvec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.umulextended.uint_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.umulextended.uint_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.umulextended.uint_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.umulextended.uvec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.umulextended.uvec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.umulextended.uvec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.umulextended.uvec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.umulextended.uvec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.umulextended.uvec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.umulextended.uvec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.umulextended.uvec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.umulextended.uvec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.imulextended.int_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.imulextended.int_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.imulextended.int_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.imulextended.ivec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.imulextended.ivec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.imulextended.ivec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.imulextended.ivec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.imulextended.ivec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.imulextended.ivec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.imulextended.ivec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.imulextended.ivec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.imulextended.ivec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.int_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.int_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.int_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.int_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.int_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.int_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.int_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.int_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.int_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.ivec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uint_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uint_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uint_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uint_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uint_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uint_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uint_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uint_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uint_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.uvec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.int_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.int_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.int_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.int_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.int_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.int_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.int_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.int_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.int_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.ivec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uint_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uint_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uint_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uint_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uint_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uint_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uint_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uint_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uint_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldinsert.uvec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.int_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.int_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.int_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.int_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.int_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.int_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.int_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.int_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.int_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.ivec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uint_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uint_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uint_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uint_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uint_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uint_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uint_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uint_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uint_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.uvec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.int_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.int_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.int_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.int_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.int_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.int_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.int_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.int_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.int_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.ivec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uint_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uint_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uint_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uint_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uint_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uint_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uint_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uint_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uint_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.uvec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.int_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.int_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.int_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.int_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.int_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.int_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.int_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.int_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.int_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.ivec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uint_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uint_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uint_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uint_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uint_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uint_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uint_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uint_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uint_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.int_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.int_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.int_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.int_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.int_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.int_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.int_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.int_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.int_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.ivec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uint_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uint_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uint_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uint_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uint_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uint_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uint_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uint_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uint_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec2_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec2_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec2_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec2_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec2_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec2_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec2_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec2_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec2_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec3_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec3_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec3_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec3_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec3_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec3_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec3_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec3_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec3_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec4_lowp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec4_lowp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec4_lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec4_mediump_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec4_mediump_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec4_mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec4_highp_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec4_highp_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec4_highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.add.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.add.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.add.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.add.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.add.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.add.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.add.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.add.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.add.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.add.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.add.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.add.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sub.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sub.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sub.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sub.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sub.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sub.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sub.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sub.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sub.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sub.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sub.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sub.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mul.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mul.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mul.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mul.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mul.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mul.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mul.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mul.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mul.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mul.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mul.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mul.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.div.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.div.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.div.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.div.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.div.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.div.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.div.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.div.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.radians.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.radians.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.radians.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.radians.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.radians.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.radians.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.radians.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.radians.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.radians.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.radians.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.radians.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.radians.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.degrees.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.degrees.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.degrees.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.degrees.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.degrees.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.degrees.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.degrees.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.degrees.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.degrees.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.degrees.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.degrees.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.degrees.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sin.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sin.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sin.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sin.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sin.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sin.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sin.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sin.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cos.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cos.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cos.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cos.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cos.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cos.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cos.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cos.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tan.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tan.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tan.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tan.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tan.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tan.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tan.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tan.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asin.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asin.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asin.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asin.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asin.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asin.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asin.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asin.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asin.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asin.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asin.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asin.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acos.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acos.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acos.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acos.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acos.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acos.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acos.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acos.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atan2.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atan2.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atan2.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atan2.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atan.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atan.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atan.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atan.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atan.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atan.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atan.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atan.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sinh.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sinh.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sinh.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sinh.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sinh.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sinh.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sinh.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sinh.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sinh.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sinh.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sinh.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sinh.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cosh.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cosh.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cosh.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cosh.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cosh.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cosh.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cosh.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cosh.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cosh.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cosh.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cosh.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cosh.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tanh.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tanh.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tanh.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tanh.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tanh.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tanh.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tanh.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tanh.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tanh.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tanh.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tanh.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.tanh.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asinh.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asinh.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asinh.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asinh.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asinh.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asinh.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asinh.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asinh.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asinh.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asinh.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asinh.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.asinh.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acosh.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acosh.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acosh.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acosh.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acosh.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acosh.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acosh.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.acosh.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atanh.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atanh.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atanh.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atanh.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atanh.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atanh.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atanh.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.atanh.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.pow.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.pow.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.pow.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.pow.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.pow.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.pow.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.pow.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.pow.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.pow.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.pow.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.pow.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.pow.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp2.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp2.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp2.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp2.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp2.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp2.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp2.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp2.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp2.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp2.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp2.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.exp2.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log2.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log2.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log2.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log2.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log2.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log2.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log2.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log2.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log2.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log2.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log2.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.log2.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sqrt.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sqrt.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sqrt.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sqrt.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sqrt.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sqrt.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sqrt.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sqrt.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sqrt.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sqrt.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sqrt.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sqrt.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.inversesqrt.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.inversesqrt.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.inversesqrt.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.inversesqrt.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.inversesqrt.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.inversesqrt.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.inversesqrt.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.inversesqrt.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.inversesqrt.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.inversesqrt.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.inversesqrt.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.inversesqrt.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.abs.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.abs.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.abs.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.abs.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.abs.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.abs.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.abs.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.abs.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.abs.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.abs.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.abs.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.abs.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sign.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sign.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sign.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sign.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sign.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sign.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sign.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sign.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sign.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sign.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sign.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.sign.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.floor.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.floor.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.floor.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.floor.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.floor.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.floor.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.floor.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.floor.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.floor.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.floor.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.floor.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.floor.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.trunc.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.trunc.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.trunc.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.trunc.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.trunc.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.trunc.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.trunc.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.trunc.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.trunc.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.trunc.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.trunc.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.trunc.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.round.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.round.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.round.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.round.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.round.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.round.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.round.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.round.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.round.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.round.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.round.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.round.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.roundeven.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.roundeven.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.roundeven.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.roundeven.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.roundeven.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.roundeven.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.roundeven.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.roundeven.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.roundeven.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.roundeven.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.roundeven.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.roundeven.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ceil.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ceil.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ceil.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ceil.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ceil.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ceil.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ceil.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ceil.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ceil.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ceil.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ceil.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ceil.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.fract.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.fract.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.fract.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.fract.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.fract.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.fract.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.fract.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.fract.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.fract.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.fract.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.fract.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.fract.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mod.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mod.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mod.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mod.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mod.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mod.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mod.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mod.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.modf.lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.modf.mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.modf.highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.min.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.min.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.min.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.min.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.min.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.min.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.min.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.min.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.max.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.max.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.max.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.max.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.max.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.max.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.max.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.max.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.clamp.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.clamp.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.clamp.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.clamp.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.clamp.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.clamp.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.clamp.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.clamp.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mix.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mix.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mix.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mix.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mix.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mix.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mix.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mix.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mix.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mix.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mix.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.mix.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.step.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.step.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.step.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.step.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.step.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.step.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.step.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.step.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.step.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.step.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.step.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.step.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.smoothstep.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.smoothstep.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.smoothstep.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.smoothstep.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.length.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.length.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.length.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.length.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.length.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.length.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.length.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.length.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.length.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.length.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.length.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.length.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.distance.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.distance.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.distance.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.distance.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.distance.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.distance.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.distance.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.distance.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.distance.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.distance.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.distance.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.distance.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.dot.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.dot.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.dot.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.dot.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.dot.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.dot.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.dot.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.dot.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.dot.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.dot.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.dot.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cross.lowp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cross.mediump_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.cross.highp_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.normalize.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.normalize.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.normalize.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.normalize.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.normalize.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.normalize.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.normalize.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.normalize.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.normalize.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.normalize.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.normalize.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.normalize.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.faceforward.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.faceforward.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.faceforward.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.faceforward.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.faceforward.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.faceforward.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.faceforward.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.faceforward.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.faceforward.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.faceforward.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.faceforward.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.faceforward.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.reflect.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.reflect.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.reflect.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.reflect.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.reflect.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.reflect.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.reflect.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.reflect.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.reflect.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.refract.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.refract.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.refract.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.refract.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.refract.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.refract.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.refract.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.refract.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.refract.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.refract.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.refract.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.refract.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.lowp_compute.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.lowp_compute.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.lowp_compute.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.lowp_compute.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.lowp_compute.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.lowp_compute.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.lowp_compute.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.lowp_compute.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.lowp_compute.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.mediump_compute.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.mediump_compute.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.mediump_compute.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.mediump_compute.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.mediump_compute.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.mediump_compute.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.mediump_compute.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.mediump_compute.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.mediump_compute.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.highp_compute.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.highp_compute.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.highp_compute.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.highp_compute.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.highp_compute.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.highp_compute.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.highp_compute.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.highp_compute.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.matrixcompmult.highp_compute.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.lowp_compute.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.lowp_compute.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.lowp_compute.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.lowp_compute.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.lowp_compute.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.lowp_compute.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.lowp_compute.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.lowp_compute.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.lowp_compute.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.mediump_compute.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.mediump_compute.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.mediump_compute.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.mediump_compute.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.mediump_compute.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.mediump_compute.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.mediump_compute.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.mediump_compute.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.mediump_compute.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.highp_compute.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.highp_compute.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.highp_compute.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.highp_compute.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.highp_compute.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.highp_compute.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.highp_compute.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.highp_compute.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.outerproduct.highp_compute.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.lowp_compute.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.lowp_compute.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.lowp_compute.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.lowp_compute.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.lowp_compute.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.lowp_compute.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.lowp_compute.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.lowp_compute.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.lowp_compute.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.mediump_compute.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.mediump_compute.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.mediump_compute.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.mediump_compute.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.mediump_compute.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.mediump_compute.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.mediump_compute.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.mediump_compute.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.mediump_compute.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.highp_compute.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.highp_compute.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.highp_compute.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.highp_compute.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.highp_compute.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.highp_compute.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.highp_compute.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.highp_compute.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.transpose.highp_compute.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.determinant.lowp_compute.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.determinant.mediump_compute.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.determinant.highp_compute.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.inverse.lowp_compute.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.inverse.mediump_compute.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.lowp_vertex.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.lowp_vertex.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.lowp_vertex.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.lowp_vertex.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.lowp_fragment.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.lowp_fragment.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.lowp_fragment.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.lowp_fragment.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.mediump_vertex.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.mediump_vertex.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.mediump_vertex.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.mediump_vertex.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.mediump_fragment.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.mediump_fragment.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.mediump_fragment.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.mediump_fragment.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.highp_vertex.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.highp_vertex.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.highp_vertex.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.highp_vertex.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.highp_fragment.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.highp_fragment.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.highp_fragment.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.highp_fragment.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.lowp_vertex.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.lowp_vertex.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.lowp_vertex.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.lowp_vertex.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.lowp_fragment.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.lowp_fragment.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.lowp_fragment.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.lowp_fragment.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.lowp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.lowp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.lowp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.lowp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.mediump_vertex.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.mediump_vertex.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.mediump_vertex.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.mediump_vertex.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.mediump_fragment.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.mediump_fragment.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.mediump_fragment.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.mediump_fragment.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.mediump_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.mediump_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.mediump_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.mediump_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.highp_vertex.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.highp_vertex.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.highp_vertex.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.highp_vertex.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.highp_fragment.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.highp_fragment.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.highp_fragment.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.highp_fragment.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.highp_compute.scalar = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.highp_compute.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.highp_compute.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_functions.precision.ldexp.highp_compute.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.sampler2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.samplercube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.sampler2darray = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.sampler3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.sampler2dshadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.samplercubeshadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.sampler2darrayshadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.isampler2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.isamplercube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.isampler2darray = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.isampler3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.usampler2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.usamplercube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.usampler2darray = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.usampler3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_expression.compute.sampler2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_expression.compute.samplercube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_expression.compute.sampler2darray = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_expression.compute.sampler3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_expression.compute.sampler2dshadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_expression.compute.samplercubeshadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_expression.compute.sampler2darrayshadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_expression.compute.isampler2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_expression.compute.isamplercube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_expression.compute.isampler2darray = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_expression.compute.isampler3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_expression.compute.usampler2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_expression.compute.usamplercube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_expression.compute.usampler2darray = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_expression.compute.usampler3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.const_literal_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.const_literal_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.const_literal_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.const_expression_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.const_expression_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.const_expression_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.ssbo.const_literal_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.ssbo.const_literal_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.ssbo.const_literal_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.ssbo.const_expression_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.ssbo.const_expression_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.ssbo.const_expression_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.atomic_counter.const_literal_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.atomic_counter.const_literal_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.atomic_counter.const_literal_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.atomic_counter.const_expression_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.atomic_counter.const_expression_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.opaque_type_indexing.atomic_counter.const_expression_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.functions.overloading.arrays_of_arrays_size_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.functions.overloading.arrays_of_arrays_size_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.float_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.float_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.float_3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.float_3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.int_3x1_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.int_3x1_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.int_4x4x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.int_4x4x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.bool_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.bool_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.bool_2x1x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.bool_2x1x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.struct_3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.struct_3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.struct_4x1x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.struct_4x1x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.vec3_4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.vec3_4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.ivec3_3x2x1_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.ivec3_3x2x1_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.bvec3_1x2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.bvec3_1x2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.mat3_3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.mat3_3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.mat3_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.mat3_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.mat3_3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.mat3_3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.high_dimensional_array_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.explicit.high_dimensional_array_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.float_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.float_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.float_3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.float_3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.int_3x1_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.int_3x1_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.int_4x4x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.int_4x4x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.bool_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.bool_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.bool_2x1x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.bool_2x1x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.struct_3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.struct_3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.struct_4x1x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.struct_4x1x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.vec3_4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.vec3_4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.ivec3_3x2x1_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.ivec3_3x2x1_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.bvec3_1x2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.bvec3_1x2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.mat3_3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.mat3_3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.mat3_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.mat3_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.mat3_3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.mat3_3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.int_high_dimensional_array_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.constructor.implicit.int_high_dimensional_array_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.float_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.float_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.int_2x2x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.int_2x2x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.bool_3x2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.bool_3x2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.vec3_2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.vec3_2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.struct_3x1x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.struct_3x1x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.ivec3_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.ivec3_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.bvec4_4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.bvec4_4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.mat3_3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.mat3_3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.mat3_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.mat3_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.mat3_3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.explicit.mat3_3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.float_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.float_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.int_2x2x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.int_2x2x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.bool_3x2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.bool_3x2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.vec3_2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.vec3_2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.struct_3x1x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.struct_3x1x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.ivec3_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.ivec3_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.bvec4_4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.bvec4_4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.mat3_3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.mat3_3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.mat3_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.mat3_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.mat3_3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.return.implicit.mat3_3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.float_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.float_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.int_2x2x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.int_2x2x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.bool_3x2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.bool_3x2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.vec3_2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.vec3_2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.struct_3x1x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.struct_3x1x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.ivec3_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.ivec3_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.bvec4_4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.bvec4_4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.mat3_3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.mat3_3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.mat3_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.mat3_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.mat3_3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.in.mat3_3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.float_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.float_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.int_2x2x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.int_2x2x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.bool_3x2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.bool_3x2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.vec3_2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.vec3_2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.struct_3x1x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.struct_3x1x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.ivec3_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.ivec3_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.bvec4_4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.bvec4_4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.mat3_3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.mat3_3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.mat3_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.mat3_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.mat3_3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.out.mat3_3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.float_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.float_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.int_2x2x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.int_2x2x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.bool_3x2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.bool_3x2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.vec3_2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.vec3_2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.struct_3x1x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.struct_3x1x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.ivec3_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.ivec3_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.bvec4_4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.bvec4_4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.mat3_3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.mat3_3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.mat3_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.mat3_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.mat3_3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.parameter.unnamed.mat3_3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.float_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.float_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.int_2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.int_2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.bool_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.bool_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.struct_5x5x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.struct_5x5x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.vec3_1x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.vec3_1x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.ivec3_3x1x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.ivec3_3x1x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.bvec3_3x1_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.bvec3_3x1_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.mat3_3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.mat3_3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.mat3_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.mat3_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.mat3_3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.implicit_size.mat3_3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.float_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.float_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.int_2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.int_2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.bool_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.bool_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.struct_5x5x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.struct_5x5x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.vec3_1x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.vec3_1x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.ivec3_3x1x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.ivec3_3x1x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.bvec3_3x1_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.bvec3_3x1_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.mat3_3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.mat3_3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.mat3_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.mat3_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.mat3_3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_explicit.mat3_3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.float_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.float_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.int_2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.int_2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.bool_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.bool_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.struct_5x5x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.struct_5x5x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.vec3_1x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.vec3_1x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.ivec3_3x1x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.ivec3_3x1x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.bvec3_3x1_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.bvec3_3x1_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.mat3_3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.mat3_3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.mat3_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.mat3_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.mat3_3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.explicit_to_implicit.mat3_3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.float_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.float_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.int_2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.int_2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.bool_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.bool_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.struct_5x5x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.struct_5x5x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.vec3_1x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.vec3_1x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.ivec3_3x1x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.ivec3_3x1x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.bvec3_3x1_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.bvec3_3x1_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.mat3_3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.mat3_3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.mat3_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.mat3_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.mat3_3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_explicit.mat3_3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.float_3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.float_3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.int_2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.int_2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.bool_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.bool_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.struct_5x5x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.struct_5x5x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.vec3_1x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.vec3_1x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.ivec3_3x1x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.ivec3_3x1x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.bvec3_3x1_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.bvec3_3x1_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.mat3_3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.mat3_3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.mat3_3x3x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.mat3_3x3x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.mat3_3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.assignment.implicit_to_implicit.mat3_3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.length.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.length.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.length.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.length.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.length.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.length.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.length.struct_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.length.struct_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.length.mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.length.mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.length.constant_expression_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.length.constant_expression_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.array_access.constant_expression_access_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.array_access.constant_expression_access_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.array_access.dynamic_expression_access_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.array_access.dynamic_expression_access_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.single_statement_multiple_declarations.explicit_constructor.float_2_dimensions_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.single_statement_multiple_declarations.explicit_constructor.float_2_dimensions_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.single_statement_multiple_declarations.explicit_constructor.int_3_dimensions_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.single_statement_multiple_declarations.explicit_constructor.int_3_dimensions_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.single_statement_multiple_declarations.implicit_constructor.float_2_dimensions_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.single_statement_multiple_declarations.implicit_constructor.float_2_dimensions_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.single_statement_multiple_declarations.implicit_constructor.int_3_dimensions_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.arrays_of_arrays.single_statement_multiple_declarations.implicit_constructor.int_3_dimensions_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.linkage.shader_storage_block.mismatch_number_of_declarations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.linkage.shader_storage_block.mismatch_order = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.linkage.shader_storage_block.mismatch_type = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.linkage.shader_storage_block.mismatch_member_name = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.linkage.shader_storage_block.mismatch_member_unsized_sized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.linkage.shader_storage_block.mismatch_member_array_size = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.linkage.shader_storage_block.mismatch_with_and_without_instance_name = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.linkage.shader_storage_block.mismatch_block_array_size = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_vertex_attribs = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_vertex_uniform_vectors = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_vertex_output_vectors = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_fragment_input_vectors = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_fragment_uniform_vectors = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_draw_buffers = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_vertex_texture_image_units = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_combined_texture_image_units = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_texture_image_units = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.min_program_texel_offset = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_program_texel_offset = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_image_units = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_vertex_image_uniforms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_fragment_image_uniforms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_compute_image_uniforms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_combined_image_uniforms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_combined_shader_output_resources = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_compute_uniform_components = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_compute_texture_image_units = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_compute_atomic_counters = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_compute_atomic_counter_buffers = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_vertex_atomic_counters = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_fragment_atomic_counters = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_combined_atomic_counters = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_atomic_counter_bindings = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_vertex_atomic_counter_buffers = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_fragment_atomic_counter_buffers = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_combined_atomic_counter_buffers = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_atomic_counter_buffer_size = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_compute_work_group_count = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.builtin_constants.core.max_compute_work_group_size = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.triangles = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.lines = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.wide_lines = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.points = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.wide_points = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.triangles_4_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.lines_4_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.wide_lines_4_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.points_4_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.wide_points_4_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.triangles_8_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.lines_8_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.wide_lines_8_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.points_8_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.wide_points_8_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.triangles_max_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.lines_max_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.wide_lines_max_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.points_max_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.value.wide_points_max_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.triangles_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.triangles_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.triangles_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.lines_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.lines_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.lines_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_lines_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_lines_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_lines_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.points_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.points_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.points_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_points_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_points_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_points_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.triangles_4_samples_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.triangles_4_samples_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.triangles_4_samples_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.lines_4_samples_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.lines_4_samples_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.lines_4_samples_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_lines_4_samples_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_lines_4_samples_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_lines_4_samples_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.points_4_samples_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.points_4_samples_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.points_4_samples_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_points_4_samples_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_points_4_samples_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_points_4_samples_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.triangles_8_samples_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.triangles_8_samples_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.triangles_8_samples_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.lines_8_samples_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.lines_8_samples_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.lines_8_samples_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_lines_8_samples_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_lines_8_samples_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_lines_8_samples_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.points_8_samples_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.points_8_samples_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.points_8_samples_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_points_8_samples_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_points_8_samples_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_points_8_samples_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.triangles_max_samples_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.triangles_max_samples_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.triangles_max_samples_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.lines_max_samples_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.lines_max_samples_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.lines_max_samples_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_lines_max_samples_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_lines_max_samples_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_lines_max_samples_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.points_max_samples_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.points_max_samples_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.points_max_samples_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_points_max_samples_dfdx = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_points_max_samples_dfdy = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_points_max_samples_fwidth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.empty = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.ubo_to_ssbo_single_invocation = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.ubo_to_ssbo_single_group = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.ubo_to_ssbo_multiple_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.ubo_to_ssbo_multiple_groups = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.copy_ssbo_single_invocation = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_groups = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.ssbo_rw_single_invocation = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.ssbo_rw_multiple_groups = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.ssbo_unsized_arr_single_invocation = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.ssbo_unsized_arr_multiple_groups = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.write_multiple_arr_single_invocation = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.write_multiple_arr_multiple_groups = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.write_multiple_unsized_arr_single_invocation = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.write_multiple_unsized_arr_multiple_groups = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.ssbo_local_barrier_single_invocation = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.ssbo_local_barrier_single_group = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.ssbo_local_barrier_multiple_groups = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.ssbo_cmd_barrier_single = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.ssbo_cmd_barrier_multiple = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.shared_var_single_invocation = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.shared_var_single_group = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.shared_var_multiple_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.shared_var_multiple_groups = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.shared_atomic_op_single_invocation = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.shared_atomic_op_single_group = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.shared_atomic_op_multiple_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.shared_atomic_op_multiple_groups = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.copy_image_to_ssbo_small = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.copy_image_to_ssbo_large = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.copy_ssbo_to_image_small = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.copy_ssbo_to_image_large = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.image_barrier_single = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.image_barrier_multiple = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.atomic_counter_single_invocation = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.atomic_counter_single_group = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.atomic_counter_multiple_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.basic.atomic_counter_multiple_groups = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.float_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.float_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.float_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.vec2_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.vec2_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.vec2_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.vec3_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.vec3_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.vec3_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.vec4_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.vec4_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.vec4_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat2_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat2_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat2_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat2x3_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat2x3_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat2x3_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat2x4_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat2x4_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat2x4_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat3x2_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat3x2_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat3x2_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat3_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat3_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat3_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat3x4_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat3x4_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat3x4_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat4x2_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat4x2_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat4x2_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat4x3_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat4x3_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat4x3_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat4_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat4_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.mat4_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.int_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.int_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.int_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.ivec2_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.ivec2_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.ivec2_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.ivec3_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.ivec3_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.ivec3_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.ivec4_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.ivec4_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.ivec4_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.uint_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.uint_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.uint_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.uvec2_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.uvec2_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.uvec2_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.uvec3_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.uvec3_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.uvec3_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.uvec4_lowp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.uvec4_mediump = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.uvec4_highp = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.basic_type.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.float_1_1_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.float_64_1_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.float_1_64_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.float_1_1_64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.float_128_1_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.float_1_128_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.float_13_2_4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.vec4_1_1_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.vec4_64_1_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.vec4_1_64_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.vec4_1_1_64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.vec4_128_1_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.vec4_1_128_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.vec4_13_2_4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.mat4_1_1_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.mat4_64_1_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.mat4_1_64_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.mat4_1_1_64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.mat4_128_1_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.mat4_1_128_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.work_group_size.mat4_13_2_4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.add.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.add.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.add.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.add.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.add.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.add.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.min.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.min.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.min.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.min.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.min.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.min.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.max.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.max.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.max.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.max.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.max.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.max.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.and.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.and.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.and.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.and.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.and.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.and.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.or.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.or.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.or.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.or.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.or.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.or.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.xor.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.xor.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.xor.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.xor.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.xor.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.xor.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.exchange.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.exchange.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.exchange.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.exchange.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.exchange.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.exchange.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.compswap.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.compswap.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.compswap.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.compswap.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.compswap.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.shared_var.atomic.compswap.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.upload_buffer.single_invocation = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.upload_buffer.multiple_groups = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.upload_buffer.multiple_groups_multiple_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.upload_buffer.small_offset = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.upload_buffer.large_offset = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.upload_buffer.large_offset_multiple_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.upload_buffer.empty_command = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.upload_buffer.multi_dispatch = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.upload_buffer.multi_dispatch_reuse_command = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.gen_in_compute.single_invocation = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.gen_in_compute.multiple_groups = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.gen_in_compute.multiple_groups_multiple_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.gen_in_compute.small_offset = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.gen_in_compute.large_offset = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.gen_in_compute.large_offset_multiple_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.gen_in_compute.empty_command = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.gen_in_compute.multi_dispatch = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.compute.indirect_dispatch.gen_in_compute.multi_dispatch_reuse_command = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.first.first_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.first.first_3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.first.first_17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.points.single_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.points.multiple_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.points.instanced_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.points.default_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.triangles.single_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.triangles.multiple_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.triangles.instanced_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.triangles.default_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.triangle_fan.single_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.triangle_fan.multiple_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.triangle_fan.instanced_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.triangle_fan.default_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.triangle_strip.single_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.triangle_strip.multiple_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.triangle_strip.instanced_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.triangle_strip.default_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.lines.single_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.lines.multiple_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.lines.instanced_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.lines.default_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.line_strip.single_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.line_strip.multiple_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.line_strip.instanced_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.line_strip.default_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.line_loop.single_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.line_loop.multiple_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.line_loop.instanced_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.line_loop.default_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.indices.index_byte = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.indices.index_short = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.indices.index_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.base_vertex.index_byte = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.base_vertex.index_short = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.base_vertex.index_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.base_vertex.index_neg_byte = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.base_vertex.index_neg_short = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.base_vertex.index_neg_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.points.single_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.points.multiple_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.points.instanced_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.points.default_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.triangles.single_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.triangles.multiple_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.triangles.instanced_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.triangles.default_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.triangle_fan.single_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.triangle_fan.multiple_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.triangle_fan.instanced_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.triangle_fan.default_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.triangle_strip.single_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.triangle_strip.multiple_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.triangle_strip.instanced_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.triangle_strip.default_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.lines.single_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.lines.multiple_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.lines.instanced_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.lines.default_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.line_strip.single_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.line_strip.multiple_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.line_strip.instanced_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.line_strip.default_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.line_loop.single_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.line_loop.multiple_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.line_loop.instanced_attributes = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.line_loop.default_attribute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.instancing.draw_arrays_indirect_grid_2x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.instancing.draw_arrays_indirect_grid_5x5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.instancing.draw_arrays_indirect_grid_10x10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.instancing.draw_arrays_indirect_grid_32x32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.instancing.draw_arrays_indirect_grid_100x100 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.instancing.draw_elements_indirect_grid_2x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.instancing.draw_elements_indirect_grid_5x5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.instancing.draw_elements_indirect_grid_10x10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.instancing.draw_elements_indirect_grid_32x32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.instancing.draw_elements_indirect_grid_100x100 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawarrays_compute_cmd = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawarrays_compute_data = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawarrays_compute_cmd_and_data = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawelements_compute_cmd = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawelements_compute_data = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawelements_compute_indices = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawelements_compute_cmd_and_data = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawelements_compute_cmd_and_indices = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawelements_compute_data_and_indices = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawelements_compute_cmd_and_data_and_indices = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.combined.drawarrays_compute_cmd_and_data = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.combined.drawelements_compute_cmd_and_data = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.combined.drawelements_compute_cmd_and_indices = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.combined.drawelements_compute_data_and_indices = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.combined.drawelements_compute_cmd_and_data_and_indices = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_100x100_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_200x200_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_500x500_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_1000x1000_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_1200x1200_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_1500x1500_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_100x100_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_200x200_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_500x500_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_1000x1000_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_1200x1200_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_1500x1500_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_100x100_drawcount_200 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_200x200_drawcount_800 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_500x500_drawcount_2500 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_1000x1000_drawcount_5000 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_100x100_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_200x200_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_500x500_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_1000x1000_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_1200x1200_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_1500x1500_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_100x100_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_200x200_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_500x500_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_1000x1000_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_1200x1200_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_1500x1500_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_100x100_drawcount_200 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_200x200_drawcount_800 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_500x500_drawcount_2500 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_1000x1000_drawcount_5000 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_separate_grid_100x100_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_separate_grid_200x200_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_separate_grid_500x500_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_separate_grid_100x100_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_separate_grid_200x200_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_separate_grid_500x500_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_separate_grid_100x100_drawcount_200 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_separate_grid_200x200_drawcount_800 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_separate_grid_500x500_drawcount_2500 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_combined_grid_100x100_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_combined_grid_200x200_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_combined_grid_500x500_drawcount_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_combined_grid_100x100_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_combined_grid_200x200_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_combined_grid_500x500_drawcount_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_combined_grid_100x100_drawcount_200 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_combined_grid_200x200_drawcount_800 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_combined_grid_500x500_drawcount_2500 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.25 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.27 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.28 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.29 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.30 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.31 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.35 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.36 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.37 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.38 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.39 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.40 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.42 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.43 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.44 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.45 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.46 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.47 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.48 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.49 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.50 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.51 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.52 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.53 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.54 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.55 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.56 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.57 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.random.61 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.negative.command_bad_alignment_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.negative.command_bad_alignment_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.negative.command_bad_alignment_3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.negative.command_offset_partially_in_buffer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.negative.command_offset_not_in_buffer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.negative.command_offset_not_in_buffer_unsigned32_wrap = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.negative.command_offset_not_in_buffer_signed32_wrap = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.negative.client_vertex_attrib_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.negative.default_vao = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.negative.invalid_mode_draw_arrays = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.negative.invalid_mode_draw_elements = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.draw_indirect.negative.invalid_type_draw_elements = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_lowp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_mediump_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_highp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_lowp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_mediump_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_highp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_lowp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_mediump_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_highp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_lowp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_mediump_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_highp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_lowp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_mediump_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_highp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_lowp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_mediump_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_highp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_lowp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_mediump_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_highp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_lowp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_mediump_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_highp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_lowp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_mediump_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_highp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_lowp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_mediump_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_highp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_lowp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_mediump_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_highp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_lowp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_mediump_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_highp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_lowp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_mediump_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_highp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_lowp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_mediump_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_highp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_lowp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_mediump_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_highp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_lowp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_mediump_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_highp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.lowp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.mediump_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.highp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_lowp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_mediump_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.row_major_highp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_lowp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_mediump_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.shared.column_major_highp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_lowp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_mediump_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_highp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_lowp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_mediump_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_highp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_lowp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_mediump_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_highp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_lowp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_mediump_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_highp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_lowp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_mediump_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_highp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_lowp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_mediump_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_highp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_lowp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_mediump_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_highp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_lowp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_mediump_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_highp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_lowp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_mediump_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_highp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_lowp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_mediump_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_highp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_lowp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_mediump_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_highp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_lowp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_mediump_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_highp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_lowp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_mediump_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_highp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_lowp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_mediump_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_highp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_lowp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_mediump_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_highp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_lowp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_mediump_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_highp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.lowp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.highp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_lowp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_mediump_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.row_major_highp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_lowp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_mediump_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.column_major_highp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_lowp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_mediump_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_highp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_lowp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_mediump_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_highp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_lowp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_mediump_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_highp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_lowp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_mediump_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_highp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_lowp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_mediump_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_highp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_lowp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_mediump_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_highp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_lowp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_mediump_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_highp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_lowp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_mediump_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_highp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_lowp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_mediump_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_highp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_lowp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_mediump_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_highp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_lowp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_mediump_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_highp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_lowp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_mediump_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_highp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_lowp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_mediump_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_highp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_lowp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_mediump_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_highp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_lowp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_mediump_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_highp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_lowp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_mediump_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_highp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.lowp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.mediump_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.highp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_lowp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_mediump_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.row_major_highp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_lowp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_mediump_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std140.column_major_highp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_lowp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_mediump_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_highp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_lowp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_mediump_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_highp_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_lowp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_mediump_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_highp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_lowp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_mediump_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_highp_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_lowp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_mediump_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_highp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_lowp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_mediump_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_highp_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_lowp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_mediump_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_highp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_lowp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_mediump_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_highp_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_lowp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_mediump_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_highp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_lowp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_mediump_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_highp_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_lowp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_mediump_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_highp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_lowp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_mediump_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_highp_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_lowp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_mediump_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_highp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_lowp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_mediump_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_highp_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_lowp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_mediump_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_highp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_lowp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_mediump_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_highp_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.lowp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.mediump_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.highp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_lowp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_mediump_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.row_major_highp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_lowp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_mediump_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_type.std430.column_major_highp_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.shared.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.packed.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std140.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_basic_array.std430.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.shared.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.packed.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std140.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.basic_unsized_array.std430.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.shared.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.packed.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std140.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_array.std430.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.shared.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.packed.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std140.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_array.std430.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.shared.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.packed.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std140.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.3_level_unsized_array.std430.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct.per_block_buffer.shared = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct.per_block_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct.per_block_buffer.packed = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct.per_block_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct.per_block_buffer.std140 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct.per_block_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct.per_block_buffer.std430 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct.per_block_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct.single_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct.single_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct.single_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct.single_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct_array.per_block_buffer.shared = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct_array.per_block_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct_array.per_block_buffer.packed = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct_array.per_block_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct_array.per_block_buffer.std140 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct_array.per_block_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct_array.per_block_buffer.std430 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct_array.per_block_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct_array.single_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct_array.single_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct_array.single_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_struct_array.single_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.per_block_buffer.shared = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.per_block_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.per_block_buffer.packed = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.per_block_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.per_block_buffer.std140 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.per_block_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.per_block_buffer.std430 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.per_block_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.single_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.single_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.single_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.single_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.per_block_buffer.shared = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.per_block_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.per_block_buffer.packed = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.per_block_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.per_block_buffer.std140 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.per_block_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.per_block_buffer.std430 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.per_block_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.single_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.single_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.single_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.single_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_struct_array.per_block_buffer.shared = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_struct_array.per_block_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_struct_array.per_block_buffer.packed = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_struct_array.per_block_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_struct_array.per_block_buffer.std140 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_struct_array.per_block_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_struct_array.per_block_buffer.std430 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_struct_array.per_block_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_struct_array.single_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_struct_array.single_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_struct_array.single_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_struct_array.single_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_unsized_struct_array.per_block_buffer.shared = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_unsized_struct_array.per_block_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_unsized_struct_array.per_block_buffer.packed = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_unsized_struct_array.per_block_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_unsized_struct_array.per_block_buffer.std140 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_unsized_struct_array.per_block_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_unsized_struct_array.per_block_buffer.std430 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_unsized_struct_array.per_block_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_unsized_struct_array.single_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_unsized_struct_array.single_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_unsized_struct_array.single_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.2_level_unsized_struct_array.single_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_nested_struct_array.per_block_buffer.shared = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_nested_struct_array.per_block_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_nested_struct_array.per_block_buffer.packed = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_nested_struct_array.per_block_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_nested_struct_array.per_block_buffer.std140 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_nested_struct_array.per_block_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_nested_struct_array.per_block_buffer.std430 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_nested_struct_array.per_block_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_nested_struct_array.single_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_nested_struct_array.single_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_nested_struct_array.single_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.unsized_nested_struct_array.single_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.shared.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std140.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.row_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.column_major_mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.row_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.column_major_mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.row_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.column_major_mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.row_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.column_major_mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.row_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.column_major_mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.row_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.column_major_mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.row_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.column_major_mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.row_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.column_major_mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.row_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.std430.column_major_mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.per_block_buffer.shared = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.per_block_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.per_block_buffer.packed = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.per_block_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.per_block_buffer.std140 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.per_block_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.per_block_buffer.std430 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.per_block_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.single_buffer.shared = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.single_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.single_buffer.packed = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.single_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.single_buffer.std140 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.single_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.single_buffer.std430 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.single_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.per_block_buffer.shared = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.per_block_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.per_block_buffer.packed = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.per_block_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.per_block_buffer.std140 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.per_block_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.per_block_buffer.std430 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.per_block_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.single_buffer.shared = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.single_buffer.shared_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.single_buffer.packed = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.single_buffer.packed_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.single_buffer.std140 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.single_buffer.std140_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.single_buffer.std430 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.single_buffer.std430_instance_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.scalar_types.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.vector_types.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_types.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_arrays.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.unsized_arrays.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_instance_arrays.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.25 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.26 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.27 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.28 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.29 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.30 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.31 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.33 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.34 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.35 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.36 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.37 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.38 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.39 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.40 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.41 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.42 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.43 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.44 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.45 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.46 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.47 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.48 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.49 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.25 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.26 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.27 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.28 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.29 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.30 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.31 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.33 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.34 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.35 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.36 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.37 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.38 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.39 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.40 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.41 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.42 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.43 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.44 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.45 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.46 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.47 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.48 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.49 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.add.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.add.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.add.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.add.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.add.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.add.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.min.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.min.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.min.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.min.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.min.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.min.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.max.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.max.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.max.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.max.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.max.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.max.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.and.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.and.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.and.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.and.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.and.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.and.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.or.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.or.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.or.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.or.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.or.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.or.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.xor.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.xor.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.xor.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.xor.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.xor.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.xor.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.exchange.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.exchange.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.exchange.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.exchange.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.exchange.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.exchange.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.compswap.lowp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.compswap.lowp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.compswap.mediump_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.compswap.mediump_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.compswap.highp_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.atomic.compswap.highp_int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.array_length.sized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.array_length.sized_writeonly_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.array_length.sized_readonly_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.array_length.unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.array_length.unsized_writeonly_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ssbo.array_length.unsized_readonly_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.vec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.vec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.vec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.vec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.vec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.vec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.ivec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.ivec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.ivec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.ivec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.ivec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.ivec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.uvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.uvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.uvec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.uvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.uvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.uvec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.bool_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.bvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.bvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.bvec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.bvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.bvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.bvec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat2x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat2x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat2x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat2x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat2x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat2x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat3x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat3x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat3x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat3x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat3x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat3x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat4x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat4x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat4x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.mat4x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.row_major_mat4x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.shared.column_major_mat4x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.vec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.vec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.vec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.vec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.ivec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.ivec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.ivec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.ivec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.uvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.uvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.uvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.uvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.bvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.bvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.bvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.bvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.row_major_mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.packed.column_major_mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.vec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.vec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.vec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.vec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.vec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.vec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.ivec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.ivec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.ivec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.ivec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.ivec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.ivec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.uvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.uvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.uvec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.uvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.uvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.uvec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.bool_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.bvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.bvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.bvec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.bvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.bvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.bvec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat2x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat2x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat2x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat2x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat2x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat2x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat3x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat3x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat3x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat3x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat3x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat3x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat4x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat4x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat4x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.mat4x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.row_major_mat4x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_array.std140.column_major_mat4x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.vec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.vec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.vec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.vec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.vec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.vec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.ivec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.ivec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.ivec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.ivec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.ivec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.ivec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.uvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.uvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.uvec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.uvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.uvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.uvec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.bool_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.bvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.bvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.bvec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.bvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.bvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.bvec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat2x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat2x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat2x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat2x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat2x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat2x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat3x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat3x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat3x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat3x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat3x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat3x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat4x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat4x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat4x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.mat4x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.row_major_mat4x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.shared.column_major_mat4x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.vec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.vec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.vec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.vec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.ivec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.ivec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.ivec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.ivec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.uvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.uvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.uvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.uvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.bvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.bvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.bvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.bvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.row_major_mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.packed.column_major_mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.vec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.vec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.vec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.vec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.vec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.vec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.ivec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.ivec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.ivec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.ivec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.ivec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.ivec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.uvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.uvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.uvec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.uvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.uvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.uvec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.bool_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.bvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.bvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.bvec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.bvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.bvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.bvec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat2x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat2x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat2x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat2x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat2x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat2x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat3x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat3x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat3x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat3x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat3x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat3x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat4x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat4x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat4x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.mat4x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.row_major_mat4x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.3_level_array.std140.column_major_mat4x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.shared_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.shared_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.shared_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.shared_instance_array_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.shared_instance_array_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.shared_instance_array_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.packed_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.packed_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.packed_instance_array_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.packed_instance_array_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.std140_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.std140_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.std140_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.std140_instance_array_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.std140_instance_array_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.per_block_buffer.std140_instance_array_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.single_buffer.shared_instance_array_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.single_buffer.shared_instance_array_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.single_buffer.shared_instance_array_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.single_buffer.packed_instance_array_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.single_buffer.packed_instance_array_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.single_buffer.std140_instance_array_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.single_buffer.std140_instance_array_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.2_level_struct_array.single_buffer.std140_instance_array_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.random.basic_type_arrays.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.random.basic_type_arrays.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.29 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.41 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.random.all_shared_buffer.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.random.all_shared_buffer.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.random.all_shared_buffer.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.random.all_shared_buffer.37 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.ubo.random.all_shared_buffer.38 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.store.rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.store.rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.store.r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.store.rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.store.rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.store.rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.store.r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.store.rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.store.rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.store.rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.store.r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.store.rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.store.rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.load_store.rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.load_store.rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.load_store.r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.load_store.rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.load_store.rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.load_store.rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.load_store.r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.load_store.rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.load_store.rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.load_store.rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.load_store.r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.load_store.rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.load_store.rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.qualifiers.coherent_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.qualifiers.volatile_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.qualifiers.coherent_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.qualifiers.volatile_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.qualifiers.coherent_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.qualifiers.volatile_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.qualifiers.restrict = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba32f_rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba32f_rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba16f_rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba16f_rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32f_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32f_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32f_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32f_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32f_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32f_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba32ui_rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba32ui_rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba16ui_rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba16ui_rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8ui_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8ui_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8ui_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8ui_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8ui_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8ui_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32ui_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32ui_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32ui_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32ui_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32ui_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32ui_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba32i_rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba32i_rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba16i_rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba16i_rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8i_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8i_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8i_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8i_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8i_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8i_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32i_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32i_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32i_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32i_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32i_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.r32i_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8_snorm_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8_snorm_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8_snorm_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8_snorm_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8_snorm_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8_snorm_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.image_size.readonly_32x32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.image_size.readonly_12x34 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.image_size.readonly_1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.image_size.readonly_7x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.image_size.writeonly_32x32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.image_size.writeonly_12x34 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.image_size.writeonly_1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.image_size.writeonly_7x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.image_size.readonly_writeonly_32x32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.image_size.readonly_writeonly_12x34 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.image_size.readonly_writeonly_1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d.image_size.readonly_writeonly_7x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba32f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba16f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.r32f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba32ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba16ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba8ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.r32ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba32i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba16i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba8i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.r32i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba8_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.store.rgba8_snorm_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba32f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba16f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.r32f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba32ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba16ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba8ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.r32ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba32i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba16i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba8i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.r32i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba8_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.load_store.rgba8_snorm_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.qualifiers.coherent_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.qualifiers.volatile_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.qualifiers.coherent_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.qualifiers.volatile_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.qualifiers.coherent_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.qualifiers.volatile_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.qualifiers.restrict = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba32f_rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba32f_rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba16f_rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba16f_rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32f_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32f_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32f_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32f_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32f_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32f_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba32ui_rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba32ui_rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba16ui_rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba16ui_rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8ui_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8ui_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8ui_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8ui_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8ui_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8ui_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32ui_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32ui_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32ui_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32ui_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32ui_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32ui_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba32i_rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba32i_rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba16i_rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba16i_rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8i_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8i_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8i_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8i_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8i_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8i_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32i_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32i_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32i_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32i_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32i_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.r32i_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_snorm_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_snorm_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_snorm_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_snorm_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_snorm_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_snorm_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.image_size.readonly_32x32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.image_size.readonly_12x12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.image_size.readonly_1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.image_size.readonly_7x7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.image_size.writeonly_32x32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.image_size.writeonly_12x12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.image_size.writeonly_1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.image_size.writeonly_7x7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.image_size.readonly_writeonly_32x32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.image_size.readonly_writeonly_12x12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.image_size.readonly_writeonly_1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.cube.image_size.readonly_writeonly_7x7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba32f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba16f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.r32f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba32ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba16ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba8ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.r32ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba32i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba16i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba8i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.r32i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba8_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.store.rgba8_snorm_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba32f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba16f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.r32f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba32ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba16ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba8ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.r32ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba32i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba16i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba8i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.r32i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba8_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.load_store.rgba8_snorm_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.qualifiers.coherent_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.qualifiers.volatile_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.qualifiers.coherent_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.qualifiers.volatile_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.qualifiers.coherent_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.qualifiers.volatile_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.qualifiers.restrict = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba32f_rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba32f_rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba16f_rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba16f_rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32f_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32f_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32f_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32f_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32f_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32f_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba32ui_rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba32ui_rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba16ui_rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba16ui_rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8ui_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8ui_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8ui_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8ui_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8ui_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8ui_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32ui_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32ui_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32ui_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32ui_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32ui_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32ui_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba32i_rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba32i_rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba16i_rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba16i_rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8i_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8i_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8i_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8i_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8i_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8i_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32i_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32i_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32i_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32i_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32i_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.r32i_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_snorm_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_snorm_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_snorm_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_snorm_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_snorm_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_snorm_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.image_size.readonly_32x32x32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.image_size.readonly_12x34x56 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.image_size.readonly_1x1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.image_size.readonly_7x1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.image_size.writeonly_32x32x32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.image_size.writeonly_12x34x56 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.image_size.writeonly_1x1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.image_size.writeonly_7x1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.image_size.readonly_writeonly_32x32x32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.image_size.readonly_writeonly_12x34x56 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.image_size.readonly_writeonly_1x1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.3d.image_size.readonly_writeonly_7x1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba32f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba16f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.r32f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba32ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba16ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba8ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.r32ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba32i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba16i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba8i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.r32i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba8_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.store.rgba8_snorm_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba32f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba16f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.r32f_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba32ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba16ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba8ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.r32ui_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba32i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba16i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba8i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.r32i_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba8_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.load_store.rgba8_snorm_single_layer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.qualifiers.coherent_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.qualifiers.volatile_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.qualifiers.coherent_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.qualifiers.volatile_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.qualifiers.coherent_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.qualifiers.volatile_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.qualifiers.restrict = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba32f_rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba32f_rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba16f_rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba16f_rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32f_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32f_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32f_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32f_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32f_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32f_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba32ui_rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba32ui_rgba32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba16ui_rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba16ui_rgba16i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8ui_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8ui_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8ui_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8ui_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8ui_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8ui_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32ui_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32ui_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32ui_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32ui_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32ui_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32ui_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba32i_rgba32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba32i_rgba32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba16i_rgba16f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba16i_rgba16ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8i_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8i_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8i_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8i_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8i_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8i_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32i_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32i_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32i_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32i_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32i_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32i_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_rgba8_snorm = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_snorm_r32f = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_snorm_rgba8ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_snorm_r32ui = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_snorm_rgba8i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_snorm_r32i = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_snorm_rgba8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.image_size.readonly_32x32x32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.image_size.readonly_12x34x56 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.image_size.readonly_1x1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.image_size.readonly_7x1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.image_size.writeonly_32x32x32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.image_size.writeonly_12x34x56 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.image_size.writeonly_1x1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.image_size.writeonly_7x1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.image_size.readonly_writeonly_32x32x32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.image_size.readonly_writeonly_12x34x56 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.image_size.readonly_writeonly_1x1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.image_load_store.2d_array.image_size.readonly_writeonly_7x1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.1_counter_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.1_counter_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.1_counter_1_call_5000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.1_counter_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.1_counter_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.1_counter_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.1_counter_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.4_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.4_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.4_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.4_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.4_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.4_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.8_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.8_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.8_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get.8_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.1_counter_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.1_counter_1_call_5000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.1_counter_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.1_counter_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.1_counter_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.1_counter_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.4_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.4_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.4_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.4_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.4_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.8_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.8_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.8_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_branch.8_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.1_counter_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.1_counter_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.1_counter_1_call_5000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.1_counter_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.1_counter_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.1_counter_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.1_counter_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.4_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.4_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.4_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.4_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.4_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.4_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.8_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.8_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.8_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc.8_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.1_counter_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.1_counter_1_call_5000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.1_counter_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.1_counter_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.1_counter_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.1_counter_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.4_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.4_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.4_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.4_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.4_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.8_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.8_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.8_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_branch.8_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.1_counter_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.1_counter_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.1_counter_1_call_5000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.1_counter_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.1_counter_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.1_counter_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.1_counter_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.4_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.4_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.4_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.4_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.4_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.4_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.8_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.8_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.8_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec.8_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.1_counter_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.1_counter_1_call_5000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.1_counter_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.1_counter_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.1_counter_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.1_counter_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.4_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.4_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.4_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.4_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.4_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.8_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.8_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.8_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.dec_branch.8_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.1_counter_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.1_counter_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.1_counter_1_call_5000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.1_counter_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.1_counter_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.1_counter_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.1_counter_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.4_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.4_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.4_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.4_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.4_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.4_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.8_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.8_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.8_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc.8_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.1_counter_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.1_counter_1_call_5000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.1_counter_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.1_counter_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.1_counter_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.1_counter_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.4_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.4_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.4_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.4_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.4_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.8_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.8_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.8_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_branch.8_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.1_counter_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.1_counter_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.1_counter_1_call_5000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.1_counter_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.1_counter_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.1_counter_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.1_counter_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.4_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.4_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.4_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.4_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.4_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.4_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.8_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.8_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.8_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec.8_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.1_counter_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.1_counter_1_call_5000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.1_counter_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.1_counter_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.1_counter_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.1_counter_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.4_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.4_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.4_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.4_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.4_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.8_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.8_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.8_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_dec_branch.8_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.1_counter_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.1_counter_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.1_counter_1_call_5000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.1_counter_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.1_counter_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.1_counter_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.1_counter_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.4_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.4_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.4_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.4_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.4_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.4_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.8_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.8_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.8_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec.8_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.1_counter_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.1_counter_1_call_5000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.1_counter_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.1_counter_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.1_counter_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.1_counter_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.4_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.4_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.4_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.4_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.4_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.8_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.8_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.8_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.inc_dec_branch.8_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.1_counter_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.1_counter_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.1_counter_1_call_5000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.1_counter_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.1_counter_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.1_counter_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.1_counter_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.4_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.4_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.4_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.4_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.4_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.4_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.8_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.8_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.8_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec.8_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.1_counter_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.1_counter_1_call_5000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.1_counter_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.1_counter_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.1_counter_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.1_counter_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.4_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.4_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.4_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.4_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.4_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.8_counters_1_call_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.8_counters_5_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.8_counters_100_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.get_inc_dec_branch.8_counters_100_calls_10_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reverse_offset.get_inc.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reverse_offset.get_inc.8_counters_1_call_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reverse_offset.get_inc.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reverse_offset.get_inc.8_counters_5_calls_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reverse_offset.get_dec.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reverse_offset.get_dec.8_counters_1_call_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reverse_offset.get_dec.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reverse_offset.get_dec.8_counters_5_calls_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reverse_offset.inc_dec.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reverse_offset.inc_dec.8_counters_1_call_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reverse_offset.inc_dec.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reverse_offset.inc_dec.8_counters_5_calls_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.first_offset_set.get_inc.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.first_offset_set.get_inc.8_counters_1_call_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.first_offset_set.get_inc.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.first_offset_set.get_inc.8_counters_5_calls_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.first_offset_set.get_dec.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.first_offset_set.get_dec.8_counters_1_call_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.first_offset_set.get_dec.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.first_offset_set.get_dec.8_counters_5_calls_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.first_offset_set.inc_dec.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.first_offset_set.inc_dec.8_counters_1_call_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.first_offset_set.inc_dec.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.first_offset_set.inc_dec.8_counters_5_calls_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.default_offset_set.get_inc.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.default_offset_set.get_inc.8_counters_1_call_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.default_offset_set.get_inc.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.default_offset_set.get_inc.8_counters_5_calls_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.default_offset_set.get_dec.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.default_offset_set.get_dec.8_counters_1_call_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.default_offset_set.get_dec.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.default_offset_set.get_dec.8_counters_5_calls_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.default_offset_set.inc_dec.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.default_offset_set.inc_dec.8_counters_1_call_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.default_offset_set.inc_dec.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.default_offset_set.inc_dec.8_counters_5_calls_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reset_default_offset.get_inc.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reset_default_offset.get_inc.8_counters_1_call_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reset_default_offset.get_inc.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reset_default_offset.get_inc.8_counters_5_calls_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reset_default_offset.get_dec.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reset_default_offset.get_dec.8_counters_1_call_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reset_default_offset.get_dec.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reset_default_offset.get_dec.8_counters_5_calls_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reset_default_offset.inc_dec.8_counters_1_call_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reset_default_offset.inc_dec.8_counters_1_call_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reset_default_offset.inc_dec.8_counters_5_calls_1_thread = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.atomic_counter.layout.reset_default_offset.inc_dec.8_counters_5_calls_1000_threads = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.stencil_texturing.format.depth32f_stencil8_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.stencil_texturing.format.depth32f_stencil8_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.stencil_texturing.format.depth32f_stencil8_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.stencil_texturing.format.depth24_stencil8_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.stencil_texturing.format.depth24_stencil8_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.stencil_texturing.format.depth24_stencil8_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.stencil_texturing.render.depth32f_stencil8_clear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.stencil_texturing.render.depth32f_stencil8_draw = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.stencil_texturing.render.depth24_stencil8_clear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.stencil_texturing.render.depth24_stencil8_draw = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.stencil_texturing.misc.compare_mode_effect = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.stencil_texturing.misc.base_level = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_1.sample_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_only = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_and_sample_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_non_effective_bits = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_2.sample_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_only = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_and_sample_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_non_effective_bits = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_3.sample_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_only = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_and_sample_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_non_effective_bits = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_4.sample_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_only = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_and_sample_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_non_effective_bits = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_8.sample_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_8.sample_mask_only = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_8.sample_mask_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_8.sample_mask_and_sample_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_8.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_8.sample_mask_non_effective_bits = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_10.sample_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_10.sample_mask_only = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_10.sample_mask_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_10.sample_mask_and_sample_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_10.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_10.sample_mask_non_effective_bits = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_12.sample_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_12.sample_mask_only = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_12.sample_mask_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_12.sample_mask_and_sample_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_12.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_12.sample_mask_non_effective_bits = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_13.sample_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_13.sample_mask_only = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_13.sample_mask_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_13.sample_mask_and_sample_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_13.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_13.sample_mask_non_effective_bits = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_16.sample_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_16.sample_mask_only = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_16.sample_mask_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_16.sample_mask_and_sample_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_16.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.samples_16.sample_mask_non_effective_bits = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.fbo_attach_different_sample_count_tex_tex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.fbo_attach_different_sample_count_tex_rbo = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.fbo_attach_different_fixed_state_tex_tex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.fbo_attach_different_fixed_state_tex_rbo = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.fbo_attach_non_zero_level = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.texture_min_filter = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.texture_mag_filter = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.texture_wrap_s = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.texture_wrap_t = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.texture_wrap_r = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.texture_min_lod = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.texture_max_lod = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.texture_compare_mode = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.texture_compare_func = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.texture_base_level = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.texture_high_sample_count = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.multisample.negative.texture_zero_sample_count = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.texture_swizzle.red_green_blue_alpha = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.texture_swizzle.green_blue_alpha_zero = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.texture_swizzle.blue_alpha_zero_one = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.texture_swizzle.alpha_zero_one_red = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.texture_swizzle.zero_one_red_green = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.texture_swizzle.one_red_green_blue = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.filter_mode.min_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.filter_mode.min_nearest_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.filter_mode.min_nearest_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.filter_mode.min_linear_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.filter_mode.min_linear_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.incomplete.mipmap_incomplete = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8ui.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8ui.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8ui.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8ui.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8ui.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8ui.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8ui.texture_swizzle.red_green_blue_alpha = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8ui.texture_swizzle.green_blue_alpha_zero = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8ui.texture_swizzle.blue_alpha_zero_one = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8ui.texture_swizzle.alpha_zero_one_red = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8ui.texture_swizzle.zero_one_red_green = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8ui.texture_swizzle.one_red_green_blue = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8ui.filter_mode.min_nearest_mipmap_nearest_mag_nearest = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8ui.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8ui.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8i.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8i.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8i.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8i.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8i.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8i.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8i.texture_swizzle.red_green_blue_alpha = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8i.texture_swizzle.green_blue_alpha_zero = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8i.texture_swizzle.blue_alpha_zero_one = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8i.texture_swizzle.alpha_zero_one_red = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8i.texture_swizzle.zero_one_red_green = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8i.texture_swizzle.one_red_green_blue = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8i.filter_mode.min_nearest_mipmap_nearest_mag_nearest = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8i.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.rgba8i.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.size_pot.compare_less.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.size_pot.compare_greater.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.size_npot.compare_less.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.size_npot.compare_less.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.size_npot.compare_less.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.size_npot.compare_greater.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.size_npot.compare_greater.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.size_npot.compare_greater.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.filter_mode.min_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.filter_mode.min_nearest_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.filter_mode.min_nearest_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.filter_mode.min_linear_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.filter_mode.min_linear_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.texture_swizzle.red_green_blue_alpha = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.texture_swizzle.green_blue_alpha_zero = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.texture_swizzle.blue_alpha_zero_one = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.texture_swizzle.alpha_zero_one_red = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.texture_swizzle.zero_one_red_green = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.texture_swizzle.one_red_green_blue = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.filter_mode.min_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.filter_mode.min_nearest_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.filter_mode.min_nearest_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.filter_mode.min_linear_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.filter_mode.min_linear_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.incomplete.mipmap_incomplete = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8ui.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8ui.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8ui.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8ui.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8ui.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8ui.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8ui.texture_swizzle.red_green_blue_alpha = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8ui.texture_swizzle.green_blue_alpha_zero = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8ui.texture_swizzle.blue_alpha_zero_one = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8ui.texture_swizzle.alpha_zero_one_red = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8ui.texture_swizzle.zero_one_red_green = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8ui.texture_swizzle.one_red_green_blue = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8ui.filter_mode.min_nearest_mipmap_nearest_mag_nearest = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8ui.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8ui.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8i.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8i.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8i.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8i.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8i.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8i.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8i.texture_swizzle.red_green_blue_alpha = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8i.texture_swizzle.green_blue_alpha_zero = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8i.texture_swizzle.blue_alpha_zero_one = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8i.texture_swizzle.alpha_zero_one_red = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8i.texture_swizzle.zero_one_red_green = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8i.texture_swizzle.one_red_green_blue = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8i.filter_mode.min_nearest_mipmap_nearest_mag_nearest = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8i.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8i.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.size_pot.compare_less.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.size_pot.compare_less.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.size_pot.compare_less.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.size_pot.compare_greater.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.size_pot.compare_greater.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.size_pot.compare_greater.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.size_npot.compare_less.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.size_npot.compare_less.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.size_npot.compare_less.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.size_npot.compare_greater.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.size_npot.compare_greater.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.size_npot.compare_greater.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.filter_mode.min_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.filter_mode.min_nearest_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.filter_mode.min_nearest_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.filter_mode.min_linear_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.filter_mode.min_linear_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.no_corners.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.no_corners.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.no_corners.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.no_corners.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.no_corners.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.no_corners.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.texture_swizzle.red_green_blue_alpha = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.texture_swizzle.green_blue_alpha_zero = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.texture_swizzle.blue_alpha_zero_one = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.texture_swizzle.alpha_zero_one_red = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.texture_swizzle.zero_one_red_green = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.texture_swizzle.one_red_green_blue = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.filter_mode.min_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.filter_mode.min_nearest_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.filter_mode.min_nearest_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.filter_mode.min_linear_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.filter_mode.min_linear_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.incomplete.mipmap_incomplete = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.no_corners.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.no_corners.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.no_corners.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.no_corners.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.no_corners.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.no_corners.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.texture_swizzle.red_green_blue_alpha = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.texture_swizzle.green_blue_alpha_zero = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.texture_swizzle.blue_alpha_zero_one = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.texture_swizzle.alpha_zero_one_red = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.texture_swizzle.zero_one_red_green = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.texture_swizzle.one_red_green_blue = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.filter_mode.min_nearest_mipmap_nearest_mag_nearest = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8ui.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.no_corners.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.no_corners.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.no_corners.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.no_corners.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.no_corners.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.no_corners.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.texture_swizzle.red_green_blue_alpha = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.texture_swizzle.green_blue_alpha_zero = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.texture_swizzle.blue_alpha_zero_one = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.texture_swizzle.alpha_zero_one_red = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.texture_swizzle.zero_one_red_green = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.texture_swizzle.one_red_green_blue = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.filter_mode.min_nearest_mipmap_nearest_mag_nearest = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.rgba8i.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.depth32f.no_corners.size_pot.compare_less.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.depth32f.no_corners.size_pot.compare_less.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.depth32f.no_corners.size_pot.compare_less.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.depth32f.no_corners.size_pot.compare_greater.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.depth32f.no_corners.size_pot.compare_greater.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.depth32f.no_corners.size_pot.compare_greater.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.depth32f.no_corners.size_npot.compare_less.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.depth32f.no_corners.size_npot.compare_less.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.depth32f.no_corners.size_npot.compare_less.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.depth32f.no_corners.size_npot.compare_greater.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.depth32f.no_corners.size_npot.compare_greater.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.basic.cube.depth32f.no_corners.size_npot.compare_greater.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8ui.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8ui.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8ui.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8ui.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8ui.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8ui.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8i.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8i.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8i.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8i.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8i.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.rgba8i.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.depth32f.size_pot.compare_less.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.depth32f.size_pot.compare_less.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.depth32f.size_pot.compare_less.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.depth32f.size_pot.compare_greater.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.depth32f.size_pot.compare_greater.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.depth32f.size_pot.compare_greater.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.depth32f.size_npot.compare_less.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.depth32f.size_npot.compare_less.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.depth32f.size_npot.compare_less.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.depth32f.size_npot.compare_greater.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.depth32f.size_npot.compare_greater.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.depth32f.size_npot.compare_greater.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8ui.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8ui.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8ui.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8ui.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8ui.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8ui.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8i.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8i.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8i.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8i.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8i.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.rgba8i.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.depth32f.size_pot.compare_less.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.depth32f.size_pot.compare_less.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.depth32f.size_pot.compare_less.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.depth32f.size_pot.compare_greater.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.depth32f.size_pot.compare_greater.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.depth32f.size_pot.compare_greater.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.depth32f.size_npot.compare_less.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.depth32f.size_npot.compare_less.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.depth32f.size_npot.compare_less.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.depth32f.size_npot.compare_greater.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.depth32f.size_npot.compare_greater.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.depth32f.size_npot.compare_greater.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.texture_swizzle.red_green_blue_alpha = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.texture_swizzle.green_blue_alpha_zero = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.texture_swizzle.blue_alpha_zero_one = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.texture_swizzle.alpha_zero_one_red = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.texture_swizzle.zero_one_red_green = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.texture_swizzle.one_red_green_blue = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.filter_mode.min_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.filter_mode.min_nearest_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.filter_mode.min_nearest_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.filter_mode.min_linear_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.filter_mode.min_linear_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8.incomplete.mipmap_incomplete = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8ui.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8ui.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8ui.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8ui.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8ui.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8ui.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8ui.texture_swizzle.red_green_blue_alpha = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8ui.texture_swizzle.green_blue_alpha_zero = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8ui.texture_swizzle.blue_alpha_zero_one = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8ui.texture_swizzle.alpha_zero_one_red = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8ui.texture_swizzle.zero_one_red_green = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8ui.texture_swizzle.one_red_green_blue = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8ui.filter_mode.min_nearest_mipmap_nearest_mag_nearest = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8ui.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8ui.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8i.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8i.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8i.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8i.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8i.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8i.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8i.texture_swizzle.red_green_blue_alpha = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8i.texture_swizzle.green_blue_alpha_zero = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8i.texture_swizzle.blue_alpha_zero_one = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8i.texture_swizzle.alpha_zero_one_red = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8i.texture_swizzle.zero_one_red_green = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8i.texture_swizzle.one_red_green_blue = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8i.filter_mode.min_nearest_mipmap_nearest_mag_nearest = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8i.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.rgba8i.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.size_pot.compare_less.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.size_pot.compare_less.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.size_pot.compare_less.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.size_pot.compare_greater.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.size_pot.compare_greater.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.size_pot.compare_greater.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.size_npot.compare_less.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.size_npot.compare_less.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.size_npot.compare_less.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.size_npot.compare_greater.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.size_npot.compare_greater.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.size_npot.compare_greater.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.filter_mode.min_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.filter_mode.min_nearest_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.filter_mode.min_nearest_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.filter_mode.min_linear_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.filter_mode.min_linear_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.texture_swizzle.red_green_blue_alpha = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.texture_swizzle.green_blue_alpha_zero = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.texture_swizzle.blue_alpha_zero_one = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.texture_swizzle.alpha_zero_one_red = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.texture_swizzle.zero_one_red_green = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.texture_swizzle.one_red_green_blue = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.filter_mode.min_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.filter_mode.min_nearest_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.filter_mode.min_nearest_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.filter_mode.min_linear_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.filter_mode.min_linear_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8.incomplete.mipmap_incomplete = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8ui.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8ui.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8ui.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8ui.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8ui.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8ui.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8ui.texture_swizzle.red_green_blue_alpha = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8ui.texture_swizzle.green_blue_alpha_zero = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8ui.texture_swizzle.blue_alpha_zero_one = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8ui.texture_swizzle.alpha_zero_one_red = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8ui.texture_swizzle.zero_one_red_green = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8ui.texture_swizzle.one_red_green_blue = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8ui.filter_mode.min_nearest_mipmap_nearest_mag_nearest = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8ui.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8ui.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8i.size_pot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8i.size_pot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8i.size_pot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8i.size_npot.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8i.size_npot.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8i.size_npot.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8i.texture_swizzle.red_green_blue_alpha = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8i.texture_swizzle.green_blue_alpha_zero = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8i.texture_swizzle.blue_alpha_zero_one = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8i.texture_swizzle.alpha_zero_one_red = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8i.texture_swizzle.zero_one_red_green = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8i.texture_swizzle.one_red_green_blue = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8i.filter_mode.min_nearest_mipmap_nearest_mag_nearest = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8i.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.rgba8i.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.size_pot.compare_less.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.size_pot.compare_less.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.size_pot.compare_less.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.size_pot.compare_greater.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.size_pot.compare_greater.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.size_pot.compare_greater.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.size_npot.compare_less.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.size_npot.compare_less.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.size_npot.compare_less.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.size_npot.compare_greater.clamp_to_edge_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.size_npot.compare_greater.repeat_mirrored_repeat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.size_npot.compare_greater.mirrored_repeat_clamp_to_edge = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.filter_mode.min_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.filter_mode.min_nearest_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.filter_mode.min_nearest_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.filter_mode.min_linear_mipmap_nearest_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.filter_mode.min_linear_mipmap_linear_mag_linear = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.base_level.level_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.base_level.level_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.boolean.sample_mask_isenabled = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.boolean.sample_mask_getboolean = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.boolean.sample_mask_getinteger = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.boolean.sample_mask_getinteger64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.boolean.sample_mask_getfloat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.texture_binding_2d_multisample_getboolean = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.texture_binding_2d_multisample_getinteger = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.texture_binding_2d_multisample_getinteger64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.texture_binding_2d_multisample_getfloat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.draw_indirect_buffer_binding_getboolean = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.draw_indirect_buffer_binding_getinteger = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.draw_indirect_buffer_binding_getinteger64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.draw_indirect_buffer_binding_getfloat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.atomic_counter_buffer_binding_getboolean = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.atomic_counter_buffer_binding_getinteger = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.atomic_counter_buffer_binding_getinteger64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.atomic_counter_buffer_binding_getfloat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.shader_storage_buffer_binding_getboolean = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.shader_storage_buffer_binding_getinteger = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.shader_storage_buffer_binding_getinteger64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.shader_storage_buffer_binding_getfloat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.dispatch_indirect_buffer_binding_getboolean = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.dispatch_indirect_buffer_binding_getinteger = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.dispatch_indirect_buffer_binding_getinteger64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.dispatch_indirect_buffer_binding_getfloat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.program_pipeline_binding_getboolean = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.program_pipeline_binding_getinteger = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.program_pipeline_binding_getinteger64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.integer.program_pipeline_binding_getfloat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.sample_mask_value_getbooleani_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.sample_mask_value_getintegeri_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.sample_mask_value_getinteger64i_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.atomic_counter_buffer_binding_getbooleani_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.atomic_counter_buffer_binding_getintegeri_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.atomic_counter_buffer_binding_getinteger64i_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.atomic_counter_buffer_start_getbooleani_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.atomic_counter_buffer_start_getintegeri_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.atomic_counter_buffer_start_getinteger64i_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.atomic_counter_buffer_size_getbooleani_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.atomic_counter_buffer_size_getintegeri_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.atomic_counter_buffer_size_getinteger64i_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.shader_storage_buffer_binding_getbooleani_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.shader_storage_buffer_binding_getintegeri_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.shader_storage_buffer_binding_getinteger64i_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.shader_storage_buffer_start_getbooleani_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.shader_storage_buffer_start_getintegeri_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.shader_storage_buffer_start_getinteger64i_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.shader_storage_buffer_size_getbooleani_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.shader_storage_buffer_size_getintegeri_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.shader_storage_buffer_size_getinteger64i_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_name_getbooleani_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_name_getintegeri_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_name_getinteger64i_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_level_getbooleani_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_level_getintegeri_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_level_getinteger64i_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_layered_getbooleani_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_layered_getintegeri_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_layered_getinteger64i_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_layer_getbooleani_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_layer_getintegeri_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_layer_getinteger64i_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_access_getbooleani_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_access_getintegeri_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_access_getinteger64i_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_format_getbooleani_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_format_getintegeri_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.indexed.image_binding_format_getinteger64i_v = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d.depth_stencil_mode_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d.depth_stencil_mode_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_3d.depth_stencil_mode_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_3d.depth_stencil_mode_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_array.depth_stencil_mode_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_array.depth_stencil_mode_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_cube_map.depth_stencil_mode_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_cube_map.depth_stencil_mode_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.is_texture = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_swizzle_r_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_swizzle_r_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_swizzle_g_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_swizzle_g_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_swizzle_b_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_swizzle_b_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_swizzle_a_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_swizzle_a_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_base_level_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_base_level_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_max_level_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_max_level_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_immutable_levels_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_immutable_levels_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_immutable_format_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.texture_immutable_format_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.depth_stencil_mode_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.depth_stencil_mode_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.samples_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.samples_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.fixed_sample_locations_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.fixed_sample_locations_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.width_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.width_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.height_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.height_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.depth_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.depth_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.internal_format_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.internal_format_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.red_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.red_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.green_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.green_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.blue_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.blue_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.alpha_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.alpha_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.depth_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.depth_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.stencil_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.stencil_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.shared_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.shared_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.red_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.red_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.green_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.green_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.blue_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.blue_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.alpha_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.alpha_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.depth_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.depth_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.compressed_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d.compressed_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.samples_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.samples_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.fixed_sample_locations_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.fixed_sample_locations_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.width_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.width_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.height_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.height_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.depth_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.depth_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.internal_format_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.internal_format_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.red_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.red_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.green_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.green_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.blue_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.blue_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.alpha_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.alpha_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.depth_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.depth_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.stencil_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.stencil_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.shared_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.shared_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.red_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.red_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.green_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.green_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.blue_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.blue_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.alpha_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.alpha_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.depth_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.depth_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.compressed_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_3d.compressed_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.samples_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.samples_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.fixed_sample_locations_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.fixed_sample_locations_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.width_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.width_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.height_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.height_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.depth_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.depth_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.internal_format_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.internal_format_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.red_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.red_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.green_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.green_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.blue_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.blue_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.alpha_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.alpha_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.depth_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.depth_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.stencil_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.stencil_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.shared_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.shared_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.red_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.red_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.green_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.green_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.blue_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.blue_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.alpha_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.alpha_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.depth_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.depth_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.compressed_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_array.compressed_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.samples_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.samples_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.fixed_sample_locations_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.fixed_sample_locations_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.width_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.width_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.height_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.height_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.depth_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.depth_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.internal_format_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.internal_format_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.red_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.red_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.green_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.green_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.blue_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.blue_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.alpha_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.alpha_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.depth_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.depth_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.stencil_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.stencil_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.shared_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.shared_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.red_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.red_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.green_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.green_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.blue_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.blue_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.alpha_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.alpha_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.depth_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.depth_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.compressed_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_cube_map.compressed_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.samples_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.samples_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.fixed_sample_locations_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.fixed_sample_locations_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.width_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.width_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.height_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.height_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.depth_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.depth_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.internal_format_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.internal_format_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.red_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.red_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.green_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.green_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.blue_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.blue_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.alpha_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.alpha_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.depth_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.depth_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.stencil_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.stencil_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.shared_size_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.shared_size_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.red_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.red_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.green_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.green_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.blue_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.blue_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.alpha_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.alpha_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.depth_type_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.depth_type_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.compressed_integer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.compressed_float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.shader.sampler_type = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.rgb10_a2ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.r8i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.r8ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.r16i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.r16ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.r32i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.r32ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.rg8i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.rg8ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.rg16i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.rg16ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.rg32i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.rg32ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.rgba8i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.rgba8ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.rgba16i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.rgba16ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.rgba32i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.renderbuffer.rgba32ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.r8_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rg8_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rgb8_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rgb565_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rgba4_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rgb5_a1_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rgba8_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rgb10_a2_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rgb10_a2ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.srgb8_alpha8_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.r8i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.r8ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.r16i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.r16ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.r32i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.r32ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rg8i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rg8ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rg16i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rg16ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rg32i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rg32ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rgba8i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rgba8ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rgba16i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rgba16ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rgba32i_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.rgba32ui_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.depth_component16_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.depth_component24_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.depth_component32f_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.depth24_stencil8_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.depth32f_stencil8_samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.partial_query.num_sample_counts = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.internal_format.partial_query.samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.vertex_attrib.vertex_attrib_binding = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.vertex_attrib.vertex_attrib_relative_offset = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.vertex_attrib.vertex_attrib_binding_getvertexattribfv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.vertex_attrib.vertex_attrib_relative_offset_getvertexattribfv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.vertex_attrib.vertex_attrib_binding_getvertexattribiiv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.vertex_attrib.vertex_attrib_relative_offset_getvertexattribiiv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.vertex_attrib.vertex_attrib_binding_getvertexattribiuiv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.vertex_attrib.vertex_attrib_relative_offset_getvertexattribiuiv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_divisor_getintegeri = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_offset_getintegeri = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_stride_getintegeri = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_buffer_getintegeri = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_divisor_getintegeri64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_offset_getintegeri64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_stride_getintegeri64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_buffer_getintegeri64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_divisor_getboolean = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_offset_getboolean = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_stride_getboolean = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_buffer_getboolean = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_divisor_mixed = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_offset_mixed = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_stride_mixed = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.vertex_attribute_binding.indexed.vertex_binding_buffer_mixed = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.framebuffer_default.framebuffer_default_width_get_framebuffer_parameteriv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.framebuffer_default.framebuffer_default_height_get_framebuffer_parameteriv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.framebuffer_default.framebuffer_default_samples_get_framebuffer_parameteriv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.framebuffer_default.framebuffer_default_fixed_sample_locations_get_framebuffer_parameteriv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.program.program_separable_get_programiv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.program.compute_work_group_size_get_programiv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.program.active_atomic_counter_buffers_get_programiv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.program_pipeline.active_program_get_program_pipelineiv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.program_pipeline.vertex_shader_get_program_pipelineiv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.program_pipeline.fragment_shader_get_program_pipelineiv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.program_pipeline.compute_shader_get_program_pipelineiv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.program_pipeline.validate_status_get_program_pipelineiv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.state_query.program_pipeline.info_log = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.in_invocation.image_write_read = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.in_invocation.image_read_write = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.in_invocation.image_overwrite = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.in_invocation.image_alias_write = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.in_invocation.image_alias_overwrite = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.in_invocation.ssbo_write_read = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.in_invocation.ssbo_read_write = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.in_invocation.ssbo_overwrite = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.in_invocation.ssbo_alias_write = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.in_invocation.ssbo_alias_overwrite = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.in_invocation.ssbo_atomic_write_read = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.in_invocation.ssbo_atomic_read_write = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.in_invocation.ssbo_atomic_overwrite = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.in_invocation.ssbo_atomic_alias_write = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.in_invocation.ssbo_atomic_alias_overwrite = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_invocation.image_write_read = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_invocation.image_read_write = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_invocation.image_overwrite = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_invocation.image_alias_write = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_invocation.image_alias_overwrite = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_invocation.ssbo_write_read = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_invocation.ssbo_read_write = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_invocation.ssbo_overwrite = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_invocation.ssbo_alias_write = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_invocation.ssbo_alias_overwrite = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_invocation.ssbo_atomic_write_read = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_invocation.ssbo_atomic_read_write = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_invocation.ssbo_atomic_overwrite = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_invocation.ssbo_atomic_alias_write = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_invocation.ssbo_atomic_alias_overwrite = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.image_write_read = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.image_read_write = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.image_overwrite = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.image_multiple_write_read = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.image_multiple_interleaved_write_read = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.image_multiple_unrelated_write_read_ordered = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.image_multiple_unrelated_write_read_non_ordered = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.ssbo_write_read = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.ssbo_read_write = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.ssbo_overwrite = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.ssbo_multiple_write_read = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.ssbo_multiple_interleaved_write_read = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.ssbo_multiple_unrelated_write_read_ordered = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.ssbo_multiple_unrelated_write_read_non_ordered = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.ssbo_atomic_write_read = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.ssbo_atomic_read_write = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.ssbo_atomic_overwrite = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.ssbo_atomic_multiple_write_read = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.ssbo_atomic_multiple_interleaved_write_read = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.ssbo_atomic_multiple_unrelated_write_read_ordered = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.with_memory_barrier.ssbo_atomic_multiple_unrelated_write_read_non_ordered = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_dispatch_2_calls_1k_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_dispatch_5_calls_1k_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_dispatch_100_calls_1k_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_dispatch_2_calls_4k_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_dispatch_5_calls_4k_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_dispatch_100_calls_4k_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_dispatch_2_calls_32k_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_dispatch_5_calls_32k_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_dispatch_100_calls_32k_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.atomic_counter_dispatch_2_calls_32_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.atomic_counter_dispatch_5_calls_32_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.atomic_counter_dispatch_100_calls_32_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.atomic_counter_dispatch_2_calls_128_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.atomic_counter_dispatch_5_calls_128_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.atomic_counter_dispatch_100_calls_128_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.atomic_counter_dispatch_2_calls_1k_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.atomic_counter_dispatch_5_calls_1k_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.atomic_counter_dispatch_100_calls_1k_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_counter_mixed_dispatch_2_calls_32_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_counter_mixed_dispatch_5_calls_32_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_counter_mixed_dispatch_100_calls_32_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_counter_mixed_dispatch_2_calls_128_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_counter_mixed_dispatch_5_calls_128_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_counter_mixed_dispatch_100_calls_128_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_counter_mixed_dispatch_2_calls_1k_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_counter_mixed_dispatch_5_calls_1k_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.ssbo_atomic_counter_mixed_dispatch_100_calls_1k_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.geometry_shading.query.geometry_linked_vertices_out = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.geometry_shading.query.geometry_linked_input_type = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.geometry_shading.query.geometry_linked_output_type = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.geometry_shading.query.geometry_shader_invocations = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.single_binding.elements_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.single_binding.elements_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.single_binding.elements_2_share_elements = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.single_binding.offset_elements_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.single_binding.offset_elements_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.single_binding.offset_elements_2_share_elements = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.single_binding.unaligned_offset_elements_1_aligned_elements = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.multiple_bindings.basic = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.multiple_bindings.zero_stride = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.multiple_bindings.instanced = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.multiple_bindings.aliasing_buffer_zero_stride = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.multiple_bindings.aliasing_buffer_instanced = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.mixed_usage.mixed_attribs_basic = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.mixed_usage.mixed_attribs_instanced_binding = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.mixed_usage.mixed_attribs_instanced_attrib = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.mixed_usage.mixed_api_change_buffer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.mixed_usage.mixed_api_change_buffer_offset = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.mixed_usage.mixed_api_change_buffer_stride = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.usage.mixed_usage.mixed_api_change_binding_point = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.negative.vertex_attrib_format_large_offset = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.negative.bind_vertex_buffer_large_stride = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.negative.bind_vertex_buffer_negative_stride = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.negative.bind_vertex_buffer_negative_offset = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.negative.vertex_attrib_binding_invalid_attr = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.vertex_attribute_binding.negative.vertex_attrib_binding_invalid_binding = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.vec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.vec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.vec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.vec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.vec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.vec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2x3_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2x3_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2x3_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2x4_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2x4_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat2x4_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3x2_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3x2_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3x2_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3x4_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3x4_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat3x4_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4x2_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4x2_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4x2_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4x3_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4x3_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4x3_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.mat4_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.ivec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.ivec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.ivec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.ivec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.ivec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.ivec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.uvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.uvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.uvec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.uvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.uvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.uvec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bool_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bool_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bool_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bool_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bool_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bool_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bool_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bool_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bool_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec2_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec2_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec2_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec2_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec2_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec2_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec2_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec2_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec2_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec3_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec3_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec3_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec3_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec3_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec3_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec3_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec3_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec3_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec4_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec4_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec4_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec4_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec4_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec4_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec4_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec4_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.bvec4_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.sampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.sampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.sampler2D_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic.samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.mat4_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.mat4_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.mat4_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bool_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bool_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bool_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bool_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bool_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bool_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bool_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bool_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bool_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bvec4_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bvec4_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bvec4_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bvec4_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bvec4_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bvec4_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bvec4_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bvec4_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.bvec4_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.sampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.sampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array.sampler2D_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.mat4_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.mat4_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.mat4_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bool_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bool_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bool_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bool_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bool_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bool_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bool_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bool_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bool_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.sampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.sampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_array_first_elem_without_brackets.sampler2D_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.mat4_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.mat4_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.mat4_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.basic_struct.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.mat4_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.mat4_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.mat4_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.struct_in_array.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.mat4_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.mat4_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.mat4_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.array_in_struct.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.mat4_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.mat4_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.mat4_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.nested_structs_arrays.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.multiple_basic.vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.multiple_basic.fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.multiple_basic.both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.multiple_basic_array.vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.multiple_basic_array.fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.multiple_basic_array.both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.multiple_nested_structs_arrays.vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.multiple_nested_structs_arrays.fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.get_uniform.multiple_nested_structs_arrays.both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.vec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.vec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.vec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.vec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.vec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.vec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2x3_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2x3_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2x3_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2x4_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2x4_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat2x4_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3x2_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3x2_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3x2_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3x4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3x4_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3x4_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat3x4_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4x2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4x2_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4x2_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4x2_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4x3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4x3_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4x3_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4x3_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.mat4_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.ivec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.ivec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.ivec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.ivec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.ivec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.ivec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.uvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.uvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.uvec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.uvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.uvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.uvec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.bool_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.bvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.bvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.bvec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.bvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.bvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.bvec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.sampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.sampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.sampler2D_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic.samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.mat4_row_major_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.mat4_row_major_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.mat4_row_major_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.bool_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.sampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.sampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_array.sampler2D_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.mat4_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.mat4_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.mat4_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.basic_struct.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.mat4_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.mat4_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.mat4_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.struct_in_array.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.mat4_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.mat4_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.mat4_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.mat4_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.mat4_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.mat4_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.multiple_basic.vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.multiple_basic.fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.multiple_basic.both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.multiple_basic_array.vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.multiple_basic_array.fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.multiple_basic_array.both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.multiple_nested_structs_arrays.vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.multiple_nested_structs_arrays.fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_pointer.render.multiple_nested_structs_arrays.both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.vec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.vec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.vec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.vec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.vec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.vec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.ivec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.ivec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.ivec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.ivec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.ivec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.ivec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.uvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.uvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.uvec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.uvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.uvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.uvec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bool_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bool_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bool_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bool_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bool_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bool_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bool_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bool_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bool_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec2_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec2_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec2_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec2_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec2_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec2_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec2_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec2_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec2_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec3_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec3_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec3_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec3_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec3_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec3_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec3_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec3_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec3_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec4_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec4_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec4_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec4_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec4_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec4_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec4_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec4_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.bvec4_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.sampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.sampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.sampler2D_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic.samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bool_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bool_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bool_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bool_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bool_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bool_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bool_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bool_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bool_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bvec4_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bvec4_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bvec4_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bvec4_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bvec4_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bvec4_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bvec4_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bvec4_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.bvec4_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.sampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.sampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array.sampler2D_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bool_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bool_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bool_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bool_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bool_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bool_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bool_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bool_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bool_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.bvec4_api_uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.sampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.sampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_array_first_elem_without_brackets.sampler2D_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_struct.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_struct.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_struct.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_struct.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_struct.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_struct.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_struct.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_struct.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_struct.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_struct.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_struct.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_struct.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_struct.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_struct.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.basic_struct.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.struct_in_array.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.struct_in_array.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.struct_in_array.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.struct_in_array.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.struct_in_array.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.struct_in_array.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.struct_in_array.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.struct_in_array.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.struct_in_array.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.struct_in_array.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.struct_in_array.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.struct_in_array.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.struct_in_array.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.struct_in_array.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.struct_in_array.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.array_in_struct.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.array_in_struct.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.array_in_struct.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.array_in_struct.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.array_in_struct.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.array_in_struct.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.array_in_struct.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.array_in_struct.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.array_in_struct.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.array_in_struct.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.array_in_struct.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.array_in_struct.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.array_in_struct.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.array_in_struct.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.array_in_struct.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.nested_structs_arrays.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.nested_structs_arrays.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.nested_structs_arrays.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.nested_structs_arrays.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.nested_structs_arrays.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.nested_structs_arrays.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.nested_structs_arrays.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.nested_structs_arrays.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.nested_structs_arrays.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.nested_structs_arrays.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.nested_structs_arrays.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.nested_structs_arrays.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.nested_structs_arrays.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.nested_structs_arrays.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.nested_structs_arrays.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.multiple_basic_array.vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.multiple_basic_array.fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.multiple_basic_array.both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.multiple_nested_structs_arrays.vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.multiple_nested_structs_arrays.fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.get_uniform.multiple_nested_structs_arrays.both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.vec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.vec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.vec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.vec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.vec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.vec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.ivec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.ivec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.ivec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.ivec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.ivec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.ivec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.uvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.uvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.uvec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.uvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.uvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.uvec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.bool_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.bvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.bvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.bvec2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.bvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.bvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.bvec3_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.sampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.sampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.sampler2D_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic.samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.bool_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.sampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.sampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_array.sampler2D_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.basic_struct.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.struct_in_array.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.array_in_struct.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.multiple_basic_array.vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.multiple_basic_array.fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.multiple_basic_array.both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.multiple_nested_structs_arrays.vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.multiple_nested_structs_arrays.fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.by_value.render.multiple_nested_structs_arrays.both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.bool_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.sampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.sampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.basic_array.sampler2D_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.mat4_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.mat4_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.mat4_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.array_in_struct.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.multiple_basic_array.vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.multiple_basic_array.fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_full.multiple_basic_array.both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.float_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.mat4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.int_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.uint_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.bool_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.sampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.sampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.basic_array.sampler2D_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.mat4_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.mat4_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.mat4_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.array_in_struct.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.multiple_basic_array.vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.multiple_basic_array.fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.basic_array_assign_partial.multiple_basic_array.both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.float_vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.float_vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.float_vec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.mat4_mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.mat4_mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.mat4_mat2_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.int_ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.int_ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.int_ivec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.uint_uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.uint_uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.uint_uvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.bool_bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.bool_bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.bool_bvec4_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.sampler2D_samplerCube_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.sampler2D_samplerCube_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_uniform.unused_uniforms.sampler2D_samplerCube_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.different_constant_separate_programs = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.different_constant_separate_programs_add_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.different_constant_separate_programs_add_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.different_constant_separate_programs_add_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.different_constant_single_program = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.different_constant_single_program_add_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.different_uniform_separate_programs = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.different_uniform_separate_programs_add_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.different_uniform_separate_programs_add_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.different_uniform_separate_programs_add_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.different_uniform_single_program = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.different_uniform_single_program_add_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.same_constant_separate_programs = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.same_constant_separate_programs_add_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.same_constant_separate_programs_add_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.same_constant_separate_programs_add_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.same_uniform_separate_programs = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.same_uniform_separate_programs_add_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.same_uniform_separate_programs_add_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.pipeline.same_uniform_separate_programs_add_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.program_uniform.separate_programs = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.program_uniform.separate_programs_add_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.program_uniform.separate_programs_add_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.program_uniform.separate_programs_add_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.program_uniform.single_program = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.program_uniform.single_program_add_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.create_shader_program.separate_programs = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.create_shader_program.separate_programs_add_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.create_shader_program.separate_programs_add_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.create_shader_program.separate_programs_add_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.create_shader_program.single_program_add_both = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_name_vertex_smooth_fragment_smooth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_name_vertex_smooth_fragment_centroid = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_name_vertex_smooth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_name_vertex_flat_fragment_flat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_name_vertex_centroid_fragment_smooth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_name_vertex_centroid_fragment_centroid = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_name_vertex_centroid = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_name_fragment_smooth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_name_fragment_centroid = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_name = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_location_vertex_smooth_fragment_smooth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_location_vertex_smooth_fragment_centroid = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_location_vertex_smooth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_location_vertex_flat_fragment_flat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_location_vertex_centroid_fragment_smooth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_location_vertex_centroid_fragment_centroid = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_location_vertex_centroid = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_location_fragment_smooth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_location_fragment_centroid = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.interface.same_location = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.25 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.26 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.27 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.28 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.29 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.30 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.31 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.33 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.34 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.35 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.36 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.37 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.38 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.39 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.40 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.41 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.42 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.43 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.44 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.45 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.46 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.47 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.48 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.49 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.50 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.51 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.52 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.53 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.54 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.55 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.56 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.57 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.58 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.59 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.60 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.61 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.62 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.63 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.65 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.66 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.67 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.68 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.69 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.70 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.71 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.72 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.73 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.74 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.75 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.76 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.77 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.78 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.79 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.80 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.81 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.82 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.83 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.84 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.85 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.86 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.87 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.88 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.89 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.90 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.91 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.92 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.93 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.94 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.95 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.96 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.97 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.98 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.99 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.100 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.101 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.102 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.103 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.104 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.105 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.106 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.107 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.108 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.109 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.110 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.111 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.112 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.113 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.114 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.115 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.116 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.117 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.118 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.119 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.120 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.121 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.122 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.123 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.124 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.125 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.126 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.random.127 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.api.current_program_priority = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.api.active_program_uniform = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.api.pipeline_programs = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.api.pipeline_active = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.missing_input = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.missing_output = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_type = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_precision = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_explicit_location_type = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_explicit_location_precision = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_explicit_location = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_implicit_explicit_location_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_implicit_explicit_location_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_implicit_explicit_location_3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.match_different_struct_names = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_struct_member_name = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_struct_member_type = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_struct_member_precision = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_struct_member_order = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_array_element_type = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_array_length = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_array_precision = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_qualifier_vertex_flat_fragment_none = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_qualifier_vertex_flat_fragment_smooth = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_qualifier_vertex_flat_fragment_centroid = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_qualifier_vertex_smooth_fragment_flat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_qualifier_vertex_centroid_fragment_flat = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.vec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.vec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.vec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.vec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.ivec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.ivec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.ivec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.ivec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.uvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.uvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.uvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.uvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.bvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.bvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.bvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.bvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.sampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.sampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.isampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.isampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.usampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.basic.usampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.vec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.vec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.vec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.vec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.ivec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.ivec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.ivec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.ivec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.uvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.uvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.uvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.uvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.bvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.bvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.bvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.bvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.sampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.sampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.isampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.isampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.usampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.array.usampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.float_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.float_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.vec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.vec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.vec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.vec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.vec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.vec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.int_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.int_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.ivec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.ivec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.ivec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.ivec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.ivec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.ivec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.uint_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.uint_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.uvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.uvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.uvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.uvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.uvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.uvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.bool_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.bool_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.bvec2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.bvec2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.bvec3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.bvec3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.bvec4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.bvec4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat2x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat2x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat2x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat2x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat3x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat3x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat3x4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat3x4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat4x2_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat4x2_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat4x3_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat4x3_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat4_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.mat4_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.sampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.sampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.isampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.isampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.usampler2D_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_array.usampler2D_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.struct.case_0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.struct.case_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.struct.case_3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.struct.case_4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.struct.case_6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.struct.case_7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.struct.case_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.struct.case_9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.struct.case_10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.struct.case_12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.struct.case_13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.struct.case_14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.struct.case_15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.nested_struct.case_15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.float_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.float_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.float_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.float_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.vec2_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.vec2_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.vec2_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.vec2_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.vec3_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.vec3_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.vec3_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.vec3_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.vec4_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.vec4_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.vec4_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.vec4_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.int_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.int_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.int_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.int_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.ivec2_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.ivec2_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.ivec2_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.ivec2_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.ivec3_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.ivec3_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.ivec3_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.ivec3_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.ivec4_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.ivec4_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.ivec4_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.ivec4_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uint_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uint_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uint_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uint_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uvec2_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uvec2_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uvec2_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uvec2_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uvec3_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uvec3_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uvec3_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uvec3_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uvec4_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uvec4_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uvec4_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.uvec4_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bool_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bool_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bool_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bool_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bvec2_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bvec2_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bvec2_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bvec2_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bvec3_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bvec3_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bvec3_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bvec3_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bvec4_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bvec4_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bvec4_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.bvec4_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat2_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat2_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat2_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat2_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat2x3_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat2x3_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat2x3_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat2x3_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat2x4_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat2x4_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat2x4_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat2x4_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat3x2_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat3x2_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat3x2_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat3x2_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat3_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat3_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat3_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat3_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat3x4_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat3x4_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat3x4_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat3x4_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat4x2_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat4x2_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat4x2_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat4x2_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat4x3_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat4x3_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat4x3_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat4x3_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat4_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat4_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat4_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.mat4_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.sampler2D_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.sampler2D_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.sampler2D_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.sampler2D_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.isampler2D_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.isampler2D_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.isampler2D_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.isampler2D_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.usampler2D_vertex_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.usampler2D_vertex_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.usampler2D_fragment_min = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.min_max.usampler2D_fragment_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.link.case_0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.link.case_1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.link.case_2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.link.case_3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.link.case_4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.link.case_5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.link.case_6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.link.case_7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.link.case_8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.uniform_location.link.case_9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.callbacks.shader.compile_compute_shader = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.callbacks.shader_directive.primitive_bounding_box = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.callbacks.shader_directive.geometry_shader = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.callbacks.shader_directive.tessellation_shader = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.log.shader.compile_compute_shader = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.log.shader_directive.primitive_bounding_box = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.log.shader_directive.geometry_shader = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.log.shader_directive.tessellation_shader = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.read_pixels_format_mismatch = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.framebuffer_texture2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.blit_framebuffer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.invalidate_sub_framebuffer = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.renderbuffer_storage_multisample = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.copyteximage2d_invalid_format = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.copyteximage2d_inequal_width_height_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.copyteximage2d_max_width_height = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.copytexsubimage2d_invalid_offset = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.texparameteri = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.texparameterf = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.texparameteriv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.texparameterfv = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.compressedtexsubimage2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.compressedtexsubimage2d_invalid_size = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.texsubimage3d_neg_level = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.texsubimage3d_neg_offset = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.copytexsubimage3d_invalid_offset = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.compressedtexsubimage3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.compressedtexsubimage3d_invalid_buffer_target = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.shader.compile_compute_shader = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.vertex_attrib_format = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.vertex_attrib_i_format = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_range_elements = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_range_elements_incomplete_primitive = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.shader_directive.primitive_bounding_box = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.shader_directive.geometry_shader = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.shader_directive.tessellation_shader = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.debug.object_labels.program_pipeline = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.16x16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.16x64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.16x256 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.16x1024 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.64x16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.64x64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.64x256 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.64x1024 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.256x16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.256x64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.256x256 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.256x1024 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.1024x16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.1024x64 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.1024x256 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.size.1024x1024 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.1x1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.3x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.15x15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.17x17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.31x31 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.33x33 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.63x63 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.65x65 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.127x127 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.129x129 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.255x255 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.257x257 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.511x511 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.513x513 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.1023x1023 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.1025x1025 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.2047x2047 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.15x511 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.127x15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.129x127 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.511x127 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.npot_size.2047x1025 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.multisample.samples0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.multisample.samples1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.multisample.samples2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.multisample.samples3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.multisample.samples4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.random.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.interaction.256x256ms0_default_128x128ms1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.interaction.256x256ms1_default_128x128ms0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.interaction.256x256ms0_default_512x512ms2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.interaction.256x256ms2_default_128x512ms0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.interaction.127x127ms0_default_129x129ms0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.interaction.17x512ms4_default_16x16ms2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.interaction.2048x2048ms4_default_1x1ms0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.interaction.1x1ms0_default_2048x2048ms4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.maximums.width = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.maximums.height = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.maximums.size = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.maximums.samples = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.no_attachments.maximums.all = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.fbo.completeness.no_attachments = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_limited_query.resource_name_query = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_limited_query.resource_query = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_struct_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_array_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_struct_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_array_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_struct_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_array_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_struct_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_array_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_struct_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_array_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_struct_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_array_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_struct_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_array_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_struct_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.default_block.var_array_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_struct_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_array_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_struct_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_array_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_struct_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_array_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_struct_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_array_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_struct_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_array_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_struct_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_array_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_struct_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_array_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_struct_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.named_block.var_array_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_struct_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_array_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_struct_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_array_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_struct_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_array_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_struct_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_array_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_struct_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_array_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_struct_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_array_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_struct_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_array_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_struct_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.unnamed_block.var_array_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_struct_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_array_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_struct_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_array_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_struct_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_array_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_struct_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_array_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_struct_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_array_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_struct_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_array_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_struct_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_array_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_struct_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.resource_list.block_array.var_array_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.sampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.sampler_2d_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.usampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.sampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.isampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.image_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.iimage_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.uimage_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.types.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.aggregates.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.aggregates.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.aggregates.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.aggregates.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.aggregates.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.aggregates.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.aggregates.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.aggregates.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.aggregates.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.aggregates.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.aggregates.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.aggregates.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.aggregates.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.aggregates.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.default_block.aggregates.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.types.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.types.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.types.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.types.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.types.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.aggregates.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.aggregates.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.aggregates.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.aggregates.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.aggregates.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.aggregates.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.aggregates.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.aggregates.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.aggregates.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.aggregates.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.aggregates.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.aggregates.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.aggregates.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.aggregates.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.named_block.aggregates.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.unnamed_block.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.unnamed_block.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.unnamed_block.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.unnamed_block.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.unnamed_block.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.unnamed_block.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.unnamed_block.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.block_array.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.block_array.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.block_array.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.block_array.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.block_array.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.block_array.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_size.block_array.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.sampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.sampler_2d_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.usampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.sampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.isampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.image_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.iimage_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.uimage_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.types.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.sampler2D_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.sampler2D_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.atomic_uint_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.float_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.float_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.float_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.float_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.bool_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.bool_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.bvec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.bvec3_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.bvec3_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.bvec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.bvec3_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.bvec3_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.vec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.vec3_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.vec3_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.vec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.vec3_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.vec3_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.ivec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.ivec3_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.ivec3_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.ivec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.ivec3_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.default_block.aggregates.ivec3_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.types.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.types.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.types.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.types.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.types.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.float_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.float_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.float_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.float_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.bool_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.bool_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.bvec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.bvec3_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.bvec3_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.bvec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.bvec3_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.bvec3_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.vec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.vec3_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.vec3_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.vec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.vec3_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.vec3_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.ivec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.ivec3_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.ivec3_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.ivec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.ivec3_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.named_block.aggregates.ivec3_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.array.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.struct.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.struct.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.struct.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.struct.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.unnamed_block.struct.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.array.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.struct.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.struct.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.struct.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.struct.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.array_stride.block_array.struct.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.basic_type.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.sampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.sampler_2d_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.sampler_cube_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.sampler_2d_array_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.isampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.isampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.isampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.usampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.usampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.usampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.usampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.sampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.isampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.usampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.image_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.image_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.image_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.image_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.iimage_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.iimage_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.iimage_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.iimage_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.uimage_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.uimage_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.uimage_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.uimage_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.opaque_type.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.array.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.default_block.array.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.named_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.named_block.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.named_block.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.named_block.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.named_block.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.atomic_counter_buffer_index.named_block.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.block_index.default_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.block_index.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.block_index.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.block_index.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.basic_type.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.sampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.sampler_2d_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.sampler_cube_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.sampler_2d_array_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.isampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.isampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.isampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.usampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.usampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.usampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.usampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.sampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.isampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.usampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.image_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.image_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.image_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.image_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.iimage_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.iimage_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.iimage_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.iimage_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.uimage_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.uimage_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.uimage_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.uimage_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.opaque_type.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.basic_type.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.basic_type.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.basic_type.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.basic_type.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.basic_type.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.basic_type.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.basic_type.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.basic_type.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.opaque_type.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.opaque_type.sampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.opaque_type.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.opaque_type.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.opaque_type.sampler_2d_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.opaque_type.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.opaque_type.usampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.opaque_type.sampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.opaque_type.isampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.opaque_type.image_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.opaque_type.iimage_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.opaque_type.uimage_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.opaque_type.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.array.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.array.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.array.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.array.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.array.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.array.image_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.array.iimage_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.array.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.struct.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.struct.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.struct.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.struct.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.struct.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.struct.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.struct.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.struct.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.array.struct.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.basic_type.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.basic_type.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.basic_type.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.basic_type.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.basic_type.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.basic_type.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.basic_type.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.basic_type.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.opaque_type.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.opaque_type.sampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.opaque_type.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.opaque_type.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.opaque_type.sampler_2d_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.opaque_type.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.opaque_type.usampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.opaque_type.sampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.opaque_type.isampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.array.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.array.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.array.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.array.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.array.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.struct.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.struct.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.struct.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.struct.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.struct.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.struct.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.struct.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.struct.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.default_block.struct.struct.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.named_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.named_block.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.named_block.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.named_block.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.named_block.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.named_block.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.unnamed_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.unnamed_block.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.unnamed_block.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.unnamed_block.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.unnamed_block.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.location.unnamed_block.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.sampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.sampler_2d_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.usampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.sampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.isampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.image_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.iimage_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.uimage_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.types.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.aggregates.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.aggregates.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.default_block.no_qualifier.aggregates.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.no_qualifier.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.no_qualifier.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.no_qualifier.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.no_qualifier.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.no_qualifier.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.no_qualifier.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.no_qualifier.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.no_qualifier.types.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.no_qualifier.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.no_qualifier.types.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.no_qualifier.types.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.no_qualifier.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.no_qualifier.aggregates.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.no_qualifier.aggregates.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.no_qualifier.aggregates.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_row_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_row_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_row_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_row_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_row_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_row_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_row_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_row_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_row_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_col_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_col_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_col_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_col_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_col_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_col_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_col_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_col_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.named_block_col_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_row_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_row_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_row_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_row_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_row_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_row_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_row_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_row_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_row_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_col_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_col_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_col_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_col_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_col_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_col_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_col_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_col_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_row_major.unnamed_block_col_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.sampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.sampler_2d_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.usampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.sampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.isampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.image_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.iimage_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.uimage_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.types.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.aggregates.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.aggregates.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.default_block.no_qualifier.aggregates.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.no_qualifier.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.no_qualifier.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.no_qualifier.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.no_qualifier.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.no_qualifier.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.no_qualifier.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.no_qualifier.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.no_qualifier.types.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.no_qualifier.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.no_qualifier.types.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.no_qualifier.types.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.no_qualifier.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.no_qualifier.aggregates.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.no_qualifier.aggregates.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.no_qualifier.aggregates.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.row_major.matrix.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.row_major.matrix.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.row_major.matrix.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.row_major.matrix.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.row_major.matrix.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.row_major.matrix.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.row_major.aggregates.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.row_major.aggregates.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.row_major.aggregates.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.column_major.matrix.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.column_major.matrix.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.column_major.matrix.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.column_major.matrix.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.column_major.matrix.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.column_major.matrix.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.column_major.aggregates.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.column_major.aggregates.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block.column_major.aggregates.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_row_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_row_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_row_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_row_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_row_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_row_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_row_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_row_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_row_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_col_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_col_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_col_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_col_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_col_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_col_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_col_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_col_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.named_block_col_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_row_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_row_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_row_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_row_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_row_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_row_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_row_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_row_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_row_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_col_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_col_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_col_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_col_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_col_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_col_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_col_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_col_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.matrix_stride.unnamed_block_col_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.default_block.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.default_block.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.default_block.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.default_block.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.default_block.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.default_block.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.default_block.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.named_block.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.named_block.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.named_block.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.named_block.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.named_block.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.named_block.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.named_block.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.unnamed_block.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.unnamed_block.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.unnamed_block.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.block_array.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.block_array.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.name_length.block_array.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.sampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.sampler_2d_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.sampler_cube_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.sampler_2d_array_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.isampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.isampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.isampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.usampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.usampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.usampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.usampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.sampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.isampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.usampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.image_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.image_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.image_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.image_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.iimage_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.iimage_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.iimage_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.iimage_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.uimage_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.uimage_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.uimage_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.uimage_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.types.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.aggregates.atomic_uint_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.aggregates.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.default_block.aggregates.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.aggregates.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.named_block.aggregates.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.array.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.struct.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.struct.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.struct.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.struct.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.unnamed_block.struct.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.array.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.struct.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.struct.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.struct.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.struct.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.offset.block_array.struct.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.default_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.default_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.default_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.default_block.sampler = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.default_block.sampler_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.default_block.sampler_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.default_block.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.default_block.atomic_uint_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.default_block.float_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.default_block.float_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.default_block.float_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.default_block.float_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.uniform_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.uniform_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.uniform_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.uniform_block.float_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.uniform_block.float_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.uniform_block.float_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.uniform_block.float_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.unnamed_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.unnamed_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.unnamed_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.block_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.block_array.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.compute.block_array.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.default_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.default_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.default_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.default_block.sampler = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.default_block.sampler_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.default_block.sampler_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.default_block.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.default_block.atomic_uint_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.default_block.float_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.default_block.float_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.default_block.float_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.default_block.float_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.uniform_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.uniform_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.uniform_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.uniform_block.float_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.uniform_block.float_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.uniform_block.float_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.uniform_block.float_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.unnamed_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.unnamed_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.unnamed_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.block_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.block_array.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_vertex.block_array.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.default_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.default_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.default_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.default_block.sampler = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.default_block.sampler_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.default_block.sampler_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.default_block.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.default_block.atomic_uint_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.default_block.float_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.default_block.float_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.default_block.float_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.default_block.float_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.uniform_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.uniform_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.uniform_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.uniform_block.float_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.uniform_block.float_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.uniform_block.float_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.uniform_block.float_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.unnamed_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.unnamed_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.unnamed_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.block_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.block_array.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.separable_fragment.block_array.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.default_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.default_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.default_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.default_block.sampler = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.default_block.sampler_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.default_block.sampler_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.default_block.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.default_block.atomic_uint_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.uniform_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.uniform_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.uniform_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.unnamed_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.unnamed_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.unnamed_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.block_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.block_array.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment.block_array.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.default_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.default_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.default_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.default_block.sampler = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.default_block.sampler_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.default_block.sampler_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.default_block.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.default_block.atomic_uint_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.uniform_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.uniform_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.uniform_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.unnamed_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.unnamed_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.unnamed_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.block_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.block_array.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_vertex.block_array.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.default_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.default_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.default_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.default_block.sampler = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.default_block.sampler_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.default_block.sampler_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.default_block.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.default_block.atomic_uint_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.uniform_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.uniform_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.uniform_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.unnamed_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.unnamed_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.unnamed_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.block_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.block_array.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_fragment_only_fragment.block_array.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.sampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.sampler_2d_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.sampler_cube_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.sampler_2d_array_shadow = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.isampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.isampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.isampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.usampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.usampler_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.usampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.usampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.sampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.isampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.usampler_2d_ms = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.image_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.image_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.image_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.image_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.iimage_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.iimage_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.iimage_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.iimage_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.uimage_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.uimage_cube = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.uimage_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.uimage_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.types.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.array.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.array.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.array.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.array.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.array.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.array.image_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.array.iimage_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.array.atomic_uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.struct.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.struct.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.struct.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.struct.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.struct.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.struct.sampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.struct.sampler_2d_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.struct.sampler_3d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.default_block.struct.isampler_2d = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.array.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.struct.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.struct.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.struct.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.struct.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.named_block.struct.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.array.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.struct.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.struct.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.struct.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.struct.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.unnamed_block.struct.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.array.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.struct.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.struct.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.struct.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.struct.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.type.block_array.struct.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.25 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.26 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.27 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.28 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.29 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.30 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.31 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.33 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.34 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.35 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.36 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.37 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.38 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform.random.39 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.resource_list.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.resource_list.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.resource_list.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.resource_list.block_array_single_element = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.active_variables.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.active_variables.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.active_variables.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.buffer_binding.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.buffer_binding.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.buffer_binding.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.buffer_binding.named_block_explicit_binding = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.buffer_binding.unnamed_block_explicit_binding = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.buffer_binding.block_array_explicit_binding = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.buffer_data_size.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.buffer_data_size.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.buffer_data_size.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.name_length.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.name_length.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.name_length.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.name_length.block_array_single_element = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.compute.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.compute.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.compute.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.separable_vertex.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.separable_vertex.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.separable_vertex.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.separable_fragment.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.separable_fragment.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.separable_fragment.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.vertex_fragment.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.vertex_fragment.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.vertex_fragment.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.vertex_fragment_only_vertex.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.vertex_fragment_only_vertex.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.vertex_fragment_only_vertex.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.vertex_fragment_only_fragment.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.vertex_fragment_only_fragment.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.vertex_fragment_only_fragment.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.atomic_counter_buffer.resource_list = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.atomic_counter_buffer.active_variables = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.atomic_counter_buffer.buffer_binding = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.atomic_counter_buffer.buffer_data_size = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.atomic_counter_buffer.referenced_by_compute = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.atomic_counter_buffer.referenced_by_separable_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.atomic_counter_buffer.referenced_by_separable_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.atomic_counter_buffer.referenced_by_vertex_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.atomic_counter_buffer.referenced_by_vertex_fragment_only_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.atomic_counter_buffer.referenced_by_vertex_fragment_only_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.resource_list.vertex_fragment.empty = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.resource_list.vertex_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.resource_list.separable_vertex.empty = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.resource_list.separable_vertex.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.resource_list.separable_fragment.empty = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.resource_list.separable_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.resource_list.separable_fragment.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.resource_list.separable_fragment.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.resource_list.compute.empty = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.array_size.vertex_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.array_size.separable_vertex.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.array_size.separable_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.array_size.separable_fragment.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.array_size.separable_fragment.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.location.vertex_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.location.vertex_fragment.var_explicit_location = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.location.separable_vertex.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.location.separable_vertex.var_explicit_location = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.location.separable_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.location.separable_fragment.var_explicit_location = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.location.separable_fragment.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.location.separable_fragment.var_struct_explicit_location = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.location.separable_fragment.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.location.separable_fragment.var_array_explicit_location = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.name_length.vertex_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.name_length.separable_vertex.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.name_length.separable_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.name_length.separable_fragment.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.name_length.separable_fragment.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.referenced_by.referenced_by_vertex_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.referenced_by.referenced_by_separable_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.referenced_by.referenced_by_separable_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.vertex_fragment.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_vertex.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.basic_type.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.array.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_input.type.separable_fragment.struct.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.resource_list.vertex_fragment.empty = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.resource_list.vertex_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.resource_list.vertex_fragment.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.resource_list.separable_vertex.empty = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.resource_list.separable_vertex.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.resource_list.separable_vertex.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.resource_list.separable_vertex.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.resource_list.separable_fragment.empty = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.resource_list.separable_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.resource_list.separable_fragment.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.resource_list.compute.empty = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.array_size.vertex_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.array_size.vertex_fragment.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.array_size.separable_vertex.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.array_size.separable_vertex.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.array_size.separable_vertex.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.array_size.separable_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.array_size.separable_fragment.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.location.vertex_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.location.vertex_fragment.var_explicit_location = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.location.vertex_fragment.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.location.vertex_fragment.var_array_explicit_location = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.location.separable_vertex.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.location.separable_vertex.var_explicit_location = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.location.separable_vertex.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.location.separable_vertex.var_struct_explicit_location = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.location.separable_vertex.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.location.separable_vertex.var_array_explicit_location = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.location.separable_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.location.separable_fragment.var_explicit_location = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.location.separable_fragment.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.location.separable_fragment.var_array_explicit_location = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.name_length.vertex_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.name_length.vertex_fragment.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.name_length.separable_vertex.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.name_length.separable_vertex.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.name_length.separable_vertex.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.name_length.separable_fragment.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.name_length.separable_fragment.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.referenced_by.referenced_by_vertex_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.referenced_by.referenced_by_separable_vertex = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.referenced_by.referenced_by_separable_fragment = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.basic_type.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.basic_type.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.basic_type.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.basic_type.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.basic_type.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.basic_type.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.basic_type.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.array.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.array.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.array.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.array.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.array.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.array.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.vertex_fragment.array.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.basic_type.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.array.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_vertex.struct.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.basic_type.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.basic_type.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.basic_type.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.basic_type.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.basic_type.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.basic_type.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.basic_type.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.array.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.array.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.array.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.array.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.array.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.array.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.program_output.type.separable_fragment.array.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.resource_list.vertex_fragment.builtin_gl_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.resource_list.vertex_fragment.default_block_basic_type = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.resource_list.vertex_fragment.default_block_struct_member = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.resource_list.vertex_fragment.default_block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.resource_list.vertex_fragment.default_block_array_element = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.resource_list.separable_vertex.builtin_gl_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.resource_list.separable_vertex.default_block_basic_type = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.resource_list.separable_vertex.default_block_struct_member = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.resource_list.separable_vertex.default_block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.resource_list.separable_vertex.default_block_array_element = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.array_size.vertex_fragment.builtin_gl_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.array_size.vertex_fragment.default_block_basic_type = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.array_size.vertex_fragment.default_block_struct_member = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.array_size.vertex_fragment.default_block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.array_size.vertex_fragment.default_block_array_element = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.array_size.separable_vertex.builtin_gl_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.array_size.separable_vertex.default_block_basic_type = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.array_size.separable_vertex.default_block_struct_member = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.array_size.separable_vertex.default_block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.array_size.separable_vertex.default_block_array_element = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.name_length.vertex_fragment.builtin_gl_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.name_length.vertex_fragment.default_block_basic_type = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.name_length.vertex_fragment.default_block_struct_member = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.name_length.vertex_fragment.default_block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.name_length.vertex_fragment.default_block_array_element = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.name_length.separable_vertex.builtin_gl_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.name_length.separable_vertex.default_block_basic_type = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.name_length.separable_vertex.default_block_struct_member = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.name_length.separable_vertex.default_block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.name_length.separable_vertex.default_block_array_element = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.builtin.gl_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.basic_type.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.array.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.whole_array.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.vertex_fragment.struct.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.builtin.gl_position = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.basic_type.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.array.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.whole_array.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.separable_vertex.struct.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_struct_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_array_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_struct_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_array_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_struct_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_array_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_struct_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_array_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_struct_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_array_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_struct_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_array_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_struct_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_array_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_struct_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.named_block.var_array_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_struct_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_array_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_struct_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_array_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_struct_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_array_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_struct_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_array_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_struct_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_array_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_struct_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_array_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_struct_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_array_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_struct_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.unnamed_block.var_array_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_struct_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_array_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_struct_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_array_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_struct_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_array_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_struct_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_array_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_struct_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_array_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_struct_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_array_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_struct_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_array_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_struct_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.resource_list.block_array.var_array_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.non_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.non_array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.non_array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.non_array.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.non_array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.non_array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.types.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.types.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.types.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.types.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.types.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.float_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.float_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.float_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.float_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.bool_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.bool_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.bvec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.bvec3_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.bvec3_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.bvec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.bvec3_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.bvec3_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.vec4_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.vec4_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.vec4_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.vec4_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.vec4_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.vec4_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.ivec2_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.ivec2_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.ivec2_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.ivec2_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.ivec2_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.sized.aggregates.ivec2_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.unsized.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.unsized.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.unsized.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.unsized.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.unsized.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.unsized.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.unsized.aggregates.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.unsized.aggregates.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.unsized.aggregates.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.unsized.aggregates.bvec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.unsized.aggregates.bvec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.unsized.aggregates.vec4_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.unsized.aggregates.vec4_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.unsized.aggregates.ivec2_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.named_block.unsized.aggregates.ivec2_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.sized.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.sized.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.sized.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.sized.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.sized.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.sized.bvec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.sized.bvec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.sized.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.sized.vec4_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.sized.vec4_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.sized.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.sized.ivec2_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.sized.ivec2_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.unsized.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.unsized.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.unsized.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.unsized.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.unsized.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.unsized.bvec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.unsized.bvec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.unsized.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.unsized.vec4_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.unsized.vec4_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.unsized.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.unsized.ivec2_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.unnamed_block.unsized.ivec2_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.sized.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.sized.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.sized.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.sized.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.sized.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.sized.bvec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.sized.bvec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.sized.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.sized.vec4_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.sized.vec4_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.sized.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.sized.ivec2_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.sized.ivec2_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.unsized.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.unsized.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.unsized.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.unsized.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.unsized.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.unsized.bvec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.unsized.bvec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.unsized.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.unsized.vec4_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.unsized.vec4_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.unsized.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.unsized.ivec2_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_size.block_array.unsized.ivec2_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.non_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.non_array.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.non_array.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.non_array.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.non_array.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.non_array.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.types.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.types.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.types.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.types.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.types.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.float_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.float_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.float_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.float_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.bool_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.bool_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.bvec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.bvec3_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.bvec3_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.bvec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.bvec3_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.bvec3_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.vec4_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.vec4_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.vec4_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.vec4_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.vec4_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.vec4_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.ivec2_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.ivec2_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.ivec2_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.ivec2_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.ivec2_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.sized.aggregates.ivec2_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.unsized.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.unsized.types.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.unsized.types.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.unsized.types.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.unsized.types.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.unsized.types.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.unsized.aggregates.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.unsized.aggregates.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.unsized.aggregates.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.unsized.aggregates.bvec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.unsized.aggregates.bvec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.unsized.aggregates.vec4_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.unsized.aggregates.vec4_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.unsized.aggregates.ivec2_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.named_block.unsized.aggregates.ivec2_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.sized.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.sized.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.sized.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.sized.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.sized.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.sized.bvec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.sized.bvec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.sized.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.sized.vec4_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.sized.vec4_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.sized.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.sized.ivec2_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.sized.ivec2_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.unsized.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.unsized.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.unsized.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.unsized.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.unsized.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.unsized.bvec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.unsized.bvec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.unsized.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.unsized.vec4_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.unsized.vec4_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.unsized.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.unsized.ivec2_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.unnamed_block.unsized.ivec2_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.sized.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.sized.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.sized.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.sized.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.sized.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.sized.bvec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.sized.bvec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.sized.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.sized.vec4_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.sized.vec4_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.sized.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.sized.ivec2_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.sized.ivec2_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.unsized.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.unsized.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.unsized.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.unsized.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.unsized.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.unsized.bvec3_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.unsized.bvec3_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.unsized.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.unsized.vec4_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.unsized.vec4_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.unsized.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.unsized.ivec2_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.array_stride.block_array.unsized.ivec2_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.block_index.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.block_index.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.block_index.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.types.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.types.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.types.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.types.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.types.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.types.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.types.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.no_qualifier.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.no_qualifier.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.no_qualifier.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.no_qualifier.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.no_qualifier.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.column_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.column_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.column_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.column_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.column_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.row_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.row_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.row_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.row_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block.row_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.no_qualifier.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.no_qualifier.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.no_qualifier.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.no_qualifier.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.no_qualifier.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.column_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.column_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.column_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.column_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.column_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.row_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.row_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.row_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.row_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_row_major.row_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.no_qualifier.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.no_qualifier.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.no_qualifier.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.no_qualifier.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.no_qualifier.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.column_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.column_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.column_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.column_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.column_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.row_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.row_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.row_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.row_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.named_block_col_major.row_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.no_qualifier.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.no_qualifier.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.no_qualifier.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.no_qualifier.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.no_qualifier.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.column_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.column_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.column_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.column_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.column_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.row_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.row_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.row_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.row_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block.row_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.no_qualifier.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.no_qualifier.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.no_qualifier.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.no_qualifier.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.no_qualifier.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.column_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.column_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.column_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.column_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.column_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.row_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.row_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.row_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.row_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_row_major.row_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.no_qualifier.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.no_qualifier.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.no_qualifier.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.no_qualifier.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.no_qualifier.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.column_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.column_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.column_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.column_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.column_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.row_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.row_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.row_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.row_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.is_row_major.unnamed_block_col_major.row_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.types.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.types.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.types.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.types.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.types.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.types.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.types.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.types.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.types.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.types.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.types.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.no_qualifier.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.no_qualifier.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.no_qualifier.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.no_qualifier.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.no_qualifier.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.column_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.column_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.column_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.column_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.column_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.row_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.row_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.row_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.row_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block.row_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.no_qualifier.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.no_qualifier.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.no_qualifier.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.no_qualifier.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.no_qualifier.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.column_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.column_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.column_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.column_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.column_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.row_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.row_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.row_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.row_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_row_major.row_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.no_qualifier.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.no_qualifier.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.no_qualifier.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.no_qualifier.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.no_qualifier.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.column_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.column_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.column_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.column_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.column_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.row_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.row_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.row_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.row_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.named_block_col_major.row_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.no_qualifier.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.no_qualifier.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.no_qualifier.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.no_qualifier.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.no_qualifier.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.column_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.column_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.column_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.column_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.column_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.row_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.row_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.row_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.row_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block.row_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.no_qualifier.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.no_qualifier.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.no_qualifier.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.no_qualifier.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.no_qualifier.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.column_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.column_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.column_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.column_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.column_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.row_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.row_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.row_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.row_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_row_major.row_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.no_qualifier.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.no_qualifier.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.no_qualifier.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.no_qualifier.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.no_qualifier.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.no_qualifier.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.no_qualifier.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.no_qualifier.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.column_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.column_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.column_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.column_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.column_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.column_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.column_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.column_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.row_major.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.row_major.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.row_major.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.row_major.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.row_major.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.row_major.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.row_major.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.matrix_stride.unnamed_block_col_major.row_major.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.sized.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.sized.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.sized.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.sized.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.sized.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.sized.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.sized.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.sized.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.sized.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.sized.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.sized.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.sized.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.sized.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.sized.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.sized.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.unsized.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.unsized.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.unsized.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.unsized.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.unsized.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.unsized.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.named_block.unsized.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.sized.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.sized.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.sized.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.sized.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.sized.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.sized.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.sized.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.sized.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.sized.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.sized.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.sized.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.sized.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.sized.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.sized.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.sized.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.unsized.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.unsized.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.unsized.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.unsized.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.unsized.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.unsized.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.unnamed_block.unsized.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.sized.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.sized.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.sized.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.sized.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.sized.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.sized.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.sized.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.sized.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.sized.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.sized.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.sized.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.sized.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.sized.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.sized.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.sized.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.unsized.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.unsized.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.unsized.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.unsized.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.unsized.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.unsized.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.name_length.block_array.unsized.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.sized.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.sized.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.sized.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.sized.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.sized.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.sized.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.sized.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.sized.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.sized.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.sized.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.sized.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.sized.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.sized.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.sized.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.sized.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.unsized.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.unsized.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.unsized.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.unsized.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.unsized.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.unsized.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.named_block.unsized.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.sized.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.sized.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.sized.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.sized.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.sized.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.sized.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.sized.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.sized.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.sized.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.sized.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.sized.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.sized.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.sized.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.sized.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.sized.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.unsized.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.unsized.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.unsized.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.unsized.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.unsized.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.unsized.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.unnamed_block.unsized.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.sized.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.sized.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.sized.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.sized.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.sized.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.sized.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.sized.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.sized.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.sized.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.sized.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.sized.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.sized.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.sized.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.sized.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.sized.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.unsized.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.unsized.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.unsized.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.unsized.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.unsized.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.unsized.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.offset.block_array.unsized.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.compute.named_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.compute.named_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.compute.named_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.compute.named_block.float_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.compute.named_block.float_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.compute.named_block.float_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.compute.named_block.float_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.compute.named_block.float_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.compute.named_block.float_unsized_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.compute.unnamed_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.compute.unnamed_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.compute.unnamed_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.compute.block_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.compute.block_array.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.compute.block_array.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_vertex.named_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_vertex.named_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_vertex.named_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_vertex.named_block.float_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_vertex.named_block.float_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_vertex.named_block.float_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_vertex.named_block.float_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_vertex.named_block.float_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_vertex.named_block.float_unsized_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_vertex.unnamed_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_vertex.unnamed_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_vertex.unnamed_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_vertex.block_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_vertex.block_array.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_vertex.block_array.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_fragment.named_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_fragment.named_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_fragment.named_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_fragment.named_block.float_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_fragment.named_block.float_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_fragment.named_block.float_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_fragment.named_block.float_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_fragment.named_block.float_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_fragment.named_block.float_unsized_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_fragment.unnamed_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_fragment.unnamed_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_fragment.unnamed_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_fragment.block_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_fragment.block_array.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.separable_fragment.block_array.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment.named_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment.named_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment.named_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment.unnamed_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment.unnamed_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment.unnamed_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment.block_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment.block_array.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment.block_array.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_vertex.named_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_vertex.named_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_vertex.named_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_vertex.unnamed_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_vertex.unnamed_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_vertex.unnamed_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_vertex.block_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_vertex.block_array.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_vertex.block_array.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_fragment.named_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_fragment.named_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_fragment.named_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_fragment.unnamed_block.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_fragment.unnamed_block.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_fragment.unnamed_block.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_fragment.block_array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_fragment.block_array.float_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.referenced_by.vertex_fragment_only_fragment.block_array.float_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_struct_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_array_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_struct_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.named_block.var_array_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_struct_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_array_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_struct_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.unnamed_block.var_array_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_struct_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_array_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_struct_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_size.block_array.var_array_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_struct_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_array_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_struct_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.named_block.var_array_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_struct_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_array_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_struct_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.unnamed_block.var_array_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_struct_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_array_struct_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_struct_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_array_array_struct = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_struct_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_array_struct_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_struct_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_array_array_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_struct_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_array_struct_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_struct_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.top_level_array_stride.block_array.var_array_array_unsized_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.vec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.ivec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.ivec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.uvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.uvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.bvec2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.bvec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.mat2x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.mat2x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.mat3x4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.mat4x3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.basic_type.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.basic_type.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.basic_type.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.basic_type.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.basic_type.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.basic_type.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.basic_type.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.basic_type.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.basic_type.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.array.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.array.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.array.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.array.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.array.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.array.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.array.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.array.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.struct.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.struct.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.struct.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.struct.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.struct.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.struct.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.struct.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.array.struct.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.basic_type.ivec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.basic_type.uvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.basic_type.bvec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.basic_type.mat2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.basic_type.mat3x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.basic_type.mat3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.basic_type.mat4x2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.basic_type.mat4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.array.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.array.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.array.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.array.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.array.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.array.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.array.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.array.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.struct.basic_type.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.struct.basic_type.int = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.struct.basic_type.uint = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.struct.basic_type.bool = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.struct.basic_type.vec3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.struct.basic_type.vec4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.struct.array.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.type.struct.struct.struct.float = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.0 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.1 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.2 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.3 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.4 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.5 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.6 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.7 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.8 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.9 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.10 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.11 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.12 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.13 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.14 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.15 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.16 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.17 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.18 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.19 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.20 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.21 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.22 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.23 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.24 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.25 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.26 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.27 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.28 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.29 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.30 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.31 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.32 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.33 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.34 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.35 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.36 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.37 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.38 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.buffer_variable.random.39 = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.resource_list.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.resource_list.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.resource_list.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.resource_list.block_array_single_element = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.active_variables.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.active_variables.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.active_variables.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.buffer_binding.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.buffer_binding.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.buffer_binding.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.buffer_binding.named_block_explicit_binding = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.buffer_binding.unnamed_block_explicit_binding = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.buffer_binding.block_array_explicit_binding = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.buffer_data_size.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.buffer_data_size.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.buffer_data_size.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.name_length.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.name_length.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.name_length.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.name_length.block_array_single_element = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.compute.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.compute.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.compute.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.separable_vertex.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.separable_vertex.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.separable_vertex.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.separable_fragment.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.separable_fragment.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.separable_fragment.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.vertex_fragment.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.vertex_fragment.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.vertex_fragment.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.vertex_fragment_only_vertex.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.vertex_fragment_only_vertex.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.vertex_fragment_only_vertex.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.vertex_fragment_only_fragment.named_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.vertex_fragment_only_fragment.unnamed_block = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.program_interface_query.shader_storage_block.referenced_by.vertex_fragment_only_fragment.block_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler2d.vertex_binding_single = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler2d.vertex_binding_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler2d.vertex_binding_multiple = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler2d.vertex_binding_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler2d.vertex_binding_max_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler2d.fragment_binding_single = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler2d.fragment_binding_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler2d.fragment_binding_multiple = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler2d.fragment_binding_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler2d.fragment_binding_max_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler3d.vertex_binding_single = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler3d.vertex_binding_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler3d.vertex_binding_multiple = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler3d.vertex_binding_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler3d.vertex_binding_max_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler3d.fragment_binding_single = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler3d.fragment_binding_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler3d.fragment_binding_multiple = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler3d.fragment_binding_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.sampler.sampler3d.fragment_binding_max_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_single = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_multiple = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ubo.vertex_binding_max_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ubo.fragment_binding_single = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ubo.fragment_binding_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ubo.fragment_binding_multiple = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ubo.fragment_binding_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ubo.fragment_binding_max_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ssbo.vertex_binding_single = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ssbo.vertex_binding_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ssbo.vertex_binding_multiple = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ssbo.vertex_binding_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ssbo.vertex_binding_max_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ssbo.fragment_binding_single = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ssbo.fragment_binding_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ssbo.fragment_binding_multiple = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ssbo.fragment_binding_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.ssbo.fragment_binding_max_array = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image2d.vertex_binding_single = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image2d.vertex_binding_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image2d.vertex_binding_multiple = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image2d.fragment_binding_single = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image2d.fragment_binding_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image2d.fragment_binding_multiple = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image3d.vertex_binding_single = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image3d.vertex_binding_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image3d.vertex_binding_multiple = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image3d.fragment_binding_single = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image3d.fragment_binding_max = FAIL -1442 DEBUG RELEASE : dEQP-GLES31.functional.layout_binding.image.image3d.fragment_binding_multiple = FAIL +1442 DEBUG : dEQP_GLES31.* = FAIL +1442 RELEASE : dEQP_GLES31.* = FAIL diff --git a/gfx/angle/src/tests/deqp_support/deqp_gles3_test_expectations.txt b/gfx/angle/src/tests/deqp_support/deqp_gles3_test_expectations.txt index da30e4faa..f47fe8339 100755 --- a/gfx/angle/src/tests/deqp_support/deqp_gles3_test_expectations.txt +++ b/gfx/angle/src/tests/deqp_support/deqp_gles3_test_expectations.txt @@ -56,6 +56,22 @@ // TODO(jmadill): Find why this fails when run in a certain sequence, but not singly. 1098 WIN : dEQP-GLES3.functional.uniform_api.random.50 = FAIL +// Caused by a D3D compiler bug +1448 WIN : dEQP-GLES3.functional.shaders.loops.for_constant_iterations.nested_sequence_vertex = FAIL +1448 WIN : dEQP-GLES3.functional.shaders.loops.for_constant_iterations.nested_sequence_fragment = FAIL +1448 WIN : dEQP-GLES3.functional.shaders.loops.for_constant_iterations.nested_tricky_dataflow_1_vertex = FAIL +1448 WIN : dEQP-GLES3.functional.shaders.loops.for_constant_iterations.nested_tricky_dataflow_1_fragment = FAIL +1448 WIN : dEQP-GLES3.functional.shaders.loops.for_constant_iterations.nested_tricky_dataflow_2_vertex = FAIL +1448 WIN : dEQP-GLES3.functional.shaders.loops.for_constant_iterations.nested_tricky_dataflow_2_fragment = FAIL +1448 WIN : dEQP-GLES3.functional.shaders.loops.while_constant_iterations.nested_tricky_dataflow_1_vertex = FAIL +1448 WIN : dEQP-GLES3.functional.shaders.loops.while_constant_iterations.nested_tricky_dataflow_1_fragment = FAIL +1448 WIN : dEQP-GLES3.functional.shaders.loops.while_constant_iterations.nested_tricky_dataflow_2_vertex = FAIL +1448 WIN : dEQP-GLES3.functional.shaders.loops.while_constant_iterations.nested_tricky_dataflow_2_fragment = FAIL +1448 WIN : dEQP-GLES3.functional.shaders.loops.do_while_constant_iterations.nested_tricky_dataflow_1_vertex = FAIL +1448 WIN : dEQP-GLES3.functional.shaders.loops.do_while_constant_iterations.nested_tricky_dataflow_1_fragment = FAIL +1448 WIN : dEQP-GLES3.functional.shaders.loops.do_while_constant_iterations.nested_tricky_dataflow_2_vertex = FAIL +1448 WIN : dEQP-GLES3.functional.shaders.loops.do_while_constant_iterations.nested_tricky_dataflow_2_fragment = FAIL + // Missing the SampleCmp instruction in vertex shaders. 1435 WIN : dEQP-GLES3.functional.shaders.texture_functions.texturelod.sampler2dshadow_vertex = FAIL 1435 WIN : dEQP-GLES3.functional.shaders.texture_functions.texturelodoffset.sampler2dshadow_vertex = FAIL @@ -163,6 +179,7 @@ 1096 WIN : dEQP-GLES3.functional.fragment_ops.blend.fbo_srgb.equation_src_func_dst_func.reverse_subtract_one_minus_constant_alpha_one_minus_constant_color = FAIL 1096 WIN : dEQP-GLES3.functional.fragment_ops.random.* = FAIL 1096 WIN : dEQP-GLES3.functional.fragment_ops.interaction.basic_shader.* = FAIL +1097 WIN : dEQP-GLES3.functional.fbo.color.repeated_clear.sample.tex2d.r11f_g11f_b10f = FAIL 1098 WIN : dEQP-GLES3.functional.uniform_api.random.8 = FAIL 1098 WIN : dEQP-GLES3.functional.uniform_api.random.81 = FAIL 1101 WIN : dEQP-GLES3.functional.polygon_offset.fixed16_render_with_units = FAIL @@ -219,6 +236,7 @@ 1323 LINUX : dEQP-GLES3.functional.fbo.depth.depth_test_clamp.depth32f_stencil8 = FAIL 1323 LINUX : dEQP-GLES3.functional.fbo.depth.depth_write_clamp.depth_component32f = FAIL 1323 LINUX : dEQP-GLES3.functional.fbo.depth.depth_write_clamp.depth32f_stencil8 = FAIL +1323 LINUX : dEQP-GLES3.functional.negative_api.state.get_integeri_v = FAIL 1323 LINUX : dEQP-GLES3.functional.rasterization.fbo.rbo_multisample_max.primitives.points = FAIL 1323 LINUX : dEQP-GLES3.functional.state_query.integers64.max_server_wait_timeout_getfloat = FAIL 1323 LINUX : dEQP-GLES3.functional.texture.mipmap.2d.projected.linear_linear_clamp = FAIL diff --git a/gfx/angle/src/tests/gl_tests/BindGeneratesResourceTest.cpp b/gfx/angle/src/tests/gl_tests/BindGeneratesResourceTest.cpp deleted file mode 100644 index e8ae739f8..000000000 --- a/gfx/angle/src/tests/gl_tests/BindGeneratesResourceTest.cpp +++ /dev/null @@ -1,123 +0,0 @@ -// -// 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. -// - -// BindGeneratesResourceTest.cpp : Tests of the GL_CHROMIUM_bind_generates_resource extension. - -#include "test_utils/ANGLETest.h" - -namespace angle -{ - -class BindGeneratesResourceTest : public ANGLETest -{ - protected: - BindGeneratesResourceTest() { setBindGeneratesResource(false); } -}; - -// Context creation would fail if EGL_CHROMIUM_create_context_bind_generates_resource was not -// available so the GL extension should always be present -TEST_P(BindGeneratesResourceTest, ExtensionStringExposed) -{ - EXPECT_TRUE(extensionEnabled("GL_CHROMIUM_bind_generates_resource")); -} - -// Verify that GL_BIND_GENERATES_RESOURCE_CHROMIUM can be queried but not changed -TEST_P(BindGeneratesResourceTest, QueryValidation) -{ - GLint intValue = 2; - glGetIntegerv(GL_BIND_GENERATES_RESOURCE_CHROMIUM, &intValue); - EXPECT_GL_NO_ERROR(); - EXPECT_EQ(intValue, GL_FALSE); - - float floatValue = 2.0f; - glGetFloatv(GL_BIND_GENERATES_RESOURCE_CHROMIUM, &floatValue); - EXPECT_GL_NO_ERROR(); - EXPECT_EQ(floatValue, 0.0f); - - GLboolean boolValue = GL_TRUE; - glGetBooleanv(GL_BIND_GENERATES_RESOURCE_CHROMIUM, &boolValue); - EXPECT_GL_NO_ERROR(); - EXPECT_EQ(boolValue, GL_FALSE); - - boolValue = glIsEnabled(GL_BIND_GENERATES_RESOURCE_CHROMIUM); - EXPECT_GL_NO_ERROR(); - EXPECT_EQ(boolValue, GL_FALSE); - - glEnable(GL_BIND_GENERATES_RESOURCE_CHROMIUM); - EXPECT_GL_ERROR(GL_INVALID_ENUM); - - glDisable(GL_BIND_GENERATES_RESOURCE_CHROMIUM); - EXPECT_GL_ERROR(GL_INVALID_ENUM); -} - -// Test that buffers cannot be generated on bind -TEST_P(BindGeneratesResourceTest, Buffers) -{ - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 2); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); - - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - EXPECT_GL_NO_ERROR(); - - if (getClientMajorVersion() >= 3) - { - glBindBufferBase(GL_UNIFORM_BUFFER, 0, 3); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); - - glBindBufferBase(GL_UNIFORM_BUFFER, 0, 0); - EXPECT_GL_NO_ERROR(); - - glBindBufferRange(GL_UNIFORM_BUFFER, 0, 4, 1, 2); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); - - glBindBufferRange(GL_UNIFORM_BUFFER, 0, 0, 1, 2); - EXPECT_GL_NO_ERROR(); - } -} - -// Test that textures cannot be generated on bind -TEST_P(BindGeneratesResourceTest, Textures) -{ - glBindTexture(GL_TEXTURE_2D, 2); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); - - glBindTexture(GL_TEXTURE_2D, 0); - EXPECT_GL_NO_ERROR(); -} - -// Test that framebuffers cannot be generated on bind -TEST_P(BindGeneratesResourceTest, Framebuffers) -{ - glBindFramebuffer(GL_FRAMEBUFFER, 2); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); - - glBindFramebuffer(GL_FRAMEBUFFER, 0); - EXPECT_GL_NO_ERROR(); -} - -// Test that renderbuffer cannot be generated on bind -TEST_P(BindGeneratesResourceTest, Renderbuffers) -{ - glBindRenderbuffer(GL_RENDERBUFFER, 2); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); - - glBindRenderbuffer(GL_RENDERBUFFER, 0); - EXPECT_GL_NO_ERROR(); -} - -// Use this to select which configurations (e.g. which renderer, which GLES major version) these -// tests should be run against. -ANGLE_INSTANTIATE_TEST(BindGeneratesResourceTest, - ES2_D3D9(), - ES2_D3D11(), - ES3_D3D11(), - ES2_D3D11_FL9_3(), - ES2_OPENGL(), - ES3_OPENGL(), - ES2_OPENGLES(), - ES3_OPENGLES()); - -} // namespace diff --git a/gfx/angle/src/tests/gl_tests/BlendMinMaxTest.cpp b/gfx/angle/src/tests/gl_tests/BlendMinMaxTest.cpp index 39f5251e5..8ccaf9274 100755 --- a/gfx/angle/src/tests/gl_tests/BlendMinMaxTest.cpp +++ b/gfx/angle/src/tests/gl_tests/BlendMinMaxTest.cpp @@ -32,12 +32,13 @@ class BlendMinMaxTest : public ANGLETest float values[4]; }; - static float getExpected(bool blendMin, float curColor, float prevColor) + static GLubyte getExpected(bool blendMin, float curColor, GLubyte prevColor) { - return blendMin ? std::min(curColor, prevColor) : std::max(curColor, prevColor); + GLubyte curAsUbyte = static_cast((curColor * std::numeric_limits::max()) + 0.5f); + return blendMin ? std::min(curAsUbyte, prevColor) : std::max(curAsUbyte, prevColor); } - void runTest(GLenum colorFormat, GLenum type) + void runTest(GLenum colorFormat) { if (getClientMajorVersion() < 3 && !extensionEnabled("GL_EXT_blend_minmax")) { @@ -54,26 +55,17 @@ class BlendMinMaxTest : public ANGLETest SetUpFramebuffer(colorFormat); - int minValue = 0; - int maxValue = 1; - if (type == GL_FLOAT) - { - minValue = -1024; - maxValue = 1024; - } - - const size_t colorCount = 128; + const size_t colorCount = 1024; Color colors[colorCount]; for (size_t i = 0; i < colorCount; i++) { for (size_t j = 0; j < 4; j++) { - colors[i].values[j] = - static_cast(minValue + (rand() % (maxValue - minValue))); + colors[i].values[j] = (rand() % 255) / 255.0f; } } - float prevColor[4]; + GLubyte prevColor[4]; for (size_t i = 0; i < colorCount; i++) { const Color &color = colors[i]; @@ -85,37 +77,16 @@ class BlendMinMaxTest : public ANGLETest drawQuad(mProgram, "aPosition", 0.5f); - float pixel[4]; - if (type == GL_UNSIGNED_BYTE) - { - GLubyte ubytePixel[4]; - glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, ubytePixel); - for (size_t componentIdx = 0; componentIdx < ArraySize(pixel); componentIdx++) - { - pixel[componentIdx] = ubytePixel[componentIdx] / 255.0f; - } - } - else if (type == GL_FLOAT) - { - glReadPixels(0, 0, 1, 1, GL_RGBA, GL_FLOAT, pixel); - } - else - { - FAIL() << "Unexpected pixel type"; - } - if (i > 0) { - const float errorRange = 1.0f / 255.0f; - for (size_t componentIdx = 0; componentIdx < ArraySize(pixel); componentIdx++) - { - EXPECT_NEAR( - getExpected(blendMin, color.values[componentIdx], prevColor[componentIdx]), - pixel[componentIdx], errorRange); - } + EXPECT_PIXEL_EQ(0, 0, + getExpected(blendMin, color.values[0], prevColor[0]), + getExpected(blendMin, color.values[1], prevColor[1]), + getExpected(blendMin, color.values[2], prevColor[2]), + getExpected(blendMin, color.values[3], prevColor[3])); } - memcpy(prevColor, pixel, sizeof(pixel)); + glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, prevColor); } } @@ -171,9 +142,6 @@ class BlendMinMaxTest : public ANGLETest glRenderbufferStorage(GL_RENDERBUFFER, colorFormat, getWindowWidth(), getWindowHeight()); glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, mColorRenderbuffer); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT); - ASSERT_GL_NO_ERROR(); } @@ -195,10 +163,10 @@ class BlendMinMaxTest : public ANGLETest TEST_P(BlendMinMaxTest, RGBA8) { - runTest(GL_RGBA8, GL_UNSIGNED_BYTE); + runTest(GL_RGBA8); } -TEST_P(BlendMinMaxTest, RGBA32F) +TEST_P(BlendMinMaxTest, RGBA32f) { if (getClientMajorVersion() < 3 || !extensionEnabled("GL_EXT_color_buffer_float")) { @@ -221,7 +189,7 @@ TEST_P(BlendMinMaxTest, RGBA32F) return; } - runTest(GL_RGBA32F, GL_FLOAT); + runTest(GL_RGBA32F); } TEST_P(BlendMinMaxTest, RGBA16F) @@ -240,16 +208,21 @@ TEST_P(BlendMinMaxTest, RGBA16F) return; } - runTest(GL_RGBA16F, GL_FLOAT); + // TODO(geofflang): This fails because readpixels with UNSIGNED_BYTE/RGBA does not work with + // half float buffers (http://anglebug.com/1288) + if (GetParam().getRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE) + { + std::cout << "Test skipped on OpenGL ES targets." << std::endl; + return; + } + + runTest(GL_RGBA16F); } // Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against. ANGLE_INSTANTIATE_TEST(BlendMinMaxTest, ES2_D3D9(), ES2_D3D11(), - ES3_D3D11(), ES2_D3D11_FL9_3(), ES2_OPENGL(), - ES3_OPENGL(), - ES2_OPENGLES(), - ES3_OPENGLES()); + ES2_OPENGLES()); diff --git a/gfx/angle/src/tests/gl_tests/BufferDataTest.cpp b/gfx/angle/src/tests/gl_tests/BufferDataTest.cpp index 7707a4a56..572cce9c8 100755 --- a/gfx/angle/src/tests/gl_tests/BufferDataTest.cpp +++ b/gfx/angle/src/tests/gl_tests/BufferDataTest.cpp @@ -5,7 +5,6 @@ // #include "test_utils/ANGLETest.h" -#include "test_utils/gl_raii.h" #include @@ -448,8 +447,24 @@ class BufferDataOverflowTest : public ANGLETest { protected: BufferDataOverflowTest() + : mProgram(0) { } + + ~BufferDataOverflowTest() + { + if (!mBuffers.empty()) + { + glDeleteBuffers(static_cast(mBuffers.size()), &mBuffers[0]); + } + if (mProgram != 0u) + { + glDeleteProgram(mProgram); + } + } + + std::vector mBuffers; + GLuint mProgram; }; // See description above. @@ -457,9 +472,9 @@ TEST_P(BufferDataOverflowTest, VertexBufferIntegerOverflow) { // These values are special, to trigger the rounding bug. unsigned int numItems = 0x7FFFFFE; - constexpr GLsizei bufferCnt = 8; + GLsizei bufferCnt = 8; - std::vector buffers(bufferCnt); + mBuffers.resize(bufferCnt); std::stringstream vertexShaderStr; @@ -487,27 +502,30 @@ TEST_P(BufferDataOverflowTest, VertexBufferIntegerOverflow) " gl_FragColor = vec4(v_attrib, 0, 0, 1);\n" "}"; - ANGLE_GL_PROGRAM(program, vertexShaderStr.str(), fragmentShader); - glUseProgram(program.get()); + mProgram = CompileProgram(vertexShaderStr.str(), fragmentShader); + ASSERT_NE(0u, mProgram); + glUseProgram(mProgram); + + glGenBuffers(bufferCnt, &mBuffers[0]); std::vector data(numItems, 1.0f); for (GLsizei bufferIndex = 0; bufferIndex < bufferCnt; ++bufferIndex) { - glBindBuffer(GL_ARRAY_BUFFER, buffers[bufferIndex].get()); + glBindBuffer(GL_ARRAY_BUFFER, mBuffers[bufferIndex]); glBufferData(GL_ARRAY_BUFFER, numItems * sizeof(float), &data[0], GL_DYNAMIC_DRAW); std::stringstream attribNameStr; attribNameStr << "attrib" << bufferIndex; - GLint attribLocation = glGetAttribLocation(program.get(), attribNameStr.str().c_str()); + GLint attribLocation = glGetAttribLocation(mProgram, attribNameStr.str().c_str()); ASSERT_NE(-1, attribLocation); glVertexAttribPointer(attribLocation, 1, GL_FLOAT, GL_FALSE, 4, nullptr); glEnableVertexAttribArray(attribLocation); } - GLint positionLocation = glGetAttribLocation(program.get(), "position"); + GLint positionLocation = glGetAttribLocation(mProgram, "position"); ASSERT_NE(-1, positionLocation); glDisableVertexAttribArray(positionLocation); glVertexAttrib2f(positionLocation, 1.0f, 1.0f); @@ -517,28 +535,6 @@ TEST_P(BufferDataOverflowTest, VertexBufferIntegerOverflow) EXPECT_GL_ERROR(GL_OUT_OF_MEMORY); } -// Tests a security bug in our CopyBufferSubData validation (integer overflow). -TEST_P(BufferDataOverflowTest, CopySubDataValidation) -{ - GLBuffer readBuffer, writeBuffer; - - glBindBuffer(GL_COPY_READ_BUFFER, readBuffer.get()); - glBindBuffer(GL_COPY_WRITE_BUFFER, writeBuffer.get()); - - constexpr int bufSize = 100; - - glBufferData(GL_COPY_READ_BUFFER, bufSize, nullptr, GL_STATIC_DRAW); - glBufferData(GL_COPY_WRITE_BUFFER, bufSize, nullptr, GL_STATIC_DRAW); - - GLintptr big = std::numeric_limits::max() - bufSize + 90; - - glCopyBufferSubData(GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER, big, 0, 50); - EXPECT_GL_ERROR(GL_INVALID_VALUE); - - glCopyBufferSubData(GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER, 0, big, 50); - EXPECT_GL_ERROR(GL_INVALID_VALUE); -} - ANGLE_INSTANTIATE_TEST(BufferDataOverflowTest, ES3_D3D11()); #endif // _WIN64 diff --git a/gfx/angle/src/tests/gl_tests/CopyCompressedTextureTest.cpp b/gfx/angle/src/tests/gl_tests/CopyCompressedTextureTest.cpp deleted file mode 100644 index 4d4151949..000000000 --- a/gfx/angle/src/tests/gl_tests/CopyCompressedTextureTest.cpp +++ /dev/null @@ -1,369 +0,0 @@ -// -// Copyright 2016 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. -// - -// CopyCompressedTextureTest.cpp: Tests of the GL_CHROMIUM_copy_compressed_texture extension - -#include "test_utils/ANGLETest.h" - -namespace angle -{ - -class CopyCompressedTextureTest : public ANGLETest -{ - protected: - CopyCompressedTextureTest() - { - setWindowWidth(256); - setWindowHeight(256); - setConfigRedBits(8); - setConfigGreenBits(8); - setConfigBlueBits(8); - setConfigAlphaBits(8); - } - - void SetUp() override - { - ANGLETest::SetUp(); - - glGenTextures(2, mTextures); - - mProgram = CompileProgram( - "attribute vec2 a_position;\n" - "varying vec2 v_texcoord;\n" - "void main()\n" - "{\n" - " gl_Position = vec4(a_position, 0.0, 1.0);\n" - " v_texcoord = (a_position + 1.0) * 0.5;\n" - "}\n", - "precision mediump float;\n" - "uniform sampler2D u_texture;\n" - "varying vec2 v_texcoord;\n" - "void main()\n" - "{\n" - " gl_FragColor = texture2D(u_texture, v_texcoord);\n" - "}\n"); - ASSERT_NE(0u, mProgram); - - if (extensionEnabled("GL_CHROMIUM_copy_compressed_texture")) - { - glCompressedCopyTextureCHROMIUM = - reinterpret_cast( - eglGetProcAddress("glCompressedCopyTextureCHROMIUM")); - } - } - - void TearDown() override - { - glDeleteTextures(2, mTextures); - glDeleteProgram(mProgram); - - ANGLETest::TearDown(); - } - - bool checkExtensions() const - { - if (!extensionEnabled("GL_CHROMIUM_copy_compressed_texture")) - { - std::cout - << "Test skipped because GL_CHROMIUM_copy_compressed_texture is not available." - << std::endl; - return false; - } - - EXPECT_NE(nullptr, glCompressedCopyTextureCHROMIUM); - if (glCompressedCopyTextureCHROMIUM == nullptr) - { - return false; - } - - return true; - } - - GLuint mProgram = 0; - GLuint mTextures[2] = {0, 0}; - - PFNGLCOMPRESSEDCOPYTEXTURECHROMIUMPROC glCompressedCopyTextureCHROMIUM = nullptr; -}; - -namespace -{ - -const GLColor &CompressedImageColor = GLColor::red; - -// Single compressed ATC block of source pixels all set to: -// CompressedImageColor. -const uint8_t CompressedImageATC[8] = {0x0, 0x7c, 0x0, 0xf8, 0x55, 0x55, 0x55, 0x55}; - -// Single compressed ATCIA block of source pixels all set to: -// CompressedImageColor. -const uint8_t CompressedImageATCIA[16] = {0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x7c, 0x0, 0xf8, 0x55, 0x55, 0x55, 0x55}; - -// Single compressed DXT1 block of source pixels all set to: -// CompressedImageColor. -const uint8_t CompressedImageDXT1[8] = {0x00, 0xf8, 0x00, 0xf8, 0xaa, 0xaa, 0xaa, 0xaa}; - -// Single compressed DXT5 block of source pixels all set to: -// CompressedImageColor. -const uint8_t CompressedImageDXT5[16] = {0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0xf8, 0x0, 0xf8, 0xaa, 0xaa, 0xaa, 0xaa}; - -// Single compressed DXT1 block of source pixels all set to: -// CompressedImageColor. -const uint8_t CompressedImageETC1[8] = {0x0, 0x0, 0xf8, 0x2, 0xff, 0xff, 0x0, 0x0}; - -} // anonymous namespace - -// Test to ensure that the basic functionality of the extension works. -TEST_P(CopyCompressedTextureTest, Basic) -{ - if (!checkExtensions()) - { - return; - } - - if (!extensionEnabled("GL_EXT_texture_compression_dxt1")) - { - std::cout << "Test skipped because GL_EXT_texture_compression_dxt1 is not available." - << std::endl; - return; - } - - glBindTexture(GL_TEXTURE_2D, mTextures[0]); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 0, - sizeof(CompressedImageDXT1), CompressedImageDXT1); - ASSERT_GL_NO_ERROR(); - - glBindTexture(GL_TEXTURE_2D, mTextures[1]); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glCompressedCopyTextureCHROMIUM(mTextures[0], mTextures[1]); - ASSERT_GL_NO_ERROR(); - - // Load texture. - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, mTextures[1]); - GLint textureLoc = glGetUniformLocation(mProgram, "u_texture"); - glUseProgram(mProgram); - glUniform1i(textureLoc, 0); - - // Draw. - drawQuad(mProgram, "a_position", 0.5f); - - EXPECT_PIXEL_COLOR_EQ(getWindowWidth() / 2, getWindowHeight() / 2, CompressedImageColor); - ASSERT_GL_NO_ERROR(); -} - -// Test validation of compressed formats -TEST_P(CopyCompressedTextureTest, InternalFormat) -{ - if (!checkExtensions()) - { - return; - } - - struct Data - { - GLint format; - const uint8_t *data; - GLsizei dataSize; - - Data() : Data(GL_NONE, nullptr, 0) {} - Data(GLint format, const uint8_t *data, GLsizei dataSize) - : format(format), data(data), dataSize(dataSize) - { - } - }; - std::vector supportedFormats; - - if (extensionEnabled("GL_AMD_compressed_ATC_texture")) - { - supportedFormats.push_back( - Data(GL_ATC_RGB_AMD, CompressedImageATC, sizeof(CompressedImageATC))); - supportedFormats.push_back(Data(GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD, CompressedImageATCIA, - sizeof(CompressedImageATCIA))); - } - if (extensionEnabled("GL_EXT_texture_compression_dxt1")) - { - supportedFormats.push_back(Data(GL_COMPRESSED_RGB_S3TC_DXT1_EXT, CompressedImageDXT1, - sizeof(CompressedImageDXT1))); - } - if (extensionEnabled("GL_ANGLE_texture_compression_dxt5")) - { - supportedFormats.push_back(Data(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, CompressedImageDXT5, - sizeof(CompressedImageDXT5))); - } - if (extensionEnabled("GL_OES_compressed_ETC1_RGB8_texture")) - { - supportedFormats.push_back( - Data(GL_ETC1_RGB8_OES, CompressedImageETC1, sizeof(CompressedImageETC1))); - } - - for (const auto &supportedFormat : supportedFormats) - { - glBindTexture(GL_TEXTURE_2D, mTextures[0]); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glCompressedTexImage2D(GL_TEXTURE_2D, 0, supportedFormat.format, 4, 4, 0, - supportedFormat.dataSize, supportedFormat.data); - ASSERT_GL_NO_ERROR(); - - glBindTexture(GL_TEXTURE_2D, mTextures[1]); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glCompressedCopyTextureCHROMIUM(mTextures[0], mTextures[1]); - ASSERT_GL_NO_ERROR(); - } -} - -// Test that uncompressed textures generate errors when copying -TEST_P(CopyCompressedTextureTest, InternalFormatNotSupported) -{ - if (!checkExtensions()) - { - return; - } - - glBindTexture(GL_TEXTURE_2D, mTextures[0]); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, &GLColor::red); - ASSERT_GL_NO_ERROR(); - - glBindTexture(GL_TEXTURE_2D, mTextures[1]); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - ASSERT_GL_NO_ERROR(); - - // Check that the GL_RGBA format reports an error. - glCompressedCopyTextureCHROMIUM(mTextures[0], mTextures[1]); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); -} - -// Test validation of texture IDs -TEST_P(CopyCompressedTextureTest, InvalidTextureIds) -{ - if (!checkExtensions()) - { - return; - } - - glBindTexture(GL_TEXTURE_2D, mTextures[0]); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 0, - sizeof(CompressedImageDXT1), CompressedImageDXT1); - ASSERT_GL_NO_ERROR(); - - glBindTexture(GL_TEXTURE_2D, mTextures[1]); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - ASSERT_GL_NO_ERROR(); - - glCompressedCopyTextureCHROMIUM(mTextures[0], 99993); - EXPECT_GL_ERROR(GL_INVALID_VALUE); - - glCompressedCopyTextureCHROMIUM(99994, mTextures[1]); - EXPECT_GL_ERROR(GL_INVALID_VALUE); - - glCompressedCopyTextureCHROMIUM(99995, 99996); - EXPECT_GL_ERROR(GL_INVALID_VALUE); - - glCompressedCopyTextureCHROMIUM(mTextures[0], mTextures[1]); - EXPECT_GL_NO_ERROR(); -} - -// Test that only 2D textures are valid -TEST_P(CopyCompressedTextureTest, BindingPoints) -{ - if (!checkExtensions()) - { - return; - } - - glBindTexture(GL_TEXTURE_CUBE_MAP, mTextures[0]); - glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - for (GLenum face = GL_TEXTURE_CUBE_MAP_POSITIVE_X; face <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z; - face++) - { - glCompressedTexImage2D(face, 0, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 0, - sizeof(CompressedImageDXT1), CompressedImageDXT1); - } - ASSERT_GL_NO_ERROR(); - - glBindTexture(GL_TEXTURE_CUBE_MAP, mTextures[1]); - glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - ASSERT_GL_NO_ERROR(); - - glCompressedCopyTextureCHROMIUM(mTextures[0], mTextures[1]); - EXPECT_GL_ERROR(GL_INVALID_VALUE); -} - -// Test the destination texture cannot be immutable -TEST_P(CopyCompressedTextureTest, Immutable) -{ - if (!checkExtensions() || getClientMajorVersion() < 3) - { - return; - } - - glBindTexture(GL_TEXTURE_2D, mTextures[0]); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 0, - sizeof(CompressedImageDXT1), CompressedImageDXT1); - ASSERT_GL_NO_ERROR(); - - glBindTexture(GL_TEXTURE_2D, mTextures[1]); - glTexStorage2D(GL_TEXTURE_2D, 1, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - ASSERT_GL_NO_ERROR(); - - glCompressedCopyTextureCHROMIUM(mTextures[0], mTextures[1]); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); -} - -// Use this to select which configurations (e.g. which renderer, which GLES major version) these -// tests should be run against. -ANGLE_INSTANTIATE_TEST(CopyCompressedTextureTest, - ES2_D3D9(), - ES2_D3D11(), - ES3_D3D11(), - ES2_OPENGL(), - ES3_OPENGL(), - ES2_OPENGLES(), - ES3_OPENGLES()); - -} // namespace angle diff --git a/gfx/angle/src/tests/gl_tests/D3D11EmulatedIndexedBufferTest.cpp b/gfx/angle/src/tests/gl_tests/D3D11EmulatedIndexedBufferTest.cpp index c26cf0e08..5cdcb96cc 100755 --- a/gfx/angle/src/tests/gl_tests/D3D11EmulatedIndexedBufferTest.cpp +++ b/gfx/angle/src/tests/gl_tests/D3D11EmulatedIndexedBufferTest.cpp @@ -35,10 +35,9 @@ class D3D11EmulatedIndexedBufferTest : public ANGLETest rx::Context11 *context11 = rx::GetImplAs(context); mRenderer = context11->getRenderer(); - mSourceBuffer = new rx::Buffer11(mBufferState, mRenderer); + mSourceBuffer = new rx::Buffer11(mRenderer); GLfloat testData[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f }; - gl::Error error = - mSourceBuffer->setData(GL_ARRAY_BUFFER, testData, sizeof(testData), GL_STATIC_DRAW); + gl::Error error = mSourceBuffer->setData(testData, sizeof(testData), GL_STATIC_DRAW); ASSERT_FALSE(error.isError()); mTranslatedAttribute.baseOffset = 0; @@ -127,7 +126,6 @@ class D3D11EmulatedIndexedBufferTest : public ANGLETest std::vector mubyteIndices; std::vector muintIndices; std::vector mushortIndices; - gl::BufferState mBufferState; }; // This tests that a GL_UNSIGNED_BYTE indices list can be successfully expanded @@ -164,8 +162,7 @@ TEST_P(D3D11EmulatedIndexedBufferTest, TestNativeToExpandedUsingGLuintIndices) TEST_P(D3D11EmulatedIndexedBufferTest, TestSourceBufferRemainsUntouchedAfterExpandOperation) { // Copy the original source buffer before any expand calls have been made - gl::BufferState cleanSourceState; - rx::Buffer11 *cleanSourceBuffer = new rx::Buffer11(cleanSourceState, mRenderer); + rx::Buffer11 *cleanSourceBuffer = new rx::Buffer11(mRenderer); cleanSourceBuffer->copySubData(mSourceBuffer, 0, 0, mSourceBuffer->getSize()); // Do a basic exanded and compare test. diff --git a/gfx/angle/src/tests/gl_tests/D3D11FormatTablesTest.cpp b/gfx/angle/src/tests/gl_tests/D3D11FormatTablesTest.cpp index e407d1190..1876e3b34 100755 --- a/gfx/angle/src/tests/gl_tests/D3D11FormatTablesTest.cpp +++ b/gfx/angle/src/tests/gl_tests/D3D11FormatTablesTest.cpp @@ -11,7 +11,6 @@ #include "libANGLE/Context.h" #include "libANGLE/formatutils.h" #include "libANGLE/renderer/d3d/d3d11/Context11.h" -#include "libANGLE/renderer/d3d/d3d11/dxgi_support_table.h" #include "libANGLE/renderer/d3d/d3d11/formatutils11.h" #include "libANGLE/renderer/d3d/d3d11/Renderer11.h" #include "libANGLE/renderer/d3d/d3d11/texture_format_table.h" @@ -66,22 +65,13 @@ TEST_P(D3D11FormatTablesTest, TestFormatSupport) } } - UINT texSupport = 0; + UINT texSupport; bool texSuccess = SUCCEEDED(device->CheckFormatSupport(formatInfo.texFormat, &texSupport)); bool textureable = texSuccess && ((texSupport & texSupportMask) == texSupportMask); EXPECT_EQ(textureable, textureInfo.texturable); - // Bits for mipmap auto-gen. - bool expectedMipGen = texSuccess && ((texSupport & D3D11_FORMAT_SUPPORT_MIP_AUTOGEN) != 0); - auto featureLevel = renderer->getRenderer11DeviceCaps().featureLevel; - const auto &dxgiSupport = rx::d3d11::GetDXGISupport(formatInfo.texFormat, featureLevel); - bool actualMipGen = - ((dxgiSupport.alwaysSupportedFlags & D3D11_FORMAT_SUPPORT_MIP_AUTOGEN) != 0); - EXPECT_EQ(0u, dxgiSupport.optionallySupportedFlags & D3D11_FORMAT_SUPPORT_MIP_AUTOGEN); - EXPECT_EQ(expectedMipGen, actualMipGen); - // Bits for filtering - UINT filterSupport = 0; + UINT filterSupport; bool filterSuccess = SUCCEEDED(device->CheckFormatSupport(formatInfo.srvFormat, &filterSupport)); bool filterable = filterSuccess && ((filterSupport & D3D11_FORMAT_SUPPORT_SHADER_SAMPLE) != 0); diff --git a/gfx/angle/src/tests/gl_tests/D3DTextureTest.cpp b/gfx/angle/src/tests/gl_tests/D3DTextureTest.cpp deleted file mode 100644 index 028b24a81..000000000 --- a/gfx/angle/src/tests/gl_tests/D3DTextureTest.cpp +++ /dev/null @@ -1,326 +0,0 @@ -// -// 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. -// -// D3DTextureTest: -// Tests of the EGL_ANGLE_d3d_texture_client_buffer extension - -#include "test_utils/ANGLETest.h" - -#include -#include - -#include "com_utils.h" - -namespace angle -{ - -class D3DTextureTest : public ANGLETest -{ - protected: - D3DTextureTest() - { - setWindowWidth(128); - setWindowHeight(128); - setConfigRedBits(8); - setConfigGreenBits(8); - setConfigBlueBits(8); - setConfigAlphaBits(8); - } - - void SetUp() override - { - ANGLETest::SetUp(); - - // clang-format off - const std::string vsSource = SHADER_SOURCE - ( - precision highp float; - attribute vec4 position; - varying vec2 texcoord; - - void main() - { - gl_Position = position; - texcoord = (position.xy * 0.5) + 0.5; - texcoord.y = 1.0 - texcoord.y; - } - ); - - const std::string textureFSSource = SHADER_SOURCE - ( - precision highp float; - uniform sampler2D tex; - varying vec2 texcoord; - - void main() - { - gl_FragColor = texture2D(tex, texcoord); - } - ); - // clang-format on - - mTextureProgram = CompileProgram(vsSource, textureFSSource); - ASSERT_NE(0u, mTextureProgram) << "shader compilation failed."; - - mTextureUniformLocation = glGetUniformLocation(mTextureProgram, "tex"); - ASSERT_NE(-1, mTextureUniformLocation); - - mD3D11Module = LoadLibrary(TEXT("d3d11.dll")); - ASSERT_NE(nullptr, mD3D11Module); - - PFN_D3D11_CREATE_DEVICE createDeviceFunc = reinterpret_cast( - GetProcAddress(mD3D11Module, "D3D11CreateDevice")); - - EGLWindow *window = getEGLWindow(); - EGLDisplay display = window->getDisplay(); - if (eglDisplayExtensionEnabled(display, "EGL_EXT_device_query")) - { - PFNEGLQUERYDISPLAYATTRIBEXTPROC eglQueryDisplayAttribEXT = - reinterpret_cast( - eglGetProcAddress("eglQueryDisplayAttribEXT")); - PFNEGLQUERYDEVICEATTRIBEXTPROC eglQueryDeviceAttribEXT = - reinterpret_cast( - eglGetProcAddress("eglQueryDeviceAttribEXT")); - - EGLDeviceEXT device = 0; - { - EGLAttrib result = 0; - EXPECT_EGL_TRUE(eglQueryDisplayAttribEXT(display, EGL_DEVICE_EXT, &result)); - device = reinterpret_cast(result); - } - - if (eglDeviceExtensionEnabled(device, "EGL_ANGLE_device_d3d")) - { - EGLAttrib result = 0; - if (eglQueryDeviceAttribEXT(device, EGL_D3D11_DEVICE_ANGLE, &result)) - { - mD3D11Device = reinterpret_cast(result); - mD3D11Device->AddRef(); - } - else if (eglQueryDeviceAttribEXT(device, EGL_D3D9_DEVICE_ANGLE, &result)) - { - mD3D9Device = reinterpret_cast(result); - mD3D9Device->AddRef(); - } - } - } - else - { - ASSERT_TRUE( - SUCCEEDED(createDeviceFunc(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, 0, nullptr, - 0, D3D11_SDK_VERSION, &mD3D11Device, nullptr, nullptr))); - } - } - - void TearDown() override - { - glDeleteProgram(mTextureProgram); - - if (mD3D11Device) - { - mD3D11Device->Release(); - mD3D11Device = nullptr; - } - - FreeLibrary(mD3D11Module); - mD3D11Module = nullptr; - - if (mD3D9Device) - { - mD3D9Device->Release(); - mD3D9Device = nullptr; - } - - ANGLETest::TearDown(); - } - - EGLSurface createPBuffer(size_t width, - size_t height, - EGLint eglTextureFormat, - EGLint eglTextureTarget) - { - EGLWindow *window = getEGLWindow(); - EGLDisplay display = window->getDisplay(); - EGLConfig config = window->getConfig(); - - EGLint attribs[] = { - EGL_TEXTURE_FORMAT, eglTextureFormat, EGL_TEXTURE_TARGET, - eglTextureTarget, EGL_NONE, EGL_NONE, - }; - - if (mD3D11Device) - { - ID3D11Texture2D *texture = nullptr; - CD3D11_TEXTURE2D_DESC desc(DXGI_FORMAT_R8G8B8A8_UNORM, static_cast(width), - static_cast(height), 1, 1, - D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET); - EXPECT_TRUE(SUCCEEDED(mD3D11Device->CreateTexture2D(&desc, nullptr, &texture))); - - EGLSurface pbuffer = eglCreatePbufferFromClientBuffer(display, EGL_D3D_TEXTURE_ANGLE, - texture, config, attribs); - - texture->Release(); - - return pbuffer; - } - else if (mD3D9Device) - { - IDirect3DTexture9 *texture = nullptr; - EXPECT_TRUE(SUCCEEDED(mD3D9Device->CreateTexture( - static_cast(width), static_cast(height), 1, D3DUSAGE_RENDERTARGET, - D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &texture, nullptr))); - - EGLSurface pbuffer = eglCreatePbufferFromClientBuffer(display, EGL_D3D_TEXTURE_ANGLE, - texture, config, attribs); - - texture->Release(); - - return pbuffer; - } - else - { - return EGL_NO_SURFACE; - } - } - - bool valid() const - { - EGLWindow *window = getEGLWindow(); - EGLDisplay display = window->getDisplay(); - if (!eglDisplayExtensionEnabled(display, "EGL_ANGLE_d3d_texture_client_buffer")) - { - std::cout << "Test skipped due to missing EGL_ANGLE_d3d_texture_client_buffer" - << std::endl; - return false; - } - - if (!mD3D11Device && !mD3D9Device) - { - std::cout << "Test skipped due to no D3D devices being available." << std::endl; - return false; - } - - if (IsWindows() && IsAMD() && IsOpenGL()) - { - std::cout << "Test skipped on Windows AMD OpenGL." << std::endl; - return false; - } - - if (IsWindows() && IsIntel() && IsOpenGL()) - { - std::cout << "Test skipped on Windows Intel OpenGL." << std::endl; - return false; - } - return true; - } - - GLuint mTextureProgram; - GLint mTextureUniformLocation; - - HMODULE mD3D11Module = nullptr; - ID3D11Device *mD3D11Device = nullptr; - - IDirect3DDevice9 *mD3D9Device = nullptr; -}; - -// Test creating a pbuffer from a d3d surface and clearing it -TEST_P(D3DTextureTest, Clear) -{ - if (!valid()) - { - return; - } - - EGLWindow *window = getEGLWindow(); - EGLDisplay display = window->getDisplay(); - - const size_t bufferSize = 32; - - EGLSurface pbuffer = createPBuffer(bufferSize, bufferSize, EGL_NO_TEXTURE, EGL_NO_TEXTURE); - ASSERT_EGL_SUCCESS(); - ASSERT_NE(pbuffer, EGL_NO_SURFACE); - - // Apply the Pbuffer and clear it to purple and verify - eglMakeCurrent(display, pbuffer, pbuffer, window->getContext()); - ASSERT_EGL_SUCCESS(); - - glViewport(0, 0, static_cast(bufferSize), static_cast(bufferSize)); - glClearColor(1.0f, 0.0f, 1.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - ASSERT_GL_NO_ERROR(); - EXPECT_PIXEL_EQ(static_cast(bufferSize) / 2, static_cast(bufferSize) / 2, 255, 0, - 255, 255); - - eglDestroySurface(display, pbuffer); -} - -// Test creating a pbuffer from a d3d surface and binding it to a texture -TEST_P(D3DTextureTest, BindTexImage) -{ - if (!valid()) - { - return; - } - - EGLWindow *window = getEGLWindow(); - - const size_t bufferSize = 32; - - EGLSurface pbuffer = createPBuffer(bufferSize, bufferSize, EGL_TEXTURE_RGBA, EGL_TEXTURE_2D); - ASSERT_EGL_SUCCESS(); - ASSERT_NE(pbuffer, EGL_NO_SURFACE); - - // Apply the Pbuffer and clear it to purple - eglMakeCurrent(window->getDisplay(), pbuffer, pbuffer, window->getContext()); - ASSERT_EGL_SUCCESS(); - - glViewport(0, 0, static_cast(bufferSize), static_cast(bufferSize)); - glClearColor(1.0f, 0.0f, 1.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - ASSERT_GL_NO_ERROR(); - - EXPECT_PIXEL_EQ(static_cast(bufferSize) / 2, static_cast(bufferSize) / 2, 255, 0, - 255, 255); - - // Apply the window surface - eglMakeCurrent(window->getDisplay(), window->getSurface(), window->getSurface(), - window->getContext()); - - // Create a texture and bind the Pbuffer to it - GLuint texture = 0; - glGenTextures(1, &texture); - glBindTexture(GL_TEXTURE_2D, texture); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - EXPECT_GL_NO_ERROR(); - - eglBindTexImage(window->getDisplay(), pbuffer, EGL_BACK_BUFFER); - glViewport(0, 0, getWindowWidth(), getWindowHeight()); - ASSERT_EGL_SUCCESS(); - - // Draw a quad and verify that it is purple - glUseProgram(mTextureProgram); - glUniform1i(mTextureUniformLocation, 0); - - drawQuad(mTextureProgram, "position", 0.5f); - EXPECT_GL_NO_ERROR(); - - // Unbind the texture - eglReleaseTexImage(window->getDisplay(), pbuffer, EGL_BACK_BUFFER); - ASSERT_EGL_SUCCESS(); - - // Verify that purple was drawn - EXPECT_PIXEL_EQ(getWindowWidth() / 2, getWindowHeight() / 2, 255, 0, 255, 255); - - glDeleteTextures(1, &texture); -} - -// Use this to select which configurations (e.g. which renderer, which GLES major version) these -// tests should be run against. -ANGLE_INSTANTIATE_TEST(D3DTextureTest, ES2_D3D9(), ES2_D3D11(), ES2_OPENGL()); - -} // namespace diff --git a/gfx/angle/src/tests/gl_tests/DrawBuffersTest.cpp b/gfx/angle/src/tests/gl_tests/DrawBuffersTest.cpp index daf09e93c..48a6b65c9 100755 --- a/gfx/angle/src/tests/gl_tests/DrawBuffersTest.cpp +++ b/gfx/angle/src/tests/gl_tests/DrawBuffersTest.cpp @@ -256,13 +256,6 @@ TEST_P(DrawBuffersTest, Gaps) return; } - if (IsWindows() && IsAMD() && IsDesktopOpenGL()) - { - // TODO(ynovikov): Investigate the failure (http://anglebug.com/1535) - std::cout << "Test disabled on Windows AMD OpenGL." << std::endl; - return; - } - glBindTexture(GL_TEXTURE_2D, mTextures[0]); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, GL_TEXTURE_2D, mTextures[0], 0); @@ -294,13 +287,6 @@ TEST_P(DrawBuffersTest, FirstAndLast) return; } - if (IsWindows() && IsAMD() && IsDesktopOpenGL()) - { - // TODO(ynovikov): Investigate the failure (https://anglebug.com/1533) - std::cout << "Test disabled on Windows AMD OpenGL." << std::endl; - return; - } - glBindTexture(GL_TEXTURE_2D, mTextures[0]); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, mTextures[0], 0); @@ -341,13 +327,6 @@ TEST_P(DrawBuffersTest, FirstHalfNULL) return; } - if (IsWindows() && IsAMD() && IsDesktopOpenGL()) - { - // TODO(ynovikov): Investigate the failure (https://anglebug.com/1533) - std::cout << "Test disabled on Windows AMD OpenGL." << std::endl; - return; - } - bool flags[8] = { false }; GLenum bufs[8] = { GL_NONE }; diff --git a/gfx/angle/src/tests/gl_tests/ETCTextureTest.cpp b/gfx/angle/src/tests/gl_tests/ETCTextureTest.cpp index 24fdd2263..f34ac24b3 100755 --- a/gfx/angle/src/tests/gl_tests/ETCTextureTest.cpp +++ b/gfx/angle/src/tests/gl_tests/ETCTextureTest.cpp @@ -52,7 +52,7 @@ TEST_P(ETCTextureTest, ETC1Validation) glBindTexture(GL_TEXTURE_2D, mTexture); - GLubyte pixel[8] = { 0x0, 0x0, 0xf8, 0x2, 0x43, 0xff, 0x4, 0x12 }; + GLubyte pixel[8] = {0}; glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_ETC1_RGB8_LOSSY_DECODE_ANGLE, 4, 4, 0, sizeof(pixel), pixel); if (supported) @@ -62,12 +62,6 @@ TEST_P(ETCTextureTest, ETC1Validation) glCompressedTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 4, 4, GL_ETC1_RGB8_LOSSY_DECODE_ANGLE, sizeof(pixel), pixel); EXPECT_GL_NO_ERROR(); - - - glCompressedTexImage2D(GL_TEXTURE_2D, 1, GL_ETC1_RGB8_LOSSY_DECODE_ANGLE, 2, 2, 0, - sizeof(pixel), pixel); - glCompressedTexImage2D(GL_TEXTURE_2D, 2, GL_ETC1_RGB8_LOSSY_DECODE_ANGLE, 1, 1, 0, - sizeof(pixel), pixel); } else { diff --git a/gfx/angle/src/tests/gl_tests/GLSLTest.cpp b/gfx/angle/src/tests/gl_tests/GLSLTest.cpp index 00000612d..bdcbc5d20 100755 --- a/gfx/angle/src/tests/gl_tests/GLSLTest.cpp +++ b/gfx/angle/src/tests/gl_tests/GLSLTest.cpp @@ -1063,37 +1063,6 @@ TEST_P(GLSLTest_ES3, MissingReturnArrayOfStructs) EXPECT_NE(0u, program); } -// Verify that functions without return statements still compile -TEST_P(GLSLTest_ES3, MissingReturnStructOfArrays) -{ - // TODO(cwallez) remove the suppression once NVIDIA removes the restriction for - // GLSL >= 300. It was defined only in GLSL 2.0, section 6.1. - if (IsNVIDIA() && IsOpenGLES()) - { - std::cout << "Test skipped on NVIDIA OpenGL ES because it disallows returning " - "structure of arrays" - << std::endl; - return; - } - - const std::string vertexShaderSource = - "#version 300 es\n" - "in float v_varying;\n" - "struct s { float a[2]; int b[2]; vec2 c[2]; };\n" - "s f() { if (v_varying > 0.0) { return s(float[2](1.0, 1.0), int[2](1, 1)," - "vec2[2](vec2(1.0, 1.0), vec2(1.0, 1.0))); } }\n" - "void main() { gl_Position = vec4(f().a[0], 0, 0, 1); }\n"; - - const std::string fragmentShaderSource = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 my_FragColor;\n" - "void main() { my_FragColor = vec4(0, 0, 0, 1); }\n"; - - GLuint program = CompileProgram(vertexShaderSource, fragmentShaderSource); - EXPECT_NE(0u, program); -} - // Verify that using invariant(all) in both shaders fails in ESSL 3.00. TEST_P(GLSLTest_ES3, InvariantAllBoth) { @@ -2241,104 +2210,6 @@ TEST_P(GLSLTest, NestedPowStatements) EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::green); } -// Convers a bug with the unary minus operator on signed integer workaround. -TEST_P(GLSLTest_ES3, UnaryMinusOperatorSignedInt) -{ - const std::string &vert = - "#version 300 es\n" - "in highp vec4 position;\n" - "out mediump vec4 v_color;\n" - "uniform int ui_one;\n" - "uniform int ui_two;\n" - "uniform int ui_three;\n" - "void main() {\n" - " int s[3];\n" - " s[0] = ui_one;\n" - " s[1] = -(-(-ui_two + 1) + 1);\n" // s[1] = -ui_two - " s[2] = ui_three;\n" - " int result = 0;\n" - " for (int i = 0; i < ui_three; i++) {\n" - " result += s[i];\n" - " }\n" - " v_color = (result == 2) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);\n" - " gl_Position = position;\n" - "}\n"; - const std::string &frag = - "#version 300 es\n" - "in mediump vec4 v_color;\n" - "layout(location=0) out mediump vec4 o_color;\n" - "void main() {\n" - " o_color = v_color;\n" - "}\n"; - - ANGLE_GL_PROGRAM(prog, vert, frag); - - gl::Context *context = reinterpret_cast(getEGLWindow()->getContext()); - gl::Program *glProgram = context->getProgram(prog.get()); - GLint oneIndex = glProgram->getUniformLocation("ui_one"); - ASSERT_NE(-1, oneIndex); - GLint twoIndex = glProgram->getUniformLocation("ui_two"); - ASSERT_NE(-1, twoIndex); - GLint threeIndex = glProgram->getUniformLocation("ui_three"); - ASSERT_NE(-1, threeIndex); - glUseProgram(prog.get()); - glUniform1i(oneIndex, 1); - glUniform1i(twoIndex, 2); - glUniform1i(threeIndex, 3); - - drawQuad(prog.get(), "position", 0.5f); - EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::green); -} - -// Convers a bug with the unary minus operator on unsigned integer workaround. -TEST_P(GLSLTest_ES3, UnaryMinusOperatorUnsignedInt) -{ - const std::string &vert = - "#version 300 es\n" - "in highp vec4 position;\n" - "out mediump vec4 v_color;\n" - "uniform uint ui_one;\n" - "uniform uint ui_two;\n" - "uniform uint ui_three;\n" - "void main() {\n" - " uint s[3];\n" - " s[0] = ui_one;\n" - " s[1] = -(-(-ui_two + 1u) + 1u);\n" // s[1] = -ui_two - " s[2] = ui_three;\n" - " uint result = 0u;\n" - " for (uint i = 0u; i < ui_three; i++) {\n" - " result += s[i];\n" - " }\n" - " v_color = (result == 2u) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);\n" - " gl_Position = position;\n" - "}\n"; - const std::string &frag = - "#version 300 es\n" - "in mediump vec4 v_color;\n" - "layout(location=0) out mediump vec4 o_color;\n" - "void main() {\n" - " o_color = v_color;\n" - "}\n"; - - ANGLE_GL_PROGRAM(prog, vert, frag); - - gl::Context *context = reinterpret_cast(getEGLWindow()->getContext()); - gl::Program *glProgram = context->getProgram(prog.get()); - GLint oneIndex = glProgram->getUniformLocation("ui_one"); - ASSERT_NE(-1, oneIndex); - GLint twoIndex = glProgram->getUniformLocation("ui_two"); - ASSERT_NE(-1, twoIndex); - GLint threeIndex = glProgram->getUniformLocation("ui_three"); - ASSERT_NE(-1, threeIndex); - glUseProgram(prog.get()); - glUniform1ui(oneIndex, 1u); - glUniform1ui(twoIndex, 2u); - glUniform1ui(threeIndex, 3u); - - drawQuad(prog.get(), "position", 0.5f); - EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::green); -} - // 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) @@ -2368,65 +2239,6 @@ TEST_P(GLSLTest, NestedSequenceOperatorWithTernaryInside) EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::green); } -// Test that using a sampler2D and samplerExternalOES in the same shader works (anglebug.com/1534) -TEST_P(GLSLTest, ExternalAnd2DSampler) -{ - if (!extensionEnabled("GL_OES_EGL_image_external")) - { - std::cout << "Test skipped because GL_OES_EGL_image_external is not available." - << std::endl; - return; - } - - const std::string fragmentShader = - "precision mediump float;\n" - "uniform samplerExternalOES tex0;\n" - "uniform sampler2D tex1;\n" - "void main(void)\n" - "{\n" - " vec2 uv = vec2(0.0, 0.0);" - " gl_FragColor = texture2D(tex0, uv) + texture2D(tex1, uv);\n" - "}\n"; - - ANGLE_GL_PROGRAM(program, mSimpleVSSource, fragmentShader); -} - -// Test that using an invalid constant right-shift produces an error. -TEST_P(GLSLTest_ES3, FoldedInvalidRightShift) -{ - const std::string &fragmentShader = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 color;\n" - "void main(void)\n" - "{\n" - " int diff = -100 >> -100;\n" - " color = vec4(float(diff));\n" - "}\n"; - - GLuint program = CompileProgram(mSimpleVSSource, fragmentShader); - EXPECT_EQ(0u, program); - glDeleteProgram(program); -} - -// Test that using an invalid constant left-shift produces an error. -TEST_P(GLSLTest_ES3, FoldedInvalidLeftShift) -{ - const std::string &fragmentShader = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 color;\n" - "void main(void)\n" - "{\n" - " int diff = -100 << -100;\n" - " color = vec4(float(diff));\n" - "}\n"; - - GLuint program = CompileProgram(mSimpleVSSource, fragmentShader); - EXPECT_EQ(0u, program); - glDeleteProgram(program); -} - } // anonymous namespace // Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against. diff --git a/gfx/angle/src/tests/gl_tests/MipmapTest.cpp b/gfx/angle/src/tests/gl_tests/MipmapTest.cpp index 2ab9411a8..9691b1820 100755 --- a/gfx/angle/src/tests/gl_tests/MipmapTest.cpp +++ b/gfx/angle/src/tests/gl_tests/MipmapTest.cpp @@ -919,8 +919,6 @@ TEST_P(MipmapTestES3, GenerateMipmapBaseLevel) glBindTexture(GL_TEXTURE_2D, mTexture); - ASSERT(getWindowWidth() == getWindowHeight()); - // Fill level 0 with blue std::vector pixelsBlue(getWindowWidth() * getWindowHeight(), GLColor::blue); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, getWindowWidth(), getWindowHeight(), 0, GL_RGBA, @@ -951,6 +949,14 @@ TEST_P(MipmapTestES3, GenerateMipmapBaseLevel) clearAndDrawQuad(m2DProgram, getWindowWidth() / 4, getWindowHeight() / 4); EXPECT_PIXEL_COLOR_EQ(getWindowWidth() / 8, getWindowHeight() / 8, GLColor::red); + if (IsNVIDIA() && IsOpenGL()) + { + // Observed incorrect rendering on NVIDIA, level zero seems to be incorrectly affected by + // GenerateMipmap. + std::cout << "Test partially skipped on NVIDIA OpenGL." << std::endl; + return; + } + // Draw using level 0. It should still be blue. glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0); clearAndDrawQuad(m2DProgram, getWindowWidth(), getWindowHeight()); diff --git a/gfx/angle/src/tests/gl_tests/MultisampleCompatibilityTest.cpp b/gfx/angle/src/tests/gl_tests/MultisampleCompatibilityTest.cpp index 0edc221d7..30708eeec 100755 --- a/gfx/angle/src/tests/gl_tests/MultisampleCompatibilityTest.cpp +++ b/gfx/angle/src/tests/gl_tests/MultisampleCompatibilityTest.cpp @@ -9,7 +9,6 @@ // #include "test_utils/ANGLETest.h" -#include "test_utils/gl_raii.h" #include "shader_utils.h" using namespace angle; @@ -297,142 +296,5 @@ TEST_P(EXTMultisampleCompatibilityTest, DrawAlphaOneAndResolve) EXPECT_EQ(0, memcmp(results[0].get(), results[2].get(), kResultSize)); } -ANGLE_INSTANTIATE_TEST(EXTMultisampleCompatibilityTest, ES2_OPENGL(), ES2_OPENGLES(), ES3_OPENGL()); -class MultisampleCompatibilityTest : public ANGLETest -{ - - protected: - MultisampleCompatibilityTest() - { - setWindowWidth(64); - setWindowHeight(64); - setConfigRedBits(8); - setConfigBlueBits(8); - setConfigAlphaBits(8); - } - - void prepareForDraw(GLsizei numSamples) - { - // Create a sample buffer. - glGenRenderbuffers(1, &mSampleRB); - glBindRenderbuffer(GL_RENDERBUFFER, mSampleRB); - glRenderbufferStorageMultisampleANGLE(GL_RENDERBUFFER, numSamples, GL_RGBA8, kWidth, - kHeight); - GLint param = 0; - glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_SAMPLES, ¶m); - EXPECT_GE(param, numSamples); - glGenFramebuffers(1, &mSampleFBO); - glBindFramebuffer(GL_FRAMEBUFFER, mSampleFBO); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, mSampleRB); - EXPECT_GLENUM_EQ(GL_FRAMEBUFFER_COMPLETE, glCheckFramebufferStatus(GL_FRAMEBUFFER)); - glBindFramebuffer(GL_FRAMEBUFFER, 0); - // Create another FBO to resolve the multisample buffer into. - glGenTextures(1, &mResolveTex); - glBindTexture(GL_TEXTURE_2D, mResolveTex); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, kWidth, kHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, - NULL); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glGenFramebuffers(1, &mResolveFBO); - glBindFramebuffer(GL_FRAMEBUFFER, mResolveFBO); - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, mResolveTex, 0); - EXPECT_GLENUM_EQ(GL_FRAMEBUFFER_COMPLETE, glCheckFramebufferStatus(GL_FRAMEBUFFER)); - glViewport(0, 0, kWidth, kHeight); - glBindFramebuffer(GL_FRAMEBUFFER, mSampleFBO); - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - ASSERT_GL_NO_ERROR(); - } - - void prepareForVerify() - { - // Resolve. - glBindFramebuffer(GL_READ_FRAMEBUFFER, mSampleFBO); - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, mResolveFBO); - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - glBlitFramebufferANGLE(0, 0, kWidth, kHeight, 0, 0, kWidth, kHeight, GL_COLOR_BUFFER_BIT, - GL_NEAREST); - glBindFramebuffer(GL_READ_FRAMEBUFFER, mResolveFBO); - - ASSERT_GL_NO_ERROR(); - } - - void cleanup() - { - glBindFramebuffer(GL_FRAMEBUFFER, 0); - glDeleteFramebuffers(1, &mResolveFBO); - glDeleteFramebuffers(1, &mSampleFBO); - glDeleteTextures(1, &mResolveTex); - glDeleteRenderbuffers(1, &mSampleRB); - - ASSERT_GL_NO_ERROR(); - } - - bool isApplicable() const - { - return extensionEnabled("GL_ANGLE_framebuffer_multisample") && - extensionEnabled("GL_OES_rgb8_rgba8"); - } - - GLuint mSampleFBO; - GLuint mResolveFBO; - GLuint mSampleRB; - GLuint mResolveTex; -}; - -// Test that enabling GL_SAMPLE_COVERAGE affects rendering. -TEST_P(MultisampleCompatibilityTest, DrawCoverageAndResolve) -{ - if (!isApplicable()) - return; - - // TODO: Figure out why this fails on Android. - if (IsAndroid()) - { - std::cout << "Test skipped on Android." << std::endl; - return; - } - - const std::string &vertex = - "attribute vec4 position;\n" - "void main()\n" - "{ gl_Position = position; }"; - const std::string &fragment = - "void main()\n" - "{ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); }"; - - ANGLE_GL_PROGRAM(drawRed, vertex, fragment); - - GLsizei maxSamples = 0; - glGetIntegerv(GL_MAX_SAMPLES, &maxSamples); - int iterationCount = maxSamples + 1; - for (int samples = 1; samples < iterationCount; samples++) - { - prepareForDraw(samples); - glEnable(GL_SAMPLE_COVERAGE); - glSampleCoverage(1.0, false); - drawQuad(drawRed.get(), "position", 0.5f); - - prepareForVerify(); - GLsizei pixelCount = kWidth * kHeight; - std::vector actual(pixelCount, GLColor::black); - glReadPixels(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, actual.data()); - glDisable(GL_SAMPLE_COVERAGE); - cleanup(); - - std::vector expected(pixelCount, GLColor::red); - EXPECT_EQ(expected, actual); - } -} - -ANGLE_INSTANTIATE_TEST(MultisampleCompatibilityTest, - ES2_D3D9(), - ES2_OPENGL(), - ES2_OPENGLES(), - ES3_D3D11(), - ES3_OPENGL(), - ES3_OPENGLES()); \ No newline at end of file +ANGLE_INSTANTIATE_TEST(EXTMultisampleCompatibilityTest, ES2_OPENGL(), ES2_OPENGLES(), ES3_OPENGL()); \ No newline at end of file diff --git a/gfx/angle/src/tests/gl_tests/ReadPixelsTest.cpp b/gfx/angle/src/tests/gl_tests/ReadPixelsTest.cpp index 47d2e3dba..2a9fe8e5a 100755 --- a/gfx/angle/src/tests/gl_tests/ReadPixelsTest.cpp +++ b/gfx/angle/src/tests/gl_tests/ReadPixelsTest.cpp @@ -32,7 +32,7 @@ class ReadPixelsTest : public ANGLETest } }; -// Test out of bounds framebuffer reads. +// Test out of bounds reads. TEST_P(ReadPixelsTest, OutOfBounds) { // TODO: re-enable once root cause of http://anglebug.com/1413 is fixed @@ -49,17 +49,26 @@ TEST_P(ReadPixelsTest, OutOfBounds) GLsizei pixelsWidth = 32; GLsizei pixelsHeight = 32; GLint offset = 16; - std::vector pixels((pixelsWidth + offset) * (pixelsHeight + offset)); + std::vector pixels((pixelsWidth + offset) * (pixelsHeight + offset) * 4); glReadPixels(-offset, -offset, pixelsWidth + offset, pixelsHeight + offset, GL_RGBA, GL_UNSIGNED_BYTE, &pixels[0]); EXPECT_GL_NO_ERROR(); - // Expect that all pixels which fell within the framebuffer are red for (int y = pixelsHeight / 2; y < pixelsHeight; y++) { for (int x = pixelsWidth / 2; x < pixelsWidth; x++) { - EXPECT_EQ(GLColor::red, pixels[y * (pixelsWidth + offset) + x]); + const GLubyte* pixel = &pixels[0] + ((y * (pixelsWidth + offset) + x) * 4); + unsigned int r = static_cast(pixel[0]); + unsigned int g = static_cast(pixel[1]); + unsigned int b = static_cast(pixel[2]); + unsigned int a = static_cast(pixel[3]); + + // Expect that all pixels which fell within the framebuffer are red + EXPECT_EQ(255u, r); + EXPECT_EQ(0u, g); + EXPECT_EQ(0u, b); + EXPECT_EQ(255u, a); } } } @@ -74,22 +83,16 @@ class ReadPixelsPBOTest : public ReadPixelsTest ANGLETest::SetUp(); glGenBuffers(1, &mPBO); - glGenFramebuffers(1, &mFBO); - - Reset(4 * getWindowWidth() * getWindowHeight(), 4, 1); - } - - void Reset(GLuint bufferSize, GLuint fboWidth, GLuint fboHeight) - { glBindBuffer(GL_PIXEL_PACK_BUFFER, mPBO); - glBufferData(GL_PIXEL_PACK_BUFFER, bufferSize, nullptr, GL_STATIC_DRAW); + glBufferData(GL_PIXEL_PACK_BUFFER, 4 * getWindowWidth() * getWindowHeight(), nullptr, + GL_STATIC_DRAW); glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); - glDeleteTextures(1, &mTexture); glGenTextures(1, &mTexture); glBindTexture(GL_TEXTURE_2D, mTexture); - glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA8, fboWidth, fboHeight); + glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA8, 4, 1); + glGenFramebuffers(1, &mFBO); glBindFramebuffer(GL_FRAMEBUFFER, mFBO); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, mTexture, 0); glBindFramebuffer(GL_FRAMEBUFFER, 0); @@ -106,60 +109,11 @@ class ReadPixelsPBOTest : public ReadPixelsTest ANGLETest::TearDown(); } - GLuint mPBO = 0; - GLuint mTexture = 0; - GLuint mFBO = 0; + GLuint mPBO; + GLuint mTexture; + GLuint mFBO; }; -// Test basic usage of PBOs. -TEST_P(ReadPixelsPBOTest, Basic) -{ - glClearColor(1.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - EXPECT_GL_NO_ERROR(); - - glBindBuffer(GL_PIXEL_PACK_BUFFER, mPBO); - glReadPixels(0, 0, 16, 16, GL_RGBA, GL_UNSIGNED_BYTE, 0); - - GLvoid *mappedPtr = glMapBufferRange(GL_PIXEL_PACK_BUFFER, 0, 32, GL_MAP_READ_BIT); - GLColor *dataColor = static_cast(mappedPtr); - EXPECT_GL_NO_ERROR(); - - EXPECT_EQ(GLColor::red, dataColor[0]); - - glUnmapBuffer(GL_PIXEL_PACK_BUFFER); - EXPECT_GL_NO_ERROR(); -} - -// Test an error is generated when the PBO is too small. -TEST_P(ReadPixelsPBOTest, PBOTooSmall) -{ - Reset(4 * 16 * 16 - 1, 16, 16); - - glClearColor(1.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - EXPECT_GL_NO_ERROR(); - - glBindBuffer(GL_PIXEL_PACK_BUFFER, mPBO); - glReadPixels(0, 0, 16, 16, GL_RGBA, GL_UNSIGNED_BYTE, 0); - - EXPECT_GL_ERROR(GL_INVALID_OPERATION); -} - -// Test an error is generated when the PBO is mapped. -TEST_P(ReadPixelsPBOTest, PBOMapped) -{ - glClearColor(1.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - EXPECT_GL_NO_ERROR(); - - glBindBuffer(GL_PIXEL_PACK_BUFFER, mPBO); - glMapBufferRange(GL_PIXEL_PACK_BUFFER, 0, 32, GL_MAP_READ_BIT); - glReadPixels(0, 0, 16, 16, GL_RGBA, GL_UNSIGNED_BYTE, 0); - - EXPECT_GL_ERROR(GL_INVALID_OPERATION); -} - // Test that binding a PBO to ARRAY_BUFFER works as expected. TEST_P(ReadPixelsPBOTest, ArrayBufferTarget) { @@ -174,10 +128,13 @@ TEST_P(ReadPixelsPBOTest, ArrayBufferTarget) glBindBuffer(GL_ARRAY_BUFFER, mPBO); GLvoid *mappedPtr = glMapBufferRange(GL_ARRAY_BUFFER, 0, 32, GL_MAP_READ_BIT); - GLColor *dataColor = static_cast(mappedPtr); + unsigned char *dataPtr = static_cast(mappedPtr); EXPECT_GL_NO_ERROR(); - EXPECT_EQ(GLColor::red, dataColor[0]); + EXPECT_EQ(255, dataPtr[0]); + EXPECT_EQ(0, dataPtr[1]); + EXPECT_EQ(0, dataPtr[2]); + EXPECT_EQ(255, dataPtr[3]); glUnmapBuffer(GL_ARRAY_BUFFER); EXPECT_GL_NO_ERROR(); @@ -209,15 +166,21 @@ TEST_P(ReadPixelsPBOTest, ExistingDataPreserved) // Read 16x16 region from green backbuffer to PBO at offset 16 glReadPixels(0, 0, 16, 16, GL_RGBA, GL_UNSIGNED_BYTE, reinterpret_cast(16)); - GLvoid *mappedPtr = glMapBufferRange(GL_PIXEL_PACK_BUFFER, 0, 32, GL_MAP_READ_BIT); - GLColor *dataColor = static_cast(mappedPtr); + GLvoid * mappedPtr = glMapBufferRange(GL_PIXEL_PACK_BUFFER, 0, 32, GL_MAP_READ_BIT); + unsigned char *dataPtr = static_cast(mappedPtr); EXPECT_GL_NO_ERROR(); // Test pixel 0 is red (existing data) - EXPECT_EQ(GLColor::red, dataColor[0]); + EXPECT_EQ(255, dataPtr[0]); + EXPECT_EQ(0, dataPtr[1]); + EXPECT_EQ(0, dataPtr[2]); + EXPECT_EQ(255, dataPtr[3]); // Test pixel 16 is green (new data) - EXPECT_EQ(GLColor::green, dataColor[16]); + EXPECT_EQ(0, dataPtr[16 * 4 + 0]); + EXPECT_EQ(255, dataPtr[16 * 4 + 1]); + EXPECT_EQ(0, dataPtr[16 * 4 + 2]); + EXPECT_EQ(255, dataPtr[16 * 4 + 3]); glUnmapBuffer(GL_PIXEL_PACK_BUFFER); EXPECT_GL_NO_ERROR(); @@ -239,11 +202,14 @@ TEST_P(ReadPixelsPBOTest, SubDataPreservesContents) glBindBuffer(GL_ARRAY_BUFFER, mPBO); glBufferSubData(GL_ARRAY_BUFFER, 0, 4, data); - GLvoid *mappedPtr = glMapBufferRange(GL_ARRAY_BUFFER, 0, 32, GL_MAP_READ_BIT); - GLColor *dataColor = static_cast(mappedPtr); + GLvoid *mappedPtr = glMapBufferRange(GL_ARRAY_BUFFER, 0, 32, GL_MAP_READ_BIT); + unsigned char *dataPtr = static_cast(mappedPtr); EXPECT_GL_NO_ERROR(); - EXPECT_EQ(GLColor(1, 2, 3, 4), dataColor[0]); + EXPECT_EQ(1, dataPtr[0]); + EXPECT_EQ(2, dataPtr[1]); + EXPECT_EQ(3, dataPtr[2]); + EXPECT_EQ(4, dataPtr[3]); glUnmapBuffer(GL_ARRAY_BUFFER); EXPECT_GL_NO_ERROR(); @@ -272,12 +238,19 @@ TEST_P(ReadPixelsPBOTest, SubDataOffsetPreservesContents) glBindBuffer(GL_ARRAY_BUFFER, mPBO); glBufferSubData(GL_ARRAY_BUFFER, 16, 4, data); - GLvoid *mappedPtr = glMapBufferRange(GL_ARRAY_BUFFER, 0, 32, GL_MAP_READ_BIT); - GLColor *dataColor = static_cast(mappedPtr); + GLvoid *mappedPtr = glMapBufferRange(GL_ARRAY_BUFFER, 0, 32, GL_MAP_READ_BIT); + unsigned char *dataPtr = static_cast(mappedPtr); EXPECT_GL_NO_ERROR(); - EXPECT_EQ(GLColor::red, dataColor[0]); - EXPECT_EQ(GLColor(1, 2, 3, 4), dataColor[4]); + EXPECT_EQ(255, dataPtr[0]); + EXPECT_EQ(0, dataPtr[1]); + EXPECT_EQ(0, dataPtr[2]); + EXPECT_EQ(255, dataPtr[3]); + + EXPECT_EQ(1, dataPtr[16]); + EXPECT_EQ(2, dataPtr[17]); + EXPECT_EQ(3, dataPtr[18]); + EXPECT_EQ(4, dataPtr[19]); glUnmapBuffer(GL_ARRAY_BUFFER); EXPECT_GL_NO_ERROR(); @@ -331,9 +304,10 @@ class ReadPixelsPBODrawTest : public ReadPixelsPBOTest // Test that we can draw with PBO data. TEST_P(ReadPixelsPBODrawTest, DrawWithPBO) { - GLColor color(1, 2, 3, 4); + unsigned char data[4] = { 1, 2, 3, 4 }; + glBindTexture(GL_TEXTURE_2D, mTexture); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &color); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, data); EXPECT_GL_NO_ERROR(); glBindFramebuffer(GL_READ_FRAMEBUFFER, mFBO); @@ -370,11 +344,14 @@ TEST_P(ReadPixelsPBODrawTest, DrawWithPBO) glDrawArrays(GL_POINTS, 0, 1); EXPECT_GL_NO_ERROR(); - color = GLColor(0, 0, 0, 0); - glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &color); + memset(data, 0, 4); + glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, data); EXPECT_GL_NO_ERROR(); - EXPECT_EQ(GLColor(1, 2, 3, 4), color); + EXPECT_EQ(1, data[0]); + EXPECT_EQ(2, data[1]); + EXPECT_EQ(3, data[2]); + EXPECT_EQ(4, data[3]); } class ReadPixelsMultisampleTest : public ReadPixelsTest diff --git a/gfx/angle/src/tests/gl_tests/RobustClientMemoryTest.cpp b/gfx/angle/src/tests/gl_tests/RobustClientMemoryTest.cpp deleted file mode 100644 index b5f89e904..000000000 --- a/gfx/angle/src/tests/gl_tests/RobustClientMemoryTest.cpp +++ /dev/null @@ -1,385 +0,0 @@ -// -// Copyright 2016 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. -// - -// RobustClientMemoryTest.cpp : Tests of the GL_ANGLE_robust_client_memory extension. - -#include "test_utils/ANGLETest.h" - -#include "test_utils/gl_raii.h" - -namespace angle -{ -class RobustClientMemoryTest : public ANGLETest -{ - protected: - RobustClientMemoryTest() - { - setWindowWidth(128); - setWindowHeight(128); - setConfigRedBits(8); - setConfigGreenBits(8); - setConfigBlueBits(8); - setConfigAlphaBits(8); - } - - void SetUp() override - { - ANGLETest::SetUp(); - - glGetBooleanvRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetBooleanvRobustANGLE")); - glGetBufferParameterivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetBufferParameterivRobustANGLE")); - glGetFloatvRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetFloatvRobustANGLE")); - glGetFramebufferAttachmentParameterivRobustANGLE = - reinterpret_cast( - eglGetProcAddress("glGetFramebufferAttachmentParameterivRobustANGLE")); - glGetIntegervRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetIntegervRobustANGLE")); - glGetProgramivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetProgramivRobustANGLE")); - glGetRenderbufferParameterivRobustANGLE = - reinterpret_cast( - eglGetProcAddress("glGetRenderbufferParameterivRobustANGLE")); - glGetShaderivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetShaderivRobustANGLE")); - glGetTexParameterfvRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetTexParameterfvRobustANGLE")); - glGetTexParameterivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetTexParameterivRobustANGLE")); - glGetUniformfvRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetUniformfvRobustANGLE")); - glGetUniformivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetUniformivRobustANGLE")); - glGetVertexAttribfvRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetVertexAttribfvRobustANGLE")); - glGetVertexAttribivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetVertexAttribivRobustANGLE")); - glGetVertexAttribPointervRobustANGLE = - reinterpret_cast( - eglGetProcAddress("glGetVertexAttribPointervRobustANGLE")); - glReadPixelsRobustANGLE = reinterpret_cast( - eglGetProcAddress("glReadPixelsRobustANGLE")); - glTexImage2DRobustANGLE = reinterpret_cast( - eglGetProcAddress("glTexImage2DRobustANGLE")); - glTexParameterfvRobustANGLE = reinterpret_cast( - eglGetProcAddress("glTexParameterfvRobustANGLE")); - glTexParameterivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glTexParameterivRobustANGLE")); - glTexSubImage2DRobustANGLE = reinterpret_cast( - eglGetProcAddress("glTexSubImage2DRobustANGLE")); - glTexImage3DRobustANGLE = reinterpret_cast( - eglGetProcAddress("glTexImage3DRobustANGLE")); - glTexSubImage3DRobustANGLE = reinterpret_cast( - eglGetProcAddress("glTexSubImage3DRobustANGLE")); - glGetQueryivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetQueryivRobustANGLE")); - glGetQueryObjectuivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetQueryObjectuivRobustANGLE")); - glGetBufferPointervRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetBufferPointervRobustANGLE")); - glGetIntegeri_vRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetIntegeri_vRobustANGLE")); - glGetInternalformativRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetInternalformativRobustANGLE")); - glGetVertexAttribIivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetVertexAttribIivRobustANGLE")); - glGetVertexAttribIuivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetVertexAttribIuivRobustANGLE")); - glGetUniformuivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetUniformuivRobustANGLE")); - glGetActiveUniformBlockivRobustANGLE = - reinterpret_cast( - eglGetProcAddress("glGetActiveUniformBlockivRobustANGLE")); - glGetInteger64vRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetInteger64vRobustANGLE")); - glGetInteger64i_vRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetInteger64i_vRobustANGLE")); - glGetBufferParameteri64vRobustANGLE = - reinterpret_cast( - eglGetProcAddress("glGetBufferParameteri64vRobustANGLE")); - glSamplerParameterivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glSamplerParameterivRobustANGLE")); - glSamplerParameterfvRobustANGLE = reinterpret_cast( - eglGetProcAddress("glSamplerParameterfvRobustANGLE")); - glGetSamplerParameterivRobustANGLE = - reinterpret_cast( - eglGetProcAddress("glGetSamplerParameterivRobustANGLE")); - glGetSamplerParameterfvRobustANGLE = - reinterpret_cast( - eglGetProcAddress("glGetSamplerParameterfvRobustANGLE")); - glGetFramebufferParameterivRobustANGLE = - reinterpret_cast( - eglGetProcAddress("glGetFramebufferParameterivRobustANGLE")); - glGetProgramInterfaceivRobustANGLE = - reinterpret_cast( - eglGetProcAddress("glGetProgramInterfaceivRobustANGLE")); - glGetBooleani_vRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetBooleani_vRobustANGLE")); - glGetMultisamplefvRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetMultisamplefvRobustANGLE")); - glGetTexLevelParameterivRobustANGLE = - reinterpret_cast( - eglGetProcAddress("glGetTexLevelParameterivRobustANGLE")); - glGetTexLevelParameterfvRobustANGLE = - reinterpret_cast( - eglGetProcAddress("glGetTexLevelParameterfvRobustANGLE")); - glGetPointervRobustANGLERobustANGLE = - reinterpret_cast( - eglGetProcAddress("glGetPointervRobustANGLERobustANGLE")); - glReadnPixelsRobustANGLE = reinterpret_cast( - eglGetProcAddress("glReadnPixelsRobustANGLE")); - glGetnUniformfvRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetnUniformfvRobustANGLE")); - glGetnUniformivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetnUniformivRobustANGLE")); - glGetnUniformuivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetnUniformuivRobustANGLE")); - glTexParameterIivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glTexParameterIivRobustANGLE")); - glTexParameterIuivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glTexParameterIuivRobustANGLE")); - glGetTexParameterIivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetTexParameterIivRobustANGLE")); - glGetTexParameterIuivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetTexParameterIuivRobustANGLE")); - glSamplerParameterIivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glSamplerParameterIivRobustANGLE")); - glSamplerParameterIuivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glSamplerParameterIuivRobustANGLE")); - glGetSamplerParameterIivRobustANGLE = - reinterpret_cast( - eglGetProcAddress("glGetSamplerParameterIivRobustANGLE")); - glGetSamplerParameterIuivRobustANGLE = - reinterpret_cast( - eglGetProcAddress("glGetSamplerParameterIuivRobustANGLE")); - glGetQueryObjectivRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetQueryObjectivRobustANGLE")); - glGetQueryObjecti64vRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetQueryObjecti64vRobustANGLE")); - glGetQueryObjectui64vRobustANGLE = reinterpret_cast( - eglGetProcAddress("glGetQueryObjectui64vRobustANGLE")); - } - - void TearDown() override { ANGLETest::TearDown(); } - - bool extensionsPresent() const - { - if (!extensionEnabled("GL_ANGLE_robust_client_memory")) - { - std::cout << "Test skipped because GL_ANGLE_robust_client_memory is not available."; - return false; - } - - return true; - } - - PFNGLGETBOOLEANVROBUSTANGLE glGetBooleanvRobustANGLE = nullptr; - PFNGLGETBUFFERPARAMETERIVROBUSTANGLE glGetBufferParameterivRobustANGLE = nullptr; - PFNGLGETFLOATVROBUSTANGLE glGetFloatvRobustANGLE = nullptr; - PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVROBUSTANGLE - glGetFramebufferAttachmentParameterivRobustANGLE = nullptr; - PFNGLGETINTEGERVROBUSTANGLE glGetIntegervRobustANGLE = nullptr; - PFNGLGETPROGRAMIVROBUSTANGLE glGetProgramivRobustANGLE = nullptr; - PFNGLGETRENDERBUFFERPARAMETERIVROBUSTANGLE glGetRenderbufferParameterivRobustANGLE = nullptr; - PFNGLGETSHADERIVROBUSTANGLE glGetShaderivRobustANGLE = nullptr; - PFNGLGETTEXPARAMETERFVROBUSTANGLE glGetTexParameterfvRobustANGLE = nullptr; - PFNGLGETTEXPARAMETERIVROBUSTANGLE glGetTexParameterivRobustANGLE = nullptr; - PFNGLGETUNIFORMFVROBUSTANGLE glGetUniformfvRobustANGLE = nullptr; - PFNGLGETUNIFORMIVROBUSTANGLE glGetUniformivRobustANGLE = nullptr; - PFNGLGETVERTEXATTRIBFVROBUSTANGLE glGetVertexAttribfvRobustANGLE = nullptr; - PFNGLGETVERTEXATTRIBIVROBUSTANGLE glGetVertexAttribivRobustANGLE = nullptr; - PFNGLGETVERTEXATTRIBPOINTERVROBUSTANGLE glGetVertexAttribPointervRobustANGLE = nullptr; - PFNGLREADPIXELSROBUSTANGLE glReadPixelsRobustANGLE = nullptr; - PFNGLTEXIMAGE2DROBUSTANGLE glTexImage2DRobustANGLE = nullptr; - PFNGLTEXPARAMETERFVROBUSTANGLE glTexParameterfvRobustANGLE = nullptr; - PFNGLTEXPARAMETERIVROBUSTANGLE glTexParameterivRobustANGLE = nullptr; - PFNGLTEXSUBIMAGE2DROBUSTANGLE glTexSubImage2DRobustANGLE = nullptr; - PFNGLTEXIMAGE3DROBUSTANGLE glTexImage3DRobustANGLE = nullptr; - PFNGLTEXSUBIMAGE3DROBUSTANGLE glTexSubImage3DRobustANGLE = nullptr; - PFNGLGETQUERYIVROBUSTANGLE glGetQueryivRobustANGLE = nullptr; - PFNGLGETQUERYOBJECTUIVROBUSTANGLE glGetQueryObjectuivRobustANGLE = nullptr; - PFNGLGETBUFFERPOINTERVROBUSTANGLE glGetBufferPointervRobustANGLE = nullptr; - PFNGLGETINTEGERI_VROBUSTANGLE glGetIntegeri_vRobustANGLE = nullptr; - PFNGETINTERNALFORMATIVROBUSTANGLE glGetInternalformativRobustANGLE = nullptr; - PFNGLGETVERTEXATTRIBIIVROBUSTANGLE glGetVertexAttribIivRobustANGLE = nullptr; - PFNGLGETVERTEXATTRIBIUIVROBUSTANGLE glGetVertexAttribIuivRobustANGLE = nullptr; - PFNGLGETUNIFORMUIVROBUSTANGLE glGetUniformuivRobustANGLE = nullptr; - PFNGLGETACTIVEUNIFORMBLOCKIVROBUSTANGLE glGetActiveUniformBlockivRobustANGLE = nullptr; - PFNGLGETINTEGER64VROBUSTANGLE glGetInteger64vRobustANGLE = nullptr; - PFNGLGETINTEGER64I_VROBUSTANGLE glGetInteger64i_vRobustANGLE = nullptr; - PFNGLGETBUFFERPARAMETERI64VROBUSTANGLE glGetBufferParameteri64vRobustANGLE = nullptr; - PFNGLSAMPLERPARAMETERIVROBUSTANGLE glSamplerParameterivRobustANGLE = nullptr; - PFNGLSAMPLERPARAMETERFVROBUSTANGLE glSamplerParameterfvRobustANGLE = nullptr; - PFNGLGETSAMPLERPARAMETERIVROBUSTANGLE glGetSamplerParameterivRobustANGLE = nullptr; - PFNGLGETSAMPLERPARAMETERFVROBUSTANGLE glGetSamplerParameterfvRobustANGLE = nullptr; - PFNGLGETFRAMEBUFFERPARAMETERIVROBUSTANGLE glGetFramebufferParameterivRobustANGLE = nullptr; - PFNGLGETPROGRAMINTERFACEIVROBUSTANGLE glGetProgramInterfaceivRobustANGLE = nullptr; - PFNGLGETBOOLEANI_VROBUSTANGLE glGetBooleani_vRobustANGLE = nullptr; - PFNGLGETMULTISAMPLEFVROBUSTANGLE glGetMultisamplefvRobustANGLE = nullptr; - PFNGLGETTEXLEVELPARAMETERIVROBUSTANGLE glGetTexLevelParameterivRobustANGLE = nullptr; - PFNGLGETTEXLEVELPARAMETERFVROBUSTANGLE glGetTexLevelParameterfvRobustANGLE = nullptr; - PFNGLGETPOINTERVROBUSTANGLEROBUSTANGLE glGetPointervRobustANGLERobustANGLE = nullptr; - PFNGLREADNPIXELSROBUSTANGLE glReadnPixelsRobustANGLE = nullptr; - PFNGLGETNUNIFORMFVROBUSTANGLE glGetnUniformfvRobustANGLE = nullptr; - PFNGLGETNUNIFORMIVROBUSTANGLE glGetnUniformivRobustANGLE = nullptr; - PFNGLGETNUNIFORMUIVROBUSTANGLE glGetnUniformuivRobustANGLE = nullptr; - PFNGLTEXPARAMETERIIVROBUSTANGLE glTexParameterIivRobustANGLE = nullptr; - PFNGLTEXPARAMETERIUIVROBUSTANGLE glTexParameterIuivRobustANGLE = nullptr; - PFNGLGETTEXPARAMETERIIVROBUSTANGLE glGetTexParameterIivRobustANGLE = nullptr; - PFNGLGETTEXPARAMETERIUIVROBUSTANGLE glGetTexParameterIuivRobustANGLE = nullptr; - PFNGLSAMPLERPARAMETERIIVROBUSTANGLE glSamplerParameterIivRobustANGLE = nullptr; - PFNGLSAMPLERPARAMETERIUIVROBUSTANGLE glSamplerParameterIuivRobustANGLE = nullptr; - PFNGLGETSAMPLERPARAMETERIIVROBUSTANGLE glGetSamplerParameterIivRobustANGLE = nullptr; - PFNGLGETSAMPLERPARAMETERIUIVROBUSTANGLE glGetSamplerParameterIuivRobustANGLE = nullptr; - PFNGLGETQUERYOBJECTIVROBUSTANGLE glGetQueryObjectivRobustANGLE = nullptr; - PFNGLGETQUERYOBJECTI64VROBUSTANGLE glGetQueryObjecti64vRobustANGLE = nullptr; - PFNGLGETQUERYOBJECTUI64VROBUSTANGLE glGetQueryObjectui64vRobustANGLE = nullptr; -}; - -// Test basic usage and validation of glGetIntegervRobustANGLE -TEST_P(RobustClientMemoryTest, GetInteger) -{ - if (!extensionsPresent()) - { - return; - } - - // Verify that the robust and regular entry points return the same values - GLint resultRobust; - GLsizei length; - glGetIntegervRobustANGLE(GL_MAX_VERTEX_ATTRIBS, 1, &length, &resultRobust); - EXPECT_GL_NO_ERROR(); - EXPECT_EQ(1, length); - - GLint resultRegular; - glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &resultRegular); - EXPECT_GL_NO_ERROR(); - EXPECT_EQ(resultRegular, resultRobust); - - // Query a dynamic value - GLint numCompressedFormats; - glGetIntegervRobustANGLE(GL_NUM_COMPRESSED_TEXTURE_FORMATS, 1, &length, &numCompressedFormats); - ASSERT_GL_NO_ERROR(); - EXPECT_EQ(1, length); - - if (numCompressedFormats > 0) - { - std::vector resultBuf(numCompressedFormats * 2, 0); - - // Test when the bufSize is too low - glGetIntegervRobustANGLE(GL_COMPRESSED_TEXTURE_FORMATS, numCompressedFormats - 1, &length, - resultBuf.data()); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); - EXPECT_TRUE(std::all_of(resultBuf.begin(), resultBuf.end(), - [](GLint value) { return value == 0; })); - - // Make sure the GL doesn't touch the end of the buffer - glGetIntegervRobustANGLE(GL_COMPRESSED_TEXTURE_FORMATS, - static_cast(resultBuf.size()), &length, resultBuf.data()); - EXPECT_GL_NO_ERROR(); - EXPECT_EQ(numCompressedFormats, length); - EXPECT_TRUE(std::none_of(resultBuf.begin(), resultBuf.begin() + length, - [](GLint value) { return value == 0; })); - EXPECT_TRUE(std::all_of(resultBuf.begin() + length, resultBuf.end(), - [](GLint value) { return value == 0; })); - } - - // Test with null length - glGetIntegervRobustANGLE(GL_MAX_VARYING_VECTORS, 1, nullptr, &resultRobust); - EXPECT_GL_NO_ERROR(); - - glGetIntegervRobustANGLE(GL_MAX_VIEWPORT_DIMS, 1, nullptr, &resultRobust); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); - - GLint maxViewportDims[2]; - glGetIntegervRobustANGLE(GL_MAX_VIEWPORT_DIMS, 2, nullptr, maxViewportDims); - EXPECT_GL_NO_ERROR(); -} - -// Test basic usage and validation of glTexImage2DRobustANGLE -TEST_P(RobustClientMemoryTest, TexImage2D) -{ - if (!extensionsPresent()) - { - return; - } - GLTexture tex; - glBindTexture(GL_TEXTURE_2D, tex.get()); - - GLsizei dataDimension = 1024; - std::vector rgbaData(dataDimension * dataDimension * 4); - - // Test the regular case - glTexImage2DRobustANGLE(GL_TEXTURE_2D, 0, GL_RGBA, dataDimension, dataDimension, 0, GL_RGBA, - GL_UNSIGNED_BYTE, static_cast(rgbaData.size()), - rgbaData.data()); - EXPECT_GL_NO_ERROR(); - - // Test with a data size that is too small - glTexImage2DRobustANGLE(GL_TEXTURE_2D, 0, GL_RGBA, dataDimension, dataDimension, 0, GL_RGBA, - GL_UNSIGNED_BYTE, static_cast(rgbaData.size()) / 2, - rgbaData.data()); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); - - if (getClientMajorVersion() >= 3) - { - // Set an unpack parameter that would cause the driver to read past the end of the buffer - glPixelStorei(GL_UNPACK_ROW_LENGTH, dataDimension + 1); - glTexImage2DRobustANGLE(GL_TEXTURE_2D, 0, GL_RGBA, dataDimension, dataDimension, 0, GL_RGBA, - GL_UNSIGNED_BYTE, static_cast(rgbaData.size()), - rgbaData.data()); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); - } -} - -// Test basic usage and validation of glReadPixelsRobustANGLE -TEST_P(RobustClientMemoryTest, ReadPixels) -{ - if (!extensionsPresent()) - { - return; - } - - GLsizei dataDimension = 16; - std::vector rgbaData(dataDimension * dataDimension * 4); - - // Test the regular case - GLsizei length = 0; - glReadPixelsRobustANGLE(0, 0, dataDimension, dataDimension, GL_RGBA, GL_UNSIGNED_BYTE, - static_cast(rgbaData.size()), &length, rgbaData.data()); - EXPECT_GL_NO_ERROR(); - EXPECT_EQ(static_cast(rgbaData.size()), length); - - // Test with a data size that is too small - glReadPixelsRobustANGLE(0, 0, dataDimension, dataDimension, GL_RGBA, GL_UNSIGNED_BYTE, - static_cast(rgbaData.size()) - 1, &length, rgbaData.data()); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); - - if (getClientMajorVersion() >= 3) - { - // Set a pack parameter that would cause the driver to write past the end of the buffer - glPixelStorei(GL_PACK_ROW_LENGTH, dataDimension + 1); - glReadPixelsRobustANGLE(0, 0, dataDimension, dataDimension, GL_RGBA, GL_UNSIGNED_BYTE, - static_cast(rgbaData.size()), &length, rgbaData.data()); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); - } -} - -// Use this to select which configurations (e.g. which renderer, which GLES major version) these -// tests should be run against. -ANGLE_INSTANTIATE_TEST(RobustClientMemoryTest, - ES2_D3D9(), - ES2_D3D11(), - ES3_D3D11(), - ES2_D3D11_FL9_3(), - ES2_OPENGL(), - ES3_OPENGL(), - ES2_OPENGLES(), - ES3_OPENGLES()); - -} // namespace diff --git a/gfx/angle/src/tests/gl_tests/SRGBFramebufferTest.cpp b/gfx/angle/src/tests/gl_tests/SRGBFramebufferTest.cpp deleted file mode 100644 index 47ff2f3e0..000000000 --- a/gfx/angle/src/tests/gl_tests/SRGBFramebufferTest.cpp +++ /dev/null @@ -1,141 +0,0 @@ -// -// Copyright 2016 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. -// - -// SRGBFramebufferTest.cpp: Tests of sRGB framebuffer functionality. - -#include "test_utils/ANGLETest.h" -#include "test_utils/gl_raii.h" - -namespace angle -{ - -class SRGBFramebufferTest : public ANGLETest -{ - protected: - SRGBFramebufferTest() - { - setWindowWidth(128); - setWindowHeight(128); - setConfigRedBits(8); - setConfigGreenBits(8); - setConfigBlueBits(8); - setConfigAlphaBits(8); - } - - void SetUp() override - { - ANGLETest::SetUp(); - - const std::string vs = - "precision highp float;\n" - "attribute vec4 position;\n" - "void main()\n" - "{\n" - " gl_Position = vec4(position.xy, 0.0, 1.0);\n" - "}\n"; - - const std::string fs = - "precision highp float;\n" - "uniform vec4 color;\n" - "void main()\n" - "{\n" - " gl_FragColor = color;\n" - "}\n"; - - mProgram = CompileProgram(vs, fs); - ASSERT_NE(0u, mProgram); - - mColorLocation = glGetUniformLocation(mProgram, "color"); - ASSERT_NE(-1, mColorLocation); - } - - void TearDown() override - { - glDeleteProgram(mProgram); - - ANGLETest::TearDown(); - } - - GLuint mProgram = 0; - GLint mColorLocation = -1; -}; - -// Test basic validation of GL_EXT_sRGB_write_control -TEST_P(SRGBFramebufferTest, Validation) -{ - GLenum expectedError = - extensionEnabled("GL_EXT_sRGB_write_control") ? GL_NO_ERROR : GL_INVALID_ENUM; - - GLboolean value = GL_FALSE; - glEnable(GL_FRAMEBUFFER_SRGB_EXT); - EXPECT_GL_ERROR(expectedError); - - glGetBooleanv(GL_FRAMEBUFFER_SRGB_EXT, &value); - EXPECT_GL_ERROR(expectedError); - if (expectedError == GL_NO_ERROR) - { - EXPECT_EQ(GL_TRUE, value); - } - - glDisable(GL_FRAMEBUFFER_SRGB_EXT); - EXPECT_GL_ERROR(expectedError); - - glGetBooleanv(GL_FRAMEBUFFER_SRGB_EXT, &value); - EXPECT_GL_ERROR(expectedError); - if (expectedError == GL_NO_ERROR) - { - EXPECT_EQ(GL_FALSE, value); - } -} - -// Test basic functionality of GL_EXT_sRGB_write_control -TEST_P(SRGBFramebufferTest, BasicUsage) -{ - if (!extensionEnabled("GL_EXT_sRGB_write_control") || - (!extensionEnabled("GL_EXT_sRGB") && getClientMajorVersion() < 3)) - { - std::cout - << "Test skipped because GL_EXT_sRGB_write_control and GL_EXT_sRGB are not available." - << std::endl; - return; - } - - GLColor linearColor(64, 127, 191, 255); - GLColor srgbColor(13, 54, 133, 255); - - GLTexture texture; - glBindTexture(GL_TEXTURE_2D, texture.get()); - glTexImage2D(GL_TEXTURE_2D, 0, GL_SRGB_ALPHA_EXT, 1, 1, 0, GL_SRGB_ALPHA_EXT, GL_UNSIGNED_BYTE, - nullptr); - - GLFramebuffer framebuffer; - glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.get()); - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture.get(), 0); - - glUseProgram(mProgram); - glUniform4fv(mColorLocation, 1, srgbColor.toNormalizedVector().data()); - - glEnable(GL_FRAMEBUFFER_SRGB_EXT); - drawQuad(mProgram, "position", 0.5f); - EXPECT_PIXEL_COLOR_NEAR(0, 0, linearColor, 1.0); - - glDisable(GL_FRAMEBUFFER_SRGB_EXT); - drawQuad(mProgram, "position", 0.5f); - EXPECT_PIXEL_COLOR_NEAR(0, 0, srgbColor, 1.0); -} - -// Use this to select which configurations (e.g. which renderer, which GLES major version) these -// tests should be run against. -ANGLE_INSTANTIATE_TEST(SRGBFramebufferTest, - ES2_D3D9(), - ES2_D3D11(), - ES3_D3D11(), - ES2_OPENGL(), - ES3_OPENGL(), - ES2_OPENGLES(), - ES3_OPENGLES()); - -} // namespace angle diff --git a/gfx/angle/src/tests/gl_tests/SRGBTextureTest.cpp b/gfx/angle/src/tests/gl_tests/SRGBTextureTest.cpp index f379f429f..5346f6de1 100755 --- a/gfx/angle/src/tests/gl_tests/SRGBTextureTest.cpp +++ b/gfx/angle/src/tests/gl_tests/SRGBTextureTest.cpp @@ -5,9 +5,10 @@ // #include "test_utils/ANGLETest.h" -#include "test_utils/gl_raii.h" -namespace angle +using namespace angle; + +namespace { class SRGBTextureTest : public ANGLETest @@ -26,44 +27,12 @@ class SRGBTextureTest : public ANGLETest void SetUp() override { ANGLETest::SetUp(); - - const std::string vs = - "precision highp float;\n" - "attribute vec4 position;\n" - "varying vec2 texcoord;\n" - "\n" - "void main()\n" - "{\n" - " gl_Position = vec4(position.xy, 0.0, 1.0);\n" - " texcoord = (position.xy * 0.5) + 0.5;\n" - "}\n"; - - const std::string fs = - "precision highp float;\n" - "uniform sampler2D tex;\n" - "varying vec2 texcoord;\n" - "\n" - "void main()\n" - "{\n" - " gl_FragColor = texture2D(tex, texcoord);\n" - "}\n"; - - mProgram = CompileProgram(vs, fs); - ASSERT_NE(0u, mProgram); - - mTextureLocation = glGetUniformLocation(mProgram, "tex"); - ASSERT_NE(-1, mTextureLocation); } void TearDown() override { - glDeleteProgram(mProgram); - ANGLETest::TearDown(); } - - GLuint mProgram = 0; - GLint mTextureLocation = -1; }; TEST_P(SRGBTextureTest, SRGBValidation) @@ -174,95 +143,12 @@ TEST_P(SRGBTextureTest, SRGBARenderbuffer) glDeleteRenderbuffers(1, &rbo); } -// Verify that if the srgb decode extension is available, srgb textures are too -TEST_P(SRGBTextureTest, SRGBDecodeExtensionAvailability) -{ - bool hasSRGBDecode = extensionEnabled("GL_EXT_texture_sRGB_decode"); - if (hasSRGBDecode) - { - bool hasSRGBTextures = extensionEnabled("GL_EXT_sRGB") || getClientMajorVersion() >= 3; - EXPECT_TRUE(hasSRGBTextures); - } -} - -// Test basic functionality of SRGB decode using the texture parameter -TEST_P(SRGBTextureTest, SRGBDecodeTextureParameter) -{ - if (!extensionEnabled("GL_EXT_texture_sRGB_decode")) - { - std::cout << "Test skipped because GL_EXT_texture_sRGB_decode is not available." - << std::endl; - return; - } - - GLColor linearColor(64, 127, 191, 255); - GLColor srgbColor(13, 54, 133, 255); - - GLTexture tex; - glBindTexture(GL_TEXTURE_2D, tex.get()); - glTexImage2D(GL_TEXTURE_2D, 0, GL_SRGB_ALPHA_EXT, 1, 1, 0, GL_SRGB_ALPHA_EXT, GL_UNSIGNED_BYTE, - &linearColor); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SRGB_DECODE_EXT, GL_DECODE_EXT); - ASSERT_GL_NO_ERROR(); - - glUseProgram(mProgram); - glUniform1i(mTextureLocation, 0); - - glDisable(GL_DEPTH_TEST); - drawQuad(mProgram, "position", 0.5f); - - EXPECT_PIXEL_COLOR_NEAR(0, 0, srgbColor, 1.0); - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SRGB_DECODE_EXT, GL_SKIP_DECODE_EXT); - drawQuad(mProgram, "position", 0.5f); - - EXPECT_PIXEL_COLOR_NEAR(0, 0, linearColor, 1.0); -} - -// Test basic functionality of SRGB decode using the sampler parameter -TEST_P(SRGBTextureTest, SRGBDecodeSamplerParameter) -{ - if (!extensionEnabled("GL_EXT_texture_sRGB_decode") || getClientMajorVersion() < 3) - { - std::cout << "Test skipped because GL_EXT_texture_sRGB_decode or ES3 is not available." - << std::endl; - return; - } - - GLColor linearColor(64, 127, 191, 255); - GLColor srgbColor(13, 54, 133, 255); - - GLTexture tex; - glBindTexture(GL_TEXTURE_2D, tex.get()); - glTexImage2D(GL_TEXTURE_2D, 0, GL_SRGB_ALPHA_EXT, 1, 1, 0, GL_SRGB_ALPHA_EXT, GL_UNSIGNED_BYTE, - &linearColor); - ASSERT_GL_NO_ERROR(); - - GLSampler sampler; - glBindSampler(0, sampler.get()); - glSamplerParameteri(sampler.get(), GL_TEXTURE_SRGB_DECODE_EXT, GL_DECODE_EXT); - - glUseProgram(mProgram); - glUniform1i(mTextureLocation, 0); - - glDisable(GL_DEPTH_TEST); - drawQuad(mProgram, "position", 0.5f); - - EXPECT_PIXEL_COLOR_NEAR(0, 0, srgbColor, 1.0); - - glSamplerParameteri(sampler.get(), GL_TEXTURE_SRGB_DECODE_EXT, GL_SKIP_DECODE_EXT); - drawQuad(mProgram, "position", 0.5f); - - EXPECT_PIXEL_COLOR_NEAR(0, 0, linearColor, 1.0); -} // Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against. ANGLE_INSTANTIATE_TEST(SRGBTextureTest, ES2_D3D9(), ES2_D3D11(), ES3_D3D11(), ES2_OPENGL(), - ES3_OPENGL(), - ES2_OPENGLES(), - ES3_OPENGLES()); + ES2_OPENGLES()); } // namespace diff --git a/gfx/angle/src/tests/gl_tests/SwizzleTest.cpp b/gfx/angle/src/tests/gl_tests/SwizzleTest.cpp index b1ad13102..946dae0be 100755 --- a/gfx/angle/src/tests/gl_tests/SwizzleTest.cpp +++ b/gfx/angle/src/tests/gl_tests/SwizzleTest.cpp @@ -399,37 +399,6 @@ TEST_P(SwizzleIntegerTest, RGB8UI_2D) runTest2D(); } -// Test that updating the texture data still generates the correct swizzles -TEST_P(SwizzleTest, SubUpdate) -{ - GLColor data(1, 64, 128, 200); - init2DTexture(GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, &data); - - glUseProgram(mProgram); - glBindTexture(GL_TEXTURE_2D, mTexture); - glUniform1i(mTextureUniformLocation, 0); - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, GL_RED); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_G, GL_RED); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, GL_RED); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, GL_RED); - - glClear(GL_COLOR_BUFFER_BIT); - drawQuad(mProgram, "position", 0.5f); - - GLColor expectedData(data.R, data.R, data.R, data.R); - EXPECT_PIXEL_COLOR_EQ(0, 0, expectedData); - - GLColor updateData(32, 234, 28, 232); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &updateData); - - glClear(GL_COLOR_BUFFER_BIT); - drawQuad(mProgram, "position", 0.5f); - - GLColor expectedUpdateData(updateData.R, updateData.R, updateData.R, updateData.R); - EXPECT_PIXEL_COLOR_EQ(0, 0, expectedUpdateData); -} - // Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against. ANGLE_INSTANTIATE_TEST(SwizzleTest, ES3_D3D11(), ES3_OPENGL(), ES3_OPENGL(3, 3), ES3_OPENGLES()); ANGLE_INSTANTIATE_TEST(SwizzleIntegerTest, diff --git a/gfx/angle/src/tests/gl_tests/TextureTest.cpp b/gfx/angle/src/tests/gl_tests/TextureTest.cpp index ee2fc7ca9..1242e0300 100755 --- a/gfx/angle/src/tests/gl_tests/TextureTest.cpp +++ b/gfx/angle/src/tests/gl_tests/TextureTest.cpp @@ -4,7 +4,6 @@ // found in the LICENSE file. // -#include "common/mathutil.h" #include "test_utils/ANGLETest.h" #include "test_utils/gl_raii.h" @@ -14,24 +13,24 @@ namespace { // Take a pixel, and reset the components not covered by the format to default -// values. In particular, the default value for the alpha component is 255 +// values. In particular, the default value for the alpha component is 65535 // (1.0 as unsigned normalized fixed point value). -GLColor SliceFormatColor(GLenum format, GLColor full) +GLColor16 SliceFormatColor16(GLenum format, GLColor16 full) { switch (format) { case GL_RED: - return GLColor(full.R, 0, 0, 255u); + return GLColor16(full.R, 0, 0, 65535u); case GL_RG: - return GLColor(full.R, full.G, 0, 255u); + return GLColor16(full.R, full.G, 0, 65535u); case GL_RGB: - return GLColor(full.R, full.G, full.B, 255u); + return GLColor16(full.R, full.G, full.B, 65535u); case GL_RGBA: return full; default: UNREACHABLE(); - return GLColor::white; } + return GLColor16::white; } class TexCoordDrawTest : public ANGLETest @@ -1194,40 +1193,6 @@ TEST_P(Texture2DTest, NegativeAPISubImage) const GLubyte *pixels[20] = { 0 }; glTexSubImage2D(GL_TEXTURE_2D, 0, 1, 1, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixels); EXPECT_GL_ERROR(GL_INVALID_VALUE); - - if (extensionEnabled("GL_EXT_texture_storage")) - { - // Create a 1-level immutable texture. - glTexStorage2DEXT(GL_TEXTURE_2D, 1, GL_RGBA8, 2, 2); - - // Try calling sub image on the second level. - glTexSubImage2D(GL_TEXTURE_2D, 1, 1, 1, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixels); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); - } -} - -// Test that querying GL_TEXTURE_BINDING* doesn't cause an unexpected error. -TEST_P(Texture2DTest, QueryBinding) -{ - glBindTexture(GL_TEXTURE_2D, 0); - EXPECT_GL_ERROR(GL_NO_ERROR); - - GLint textureBinding; - glGetIntegerv(GL_TEXTURE_BINDING_2D, &textureBinding); - EXPECT_GL_NO_ERROR(); - EXPECT_EQ(0, textureBinding); - - glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &textureBinding); - if (extensionEnabled("GL_OES_EGL_image_external") || - extensionEnabled("GL_NV_EGL_stream_consumer_external")) - { - EXPECT_GL_NO_ERROR(); - EXPECT_EQ(0, textureBinding); - } - else - { - EXPECT_GL_ERROR(GL_INVALID_ENUM); - } } TEST_P(Texture2DTest, ZeroSizedUploads) @@ -2797,13 +2762,6 @@ TEST_P(SamplerInStructAsFunctionParameterTest, SamplerInStructAsFunctionParamete std::cout << "Test skipped on Adreno OpenGLES on Android." << std::endl; return; } - - if (IsWindows() && IsIntel() && IsOpenGL()) - { - std::cout << "Test skipped on Windows OpenGL on Intel." << std::endl; - return; - } - runSamplerInStructTest(); } @@ -3282,8 +3240,8 @@ class Texture2DNorm16TestES3 : public Texture2DTestES3 void testNorm16Texture(GLint internalformat, GLenum format, GLenum type) { - GLushort pixelValue = (type == GL_SHORT) ? 0x7FFF : 0x6A35; - GLushort imageData[] = {pixelValue, pixelValue, pixelValue, pixelValue}; + GLushort pixelValue = type == GL_SHORT ? 0x7FFF : 0x6A35; + GLColor16 imageData(pixelValue, pixelValue, pixelValue, pixelValue); setUpProgram(); @@ -3295,17 +3253,20 @@ class Texture2DNorm16TestES3 : public Texture2DTestES3 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16_EXT, 1, 1, 0, GL_RGBA, GL_UNSIGNED_SHORT, nullptr); glBindTexture(GL_TEXTURE_2D, mTextures[1]); - glTexImage2D(GL_TEXTURE_2D, 0, internalformat, 1, 1, 0, format, type, imageData); + glTexImage2D(GL_TEXTURE_2D, 0, internalformat, 1, 1, 0, format, type, &imageData.R); EXPECT_GL_NO_ERROR(); drawQuad(mProgram, "position", 0.5f); - GLubyte expectedValue = (type == GL_SHORT) ? 0xFF : static_cast(pixelValue >> 8); + GLColor16 expectedValue = imageData; + if (type == GL_SHORT) + { + // sampled as signed value; then stored as unsigned value + expectedValue = GLColor16::white; + } - EXPECT_PIXEL_COLOR_EQ( - 0, 0, SliceFormatColor( - format, GLColor(expectedValue, expectedValue, expectedValue, expectedValue))); + EXPECT_PIXEL_COLOR16_EQ(0, 0, SliceFormatColor16(format, expectedValue)); glBindFramebuffer(GL_FRAMEBUFFER, 0); @@ -3315,7 +3276,7 @@ class Texture2DNorm16TestES3 : public Texture2DTestES3 void testNorm16Render(GLint internalformat, GLenum format, GLenum type) { GLushort pixelValue = 0x6A35; - GLushort imageData[] = {pixelValue, pixelValue, pixelValue, pixelValue}; + GLColor16 imageData(pixelValue, pixelValue, pixelValue, pixelValue); setUpProgram(); @@ -3327,16 +3288,13 @@ class Texture2DNorm16TestES3 : public Texture2DTestES3 0); glBindTexture(GL_TEXTURE_2D, mTextures[2]); - glTexImage2D(GL_TEXTURE_2D, 0, internalformat, 1, 1, 0, format, type, imageData); + glTexImage2D(GL_TEXTURE_2D, 0, internalformat, 1, 1, 0, format, type, &imageData.R); EXPECT_GL_NO_ERROR(); drawQuad(mProgram, "position", 0.5f); - GLubyte expectedValue = static_cast(pixelValue >> 8); - EXPECT_PIXEL_COLOR_EQ( - 0, 0, SliceFormatColor( - format, GLColor(expectedValue, expectedValue, expectedValue, expectedValue))); + EXPECT_PIXEL_COLOR16_EQ(0, 0, SliceFormatColor16(format, imageData)); glBindRenderbuffer(GL_RENDERBUFFER, mRenderbuffer); glRenderbufferStorage(GL_RENDERBUFFER, internalformat, 1, 1); @@ -3350,7 +3308,8 @@ class Texture2DNorm16TestES3 : public Texture2DTestES3 glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 1, 1); - EXPECT_PIXEL_COLOR_EQ(0, 0, SliceFormatColor(format, GLColor::white)); + GLColor16 expectedValue = GLColor16::white; + EXPECT_PIXEL_COLOR16_EQ(0, 0, SliceFormatColor16(format, expectedValue)); glBindFramebuffer(GL_FRAMEBUFFER, 0); @@ -3521,169 +3480,6 @@ TEST_P(Texture2DTestES3, UnpackOverlappingRowsFromUnpackBuffer) EXPECT_EQ(expected, actual); } -template -T UNorm(double value) -{ - return static_cast(value * static_cast(std::numeric_limits::max())); -} - -// Test rendering a depth texture with mipmaps. -TEST_P(Texture2DTestES3, DepthTexturesWithMipmaps) -{ - //TODO(cwallez) this is failing on Intel Win7 OpenGL - if (IsIntel() && IsWindows() && IsOpenGL()) - { - std::cout << "Test skipped on Intel OpenGL." << std::endl; - return; - } - - const int size = getWindowWidth(); - - auto dim = [size](int level) { return size >> level; }; - int levels = gl::log2(size); - - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, mTexture2D); - glTexStorage2D(GL_TEXTURE_2D, levels, GL_DEPTH_COMPONENT24, size, size); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - ASSERT_GL_NO_ERROR(); - - glUseProgram(mProgram); - glUniform1i(mTexture2DUniformLocation, 0); - - std::vector expected; - - for (int level = 0; level < levels; ++level) - { - double value = (static_cast(level) / static_cast(levels - 1)); - expected.push_back(UNorm(value)); - - int levelDim = dim(level); - - ASSERT_GT(levelDim, 0); - - std::vector initData(levelDim * levelDim, UNorm(value)); - glTexSubImage2D(GL_TEXTURE_2D, level, 0, 0, levelDim, levelDim, GL_DEPTH_COMPONENT, - GL_UNSIGNED_INT, initData.data()); - } - ASSERT_GL_NO_ERROR(); - - for (int level = 0; level < levels; ++level) - { - glViewport(0, 0, dim(level), dim(level)); - drawQuad(mProgram, "position", 0.5f); - GLColor actual = ReadColor(0, 0); - EXPECT_NEAR(expected[level], actual.R, 10u); - } - - ASSERT_GL_NO_ERROR(); -} - -// Tests unpacking into the unsized GL_ALPHA format. -TEST_P(Texture2DTestES3, UnsizedAlphaUnpackBuffer) -{ - // TODO(jmadill): Figure out why this fails on OSX. - ANGLE_SKIP_TEST_IF(IsOSX()); - - // Initialize the texure. - glBindTexture(GL_TEXTURE_2D, mTexture2D); - glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, getWindowWidth(), getWindowHeight(), 0, GL_ALPHA, - GL_UNSIGNED_BYTE, nullptr); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - - std::vector bufferData(getWindowWidth() * getWindowHeight(), 127); - - // Pull in the color data from the unpack buffer. - GLBuffer unpackBuffer; - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glBindBuffer(GL_PIXEL_UNPACK_BUFFER, unpackBuffer.get()); - glBufferData(GL_PIXEL_UNPACK_BUFFER, getWindowWidth() * getWindowHeight(), bufferData.data(), - GL_STATIC_DRAW); - - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, getWindowWidth(), getWindowHeight(), GL_ALPHA, - GL_UNSIGNED_BYTE, nullptr); - - // Clear to a weird color to make sure we're drawing something. - glClearColor(0.5f, 0.8f, 1.0f, 0.2f); - glClear(GL_COLOR_BUFFER_BIT); - - // Draw with the alpha texture and verify. - drawQuad(mProgram, "position", 0.5f); - - ASSERT_GL_NO_ERROR(); - EXPECT_PIXEL_NEAR(0, 0, 0, 0, 0, 127, 1); -} - -// Ensure stale unpack data doesn't propagate in D3D11. -TEST_P(Texture2DTestES3, StaleUnpackData) -{ - // Init unpack buffer. - GLsizei pixelCount = getWindowWidth() * getWindowHeight() / 2; - std::vector pixels(pixelCount, GLColor::red); - - GLBuffer unpackBuffer; - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glBindBuffer(GL_PIXEL_UNPACK_BUFFER, unpackBuffer.get()); - GLsizei bufferSize = pixelCount * sizeof(GLColor); - glBufferData(GL_PIXEL_UNPACK_BUFFER, bufferSize, pixels.data(), GL_STATIC_DRAW); - - // Create from unpack buffer. - glBindTexture(GL_TEXTURE_2D, mTexture2D); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, getWindowWidth() / 2, getWindowHeight() / 2, 0, - GL_RGBA, GL_UNSIGNED_BYTE, nullptr); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - - drawQuad(mProgram, "position", 0.5f); - - ASSERT_GL_NO_ERROR(); - EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::red); - - // Fill unpack with green, recreating buffer. - pixels.assign(getWindowWidth() * getWindowHeight(), GLColor::green); - GLsizei size2 = getWindowWidth() * getWindowHeight() * sizeof(GLColor); - glBufferData(GL_PIXEL_UNPACK_BUFFER, size2, pixels.data(), GL_STATIC_DRAW); - - // Reinit texture with green. - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, getWindowWidth() / 2, getWindowHeight() / 2, GL_RGBA, - GL_UNSIGNED_BYTE, nullptr); - - drawQuad(mProgram, "position", 0.5f); - - ASSERT_GL_NO_ERROR(); - EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::green); -} - -// This test covers a D3D format redefinition bug for 3D textures. The base level format was not -// being properly checked, and the texture storage of the previous texture format was persisting. -// This would result in an ASSERT in debug and incorrect rendering in release. -// See http://anglebug.com/1609 and WebGL 2 test conformance2/misc/views-with-offsets.html. -TEST_P(Texture3DTestES3, FormatRedefinitionBug) -{ - GLTexture tex; - glBindTexture(GL_TEXTURE_3D, tex.get()); - glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA8, 1, 1, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr); - - GLFramebuffer framebuffer; - glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.get()); - glFramebufferTextureLayer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, tex.get(), 0, 0); - - glCheckFramebufferStatus(GL_FRAMEBUFFER); - - std::vector pixelData(100, 0); - - glTexImage3D(GL_TEXTURE_3D, 0, GL_RGB565, 1, 1, 1, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, nullptr); - glTexSubImage3D(GL_TEXTURE_3D, 0, 0, 0, 0, 1, 1, 1, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, - pixelData.data()); - - ASSERT_GL_NO_ERROR(); -} - // Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against. // TODO(oetuaho): Enable all below tests on OpenGL. Requires a fix for ANGLE bug 1278. ANGLE_INSTANTIATE_TEST(Texture2DTest, @@ -3769,4 +3565,4 @@ ANGLE_INSTANTIATE_TEST(SamplerInStructAndOtherVariableTest, ANGLE_INSTANTIATE_TEST(TextureLimitsTest, ES2_D3D11(), ES2_OPENGL(), ES2_OPENGLES()); ANGLE_INSTANTIATE_TEST(Texture2DNorm16TestES3, ES3_D3D11(), ES3_OPENGL(), ES3_OPENGLES()); -} // anonymous namespace +} // namespace diff --git a/gfx/angle/src/tests/gl_tests/TimerQueriesTest.cpp b/gfx/angle/src/tests/gl_tests/TimerQueriesTest.cpp index 8f3725ec0..8c4d282ff 100755 --- a/gfx/angle/src/tests/gl_tests/TimerQueriesTest.cpp +++ b/gfx/angle/src/tests/gl_tests/TimerQueriesTest.cpp @@ -311,13 +311,6 @@ TEST_P(TimerQueriesTest, TimeElapsedValidationTest) // Tests timer queries operating under multiple EGL contexts with mid-query switching TEST_P(TimerQueriesTest, TimeElapsedMulticontextTest) { - if (IsAMD() && IsOpenGL() && IsWindows() && IsDebug()) - { - // TODO(jmadill): Figure out why this test is flaky on Win/AMD/OpenGL/Debug. - std::cout << "Test skipped on Windows AMD OpenGL Debug." << std::endl; - return; - } - if (!extensionEnabled("GL_EXT_disjoint_timer_query")) { std::cout << "Test skipped because GL_EXT_disjoint_timer_query is not available." diff --git a/gfx/angle/src/tests/gl_tests/TransformFeedbackTest.cpp b/gfx/angle/src/tests/gl_tests/TransformFeedbackTest.cpp index 73c8a20d5..3370a0888 100755 --- a/gfx/angle/src/tests/gl_tests/TransformFeedbackTest.cpp +++ b/gfx/angle/src/tests/gl_tests/TransformFeedbackTest.cpp @@ -742,20 +742,14 @@ TEST_P(TransformFeedbackTest, PackingBug) GLint attrib1Loc = glGetAttribLocation(mProgram, "inAttrib1"); GLint attrib2Loc = glGetAttribLocation(mProgram, "inAttrib2"); - std::vector attrib1Data; - std::vector attrib2Data; - int counter = 0; - for (size_t i = 0; i < 6; i++) { - attrib1Data.push_back(Vector2(counter + 0.0f, counter + 1.0f)); - attrib2Data.push_back(Vector2(counter + 2.0f, counter + 3.0f)); - counter += 4; - } + Vector2 attrib1Data[] = {Vector2(1.0, 2.0), Vector2(3.0, 4.0), Vector2(5.0, 6.0)}; + Vector2 attrib2Data[] = {Vector2(11.0, 12.0), Vector2(13.0, 14.0), Vector2(15.0, 16.0)}; glEnableVertexAttribArray(attrib1Loc); glEnableVertexAttribArray(attrib2Loc); - glVertexAttribPointer(attrib1Loc, 2, GL_FLOAT, GL_FALSE, 0, attrib1Data.data()); - glVertexAttribPointer(attrib2Loc, 2, GL_FLOAT, GL_FALSE, 0, attrib2Data.data()); + glVertexAttribPointer(attrib1Loc, 2, GL_FLOAT, GL_FALSE, 0, attrib1Data); + glVertexAttribPointer(attrib2Loc, 2, GL_FLOAT, GL_FALSE, 0, attrib2Data); glUseProgram(mProgram); glBeginTransformFeedback(GL_TRIANGLES); @@ -829,69 +823,6 @@ TEST_P(TransformFeedbackTest, OptimizedVaryings) ASSERT_NE(0u, mProgram); } -// Test an edge case where two varyings are unreferenced in the frag shader. -TEST_P(TransformFeedbackTest, TwoUnreferencedInFragShader) -{ - // TODO(jmadill): With points and rasterizer discard? - const std::string &vertexShaderSource = - "#version 300 es\n" - "in vec3 position;\n" - "out vec3 outAttrib1;\n" - "out vec3 outAttrib2;\n" - "void main() {" - " outAttrib1 = position;\n" - " outAttrib2 = position;\n" - " gl_Position = vec4(position, 1);\n" - "}"; - - const std::string &fragmentShaderSource = - "#version 300 es\n" - "precision mediump float;\n" - "out vec4 color;\n" - "in vec3 outAttrib1;\n" - "in vec3 outAttrib2;\n" - "void main() {\n" - " color = vec4(0);\n" - "}"; - - std::vector tfVaryings; - tfVaryings.push_back("outAttrib1"); - tfVaryings.push_back("outAttrib2"); - - mProgram = CompileProgramWithTransformFeedback(vertexShaderSource, fragmentShaderSource, - tfVaryings, GL_INTERLEAVED_ATTRIBS); - ASSERT_NE(0u, mProgram); - - glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, mTransformFeedbackBuffer); - glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER, sizeof(Vector3) * 2 * 6, nullptr, GL_STREAM_DRAW); - - glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, mTransformFeedback); - glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, mTransformFeedbackBuffer); - - glUseProgram(mProgram); - glBeginTransformFeedback(GL_TRIANGLES); - drawQuad(mProgram, "position", 0.5f); - glEndTransformFeedback(); - glUseProgram(0); - ASSERT_GL_NO_ERROR(); - - const GLvoid *mapPointer = - glMapBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 0, sizeof(Vector2) * 2 * 6, GL_MAP_READ_BIT); - ASSERT_NE(nullptr, mapPointer); - - const auto &quadVertices = GetQuadVertices(); - - const Vector3 *vecPointer = static_cast(mapPointer); - for (unsigned int vectorIndex = 0; vectorIndex < 3; ++vectorIndex) - { - unsigned int stream1Index = vectorIndex * 2; - unsigned int stream2Index = vectorIndex * 2 + 1; - EXPECT_EQ(quadVertices[vectorIndex], vecPointer[stream1Index]); - EXPECT_EQ(quadVertices[vectorIndex], vecPointer[stream2Index]); - } - - ASSERT_GL_NO_ERROR(); -} class TransformFeedbackLifetimeTest : public TransformFeedbackTest { protected: diff --git a/gfx/angle/src/tests/gl_tests/UniformBufferTest.cpp b/gfx/angle/src/tests/gl_tests/UniformBufferTest.cpp index b3577bf30..0d35df177 100755 --- a/gfx/angle/src/tests/gl_tests/UniformBufferTest.cpp +++ b/gfx/angle/src/tests/gl_tests/UniformBufferTest.cpp @@ -5,7 +5,6 @@ // #include "test_utils/ANGLETest.h" -#include "test_utils/gl_raii.h" using namespace angle; @@ -25,7 +24,7 @@ class UniformBufferTest : public ANGLETest setConfigAlphaBits(8); } - void SetUp() override + virtual void SetUp() { ANGLETest::SetUp(); @@ -63,7 +62,7 @@ class UniformBufferTest : public ANGLETest ASSERT_GL_NO_ERROR(); } - void TearDown() override + virtual void TearDown() { glDeleteBuffers(1, &mUniformBuffer); glDeleteProgram(mProgram); @@ -78,6 +77,13 @@ class UniformBufferTest : public ANGLETest // Basic UBO functionality. TEST_P(UniformBufferTest, Simple) { + // TODO(jmadill): Figure out why this fails on Intel. + if (IsIntel() && GetParam().getRenderer() == EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE) + { + std::cout << "Test skipped on Intel." << std::endl; + return; + } + glClear(GL_COLOR_BUFFER_BIT); float floatData[4] = {0.5f, 0.75f, 0.25f, 1.0f}; @@ -98,6 +104,13 @@ TEST_P(UniformBufferTest, Simple) // The second step renders a color from a UBO with a non-zero offset. TEST_P(UniformBufferTest, UniformBufferRange) { + // TODO(jmadill): Figure out why this fails on Intel. + if (IsIntel() && GetParam().getRenderer() == EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE) + { + std::cout << "Test skipped on Intel." << std::endl; + return; + } + int px = getWindowWidth() / 2; int py = getWindowHeight() / 2; @@ -169,6 +182,13 @@ TEST_P(UniformBufferTest, UniformBufferRange) // Test uniform block bindings. TEST_P(UniformBufferTest, UniformBufferBindings) { + // TODO(jmadill): Figure out why this fails on Intel. + if (IsIntel() && GetParam().getRenderer() == EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE) + { + std::cout << "Test skipped on Intel." << std::endl; + return; + } + int px = getWindowWidth() / 2; int py = getWindowHeight() / 2; @@ -225,10 +245,11 @@ TEST_P(UniformBufferTest, UnboundUniformBuffer) // https://code.google.com/p/angleproject/issues/detail?id=965 TEST_P(UniformBufferTest, UniformBufferManyUpdates) { - // TODO(jmadill): Figure out why this fails on Intel OpenGL. - if (IsIntel() && IsOpenGL()) + // TODO(jmadill): Figure out why this fails on Intel. + if (IsIntel() && (getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE || + getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)) { - std::cout << "Test skipped on Intel OpenGL." << std::endl; + std::cout << "Test skipped on Intel." << std::endl; return; } @@ -265,6 +286,13 @@ TEST_P(UniformBufferTest, UniformBufferManyUpdates) // Use a large number of buffer ranges (compared to the actual size of the UBO) TEST_P(UniformBufferTest, ManyUniformBufferRange) { + // TODO(jmadill): Figure out why this fails on Intel. + if (IsIntel() && GetParam().getRenderer() == EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE) + { + std::cout << "Test skipped on Intel." << std::endl; + return; + } + int px = getWindowWidth() / 2; int py = getWindowHeight() / 2; @@ -342,119 +370,15 @@ TEST_P(UniformBufferTest, ManyUniformBufferRange) // Tests that active uniforms have the right names. TEST_P(UniformBufferTest, ActiveUniformNames) { - const std::string &vertexShaderSource = - "#version 300 es\n" - "in vec2 position;\n" - "out vec2 v;\n" - "uniform blockName1 {\n" - " float f1;\n" - "} instanceName1;\n" - "uniform blockName2 {\n" - " float f2;\n" - "} instanceName2[1];\n" - "void main() {\n" - " v = vec2(instanceName1.f1, instanceName2[0].f2);\n" - " gl_Position = vec4(position, 0, 1);\n" - "}"; - - const std::string &fragmentShaderSource = - "#version 300 es\n" - "precision highp float;\n" - "in vec2 v;\n" - "out vec4 color;\n" - "void main() {\n" - " color = vec4(v, 0, 1);\n" - "}"; - - GLuint program = CompileProgram(vertexShaderSource, fragmentShaderSource); - ASSERT_NE(0u, program); - - GLint activeUniformBlocks; - glGetProgramiv(program, GL_ACTIVE_UNIFORM_BLOCKS, &activeUniformBlocks); - ASSERT_EQ(2, activeUniformBlocks); - - GLint maxLength; - GLsizei length; - glGetProgramiv(program, GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH, &maxLength); - std::vector strBlockNameBuffer(maxLength + 1, 0); - glGetActiveUniformBlockName(program, 0, maxLength, &length, &strBlockNameBuffer[0]); - ASSERT_GL_NO_ERROR(); - EXPECT_EQ("blockName1", std::string(&strBlockNameBuffer[0])); - - glGetActiveUniformBlockName(program, 1, maxLength, &length, &strBlockNameBuffer[0]); - ASSERT_GL_NO_ERROR(); - EXPECT_EQ("blockName2[0]", std::string(&strBlockNameBuffer[0])); - - GLint activeUniforms; - glGetProgramiv(program, GL_ACTIVE_UNIFORMS, &activeUniforms); - - ASSERT_EQ(2, activeUniforms); - - GLint size; - GLenum type; - glGetProgramiv(program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &maxLength); - std::vector strUniformNameBuffer(maxLength + 1, 0); - glGetActiveUniform(program, 0, maxLength, &length, &size, &type, &strUniformNameBuffer[0]); - - ASSERT_GL_NO_ERROR(); - EXPECT_EQ(1, size); - EXPECT_GLENUM_EQ(GL_FLOAT, type); - EXPECT_EQ("blockName1.f1", std::string(&strUniformNameBuffer[0])); - - glGetActiveUniform(program, 1, maxLength, &length, &size, &type, &strUniformNameBuffer[0]); - - ASSERT_GL_NO_ERROR(); - EXPECT_EQ(1, size); - EXPECT_GLENUM_EQ(GL_FLOAT, type); - EXPECT_EQ("blockName2.f2", std::string(&strUniformNameBuffer[0])); -} - -// Tests active uniforms and blocks when the layout is std140, shared and packed. -TEST_P(UniformBufferTest, ActiveUniformNumberAndName) -{ - // TODO(Jiajia): Figure out why this fails on Intel on Mac. - // This case can pass on Intel Mac-10.11/10.12. But it fails on Intel Mac-10.10. - if (IsIntel() && IsOSX()) - { - std::cout << "Test skipped on Intel on Mac." << std::endl; - return; - } - - // This case fails on all AMD platforms (Mac, Linux, Win). - // TODO(zmo): This actually passes on certain AMD cards, but we don't have - // a way to do device specific handling yet. - if (IsAMD()) - { - std::cout << "Test skipped on AMD." << std::endl; - return; - } - const std::string &vertexShaderSource = "#version 300 es\n" "in vec2 position;\n" "out float v;\n" - "struct S {\n" - " highp ivec3 a;\n" - " mediump ivec2 b[4];\n" - "};\n" - "layout(std140) uniform blockName0 {\n" - " S s0;\n" - " lowp vec2 v0;\n" - " S s1[2];\n" - " highp uint u0;\n" - "};\n" - "layout(std140) uniform blockName1 {\n" - " float f1;\n" - " bool b1;\n" - "} instanceName1;\n" - "layout(shared) uniform blockName2 {\n" - " float f2;\n" - "};\n" - "layout(packed) uniform blockName3 {\n" - " float f3;\n" - "};\n" + "uniform blockName {\n" + " float f;\n" + "} instanceName;\n" "void main() {\n" - " v = instanceName1.f1;\n" + " v = instanceName.f;\n" " gl_Position = vec4(position, 0, 1);\n" "}"; @@ -467,99 +391,25 @@ TEST_P(UniformBufferTest, ActiveUniformNumberAndName) " color = vec4(v, 0, 0, 1);\n" "}"; - ANGLE_GL_PROGRAM(program, vertexShaderSource, fragmentShaderSource); + GLuint program = CompileProgram(vertexShaderSource, fragmentShaderSource); + ASSERT_NE(0u, program); - // Note that the packed |blockName3| might (or might not) be optimized out. GLint activeUniforms; - glGetProgramiv(program.get(), GL_ACTIVE_UNIFORMS, &activeUniforms); - EXPECT_GE(activeUniforms, 11); + glGetProgramiv(program, GL_ACTIVE_UNIFORMS, &activeUniforms); - GLint activeUniformBlocks; - glGetProgramiv(program.get(), GL_ACTIVE_UNIFORM_BLOCKS, &activeUniformBlocks); - EXPECT_GE(activeUniformBlocks, 3); + ASSERT_EQ(1, activeUniforms); GLint maxLength, size; GLenum type; GLsizei length; - glGetProgramiv(program.get(), GL_ACTIVE_UNIFORM_MAX_LENGTH, &maxLength); + glGetProgramiv(program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &maxLength); std::vector strBuffer(maxLength + 1, 0); + glGetActiveUniform(program, 0, maxLength, &length, &size, &type, &strBuffer[0]); - glGetActiveUniform(program.get(), 0, maxLength, &length, &size, &type, &strBuffer[0]); - ASSERT_GL_NO_ERROR(); - EXPECT_EQ(1, size); - EXPECT_EQ("s0.a", std::string(&strBuffer[0])); - - glGetActiveUniform(program.get(), 1, maxLength, &length, &size, &type, &strBuffer[0]); - ASSERT_GL_NO_ERROR(); - EXPECT_EQ(4, size); - EXPECT_EQ("s0.b[0]", std::string(&strBuffer[0])); - - glGetActiveUniform(program.get(), 2, maxLength, &length, &size, &type, &strBuffer[0]); - ASSERT_GL_NO_ERROR(); - EXPECT_EQ(1, size); - EXPECT_EQ("v0", std::string(&strBuffer[0])); - - glGetActiveUniform(program.get(), 3, maxLength, &length, &size, &type, &strBuffer[0]); - ASSERT_GL_NO_ERROR(); - EXPECT_EQ(1, size); - EXPECT_EQ("s1[0].a", std::string(&strBuffer[0])); - - glGetActiveUniform(program.get(), 4, maxLength, &length, &size, &type, &strBuffer[0]); - ASSERT_GL_NO_ERROR(); - EXPECT_EQ(4, size); - EXPECT_EQ("s1[0].b[0]", std::string(&strBuffer[0])); - - glGetActiveUniform(program.get(), 5, maxLength, &length, &size, &type, &strBuffer[0]); - ASSERT_GL_NO_ERROR(); - EXPECT_EQ(1, size); - EXPECT_EQ("s1[1].a", std::string(&strBuffer[0])); - - glGetActiveUniform(program.get(), 6, maxLength, &length, &size, &type, &strBuffer[0]); - ASSERT_GL_NO_ERROR(); - EXPECT_EQ(4, size); - EXPECT_EQ("s1[1].b[0]", std::string(&strBuffer[0])); - - glGetActiveUniform(program.get(), 7, maxLength, &length, &size, &type, &strBuffer[0]); - ASSERT_GL_NO_ERROR(); - EXPECT_EQ(1, size); - EXPECT_EQ("u0", std::string(&strBuffer[0])); - - glGetActiveUniform(program.get(), 8, maxLength, &length, &size, &type, &strBuffer[0]); - ASSERT_GL_NO_ERROR(); - EXPECT_EQ(1, size); - EXPECT_EQ("blockName1.f1", std::string(&strBuffer[0])); - - glGetActiveUniform(program.get(), 9, maxLength, &length, &size, &type, &strBuffer[0]); - ASSERT_GL_NO_ERROR(); - EXPECT_EQ(1, size); - EXPECT_EQ("blockName1.b1", std::string(&strBuffer[0])); - - glGetActiveUniform(program.get(), 10, maxLength, &length, &size, &type, &strBuffer[0]); ASSERT_GL_NO_ERROR(); EXPECT_EQ(1, size); - EXPECT_EQ("f2", std::string(&strBuffer[0])); -} - -// Test that using a very large buffer to back a small uniform block works OK. -TEST_P(UniformBufferTest, VeryLarge) -{ - glClear(GL_COLOR_BUFFER_BIT); - float floatData[4] = {0.5f, 0.75f, 0.25f, 1.0f}; - - GLsizei bigSize = 4096 * 64; - std::vector zero(bigSize, 0); - - glBindBuffer(GL_UNIFORM_BUFFER, mUniformBuffer); - glBufferData(GL_UNIFORM_BUFFER, bigSize, zero.data(), GL_STATIC_DRAW); - glBufferSubData(GL_UNIFORM_BUFFER, 0, sizeof(float) * 4, floatData); - - glBindBufferBase(GL_UNIFORM_BUFFER, 0, mUniformBuffer); - - glUniformBlockBinding(mProgram, mUniformBufferIndex, 0); - drawQuad(mProgram, "position", 0.5f); - - ASSERT_GL_NO_ERROR(); - EXPECT_PIXEL_NEAR(0, 0, 128, 191, 64, 255, 1); + EXPECT_GLENUM_EQ(GL_FLOAT, type); + EXPECT_EQ("blockName.f", std::string(&strBuffer[0])); } // Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against. diff --git a/gfx/angle/src/tests/gl_tests/UniformTest.cpp b/gfx/angle/src/tests/gl_tests/UniformTest.cpp index 4dd2738ef..c3ec72c5c 100755 --- a/gfx/angle/src/tests/gl_tests/UniformTest.cpp +++ b/gfx/angle/src/tests/gl_tests/UniformTest.cpp @@ -459,54 +459,6 @@ TEST_P(UniformTestES3, TranposedMatrixArrayUniformStateQuery) } } -// Check that trying setting too many elements of an array doesn't overflow -TEST_P(UniformTestES3, OverflowArray) -{ - const std::string &vertexShader = - "#version 300 es\n" - "void main() { gl_Position = vec4(1); }"; - const std::string &fragShader = - "#version 300 es\n" - "precision mediump float;\n" - "uniform float uniF[5];\n" - "uniform mat3x2 uniMat3x2[5];\n" - "out vec4 color;\n" - "void main() {\n" - " color = vec4(uniMat3x2[0][0][0] + uniF[0]);\n" - "}"; - - mProgram = CompileProgram(vertexShader, fragShader); - ASSERT_NE(mProgram, 0u); - - glUseProgram(mProgram); - - const size_t kOverflowSize = 10000; - std::vector values(10000 * 6); - - // Setting as a clump - GLint floatLocation = glGetUniformLocation(mProgram, "uniF"); - ASSERT_NE(-1, floatLocation); - GLint matLocation = glGetUniformLocation(mProgram, "uniMat3x2"); - ASSERT_NE(-1, matLocation); - - // Set too many float uniforms - glUniform1fv(floatLocation, kOverflowSize, &values[0]); - - // Set too many matrix uniforms, transposed or not - glUniformMatrix3x2fv(matLocation, kOverflowSize, GL_FALSE, &values[0]); - glUniformMatrix3x2fv(matLocation, kOverflowSize, GL_TRUE, &values[0]); - - // Same checks but with offsets - GLint floatLocationOffset = glGetUniformLocation(mProgram, "uniF[3]"); - ASSERT_NE(-1, floatLocationOffset); - GLint matLocationOffset = glGetUniformLocation(mProgram, "uniMat3x2[3]"); - ASSERT_NE(-1, matLocationOffset); - - glUniform1fv(floatLocationOffset, kOverflowSize, &values[0]); - glUniformMatrix3x2fv(matLocationOffset, kOverflowSize, GL_FALSE, &values[0]); - glUniformMatrix3x2fv(matLocationOffset, kOverflowSize, GL_TRUE, &values[0]); -} - // Check that sampler uniforms only show up one time in the list TEST_P(UniformTest, SamplerUniformsAppearOnce) { @@ -612,7 +564,7 @@ TEST_P(UniformTestES3, ReturnsOnlyOneArrayElement) for (const auto &array : uniformArrays) { uniformStream << "uniform " << array.type << " " << array.name << "[" - << ToString(kArraySize) << "];\n"; + << std::to_string(kArraySize) << "];\n"; // We need to make use of the uniforms or they get compiled out. for (int i = 0; i < 4; i++) @@ -658,7 +610,7 @@ TEST_P(UniformTestES3, ReturnsOnlyOneArrayElement) { for (size_t index = 0; index < kArraySize; index++) { - std::string strIndex = "[" + ToString(index) + "]"; + std::string strIndex = "[" + std::to_string(index) + "]"; // Check all the different glGetUniformv functions CheckOneElement(glGetUniformfv, mProgram, uniformArray.name + strIndex, uniformArray.components, 42.4242f); diff --git a/gfx/angle/src/tests/gl_tests/VertexAttributeTest.cpp b/gfx/angle/src/tests/gl_tests/VertexAttributeTest.cpp index b1b9dcd1f..01b79ec61 100755 --- a/gfx/angle/src/tests/gl_tests/VertexAttributeTest.cpp +++ b/gfx/angle/src/tests/gl_tests/VertexAttributeTest.cpp @@ -102,7 +102,7 @@ class VertexAttributeTest : public ANGLETest if (test.source == Source::BUFFER) { - GLsizei dataSize = mVertexCount * TypeStride(test.type); + GLsizei dataSize = mVertexCount * TypeStride(test.type) * typeSize; glBindBuffer(GL_ARRAY_BUFFER, mBuffer); glBufferData(GL_ARRAY_BUFFER, dataSize, test.inputData, GL_STATIC_DRAW); glVertexAttribPointer(mTestAttrib, typeSize, test.type, test.normalized, 0, diff --git a/gfx/angle/src/tests/gl_tests/WebGLCompatibilityTest.cpp b/gfx/angle/src/tests/gl_tests/WebGLCompatibilityTest.cpp deleted file mode 100644 index 48a9d2bae..000000000 --- a/gfx/angle/src/tests/gl_tests/WebGLCompatibilityTest.cpp +++ /dev/null @@ -1,154 +0,0 @@ -// -// 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. -// - -// WebGLCompatibilityTest.cpp : Tests of the GL_ANGLE_webgl_compatibility extension. - -#include "test_utils/ANGLETest.h" - -#include "test_utils/gl_raii.h" - -namespace angle -{ - -class WebGLCompatibilityTest : public ANGLETest -{ - protected: - WebGLCompatibilityTest() - { - setWindowWidth(128); - setWindowHeight(128); - setConfigRedBits(8); - setConfigGreenBits(8); - setConfigBlueBits(8); - setConfigAlphaBits(8); - setWebGLCompatibilityEnabled(true); - } - - void SetUp() override - { - ANGLETest::SetUp(); - glEnableExtensionANGLE = reinterpret_cast( - eglGetProcAddress("glEnableExtensionANGLE")); - } - - void TearDown() override { ANGLETest::TearDown(); } - - PFNGLENABLEEXTENSIONANGLEPROC glEnableExtensionANGLE = nullptr; -}; - -// Context creation would fail if EGL_ANGLE_create_context_webgl_compatibility was not available so -// the GL extension should always be present -TEST_P(WebGLCompatibilityTest, ExtensionStringExposed) -{ - EXPECT_TRUE(extensionEnabled("GL_ANGLE_webgl_compatibility")); -} - -// Verify that all extension entry points are available -TEST_P(WebGLCompatibilityTest, EntryPoints) -{ - if (extensionEnabled("GL_ANGLE_webgl_compatibility")) - { - EXPECT_NE(nullptr, eglGetProcAddress("glEnableExtensionANGLE")); - } -} - -// WebGL 1 allows GL_DEPTH_STENCIL_ATTACHMENT as a valid binding point. Make sure it is usable, -// even in ES2 contexts. -TEST_P(WebGLCompatibilityTest, DepthStencilBindingPoint) -{ - GLRenderbuffer renderbuffer; - glBindRenderbuffer(GL_RENDERBUFFER, renderbuffer.get()); - glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, 32, 32); - - GLFramebuffer framebuffer; - glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.get()); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, - renderbuffer.get()); - - EXPECT_GL_NO_ERROR(); -} - -// Test that attempting to enable an extension that doesn't exist generates GL_INVALID_OPERATION -TEST_P(WebGLCompatibilityTest, EnableExtensionValidation) -{ - EXPECT_EQ(GL_FALSE, glEnableExtensionANGLE("invalid_extension_string")); - EXPECT_GL_ERROR(GL_INVALID_OPERATION); -} - -// Test enabling the GL_OES_element_index_uint extension -TEST_P(WebGLCompatibilityTest, EnableExtensionUintIndices) -{ - if (getClientMajorVersion() != 2) - { - // This test only works on ES2 where uint indices are not available by default - return; - } - - EXPECT_FALSE(extensionEnabled("GL_OES_element_index_uint")); - - GLBuffer indexBuffer; - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indexBuffer.get()); - - GLuint data[] = {0, 1, 2, 1, 3, 2}; - glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(data), data, GL_STATIC_DRAW); - - ANGLE_GL_PROGRAM(program, "void main() { gl_Position = vec4(0, 0, 0, 1); }", - "void main() { gl_FragColor = vec4(0, 1, 0, 1); }") - glUseProgram(program.get()); - - glDrawElements(GL_TRIANGLES, 2, GL_UNSIGNED_INT, nullptr); - EXPECT_GL_ERROR(GL_INVALID_ENUM); - - if (glEnableExtensionANGLE("GL_OES_element_index_uint")) - { - EXPECT_GL_NO_ERROR(); - EXPECT_TRUE(extensionEnabled("GL_OES_element_index_uint")); - - glDrawElements(GL_TRIANGLES, 2, GL_UNSIGNED_INT, nullptr); - EXPECT_GL_NO_ERROR(); - } -} - -// Verify that shaders are of a compatible spec when the extension is enabled. -TEST_P(WebGLCompatibilityTest, ExtensionCompilerSpec) -{ - EXPECT_TRUE(extensionEnabled("GL_ANGLE_webgl_compatibility")); - - // Use of reserved _webgl prefix should fail when the shader specification is for WebGL. - const std::string &vert = - "struct Foo {\n" - " int _webgl_bar;\n" - "};\n" - "void main()\n" - "{\n" - " Foo foo = Foo(1);\n" - "}"; - - // Default fragement shader. - const std::string &frag = - "void main()\n" - "{\n" - " gl_FragColor = vec4(1.0,0.0,0.0,1.0);\n" - "}"; - - GLuint program = CompileProgram(vert, frag); - EXPECT_EQ(0u, program); - glDeleteProgram(program); -} - -// Use this to select which configurations (e.g. which renderer, which GLES major version) these -// tests should be run against. -ANGLE_INSTANTIATE_TEST(WebGLCompatibilityTest, - ES2_D3D9(), - ES2_D3D11(), - ES3_D3D11(), - ES2_D3D11_FL9_3(), - ES2_OPENGL(), - ES3_OPENGL(), - ES2_OPENGLES(), - ES3_OPENGLES()); - -} // namespace diff --git a/gfx/angle/src/tests/perf_tests/IndexDataManagerTest.cpp b/gfx/angle/src/tests/perf_tests/IndexDataManagerTest.cpp index 696b81bb5..c89f1df94 100755 --- a/gfx/angle/src/tests/perf_tests/IndexDataManagerTest.cpp +++ b/gfx/angle/src/tests/perf_tests/IndexDataManagerTest.cpp @@ -11,7 +11,6 @@ #include -#include "angle_unittests_utils.h" #include "libANGLE/renderer/d3d/BufferD3D.h" #include "libANGLE/renderer/d3d/IndexBuffer.h" #include "libANGLE/renderer/d3d/IndexDataManager.h" @@ -76,10 +75,14 @@ class MockBufferFactoryD3D : public rx::BufferFactoryD3D class MockBufferD3D : public rx::BufferD3D { public: - MockBufferD3D(rx::BufferFactoryD3D *factory) : BufferD3D(mockState, factory), mData() {} + MockBufferD3D(rx::BufferFactoryD3D *factory) + : BufferD3D(factory), + mData() + { + } // BufferImpl - gl::Error setData(GLenum target, const void *data, size_t size, GLenum) override + gl::Error setData(const void *data, size_t size, GLenum) override { mData.resize(size); if (data && size > 0) @@ -89,7 +92,7 @@ class MockBufferD3D : public rx::BufferD3D return gl::Error(GL_NO_ERROR); } - MOCK_METHOD4(setSubData, gl::Error(GLenum, const void *, size_t, size_t)); + MOCK_METHOD3(setSubData, gl::Error(const void*, size_t, size_t)); MOCK_METHOD4(copySubData, gl::Error(BufferImpl*, GLintptr, GLintptr, GLsizeiptr)); MOCK_METHOD2(map, gl::Error(GLenum, GLvoid **)); MOCK_METHOD4(mapRange, gl::Error(size_t, size_t, GLbitfield, GLvoid **)); @@ -109,30 +112,9 @@ class MockBufferD3D : public rx::BufferD3D } private: - gl::BufferState mockState; std::vector mData; }; -class MockGLFactoryD3D : public rx::MockGLFactory -{ - public: - MockGLFactoryD3D(MockBufferFactoryD3D *bufferFactory) : mBufferFactory(bufferFactory) {} - - rx::BufferImpl *createBuffer(const gl::BufferState &state) override - { - MockBufferD3D *mockBufferD3D = new MockBufferD3D(mBufferFactory); - - EXPECT_CALL(*mBufferFactory, createVertexBuffer()) - .WillOnce(Return(nullptr)) - .RetiresOnSaturation(); - mockBufferD3D->initializeStaticData(); - - return mockBufferD3D; - } - - MockBufferFactoryD3D *mBufferFactory; -}; - class IndexDataManagerPerfTest : public ANGLEPerfTest { public: @@ -143,27 +125,34 @@ class IndexDataManagerPerfTest : public ANGLEPerfTest rx::IndexDataManager mIndexDataManager; GLsizei mIndexCount; unsigned int mBufferSize; - MockBufferFactoryD3D mMockBufferFactory; - MockGLFactoryD3D mMockGLFactory; + MockBufferFactoryD3D mMockFactory; gl::Buffer mIndexBuffer; }; +MockBufferD3D *InitMockBufferD3D(MockBufferFactoryD3D *mockFactory) +{ + MockBufferD3D *mockBufferD3D = new MockBufferD3D(mockFactory); + + EXPECT_CALL(*mockFactory, createVertexBuffer()).WillOnce(Return(nullptr)).RetiresOnSaturation(); + mockBufferD3D->initializeStaticData(); + + return mockBufferD3D; +} + IndexDataManagerPerfTest::IndexDataManagerPerfTest() : ANGLEPerfTest("IndexDataManger", "_run"), - mIndexDataManager(&mMockBufferFactory, rx::RENDERER_D3D11), + mIndexDataManager(&mMockFactory, rx::RENDERER_D3D11), mIndexCount(4000), mBufferSize(mIndexCount * sizeof(GLushort)), - mMockBufferFactory(mBufferSize, GL_UNSIGNED_SHORT), - mMockGLFactory(&mMockBufferFactory), - mIndexBuffer(&mMockGLFactory, 1) + mMockFactory(mBufferSize, GL_UNSIGNED_SHORT), + mIndexBuffer(InitMockBufferD3D(&mMockFactory), 1) { std::vector indexData(mIndexCount); for (GLsizei index = 0; index < mIndexCount; ++index) { indexData[index] = static_cast(index); } - mIndexBuffer.bufferData(GL_ARRAY_BUFFER, &indexData[0], indexData.size() * sizeof(GLushort), - GL_STATIC_DRAW); + mIndexBuffer.bufferData(&indexData[0], indexData.size() * sizeof(GLushort), GL_STATIC_DRAW); } void IndexDataManagerPerfTest::step() @@ -183,4 +172,4 @@ TEST_F(IndexDataManagerPerfTest, Run) run(); } -} // anonymous namespace +} diff --git a/gfx/angle/src/tests/perf_tests/TexturesPerf.cpp b/gfx/angle/src/tests/perf_tests/TexturesPerf.cpp deleted file mode 100644 index 58e1a9ba6..000000000 --- a/gfx/angle/src/tests/perf_tests/TexturesPerf.cpp +++ /dev/null @@ -1,293 +0,0 @@ -// -// Copyright (c) 2016 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. -// -// TexturesPerf: -// Performance test for setting texture state. -// - -#include "ANGLEPerfTest.h" - -#include -#include -#include - -#include "shader_utils.h" - -namespace angle -{ - -struct TexturesParams final : public RenderTestParams -{ - TexturesParams() - { - // Common default params - majorVersion = 2; - minorVersion = 0; - windowWidth = 720; - windowHeight = 720; - iterations = 256; - - numTextures = 8; - textureRebindFrequency = 5; - textureStateUpdateFrequency = 3; - textureMipCount = 8; - } - - std::string suffix() const override; - size_t numTextures; - size_t textureRebindFrequency; - size_t textureStateUpdateFrequency; - size_t textureMipCount; - - // static parameters - size_t iterations; -}; - -std::ostream &operator<<(std::ostream &os, const TexturesParams ¶ms) -{ - os << params.suffix().substr(1); - return os; -} - -std::string TexturesParams::suffix() const -{ - std::stringstream strstr; - - strstr << RenderTestParams::suffix(); - strstr << "_" << numTextures << "_textures"; - strstr << "_" << textureRebindFrequency << "_rebind"; - strstr << "_" << textureStateUpdateFrequency << "_state"; - strstr << "_" << textureMipCount << "_mips"; - - return strstr.str(); -} - -class TexturesBenchmark : public ANGLERenderTest, - public ::testing::WithParamInterface -{ - public: - TexturesBenchmark(); - - void initializeBenchmark() override; - void destroyBenchmark() override; - void drawBenchmark() override; - - private: - void initShaders(); - void initTextures(); - - std::vector mTextures; - - GLuint mProgram; - std::vector mUniformLocations; -}; - -TexturesBenchmark::TexturesBenchmark() : ANGLERenderTest("Textures", GetParam()), mProgram(0u) -{ -} - -void TexturesBenchmark::initializeBenchmark() -{ - const auto ¶ms = GetParam(); - - ASSERT_GT(params.iterations, 0u); - - // Verify the uniform counts are within the limits - GLint maxTextureUnits; - glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &maxTextureUnits); - if (params.numTextures > static_cast(maxTextureUnits)) - { - FAIL() << "Texture count (" << params.numTextures << ")" - << " exceeds maximum texture unit count: " << maxTextureUnits << std::endl; - } - - initShaders(); - initTextures(); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glViewport(0, 0, getWindow()->getWidth(), getWindow()->getHeight()); - - ASSERT_GL_NO_ERROR(); -} - -std::string GetUniformLocationName(size_t idx, bool vertexShader) -{ - std::stringstream strstr; - strstr << (vertexShader ? "vs" : "fs") << "_u_" << idx; - return strstr.str(); -} - -void TexturesBenchmark::initShaders() -{ - const auto ¶ms = GetParam(); - - std::string vs = - "void main()\n" - "{\n" - " gl_Position = vec4(0, 0, 0, 0);\n" - "}\n"; - - std::stringstream fstrstr; - for (size_t i = 0; i < params.numTextures; i++) - { - fstrstr << "uniform sampler2D tex" << i << ";"; - } - fstrstr << "void main()\n" - "{\n" - " gl_FragColor = vec4(0, 0, 0, 0)"; - for (size_t i = 0; i < params.numTextures; i++) - { - fstrstr << "+ texture2D(tex" << i << ", vec2(0, 0))"; - } - fstrstr << ";\n" - "}\n"; - - mProgram = CompileProgram(vs, fstrstr.str()); - ASSERT_NE(0u, mProgram); - - for (size_t i = 0; i < params.numTextures; ++i) - { - std::stringstream uniformName; - uniformName << "tex" << i; - - GLint location = glGetUniformLocation(mProgram, uniformName.str().c_str()); - ASSERT_NE(-1, location); - mUniformLocations.push_back(location); - } - - // Use the program object - glUseProgram(mProgram); -} - -void TexturesBenchmark::initTextures() -{ - const auto ¶ms = GetParam(); - - size_t textureSize = static_cast(1) << params.textureMipCount; - std::vector textureData(textureSize * textureSize * 4); - for (auto &byte : textureData) - { - byte = rand() % 255u; - } - - for (size_t texIndex = 0; texIndex < params.numTextures; texIndex++) - { - GLuint tex = 0; - glGenTextures(1, &tex); - - glActiveTexture(static_cast(GL_TEXTURE0 + texIndex)); - glBindTexture(GL_TEXTURE_2D, tex); - for (size_t mip = 0; mip < params.textureMipCount; mip++) - { - GLsizei levelSize = static_cast(textureSize >> mip); - glTexImage2D(GL_TEXTURE_2D, static_cast(mip), GL_RGBA, levelSize, levelSize, 0, - GL_RGBA, GL_UNSIGNED_BYTE, textureData.data()); - } - mTextures.push_back(tex); - - glUniform1i(mUniformLocations[texIndex], static_cast(texIndex)); - } -} - -void TexturesBenchmark::destroyBenchmark() -{ - glDeleteProgram(mProgram); -} - -void TexturesBenchmark::drawBenchmark() -{ - const auto ¶ms = GetParam(); - - for (size_t it = 0; it < params.iterations; ++it) - { - if (it % params.textureRebindFrequency == 0) - { - // Swap two textures - size_t swapTexture = (it / params.textureRebindFrequency) % (params.numTextures - 1); - - glActiveTexture(static_cast(GL_TEXTURE0 + swapTexture)); - glBindTexture(GL_TEXTURE_2D, mTextures[swapTexture]); - glActiveTexture(static_cast(GL_TEXTURE0 + swapTexture + 1)); - glBindTexture(GL_TEXTURE_2D, mTextures[swapTexture + 1]); - std::swap(mTextures[swapTexture], mTextures[swapTexture + 1]); - } - - if (it % params.textureStateUpdateFrequency == 0) - { - // Update a texture's state - size_t stateUpdateCount = it / params.textureStateUpdateFrequency; - - const size_t numUpdateTextures = 4; - ASSERT_LE(numUpdateTextures, params.numTextures); - - size_t firstTexture = stateUpdateCount % (params.numTextures - numUpdateTextures); - - for (size_t updateTextureIdx = 0; updateTextureIdx < numUpdateTextures; - updateTextureIdx++) - { - size_t updateTexture = firstTexture + updateTextureIdx; - glActiveTexture(static_cast(GL_TEXTURE0 + updateTexture)); - - const GLenum minFilters[] = { - GL_NEAREST, - GL_LINEAR, - GL_NEAREST_MIPMAP_NEAREST, - GL_LINEAR_MIPMAP_NEAREST, - GL_NEAREST_MIPMAP_LINEAR, - GL_LINEAR_MIPMAP_LINEAR, - }; - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - minFilters[stateUpdateCount % ArraySize(minFilters)]); - - const GLenum magFilters[] = { - GL_NEAREST, GL_LINEAR, - }; - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, - magFilters[stateUpdateCount % ArraySize(magFilters)]); - - const GLenum wrapParameters[] = { - GL_CLAMP_TO_EDGE, GL_REPEAT, GL_MIRRORED_REPEAT, - }; - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, - wrapParameters[stateUpdateCount % ArraySize(wrapParameters)]); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, - wrapParameters[stateUpdateCount % ArraySize(wrapParameters)]); - } - } - - glDrawArrays(GL_TRIANGLES, 0, 3); - } - - ASSERT_GL_NO_ERROR(); -} - -TexturesParams D3D11Params() -{ - TexturesParams params; - params.eglParameters = egl_platform::D3D11_NULL(); - return params; -} - -TexturesParams D3D9Params() -{ - TexturesParams params; - params.eglParameters = egl_platform::D3D9_NULL(); - return params; -} - -TexturesParams OpenGLParams() -{ - TexturesParams params; - params.eglParameters = egl_platform::OPENGL_NULL(); - return params; -} - -TEST_P(TexturesBenchmark, Run) -{ - run(); -} - -ANGLE_INSTANTIATE_TEST(TexturesBenchmark, D3D11Params(), D3D9Params(), OpenGLParams()); - -} // namespace angle diff --git a/gfx/angle/src/tests/preprocessor_tests/define_test.cpp b/gfx/angle/src/tests/preprocessor_tests/define_test.cpp index e074d1982..b95a6b4e8 100755 --- a/gfx/angle/src/tests/preprocessor_tests/define_test.cpp +++ b/gfx/angle/src/tests/preprocessor_tests/define_test.cpp @@ -938,51 +938,4 @@ TEST_F(DefineTest, NegativeShiftInLineDirective) EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::PP_UNDEFINED_SHIFT, _, _)).Times(4); EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::PP_INVALID_LINE_NUMBER, _, _)).Times(2); preprocess(input, expected); -} - -// Undefining a macro in its invocation parameters produces and error -TEST_F(DefineTest, UndefineInInvocation) -{ - const char *input = - "#define G(a, b) a b\n" - "G(\n" - "#undef G\n" - "1, 2)\n"; - const char *expected = "\n\n\n1 2\n"; - - EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::PP_MACRO_UNDEFINED_WHILE_INVOKED, - pp::SourceLocation(0, 3), _)); - - preprocess(input, expected); -} - -// Undefining a macro before its invocation parameters produces and error -TEST_F(DefineTest, UndefineInInvocationPreLParen) -{ - const char *input = - "#define G(a, b) a b\n" - "G\n" - "#undef G\n" - "(1, 2)\n"; - const char *expected = "\n\n\n1 2\n"; - - EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::PP_MACRO_UNDEFINED_WHILE_INVOKED, - pp::SourceLocation(0, 3), _)); - - preprocess(input, expected); -} - -// The name of the macro "a" is inside an incomplete macro invocation of macro "m()" in its own -// expansion. This should not result in infinite recursion. -TEST_F(DefineTest, RecursiveMacroNameInsideIncompleteMacroInvocationInMacroExpansion) -{ - const char *input = - "#define m(a)\n" - "#define a m((a)\n" - "a)\n"; - const char *expected = - "\n" - "\n" - "\n"; - preprocess(input, expected); -} +} \ No newline at end of file diff --git a/gfx/angle/src/tests/preprocessor_tests/if_test.cpp b/gfx/angle/src/tests/preprocessor_tests/if_test.cpp index 7940b564a..27bfbbbb4 100755 --- a/gfx/angle/src/tests/preprocessor_tests/if_test.cpp +++ b/gfx/angle/src/tests/preprocessor_tests/if_test.cpp @@ -952,97 +952,3 @@ TEST_F(IfTest, UnterminatedDefinedInMacro2) pp::Token token; mPreprocessor.lex(&token); } - -// Undefined shift: negative shift offset. -TEST_F(IfTest, BitShiftLeftOperatorNegativeOffset) -{ - const char *str = - "#if 2 << -1 == 1\n" - "foo\n" - "#endif\n"; - ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); - - EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::PP_UNDEFINED_SHIFT, pp::SourceLocation(0, 1), "2 << -1")); - - pp::Token token; - mPreprocessor.lex(&token); -} - -// Undefined shift: shift offset is out of range. -TEST_F(IfTest, BitShiftLeftOperatorOffset32) -{ - const char *str = - "#if 2 << 32 == 1\n" - "foo\n" - "#endif\n"; - ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); - - EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::PP_UNDEFINED_SHIFT, pp::SourceLocation(0, 1), "2 << 32")); - - pp::Token token; - mPreprocessor.lex(&token); -} - -// Left hand side of shift is negative. -TEST_F(IfTest, BitShiftLeftOperatorNegativeLHS) -{ - const char *str = - "#if (-2) << 1 == -4\n" - "pass\n" - "#endif\n"; - const char *expected = - "\n" - "pass\n" - "\n"; - - preprocess(str, expected); -} - -// Undefined shift: shift offset is out of range. -TEST_F(IfTest, BitShiftRightOperatorNegativeOffset) -{ - const char *str = - "#if 2 >> -1 == 4\n" - "foo\n" - "#endif\n"; - ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); - - EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::PP_UNDEFINED_SHIFT, pp::SourceLocation(0, 1), "2 >> -1")); - - pp::Token token; - mPreprocessor.lex(&token); -} - -// Undefined shift: shift offset is out of range. -TEST_F(IfTest, BitShiftRightOperatorOffset32) -{ - const char *str = - "#if 2 >> 32 == 0\n" - "foo\n" - "#endif\n"; - ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); - - EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::PP_UNDEFINED_SHIFT, pp::SourceLocation(0, 1), "2 >> 32")); - - pp::Token token; - mPreprocessor.lex(&token); -} - -// Left hand side of shift is negative. -TEST_F(IfTest, BitShiftRightOperatorNegativeLHS) -{ - const char *str = - "#if (-2) >> 1 == 0x7fffffff\n" - "pass\n" - "#endif\n"; - const char *expected = - "\n" - "pass\n" - "\n"; - - preprocess(str, expected); -} diff --git a/gfx/angle/src/tests/test_utils/ANGLETest.cpp b/gfx/angle/src/tests/test_utils/ANGLETest.cpp index 77f1d8dec..1a9d8b50f 100755 --- a/gfx/angle/src/tests/test_utils/ANGLETest.cpp +++ b/gfx/angle/src/tests/test_utils/ANGLETest.cpp @@ -30,6 +30,8 @@ const GLColor GLColor::transparentBlack = GLColor(0u, 0u, 0u, 0u); const GLColor GLColor::white = GLColor(255u, 255u, 255u, 255u); const GLColor GLColor::yellow = GLColor(255u, 255u, 0, 255u); +const GLColor16 GLColor16::white = GLColor16(65535u, 65535u, 65535u, 65535u); + namespace { float ColorNorm(GLubyte channelValue) @@ -136,6 +138,14 @@ GLColor::GLColor(const Vector4 &floatColor) { } +GLColor::GLColor(const GLColor16 &color16) + : R(static_cast(color16.R)), + G(static_cast(color16.G)), + B(static_cast(color16.B)), + A(static_cast(color16.A)) +{ +} + GLColor::GLColor(GLuint colorValue) : R(0), G(0), B(0), A(0) { memcpy(&R, &colorValue, sizeof(GLuint)); @@ -167,6 +177,35 @@ std::ostream &operator<<(std::ostream &ostream, const GLColor &color) return ostream; } +GLColor16::GLColor16() : R(0), G(0), B(0), A(0) +{ +} + +GLColor16::GLColor16(GLushort r, GLushort g, GLushort b, GLushort a) : R(r), G(g), B(b), A(a) +{ +} + +GLColor16 ReadColor16(GLint x, GLint y) +{ + GLColor16 actual; + glReadPixels((x), (y), 1, 1, GL_RGBA, GL_UNSIGNED_SHORT, &actual.R); + EXPECT_GL_NO_ERROR(); + return actual; +} + +bool operator==(const GLColor16 &a, const GLColor16 &b) +{ + return a.R == b.R && a.G == b.G && a.B == b.B && a.A == b.A; +} + +std::ostream &operator<<(std::ostream &ostream, const GLColor16 &color) +{ + ostream << "(" << static_cast(color.R) << ", " + << static_cast(color.G) << ", " << static_cast(color.B) + << ", " << static_cast(color.A) << ")"; + return ostream; +} + } // namespace angle // static @@ -549,14 +588,6 @@ bool ANGLETest::eglClientExtensionEnabled(const std::string &extName) return checkExtensionExists(eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS), extName); } -bool ANGLETest::eglDeviceExtensionEnabled(EGLDeviceEXT device, const std::string &extName) -{ - PFNEGLQUERYDEVICESTRINGEXTPROC eglQueryDeviceStringEXT = - reinterpret_cast( - eglGetProcAddress("eglQueryDeviceStringEXT")); - return checkExtensionExists(eglQueryDeviceStringEXT(device, EGL_EXTENSIONS), extName); -} - void ANGLETest::setWindowWidth(int width) { mWidth = width; @@ -612,16 +643,6 @@ void ANGLETest::setNoErrorEnabled(bool enabled) mEGLWindow->setNoErrorEnabled(enabled); } -void ANGLETest::setWebGLCompatibilityEnabled(bool webglCompatibility) -{ - mEGLWindow->setWebGLCompatibilityEnabled(webglCompatibility); -} - -void ANGLETest::setBindGeneratesResource(bool bindGeneratesResource) -{ - mEGLWindow->setBindGeneratesResource(bindGeneratesResource); -} - int ANGLETest::getClientMajorVersion() const { return mEGLWindow->getClientMajorVersion(); @@ -794,20 +815,6 @@ bool IsWindows() #endif } -bool IsDebug() -{ -#if !defined(NDEBUG) - return true; -#else - return false; -#endif -} - -bool IsRelease() -{ - return !IsDebug(); -} - EGLint ANGLETest::getPlatformRenderer() const { assert(mEGLWindow); diff --git a/gfx/angle/src/tests/test_utils/ANGLETest.h b/gfx/angle/src/tests/test_utils/ANGLETest.h index a1bef48e6..b735887d6 100755 --- a/gfx/angle/src/tests/test_utils/ANGLETest.h +++ b/gfx/angle/src/tests/test_utils/ANGLETest.h @@ -59,11 +59,14 @@ struct GLColorRGB static const GLColorRGB yellow; }; +struct GLColor16; + struct GLColor { GLColor(); GLColor(GLubyte r, GLubyte g, GLubyte b, GLubyte a); GLColor(const Vector4 &floatColor); + GLColor(const GLColor16 &color16); GLColor(GLuint colorValue); Vector4 toNormalizedVector() const; @@ -92,6 +95,28 @@ bool operator==(const GLColor &a, const GLColor &b); std::ostream &operator<<(std::ostream &ostream, const GLColor &color); GLColor ReadColor(GLint x, GLint y); +struct GLColor16 +{ + GLColor16(); + GLColor16(GLushort r, GLushort g, GLushort b, GLushort a); + + GLushort R, G, B, A; + + static const GLColor16 white; +}; + +// Useful to cast any type to GLushort. +template +GLColor16 MakeGLColor16(TR r, TG g, TB b, TA a) +{ + return GLColor16(static_cast(r), static_cast(g), static_cast(b), + static_cast(a)); +} + +bool operator==(const GLColor16 &a, const GLColor16 &b); +std::ostream &operator<<(std::ostream &ostream, const GLColor16 &color); +GLColor16 ReadColor16(GLint x, GLint y); + } // namespace angle #define EXPECT_PIXEL_EQ(x, y, r, g, b, a) \ @@ -116,6 +141,8 @@ GLColor ReadColor(GLint x, GLint y); #define EXPECT_PIXEL_COLOR_NEAR(x, y, angleColor, abs_error) \ EXPECT_PIXEL_NEAR(x, y, angleColor.R, angleColor.G, angleColor.B, angleColor.A, abs_error) +#define EXPECT_PIXEL_COLOR16_EQ(x, y, angleColor) EXPECT_EQ(angleColor, angle::ReadColor16(x, y)) + #define EXPECT_COLOR_NEAR(expected, actual, abs_error) \ \ { \ @@ -172,7 +199,6 @@ class ANGLETest : public ::testing::TestWithParam static GLuint compileShader(GLenum type, const std::string &source); static bool extensionEnabled(const std::string &extName); static bool eglClientExtensionEnabled(const std::string &extName); - static bool eglDeviceExtensionEnabled(EGLDeviceEXT device, const std::string &extName); void setWindowWidth(int width); void setWindowHeight(int height); @@ -185,8 +211,6 @@ class ANGLETest : public ::testing::TestWithParam void setMultisampleEnabled(bool enabled); void setDebugEnabled(bool enabled); void setNoErrorEnabled(bool enabled); - void setWebGLCompatibilityEnabled(bool webglCompatibility); - void setBindGeneratesResource(bool bindGeneratesResource); int getClientMajorVersion() const; int getClientMinorVersion() const; @@ -253,22 +277,7 @@ bool IsLinux(); bool IsOSX(); bool IsWindows(); -// Debug/Release -bool IsDebug(); -bool IsRelease(); - // Negative tests may trigger expected errors/warnings in the ANGLE Platform. void IgnoreANGLEPlatformMessages(); -// Note: git cl format messes up this formatting. -#define ANGLE_SKIP_TEST_IF(COND) \ - \ -if(COND) \ - \ -{ \ - std::cout << "Test skipped: " #COND "." << std::endl; \ - return; \ - \ -} - #endif // ANGLE_TESTS_ANGLE_TEST_H_ diff --git a/gfx/angle/src/tests/test_utils/compiler_test.cpp b/gfx/angle/src/tests/test_utils/compiler_test.cpp index 873541ecd..ea758b893 100755 --- a/gfx/angle/src/tests/test_utils/compiler_test.cpp +++ b/gfx/angle/src/tests/test_utils/compiler_test.cpp @@ -11,79 +11,16 @@ #include "angle_gl.h" #include "compiler/translator/Compiler.h" -namespace sh -{ - -namespace -{ - -class ShaderVariableFinder : public TIntermTraverser -{ - public: - ShaderVariableFinder(const TString &variableName, TBasicType basicType) - : TIntermTraverser(true, false, false), - mVariableName(variableName), - mNodeFound(nullptr), - mBasicType(basicType) - { - } - - void visitSymbol(TIntermSymbol *node) - { - if (node->getBasicType() == mBasicType && node->getSymbol() == mVariableName) - { - mNodeFound = node; - } - } - - bool isFound() const { return mNodeFound != nullptr; } - const TIntermSymbol *getNode() const { return mNodeFound; } - - private: - TString mVariableName; - TIntermSymbol *mNodeFound; - TBasicType mBasicType; -}; - -class FunctionCallFinder : public TIntermTraverser -{ - public: - FunctionCallFinder(const TString &functionName) - : TIntermTraverser(true, false, false), mFunctionName(functionName), mNodeFound(nullptr) - { - } - - bool visitAggregate(Visit visit, TIntermAggregate *node) override - { - if (node->getOp() == EOpFunctionCall && - node->getFunctionSymbolInfo()->getName() == mFunctionName) - { - mNodeFound = node; - return false; - } - return true; - } - - bool isFound() const { return mNodeFound != nullptr; } - const TIntermAggregate *getNode() const { return mNodeFound; } - - private: - TString mFunctionName; - TIntermAggregate *mNodeFound; -}; - -} // anonymous namespace - bool compileTestShader(GLenum type, ShShaderSpec spec, ShShaderOutput output, const std::string &shaderString, ShBuiltInResources *resources, - ShCompileOptions compileOptions, + int compileOptions, std::string *translatedCode, std::string *infoLog) { - sh::TCompiler *translator = sh::ConstructCompiler(type, spec, output); + TCompiler *translator = ConstructCompiler(type, spec, output); if (!translator->Init(*resources)) { SafeDelete(translator); @@ -106,21 +43,21 @@ bool compileTestShader(GLenum type, ShShaderSpec spec, ShShaderOutput output, const std::string &shaderString, - ShCompileOptions compileOptions, + int compileOptions, std::string *translatedCode, std::string *infoLog) { ShBuiltInResources resources; - sh::InitBuiltInResources(&resources); + ShInitBuiltInResources(&resources); return compileTestShader(type, spec, output, shaderString, &resources, compileOptions, translatedCode, infoLog); } MatchOutputCodeTest::MatchOutputCodeTest(GLenum shaderType, - ShCompileOptions defaultCompileOptions, + int defaultCompileOptions, ShShaderOutput outputType) : mShaderType(shaderType), mDefaultCompileOptions(defaultCompileOptions) { - sh::InitBuiltInResources(&mResources); + ShInitBuiltInResources(&mResources); mOutputCode[outputType] = std::string(); } @@ -139,8 +76,7 @@ void MatchOutputCodeTest::compile(const std::string &shaderString) compile(shaderString, mDefaultCompileOptions); } -void MatchOutputCodeTest::compile(const std::string &shaderString, - const ShCompileOptions compileOptions) +void MatchOutputCodeTest::compile(const std::string &shaderString, const int compileOptions) { std::string infoLog; for (auto &code : mOutputCode) @@ -156,7 +92,7 @@ void MatchOutputCodeTest::compile(const std::string &shaderString, bool MatchOutputCodeTest::compileWithSettings(ShShaderOutput output, const std::string &shaderString, - const ShCompileOptions compileOptions, + const int compileOptions, std::string *translatedCode, std::string *infoLog) { @@ -236,21 +172,3 @@ bool MatchOutputCodeTest::notFoundInCode(const char *stringToFind) const } return true; } - -const TIntermSymbol *FindSymbolNode(TIntermNode *root, - const TString &symbolName, - TBasicType basicType) -{ - ShaderVariableFinder finder(symbolName, basicType); - root->traverse(&finder); - return finder.getNode(); -} - -const TIntermAggregate *FindFunctionCallNode(TIntermNode *root, const TString &functionName) -{ - FunctionCallFinder finder(functionName); - root->traverse(&finder); - return finder.getNode(); -} - -} // namespace sh diff --git a/gfx/angle/src/tests/test_utils/compiler_test.h b/gfx/angle/src/tests/test_utils/compiler_test.h index a0dd2d82a..3dd86b43c 100755 --- a/gfx/angle/src/tests/test_utils/compiler_test.h +++ b/gfx/angle/src/tests/test_utils/compiler_test.h @@ -11,21 +11,16 @@ #include -#include "gtest/gtest.h" - #include "angle_gl.h" -#include "compiler/translator/TranslatorESSL.h" +#include "gtest/gtest.h" #include "GLSLANG/ShaderLang.h" -namespace sh -{ - bool compileTestShader(GLenum type, ShShaderSpec spec, ShShaderOutput output, const std::string &shaderString, ShBuiltInResources *resources, - ShCompileOptions compileOptions, + int compileOptions, std::string *translatedCode, std::string *infoLog); @@ -33,16 +28,14 @@ bool compileTestShader(GLenum type, ShShaderSpec spec, ShShaderOutput output, const std::string &shaderString, - ShCompileOptions compileOptions, + int compileOptions, std::string *translatedCode, std::string *infoLog); class MatchOutputCodeTest : public testing::Test { protected: - MatchOutputCodeTest(GLenum shaderType, - ShCompileOptions defaultCompileOptions, - ShShaderOutput outputType); + MatchOutputCodeTest(GLenum shaderType, int defaultCompileOptions, ShShaderOutput outputType); void addOutputType(const ShShaderOutput outputType); @@ -50,7 +43,7 @@ class MatchOutputCodeTest : public testing::Test // Compile functions clear any results from earlier calls to them. void compile(const std::string &shaderString); - void compile(const std::string &shaderString, const ShCompileOptions compileOptions); + void compile(const std::string &shaderString, const int compileOptions); bool foundInESSLCode(const char *stringToFind) const { @@ -81,23 +74,15 @@ class MatchOutputCodeTest : public testing::Test private: bool compileWithSettings(ShShaderOutput output, const std::string &shaderString, - ShCompileOptions compileOptions, + int compileOptions, std::string *translatedCode, std::string *infoLog); GLenum mShaderType; - ShCompileOptions mDefaultCompileOptions; + int mDefaultCompileOptions; ShBuiltInResources mResources; std::map mOutputCode; }; -const TIntermSymbol *FindSymbolNode(TIntermNode *root, - const TString &symbolName, - TBasicType basicType); - -// Returns a pointer to a function call node with a mangled name functionName. -const TIntermAggregate *FindFunctionCallNode(TIntermNode *root, const TString &functionName); -} - #endif // TESTS_TEST_UTILS_COMPILER_TEST_H_ diff --git a/gfx/angle/src/tests/test_utils/gl_raii.h b/gfx/angle/src/tests/test_utils/gl_raii.h index b42a56396..9adc0cf02 100755 --- a/gfx/angle/src/tests/test_utils/gl_raii.h +++ b/gfx/angle/src/tests/test_utils/gl_raii.h @@ -46,7 +46,6 @@ using GLBuffer = GLWrapper; using GLTexture = GLWrapper; using GLFramebuffer = GLWrapper; using GLRenderbuffer = GLWrapper; -using GLSampler = GLWrapper; class GLProgram { diff --git a/gfx/angle/src/tests/tests.gyp b/gfx/angle/src/tests/tests.gyp index 3401e994b..c2d18e789 100755 --- a/gfx/angle/src/tests/tests.gyp +++ b/gfx/angle/src/tests/tests.gyp @@ -6,7 +6,7 @@ 'includes': [ 'deqp.gypi', - '../../gyp/common_defines.gypi', + '../../build/common_defines.gypi', ], 'variables': { @@ -68,15 +68,15 @@ { 'target_name': 'angle_internal_gtest', 'type': 'static_library', - 'includes': [ '../../gyp/common_defines.gypi', ], + 'includes': [ '../../build/common_defines.gypi', ], 'include_dirs': [ - '<(angle_path)/testing/gtest', - '<(angle_path)/testing/gtest/include', + 'third_party/googletest', + 'third_party/googletest/include', ], 'sources': [ - '<(angle_path)/testing/gtest/src/gtest-all.cc', + 'third_party/googletest/src/gtest-all.cc', ], 'defines': [ @@ -90,8 +90,8 @@ ], 'include_dirs': [ - '<(angle_path)/testing/gtest', - '<(angle_path)/testing/gtest/include', + 'third_party/googletest', + 'third_party/googletest/include', ], }, }, @@ -99,16 +99,16 @@ { 'target_name': 'angle_internal_gmock', 'type': 'static_library', - 'includes': [ '../../gyp/common_defines.gypi', ], + 'includes': [ '../../build/common_defines.gypi', ], 'include_dirs': [ - '<(angle_path)/testing/gmock', - '<(angle_path)/testing/gmock/include', - '<(angle_path)/testing/gtest/include', + 'third_party/googlemock', + 'third_party/googlemock/include', + 'third_party/googletest/include', ], 'sources': [ - '<(angle_path)/testing/gmock/src/gmock-all.cc', + 'third_party/googlemock/src/gmock-all.cc', ], 'defines': [ @@ -122,9 +122,9 @@ ], 'include_dirs': [ - '<(angle_path)/testing/gmock', - '<(angle_path)/testing/gmock/include', - '<(angle_path)/testing/gtest/include', + 'third_party/googlemock', + 'third_party/googlemock/include', + 'third_party/googletest/include', ], }, }, @@ -137,7 +137,7 @@ 'type': 'executable', 'includes': [ - '../../gyp/common_defines.gypi', + '../../build/common_defines.gypi', 'angle_unittests.gypi', ], 'sources': @@ -170,7 +170,7 @@ 'type': 'executable', 'includes': [ - '../../gyp/common_defines.gypi', + '../../build/common_defines.gypi', 'angle_end2end_tests.gypi', ], 'sources': @@ -183,7 +183,7 @@ 'type': 'executable', 'includes': [ - '../../gyp/common_defines.gypi', + '../../build/common_defines.gypi', 'angle_perftests.gypi', ], 'sources': @@ -210,7 +210,7 @@ { 'target_name': 'angle_gles2_conformance_tests', 'type': 'executable', - 'includes': [ '../../gyp/common_defines.gypi', ], + 'includes': [ '../../build/common_defines.gypi', ], 'dependencies': [ '<(angle_path)/src/angle.gyp:libGLESv2', @@ -277,7 +277,7 @@ { 'target_name': 'angle_gles3_conformance_tests', 'type': 'executable', - 'includes': [ '../../gyp/common_defines.gypi', ], + 'includes': [ '../../build/common_defines.gypi', ], 'dependencies': [ '<(angle_path)/src/angle.gyp:libGLESv2', diff --git a/gfx/angle/src/tests/third_party/gpu_test_expectations/HowToMakeChanges.md b/gfx/angle/src/tests/third_party/gpu_test_expectations/HowToMakeChanges.md index 190a3e9c3..7817d0a50 100755 --- a/gfx/angle/src/tests/third_party/gpu_test_expectations/HowToMakeChanges.md +++ b/gfx/angle/src/tests/third_party/gpu_test_expectations/HowToMakeChanges.md @@ -1,4 +1,4 @@ -Because the ```gpu_test_expectations``` directory is based on parts of Chromium's ```gpu/config``` +Because the ```gpu_test_expectations``` directory is based on parts of Chromium's ```gpu/config`` directory, we want to keep a patch of the changes added to make it compile with ANGLE. This will allow us to merge Chromium changes easily in our ```gpu_test_expectations```. diff --git a/gfx/angle/src/tests/third_party/gpu_test_expectations/angle-mods.patch b/gfx/angle/src/tests/third_party/gpu_test_expectations/angle-mods.patch index 8df858c7c..c00efc081 100755 --- a/gfx/angle/src/tests/third_party/gpu_test_expectations/angle-mods.patch +++ b/gfx/angle/src/tests/third_party/gpu_test_expectations/angle-mods.patch @@ -1,6 +1,6 @@ diff -rupN gpu_test_expectations_reverted/angle_config.h gpu_test_expectations/angle_config.h --- gpu_test_expectations_reverted/angle_config.h 1969-12-31 19:00:00.000000000 -0500 -+++ gpu_test_expectations/angle_config.h 2016-08-23 13:50:18.282742505 -0400 ++++ gpu_test_expectations/angle_config.h 2016-08-22 16:13:08.739352282 -0400 @@ -0,0 +1,66 @@ +// +// Copyright 2015 The ANGLE Project Authors. All rights reserved. @@ -275,7 +275,7 @@ diff -rupN gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gpu_i virtual void BeginGPUDevice() = 0; diff -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expectations/gpu_test_config.cc --- gpu_test_expectations_reverted/gpu_test_config.cc 2016-08-12 21:23:54.884132405 -0400 -+++ gpu_test_expectations/gpu_test_config.cc 2016-09-09 16:40:05.597864465 -0400 ++++ gpu_test_expectations/gpu_test_config.cc 2016-08-22 16:09:09.972124940 -0400 @@ -2,20 +2,205 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -302,8 +302,8 @@ diff -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expectatio -#elif defined(OS_WIN) -#include "base/win/windows_version.h" +#include "gpu_test_config_mac.h" -+#endif -+ + #endif + +using namespace gpu; + +#if defined(OS_WIN) @@ -476,8 +476,8 @@ diff -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expectatio + return kCollectInfoNonFatalFailure; +} + - #endif - ++#endif ++ +#if defined(OS_ANDROID) +CollectInfoResult CollectGpuID(uint32 *vendor_id, uint32 *device_id) +{ @@ -491,72 +491,7 @@ diff -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expectatio namespace gpu { namespace { -@@ -245,33 +430,41 @@ bool GPUTestBotConfig::Matches(const std - return Matches(config); - } - --bool GPUTestBotConfig::LoadCurrentConfig(const GPUInfo* gpu_info) { -- bool rt; -- if (gpu_info == NULL) { -- GPUInfo my_gpu_info; -- CollectInfoResult result = CollectGpuID( -- &my_gpu_info.gpu.vendor_id, &my_gpu_info.gpu.device_id); -- if (result != kCollectInfoSuccess) { -- LOG(ERROR) << "Fail to identify GPU"; -- DisableGPUInfoValidation(); -- rt = true; -- } else { -- rt = SetGPUInfo(my_gpu_info); -+bool GPUTestBotConfig::LoadCurrentConfig(const GPUInfo *gpu_info) -+{ -+ bool rt; -+ if (gpu_info == NULL) -+ { -+ GPUInfo my_gpu_info; -+ CollectInfoResult result = -+ CollectGpuID(&my_gpu_info.gpu.vendor_id, &my_gpu_info.gpu.device_id); -+ if (result != kCollectInfoSuccess) -+ { -+ LOG(ERROR) << "Fail to identify GPU\n"; -+ DisableGPUInfoValidation(); -+ rt = true; -+ } -+ else -+ { -+ rt = SetGPUInfo(my_gpu_info); -+ } -+ } -+ else -+ { -+ rt = SetGPUInfo(*gpu_info); -+ } -+ set_os(GetCurrentOS()); -+ if (os() == kOsUnknown) -+ { -+ LOG(ERROR) << "Unknown OS\n"; -+ rt = false; - } -- } else { -- rt = SetGPUInfo(*gpu_info); -- } -- set_os(GetCurrentOS()); -- if (os() == kOsUnknown) { -- LOG(ERROR) << "Unknown OS"; -- rt = false; -- } - #if defined(NDEBUG) -- set_build_type(kBuildTypeRelease); -+ set_build_type(kBuildTypeRelease); - #else -- set_build_type(kBuildTypeDebug); -+ set_build_type(kBuildTypeDebug); - #endif -- return rt; -+ return rt; - } - - // static -@@ -295,21 +488,5 @@ bool GPUTestBotConfig::CurrentConfigMatc +@@ -295,21 +480,5 @@ bool GPUTestBotConfig::CurrentConfigMatc return false; } @@ -842,9 +777,9 @@ diff -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.h gpu_tes const std::vector& GetErrorMessages() const; diff -rupN gpu_test_expectations_reverted/HowToMakeChanges.md gpu_test_expectations/HowToMakeChanges.md --- gpu_test_expectations_reverted/HowToMakeChanges.md 1969-12-31 19:00:00.000000000 -0500 -+++ gpu_test_expectations/HowToMakeChanges.md 2016-09-09 16:27:56.575809921 -0400 ++++ gpu_test_expectations/HowToMakeChanges.md 2016-08-22 15:52:38.098728514 -0400 @@ -0,0 +1,22 @@ -+Because the ```gpu_test_expectations``` directory is based on parts of Chromium's ```gpu/config``` ++Because the ```gpu_test_expectations``` directory is based on parts of Chromium's ```gpu/config`` +directory, we want to keep a patch of the changes added to make it compile with ANGLE. This +will allow us to merge Chromium changes easily in our ```gpu_test_expectations```. + diff --git a/gfx/angle/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc b/gfx/angle/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc index f0bf6f063..84558e3e9 100755 --- a/gfx/angle/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc +++ b/gfx/angle/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc @@ -430,41 +430,33 @@ bool GPUTestBotConfig::Matches(const std::string& config_data) const { return Matches(config); } -bool GPUTestBotConfig::LoadCurrentConfig(const GPUInfo *gpu_info) -{ - bool rt; - if (gpu_info == NULL) - { - GPUInfo my_gpu_info; - CollectInfoResult result = - CollectGpuID(&my_gpu_info.gpu.vendor_id, &my_gpu_info.gpu.device_id); - if (result != kCollectInfoSuccess) - { - LOG(ERROR) << "Fail to identify GPU\n"; - DisableGPUInfoValidation(); - rt = true; - } - else - { - rt = SetGPUInfo(my_gpu_info); - } - } - else - { - rt = SetGPUInfo(*gpu_info); - } - set_os(GetCurrentOS()); - if (os() == kOsUnknown) - { - LOG(ERROR) << "Unknown OS\n"; - rt = false; +bool GPUTestBotConfig::LoadCurrentConfig(const GPUInfo* gpu_info) { + bool rt; + if (gpu_info == NULL) { + GPUInfo my_gpu_info; + CollectInfoResult result = CollectGpuID( + &my_gpu_info.gpu.vendor_id, &my_gpu_info.gpu.device_id); + if (result != kCollectInfoSuccess) { + LOG(ERROR) << "Fail to identify GPU"; + DisableGPUInfoValidation(); + rt = true; + } else { + rt = SetGPUInfo(my_gpu_info); } + } else { + rt = SetGPUInfo(*gpu_info); + } + set_os(GetCurrentOS()); + if (os() == kOsUnknown) { + LOG(ERROR) << "Unknown OS"; + rt = false; + } #if defined(NDEBUG) - set_build_type(kBuildTypeRelease); + set_build_type(kBuildTypeRelease); #else - set_build_type(kBuildTypeDebug); + set_build_type(kBuildTypeDebug); #endif - return rt; + return rt; } // static diff --git a/gfx/angle/src/third_party/compiler/ArrayBoundsClamper.cpp b/gfx/angle/src/third_party/compiler/ArrayBoundsClamper.cpp index aadb87553..fa6c8b8d7 100755 --- a/gfx/angle/src/third_party/compiler/ArrayBoundsClamper.cpp +++ b/gfx/angle/src/third_party/compiler/ArrayBoundsClamper.cpp @@ -38,11 +38,7 @@ const char* kIntClampBegin = "// BEGIN: Generated code for array bounds clamping const char* kIntClampEnd = "// END: Generated code for array bounds clamping\n\n"; const char* kIntClampDefinition = "int webgl_int_clamp(int value, int minValue, int maxValue) { return ((value < minValue) ? minValue : ((value > maxValue) ? maxValue : value)); }\n\n"; -namespace sh -{ - -namespace -{ +namespace { class ArrayBoundsClamperMarker : public TIntermTraverser { public: @@ -109,5 +105,3 @@ void ArrayBoundsClamper::OutputClampingFunctionDefinition(TInfoSinkBase& out) co } out << kIntClampBegin << kIntClampDefinition << kIntClampEnd; } - -} // namespace sh diff --git a/gfx/angle/src/third_party/compiler/ArrayBoundsClamper.h b/gfx/angle/src/third_party/compiler/ArrayBoundsClamper.h index a4c407f76..27917e6ee 100755 --- a/gfx/angle/src/third_party/compiler/ArrayBoundsClamper.h +++ b/gfx/angle/src/third_party/compiler/ArrayBoundsClamper.h @@ -29,12 +29,8 @@ #include "compiler/translator/InfoSink.h" #include "compiler/translator/IntermNode.h" -namespace sh -{ - -class ArrayBoundsClamper -{ - public: +class ArrayBoundsClamper { +public: ArrayBoundsClamper(); // Must be set before compiling any shaders to ensure consistency @@ -61,6 +57,4 @@ private: bool mArrayBoundsClampDefinitionNeeded; }; -} // namespace sh - #endif // THIRD_PARTY_COMPILER_ARRAYBOUNDSCLAMPER_H_ -- cgit v1.2.3