Log

Author Commit Date CI Message
Minmin Gong 5eeff0e4 2016-09-27T17:56:42 Fix ETC->DXT small mip transcode crash. BUG=angleproject:1510 Change-Id: I42355607235a05fe276342084acd1eb359c16de4 Reviewed-on: https://chromium-review.googlesource.com/390414 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho b6fa043d 2016-09-28T16:28:05 Split vector swizzle AST nodes into a different node class This avoids creating a weird aggregate node with a sequence of constant union nodes to store the offsets. They're stored neatly inside a vector instead. This makes code that needs to iterate over the swizzle offsets much simpler. BUG=angleproject:1490 TEST=angle_unittests Change-Id: I156b95723529ee05a94d30295ffb6d0952a98564 Reviewed-on: https://chromium-review.googlesource.com/390832 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Edwin Flores fde9d8c1 2016-07-28T10:53:19 D3D11: Add null check to Renderer11::testDeviceLost. After experiencing a device loss, Renderer11::resetDevice can fail to recreate mDevice, leaving it null. In a following call to testDeviceLost, mDevice will be dereferenced, causing a segfault. BUG=angleproject:1457 Change-Id: Ib5be64542929441ceb7088a328c3245ae7e52f17 Reviewed-on: https://chromium-review.googlesource.com/364120 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Qin Jiajia 9aa83fe3 2016-09-29T08:42:42 Add workaround for unused std140 and shared uniform blocks on MacOS On some Mac drivers with shader version 4.1, they will treat unused std140 and shared uniform blocks' members as inactive. However, WebGL2.0 based on OpenGL ES3.0.4 requires all members of a named uniform block declared with a shared or std140 layout qualifier to be considered active. The uniform block itself is also considered active. This workaround is to reference all members of unused std140 and shared uniform blocks at the beginning of the vertex/fragment shader's main(). BUG=chromium:618464 TEST=UniformBufferTest.ActiveUniformBlockNumber Change-Id: I1d2c5e3e8da04786ac6a37fd26f7bb9c14cd76ed Reviewed-on: https://chromium-review.googlesource.com/387169 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 886de369 2016-09-27T10:49:35 Factor code between PixelUnpackState and PixelPackState BUG=angleproject:1512 Change-Id: I4c60472d216bfc5198e635d70fd197a5738dde98 Reviewed-on: https://chromium-review.googlesource.com/390133 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shao 6f0a0dca 2016-09-27T13:51:29 Workaround isnan() on Intel drivers On some Intel drivers, calling function isnan() on highp float will get wrong answer. This patch work arounds this bug by using an expression to emulate this function. BUG=chromium:650547 Change-Id: I5bc5e0352c434f42cd2c55103a74f9f7ba51a72c Reviewed-on: https://chromium-review.googlesource.com/389834 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 42fad76d 2016-09-28T10:06:29 Handle negation of minimum representable integer Negating the minimum representable integer overflows, so it has undefined behavior in C++. Handle this as a special case in the code. BUG=chromium:637050 TEST=angle_unittests Change-Id: Ic6e6d638faddad9b70b5d1637bb4b42ef4f43784 Reviewed-on: https://chromium-review.googlesource.com/390551 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 1be4d493 2016-09-27T11:15:38 Fix handling integer overflow in constant folding Integer operations that overflow are defined to wrap in the ESSL 3.00.6 spec. Constant folding that happens inside the shader translator should also follow the wrapping rules. The new implementations of wrapping integer addition and subtraction use unsigned integers to perform calculations. Unsigned integers are defined to implement arithmetic in modulo 2^n in the C++ spec. This behavior is also leveraged to implement wrapping unsigned integer multiplication. The implementation of wrapping signed integer multiplication is slightly trickier. The operands are casted to a wider type to perform the multiplication in a way that doesn't overflow, and then the result is truncated and casted back to the narrower integer type. Incorrect tests that expected errors to be generated from integer overflow in constant folding are removed. BUG=chromium:637050 TEST=angle_unittests Change-Id: I0de7e25881d254803455fbf22907c192f49d09ff Reviewed-on: https://chromium-review.googlesource.com/390252 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 9a8d366a 2016-09-22T12:18:29 FramebufferGL: add readPixels workarounds Implements workarounds for: - The pack state making rows overlap in memory, which causes crashes on some drivers. - The driver adding an extra last row padding when checking if the pixel pack buffer is large enough for the readPixels. BUG=angleproject:1512 Change-Id: I120ff58649bb523e8b01da6ef03d8fcadaf076b2 Reviewed-on: https://chromium-review.googlesource.com/388029 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0f40d235 2016-09-23T14:50:29 Add a perf test for changing texture state. BUG=angleproject:1386 Change-Id: I44da3a4cb2b23f98978349f26b80d6bb3a6dc8b5 Reviewed-on: https://chromium-review.googlesource.com/388784 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho d4453573 2016-09-27T13:21:46 Fix integer division constant folding corner cases ESSL has undefined behavior when the integer modulus operator is used on negative operands. Generate a warning and fold the result to zero in this case. In case the minimum representable signed integer is divided by -1, the result is defined to be either the maximum or minimum representable value. We choose to fold the calculation to the maximum representable value in this case. BUG=angleproject:1537 TEST=angle_unittests Change-Id: I57fac6b54a3553b7a0f0e36cc6ba0ed59a88eea9 Reviewed-on: https://chromium-review.googlesource.com/390251 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez ece7c5a8 2016-09-21T15:28:23 Add validation for the pack buffer in ReadPixels BUG=angleproject:1512 Change-Id: Ia6bac628c35f04bc5d3adfde1569902475519698 Reviewed-on: https://chromium-review.googlesource.com/387668 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 2cacb778 2016-09-26T08:50:40 Fix folding shifts when operands have different signedness The code used to incorrectly assert that the right-hand side of shift should have the same signedness as the left-hand side. Instead simply assert that both the lhs and rhs are integer typed, and also don't rely on aliasing via union when accessing bit shift operands. Also disallow constant folded bit shifts where the right hand side is greater than 31. Shifting with values greater than the width of the type has undefined results in both ESSL and C++. BUG=chromium:648135 TEST=angle_unittests Change-Id: I84a99abc55f0eeda549b4781e954d17ba7b87552 Reviewed-on: https://chromium-review.googlesource.com/389351 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 054f7ed0 2016-09-20T17:15:59 preprocessor: Miscellaneous cleanups - Use full header paths in includes - Use ASSERT instead of assert - Use angle::NonCopyable instead of PP_DISALLOW_COPY_AND_ASSIGN - Use range-for in a couple places - Remove pp_utils.h BUG=angleproject:1522 Change-Id: If107fef89e8465bca65cf664926d1051c5d1e232 Reviewed-on: https://chromium-review.googlesource.com/387212 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 6a0e4e52 2016-09-22T17:03:09 BlitGL: orphan scratch textures when we are done. This will allow the OpenGL driver to reclaim GPU memory. BUG=angleproject:1512 Change-Id: If063e1ff9f4a544012ca78c37e198054cb4edcac Reviewed-on: https://chromium-review.googlesource.com/388771 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuly Novikov 00ff1194 2016-09-23T18:25:47 Disable DrawBuffersTest.Gaps on Windows AMD OpenGL Fails on Win7 Release (AMD R7 240) bot BUG=angleproject:1535 Change-Id: I5e8d0552867bfe0d81f3e189536c50b36f530089 Reviewed-on: https://chromium-review.googlesource.com/389233 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill e8a78496 2016-09-22T13:08:39 D3D11: Restrict ES3 bits to FL 10.1. We would advertise ES3 in some cases when we didn't support it. BUG=angleproject:1381 BUG=chromium:649101 Change-Id: I2a5bbc1d6153cdfc6c9c577aa0b82caf8482a42d Reviewed-on: https://chromium-review.googlesource.com/388190 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 32dd62b8 2016-09-23T14:09:06 Allow LINEAR filtering on OES_depth_texture formats. The ES3 spec and this extension lead to some awkward interactions. The extension doesn't mention allowed filtering modes, so be default it allows both linear and nearest. ES3 however, very clearly restricts any depth texture (any texture with effective internal format which has depth or stencil bits) to only use nearest filtering. This then breaks compatibility with the legazy unsized formats. Choose to be slightly non-conformant here, and allow linear filtering for the older unsized formats. Although this could lead to problems down the line, it is consistent with existing ES drivers in practice. Other future options might be to override the behaviour of the filter to use nearest when using WebGL validation compatibility. BUG=chromium:649200 Change-Id: I4ee7608dd04d1fd238385aefee32c8c9c1e80ca0 Reviewed-on: https://chromium-review.googlesource.com/388759 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 28a97ee1 2016-09-22T13:01:26 Generate unique HLSL texture function names for external textures. Because 2D and external textures have the same HLSL texture type, they were generating texture functions with the same name. This causes conflicts when both 2D and external textures are used in the same shader. BUG=angleproject:1534 BUG=645532 Change-Id: I4b324014b7d9b4851d358730cf4e31fc8461584c Reviewed-on: https://chromium-review.googlesource.com/388551 Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang f41a7151 2016-09-19T15:11:17 Add an extension to disable resource generation on bind. BUG=angleproject:1518 Change-Id: I662f7b07da5c97831496f2617b0adadf9858bdc9 Reviewed-on: https://chromium-review.googlesource.com/386799 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 44ebf6b4 2016-09-22T13:00:02 ConstantUnion: Error on undefined shift. BUG=chromium:648135 Change-Id: I41581f63af650564a0f61c1baeeb38017c8513ed Reviewed-on: https://chromium-review.googlesource.com/387470 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 1db8a26b 2016-09-22T13:53:47 Fix warning in standalone in new validation. BUG=angleproject:1512 Change-Id: Ifdb8d4c38e3c90e03eee42ba9fd6390dffd61363 Reviewed-on: https://chromium-review.googlesource.com/388611 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 2bd9c443 2016-09-20T16:39:18 preprocessor: add a limit to the number of token expanded BUG=angleproject:1522 BUG=chromium:648074 Change-Id: Ibf0858aaeb81933dd221ac82a49160169b48a495 Reviewed-on: https://chromium-review.googlesource.com/387211 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Geoff Lang f607c60a 2016-09-21T11:46:48 Fix validation of ReadPixels format and type. The validation for ReadPixels allows for two combations of format/type: 1. Based on the current framebuffer's component type. * GL_RGBA/GL_UNSIGNED_BYTE if the framebuffer is a normalized (signed or unsigned). * GL_RGBA_INTEGER/GL_INTEGER if the framebuffer is an integer format. * GL_RGBA_INTEGER/GL_UNSIGNED_INTEGER if the framebuffer is an unsigned integer format. * GL_RGBA/GL_FLOAT if the framebuffer is any type of float framebuffer (added in EXT_color_buffer_float). * These combations are detailed in the ES2 spec on pg 105 or ES3 on pg 193. 2. The implementation read format/type returned from glGetIntegerv. * These formats are added by specs, OES_texture_float, EXT_texture_rg, EXT_read_format_bgra, etc. Update the GL and D3D backends to perform the conversion from GL_HALF_FLOAT to GL_HALF_FLOAT_OES. Continue allowing reading as BGRA_EXT to support Skia. Should be removed in the future. BUG=607283 BUG=angleproject:1478 Change-Id: I0312cad4d5f138ab036f383d221f8ccd19a77f6d Reviewed-on: https://chromium-review.googlesource.com/346232 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 1ce09ace 2016-09-21T10:43:38 D3D11: Free buffer staging storage when idle. Using the same policy as for system memory storage, we release the staging buffer if it has been unmodified for several uses. We could further extend this technique to other storage buffers using a nearly identical policy. We might need to mitigate the cost of iterating over all the storages of all the buffers. BUG=angleproject:516 Change-Id: Ib24ef03cf4184ef6f0c24f83347538df82de5f58 Reviewed-on: https://chromium-review.googlesource.com/387200 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 596018ce 2016-09-21T12:57:03 translator: Refactor Constant Union shift ops. In preparation for making them robust. BUG=chromium:648135 Change-Id: I88fc87d8887064fda04087c56de05d8725a6fe5f Reviewed-on: https://chromium-review.googlesource.com/387469 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez d2f195b5 2016-09-19T15:53:33 preprocessor: Fix use after free when #undef the macro being invoked BUG=chromium:648031 BUG=angleproject:1522 Change-Id: I825cea9e736a2c99133408249cfcd525431d31de Reviewed-on: https://chromium-review.googlesource.com/386853 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiawei-Shao f979524a 2016-09-21T15:19:00 Remove redundant code in RewriteTexelFetchOffset Remove useTemporaryIndex() in function RewriteTexelFetchOffset since no temporary variables will be created in this function. BUG=angleproject:1469 Change-Id: Ibed56f0ba5c89b6ae1ab1611de39514c3fbb600f Reviewed-on: https://chromium-review.googlesource.com/387198 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez c5cacd60 2016-09-14T14:50:24 Implement a separate last row texture unpack buffer upload workaround When uploading textures from an unpack buffer, some drivers expect an extra row paading, causing them to think the pixel buffer is not big enough. We work around this by uploading the last row separately. BUG=angleproject:1512 Change-Id: I52fb8b35dc450b957f1fafb0b405c81bf0504157 Reviewed-on: https://chromium-review.googlesource.com/385193 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Yuly Novikov 44d0a736 2016-09-21T16:19:50 Disable some DrawBuffersTest on Windows AMD OpenGL DrawBuffersTest.FirstAndLast/ES2_OPENGL DrawBuffersTest.FirstHalfNULL/ES2_OPENGL Hang on Win7 Release (ATI) and Win7 Debug (ATI) bots. BUG=angleproject:1533 Change-Id: I6e37893fbcdbcc7a2a76c1cab6e8ef1f7ebaec19 Reviewed-on: https://chromium-review.googlesource.com/387714 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang 93561c3a 2016-09-20T10:22:55 Regenerate the preprocessor with the latest versions of flex and bison. BUG=648063 Change-Id: Ia90d12c8cb4ae0a694227145267e78ca02dcc2b0 Reviewed-on: https://chromium-review.googlesource.com/387114 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang d4a07fbb 2016-09-20T10:24:23 Disallow bit-shifting when the left operand is negative. BUG=648063 Change-Id: I82d9fbdaf8791a396dd71eeb57d93967ba5d65bf Reviewed-on: https://chromium-review.googlesource.com/387115 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez a59fcdf4 2016-09-14T10:52:14 CallDAG: rewrite assignIndicesInternal as iterative, Since the CallDAG is needed to check for the call graph depth, its creation code must be robust to very deep call graphs. BUG=angleproject:1517 Change-Id: I753ab84ad4ced6363a212f0fe94a89aabf4e3c3e Reviewed-on: https://chromium-review.googlesource.com/385496 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Geoff Lang c287ea6e 2016-09-16T14:46:51 Add WebGL validation extensions to ANGLE. BUG=angleproject:1523 Change-Id: I6fecb5055ed8087665aeee34b3a066ea8f38d51b Reviewed-on: https://chromium-review.googlesource.com/386281 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Sasha Bermeister 10f563d5 2016-09-19T17:02:36 Fix base/numerics to not trigger upcoming Clang warning Fix base/numerics to not trigger upcoming Clang warning regarding unsigned enum bitfields producing non-portable code. For more details, see the patch here: https://reviews.llvm.org/D24289 BUG=648462 Change-Id: I9aaa01e99f734ff927b5b1171706b2f49b437d0b Reviewed-on: https://chromium-review.googlesource.com/386887 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei-Shao e292e902 2016-09-07T10:49:01 Workaround the unary minus operator issue on Intel On some Intel D3D drivers, evaluating unary minor operator on an integer variable may get wrong answer in vertex shader. This patch works around this bug by replacing -(int) with ~(int)+1 on Windows Intel. BUG=chromium:644033 Change-Id: I0af719e84d618a33f25bcb33bde0c381fb462a31 Reviewed-on: https://chromium-review.googlesource.com/381675 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5db69f57 2016-09-15T12:47:32 Add robust math to constant folding. Previously our multiplication and other operators could do overflows, which can lead to security bugs. BUG=chromium:637050 Change-Id: Icee22a87909e205b71bda1c5bc1627fcf5e26e90 Reviewed-on: https://chromium-review.googlesource.com/382678 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez a5615c69 2016-09-19T09:54:44 BUILD.gn: Disable pool alloc on all translator dependents when fuzzing It contains defines that need to be consistent between the header and the implementation. BUG=angleproject:1522 BUG=chromium:647807 Change-Id: Ica144c455b7366bd9939a07b171edffe5af8bf35 Reviewed-on: https://chromium-review.googlesource.com/386945 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2e60034b 2016-09-19T13:56:40 D3D11: Store Buffer SRVs in native storage. This allows us to not store std::pairs to identify SRVs. Instead we can release the cached SRVs directly when we re-create the native buffer. BUG=angleproject:1513 Change-Id: I6f6d5edc659aa843c9439b97661073415f1a772b Reviewed-on: https://chromium-review.googlesource.com/385818 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 30e11ab2 2016-09-16T10:29:54 BUILD.gn: make the translator fuzzer a source set When we want to use GN standalone, the fuzzer_test template won't exist. Instead make the fuzzer a source set that is used by a target in Chrome. BUG=angleproject:1522 Change-Id: I347e633448d508eb124d0861b0fb28315923016c Reviewed-on: https://chromium-review.googlesource.com/386636 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 8fcdf6ee 2016-09-16T10:45:30 Supress failures in end2end tests for new Intel OpenGL driver. Change-Id: I442eac44212406b0fd9fb64b2e4e914bf61f8503 Reviewed-on: https://chromium-review.googlesource.com/386280 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 8b28a8b0 2016-09-15T19:47:56 translator/Compiler.cpp: fixup includes A stray iostream got introduced in 28b6528ca2119d6715bb5e9eafa5a2dc8c968361 BUG=angleproject:1522 Change-Id: Ib0b14b47d4786309ec2d39acb5531f3772b91f20 Reviewed-on: https://chromium-review.googlesource.com/386256 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 415f29e0 2016-09-07T16:37:38 Disallow layout+invariant combo on ESSL 3.00 variable declarations This combination is not allowed by the formal grammar in the ESSL 3.00 spec, and should still be disallowed in ESSL 3.00 shaders even though the shader parser now implements the more flexible ESSL 3.10 grammar. BUG=angleproject:1507 TEST=angle_unittests Change-Id: I766a468fd7314c7e60e020b5b204aa6950263633 Reviewed-on: https://chromium-review.googlesource.com/381933 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 5796127e 2016-09-14T13:57:46 Rename TIntermSelection to TIntermIfElse Now that ternary nodes are not represented by TIntermSelection any more, TIntermIfElse is an easier name to understand for newcomers to the code. BUG=angleproject:1490 TEST=angle_unittests Change-Id: Ia1e04e356ab93409400245092a84533d7dfd129d Reviewed-on: https://chromium-review.googlesource.com/385416 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 28b6528c 2016-06-16T07:24:50 Add a fuzzer for the shader translator. BUG=angleproject:1522 Change-Id: Idbe8194ba478366e99c7460d403d03fe27dd89d0 Reviewed-on: https://chromium-review.googlesource.com/353153 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Qiankun Miao 09cfac60 2016-09-06T17:25:16 Work around For and While loop bugs on Intel Mac OSX Condition calculation in for and while loops has bug on Intel Mac. Work around it by converting "CONDITION" to "CONDITION && true". This CL also adds previous SH_EMULATE_ABS_INT_FUNCTION workaround to the ANGLE GL back-end on OSX BUG=chromium:644669 TEST=deqp/functional/gles3/shaderloop_for/while.html Change-Id: I910f662b054f259fcb601b9938841b3a2d066840 Reviewed-on: https://chromium-review.googlesource.com/381678 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Qiankun Miao <qiankun.miao@intel.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 930fefca 2016-09-14T15:54:18 RendererGL: enable GL_DEBUG_OUTPUT on Debug builds The intent was already to enable it but without glEnable(GL_DEBUG_OUTPUT) the Linux NVIDIA driver doesn't output anything. BUG= Change-Id: Ia9a500c2e792ee7c4e2a7be60d478419eda617e1 Reviewed-on: https://chromium-review.googlesource.com/385278 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill fcb79357 2016-09-13T15:13:15 D3D11: Detect driver version before workaround init. This is order-sensitive. The workarounds need the driver version to properly determine if workarounds should be used. This fixes the WebGL 2 test invalidate/sub on NVIDIA. BUG=angleproject:1246 Change-Id: I7ca4f44ec2874553f167214e937e918b49e69567 Reviewed-on: https://chromium-review.googlesource.com/385077 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez adaeb85f 2016-09-14T10:54:24 Fix standalone tests failing to find angle_util.dylib on Mac BUG= Change-Id: I69bddf27c1b019f71382d69c03eba94a268d2025 Reviewed-on: https://chromium-review.googlesource.com/385497 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Qiankun Miao 7ebb97fc 2016-09-08T18:01:50 Use 64-bits compile options BUG=chromium:645071 Change-Id: I31825123bf4cb45fb37a93f538e8936487beb5ff Reviewed-on: https://chromium-review.googlesource.com/382712 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 47cb73ab 2016-09-09T11:41:44 Refactor TConstantUnion. In preparation for constant folding fixes. BUG=chromium:637050 Change-Id: I9ea49ce96b34c6ac3d2f0478b8fc6732c59e28be Reviewed-on: https://chromium-review.googlesource.com/373741 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho d0bad2c7 2016-09-09T18:01:16 Split ternary node class from TIntermSelection Ternary operator nodes are typed parts of expressions, they always have two children and the children are also guaranteed to be TIntermTyped. "If" selection nodes can't be a part of an expression, they can have either one or two children and the children are code blocks. Due to all of these differences it makes sense to store these using two different AST node classes. BUG=angleproject:1490 TEST=angle_unittests Change-Id: I913ab1d806e3cdb5c21106f078cc9c0b6c72ac54 Reviewed-on: https://chromium-review.googlesource.com/384512 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 95738972 2016-09-13T10:30:57 Specialize GLTypeToGLEnum in headers BUG=angleproject:1514 Change-Id: I1f95e985471ea7a2ea0242d8b48ceccca68edf42 Reviewed-on: https://chromium-review.googlesource.com/384891 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 966456de 2016-09-12T11:42:44 Remove SH_TIMING_RESTRICTIONS compiler flag The timing restrictions code is not in use and not updated for ESSL3, so it is better to remove it to make refactoring the AST easier. It can also be argued that perfect prevention of shader timing attacks is not feasible due to factors that are not under control of ANGLE, such as fixed function color compression in GPUs. Such color compression may make the use of texture bandwidth and thus performance dependent on the content of a texture regardless of whether a compressed format is chosen through the API. SH_DEPENDENCY_GRAPH flag that could only be active together with the timing restrictions flag is also removed, along with all the code that was supporting it. The newer CallDAG code is used for different purposes and is kept. BUG=angleproject:1490 TEST=angle_unittests Change-Id: I2cd10e18df366e8e43f7c3af1ca12d2a4bfb2007 Reviewed-on: https://chromium-review.googlesource.com/384511 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Yuly Novikov e79c2d1f 2016-09-09T16:33:09 Add newlines to error messages. Looks like this breaks parsing tests list in gtest runner, which causes deqp_gles2 to fail on Nexus 5X swarmed bot. Driveby fix of HowToMakeChanges md format. BUG=angleproject:1471 Change-Id: I6cfa2d9287385aabf2aee47521e5e55e309831c0 Reviewed-on: https://chromium-review.googlesource.com/383813 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Olli Etuaho 87d410c8 2016-09-05T13:33:26 Disallow multiple locations on output variables GLSL ES specs from version 3.00 to 3.20 all mention that output layout location qualifier may appear at most once within a declaration. Enforce this rule when parsing shaders. Also set max draw buffers to 8 when compiling GLSL ES >= 3.00 in the qualification order tests and shader translator sample, so that parsing locations > 0 will succeed. BUG=angleproject:1505 TEST=angle_unittests Change-Id: I50fe409041385f5e10e695f43dc3a572433e9772 Reviewed-on: https://chromium-review.googlesource.com/381211 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho a223430c 2016-08-31T12:05:39 Promote unary nodes automatically Unary nodes now get their type set automatically based on the operation and operand. The operand should only be changed to another of the same type after the node is constructed. The operation can't be changed on unary and binary nodes after they've been constructed. BUG=angleproject:1490 TEST=angle_unittests Change-Id: Ib1ea3dcb1162261966c02d5f03d8091cf647fac1 Reviewed-on: https://chromium-review.googlesource.com/378935 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 3272a6d3 2016-08-29T17:54:50 Promote and fold indexing nodes similarly to other binary ops Indexing nodes now get their type set in TIntermBinary::promote, same as math and logic ops. They are also constant folded through TIntermBinary::fold() instead of having special functions for constant folding them in ParseContext. Index nodes for struct and interface block member access now always have integer type, instead of sometimes having the type of the field they were used to access. Usage of TIntermBinary constructor is cleaned up so only the constructor that takes in left and right operands is used. The type of TIntermBinary nodes is always determined automatically. Together these changes make the code considerably cleaner. Note that the code for constant folding for array indexing is actually never hit because constant folding array constructors is still intentionally disabled in the code. BUG=angleproject:1490 TEST=angle_unittests Change-Id: Ifcec45257476cdb0d495c7d72e3cf2f83388e8c5 Reviewed-on: https://chromium-review.googlesource.com/377961 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 57b9424f 2016-09-09T12:48:00 D3D11: Release SRV cache in Buffer11 destructor. This was leading to a resouce leak with fast unpack. BUG=angleproject:1513 Change-Id: I4ff6c6e3c889392e314654d63f2db8f671b6913c Reviewed-on: https://chromium-review.googlesource.com/383711 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Qin Jiajia 2c07eb21 2016-09-02T13:06:43 Add workaround for B5G6R5 format in Intel driver In Intel driver, the data with format DXGI_FORMAT_B5G6R5_UNORM will be parsed incorrectly. According to https://msdn.microsoft.com/en-us/library/windows/desktop/ff471324(v=vs.85).aspx DXGI_FORMAT_B5G6R5_UNORM should be equivalent to D3DFMT_R5G6B5. However, the data will be treated as B5G6R5 not R5G6B5. This workaroud will disable B5G6R5 support when it's Intel driver. By default, it will use R8G8B8A8 format. BUG=chromium:644610 TEST=dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgb565* Change-Id: I9d64a9bcedf9247de6950d345ed2d3fb00170d30 Reviewed-on: https://chromium-review.googlesource.com/380421 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7ffdda9a 2016-09-08T13:26:51 D3D11: Don't allow fast unpack from GL_ALPHA8. This format is one that doesn't support buffer SRV creation. It seems like there is no equivalent dEQP test for this format. BUG=angleproject:1503 Change-Id: I9ecdb9406ca0b62dd54b450d2b50341d76584b2b Reviewed-on: https://chromium-review.googlesource.com/381435 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 65d17e56 2016-09-08T09:52:58 Generate OUT_OF_MEMORY when compiler initialization fails. INVALID_OPERATION implies that the error is recoverable. Change-Id: Iaa13293168f66f46864e5e4c0ab7d7c53c97e8fd Reviewed-on: https://chromium-review.googlesource.com/383131 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho c955058b 2016-08-29T17:56:22 Constant-qualify nodes in a consistent way Rely on that constant qualification of binary and unary nodes comes from promote(). BUG=angleproject:1490 TEST=angle_unittests Change-Id: Ie8d1d4df3c82ae5a2de8cc536e47016d13a4fd3d Reviewed-on: https://chromium-review.googlesource.com/377960 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 588e2085 2016-09-08T11:23:30 Update dEQP test expectations with passing tests BUG=angleproject:1017 BUG=angleproject:1097 BUG=angleproject:1323 Change-Id: I67754700c27041c99428857c48697fa11c0d34ab Reviewed-on: https://chromium-review.googlesource.com/382860 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Geoff Lang d13ca30d 2016-09-08T09:35:57 Fix incorrect compressed internal format enum. This error was not exposed since compressed formats use different validation paths. Fixed for completeness. BUG=angleproject:1511 Change-Id: I9b44a795b1e43f52555440f776e00bb4b92354ef Reviewed-on: https://chromium-review.googlesource.com/382653 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho f119a263 2016-08-19T15:54:22 Clean up unary and aggregate math folding Prefer asserts instead of adding internal errors to the compiler log when types of arguments are not as expected or the folding function runs into an operation it can't handle. Neither of these cases should be possible, the checks for correct argument types are solid at this point. In the future, when new built-in functions are added, constant folding support for them should be added as well. foldUnaryWithDifferentReturnType and foldUnaryWithSameReturnType are renamed to foldUnaryNonComponentWise and foldUnaryComponentWise respectively. These names better reflect what these functions are doing. The info sink member is removed from TIntermediate, since TDiagnostics is now passed into the functions that may generate warnings instead. BUG=angleproject:1490 TEST=angle_unittests Change-Id: I6a08abbe29cf23f3a318032fdc46dd3dbaf4410e Reviewed-on: https://chromium-review.googlesource.com/377959 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 9df01f8a 2016-09-07T17:33:41 Fix overflow in ImageIndexIterator::done. The maxLayer() method was reading out of range for 2D arrays. BUG=644846,614178 BUG=angleproject:1493 Change-Id: I7cc4773d1ee9ff2d0a18cb0a8e916cf3687446db Reviewed-on: https://chromium-review.googlesource.com/382332 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez b6c3e77b 2016-09-07T11:10:13 StateManagerGL: handle GL_DITHER DITHER is on by default and dEQP precision tests turn this off, to avoid dithering messing with the precision. The OpenGL backend didn't handle glDisable(GL_DITHER) causing precision to be wrong on RGB565 on Linux Intel. BUG=angleproject:1492 Change-Id: I5e750fbe9df397e8b9a826979b14c84a2d72a00d Reviewed-on: https://chromium-review.googlesource.com/382111 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez e731d8aa 2016-09-07T10:56:25 TextureTest: suppress failure for newly added test. BUG=angleproject:1493 BUG=chromium:638323 Change-Id: I5cab149c735158fe810f002e47cc3c5c75bc503b Reviewed-on: https://chromium-review.googlesource.com/381951 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 5a7e20ed 2016-09-06T18:07:22 Fix compiler allocations accidentally done outside memory pool Qualifier data structures were being accidentally allocated on the regular heap and never being freed inside the compiler due to missing POOL_ALLOCATOR_NEW_DELETE macros. Add in the macros where needed. Also fix up include directives in QualifierTypes.h/.cpp to use the full path of files from ANGLE. BUG=angleproject:1442 TEST=angle_unittests Change-Id: Ib54f3cd3ab0f768fed9f0215d795ff493be513e0 Reviewed-on: https://chromium-review.googlesource.com/380538 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 14718767 2016-09-06T15:56:54 Remove usage of std::log2 in tests. For some reason, this was giving a link error on Android. Change it to use the mathutil version to be sure. BUG=angleproject:1493 BUG=chromium:638323 Change-Id: I454ba4609d7818f50c668bb7c1a3b684f9ca8444 Reviewed-on: https://chromium-review.googlesource.com/381671 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 509e4560 2016-08-25T14:55:44 compiler: Work around a HLSL compiler aliasing opt bug. BUG=angleproject:1448 Change-Id: I7d5bcbd100069152cea0cb03bc4fa6af1044460b Reviewed-on: https://chromium-review.googlesource.com/376020 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 9e3d7aa0 2016-09-02T15:19:43 D3D11: Work around small mipped stencil textures. AMD has a bug with 2x2 and 1x1 mips of depth/stencil textures. Formats D24S8 and D32FS8 both seem to render black for the very small mips. We can work around this by selectively caching a copy of the texture data that only has depth information, since stencil isn't filterable in OpenGL ES. BUG=angleproject:1493 BUG=chromium:638323 Change-Id: Iebef42c4680018d9854dbe789d677823167213dd Reviewed-on: https://chromium-review.googlesource.com/380037 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
jchen10 6a25746c 2016-09-06T08:56:08 Generate uniqueId for all TStructure If not present, ASSERT error may happen in debug build. BUG=chromium:643075 Change-Id: Ia57e3771ab4d2861aefc04287fbbce85232f1f4d Reviewed-on: https://chromium-review.googlesource.com/381315 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill dea2777c 2016-09-02T15:09:09 D3D11: Rename TextureStorage swizzle invalidation. Since we'll also be storing a cache of depth textures as well as swizzle info, generalize the invalidation methods. BUG=angleproject:1493 BUG=chromium:638323 Change-Id: I8fef049b01c81483fcf28196866a22d5cfed32a1 Reviewed-on: https://chromium-review.googlesource.com/380036 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 96f4f45e 2016-09-02T16:20:11 Fix ImageIndexIterator termination. There was an off-by-one error preventing proper iteration. BUG=angleproject:1493 BUG=chromium:638323 Change-Id: I8a3907620a1503d16b039606a67fe3471f88e165 Reviewed-on: https://chromium-review.googlesource.com/380325 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 3af2b3b0 2016-09-06T09:47:56 UniformBufferTest: add back suppressions for failing tests 296398571213608b99d12266d0ba218f99c87abf fixes most but not all UniformBuffer Wintel failures of the waterfall, add back suppressions needed to make the waterfall green. BUG=chromium:593024 Change-Id: I124666853e9943bcb71083e5563d02e65551f916 Reviewed-on: https://chromium-review.googlesource.com/381451 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 613b959d 2016-09-05T12:05:53 Clean up qualification order checks Move determining whether qualification order checks are relaxed to QualifierTypes.cpp. The ParseContext only needs to construct TTypeQualifierBuilder with the shader version as a parameter, and it will make the decision based on that. ParseContext still passes diagnostics to the TTypeQualifierBuilder functions that return variable qualification to make it more explicit when errors are generated. Also encapsulate looking for symbols in the AST inside compiler_test.cpp. BUG=angleproject:1442 TEST=angle_unittests Change-Id: I4190e6a680ace0cc0568a517e86353a95cc63c08 Reviewed-on: https://chromium-review.googlesource.com/380556 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Qiankun Miao b6b1a4a6 2016-09-06T14:16:13 Fix build failure in chrome due to unused function Chrome build fails on a warning: "../../third_party/angle/src/compiler/translator/QualifierTypes.cpp:30:6: error: unused function 'IsInvariantCorrect' [-Werror,-Wunused-function]" BUG=angleproject:1442 Change-Id: If2fea0d90e9cd789c3a6449881794082f3e98afd Reviewed-on: https://chromium-review.googlesource.com/381201 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Qiankun Miao 5b55edd8 2016-09-05T14:55:15 Work around unpackHalf2x16 emulation for Intel Mac Negative operator is buggy in an expression on Intel Mac. Use abs(v) to replace -v for negative value. BUG=chromium:644057 TEST=deqp/functional/gles3/shaderpackingfunction.html Change-Id: I6182e7a00b162e36ed9278c0e5a2fdd8fb480959 Reviewed-on: https://chromium-review.googlesource.com/381152 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Martin Radev c28888b3 2016-07-22T15:27:42 Relax checks when parsing type qualifiers in GLSL ES 3.10 The grammar in GLSL ES 3.10 does not impose a strict order on the qualifiers and also allows multiple layout qualifiers. This patch relaxes the checks when parsing a type qualifier. BUG=angleproject:1442 TEST=angle_unittests Change-Id: Ib3653a1ed1bfced099a6b2cbf35a7cd480c9100a Reviewed-on: https://chromium-review.googlesource.com/379016 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 29639857 2016-09-02T15:00:09 D3D11: Work around Intel uniform buffers bug. When copying from a staging buffer to a uniform buffer, the first upload would be incorrect. Work around this by trying to upload directly to a uniform buffer on the first BufferSubData call. BUG=chromium:593024 Change-Id: I0df3a1422b962bf3ece5d445f435df01e3544b67 Reviewed-on: https://chromium-review.googlesource.com/368774 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Martin Radev 4a9cd800 2016-09-01T16:51:51 Refactor type_specifier_nonarray parsing to reduce code repetition When type_specifier_nonarray gets parsed the scope gets saved into TType and the code becomes repetitive. Setting of the scope is moved to type_specifier_no_prec as it occurs less times. BUG=angleproject:911 TEST=angle_unittests TEST=angle_end2end_tests Change-Id: I6da5fe7bc2d60ba2996221af71b719b818f5e9b1 Reviewed-on: https://chromium-review.googlesource.com/380535 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 5b46a680 2016-09-01T15:22:06 Clear the swizzle cache in TextureStorage11::setData. BUG=angleproject:1494 Change-Id: I67471e4b961b3d8374c2da84394ead743939c225 Reviewed-on: https://chromium-review.googlesource.com/380095 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill d08163d7 2016-09-01T13:56:24 Fix standalone build. BUG=angleproject:1471 Change-Id: I52aadeb58f75d5b944421bd0cd4a5dddead3f6d1 Reviewed-on: https://chromium-review.googlesource.com/379916 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Martin Radev 70866b89 2016-07-22T15:27:42 Change grammar to support features from es31 The grammar has been changed so that ES31 grammar is followed more closely. The ES31 grammar is not fully supported, only functionality related to qualifier enumeration is added. The ParseContext is changed so that type qualifiers can be now joined together (i.e. like layout qualifiers). This will allow enumeration of multiple storage qualifiers (i.e. uniform readonly coherent) which is essential for support of ES31 features. Some of the error checks had to be moved closer to the root of the parse tree since some of the information about the expression might be missing. Unfortunately, as there is no explicit ordering imposed by the grammar, additional checks for proper order of qualifiers had to be added. I also included unit tests which test against malformed shaders. BUG=angleproject:1442 TEST=angle_end2end_tests TEST=angle_unittests TEST=dEQP-GLES3.functional.shaders.*precision* TEST=dEQP-GLES3.functional.shaders.*function* TEST=dEQP-GLES2.functional.shaders.* Change-Id: Ib3653a1ed1bfced099a6b2cbf35a7cd480c9100d Reviewed-on: https://chromium-review.googlesource.com/362940 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kenneth Russell b962aab6 2016-09-01T10:08:40 Remove stray reference to SH_EMULATE_BUILT_IN_FUNCTIONS. BUG=chromium:642227 Change-Id: Ie1d74c0abd355a0bddc3c2b700390a3a2a9c4823 Reviewed-on: https://chromium-review.googlesource.com/379875 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Qiankun Miao e5bb72ff 2016-09-01T01:41:27 Remove SH_EMULATE_BUILT_IN_FUNCTIONS which isn't used The flag is not used in chrome. We decide to do per emulation per flag. BUG=chromium:642227 Change-Id: I936d53e5015186e35e672d0cb51c853a941582d2 Reviewed-on: https://chromium-review.googlesource.com/379077 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 8314465d 2016-08-31T17:03:30 GL backend: add a workaround for bad default current vertex attributes BUG=angleproject:1492 BUG=351528 Change-Id: Ie4b25b0106282c9f60d19053e5a320549887bc8b Reviewed-on: https://chromium-review.googlesource.com/379196 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Qiankun Miao a4e6f074 2016-08-29T14:49:21 Work around abs() issue in Intel Mac drivers abs(i) where i is an integer returns unexpected result in Intel Mac. This works around the issue by emulating abs(i) manually. BUG=chromium:642227 TEST=deqp/functional/gles3/shadercommonfunction.html Change-Id: I2a41e0f4bcb0766109d651e663283b1760468017 Reviewed-on: https://chromium-review.googlesource.com/377628 Commit-Queue: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Qiankun Miao c2c5fc48 2016-08-31T15:24:22 Remove CSS Shader related code CSS shader has been removed from spec and chrome code base. Remove the code in ANGLE. BUG=chromium:233383 Change-Id: I93a35437f540e51ce7af9d49f21ca60d7c0b156a Reviewed-on: https://chromium-review.googlesource.com/378739 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
jchen10 7ef9aa7b 2016-08-31T15:39:38 Enable texelFetchOffset re-writing for GLSL translator Intel Mac has the same bug as Win. So the CL enables it in GLSL translator as well. BUG=chromium:642605 TEST=deqp/functional/gles3/shadertexturefunction/texelfetchoffset.html Change-Id: I30323ea3a6d4c07ff32e50bd7c574916b5b865f4 Reviewed-on: https://chromium-review.googlesource.com/378601 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Yuly Novikov ad10a4aa 2016-08-29T23:24:33 Update dEQP gles2 tests expectations for Android Mark tests that fail or hang on Nexus 5X as such. BUG=angleproject:1471 TEST=gles2 tests pass on Nexus 5X Change-Id: I3de8ce3e472f9c75bd18140bf9aa4d79a73cb22d Reviewed-on: https://chromium-review.googlesource.com/377703 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov e3352f94 2016-08-12T20:40:14 Change angle_util to be a shared library So that there will be one instance of static thread synchronization variables in AndroidWindow. Previously there was one instance in lib_angle_deqp_gles2_tests__library and one in libangle_deqp_libgles2, resulting in AndroidWindow::initialize waiting forever. Also make the change in GYP build to fix standalone build, and fix rpath issues on Mac. BUG=angleproject:1471 TEST=end2end and deqp tests on standalone Win10 and end2end on GN Mac 10.11 Change-Id: I731578459400bb47d269df129aabed9b67b555e6 Reviewed-on: https://chromium-review.googlesource.com/376202 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Olli Etuaho d5da505d 2016-08-29T13:16:55 Fix constant folding non-square outerProduct Use all the vector elements correctly when constant folding non-square outerProduct. Previously the code used to discard some elements of the smaller outerProduct operand. Also clear up confusion about matrix rows/columns in matrix constant folding code in general. BUG=angleproject:1482 TEST=angle_unittests Change-Id: I7cba8f97a92b875de01e57255d54258cdfd92a47 Reviewed-on: https://chromium-review.googlesource.com/377298 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 2ac58792 2016-08-29T15:31:44 Update dEQP GLES3 test expectations BUG=angleproject:1097 Change-Id: Ib10ee930eb4d29bee3bc014c008a6b7420525e42 Reviewed-on: https://chromium-review.googlesource.com/377458 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 4e58af61 2016-08-26T10:56:52 Add missing TexImage and CopyTexImage format combinations for ES3. * Some unsized DEPTH_COMPONENT combinations were not added to the validation tables for the ANGLE_depth_texture extension. * The HALF_FLOAT_OES format was not validated in ES3 for RGB and RGBA formats when the OES_texture_half_float extension is supported. * BGRA->BGRA CopyTexImage validation was missing. No more errors are generated within ANGLE when visiting http://alteredqualia.com/tools/webgl-features/ BUG=605754 Change-Id: If654c34adcebb4cd3eaa994ad7e912f6ffa4df55 Reviewed-on: https://chromium-review.googlesource.com/376281 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Corentin Wallez b920e360 2016-08-03T18:19:41 Implement GL_ARB_create_context_robustness on GLX and WGL BUG=angleproject:1463 Change-Id: I5bdcfd757d6f7d6411558c368fa7a26c8a38c9ba Reviewed-on: https://chromium-review.googlesource.com/365971 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev 9ddfa060 2016-08-29T13:56:39 Disable compute shader tests on Intel The compute shader tests in angle_end2end_tests fail on Intel Linux. The patch disables the tests for Intel. TEST=angle_end2end_tests BUG=angleproject:1483 Change-Id: I303f0852ea3ccb65c1dd96a196a640c76cc519e4 Reviewed-on: https://chromium-review.googlesource.com/377318 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho ab481645 2016-08-26T12:09:10 Fix splitting nested sequence operators Make sure that only one sequence operator is split on one iteration of SplitSequenceOperator. This prevents multiple successive PostVisit calls to nested sequence operator nodes from adding duplicate nodes to the AST. The sequence operators are split starting from the outermost one to preserve execution order. Note that the shader translator somewhat unexpectedly generates nested sequence operators in the AST when there is a sequence operator with more than two operands, so this bug ended up affecting shaders in the wild. The code around parsing sequence operators could be clarified separately. BUG=638313 TEST=angle_end2end_tests Change-Id: Ic6400a484ceff0c790c2290f7b4b80980f87cd88 Reviewed-on: https://chromium-review.googlesource.com/376678 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>