Log

Author Commit Date CI Message
Jamie Madill 6e94c455 2017-11-21T12:48:13 Reland "Update cq.cfg for new compile-only builders." This is a reland of cc93cebf275a37e2f271f4856d7f13fc7eb3c1ad Re-landing after mb_config.pyl fix. Original change's description: > Update cq.cfg for new compile-only builders. > > This removes the x64 versions of the Windows tests from the ANGLE CQ. > They are still available to run as optional try jobs, if we suspect > a failure. This should reduce the amount of test duplication while > still keeping complete coverage. > > It also updates the Clang builder to the MSVC builder, since Chrome > has switched to Clang by default on Windows, and the clang builder > was a deprecated version of the MSVC builder anyway. > > Bug: chromium:786044 > Change-Id: I786fe85dcdaa57b55b0b44244797c9285c577ea2 > Reviewed-on: https://chromium-review.googlesource.com/782402 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> Bug: chromium:786044 Change-Id: I85d1fe95d12a29e91755303423dd151450bb6a3b Reviewed-on: https://chromium-review.googlesource.com/784232 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill cce013c9 2017-11-22T00:42:00 Revert "Update cq.cfg for new compile-only builders." This reverts commit cc93cebf275a37e2f271f4856d7f13fc7eb3c1ad. Reason for revert: There was a typo in mb_config.py. https://build.chromium.org/deprecated/tryserver.chromium.angle/builders/win_angle_compile_x64_dbg_ng/builds/0/steps/analyze/logs/stdio MBErr: Builder name "win_angle_compile_x64_dbg_ng" not found under masters[tryserver.chromium.angle] in "E:\b\c\b\win\src\tools\mb\mb_config.pyl" Original change's description: > Update cq.cfg for new compile-only builders. > > This removes the x64 versions of the Windows tests from the ANGLE CQ. > They are still available to run as optional try jobs, if we suspect > a failure. This should reduce the amount of test duplication while > still keeping complete coverage. > > It also updates the Clang builder to the MSVC builder, since Chrome > has switched to Clang by default on Windows, and the clang builder > was a deprecated version of the MSVC builder anyway. > > Bug: chromium:786044 > Change-Id: I786fe85dcdaa57b55b0b44244797c9285c577ea2 > Reviewed-on: https://chromium-review.googlesource.com/782402 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=geofflang@chromium.org,jmadill@chromium.org,tandrii@chromium.org Change-Id: If13d3d69f0a1facd3876858afdaf0577f6ab1cb7 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:786044 Reviewed-on: https://chromium-review.googlesource.com/784070 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill cc93cebf 2017-11-21T12:48:13 Update cq.cfg for new compile-only builders. This removes the x64 versions of the Windows tests from the ANGLE CQ. They are still available to run as optional try jobs, if we suspect a failure. This should reduce the amount of test duplication while still keeping complete coverage. It also updates the Clang builder to the MSVC builder, since Chrome has switched to Clang by default on Windows, and the clang builder was a deprecated version of the MSVC builder anyway. Bug: chromium:786044 Change-Id: I786fe85dcdaa57b55b0b44244797c9285c577ea2 Reviewed-on: https://chromium-review.googlesource.com/782402 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 902e8c18 2017-11-18T09:34:16 Reland "Make TType store a const char * for mangled name." This is a reland of dc7bffd06b526bbffd3d1c1ddbd6c763a2cc7287 Reland fixes the memory regression by not calling new, instead calling the pool allocator directly. Original change's description: > Make TType store a const char * for mangled name. > > We would only ever use the c_str value from the mangled name. This > makes it easier to make constexpr TTypes. > > Bug: angleproject:1432 > Change-Id: I147b3a85f9b8b2453e2d7f4a713d767b22036cc9 > Reviewed-on: https://chromium-review.googlesource.com/776277 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Kai Ninomiya <kainino@chromium.org> Bug: angleproject:1432 Change-Id: I1aaeea883186b9061955d55f2fa77d27f5d9b725 Reviewed-on: https://chromium-review.googlesource.com/782406 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang c801e359 2017-11-21T13:53:48 Add configurations of the TexturePerf benchmark that use robust init. BUG=angleproject:2188 Change-Id: Ia23b54044a85435c761478bceeb9aac961fac0d1 Reviewed-on: https://chromium-review.googlesource.com/783230 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 7f738d4e 2017-11-20T17:06:27 Vulkan: Refactor CommandBuffer helper class. This makes the base vk::CommandBuffer class as close to the Vulkan API as possible. It moves the extra functionality and state tracking to a CommandBufferAndState helper class. Also no longer stores a reference to a CommandPool in a CommandBuffer. Eventually we won't need to free CommandBuffers explicitly, since they can be freed en-masse by deallocating the CommandPool on a flush. Bug: angleproject:2200 Change-Id: I5095fe89e8da935ff8273b1a402ccfd6a3ffe0df Reviewed-on: https://chromium-review.googlesource.com/778184 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4f407ce2 2017-11-21T11:52:12 Fix Clang dEQP build on Win. Rolls the build/ repos from Chromium to include the fixed config. Also includes incidental improvements to platform-specific hooks. Bug: chromium:727437 Change-Id: Ia42a30acac1e800e593e304bfc59d86eb0a1e57c Reviewed-on: https://chromium-review.googlesource.com/782340 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 378734c5 2017-11-20T16:32:56 D3D11: Lazy evaluation for draw call vertex params. The vertex params are the 'start' vertex index and the number of vertices in the draw call. For indexed draws, they sometimes mean we need to compute the index range. In other cases, we don't. Defer computing the index range as long as possible so we don't end up computing the index range when we don't have to. BUG=angleproject:2229 Change-Id: I8e125416ef6767787a14509b322efa8dcd8e4a34 Reviewed-on: https://chromium-review.googlesource.com/764676 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Olli Etuaho 39f74df5 2017-11-20T16:09:57 Remove unreferenced struct types from the AST This expands pruning unreferenced variables so that unreferenced named struct types can also be removed from the AST. Includes a small cleanup in GLSL output so that the output code matching tests can test against clean output. BUG=chromium:786535 TEST=angle_unittests Change-Id: I20974ac99a797e478d82f9203c179d2d58fac268 Reviewed-on: https://chromium-review.googlesource.com/779519 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 03fd0356 2017-11-20T16:30:10 D3D11: Push index range computation deeper. If we can make the index range computation happen as late as possible, we won't have to check it during the fastest draw call paths. This change makes it easier to skip re-computing some index range checks by only checking it in one place in IndexDataManager, and by making it a lazy check; the check is never evaluated if the primitive restart workaround is not enabled. Future work can also push the index range computation for vertex info later, so we only evaluate it in the cases where we need it. BUG=angleproject:2229 Change-Id: Ic55fac9e23fd35a119ddff475355a43095d2e3e9 Reviewed-on: https://chromium-review.googlesource.com/764675 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill c7965001 2017-11-20T23:29:11 Revert "Make TType store a const char * for mangled name." This reverts commit dc7bffd06b526bbffd3d1c1ddbd6c763a2cc7287. Reason for revert: Causes a memory leak, detected by ASAN bot: https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/494713 Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x847aa2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:92:3 #1 0x193a833 in sh::TType::buildMangledName() const third_party/angle/src/compiler/translator/Types.cpp:545:21 #2 0x193d2e8 in getMangledName third_party/angle/src/compiler/translator/Types.cpp:751:24 #3 0x193d2e8 in sh::TType::realize() third_party/angle/src/compiler/translator/Types.cpp:759 #4 0x1834474 in sh::TCache::getType(sh::TBasicType, sh::TPrecision, sh::TQualifier, unsigned char, unsigned char) third_party/angle/src/compiler/translator/Cache.cpp:89:11 #5 0x1859ac7 in getType third_party/angle/src/compiler/translator/Cache.h:36:16 #6 0x1859ac7 in sh::InsertBuiltInFunctions(unsigned int, ShShaderSpec, ShBuiltInResources const&, sh::TSymbolTable&) third_party/angle/src/compiler/translator/Initialize.cpp:28 Bug: angleproject:1432 Original change's description: > Make TType store a const char * for mangled name. > > We would only ever use the c_str value from the mangled name. This > makes it easier to make constexpr TTypes. > > Bug: angleproject:1432 > Change-Id: I147b3a85f9b8b2453e2d7f4a713d767b22036cc9 > Reviewed-on: https://chromium-review.googlesource.com/776277 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Kai Ninomiya <kainino@chromium.org> TBR=jmadill@chromium.org,kainino@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: angleproject:1432 Change-Id: Ib112a2ce9871a4f4afc53101ac1a3ddd166008cf Reviewed-on: https://chromium-review.googlesource.com/780420 Reviewed-by: Jamie Madill <jmadill@chromium.org>
jchen10 85c93c41 2017-11-12T15:36:47 Refactor VaryingPacking Move all packing related logic from Program to VaryingPacking. Do linkValidateTransformFeedback check first to simplify packing. Make getPackedVaryings collect all required VaryingPackings in one run pass, so that packUserVaryings can focus on packing merely. BUG=angleproject:2241 Change-Id: I5e84e6e4688c80ba7a77a265b8ffaf79f4ddbb87 Reviewed-on: https://chromium-review.googlesource.com/764821 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 578b51fd 2017-11-20T16:13:34 D3D: Add helper for index translation type. This makes it a bit simpler to work with the prepareIndexData method. Also removes the mRendererClass member of the index data manager since it was no longer necessary. BUG=angleproject:2229 Change-Id: I03768b104da21f57c499239bbbb5f716efb0fd48 Reviewed-on: https://chromium-review.googlesource.com/765261 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 92019431 2017-11-20T13:09:34 Make conversion from GL types to native bools consistant. Some places would compare with "== GL_TRUE" and others with "!= GL_FALSE". This behaviour is not in the OpenGL spec but "!= GL_FALSE" is the most standard and follows the same rules as C and C++. Remove un-necessary validation that params are either GL_TRUE or GL_FALSE. Update some internal storage from GLboolean to bool. BUG=angleproject:2258 Change-Id: I12adbe2d24318a206521ca6ad1099ee7e2bf677e Reviewed-on: https://chromium-review.googlesource.com/779799 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 2f294c9a 2017-11-20T14:47:26 Add constructors for TMemoryQualifier and TLayoutQualifier. These replace the ::create methods, to facilitate constexpr versions. Also adds a constructor of WorkGroupSize that can be made to be constexpr. Bug: angleproject:1432 Change-Id: I413d1a56102c94d6a383775110a2b850a7532ea0 Reviewed-on: https://chromium-review.googlesource.com/776279 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Geoff Lang 416a23e8 2017-11-20T12:34:20 ProgramGL: Make sure the binary vector does not read out of bounds. By sizing the vector to at least one element, it is not possible to pass invalid pointers to the driver or binary stream even if the binary is zero-sized. BUG=angleproject:2257 Change-Id: Ie0e42bff1192207e0e069934b03dfd49e8d34824 Reviewed-on: https://chromium-review.googlesource.com/779739 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4dd167fb 2017-11-09T13:08:31 Vulkan: Assign locations to varyings. These were actually always required, but only was caught by the newer versions of the SPIR-V toolchain. BUG=angleproject:2237 Change-Id: I43fef179e8792e46a602b39a6decafcab03b19df Reviewed-on: https://chromium-review.googlesource.com/760638 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 05fd3860 2017-11-13T10:59:35 Make sure non-multi-sampled EGL configs are always exposed. It is possible for some hardware to not support multisampling on any texture formats which results in an empty sample set for all formats. BUG=angleproject:2242 Change-Id: I8148c781ec22ec02562b6a8b5d1b966c6f13915e Reviewed-on: https://chromium-review.googlesource.com/766568 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Bryan Bernhart (Intel Americas Inc) 491b0d60 2017-11-10T12:48:22 WebGLCompatibility: Allow GL_DEPTH_STENCIL_ATTACHMENT. Permits depth-stencil attachment points for WebGL. BUG=angleproject:2090 Change-Id: I7f5a7c63f2a4a76116ce5639833e5fd8d7f50ffb Reviewed-on: https://chromium-review.googlesource.com/764591 Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho be0e2c0c 2017-11-20T11:38:16 Fix type conversion warnings Warnings about implicit type conversions were showing up as errors on MSVS 2017. TEST=build with MSVS 2017 Change-Id: I5f173a6838da16e96fad134756d31f56890c147b Reviewed-on: https://chromium-review.googlesource.com/778841 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill dc7bffd0 2017-11-18T09:34:16 Make TType store a const char * for mangled name. We would only ever use the c_str value from the mangled name. This makes it easier to make constexpr TTypes. Bug: angleproject:1432 Change-Id: I147b3a85f9b8b2453e2d7f4a713d767b22036cc9 Reviewed-on: https://chromium-review.googlesource.com/776277 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Jamie Madill 90ed1e49 2017-11-17T11:14:43 Reland "Clean up the TType class." This is a reland of 3f286cd1b6e29605a159ee0bd20c76929d4d5a9f Original change's description: > Clean up the TType class. > > Move more methods into the cpp file, and rename member variables to > start with the "m" prefix. > > Also move most of the TPublicType methods into the cpp. > > Bug: angleproject:1432 > Change-Id: Ib11a3c8c6ace654fd52077a317814665f81a7261 > Reviewed-on: https://chromium-review.googlesource.com/776276 > Reviewed-by: Kai Ninomiya <kainino@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> Bug: angleproject:1432 Bug: chromium:786603 Change-Id: I7f91557d9f9065f4aa90130ce30dc27e9f796065 Reviewed-on: https://chromium-review.googlesource.com/777715 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei Shao c622833c 2017-11-16T21:21:56 Re-enable SimpleStateChangeTest.RedefineBufferInUse on Win/Intel Now SimpleStateChangeTest.RedefineBufferInUse can pass on Win/Intel with https://chromium-review.googlesource.com/756959 BUG=angleproject:2221 TEST=angle_end2end_test Change-Id: Ibdb619a61fcaa35c72ff5a22dc6905edf9f0ec7b Reviewed-on: https://chromium-review.googlesource.com/774679 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Zhenyao Mo 758bc6a9 2017-11-18T00:02:09 Revert "Clean up the TType class." This reverts commit 3f286cd1b6e29605a159ee0bd20c76929d4d5a9f. Reason for revert: crbug.com/786603 Original change's description: > Clean up the TType class. > > Move more methods into the cpp file, and rename member variables to > start with the "m" prefix. > > Also move most of the TPublicType methods into the cpp. > > Bug: angleproject:1432 > Change-Id: Ib11a3c8c6ace654fd52077a317814665f81a7261 > Reviewed-on: https://chromium-review.googlesource.com/776276 > Reviewed-by: Kai Ninomiya <kainino@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=jmadill@chromium.org,oetuaho@nvidia.com,kainino@chromium.org Change-Id: Ib3062a71118095a3e58e75bfee2474c2e4ae9431 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:1432 Reviewed-on: https://chromium-review.googlesource.com/777801 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Jamie Madill 3f286cd1 2017-11-17T11:14:43 Clean up the TType class. Move more methods into the cpp file, and rename member variables to start with the "m" prefix. Also move most of the TPublicType methods into the cpp. Bug: angleproject:1432 Change-Id: Ib11a3c8c6ace654fd52077a317814665f81a7261 Reviewed-on: https://chromium-review.googlesource.com/776276 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 3d70ca9c 2017-11-10T16:53:26 Remove unreferenced variables from the AST Unreferenced local and global variables are now pruned from the AST. They will be removed unless their initializer has side effects. The CollectVariables step needs to be run after the pruning, as the pruning may affect which interface variables are statically used. It's also good to gather built-ins that need to be emulated after the pruning, so unnecessary built-in emulation functions are not added to the translator output. This will help handle some dEQP tests for arrays of arrays that have extremely large local arrays that are only used in an array length query. By constant folding the length and pruning unused variables we will avoid adding a large amount of array initialization code to the generated shaders. BUG=angleproject:2166 TEST=angle_unittests, angle_end2end_tests Change-Id: Ic918bfe8f16460bcd6101d73a7a674145f5aeecd Reviewed-on: https://chromium-review.googlesource.com/766434 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 2c7f34c8 2017-10-09T17:18:02 Initialize uninitialized GLSL arrays in a for loop Previously, creating nodes for initializing each single array element could result in memory bloat during translation when dealing with large arrays. The resulting shader could also end up very long. Initialize most arrays using a simple for loop instead. The loop is compatible with ESSL 1.00 Appendix A limitations. An exception is made for fragment outputs, so that they are not indexed by non-constant values. On some platforms using the a loop to initialize variables can cause problems, so we also have a compiler flag for turning this behavior off. The flag was already added earlier for a staggered rollout of this functionality. BUG=chromium:735497 TEST=angle_unittests, angle_end2end_tests, WebGL conformance tests Change-Id: Iec727821d8137db56b440ddbe007879b1b55f61f Reviewed-on: https://chromium-review.googlesource.com/707195 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho bb27c3a1 2017-11-15T16:32:25 Fix VectorizeVectorScalarArithmetic statement insertion The traverser must avoid inserting two statements to the same position on a single traversal, so it doesn't trigger an assert. BUG=chromium:784078 TEST=angle_unittests Change-Id: I855054e62cc1b1cf4e6bb02af527954151c7d0e7 Reviewed-on: https://chromium-review.googlesource.com/771611 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1eda27a6 2017-11-16T13:06:38 Buffer11: Allow CopySubData from uninitialized. This fixes a very odd use case where an app would try to copy from an uninitialized buffer. I didn't search the spec too closely, but it's likely a valid operation that produces undefined buffer contents. Previously to this change we would genearte an OOM error. Also includes an unrelated fix to ensure the latest buffer storage is never nullptr when we have any data. Bug: angleproject:1155 Change-Id: I4292bd302cc2b84d125a7d3e8d28e4d2b0210e53 Reviewed-on: https://chromium-review.googlesource.com/774991 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 78413499 2017-11-16T17:36:13 Skip ShaderStorageBufferTest31.AtomicMemoryFunctions on Linux AMD GL BUG=angleproject:2255 Change-Id: I986ee0e674d0f3fc2425c922ca92a3f8d86efb8c Reviewed-on: https://chromium-review.googlesource.com/775816 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Brandon Jones 92a1459f 2017-11-16T10:01:08 Add Regression Test for D3D11 Alpha Passthrough As a follow up to commit "8d6af08 Use dedicated ALPHA passthrough shader", this change adds a regression test that verifies RGB channels are set to zero when performing an ALPHA copy. BUG=angleproject:2239 Change-Id: Icc08deb523c388a0f2cbdcadd1eec69a97fbe136 Reviewed-on: https://chromium-review.googlesource.com/774579 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho b5601eb6 2017-11-15T18:08:04 Only initialize globals if initialization flag is set This avoids the possibility of initializing globals twice in Chromium. Now we also never initialize variables redundantly in case we're writing HLSL output. This was already the intent of the code before, but a mistake had slipped in and the code didn't actually check the output type properly. This also simplifies DeferGlobalInitializers by running it after SeparateDeclarations. BUG=chromium:735497 TEST=WebGL conformance tests Change-Id: I95036a24ac8cf18113755510376a2fca286b3ee6 Reviewed-on: https://chromium-review.googlesource.com/771555 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 8957b6c0 2017-11-14T12:40:38 Add perf test for ushort DrawElements. The code path in the D3D11 back-end is sigificantly different for unsigned short indices vs unsigned int. Because of the workaround we have for the primitive restart index in D3D11, ushort rendering can be slower. BUG=angleproject:2229 Change-Id: I303dcc55b0314ec45508044995ba47b250cbb87d Reviewed-on: https://chromium-review.googlesource.com/767149 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jeff Gilbert 0a05df48 2017-11-02T21:39:08 Add TextureUploadFormatTest for texture unpack/upload behavior checks. Also force ANGLE_SKIP_TEST_IF() to require a semicolon. BUG=angleproject:2220 TEST=angle_end2end_tests Change-Id: I2dc777ec75babb8fbb1a2dd8949636c5c05c5767 Reviewed-on: https://chromium-review.googlesource.com/754337 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiajia Qin a3106c58 2017-11-03T09:39:39 ES31: Add atomic memory functions BUG=angleproject:1442 TEST=angle_unittests, angle_end2end_tests dEQP-GLES31.functional.compute.shared_var.atomic* dEQP-GLES31.functional.compute.basic.shared_atomic_op* dEQP-GLES31.functional.ssbo.atomic.* Change-Id: I82b54fde3a852d3bd917b1e19680baa1c28fce4d Reviewed-on: https://chromium-review.googlesource.com/765061 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 39644fee 2017-11-15T16:31:44 Fix Clang build with dEQP. This will require a Chrome-side patch to the build/ folder to enable the new path, with appropriate Chrome-side changes. Bug: chromium:727437 Change-Id: Iae8d8f4caeead703b322abce75c97c7c9d9e1619 Reviewed-on: https://chromium-review.googlesource.com/773021 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 98f9f537 2017-11-15T19:16:19 Skip RenderingLimitToDefaultFBOSizeWithNoAttachments on Linux AMD GL BUG=anglebug:2253 Change-Id: I4c2fc6904f88a6d61c5d847b812a4272a99c1906 Reviewed-on: https://chromium-review.googlesource.com/773063 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 4d146931 2017-11-15T16:31:43 Roll all ANGLE internal DEPS. None of these deps are used in the Chromium builds, so this only affects the standalone version. Includes a change in the build repo necessary to enable fixing the Clang build with dEQP. Bug: chromium:727437 Change-Id: Iea5f6299e9f17555891c812229a54a850776f117 Reviewed-on: https://chromium-review.googlesource.com/773020 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0acb268c 2017-11-14T12:40:37 TextureD3D: Only update storage if images dirty. This uses the existing dirty bit mDirtyImages to early return in the TextureD3D::updateStorage methods. Also fixes a couple missing cases for setting dirty images. The code could be improved in the future by using a bitset of dirty images per mip level instead of a single bit. BUG=angleproject:1392 Change-Id: I58df2be455b6ee51c3e3f76a6fa44ad585d1480d Reviewed-on: https://chromium-review.googlesource.com/761243 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 192199a7 2017-11-14T16:12:20 ResourceManager11: Store resource sizes 64-bit. This prevents possible size count overflow when in 32-bit mode with a lot of very large resources. Issue originally reported via Mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1412554 BUG=angleproject:2234 Change-Id: Idacfda98356c13bf22bc493ef7aa2bff1a287f97 Reviewed-on: https://chromium-review.googlesource.com/769749 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6226b8df 2017-11-09T13:08:30 Vulkan: Fix missing index buffer usage. The newer validation layers picked up this missing bit. BUG=angleproject:2237 Change-Id: I5bb2f1db3a4e284c003de0f5b23f7f613056af3a Reviewed-on: https://chromium-review.googlesource.com/760637 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Olli Etuaho 858ff481 2017-11-15T13:41:46 Make isNamelessStruct a member of TType This will be needed outside of InitializeVariables when removing unreferenced variables is added. Named struct type declarations cannot be pruned as easily as they might be referenced later. BUG=angleproject:2166 TEST=angle_unittests Change-Id: If1462abe67e62ae19bde97de3c8f3d15e99ae9ea Reviewed-on: https://chromium-review.googlesource.com/771790 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 10137d59 2017-10-30T15:36:44 Remove crash expectation on dEQP tests after driver fix NVIDIA 387.* drivers do not reproduce the issue anymore, so the test expectations for the previously failing indirect draw tests can be lifted. BUG=angleproject:1659 TEST=dEQP-GLES31.functional.draw_indirect.random.* Change-Id: Iba69821d19bfad8d2f2e81045658f3ef08695c80 Reviewed-on: https://chromium-review.googlesource.com/744021 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill d33c77c0 2017-11-09T13:08:30 Vulkan: Use correct transfer access mask in layout change. When using a transfer destination, we should be using the transfer access mask, not bottom of pipe or other bits. Uncovered by using a newer version of the layers SDK. BUG=angleproject:2237 Change-Id: I3ebcca707ac8889d2ece099e3765f5b0ca3dfdbc Reviewed-on: https://chromium-review.googlesource.com/760636 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill fea1e754 2017-11-14T16:42:37 Buffer11: Cleanup onCopyStorage. BUG=angleproject:1155 Change-Id: I7bc5c196d10ae040487ecd1137d9b18c3000775a Reviewed-on: https://chromium-review.googlesource.com/769730 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 08943afd 2017-11-14T16:51:00 Remove huge buffer data test. This is too difficult to implement without mocking new/delete. BUG=angleproject:875 Change-Id: I7cdafe11d26939f14a43bc515454dd5cf70c4a2a Reviewed-on: https://chromium-review.googlesource.com/769849 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang fb7685f4 2017-11-13T11:44:11 Validate texture parameters for >0 after rounding. From the spec (2.3.1 Data Conversion For State-Setting Commands): "Validation of values performed by state-setting commands is performed after conversion, unless specified otherwise for a specific command." BUG=783574 Change-Id: I9edf585a17489ad284bc85a1c3c2236b53ee34d9 Reviewed-on: https://chromium-review.googlesource.com/766569 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 7caa80e7 2017-11-14T15:03:14 Edit tests to reference temporary variables The shader translator is intended to prune unreferenced variables in the future. To maintain test coverage when this is done, most tests that used to have unreferenced GLSL locals and globals are edited to use built-ins or reference the necessary variables instead. BUG=angleproject:2166 TEST=angle_unittests, angle_end2end_tests Change-Id: I3964e7a80d52fc04a95f57e73da6095e433095e8 Reviewed-on: https://chromium-review.googlesource.com/768740 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 5ad52994 2017-11-14T12:43:40 Add generator for EGL proc table. This should improve ANGLE startup time by avoiding creating a large std::map filled with the entry points. BUG=chromium:781460 Change-Id: I20cfdb10b99844d0f60759dda73b729991dc60fe Reviewed-on: https://chromium-review.googlesource.com/768209 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang e8afa902 2017-09-27T15:00:43 Make GL_ANGLE_framebuffer_blit enableable. BUG=angleproject:1523 Change-Id: I5d6df35d2e65be6d73ec6100e3351ba5f9ff53a2 Reviewed-on: https://chromium-review.googlesource.com/688639 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 1d33c219 2017-11-13T10:21:39 Fix standalone mac compilation BUG= Change-Id: I225bd1693f595a64179b8e500cb1e7101fd2e197 Reviewed-on: https://chromium-review.googlesource.com/766472 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 740aa41d 2017-11-14T10:35:35 Fix angle::Platform export definitions. This was only showing up in the GYP build on Windows. BUG=chromium:778918 Change-Id: Ib9db0c928474be887ec1f46d7e99c0a3dedfb9e0 Reviewed-on: https://chromium-review.googlesource.com/768947 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Bryan Bernhart (Intel Americas Inc) f4f293ef 2017-11-06T15:56:29 Harden uniform array index parsing. Add overflow handling when parsing uniform variables. BUG=angleproject:2191 TEST=angle_unittests Change-Id: Ib2a69be1cc11a94420bc923a2aaaef8dc664d562 Reviewed-on: https://chromium-review.googlesource.com/756209 Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill ff7aac5e 2017-11-13T16:57:14 Re-land "Export angle::PlatformMethods." This should fix undefined function call sanitizer warnings. Re-land fixes the build and uses proper export annotation. Also fixes the missing source includes in BUILD.gn for libANGLE so future changes to Platform.h (and other includes) will get picked up by the dependency analyzer step. BUG=chromium:778918 Change-Id: I92cc8a43bbbdc70de50a67f73b223d8f903cd6cd Reviewed-on: https://chromium-review.googlesource.com/767111 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org>
Jamie Madill 36f34243 2017-11-13T21:41:42 Buffer11: Cache latest buffer storage. This saves needing to scan the list of buffers every time we query the latest buffer storage. Should slightly improve speed. BUG=angleproject:1155 Change-Id: I6be8457aca1ee5aa871090241e6f67ae16b094a5 Reviewed-on: https://chromium-review.googlesource.com/761242 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Brandon Jones 8d6af086 2017-11-08T09:14:06 Use dedicated ALPHA passthrough shader ANGLE previously used the RGBA passthrough shader for ALPHA copies. This commit adds a dedicated ALPHA shader that will not pass RGB components when doing an ALPHA copy. BUG=angleproject:2239 TEST=angle_end2end_tests Change-Id: I52d1f18a8f968db005cd887803123c17e16df938 Reviewed-on: https://chromium-review.googlesource.com/758717 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c2eb32ba 2017-11-13T21:51:48 Revert "Export angle::PlatformMethods." This reverts commit 8b920b211d7363daef0d5fb8d2bd69f3253ab033. Reason for revert: This had a syntax error and skipped the compile step, so went undetected. BUG=chromium:778918 Original change's description: > Export angle::PlatformMethods. > > This should fix undefined function call sanitizer warnings. > > BUG=chromium:778918 > > Change-Id: I718d58edd7b75a3fca1089edc4df7f3251d85153 > Reviewed-on: https://chromium-review.googlesource.com/767152 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=jmadill@chromium.org,piman@chromium.org Change-Id: I1825ce88bc82867a983bb08cd6732caff54f061c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:778918 Reviewed-on: https://chromium-review.googlesource.com/767128 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 87718a87 2017-11-13T15:01:19 Use more gl::Error in IndexDataManager. BUG=angleproject:2229 Change-Id: I19f7c1600300298e7bc2a1f7dc4215a67053767c Reviewed-on: https://chromium-review.googlesource.com/764674 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 8b920b21 2017-11-13T15:09:56 Export angle::PlatformMethods. This should fix undefined function call sanitizer warnings. BUG=chromium:778918 Change-Id: I718d58edd7b75a3fca1089edc4df7f3251d85153 Reviewed-on: https://chromium-review.googlesource.com/767152 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez d5d3099e 2017-11-13T10:21:52 Avoid redundant BindingPointer::set in setBufferBinding BUG=angleproject:2169 Change-Id: I91f099a53b456fc96988839e34733ce09fe38336 Reviewed-on: https://chromium-review.googlesource.com/766473 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 7af63727 2017-11-13T15:03:40 Fix nullptr dereference on struct parameter error Function parameter name string does not necessarily exist, so it's better to use the function name as the token in the error message. BUG=chromium:784158 TEST=angle_unittests Change-Id: I8f3b8604fd702bdc9486b8d721a5f60de1ff3fa7 Reviewed-on: https://chromium-review.googlesource.com/765972 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho c4eca923 2017-11-13T12:27:23 Fix MSVS 2015 warnings Fix warnings about implicit int to bool conversion and noexcept. TEST=build on MVSV 2015 Change-Id: I437977ca01f62ce2df39872da5903a0338a73bba Reviewed-on: https://chromium-review.googlesource.com/765371 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
JiangYizhou 19744529 2017-10-11T16:37:25 Clear up deqp cases for multisampled texture BUG=angleproject:1590 TEST=dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.* TEST=dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.* TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.renderbuffer_storage_multisample Change-Id: Ic5b9867f3588dae4c930e844b1ee2b99467a60ff Reviewed-on: https://chromium-review.googlesource.com/711975 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 703671e9 2017-11-08T17:47:18 Unify extension behavior checks Some supportsExtension and isExtensionEnabled checks are now turned into checkCanUseExtension checks. Using checkCanUseExtension is preferable so that warnings are generated correctly when an extension is used and a warn directive is present. isExtensionEnabled is still used in some places where an error message about the extension could be confusing, particularly when a core spec version adds support for something that is also present in an extension. Also make it possible to disable ARB_texture_rectangle extension using an extension directive. ARB_texture_rectangle extension functionality is enabled by default in GLSL when the extension is supported. BUG=angleproject:2238 TEST=angle_unittests Change-Id: I7455293412ff469f54bc7da79df146e7bc127379 Reviewed-on: https://chromium-review.googlesource.com/760737 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho bb0775da 2017-11-10T16:20:43 Add flag for turning off initializing variables with loops This flag is needed to toggle upcoming variable initialization mode which uses for loops to optimize the compilation process. Initializing variables using for loops will be turned on by default, but it needs to be turned off in Chromium in certain cases. Chromium will use the flag added in this patch and that code will need to go into Chromium before finishing the implementation in ANGLE. BUG=chromium:735497 Change-Id: I3a0e7b7c6cebe60afa72964fbd0caf3b1eafccbc Reviewed-on: https://chromium-review.googlesource.com/763451 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jeff Gilbert 48590358 2017-11-07T16:03:38 Remove formatType arg from computeCompressedImageSize. BUG=angleproject:2230 Change-Id: Ie291ba05efa89bc4ea52966e975d5a21431a461f Reviewed-on: https://chromium-review.googlesource.com/757877 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill cac94a91 2017-11-10T10:09:32 Optimize ShaderVariable::isBuiltIn. This makes the check a bit faster, by inlining the prefix check. Also some cleanups to ValidateVertexShaderAttributeTypeMatch. BUG=angleproject:2202 Change-Id: Ifeab4cd85a91a1639a461f44776a68ac98c5bd79 Reviewed-on: https://chromium-review.googlesource.com/761240 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tom Anderson 23cd4add 2017-11-10T14:54:37 Add missing include to stddef.h on arm Change-Id: I28771a550a3188993635f55803093fc49590ceb1 Reviewed-on: https://chromium-review.googlesource.com/764887 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 336129f6 2017-10-17T15:55:40 Use a packed enum for buffer targets. BUG=angleproject:2169 Change-Id: I4e08973d0e16404b7b8ee2f119e29ac502e28669 Reviewed-on: https://chromium-review.googlesource.com/723865 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov e3bfefb4 2017-11-10T16:22:37 Align float access in InterleavedAttributeData perf test Used to crash on arm because of unaligned float access in positionColorData BUG=chromium:675997 Change-Id: Iadc705986700248ce3cff9bb33fcd72c94ad1c59 Reviewed-on: https://chromium-review.googlesource.com/764688 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 9776035d 2017-11-09T13:08:29 Vulkan: Implement Buffer updates. This allows the app to update Buffer data while the data is in use by the GPU. For instance, uploading new vertex attribute data after a draw call. It introduces a StagingBuffer helper class, similar to StagingImage. These classes are somewhat temporary and could be redesigned. BUG=angleproject:2200 Change-Id: If8634b1411779b16c2bd22cce18a5f37ed958d1c Reviewed-on: https://chromium-review.googlesource.com/756959 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
JiangYizhou 38d92b59 2017-09-13T13:47:52 Workaround Intel driver bug on D3D when renderering with no render target When rendering with no render target on D3D, two bugs lead to incorrect behavior on Intel drivers < 4815. The rendering samples always pass neglecting discard statement in pixel shader. Two bugs are listed bellow, 1. When a framebuffer has no attachments, the pixel shader will be recompiled to drop 'SV_TARGET'. On Intel drivers, when using a pixel shader with no 'SV_TARGET' in a draw, pixels are always generated even if they should be discard by 'discard' statements. 2. When a framebuffer has no attachments, ID3D11BlendState.RenderTarget [].RenderTargetWriteMask were set to 0 in angle. If RenderTargetWriteMask is 0 and rendertarget is not set, then rendering samples also pass neglecting discard statement in pixel shader on Intel. So we add a dummy texture as render target to workaround this issue. BUG=angleproject:2152 TEST=FramebufferTest_ES31.RenderingLimitToDefaultFBOSizeWithNoAttachments/ES3_1_D3D11 TEST=dEQP-GLES31.functional.fbo.no_attachments.* TEST=dEQP-GLES31.functional.state_query.integer.max_framebuffer* TEST=dEQP-GLES31.functional.state_query.integer.max_color_texture_samples_* TEST=dEQP-GLES31.functional.state_query.integer.max_depth_texture_samples_* TEST=dEQP-GLES31.functional.state_query.integer.max_integer_samples_* Change-Id: I1cb974703b6c05c39b731d147f7c8c4fb7b5fe68 Reviewed-on: https://chromium-review.googlesource.com/741544 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jiajia Qin 3a9090fa 2017-09-27T14:37:04 ES31: Add BUFFER_VARIABLE and SHADER_STORAGE_BLOCK program interfaces This patch collects the shader storage block members information. It implements getShaderStorageBlockMemberInfo and getShaderStorageBlockSize for OpenGL backend. Meanwhile, it implements BUFFER_VARIABLE and SHADER_STORAGE_BLOCK interfaces for program query. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTest* dEQP-GLES31.functional.layout_binding.ssbo* dEQP-GLES31.functional.compute.basic.empty dEQP-GLES31.functional.compute.basic.ssbo_rw* dEQP-GLES31.functional.compute.basic.ssbo_local_barrier* dEQP-GLES31.functional.compute.basic.copy_image_to_ssbo_small dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_groups dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_invocations dEQP-GLES31.functional.compute.basic.copy_ssbo_single_invocation dEQP-GLES31.functional.compute.basic.copy_ssbo_to_image_small dEQP-GLES31.functional.compute.basic.shared_var* dEQP-GLES31.functional.compute.basic.ubo_to_ssbo* dEQP-GLES31.functional.compute.basic.write_multiple_arr* dEQP-GLES31.functional.compute.shared_var.basic_type.* dEQP-GLES31.functional.compute.shared_var.work_group_size.* dEQP-GLES31.functional.atomic_counter.* Change-Id: Ie8b81fde5a2e919aab77adb3d137c9ff2f193409 Reviewed-on: https://chromium-review.googlesource.com/712235 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 225bfa95 2017-11-10T10:53:57 Always update HALF_FLOAT_OES type to HALF_FLOAT on Desktop GL. TEST=webgl_conformance_gl_passthrough_tests on Linux/Windows BUG=angleproject:2231 Change-Id: I17c7d693e2b75726e2478925e0f22963de6ab819 Reviewed-on: https://chromium-review.googlesource.com/763987 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang ee6884e7 2017-11-09T16:51:11 Generate generic error messages for Error objects without messages. Makes sure that the debug output is fired for all generated errors. BUG=783054 Change-Id: Ia30870cd950c53da892554e0862276d4be5360ac Reviewed-on: https://chromium-review.googlesource.com/761760 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org>
Jeff Gilbert 9e888a46 2017-11-06T21:34:22 Fix HALF_FLOAT/HALF_FLOAT_OES selection with the ES3 backend. Found via TextureUploadFormatTest. BUG=angleproject:2231 Change-Id: I8f214c4cfe3d8fead9226db20e57f6e6039b5b44 Reviewed-on: https://chromium-review.googlesource.com/756642 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jeff Gilbert f5b8ba6b 2017-11-06T19:15:25 Set TextureGL dirty bits when workaround usage of levels changes. Previously, we wouldn't update the dirty bits when switching from a workarounded alpha/alpha/uint8 (r8/red/uint8) to something else. Found via TextureUploadFormatTest. BUG=angleproject:2232 Change-Id: Idba63282f8a65daec5675798d3516345ca941447 Reviewed-on: https://chromium-review.googlesource.com/756641 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 661fc487 2017-10-16T12:17:05 Work around NVIDIA GLSL vector-scalar op bug This adds a new AST transform VectorizeVectorScalarArithmetic. The AST transform works around incorrect handling of certain types of GLSL arithmetic operations by NVIDIA's GL driver. It works around only the most common cases where the bug reproduces, since detecting all the cases would take more sophisticated analysis of the code than what is currently easily implementable in ANGLE. When a float add operator has both vector and scalar operands, the AST transform turns the scalar operand into a vector operand. Example: vec4 f; f += 1.0; gets turned into: vec4 f; f += vec4(1.0); When a vector constructor contains a binary scalar float multiplication or division operation as its only argument, the AST transform turns both operands of the binary operation into vector operands. Example: float f, g; vec4(f * g); gets turned into: float f, g; vec4(vec4(f) * vec4(g)); Another example with compound assignment: float f, g; vec4(f *= g); gets turned into: float f, g; vec4 s0 = vec4(f); (s0 *= g, f = s0.x), s0; This latter transformation only works in case the compound assignment left hand expression doesn't have side effects. BUG=chromium:772651 TEST=angle_end2end_tests Change-Id: I84ec04287793c56a94845a725785439565debdaf Reviewed-on: https://chromium-review.googlesource.com/721321 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 73dcc60c 2017-11-08T16:41:52 Support more always-available extensions in ContextNULL. Add some extensions that are required by the passthrough command decoder and exposed on all other ANGLE backends. BUG=781164 Change-Id: Ie83143effd2460122e7a093c658f217fb460d8b2 Reviewed-on: https://chromium-review.googlesource.com/759132 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Sami Väisänen 935cb7c5 2017-11-08T15:53:41 Support B8G8R8A8_UNORM_SRGB as D3D11 texture format Support B8G8R8A8_UNORM_SRGB as D3D11 texture format. BUG=angleproject:2172 Change-Id: I2f15a55123601735d7fc6caa40bb056243a91b44 Reviewed-on: https://chromium-review.googlesource.com/758600 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang fa125c9e 2017-10-24T13:01:46 Validate GL_COLOR_ATTACHMENT0 separately from the draw buffers attachments. EXT_draw_buffers may not be enabled but the maxColorAttachments cap is always initialized so make sure to validate for the extension instead of just checking that the attachment is in the valid range. BUG=angleproject:2058 Change-Id: I5b48cb496bf96cbc0911295aa5bf87784ce9241b Reviewed-on: https://chromium-review.googlesource.com/735749 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yunchao He 70b715c9 2017-11-07T14:59:15 ES31: Add test for DispatchCompute with rendering program BUG=angleproject:1955 Change-Id: Ib3ee1ead76c83c8dceafba30a1c7526dd0891f8c Reviewed-on: https://chromium-review.googlesource.com/756654 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiawei Shao 3ef06a9f 2017-11-03T18:41:33 Skip hasMappedBuffer check in draw validations in WebGL contexts MapBufferRange, FlushMappedBufferRange, and UnmapBuffer entry points are removed from the WebGL 2.0 API[1], so we don't need to validate if a vertex array buffer or an index buffer is mapped or not in draw validations (ValidateDrawBase and ValidateDrawElementsCommon) in a WebGL context. According to profiling data, hasMappedBuffer weights over 1% (1.12%) CPU times in WebGL Acquarium benchmark (10K fishes, Intel HD630). With this patch, this hot spot has disappeared and no new hot spots are introduced. This optimization can also slightly improve FPS on WebGL benchmarks, or keep the same at least. [1] https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.14 BUG=angleproject:1671 Change-Id: I96e770b19b691e81774cc8e0c1b66b65dcc3cc83 Reviewed-on: https://chromium-review.googlesource.com/753281 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jiawei Shao 0e883134 2017-10-26T09:53:50 ES31: Support EXT_geometry_shader in GLSL compiler This patch intends to support "EXT_geometry_shader" as a valid extension string in ANGLE GLSL compiler. We decide to support it because in dEQP-GLES31 all geometry shader related tests are using "EXT_geometry_shader" instead of "OES_geometry_shader". 1. Support new extension string "EXT_geometry_shader" 2. Enable geometry shader layout qualifiers with EXT_geometry_shader 3. Enable geometry shader builtins with EXT_geometry_shader BUG=angleproject:1941 TEST=angle_unittests Change-Id: Iaedd01a9100ccf56243c957db36ff0c983d17060 Reviewed-on: https://chromium-review.googlesource.com/737933 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jeff Gilbert c5de4d29 2017-10-31T15:07:53 KHR_create_context with GLES forbids _KHR reset notification enum. EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT from EXT_create_context_robustness must be used with GLES instead. BUG=angleproject:2213 Change-Id: Icaf3c7550c4eb7cb61c6d4ed37adba7824ca4bc8 Reviewed-on: https://chromium-review.googlesource.com/759122 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3fb0ca02 2017-11-07T18:06:12 Move LazyResource::resolveImpl to the cpp. This avoids a compile error where GCC is not compatible with MSVS and Clang, who can both handle calls to forward declared functions in templates. It explicitly specializes LazyResource for the used template types. BUG=angleproject:2182 Change-Id: Iedb1f157d0662b0ea4472c9b4e85828217be577e Reviewed-on: https://chromium-review.googlesource.com/757758 Reviewed-by: Jeff Gilbert <jgilbert@mozilla.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6db1c2e8 2017-11-08T09:17:40 Link interface blocks in ProgramImpl::link. This allows the back-end to have access to the interface block info in the link operation, and also allows the interface block info to have direct access to the post-link Impl information. BUG=angleproject:2208 Change-Id: Ib2bfb3c9155eee715bd3d29de1c3fdd67b16eed4 Reviewed-on: https://chromium-review.googlesource.com/753521 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jeff Gilbert 8f8edd6e 2017-10-31T14:26:30 attachmentsHaveSameDimensions should not compare depths. From: https://bugzilla.mozilla.org/show_bug.cgi?id=1372083 BUG=angleproject:2210 TEST=angle_end2end_tests Change-Id: I00539fb7e0bc9a21f90f5c87d7082c2a6b1ed907 Reviewed-on: https://chromium-review.googlesource.com/747814 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez cda6af19 2017-10-30T19:20:37 Split pixelBuffer from pack/unpack state This will refactor will help use packed enums for buffer targets. BUG=angleproject:2169 Change-Id: Ie7ed3e105f89457c67027e6598d7e29503ad355c Reviewed-on: https://chromium-review.googlesource.com/745181 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 29a20992 2017-11-06T18:23:16 Add back dirty bits for pack / unpack buffer binding BUG=angleproject:2169 Change-Id: I8cee9e1c7565d90022216d62b45f0eec5bc51f14 Reviewed-on: https://chromium-review.googlesource.com/755461 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 7af0de52 2017-11-06T17:09:33 Rename UniformLinker.cpp/h to ProgramLinkedResources. A more general name for a file that will house a collection of pogram variable related linking code. BUG=angleproject:2208 Change-Id: I82710f6abadd2df58fb58a3c4179989fe956e7e4 Reviewed-on: https://chromium-review.googlesource.com/755858 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho ef7fb388 2017-11-07T16:33:49 Size const unsized arrays without an initializer The array size for unsized arrays needs to be sanitized in all cases, since subsequent checks on array indexing depend on all arrays being sized. BUG=chromium:781729 TEST=angle_unittests Change-Id: I3af6c08bb249a19f7c2ef169c877a2b863eb31d3 Reviewed-on: https://chromium-review.googlesource.com/757101 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 1734e171 2017-10-27T15:30:27 Only store innermost array offset in VariableLocation Separate entries will be generated for each innermost array of arrays of arrays in the variable tables. Because of this VariableLocation actually only needs to store the innermost array index. BUG=angleproject:2125 TEST=angle_end2end_tests Change-Id: Id1ee35b3cecfc011d96b58e43cf0b1cccbfed408 Reviewed-on: https://chromium-review.googlesource.com/741742 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang fb05264b 2017-10-24T13:42:09 Disallow null pixel data for TexSubImage that have non-zero size. BUG=angleproject:2055 Change-Id: I4c338691776c6d807333c169ed876d686188a97c Reviewed-on: https://chromium-review.googlesource.com/735786 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill c9727f31 2017-11-07T12:37:07 Pass InterfaceBlockLinker to ProgramImpl::link. This change is in preparation for moving the linking logic to the Implementation. Introduces a ProgramLinkedResources class that is passed into the Impl and holds linking-related info such as the UBOs, Varyings, etc. BUG=angleproject:2208 Change-Id: I2ef0824b54bfb462c79d003bffe34e9cfad60d8a Reviewed-on: https://chromium-review.googlesource.com/746204 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho d80f2944 2017-11-06T12:44:45 Struct definition not allowed as function parameter type Struct definitions are not allowed as a function parameter type now. This is specified in ESSL 3.00.6 section 12.10. ESSL 3.00.6 section 6.1.1 contradicts this, but that seems like a mistake, it's been fixed in subsequent spec versions. BUG=angleproject:2225 TEST=angle_unittests Change-Id: I6b97d120c440f0c0a45d31bbfaf292fb497160ce Reviewed-on: https://chromium-review.googlesource.com/754606 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 977abce7 2017-11-07T08:03:19 Refactor interface block linking. This moves the logic for interface block linking. The new design is intended to be flexible enough to be passed into a back-end call to ProgramImpl::link. Then, the Impl object can be responsible for both filtering out unreferenced interface blocks as well as having access to the linked interface block information. A future change will pass the InterfaceBlockLinker objects (or objects when dealing with ES 3.1 and Shader Storage Blocks) to the Impl. This will help fix a D3D11 back-end bug where we would need acess to the Shader objects to finish a deferred uniform block link. This should also potentially make it easier for the back-ends to determine Shader Storage Block size and properties without defining new Impl methods. BUG=angleproject:2208 Change-Id: Ic5244a808dba44ba1a8c08d9ee701952034d2b18 Reviewed-on: https://chromium-review.googlesource.com/746203 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Olli Etuaho bd3cd506 2017-11-03T15:48:52 Clean up HLSL constructor output Split generating HLSL struct constructors from generating built-in type constructors, as these didn't have much in common. Struct constructors are now only generated when they are needed, as opposed to before, when they were generated on any use of a struct. This changes built-in constructor naming to include "_ctor" and gets rid of having special built-in type names just for constructors. This will make it easier to do changes to constructor output, for example to add constructors for structs in std140 layout. This might be needed to implement SSBOs efficiently. This includes one bug fix for writing out struct declarations for varyings. Also improves const-correctness of accessing structs through TType in general. BUG=angleproject:2218 TEST=angle_unittests, angle_end2end_tests Change-Id: If865fb56f86486b9c4a2c31e016ea16427f4a5fa Reviewed-on: https://chromium-review.googlesource.com/753883 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 5b09d90d 2017-11-06T12:06:24 Skip RedefineBufferInUse Vulkan test on Win/Intel. Also cleans up GenerateWorkarounds a bit for D3D11. BUG=angleproject:2221 Change-Id: I01667f850051045006d3439406aac3f4d094a374 Reviewed-on: https://chromium-review.googlesource.com/754915 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang a579ded1 2017-11-06T10:45:45 Extend BGRA8 glGetInternalformativ workaround to ES drivers. Some ES drivers also generate INVALID_ENUM errors when querying this format, particuarly on linux Mesa+nouveau. BUG=angleproject:2219 Change-Id: I7b9cf9b003a0125fabdda63038b4c8941710e1db Reviewed-on: https://chromium-review.googlesource.com/754329 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>