Log

Author Commit Date CI Message
Geoff Lang b11ad26b 2015-04-09T14:43:34 Implement FenceNVGL. BUG=angleproject:888 Change-Id: Iea6993fe5459cf829f4bd23b0df5e223f22903f5 Reviewed-on: https://chromium-review.googlesource.com/264989 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 7d433ddc 2015-04-02T11:21:20 Implement FenceSyncGL. BUG=angleproject:888 Change-Id: Ie811266ed1cb08d29344fb11cd9afe77f9587cd7 Reviewed-on: https://chromium-review.googlesource.com/263654 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang a4903b70 2015-03-02T16:02:48 Support multisampled framebuffers with the GL backend. Move validation of sample counts into the Renderbuffer implementations because the exact supported sample counts are not always known. BUG=angleoproject:886 Change-Id: I9c90d9d435e940b852343a29a6aa11d6cb1ad23b Reviewed-on: https://chromium-review.googlesource.com/255513 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 02bce6e5 2015-04-20T12:53:25 D3D11: Filter HRESULT error code properly. The Windows helper function HRESULT_CODE masks out some bits that obscure the error code. This could be why we're seeing some undetermined errors in our logs. BUG=477701 Change-Id: I6eee442c149c2568e3823edc538d365b06ee20d8 Reviewed-on: https://chromium-review.googlesource.com/266375 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Andrew Knight da06fac2 2015-03-19T09:27:04 Add missing end-of-file newlines Change-Id: I664e40f8d3f2276d5964b111d066861540010b43 Reviewed-on: https://chromium-review.googlesource.com/260791 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Andrew Knight cb3cc805 2015-04-01T11:28:54 Update The Qt Company in AUTHORS/CONTRIBUTORS Change-Id: Iaa923e48d26eb1044d02ac097cc6caa1986309cf Reviewed-on: https://chromium-review.googlesource.com/263400 Tested-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Arun Patole 97dc22e0 2015-04-06T17:35:38 Support constant folding of common built-ins This change adds constant folding support for unary common built-ins: abs, sign, floor, trunc, round, roundEven, ceil and fract. BUG=angleproject:913 TEST= dEQP tests dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.common* (80 out of 210 tests started passing with this change) Change-Id: I46312fec43084601d4fca8195ddaaa5292f1c02a Reviewed-on: https://chromium-review.googlesource.com/265967 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang be2adeac 2015-04-17T16:17:28 Temporarily disable UniformArrayLocations test on Intel OpenGL. BUG=angleproject:882 Change-Id: Idd5cb8c794bbeec162f65255231fe2ae0180bdf8 Reviewed-on: https://chromium-review.googlesource.com/266180 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 8d95b741 2015-04-17T18:44:13 Revert "Support constant folding of exponential built-ins" Causing compile errors on Android: ../../third_party/angle/src/compiler/translator/IntermNode.cpp:1309:62: error: use of undeclared identifier 'log2f' else if (!foldFloatTypeUnary(unionArray[i], &log2f, infoSink, &tempConstArray[i])) This reverts commit 1623a1b90f24cd1afd8839c0726ad276a887fbda. Change-Id: If9c45aea85801eb11e7d1513b4183ec11289d2f3 Reviewed-on: https://chromium-review.googlesource.com/266154 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f17959aa 2015-04-17T13:04:20 D3D11: Record more explicit error codes in Renderer init. Our data shows the most common D3D11CreateDevice failure as being 'other error'. Explicitly enumerate more error codes so we can figure out which value we're getting. BUG=47701 Change-Id: Ibcda5e8ff1bb0368b1bfe3c8e7e3ffbb404771ce Reviewed-on: https://chromium-review.googlesource.com/265939 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5ed74cfd 2015-04-14T13:57:07 Fix uniform locations in ProgramGL. ProgramGL was unable to handle uniform arrays and improperly set uniform locations. It now queries the driver for the location of each uniform and iterates over all array elements. BUG=angleproject:882 Change-Id: Iffe9d12944b2399f19f4a7823df2f535a430d6e3 Reviewed-on: https://chromium-review.googlesource.com/265724 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Arun Patole 1623a1b9 2015-04-06T17:29:48 Support constant folding of exponential built-ins This change adds constant folding support for unary exponential built-ins - exp, log, exp2, log2, sqrt and inversesqrt. BUG=angleproject:913 TEST= dEQP tests dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.exponential* (48 out of 56 tests started passing with this change) Change-Id: I63133ee8c04c4a8d6cb30da5788e9227c05d4cbe Reviewed-on: https://chromium-review.googlesource.com/266071 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Arun Patole 9dea48f3 2015-04-02T11:45:09 Support constant folding of trigonometry built-ins This change adds constant folding support for trigonometry built-in functions. Constant folding for these functions also fixes constant expression issues where constant initializer is a built-in trignometry function whose arguments are all constant expressions. BUG=angleproject:913 TEST= dEQP tests dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.angle_and_trigonometry* (112 out of 120 tests pass with this change) Change-Id: I2b7a61320819dcd095827faa1fd16e835f4688b4 Reviewed-on: https://chromium-review.googlesource.com/265819 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 56c6e3cb 2015-04-15T10:18:05 Micro-optimize ValidateDrawBase. This speeds up our draw call benchmark. BUG=angleproject:959 Change-Id: I9a916a6c344493cc96873ae5f4ec337c181dc487 Reviewed-on: https://chromium-review.googlesource.com/266026 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill eea3a6e0 2015-04-15T10:02:48 Micro-optimize State::hasMappedBuffer. This speeds up draw call validation. BUG=angleproject:959 Change-Id: I8272e36201521f158823739a6604444fb5e66b6e Reviewed-on: https://chromium-review.googlesource.com/266025 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho cd94ef96 2015-04-16T19:18:10 Fix style issues in updateTree() "entry" is an old C keyword, so it's better not to use it as a variable name. Also fix a few other minor style issues in the code. TEST=angle_unittests BUG=angleproject:941 Change-Id: I59470555227985262b3e914ff6ca11e88d15fd8c Reviewed-on: https://chromium-review.googlesource.com/265647 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 87717702 2015-04-13T13:50:24 Add an IndexDataManager perf test. This microbenchmark tests the time at which we find index ranges in the cache, and how long the call to prepareIndexData might take. It also verifies we successfully store index ranges in the cache. BUG=angleproject:956 Change-Id: I0f1b0c00daa73d8e1bcde197d9de80ca229078b7 Reviewed-on: https://chromium-review.googlesource.com/262779 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho ffe6edfd 2015-04-13T17:32:03 Add basic support for the length() method of arrays Support expressions where the expression that .length() is called on does not have side effects. Tested with WebGL 2 test sdk/tests/deqp/data/gles3/shaders/arrays.html TEST=WebGL 2 conformance tests BUG=angleproject:972 Change-Id: Ib4f8377a51da61179b6e47fbcf6b4d915e351fbd Reviewed-on: https://chromium-review.googlesource.com/265654 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho a2d53039 2015-04-15T14:14:44 Disallow ternary operator on arrays and structs ESSL specs only allow a limited number of operators on arrays and structs. The spec section on the ternary operator contradicts this to an extent, saying that the second and third operands can be "any type" or "any type other than an array", but we interpret the spec so that the operator restrictions on structures and arrays override this. BUG=angleproject:976 TEST=angle_unittests Change-Id: Icd90d5450dcb94bb23b1683d4cb9e579e82de4ad Reviewed-on: https://chromium-review.googlesource.com/265644 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 5290174b 2015-04-15T13:42:45 Refactor ternary operator parsing Refactor ternary operator parsing so that validation is done in ParseContext and Intermediate's role is simply to create the node added to the tree. Remove partially bugged checks for null nodes as a part of this - in error cases the parser doesn't typically add null nodes to the tree, but rather always has a fallback to add a dummy node if parsing fails as a method of recovery. When parsing ternary operators it should be guaranteed that none of the parameter nodes is null. Includes a better explanation of why ternary operators are not always folded when only the condition is constant, and a test to make sure this doesn't regress. BUG=angleproject:952 TEST=WebGL conformance tests, angle_unittests Change-Id: Icbcb721b5ab36cf314a16e79f9814aef1f355fa0 Reviewed-on: https://chromium-review.googlesource.com/265643 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill b48e8b07 2015-04-15T14:26:37 D3D11: Only rewrite for primitive restart when needed. We would rewrite our index data every draw call. Change the index check to see if we're writing to the same sized / typed static buffer and only rewrite the data if the user re-uploaded. Also add a performance test for the primitive restart workaround. As a future improvement we could avoid creating new D3D objects every time we reinitialize static data, since BufferSubData calls don't change the size of the buffer if the index type remains the same. BUG=476658 Change-Id: I9d2540ad8b1b34fa0142ba0bf794cf572da8c61d Reviewed-on: https://chromium-review.googlesource.com/265838 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Jamie Madill 304dcde8 2015-04-15T14:26:36 perftests: Use gtest asserts macro helpers. We still were using the old cassert code, with a boolean return value on our initialization code. We can make use of the gtest macros and helpers to check for a successful init or GL errors. BUG=476658 Change-Id: I09cbb3d40748cbeaf530ae8f23fb8a1b07e7611f Reviewed-on: https://chromium-review.googlesource.com/265837 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Jamie Madill 55ae4142 2015-04-15T14:26:35 Update WebGL CTS expectations. Change-Id: I4f51fdb1e23effa0069f1dd1e84b95b3a313f678 Reviewed-on: https://chromium-review.googlesource.com/265836 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 045536bf 2015-03-27T15:17:18 Store current transform feedback buffer bindings in the object itself. BUG=angleproject:763 Change-Id: I76565f68fa8145da29713de2a517a39a8d50a24b Reviewed-on: https://chromium-review.googlesource.com/263061 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang bb0a0bbd 2015-03-27T12:16:57 Rename TransformFeedback members to match the spec. BUG=angleproject:763 Change-Id: I12fa57de9263eb0cb5ff1840cf44b0a8f2a40912 Reviewed-on: https://chromium-review.googlesource.com/263721 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang cfaeaa9f 2015-04-14T13:41:02 Refactor uniform array name parsing to a utility function. BUG=angleproject:882 Change-Id: I00fd6d3cfaa107561cee5e4c82d3c60438052963 Reviewed-on: https://chromium-review.googlesource.com/265723 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 5160ec11 2015-04-14T08:13:48 Squash the attachment types. We can store all relevant information in the base class, which lets us avoid using any virtual methods. This will finally let us avoid using reallocations on FBO attachment sets. BUG=angleproject:963 Change-Id: Ib4b61da14efaf843478b059499c01e34f9c65e4f Reviewed-on: https://chromium-review.googlesource.com/263488 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 79481d65 2015-04-14T08:13:47 Add FramebufferAttachmentObject base class. This lets us share objects (Textures/RBs/Surface) in the attachment class. It will let us squash the attachment classes into one type, which will in turn let us store them by-value, instead of by-pointer. BUG=angleproject:963 Change-Id: Ia9a43dbc3b99475c00f6bc2ed5475deef55addc3 Reviewed-on: https://chromium-review.googlesource.com/263487 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Scott Graham a825fdce 2015-04-14T16:05:47 Disable macro redefinition warning for vs2015 From flexint.h (because VS2015 has some of c99, but doesn't define __STDC_VERSION__ yet. Change-Id: Iff82f4c72dd816dcc1959abb218442a848ea592a c:\program files (x86)\microsoft visual studio 14.0\vc\include\stdint.h(48): error C2220: warning treated as error - no 'object' file generated c:\program files (x86)\microsoft visual studio 14.0\vc\include\stdint.h(48): warning C4005: 'INT8_MIN': macro redefinition d:\src\cr3\src\out\debug\glslang_lex.cpp(83): note: see previous definition of 'INT8_MIN' c:\program files (x86)\microsoft visual studio 14.0\vc\include\stdint.h(49): warning C4005: 'INT16_MIN': macro redefinition d:\src\cr3\src\out\debug\glslang_lex.cpp(86): note: see previous definition of 'INT16_MIN' c:\program files (x86)\microsoft visual studio 14.0\vc\include\stdint.h(50): warning C4005: 'INT32_MIN': macro redefinition d:\src\cr3\src\out\debug\glslang_lex.cpp(89): note: see previous definition of 'INT32_MIN' c:\program files (x86)\microsoft visual studio 14.0\vc\include\stdint.h(52): warning C4005: 'INT8_MAX': macro redefinition d:\src\cr3\src\out\debug\glslang_lex.cpp(92): note: see previous definition of 'INT8_MAX' c:\program files (x86)\microsoft visual studio 14.0\vc\include\stdint.h(53): warning C4005: 'INT16_MAX': macro redefinition d:\src\cr3\src\out\debug\glslang_lex.cpp(95): note: see previous definition of 'INT16_MAX' c:\program files (x86)\microsoft visual studio 14.0\vc\include\stdint.h(54): warning C4005: 'INT32_MAX': macro redefinition d:\src\cr3\src\out\debug\glslang_lex.cpp(98): note: see previous definition of 'INT32_MAX' c:\program files (x86)\microsoft visual studio 14.0\vc\include\stdint.h(56): warning C4005: 'UINT8_MAX': macro redefinition d:\src\cr3\src\out\debug\glslang_lex.cpp(101): note: see previous definition of 'UINT8_MAX' c:\program files (x86)\microsoft visual studio 14.0\vc\include\stdint.h(57): warning C4005: 'UINT16_MAX': macro redefinition d:\src\cr3\src\out\debug\glslang_lex.cpp(104): note: see previous definition of 'UINT16_MAX' c:\program files (x86)\microsoft visual studio 14.0\vc\include\stdint.h(58): warning C4005: 'UINT32_MAX': macro redefinition d:\src\cr3\src\out\debug\glslang_lex.cpp(107): note: see previous definition of 'UINT32_MAX' Reviewed-on: https://chromium-review.googlesource.com/265594 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 376f1b5d 2015-04-13T13:23:41 Add support for implicit array size ESSL3 introduces implicit array size that is determined automatically according to the initializer. Implicit sizes are resolved when parsing constructors and when initializers are evaluated, so ANGLE's AST will not contain implicit sizes. Declarations where there are two differently sized arrays with the same implicitly sized type, for example: float[] a = float[](0.0), b = float[](0.0, 1.0); will be transformed into declarations where the two arrays don't share the array size like this: float a[1] = float[1](0.0), float b[2] = float[2](0.0, 1.0); so they are not a problem. Unlike sized arrays, implicitly sized arrays don't have a size limit enforced by the parser. Include a test that verifies that non-initialization of an implicitly sized array defined using ESSL3 type syntax is caught by the parser. Additionally tested with WebGL 2 test sdk/tests/deqp/data/gles3/shaders/arrays.html TEST=WebGL 2 conformance tests, angle_unittests BUG=angleproject:941 Change-Id: Ib55b7601848102a103af9db284a80f09abaeb021 Reviewed-on: https://chromium-review.googlesource.com/265653 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 3875ffd1 2015-04-10T16:45:14 Add parser support for initializing sized arrays Still missing from this patch: HLSL output, implicitly sized arrays. Tested with WebGL 2 test sdk/tests/deqp/data/gles3/shaders/arrays.html TEST=WebGL 2 conformance tests BUG=angleproject:941 Change-Id: I900f2af843fd8046f23dd4b77352e77026bbba84 Reviewed-on: https://chromium-review.googlesource.com/265652 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho e7847b08 2015-03-16T11:56:12 Unify declaration parsing code Remove the unused identifierSymbol parameter from parseSingleDeclarator and unify the ordering of parameters and the code style of different declaration and declarator parsing functions. Some minor functional changes to array size handling are done mainly to unify error message generation. There's soon going to be more of these functions, so it's good to be systematic. TEST=angle_unittests, WebGL conformance tests BUG=angleproject:941 Change-Id: I03b0220de93ca5719fdb7c1790a5999b8cb5b225 Reviewed-on: https://chromium-review.googlesource.com/265202 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 33e98913 2015-04-10T17:03:06 Add tests for disallowing arrays of arrays TEST=angle_unittests BUG=angleproject:941 Change-Id: Ie45a8a581bf2931ecccfc41b26db49a257fcaf1d Reviewed-on: https://chromium-review.googlesource.com/265201 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho fa33d580 2015-04-09T14:33:12 Improve handling of declarator lists with empty declarations The code previously failed to check for correctness of layout qualifiers in case a declarator followed an empty declaration, like so: layout(packed) uniform float, a; Fix this by running all necessary declaration checks also for declarators which follow an empty declaration. structQualifierErrorCheck is merged into singleDeclarationErrorCheck. TEST=angle_unittests, WebGL conformance tests BUG=angleproject:969 Change-Id: Idcb0673e3bcf64087744ff0d260f51a7546f024a Reviewed-on: https://chromium-review.googlesource.com/264812 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho e16eae36 2015-04-10T11:48:55 Fix structQualifierErrorCheck calls in glslang.y structQualifierErrorCheck is called incorrectly in glslang.y. Remove one unnecessary call entirely and change another call to samplerErrorCheck. This will enable further changes to merge structQualifierErrorCheck into singleDeclarationErrorCheck. TEST=angle_unittests BUG=angleproject:969 Change-Id: Ib43233e275fbf4db7e5fda6df6b45a655bdee8a2 Reviewed-on: https://chromium-review.googlesource.com/265200 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho ab6fc6a2 2015-04-13T12:10:20 Add support for arrays as function return values in GLSL output Output the array brackets and the array size correctly when a function's return value type is array. Tested with WebGL 2 test sdk/tests/deqp/data/gles3/shaders/arrays.html BUG=angleproject:971 TEST=WebGL 2 conformance tests Change-Id: I63aa8c54d2696f65351b23acb0749a487298ddfb Reviewed-on: https://chromium-review.googlesource.com/265410 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4a1858b8 2015-04-14T16:16:30 perftests: Fix simple draw call benchmark. Previously the code was only testing the validation logic. Fix this by testing validation-only and a simple single quad draw benchmark. BUG=468852 Change-Id: I510deea08fee5932f51ea39883ed91652be476df Reviewed-on: https://chromium-review.googlesource.com/265751 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 77a72f6e 2015-04-14T11:18:32 Release Surface when calling makeCurrent with null. Refactorings to egl::Surface to enable ref-counting were causing a situation where we could have two Window surfaces alive at the same time. This would confuse the window procedure logic in SurfaceD3D. Releasing the surface fixes this issue and conforms closely to the wording on the spec on when Surfaces should be deleted. Also add a test for message loops and surfaces. BUG=475085 BUG=angleproject:963 Change-Id: Icdee3a7db97c9b54d779dabf1e1f82a89fefc546 Reviewed-on: https://chromium-review.googlesource.com/265064 Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang def624bc 2015-04-13T10:46:56 Move maxSamples from Extensions to Caps because it is an ES3 limit. BUG=angleproject:886 Change-Id: Ibcfc2f06e8308e2e6eb1a6c38206b803f689d7af Reviewed-on: https://chromium-review.googlesource.com/265470 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang a836e883 2015-04-13T14:29:54 Don't set a null current WGL context in the Surface destructor. By setting a null current context, there is a brief window where all GL calls will fail. Since there is only one WGL context, just leave in on the unreferenced window until a new window is made current. BUG=angleproject:890 Change-Id: I51eadf23ca61e274f7d174ac5a9e0592bcdadebc Reviewed-on: https://chromium-review.googlesource.com/265483 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b1eee7af 2015-04-14T13:57:07 D3D11: Only use share handles with HW driver. WARP does not support surface sharing like native D3D11. This, combined with a Chromium-side change, should fix WARP rendering in Chrome. BUG=angleproject:973 BUG=429792 Change-Id: I41e778625e8697e45657843f2f337bcffe7ddbe2 Reviewed-on: https://chromium-review.googlesource.com/265611 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 31906ecf 2015-04-14T14:53:07 Generate blit shaders on demand. This saves a ms or two on D3D11 startup. Change-Id: I156c25029a0b2aeb48e5b76b31737c155111e07f Reviewed-on: https://chromium-review.googlesource.com/264936 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c9d13d2d 2015-04-14T14:53:06 Add trace events for D3D11 initialization. This helps a local user profile their D3D11 startup time. BUG=436191 BUG=angleproject:966 Change-Id: Ib1b3d62194233cd502980d87c316a95e9bd3a04c Reviewed-on: https://chromium-review.googlesource.com/264935 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill d8b36d45 2015-04-09T11:12:43 Remove SetTraceFunctionPointers and update APIs. Now that Chromium is switched to ANGLE's new Platform tracing methods, we can junk the old APIs. BUG=angleproject:966 BUG=436191 Change-Id: Ie2564eed9e5ce4604e0dcd4582618e7467b2d590 Reviewed-on: https://chromium-review.googlesource.com/264934 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Cooper Partin 97d61eb5 2015-04-14T09:08:16 Add extension EGL_ANGLE_device_d3d Access to the D3D device is needed for some advanced scenarios. New entry points eglQueryDisplayAttribANGLE and eglQueryDeviceAttribANGLE have been added in this change to implement this extension. BUG=angleproject:935 Change-Id: Ie39e86a2b6c6d8d05a08964b2907fb9fba5dec13 Reviewed-on: https://chromium-review.googlesource.com/265591 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill bc709339 2015-04-14T15:32:19 Revert "Support constant folding of trigonometry built-ins" Part of a chain causing compile errors on Mac. Example: ../../third_party/angle/src/compiler/translator/IntermNode.cpp:1216:89: error: no member named 'sin' in namespace 'std'; did you mean 'sinf'? http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33747 This reverts commit 1767e6b4f9148a6aa462d23e3838810c0080ce78. Change-Id: Ie39b1bf9a08da61aa0b16e219b34d1ba0b6f6c0f Reviewed-on: https://chromium-review.googlesource.com/265587 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3c772f36 2015-04-14T15:30:45 Revert "Support constant folding of exponential built-ins" Part of a chain causing compile errors on Mac. Example: ../../third_party/angle/src/compiler/translator/IntermNode.cpp:1216:89: error: no member named 'sin' in namespace 'std'; did you mean 'sinf'? http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33747 This reverts commit 62e2c8d2bc55c41db4e6095eac012b8861131585. Change-Id: Id20f7f4efbc3df7756161b192d4858caeeb0572f Reviewed-on: https://chromium-review.googlesource.com/265627 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill d1e9a0f4 2015-04-14T15:30:16 Revert "Support constant folding of common built-ins" Part of a chain causing compile errors on Mac. Example: ../../third_party/angle/src/compiler/translator/IntermNode.cpp:1216:89: error: no member named 'sin' in namespace 'std'; did you mean 'sinf'? http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33747 This reverts commit 2b1da6ed1dbe5960bed8c1b2fa3d33cb00c6c116. Change-Id: I5d48932a6254d6d1e78966bb3891913d9450e08e Reviewed-on: https://chromium-review.googlesource.com/265612 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill b775778a 2015-04-14T15:29:29 Revert "Use nullptr consistently in TIntermConstantUnion::fold" Part of a chain causing compile errors on Mac. Example: ../../third_party/angle/src/compiler/translator/IntermNode.cpp:1216:89: error: no member named 'sin' in namespace 'std'; did you mean 'sinf'? http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33747 This reverts commit 72ed20d4bb5a5c55d9909d6cc9b7a0e89e4a81a2. Change-Id: Ia6119f6081b3184deef3deef25b9e3f43ff2e2a6 Reviewed-on: https://chromium-review.googlesource.com/265586 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 1ea8284d 2015-04-14T15:28:56 Revert "Add extension EGL_ANGLE_device_d3d" Compile error on clang: src/libANGLE/Display.cpp:259:23: error: allocation of incomplete type 'egl::Device' mDevice = new Device(this, impl); ^~~~~~ src/libANGLE/Display.h:36:7: note: forward declaration of 'egl::Device' class Device; ^ In file included from src/libANGLE/Display.cpp:11: In file included from src/libANGLE/Display.h:17: In file included from src/libANGLE/Error.h:80: In file included from src/libANGLE/Error.inl:9: src/common/angleutils.h:66:5: error: deleting pointer to incomplete type 'egl::Device' may cause undefined behavior [-Werror,-Wdelete-incomplete] delete resource; ^ ~~~~~~~~ src/libANGLE/Display.cpp:209:5: note: in instantiation of function template specialization 'SafeDelete<egl::Device>' requested here SafeDelete(mDevice); ^ src/libANGLE/Display.h:36:7: note: forward declaration of 'egl::Device' class Device; ^ 2 errors generated. This reverts commit 6dacaff4e03d4f6b4c444a3fff018c1297cd25ba. Change-Id: Ide348e156324a5af668604362c0b249ea73b6083 Reviewed-on: https://chromium-review.googlesource.com/265626 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Cooper Partin 6dacaff4 2015-02-19T16:31:57 Add extension EGL_ANGLE_device_d3d Access to the D3D device is needed for some advanced scenarios. New entry points eglQueryDisplayAttribANGLE and eglQueryDeviceAttribANGLE have been added in this change to implement this extension. BUG=angleproject:935 Change-Id: Id1560b0887fa5882b9858af7bad9043ada67038d Reviewed-on: https://chromium-review.googlesource.com/251610 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Arun Patole 72ed20d4 2015-04-08T14:26:25 Use nullptr consistently in TIntermConstantUnion::fold Newly added code in TIntermConstantUnion::fold uses nullptr where as remaining part of the function uses NULL. This change removes NULL and consistently uses nullptr in complete function. Change-Id: I600dcf11b686d8d72b2bcdac88b7158288c68105 Reviewed-on: https://chromium-review.googlesource.com/265395 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Arun Patole 2b1da6ed 2015-04-06T17:35:38 Support constant folding of common built-ins This change adds constant folding support for unary common built-ins: abs, sign, floor, trunc, round, roundEven, ceil and fract. BUG=angleproject:913 TEST= dEQP tests dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.common* (80 out of 210 tests started passing with this change) Change-Id: I06800ed0e03764c0f7aab6bcd45c4f122de5a3c1 Reviewed-on: https://chromium-review.googlesource.com/265394 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Arun Patole 62e2c8d2 2015-04-06T17:29:48 Support constant folding of exponential built-ins This change adds constant folding support for unary exponential built-ins - exp, log, exp2, log2, sqrt and inversesqrt. BUG=angleproject:913 TEST= dEQP tests dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.exponential* (48 out of 56 tests started passing with this change) Change-Id: Ie7808cd57d6ed7598c642a9a0940b8f5bd293741 Reviewed-on: https://chromium-review.googlesource.com/265393 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Arun Patole 1767e6b4 2015-04-02T11:45:09 Support constant folding of trigonometry built-ins This change adds constant folding support for trigonometry built-in functions. Constant folding for these functions also fixes constant expression issues where constant initializer is a built-in trignometry function whose arguments are all constant expressions. BUG=angleproject:913 TEST= dEQP tests dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.angle_and_trigonometry* (112 out of 120 tests pass with this change) Change-Id: I66275b2ae9faecef63d76763d21a9b67d9bb68fa Reviewed-on: https://chromium-review.googlesource.com/265392 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 835be965 2015-04-13T14:17:49 perf_tests: Only print final score result. Don't print all the other measurements and values, since they'll just add noise to the perf bot dashboards. Also increase the run time of the DrawCallPerfTest to 10.0 seconds. BUG=angleproject:744 BUG=468852 Change-Id: If076055ad46b4e6923f39687edcaa25930b188a7 Reviewed-on: https://chromium-review.googlesource.com/265464 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 90d443e7 2015-04-10T14:34:10 Delete Image.h. Change-Id: I83135eabfe5c71f8b07338e2552d1ddd89f150c2 Reviewed-on: https://chromium-review.googlesource.com/265233 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 2935c581 2015-04-08T14:32:06 Simplify code related to variable declaration Rename nonInitErrorCheck to declareVariable to clarify that it declares variables. Merge arrayErrorCheck with that so that logic that is common between array and non-array declarations is only in one place. This will simplify adding array initializer handling. This also enables redeclaring gl_LastFragData using ESSL3 array type syntax. Comments in executeInitializer claimed that the TVariable object was needed for error recovery, but that was not actually true, so it can also use the new declareVariable method. Make "variable" a local variable instead of a parameter to executeInitializer, since the parameter was never used by callers of the function. TEST=angle_unittests, WebGL conformance tests BUG=angleproject:941 Change-Id: Ie133be62afc3e1f997370803cf21cada4e738935 Reviewed-on: https://chromium-review.googlesource.com/264674 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 1c906c2e 2015-04-10T11:26:17 Skip Pbuffer tests depending on Pbuffer support. BUG=angleproject:890 Change-Id: Ie10276453c35c65ffa0e26f8039db3ec3e65064e Reviewed-on: https://chromium-review.googlesource.com/265187 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b4a058bb 2015-04-10T14:50:51 Revert "Support constant folding of trigonometry built-ins" Part of a chain breaking the clang build: http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33588 This reverts commit af930db15010cacfcdc74bee630372b8f6eb3eeb. Change-Id: Ic0bf09b4088a1ee285fed0fbd77dfc4c682fcd12 Reviewed-on: https://chromium-review.googlesource.com/265144 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 50b7178d 2015-04-10T14:50:15 Revert "Support constant folding of exponential built-ins" Part of a chain breaking the clang build: http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33588 This reverts commit 1c89caef47a27c63a7d0f988e74816692a9b9b39. Change-Id: I36e080d8f64d4d4ca5de04bebbd119db83956d0e Reviewed-on: https://chromium-review.googlesource.com/265185 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3cf271fe 2015-04-10T14:49:36 Revert "Support constant folding of common built-ins" Part of a chain breaking the clang build: http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33588 This reverts commit 0273c68c507a10af3e45c6e4a52a44adcd0cf742. Change-Id: I00d7617a7c380f2a5ea3f38ec14948a598aa5c1a Reviewed-on: https://chromium-review.googlesource.com/265184 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7c9e8c96 2015-04-10T14:48:08 Revert "Use nullptr consistently in TIntermConstantUnion::fold" Part of a chain breaking the clang build: http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33588 This reverts commit 5f2feee42971fdbbd7cb389fffe2f632060ec6e3. Change-Id: I5ad54b05148ae2d4f19e50a67aded2bad4f55f91 Reviewed-on: https://chromium-review.googlesource.com/265143 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang b811e1a2 2015-04-08T13:20:24 Add tests for FenceNV and FenceSync objects. BUG=angleproject:888 Change-Id: Ic5eca4d88854f8127114d6b54666f32d5d6df9f2 Reviewed-on: https://chromium-review.googlesource.com/264588 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 3873cd0b 2015-04-10T15:00:55 Fix issues with computing discontinuous loops AST analysis to narrow down usage of [[loop]] and [[unroll]] failed to account for break statements inside switch statements. Add switch statement handling. This fixes asserts/crashes in dEQP tests. BUG=angleproject:937 TEST=dEQP-GLES3.functional.shaders.switch.* Change-Id: I04fdfe4733772a2a234934123bbfacf0376df562 Reviewed-on: https://chromium-review.googlesource.com/265191 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Arun Patole 5f2feee4 2015-04-08T14:26:25 Use nullptr consistently in TIntermConstantUnion::fold Newly added code in TIntermConstantUnion::fold uses nullptr where as remaining part of the function uses NULL. This change removes NULL and consistently uses nullptr in complete function. Change-Id: Ieaada3cf46bf3e16d3ef91b300c86537f778c33f Reviewed-on: https://chromium-review.googlesource.com/264632 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Arun Patole 0273c68c 2015-04-06T17:35:38 Support constant folding of common built-ins This change adds constant folding support for unary common built-ins: abs, sign, floor, trunc, round, roundEven, ceil and fract. BUG=angleproject:913 TEST= dEQP tests dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.common* (80 out of 210 tests started passing with this change) Change-Id: I09f2f99b3108e0d2fb1919a0631e4317b6a28be3 Reviewed-on: https://chromium-review.googlesource.com/263709 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Arun Patole 1c89caef 2015-04-06T17:29:48 Support constant folding of exponential built-ins This change adds constant folding support for unary exponential built-ins - exp, log, exp2, log2, sqrt and inversesqrt. BUG=angleproject:913 TEST= dEQP tests dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.exponential* (48 out of 56 tests started passing with this change) Change-Id: I22af56876d1b7ce305697bf9bf43ad9ec5d8a3a5 Reviewed-on: https://chromium-review.googlesource.com/263708 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Arun Patole af930db1 2015-04-02T11:45:09 Support constant folding of trigonometry built-ins This change adds constant folding support for trigonometry built-in functions. Constant folding for these functions also fixes constant expression issues where constant initializer is a built-in trignometry function whose arguments are all constant expressions. BUG=angleproject:913 TEST= dEQP tests dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.angle_and_trigonometry* (112 out of 120 tests pass with this change) Change-Id: I2ed4360532469fe0d70048d5f2300a8db6f9fcda Reviewed-on: https://chromium-review.googlesource.com/263679 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 6ed7bbe8 2015-04-07T18:08:46 Clean up arrayErrorCheck Remove some unnecessary TPublicType/TType conversions from the code, and clean up code style. voidErrorCheck is changed to take TBasicType so that it can be used with both TType and TPublicType. TEST=angle_unittests BUG=angleproject:941 Change-Id: I6f6cbc0761a4fc971299bad48864309009c54e7f Reviewed-on: https://chromium-review.googlesource.com/264673 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 43ce600c 2015-04-09T14:50:40 Fix a bunch of mistakes in MalformedShaderTest A number of mistakes had slipped in to this test that made the compilation of some shaders always fail regardless of the semantic checks applied by the parser. TEST=angle_unittests BUG=angleproject:941 Change-Id: I9906792e2c7fe3805288255b855afb46840a77a7 Reviewed-on: https://chromium-review.googlesource.com/264811 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 4176cd64 2015-04-02T11:14:38 Remove now unused DetectDiscontuinity.h/.cpp BUG=angleproject:937 BUG=395048 Change-Id: Ie8e520267d594a595201cb7c2438a2202d9adf25 Reviewed-on: https://chromium-review.googlesource.com/263745 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 029c78cd 2015-04-09T15:06:19 Ignore visual studio profiler and nsight files. Change-Id: I01cb029300760341262fb27cafc32d4366d161c0 Reviewed-on: https://chromium-review.googlesource.com/265005 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0305320f 2015-04-09T11:21:13 WGL Pbuffer implementation. BUG:angleproject:890 Change-Id: Id6e04117ddf7bde3ffb0d9e4cef6db3d07039a54 Reviewed-on: https://chromium-review.googlesource.com/261410 Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 1239ee94 2015-03-19T14:38:02 Use the AST analyses to narrow the usage of [[loop]] and [[unroll]] These attributes are now used exactly in the loops and ifs that require them, limiting the number of failed compilations due to excessive unrolling and flattening. Also output Lod0 functions only when needed. Adds unit tests for LOOP, FLATTEN and Lod0 generation. The patch was tested against the WebGL CTS 1.0.4 for which all the failures existed prior to this patch and seem to be unrelated to this change. It also works correctly on the following sites that had trouble with [[loop]] and [[unroll]]: * dev.miaumiau.cat/rayTracer "Skull Demo" * The turbulenz engine particle demo * Lots of ShaderToy samples (including "Volcanic" and "Metropolis") * Google Maps Earth mode * Lots of Chrome Experiments * Lagoa * madebyevan.com/webgl-water * SketchFab * Unit Tests BUG=angleproject:937 BUG=395048 Change-Id: I856de9025f10b79781929ec212dbffc2064a940e Reviewed-on: https://chromium-review.googlesource.com/264791 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Minmin Gong 794e0009 2015-04-07T18:31:54 Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data) Change-Id: Id0e06d7d6600344d858f00dabc219d79289bbc82 Reviewed-on: https://chromium-review.googlesource.com/265020 Tested-by: Minmin Gong <mgong@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b3584fb4 2015-04-09T17:34:21 Revert "Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data)" Causing a build failure on Mac/Clang: ./Tokenizer.cpp:551:7: error: extra tokens at end of #else directive [-Werror,-Wextra-tokens] #else if defined(_MSC_VER) http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/29136 This reverts commit 3b26e231d99154814eb428f75a67bbe7a21adadc. Change-Id: I2d11ddcc18130d908fd2ec3d6f5ab890cfccd5e7 Reviewed-on: https://chromium-review.googlesource.com/264983 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 0ca42a5f 2015-04-07T13:47:41 Add tests of basic Pbuffer functionality. BUG=angleproject:890 Change-Id: I8f82414d1875f80269bd9dd1f629e5b7903cb584 Reviewed-on: https://chromium-review.googlesource.com/264380 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Minmin Gong 3b26e231 2015-04-07T18:31:54 Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data) Change-Id: I73d9a2b9ad16f032be974b9c819de0dc1247c2ea Reviewed-on: https://chromium-review.googlesource.com/264533 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 47fadcb9 2015-04-08T14:13:53 Remove code related to redeclaration of arrays It should not be possible to redeclare arrays. This seems to be another thing left over from earlier erroneous code which allowed declaring unsized arrays. TEST=angle_unittests BUG=angleproject:941 Change-Id: I711565230b35df077f268cec6fdeac6c4c03b4cd Reviewed-on: https://chromium-review.googlesource.com/264672 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 3739d235 2015-04-08T12:23:44 Make checking for array non-constness depend on input version First, remove duplicate check for const qualifier on arrays. Only keep the check inside arrayQualifierErrorCheck(). Second, ESSL3 will introduce array initializers and by extension constant arrays, so it should allow const qualifier on arrays. These checks are somewhat superfluous in ESSL1 as well, since the parser already checks for missing initializers, but it's useful to keep the informative error messages around. Add a few tests to make sure that when the ESSL3 implementation progresses, it still checks for missing initializers on constant arrays. TEST=angle_unittests BUG=angleproject:941 Change-Id: Id871c872c5b92e2a5bf81c00080ac23004916a75 Reviewed-on: https://chromium-review.googlesource.com/264671 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 938f0029 2015-04-08T19:35:40 Revert "Use the AST analyses to narrow the usage of [[loop]] and [[unroll]]" Caused linking failures on mac because the unit test asks for TranslatorHLSL which is not compiled. This reverts commit 3342e01f2a29343ea95961f0194f9d4f422cb840. Change-Id: I02b2f54ca5b90611f11b7a549e75bf2e8310639d Reviewed-on: https://chromium-review.googlesource.com/264790 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 3342e01f 2015-03-19T14:38:02 Use the AST analyses to narrow the usage of [[loop]] and [[unroll]] These attributes are now used exactly in the loops and ifs that require them, limiting the number of failed compilations due to excessive unrolling and flattening. Also output Lod0 functions only when needed. Adds unit tests for LOOP, FLATTEN and Lod0 generation. The patch was tested against the WebGL CTS 1.0.4 for which all the failures existed prior to this patch and seem to be unrelated to this change. It also works correctly on the following sites that had trouble with [[loop]] and [[unroll]]: * dev.miaumiau.cat/rayTracer "Skull Demo" * The turbulenz engine particle demo * Lots of ShaderToy samples (including "Volcanic" and "Metropolis") * Google Maps Earth mode * Lots of Chrome Experiments * Lagoa * madebyevan.com/webgl-water * SketchFab * Unit Tests BUG=angleproject:937 BUG=395048 Change-Id: If7baddae1cdae0b3a414aa49e5a4c4babedbfe50 Reviewed-on: https://chromium-review.googlesource.com/261263 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 1a0847ca 2015-04-08T13:49:31 Temporarily disable the RenderToMipmap on Intel OpenGL. BUG=angleproject:905 Change-Id: If398b7f3cb60f3efdafce0f3709f965120977603 Reviewed-on: https://chromium-review.googlesource.com/264665 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang e42753b2 2015-04-08T13:46:33 Implement GL_VENDOR and GL_RENDERER strings for RendererGL. Change-Id: Ib83faa605fd1b992e19ddc2b72c7917d82245d32 Reviewed-on: https://chromium-review.googlesource.com/264664 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 50931459 2015-03-19T10:39:13 Implement discontinuous loops AST analysis This will allow narrowing down which usages of [[flatten]] and [[unroll]] are actually useful. BUG=angleproject:937 BUG=395048 Change-Id: I091e647e3053d22edadd0cabb7c50bd5efa690b2 Reviewed-on: https://chromium-review.googlesource.com/263776 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez f4eab3b9 2015-03-18T12:55:45 Implement gradient operation AST analysis This will allow narrowing down which usages of [[flatten]] and [[unroll]] are actually useful. BUG=angleproject:937 BUG=395048 Change-Id: Ib8d7b98431b8cd3563e1eff8ecc9ed5df1a9b7d6 Reviewed-on: https://chromium-review.googlesource.com/263775 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez a094a8a9 2015-04-07T11:53:06 Add a compiler option to prune unused function and prototypes Also adds a simple unit test checking the pruning BUG=angleproject:937 BUG=395048 Change-Id: I88440378f66178dcebebcd596f8f80235903f20e Reviewed-on: https://chromium-review.googlesource.com/264568 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 78b3a8b9 2015-04-08T16:04:24 Revert "Add a compiler option to prune unused function and prototypes" Compile error on Mac: http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/29051 This reverts commit e423d9ca6e1b340ae06d543419b8a515de5ac3f2. Change-Id: Ie08d7f2bf86089a006f3177480aa7491a9405257 Reviewed-on: https://chromium-review.googlesource.com/264585 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez e423d9ca 2015-04-07T11:53:06 Add a compiler option to prune unused function and prototypes Also adds a simple unit test checking the pruning BUG=angleproject:937 BUG=395048 Change-Id: I49904c34d1a72949cdc579569967d99c736c7237 Reviewed-on: https://chromium-review.googlesource.com/264415 Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 71d147f6 2015-02-11T11:15:24 Implemented a CallDAG to allow for more AST analysis The CallDAG preprocesses the AST to construct a DAG of functions that can be used for several analyses. Use it to implement check for recursion and max call depth. It will also be used to limit the usage of [[flatten]] and [[unroll]]. BUG=angleproject:937 BUG=395048 Change-Id: I8578703f2d49513f315aecccbcff34914562e4ff Reviewed-on: https://chromium-review.googlesource.com/263774 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Gregoire Payen de La Garanderie 9102e3ab 2015-03-23T20:25:45 Add UBO offset emulation for D3D11.0 and below. BUG=angleproject:507 Change-Id: I6c5028930051a2af0bd6ffa0ee213e692d3892ef Reviewed-on: https://chromium-review.googlesource.com/261824 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang cc6f55dd 2015-03-20T13:01:02 Split Buffer::map into map and mapRange to match the API. BUG=angleproject:681 Change-Id: Ia4bf2b81134a922265ca762f33ac85d9ddbf1a7c Reviewed-on: https://chromium-review.googlesource.com/261890 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 8a6f19d7 2015-04-02T15:57:55 Add support for GL_OES_fbo_render_mipmap with OpenGL. BUG=angle:905 Change-Id: Idde35172cfa495c8b74b961f4ab8c4e657653074 Reviewed-on: https://chromium-review.googlesource.com/263763 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 693c9aa0 2015-04-07T17:50:36 Replace setArray function in TPublicType with functions from TType Having only one way of setting or clearing arrayness of types clarifies code dealing with arrays. TEST=angle_unittests BUG=angleproject:941 Change-Id: I98cb7c44fd66440c9de8b4c6c4a02827e9300db7 Reviewed-on: https://chromium-review.googlesource.com/264361 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 93a90fd0 2015-04-07T18:14:07 Remove half-baked non-sized array support ANGLE used to accept shaders with non-sized arrays in initializer lists. Fix this. Proper support for implicitly sized arrays will be implemented later for ESSL3. TEST=angle_unittests BUG=angleproject:941 Change-Id: I53c5ccf0f7ef09ad30e142f8350812959fc4846c Reviewed-on: https://chromium-review.googlesource.com/264360 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5c60031e 2015-04-07T17:23:54 Temporarily disable TextureTest with OpenGL. Failures seen on some FYI bots. Change-Id: I4853438c34ce55a1d803d3a7edf3b3e077905264 Reviewed-on: https://chromium-review.googlesource.com/264462 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang bde666a9 2015-04-07T17:17:08 Disable all copy image tests on Intel. Change-Id: I5412daf42777caeac37de4bdc661b01480d887fd Reviewed-on: https://chromium-review.googlesource.com/264451 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Brett Wilson a662abb5 2015-04-07T12:55:30 Fix GN Windows component build. The translator_static dependency is missing from libANGLE. GYP has this dependency. Change-Id: I30165a041f88f7e3c6f550744d2c7a4103d0f520 Reviewed-on: https://chromium-review.googlesource.com/264425 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 95663914 2015-04-02T15:54:45 Add stubs for GL_OES_fbo_render_mipmap. BUG=angle:905 Change-Id: Idd4964bd2d9d07cd98137770e1cc57397f1dd3a6 Reviewed-on: https://chromium-review.googlesource.com/263762 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>