Log

Author Commit Date CI Message
Jamie Madill 63fa2e94 2017-06-01T17:11:41 D3D11: Consolidate Query allocation. This compiles the resource refactor for D3D11. The only remaining non-smart handles are for things like SwapChains and ID3D11Blob. This might be more easily managed by using angle::ComPtr or similar smart pointers instead of the Resource Manager class. BUG=angleproject:2034 Change-Id: I53c753a1c19b05c4e72859dd5046e3ed10866847 Reviewed-on: https://chromium-review.googlesource.com/506777 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0fd806f1 2017-06-01T17:11:40 D3D11: Consolidate Shader allocation. Similar to the InputLayout init, this adds a small helper type to act as a wrapper around shader init data (binary and size). This also adds error trapping to the blit shader compilation. It also removes the LazyResource2 class, and the CompileXS helper methods. BUG=angleproject:2034 Change-Id: I3fd718393c8a0250e4263890f00d0e9147ec9567 Reviewed-on: https://chromium-review.googlesource.com/506776 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Frank Henigman fccbac2c 2017-05-28T17:29:26 Validate precision in uniform blocks for WebGL. In WebGL mode turn on checking that precision qualifiers match in corresponding vertex/fragment uniform blocks. Add test for this behavior. BUG=angleproject:2015 Change-Id: Ie035138e8c46e430bdcf8fb5bbc3e0a3ab7d6391 Reviewed-on: https://chromium-review.googlesource.com/517724 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2f348d2a 2017-06-05T10:50:59 Make gl::Compiler reference-counted. This is helpful for implementing program binary caching in ANGLE. in order to maintain the current behaviour in Chrome, we will need to defer shader compilation until link time. Since WebGL allows the app layer to enable and disable extensions explicitly, the app can enable or disable an extension between the calls to glCompileShader and glLinkProgram. Then, if we're deferring shader compilation, we will have to preserve the extension settings at the time of the call to compile, not the current settings at the time of link. Making the compiler reference-counted gives us a pretty simple and robust solution. This also changes the Context class to lazily init the shader compiler. Lazy init prevents any unexpected nulls, and also ensures the releaseShaderCompiler does exactly that: just releases the shader compiler, and does not immediately re-initialize it. BUG=angleproject:2044 Change-Id: I0f0eeb4eb94dc4eee238f92482804a0921c77df0 Reviewed-on: https://chromium-review.googlesource.com/522868 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 168d5e80 2017-02-01T12:18:56 compiler: Regenerate parser with latest flex and bison Flex version is 2.6.4 Bison version is 3.0.4 BUG=chromium:668842 Change-Id: Ia05ae338c9b9e588534f8346ff5c59ed747c56bf Reviewed-on: https://chromium-review.googlesource.com/435553 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5978e28d 2017-06-02T11:49:31 D3D11: Consolidate InputLayout allocation. This introduces a helper type to act as the initialization data type for input element arrays. A WrappedArray class acts as a helper class to wrap a C array and size into a C++ class, similar to std::array but without the data storage. Also move resource deallocation memory counting into a single code path. BUG=angleproject:2034 Change-Id: I5e108254777f0df65f5f60fe26e760c71b95b542 Reviewed-on: https://chromium-review.googlesource.com/506775 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 8d4db1fa 2017-06-02T14:32:01 Fix format info for unsized RG texture formats. The unsized GL_RED and GL_RG formats are only usable with the EXT_texture_rg extension and are always renderable. BUG=720325 Change-Id: I813662f6c90f1a6a640be747ae40b81727e58cdc Reviewed-on: https://chromium-review.googlesource.com/523023 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6e898aa3 2017-06-02T11:17:26 Allow sized GL_RGB[A]_32F to be used for TexImage2D with the chromium extensions. GL_CHROMIUM_color_buffer_float_rgb[a] allows these sized formats to be used in TexImage2D even in ES2. With this patch, the conformance/extensions/oes-texture-float and conformance/extensions/oes-texture-half-float tests now pass for WebGL1 and WebGL 2 contexts. BUG=angleproject:1958 Change-Id: I568dea5da42ba310463d2690c3e764c48598311b Reviewed-on: https://chromium-review.googlesource.com/522349 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Corentin Wallez e7557744 2017-06-01T13:09:57 WebGL compatibility: remove UB for draw buffers in the GL backend. WebGL adds two rules: - Fragment outputs declared but not written to should default to black. - FBO attachments for outputs not declared in the shader should not be written to (it is UB in OpenGL ES). Fix the first one by using the SH_INIT_OUTPUT_VARIABLES compiler options, and the second one by messing with glDrawBuffers so that the enabled draw buffers are always a subset of the ones declared by the shader. BUG=angleproject:2048 Change-Id: I1d851c190959c1acfc3e41d837e6990aec1d4086 Reviewed-on: https://chromium-review.googlesource.com/521682 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang fff7a7dd 2017-06-02T10:39:17 Mark the S3TC SRGB formats as requiring exact block sizes. TEST=conformance/extensions/webgl-compressed-texture-s3tc-srgb BUG=angleproject:2049 Change-Id: I00d816299db914c078d140f791cd7c98c6428a54 Reviewed-on: https://chromium-review.googlesource.com/522762 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9ab5b822 2017-05-30T16:19:23 Validate that vertex shader input matches the vertex attribute types. BUG=angleproject:2012 TEST=conformance2/rendering/attrib-type-match Change-Id: Ic282e0933a5c3c377322dd484534fcc1dfcb3840 Reviewed-on: https://chromium-review.googlesource.com/517974 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill b7d5e303 2017-06-01T16:04:46 D3D11: Default init all textures. The resource manager factory methods will use ClearView or zero-filled buffers to set initial data. It assumes there are no 3D depth/stencil textures. This will lead to some wasteful re-creation of RTVs in some cases. This is a temporary measure until we can implement more efficient lazy resource init strategies. BUG=angleproject:1635 Change-Id: I590e76587d3d96a359beedb79e21d24930e5f2e0 Reviewed-on: https://chromium-review.googlesource.com/503254 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c564c070 2017-06-01T12:45:42 Pass gl::Context to impl methods instead of ContextImpl. In some cases we might have to call back into the GL layer, passing the Context, and if we just have a ContextImpl pointer this isn't possible. It also removes the need for SafeGetImpl. BUG=angleproject:2044 Change-Id: I6363e84b25648c992c25779d4c43f795aa2866d6 Reviewed-on: https://chromium-review.googlesource.com/516835 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang fc32e8b7 2017-05-31T14:16:59 WebGL: Validate shader entry point names do not contain invalid characters. Section 6.20 of the WebGL spec states that all shader-related entry points that accept strings must validate that the string does not contain characters that are not valid in ESSL. TEST=conformance/misc/invalid-passed-params BUG=2016 Change-Id: I220d9dd79c4b0e8e0195277093268b9e1e66f9d9 Reviewed-on: https://chromium-review.googlesource.com/519445 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 948bbe51 2017-06-01T13:10:42 Redesign robust resource init as a display extension. Also correct the enum allocation to values that are available to ANGLE. BUG=angleproject:1635 Change-Id: I443f5654aa6a5049b4a1ae4c253cd6473b4e446e Reviewed-on: https://chromium-review.googlesource.com/520002 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang cae72d6a 2017-06-01T11:53:45 Call GetGlobalContext instead of GetValidGlobalContext for gl::GetError If the context is lost due to an OUT_OF_MEMORY error, it was impossible to check the error. BUG=angleproject:1309 Change-Id: I50fbd46b139d44774dde804445f12b8d34d73e29 Reviewed-on: https://chromium-review.googlesource.com/521203 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill cd930cf0 2017-05-31T13:36:32 EGLDevice: Fix edge-case memory leak. This could happen if there was an error on device init. Reported by Microsoft. BUG=None Change-Id: I059fd9308d0536b4120c28e684e37567d14b3fd5 Reviewed-on: https://chromium-review.googlesource.com/519642 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang e0cff190 2017-05-30T13:04:56 Validate that fragment shader output matches the draw buffer type. TEST=conformance2/rendering/fs-color-type-mismatch-color-buffer-type BUG=angleproject:1688 Change-Id: I17848baf40b6d32b5adc1458fe2369b850164da3 Reviewed-on: https://chromium-review.googlesource.com/518246 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 311d9999 2017-05-30T15:38:54 Add Program Binary test for reinitialization. This test tears down and recreates GL and re-uses the binary in a new GL context. Was meant to reproduce a bug in ANGLE, but the bug had been fixed previously. BUG=angleproject:2010 Change-Id: Ic3a31ac044ef4d794dae14608877b6958452b55e Reviewed-on: https://chromium-review.googlesource.com/519463 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill ea19b4ac 2017-05-25T14:48:34 Don't store Renderer in RenderStateCache. Instead pass it around via methods. This makes the code a bit nicer. BUG=angleproject:2044 Change-Id: I721e190a2ecde2b1a65e57debf419ee06a5dce29 Reviewed-on: https://chromium-review.googlesource.com/516385 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 9216a6e2 2017-05-24T15:53:20 Introduce MRUCache. This library comes from Chromium's base, and is useful for many use cases in ANGLE. It can replace the custom MRU code we use in the RenderStateCache. It will also be useful for implementing a program binary cache. BUG=angleproject:2044 Change-Id: Iba166fe380d7ed4e3123428b0227b9d299f756d1 Reviewed-on: https://chromium-review.googlesource.com/516384 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
jchen10 af713a24 2017-04-19T09:10:56 ES31: Implement binding layout for uniform blocks The binding point of uniform blocks can be specified in shaders with this CL. See spec ESSL 3.10, section 4.4.4, page 58 for more info. dEQP-GLES31.functional.ubo.* still can't completely pass as the missing of arrays-of-arrays feature. Neither can dEQP-GLES31.functional.layout_binding.ubo.* due to the incomplete implementation of program interface APIs. TEST=angle_end2end_tests:UniformBufferTest BUG=angleproject:1442 Change-Id: If95d468fc109834a132b9b817730d3fdc3a615da Reviewed-on: https://chromium-review.googlesource.com/483848 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 0ffc441e 2017-05-19T14:18:55 Initialize uninitialized globals in GLSL output Initializing globals is done by the DeferGlobalInitializers AST transformation, which makes sure that the global variable init proceeds in the correct order. This is important since some global variables may use other uninitialized globals in their initializers. The global variable init is only done in case the WebGL shader spec is being followed. This avoids adding global initializers twice in case the same shader goes through multiple translations, assuming only one of them is a WebGL shader translation. BUG=angleproject:1966 TEST=angle_end2end_tests, WebGL conformance tests Change-Id: Iea701d3ae40edc906abd87303f2aa27fd23bf55a Reviewed-on: https://chromium-review.googlesource.com/509689 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0a82f2fa 2017-05-30T15:42:00 D3D11: Don't copy SharedSRVs around. This was causing a very large performance regression in Texture re-binding. Instead pass by const &, which should be fine, since values in std::map (and unordered_map) are not reallocated when the map changes. Also make the SharedResource type non-copyable, and add an explicit makeCopy method for when we need to clone the shared pointer. BUG=angleproject:2034 BUG=chromium:727318 Change-Id: I39508a6ca4b41e4da31fe68899caa4464138cada Reviewed-on: https://chromium-review.googlesource.com/517670 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho df7d13eb 2017-05-30T13:53:45 Lift outdated NVIDIA test suppressions Lift some test suppressions for bugs that have been fixed in the NVIDIA driver a good while ago. Also improve code style in some suppressions - prefer IsOSX() and IsLinux() to using ifdefs. BUG=angleproject:1305 TEST=angle_end2end_tests Change-Id: Ia069f5b9696000c901956d2952801d5f5c339a11 Reviewed-on: https://chromium-review.googlesource.com/518168 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 63d8c266 2017-05-29T13:35:09 Re-use std::hash in RenderStateCache. This will allow us to more easily take advantage of Chromium's MRUCache class. BUG=angleproject:2044 Change-Id: I3fad82fc825861dc1c2095f25da83159da76e76b Reviewed-on: https://chromium-review.googlesource.com/517359 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill aa0a5446 2017-05-25T13:30:23 Ensure gl State structs are zero filled. In some cases we would hash or memcmp against structs with bools or other non-filled data. This could have implementation differences, and may have been causing cache errors on Clang. BUG=chromium:721648 BUG=angleproject:2044 Change-Id: I981a1e6e8d50a33f7fade568497b72b919accfce Reviewed-on: https://chromium-review.googlesource.com/516383 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 80616218 2017-05-17T15:40:03 Support CHROMIUM_copy_texture for all formats on D3D11. Adds a CPU readback and conversion path when the destination texture is not renderable. BUG=angleproject:1932 Change-Id: I71461ca991dc10dd636ff38e1ae20db2be0f8d63 Reviewed-on: https://chromium-review.googlesource.com/508308 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 98de826c 2017-05-29T13:01:02 Platform: Fix initialization order in tests. Because of the platform refactor in abf38572062b91 we broke the way the tests override the D3D workarounds for the tiny depth/stencil bug. This change passes a pointer to the platform directly in the EGL init logic, which solves this issue. It also removes all decltype code in the platform header which might fix the UBSAN problem we were seeing previously. Also change a present mode selection error into a warning in the Vk back-end, since this was being triggered on AMD, but is safe. BUG=angleproject:2042 Change-Id: Ibbd0c69ce11a840cf4b33c616f56020001e553aa Reviewed-on: https://chromium-review.googlesource.com/513519 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 20805650 2017-05-25T12:20:59 D3D11: Consolidate state allocation. This cleans up the allocation and deallocation of Blend, DepthStencil, Rasterizer, and Sampler states. This patch introduces a LazyResource2 class, basically a replacement for LazyResource, which will be removed once the refactor is done. BUG=angleproject:2034 Change-Id: I4fa759ae479807ff69a629f89a08b01800ba3f66 Reviewed-on: https://chromium-review.googlesource.com/503627 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 857c09db 2017-05-16T15:55:04 Add missing completeness checks for texture attachments. Texture attachments need to validate that the attached mip level is within the [baseLevel,maxLevel] range and that the texture is complete if the attached mip level is not the base level. BUG=722684 Change-Id: I859766506b295638572b75a0e2e9fed168be047a Reviewed-on: https://chromium-review.googlesource.com/506928 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 9733ceef 2017-05-11T19:14:35 Initialize uninitialized locals in GLSL output Guarantee that local variables are initialized before they are used in GLSL output. In HLSL output all variables were already being initialized. Locals are initialized using an AST transform. The local variable init can only be run after some simplification of the AST, so that it is able to handle complex cases like: for (int i[2], j = i[0]; i[0] < 3; ++i[0]) { } If we're dealing with ESSL 1.00 which lacks array constructors, in this kind of case the uninitialized array initialization code needs to be hoisted out of the loop init statement, and the code also needs to make sure that j's initializer is run after i is initialized. Another complex case involves nameless structs. This can be an issue also in ESSL 3.00 and above: for (struct { float f; } s; s.f < 1.0; ++s.f) { } Since the struct doesn't have a name, its constructor can not be used. We solve this by initializing the struct members individually, similarly to how arrays are initialized in ESSL 1.00. Initializing local variables is disabled on Mac and Android for now. On Mac, invalid behavior was exposed in the WebGL 2.0 tests when enabling it. On Android, the dEQP test runs failed for an unknown reason. Bugs have been opened to resolve these issues later. BUG=angleproject:1966 TEST=angle_end2end_tests, WebGL conformance tests Change-Id: Ic06927f5b6cc9619bc82c647ee966605cd80bab2 Reviewed-on: https://chromium-review.googlesource.com/504728 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill bdc1e2a2 2017-05-24T14:40:27 D3D11: Consolidate Buffer allocation. We now allocate and release all buffer resources from a single place, allowing us to allocate junk memory, clear on init, and track the currently allocated buffer memory. BUG=angleproject:2034 Change-Id: Id60b63a7f77bc369dfc494a7587ab06c8d34a8e2 Reviewed-on: https://chromium-review.googlesource.com/503253 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang a1b9d5a2 2017-05-18T11:22:27 Refactor multisample framebuffer completeness checks. Re-land with protection against div-by-zero in samples compatibility check. BUG=722684 Change-Id: I3d5c310d1f2cb4d8b92d80492435855c3c4ad807 Reviewed-on: https://chromium-review.googlesource.com/517427 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 95468d17 2017-05-04T11:14:34 Support multiview in ESSL 1.00 shaders Support is added according to the proposal for WEBGL_multiview. When the multiview extension is enabled in an ESSL 1.00 shader, num_views can be specified using a layout qualifier. To support this, enabling the multiview extension makes "layout" a keyword rather than an identifier in ESSL 1.00. The type of gl_ViewID_OVR is also different in case of ESSL 1.00: it has to be a signed integer, since unsigned integers are not supported in ESSL 1.00. Some existing tests for multiview shaders are extended in this patch. The changes make sure that vertex shader "in" qualifier is still allowed in ESSL 3.00 multiview shaders, since this patch adds code to disallow it in ESSL 1.00 multiview shaders. BUG=angleproject:1669 TEST=angle_unittests Change-Id: I65dbbbebabdb24cf0bb647d40aa80cebf713c4f7 Reviewed-on: https://chromium-review.googlesource.com/506088 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang 7d79fe95 2017-05-26T20:50:45 Revert "Refactor multisample framebuffer completeness checks." This reverts commit ff77c359221485886b8207e8afd23c11e0768cf4. Reason for revert: Breaks FramebufferMixedSamplesTest on Android NVIDIA BUG=angleproject:2045 Original change's description: > Refactor multisample framebuffer completeness checks. > > BUG=722684 > > Change-Id: Iebe6968ebd693e7f051394a040eac1cf6f539e6e > Reviewed-on: https://chromium-review.googlesource.com/508221 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> > TBR=fjhenigman@chromium.org,geofflang@chromium.org,jmadill@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. BUG=722684 Change-Id: I1abab021ba73b218cbbe60d4e7bfdaae56955c64 Reviewed-on: https://chromium-review.googlesource.com/517390 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 2c479d6e 2017-05-24T14:37:22 D3D11: Use TextureHelper11 everywhere. This consolidates all texture allocation into ResourceManager11. It removes a lot of error checking and resource management code. In a few places we're storing some redundant information, like in TextureStorage11, we might store the Format pointer in two places, or the Texture's size. BUG=angleproject:2034 Change-Id: I9369e76925a67632c444c662e5667c5ed7875547 Reviewed-on: https://chromium-review.googlesource.com/503252 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho a22aa4ed 2017-05-24T18:17:23 Mark some internal functions as not having side effects Precision emulation rounding function calls and vector/matrix dynamic indexing function calls now get a flag that indicates that running the function body does not have side effects. This avoids triggering asserts in OutputHLSL when these internal function calls end up on the right hand side of a non-unfolded logical operator. BUG=chromium:724870 TEST=angle_unittests Change-Id: Id1a2b6b744f6a04c6cdb86a8f4109ccc12bc70b9 Reviewed-on: https://chromium-review.googlesource.com/516705 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang ff77c359 2017-05-18T11:22:27 Refactor multisample framebuffer completeness checks. BUG=722684 Change-Id: Iebe6968ebd693e7f051394a040eac1cf6f539e6e Reviewed-on: https://chromium-review.googlesource.com/508221 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Tom Anderson 26098cb2 2017-05-24T20:39:28 Add missing dependencies on exe_and_shlib_deps (angle) BUG=chromium:723069 Change-Id: I2b3c9be297c2b65955e31f393756ca266cc7c60b Reviewed-on: https://chromium-review.googlesource.com/514436 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6811a316 2017-05-24T16:50:06 Use GetPlatformDisplay instead of GetPlatformDisplayEXT. This will allow us to use EGLAttrib and pass pointers as Display init parameters if necessary. BUG=angleproject:2042 Change-Id: Ib0f85d71bc9d3dff2db9453012f40303f3c3bd7c Reviewed-on: https://chromium-review.googlesource.com/513518 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9d7d719c 2017-05-24T14:35:59 D3D11: Move CreateStagingTexture to Renderer11. This will make staging texture tracking easier. BUG=angleproject:2034 Change-Id: I2f0418cc5784100bf6fba59b4bda1b2dd9dc18d1 Reviewed-on: https://chromium-review.googlesource.com/503251 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 4f0e003e 2017-05-01T16:04:35 Implement the new formats/features of the ES3 CHROMIUM_copy_texture. Some non-renderable texture formats remain unimplemented. BUG=angleproject:1932 Change-Id: Id206432d6e26a70fc0e84478a4e43e9eefadcf2f Reviewed-on: https://chromium-review.googlesource.com/491948 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill caafd890 2017-05-19T14:31:25 D3D11: Don't store device in InputLayoutCache. We will need the Renderer pointer for resource allocation, so pass it around instead of storing the device and context. BUG=angleproject:2034 Change-Id: Iaf271913f88c5402895aa81de310aa22fcd72cc4 Reviewed-on: https://chromium-review.googlesource.com/509930 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 341a36cc 2017-05-24T09:53:25 Fix zero size buffer robust init crash. We were not correctly checking for a zero-size buffer, which should not trigger allocating a scratch buffer. BUG=angleproject:1635 Change-Id: Iac0a3d8f1eeeb7b39c59eec411bec78a4f21bcd3 Reviewed-on: https://chromium-review.googlesource.com/513478 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 19ecebe7 2017-05-24T16:44:42 Fix compound assignment precision emulation Precision emulation for compound assignment used to set the wrong type for the compound assignment nodes, which could cause an assert to trigger. The wrong rounding function was also being called in the lowp rounded compound assignment function. BUG=chromium:699479 TEST=angle_unittests Change-Id: I60b4cb3bf1830e8249511c13037348bb2423e5b9 Reviewed-on: https://chromium-review.googlesource.com/514045 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill e0e009fe 2017-05-19T14:13:03 D3D11: Consolidate SRV allocation. This change also moves all SRV storage to use the custom smart pointer classes in ResourceManager11. Every single SRV is now allocated in ResourceManager11. For TextureStorage11 and RenderTarget11, we use a shared pointer type since the SRVs use shared ownership by both classes. BUG=angleproject:2034 Change-Id: I90666fbbbc23ff10870b7401f3da09ef79258136 Reviewed-on: https://chromium-review.googlesource.com/503250 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 39b826fc 2017-05-24T09:47:44 Reduce warning spam for failed D3D shaders. This prevents Chrome's about:gpu from being filled with bad shaders, and instead only prints the relevant error lines. BUG=None Change-Id: I75fcd2ef920d2ed7b98e8668c487b0921faf4c0b Reviewed-on: https://chromium-review.googlesource.com/513417 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lei Zhang 22717ce2 2017-05-24T00:15:22 Wrap safe numerics library in namespace angle. When ANGLE is used with Chromium, having two copies of safe numerics code in namespace base causes ODR violations. BUG=449754 Change-Id: I686049e7d8926373d00dd17ec8142fa3c508b9c5 Reviewed-on: https://chromium-review.googlesource.com/513434 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Wei-Yin Chen (陳威尹) 04a56818 2017-05-24T00:45:54 Reduce absolute paths in generated ninja files in angle BUG=chromium:723856 Change-Id: I7481d3335111c697f77aa0ea673614e79b4a86f6 Reviewed-on: https://chromium-review.googlesource.com/513588 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Frank Henigman 9e3bd310 2017-05-17T22:41:49 Enable CopyTex(Sub)Image default FB on Mesa/GLX. Allow CopyTexImageTest.SubDefaultFramebuffer and CopyTexImageTest.DefaultFramebuffer to work with Mesa and GLX back end by doing a clear before reading the framebuffer. BUG=angleproject:2027 Change-Id: Ibb10369e3f5aceb60511fbed1d67a28132734b29 Reviewed-on: https://chromium-review.googlesource.com/507952 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 487b63ab 2017-05-23T15:55:09 Disallow structs as scalar/vector constructor arguments The spec isn't very explicit about disallowing this, but conversions from structs are not among the conversion constructors or specified in any other way either. BUG=angleproject:2036 TEST=angle_unittests Change-Id: I23f2ceda1d1348cec0d3bba38a7a013275ff84eb Reviewed-on: https://chromium-review.googlesource.com/514002 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 83498433 2017-05-19T14:57:23 Put global init code inside main() instead in a function Otherwise we may run into a name conflict issue if the shader code is run through the translator twice, since neither user-defined function names or internal function names are currently being prefixed in GLSL output. This could be fixed by prefixing user-defined variables in GLSL output, but this solution is much simpler. BUG=angleproject:1966 TEST=angle_end2end_tests, WebGL conformance tests Change-Id: I15c8de5a0a5e596fafe9f55e8d370345c790d5cc Reviewed-on: https://chromium-review.googlesource.com/509688 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kenneth Russell 538c7bcf 2017-05-19T15:58:24 Remove failure expectations for shader_random tests. Apparently the current clang roll has fixed these already. BUG=722345 Change-Id: I59f07f197fdfd1eb6e000390ee93d41938fe4d42 Reviewed-on: https://chromium-review.googlesource.com/510031 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho e01c02b6 2017-05-08T14:41:49 Clean up ternary op validation Use "?:" as the operator string to make the error message clearer. Update some comments to refer to specific revisions of the spec, since there have been some spec changes in this area. BUG=angleproject:2032 Change-Id: Ic5d128391bfa46187ad335228077f5eab9eac349 Reviewed-on: https://chromium-review.googlesource.com/500270 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 764a1e76 2017-05-18T11:11:47 D3D11: Consolidate DSV allocation. This uses the new classes introduced in ResourceManager11. Smart pointers mean we can use ANGLE_TRY in more places, and don't need to manually release these views. There is now a single point in the D3D11 back-end where depth stencil views are allocated. BUG=angleproject:2034 Change-Id: If0de2529ece1298e8babf24c07cc4be9849cc4de Reviewed-on: https://chromium-review.googlesource.com/503249 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shao df682a8e 2017-03-31T15:13:21 ES31: Refactor syncState in VertexArrayGL This patch intends to solve several design issues by refactoring the process of syncState in VertexArrayGL before implementing ES3.1 feature Vertex Attrib Binding on the OpenGL back-end. 1. Use nullptr as the flag of using client memory pointer 2. Simplify comparisons in updateAttribPointer. 3. Put all code related to mFunctions->vertexAttrib*Pointer() into an individual function 4. Remove redundant mStateManager->bindVertexArray() in all update* functioins and only call it once in syncState(). BUG=angleproject:1593 Change-Id: I8f68534bb9291a601b9b77954d7281e5171c2b55 Reviewed-on: https://chromium-review.googlesource.com/465378 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 9676d1af 2017-05-16T11:29:24 Handle multiple AST insertions to the same parent in updateTree() Multiple insertions to the same parent can be handled as long as the insertions don't have the same position as well. They're sorted in reverse order so that insertions to greater indices get processed first. This helps to make some AST transformations faster - they don't need multiple tree traversals and updateTree() steps anymore. The SimplifyLoopConditions AST transformation is changed to only use a single traversal. BUG=angleproject:1966 TEST=angle_unittests, angle_end2end_tests, WebGL conformance tests, dEQP-GLES2.functional.shaders.*select_iteration_count* Change-Id: I3183f2644ad58b282926093c77b204fb7e4e9b71 Reviewed-on: https://chromium-review.googlesource.com/506202 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho b427920e 2017-05-18T15:08:24 Clean up ValidateMaxParameters It doesn't need to use a traverser, since all function definitions can be found simply by iterating over the children of the root node. BUG=angleproject:2040 TEST=angle_unittests Change-Id: I18a98eff9710485c0cdce73e7fffe124f7d7afb2 Reviewed-on: https://chromium-review.googlesource.com/508791 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Kenneth Russell bb580b1b 2017-05-18T11:17:05 Fix names of some crashing shader tests. The names were wrong, so the test expectations weren't applying. BUG=722345 Change-Id: Ic64abf08e512dbf3c297ee89a74b614cd4590b58 Reviewed-on: https://chromium-review.googlesource.com/508166 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Jamie Madill 403c1682 2017-05-18T11:11:46 D3D11: Add resource manager classes. The resource manager tracks the allocations and deallocations of all D3D11 resources that have device memory: Buffers and Textures (which are either 2D or 3D). It also tracks the number of active Views (DSV, RTV, and SRV, potentially UAV with ES 3.1). A new smart pointer type will wrap the resource deallocation so that the object notifies the manager when ANGLE is done with the resouce. This allows us to track precisely how much GPU memory we think we're using at any point, and will help prevent resource leaks for these object types. It also makes initialization and releasing much more trivial. The base class for a resource uses a template template parameter so that we can use a unique or shared pointer depending on if the object in question needs unique or shared ownership. For some resources (in our case, SRVs are shared between the TextureStorage11 and RenderTarget11 classes, and Textures are shared in many places) we need to have the ability to have shared ownership. Unique ownership is a little bit more efficient so supporting both can be helpful. In this patch RenderTargetView allocation is moved to use the unique smart pointer. BUG=angleproject:2034 Change-Id: Idb1245c24cd66733b8b5ca524c727350b2d2c745 Reviewed-on: https://chromium-review.googlesource.com/503248 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 9f10b775 2017-05-16T15:51:03 Refactor checks for incomplete framebuffer attachments. BUG=722684 Change-Id: I6f47d92b450a056a2344767bef28e96c4552f98e Reviewed-on: https://chromium-review.googlesource.com/506927 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 5df2b9d2 2017-05-18T12:15:28 Clean up AddDefaultReturnStatements It doesn't need to use a traverser, since all function definitions can be found simply by iterating over the children of the root node. BUG=angleproject:2040 TEST=angle_end2end_tests Change-Id: I380942f90a0e73152f296b98d1fb027762d913b0 Reviewed-on: https://chromium-review.googlesource.com/508689 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Kenneth Russell df22132f 2017-05-17T17:36:49 Skip, rather than fail, crashing functional_shaders_random tests. BUG=722345 TBR=geofflang@chromium.org Change-Id: Ie4c488b730ed2b51ce8f62d5bf7961dcc8ac0104 Reviewed-on: https://chromium-review.googlesource.com/508102 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Geoff Lang 451b2b7f 2017-05-15T15:32:02 Correctly generate mipmaps for sRGB textures. sRGB textures need to linearize their data before averaging, this worked correctly on the GPU mipmap generation functions but not the CPU ones. BUG=angleproject:2019 TEST=conformance/extensions/ext-sRGB Change-Id: I554dac89b12acf5ebf5b7cab6f6faf0bce5168a6 Reviewed-on: https://chromium-review.googlesource.com/506241 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 44653302 2017-05-17T11:03:44 Use fprintf(stderr) instead of std::cerr. This allows us to include <ostream> instead of <iostream> to avoid including a static initializer. BUG=angleproject:2037 Change-Id: Ib7e84a15018fa951bad1c87ffec4bfb0c896749f Reviewed-on: https://chromium-review.googlesource.com/507627 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 1a310b84 2017-05-17T18:04:14 dEQP expectations: suppress failures caused by a clang roll Hopefully this makes the bot green while we investigate whether the bug is in dEQP or clang, and find a fix. BUG=722345 Change-Id: I2813881addb4ebfe23443244d175b4c6db698a7d Reviewed-on: https://chromium-review.googlesource.com/507767 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 1dd07a64 2017-05-12T17:01:22 Simplify DeferGlobalInitializers It doesn't need to use a traverser, it's simpler to just iterate over all statements in the global scope. BUG=angleproject:1966 TEST=angle_unittests, WebGL conformance tests Change-Id: I11200f72842db86be2bcdd11934262da183cc3b4 Reviewed-on: https://chromium-review.googlesource.com/504727 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 231c7f56 2017-04-26T13:45:37 Apply clang-format to many files. This cleans up the formatting in many places. BUG=None Change-Id: I6c6652ebc042f1f0ffecced53582d09d66b4f384 Reviewed-on: https://chromium-review.googlesource.com/487884 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Xinghua Cao 73badc07 2017-03-29T19:14:53 ES31: Implement glDispatchCompute for D3D backend BUG=angleproject:1955 TESTCASE=angle_end2end_tests Change-Id: I69b4df83d67017d39df67753d6d17fc15ececebf Reviewed-on: https://chromium-review.googlesource.com/462067 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 7854d861 2017-05-09T14:29:15 EmulatePrecision: Round constructor args only when needed Constructor arguments don't need to be rounded if the constructor result will be rounded to the same precision. This will make precision emulated shaders slightly faster to execute in some cases. BUG=angleproject:874 TEST=angle_unittests Change-Id: I4220cd2289c97dcf5b7a25a4cbdd18487947c2d2 Reviewed-on: https://chromium-review.googlesource.com/500288 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 9cbc07c3 2017-05-10T18:22:01 Simplify AST transformations that need to find main Share code for finding the main function from the AST between InitializeVariables, DeferGlobalInitializers, EmulateGLFragColorBroadcast and UseInterfaceBlockFields. This makes InitializeVariables simpler in particular, as it doesn't need an AST traverser anymore. BUG=angleproject:2033 TEST=angle_unittests, WebGL conformance tests Change-Id: I14c994bbde58a904f6684d2f0b72bd8004f70902 Reviewed-on: https://chromium-review.googlesource.com/501166 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jiawei-Shao 995c2ed2 2017-05-15T13:31:45 Initialize currentValueAttrib->binding in updateCurrentValueAttribs This patch intends to fix a crash issue in the win-clang build of ANGLE by adding the missing currentValueAttrib->binding assignment in StateManager11.cpp::updateCurrentValueAttribs(). In D3D11 all vertex attributes (VertexAttribute and its VertexBinding) should be treated as a whole, so we should always ensure these two parts are availabe. This patch also add ASSERTs before using *translated->attrib and *translated->binding to prevent a TranslatedAttribute object having a null attrib or binding. BUG=chromium:721783, angleproject:1593 Change-Id: Id11d6f1d4c37daabad2265e01ea38eb51046b9cb Reviewed-on: https://chromium-review.googlesource.com/505928 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Frank Henigman d5e8e196 2017-05-15T18:37:48 Check FunctionsEGL::terminatePtr before use. FunctionsEGL::terminatePtr could be null if initialization failed, so check it before use to avoid crashing. Change-Id: Ide9378c8e26749ab9d58c01cb36cd923836cde98 Reviewed-on: https://chromium-review.googlesource.com/506627 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Corentin Wallez e9ed3d86 2017-05-15T15:51:37 Use unused uniform blocks workarounds on Linux AMD. The Linux AMD driver optimizes out uniform blocks where WebGL2 and maybe OpenGL ES 3 forbids it. Try to fix this by enabling the workaround that was made for the same problem on OSX. BUG= Change-Id: If3b18ec1f463582d7594221a6f2a08d25207e737 Reviewed-on: https://chromium-review.googlesource.com/506189 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 07843cd6 2017-05-15T15:24:53 Suppress default FBO CopyTexImage failure on Linux Intel BUG=angleproject:2027 Change-Id: I337303c9f673558ed75826e96fc2cd75f6ec1441 Reviewed-on: https://chromium-review.googlesource.com/506070 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez c895b4c7 2017-05-04T14:18:42 Make IGarbageObject's destructor virtual This fixes a warning. BUG=angleproject:1668 Change-Id: Idf063be9dde0bfbf5f088d69ef38fd97baa69df3 Reviewed-on: https://chromium-review.googlesource.com/495434 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shao 2b324d50 2017-05-09T15:02:39 Fix formatting of struct indexing in intermediate output This patch fixes 2 format issues in the intermediate output of structs and interface blocks in indexing expressions. 1. Adds the missing line feed (LF) so that the next expression can be started in a newline correctly. 2. Remove unnecessary mDepth++ and mDepth-- to avoid redundant indentions. BUG=angleproject:2031 Change-Id: I04e36443a851df4c26ba6b1cbf3a7f8fd6405d3a Reviewed-on: https://chromium-review.googlesource.com/499569 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 8fab320c 2017-05-08T18:22:22 Share a single TOperator enum among all constructor AST nodes The code is a lot simpler when the type information is only carried in the TType of the node, instead of being partially duplicated in the enum value. BUG=angleproject:1490 TEST=angle_unittests Change-Id: I956376225ec01e469c7afb7378fa48cc097c0cea Reviewed-on: https://chromium-review.googlesource.com/498768 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 9405005f 2017-05-08T14:17:44 Disallow interface blocks in arithmetic expressions Interface blocks were mistakenly being allowed in some types of unary, binary and ternary expressions, when they should not have been. BUG=angleproject:2030 TEST=angle_unittests Change-Id: Ie75833ee208e1b7fef8f77fa91b90da278bc6498 Reviewed-on: https://chromium-review.googlesource.com/500269 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Frank Henigman cbd14085 2017-05-02T18:26:34 Test CopyTex(Sub)Image on default framebuffer. Add end2end tests that attempt CopyTexImage2D and CopyTexSubImage2D from the default framebuffer. BUG=angleproject:2027 Change-Id: Ic16527a0665317fe7d08d8204d1bd3f6309b0343 Reviewed-on: https://chromium-review.googlesource.com/494266 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Eric Engestrom 82830ede 2017-05-09T11:17:00 Fix assert in EGLSyncControlTest `ust`, `ust2`, `msc`, and `msc2` are unsigned, so their difference is still unsigned. The `>0` assert could never fail. Fix this by simplifying the test to compare the pairs of values directly. Fixes: 5d9f5df01ac5a384d9b7 ("Implementation of eglGetSyncValuesCHROMIUM extension.") Fixes: ee218f273f3eb4e14d96 ("Re-land eglGetSyncValuesCHROMIUM extension.") Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Change-Id: I0b19d786720f545c846640d48c30a83a1d001396 Reviewed-on: https://chromium-review.googlesource.com/500189 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
jchen10 8d835fba 2017-05-08T13:26:15 UniformBufferTest: fix invalid uniform index To get the index value of an uniform or uniform block, the Spec suggested way is to enumerate according to its name. There is no mention that index has any correspondence regarding the order of uniforms in shader source code. BUG=angleproject:1622 BUG=angleproject:1543 Change-Id: I76dbf0ef05f89cd93ea2bdaf93a47f0f5d318f87 Reviewed-on: https://chromium-review.googlesource.com/497976 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 0c09e265 2017-05-03T09:43:13 Add BGRA formats to glCopyTexSubImage validation. These formats were already accepted by glCopyTexImage and allow glCopyTexSubImage to work on the default framebuffer for D3D9 and D3D11. BUG=angleproject:2027 Change-Id: I5d8b839ae2c69e1e8381aa011df6223e18afb308 Reviewed-on: https://chromium-review.googlesource.com/493803 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shao 29e9035d 2017-05-05T16:41:29 Add Linux and MacOS support to perf_test_runner.py This patch enables perf_test_runner.py to run on Linux and MacOS. BUG=angleproject:2029 Change-Id: Ia7176a3f5fed0245ab72d5def1199623c4fb4fe2 Reviewed-on: https://chromium-review.googlesource.com/497648 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 8ceaedf8 2017-05-09T10:32:22 Generate an INVALID_OPERATION error if a texture format is not supported. We already generate an INVALID_VALUE in the ValidES3InternalFormat check above. If an error is generated here, it is because the internal format and type are not valid. TEST: conformance2/textures/misc/tex-image-with-bad-args BUG=angleproject:1958 BUG=angleproject:1715 Change-Id: I50d479e64d687cc971c8f41b5691dcb123da0391 Reviewed-on: https://chromium-review.googlesource.com/499690 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 65ac5b9c 2017-05-01T13:16:30 Allow glGenerateMipmaps on sRGB textures in WebGL. The generated mipmaps are still not correct on all ANGLE backends. TEST=conformance/extensions/ext-sRGB BUG=angleproject:2009 Change-Id: I6299dcb93c71f48e61ec660347b4747366ecfb71 Reviewed-on: https://chromium-review.googlesource.com/491367 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho a7ecec38 2017-05-08T17:43:55 GLSL: Simplify constructor parsing Constructor argument checking rules are reorganized to make them easier to understand and constructor node creation is made simpler. This removes usage of constructor op codes from ParseContext. This paves the way for getting rid of constructor op codes entirely, which will remove duplicate information from the AST and simplify lots of code. This refactoring will make adding arrays of arrays slightly easier. BUG=angleproject:1490 TEST=angle_unittests Change-Id: I4053afec55111b629353b4ff7cb0451c1ae3511c Reviewed-on: https://chromium-review.googlesource.com/498767 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Andrei Volykhin 73fa4b83 2017-05-05T18:45:06 ES31: Validate fragment shader outputs This allows to validate fragment shader outputs for shader version #300 and newer. Change-Id: I21b21ebb357eab61e36c080c328291ed20b8eb8f Reviewed-on: https://chromium-review.googlesource.com/497749 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 40762ef3 2017-05-08T13:47:03 Supress floating point texture failures on various Intel bots. BUG=angleproject:1958 Change-Id: Ia168cd1bd48b9a443da6662efeaace1f792861f3 Reviewed-on: https://chromium-review.googlesource.com/498408 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 53d3841c 2017-04-20T11:33:00 Refactor entry point gen slightly. This makes the entry points a bit smaller and avoids redundant return statements. BUG=angleproject:1309 Change-Id: I895c26d4235900578f5acc0eb94a7deef67b946b Reviewed-on: https://chromium-review.googlesource.com/483428 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
jchen10 b4cf5656 2017-05-05T18:51:17 Validate opaque operands against binary operators Add checks that opaque operands can only be used with array indexing and field section, as mentioned in ESSL 3.10 section 4.1.7. BUG=angleproject:2028 Change-Id: I41b7f10785bf712dfc999f85ebff925341c51911 Reviewed-on: https://chromium-review.googlesource.com/497767 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
jchen10 cc2a10e9 2017-05-03T14:05:12 Unify opaque type validation in GLSL parsing Refactor separate sampler and image validations into unified opaque type handling. This paves way for adding atomic counter, another new opaque type. BUG=angleproject:1729 Change-Id: I201d28e31c84534db43e656d518650e378bab76c Reviewed-on: https://chromium-review.googlesource.com/493618 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 7142f6ce 2017-05-05T17:07:26 Prevent using gl_ViewID_OVR as an l-value It's a shader input and as such should not be writable. BUG=angleproject:1669 TEST=angle_unittests Change-Id: I05cb5c63b7272dfa6e80cad57385da02504e4d8f Reviewed-on: https://chromium-review.googlesource.com/497408 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang 62a416d5 2017-04-28T09:59:56 Re-enable the RGB10A2 backbuffer format. BUG=angleproject:1662 Change-Id: I9bd830a3021a0cfa9010c5e58d3a284cc3eeca26 Reviewed-on: https://chromium-review.googlesource.com/490346 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5e4343a1 2017-05-05T10:56:12 Add msvs_cygwin_shell to all actions in vulkan.gypi. BUG=angleproject:1668 Change-Id: I93bc7584ff7d945f9efde25c3379a282ee246b53 Reviewed-on: https://chromium-review.googlesource.com/497328 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 06f76552 2017-05-05T10:09:32 UniformsPerf: Define a vertex attribute. This seems to fix a crash on D3D9/Win7/Intel. BUG=chromium:704211 Change-Id: If600a6b8409774503f28ca122d87ef723e4ea2e5 Reviewed-on: https://chromium-review.googlesource.com/497649 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill ee769dd2 2017-05-04T11:38:30 GLES2: Auto-generate entry points file. BUG=angleproject:1309 Change-Id: I7817444c3ea56f932fe769a860f4a70b29262019 Reviewed-on: https://chromium-review.googlesource.com/483427 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Frank Henigman aa7203ef 2017-05-03T23:32:29 Inherit privately from angle::NonCopyable. Make all inheritance from angle::NonCopyable private so the compiler complains about this (admittedly unlikely) code: class Foo: angle::NonCopyable { virtual ~Foo() { ... } }; angle::NonCopyable *p = new Foo; delete p; In the above code ~Foo() is not called, only ~NonCopyable(), because the latter is not virtual. Making it virtual would add overhead to all derived classes which don't already have a virtual method. Also tighten access in NonCopyable, because we can. BUG=angleproject:2026 Change-Id: Id0dc4d959cfb7bb82cf49382118129abb1d3a4f0 Reviewed-on: https://chromium-review.googlesource.com/495352 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Corentin Wallez 6a1d2f93 2017-05-02T16:47:38 Fix compilation of the Vulkan loader / layers in standalone This commit introduces a stamping mechanism to make sure the order of build dependencies is correct. In GYP there are the following build order dependencies (between others): - A target link depends on previous target links - A target source compile depends on that target actions outputs - An action output depends on the action inputs The problem was that there were actions in vulkan_layer_utils_static that generated headers needed by vulkan_loader's sources (between others) Making a "dependencies" relationship between the two was not enough to ensure the headers were generated before the source were compiled. Instead we replicated the "stamping" mechanism used in GN using GYP actions that depend on the headers and output a dummy stamp file. This completes the build order dependencies: the sources depend on the stamp which depend on the action's input, i.e. the generated headers. BUG=angleproject:1668 Change-Id: I2de15ac2ea8f838acdbf43da1f111b28b8cc2184 Reviewed-on: https://chromium-review.googlesource.com/493892 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>