src/libANGLE


Log

Author Commit Date CI Message
Shahbaz Youssefi b86e73da 2019-05-21T10:23:23 Vulkan: Update glslang_validator binary for Linux The new binary has the ability to optimize SPIR-V code. Bug: angleproject:3432 Change-Id: I5953be6f207f153baaf2efe17380448aff374d60 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1620913 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Tom Anderson 08146a27 2019-05-17T10:40:44 Remove non-source sources from binary targets No behavior changes. BUG=chromium:964411 Change-Id: I843757e65f110882c01514fe6bf4aed28e07dd21 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1617011 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 70958d15 2019-04-17T13:59:45 Let attribute aliasing logic detect overflow Checking against the max attribute count is not needed as aliasing is implemented correctly below. If not enough locations are available, linking will fail. This works for backends that support aliasing (Vulkan, GLES), but not for D3D11, which asserts. To handle this, add a limitation that informs the frontend of aliased attribute support. Bug: angleproject:3252 Bug: chromium:964404 Change-Id: Ib9ae5d381bbb2e6bf496272fc3d9e88467c17290 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1572817 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi b16d69c3 2019-05-13T16:28:27 Vulkan: Add support for surface multisampling A multisample image is created for the surface if multisampling is enabled. Prior to present, this multisample image is resolved into the swapchain image. FramebufferVk::readPixelsImpl similarly has got the ability to resolve the region of interest into a temporary image prior to readback. Tests are added to render a point, line and a triangle on a 4x multisampled surface. Bug: angleproject:3204 Change-Id: I34aca502fa1918b5cbf000ff11521c350372e051 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1610188 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 6a4cad87 2019-05-01T13:04:00 Vulkan: Tighten descriptor stage usage hints Per-stage uniform buffers are marked with the specific stage. Program uniform buffers and images are specified to be used in all graphics stages. Descriptors used in internal shaders are marked for use in either compute or fragment stages. Bug: angleproject:3220 Change-Id: Ifcac36a1224f0392ba5fba50660514e498256401 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1595439 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>
Cody Northrop 09eabed9 2019-04-03T19:20:21 Allow attribute linking for ES2 * Pipe webGL compatibility down to allow attribute aliasing. * Reject aliasing if shader level is too high, or webGL is in use. Bug: angleproject:3252 Change-Id: I3378fe707e3795a4b8a424989afccff42bc84344 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1556538 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Geoff Lang e77f63a2 2019-05-09T10:37:42 Use clamp cast for stencil mask in all versions. dEQP only covers this behaviour in ES2.0 tests and they fail when running with an ES3.1 context. BUG=angleproject:3425 Change-Id: I339b83901434da92ae6dd6273460b0725644cdf5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1602177 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Courtney Goeltzenleuchter eaf2d928 2019-04-18T16:31:25 Add support for OES_depth_texture Note: Includes workaround for http://anglebug.com/3452 - some Android devices do not indicate filtering support on VK_FORMAT_D16_UNORM. Bug: angleproject:3103 Test: angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.DepthTexture/* angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.PackedDepthStencil/* angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.DepthTextureRender/ES2_VULKAN Change-Id: Ic325fb94ab0e619a17c2e149e0e0865fa4142f3a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575426 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang bff32703 2019-05-14T18:08:50 D3D11: Disable B5G6R5 on AMD drivers. Texture data corruption has been seen with this format, specifically on AMD Radeon R7 240 cards with the 15.201.1301.0 driver. BUG=941620 Change-Id: I42d0d86a8319afdfaf17b44e142c6414092c647d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1610681 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi b783fbc7 2019-05-10T23:16:17 Vulkan: Fix matrix uniforms A piece of code shared with d3d was used to implement this feature. However, we store the uniform data transposed and row-major in d3d to accomodate the fact that matrix indexing in HLSL is the opposite of GLSL (mat[row][col] in HLSL as opposed to mat[col][row] in GLSL). There were two functions that copied the source matrix fields either as column-major or source-major (corresponding to `transpose` false or true respectively in glUniformMatrix*) into a row-major destination. These functions are refactored into one, which copies from any-major source to any-major destination. The HLSL backend uses the "to row-major" variant and the Vulkan backend uses the "to column-major" variant. Bug: angleproject:3198 Change-Id: I7254da4fbe6916af78c5906abcb82ca01674ab9f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1607541 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Ian Elliott f7033c55 2019-05-13T09:48:06 Vulkan: Request at least 3 images for MAILBOX. The glmark2 benchmark score went down (on Android with Pixel devices) when ANGLE changed VkSwapchainCreateInfoKHR::minImageCount from 3 down to 2, when using VK_PRESENT_MODE_MAILBOX_KHR. In experimenting, this was confirmed. This CL changes minImageCount back to 3. Vulkan spec issue #1671 was filed in order to understand whether this is a good/bad approach for other drivers/platforms. Test: glmark2 on Pixel2. Bug: angleproject: 3400 Change-Id: Ia4a72733eb648e4f53feeb8833b174d653fa5766 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1610242 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
shrekshao 7d798558 2019-05-13T13:40:09 Skip validating draw buffers when RASTERIZER_DISCARD is enabled. Bug: 962555, 962636 Change-Id: I4a22f83689252b7b7e51bbb3fc80e8f0d601a43f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1610701 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shrek Shao <shrekshao@google.com>
Jamie Madill 0a1eeb80 2019-05-13T13:53:18 Call robust resource init before object sync. This should let the Vulkan back-end only need to sync the Image data once before we use them. Bug: angleproject:3427 Change-Id: I8c6e8794e861f855bddbf651997351e8415e3479 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1602912 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 9d519ab1 2019-05-09T23:09:46 Vulkan: Rework layout block storage conversion Previously, a pass over the shader was made, converting shared and packed interface blocks with block storage to std140. This resulted in link success between interface blocks with different storage as they were all translated to std140. With this change, this pass is removed. The link step proceeds with the block storage specifiers as seen by GLES, and only upon Vulkan GLSL shader generation "shared" and "packed" are converted to std140. Bug: angleproject:3199 Change-Id: I069415ab9c9b4e1034bc00f64cd2d9e2d73f5956 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1605262 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang e1de1ab3 2019-05-13T10:53:47 D3D: Store error message by std::string instead of const char*. These error strings are stored for recording later we can't depend on them still being alive so make a copy. BUG=962439 Change-Id: Ie9156c99b9ce79df4a11087bdcab92d980e959a4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1610078 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
shrekshao 3dbe480b 2019-05-06T15:59:07 Validating draw buffers now also considers color mask settings It will always return true if all 4 channels of color mask are set to false. This should only apply to WebGL. Will fix this in a later patch. Bug: chromium:958374 Change-Id: I46befaf3ae1b63027dfbb309ac32724c616025d3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1594629 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e4faae21 2019-05-10T08:27:00 Rename state change notification messages. This makes the style use CamelCase instead of ALL_CAPS. It also cleans up some of the naming. It also changes some uses of the messages in some of the objects to hopefully be more consistent. See the comments added to the enum SubjectMessage in Observer.h for more details. Bug: angleproject:3427 Change-Id: I6dff4f6d335ecf1a27e48df65743b1490bd3025a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1600411 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi fdbece20 2019-05-09T18:06:34 Vulkan: Support unsigned int uniform types Bug: angleproject:3198 Change-Id: Iac5d1389f4f466b7886246d8ca529e8f26a6a5bd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1603629 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 7b08d381 2019-05-09T00:52:04 Vulkan: Enable EXT_frag_depth Natively supported with GLES3 dEQP tests already enabled and passing. Bug: angleproject:3218 Change-Id: I5ff94e3b16d2025a58d5a448383049f9330dd46f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1600864 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 7ef73a52 2019-05-08T10:48:15 Vulkan: Support flat and centroid qualifiers Bug: angleproject:3219 Change-Id: I2e0b60bda9c3af2b9eadf2efd3899250925897f4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1600335 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 9fa248e1 2019-05-06T14:55:18 Vulkan: Implement EXT_draw_buffers In GLES, color attachments are referenced by their indices. These indices match between the API and GLSL. For example, if a shader has: layout(location=0) out color; layout(location=3) out roughness; Then GLES would bind and enable GL_COLOR_ATTACHMENT0 and GL_COLOR_ATTACHMENT3. In Vulkan, the framebuffer object and the corresponding renderpass define the color attachments, and they don't allow gaps in color attachments as GLES does. A render subpass creates the mapping between the color attachments as defined in the framebuffer and the attachments used by the shader (with possible gaps). This change packs the enabled GL color attachments for the sake of the framebuffer, and sets the subpass up in such a way that the shaders continue to use the same color output indices as GLES. In the example above, we have the attachment indices as follows: Status | GLES | GLSL | RenderPass | Subpass enabled 0 0 0 0 disabled 1 - VK_ATTACHMENT_UNUSED disabled 2 - VK_ATTACHMENT_UNUSED enabled 3 3 1 1 That is, the array of color attachments in the Vulkan framebuffer/renderpass is: [0] = GL color attachment 0 [1] = GL color attachment 3 And the array of color attachment references in the Vulkan render subpass is: [0] = 0 (index 0 of the renderpass attachment array) [1] = VK_ATTACHMENT_UNUSED [2] = VK_ATTACHMENT_UNUSED [3] = 1 (index 1 of the renderpass attachment array) Bug: angleproject:2394 Change-Id: Ib6cd2b60882643ea152986eee453270d09cd4aed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1595442 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jonah Ryan-Davis 776694cd 2019-05-08T10:28:55 Change all ANGLE workarounds to use struct definition with info. Change each workaround from a simple bool to a struct with info including name, workaround set, description, and bug IDs. This will help with future workaround integration with Chrome. Bug: angleproject:1621 Change-Id: Ia27c180abaf845e280060c803e5994cc3152a057 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1593917 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten cd078c33 2019-05-01T10:36:11 Allow mis-matched Android Context versions Remove the EGL validation related to context version numbers since a backwards compatible context could be created and shared, causing a version mis-match. Test: angle_deqp_egl_tests Bug: angleproject:3243 Change-Id: Iae818433fea1b230b50aa47c14f084e9079c3583 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592133 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tobin Ehlis 85da00fd 2019-05-09T09:02:34 Remove dontRemoveInvariantForFragmentInput WA Previously removed supporting code for the workaround "dontRemoveInvariantForFragmentInput" but missed this declaration. Bug: angleproject:3285 Change-Id: Ia23b424f2ccbdfe98b7cec79e4290b3621e44238 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1601945 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tobin Ehlis <tobine@google.com>
Mingyu Hu ebab670c 2019-04-19T14:36:45 Adding new extension GL_OVR_multiview GL_OVR_multiview functions exactly the same as GL_OVR_multiview2. All GL_OVR_multiview2 tests now also repeat the same test using GL_OVR_multiview Bug: angleproject:3341 Change-Id: I7e5294fb6bbf7692535174a15da6a42e1b5fc4e2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575904 Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Nick Shaforostov 8fb00484 2019-05-08T12:24:41 fix a freeze when returning from fullscreen to maximized (nvidia only) freeze happens after repetitive enter & exit full screen mode Bug: angleproject:3431 Change-Id: Iea4cd75dc30cd17e53c0a7f1174e39b24d878d4b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1599617 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Courtney Goeltzenleuchter b76bf1b9 2019-04-18T16:00:22 Refactor in preparation of adding OES_depth_texture Rename existing depthTexture extension flag to depthTextureANGLE to distinguish it from OES depth texture extension to be added. Bug: angleproject:3103 Test: angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.DepthTexture Change-Id: I44c69a69b925a84f931518e0374e662893813061 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575425 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten f5115ed4 2019-05-07T14:50:50 Vulkan: Enable standard derivatives extension Enable standard derivatives by default for Vulkan. Bug: angleproject:2903 Test: Validate Skia doesn't generate errors. Test: CQ Runs Change-Id: I7f180d4ca03c154db3e9562213127eca1ce65562 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1599857 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Ian Elliott 19905aea 2019-04-26T01:48:31 Vulkan: Set the Vulkan scissor to the GLES viewport Some Vulkan drivers are not clipping rendering that is outside of the viewport, and the Vulkan spec has some language that indicates that ANGLE should set the scissor: The application must ensure (using scissor if necessary) that all rendering is contained within the render area. In this case, ANGLE is "the application". Bug: angleproject:3253 Bug: angleproject:3254 Change-Id: I6885a3aa6daed57f6ae1c3d974663d763cad10c9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553973 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Tobin Ehlis e9421b2c 2019-04-08T15:16:56 Vulkan:Only apply invariant pragma to output vars The "#pragma STDGL invariant(all)" directive should only be applied to shader output vars. This change also removes the workaround SH_DONT_REMOVE_INVARIANT_FOR_FRAGMENT_INPUT which is no longer needed. This change fixes two tests that were incorrectly assuming that the pragma would be applied to inputs: GLSLTest.InvariantAll[Both|In]. Bug: angleproject:1293 Bug: angleproject:3285 Change-Id: I4eb03fa89fbc7c560150ee0cc32382024b0cb3e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558678 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com> Commit-Queue: Tobin Ehlis <tobine@google.com>
Staphany Park e4e3b322 2019-05-06T15:34:38 Add using-declaration to support Googletest roll. Without this change, rolling Googletest results in compilation errors: https://crrev.com/c/1594628/2. Change-Id: I85e122ad449a3d8fb155b07f64d69022294ab6cd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1598309 Reviewed-by: Victor Costan <pwnall@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Victor Costan <pwnall@chromium.org>
Shahbaz Youssefi 216f73d0 2019-04-12T13:32:30 Vulkan: add uniform buffer object support Support for layout qualifiers in interface blocks are added. All interface blocks are adjusted to either be in std140 or std430. In the Vulkan backend, a new descriptor set is added for UBOs. A dirty bit is added for UBO updating and pipeline layouts and descriptor bindings are updated. Bug: angleproject:3199, angleproject:3220 Change-Id: I271fc34ac2e1e8b76dee75e54a7cff0fe15fe4ee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565061 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten e76c5c3c 2019-05-03T15:51:30 Vulkan: Enable drawRangeElements() Enable drawRangeElements() for the Vulkan backend and the associated tests. Test: angle_deqp_gles3_tests Bug: angleproject:3420 Change-Id: I98770631ce1387131bb45e2c1e9df24e911bc692 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1595101 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 0f4d72e6 2019-05-06T10:27:34 Add makeCurrent and unMakeCurrent to SurfaceImpl. SurfaceGL had these methods already so they are just moving up the inheritance hierarchy. This ends up simplifying some state tracking we had in our surface implementations. BUG=angleproject:2464 Change-Id: I480588ca8470d9ef507f95e0c0297fe126b3abfb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1595434 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang e755a537 2019-04-10T09:58:21 Vulkan: Add a new garbage type gated by fences. This allows Vulkan EGL objects such as EGL Syncs and EGL Images to give their garbage to the renderer before destroying. BUG=angleproject:2464 Change-Id: I59b8e1080e4292bd0856e59a928750c7e77a372e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1562522 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang d7d42395 2019-05-06T13:15:35 Format all of ANGLE's python code. BUG=angleproject:3421 Change-Id: I1d7282ac513c046de5d8ed87f7789290780d30a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1595440 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Lee Salzman 8ba78da0 2019-04-30T23:42:31 add support for EXT_blend_func_extended to D3D11 Change-Id: Id66868851a490d0a68a7e76280720825c4844a45 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1591192 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang c22ef61f 2019-04-09T09:55:14 Vulkan: Store fences instead of serials in SurfaceVK::SwapHistory Previous swaps may not have been submitted by the same context as the current swap and we can't safely wait on serials submitted by other contexts. BUG=angleproject:2464 Change-Id: Ibcb23171feae038fd45abdefb80c4e8a373744e2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1562521 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 6f0c5b8d 2019-05-04T10:00:02 D3D11: Fix potential invalid VAO access in dispatch. In some instances running a dispatch call could lead to accessing an invalid VAO pointer. This seemed to be tied to switching Contexts. Fix the bug by invalidating the cache pointers on Context switch. Note that it seems this bug can only affect ES 3.1+ Contexts. Bug: angleproject:3349 Change-Id: Ib712bcc29215b3fd1c8b7eb0cbd70dea649b3cfc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1594289 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 62742f9e 2019-05-01T16:14:50 Vulkan: Optimize shader source macro replacement @@ LAYOUT-xx @@ and @@ QUALIFIER-xx @@ macros are generated by the compiler when emitting Vulkan GLSL. These macros are replaced at link time in the Vulkan backend. Previously, this replacement was done through calls to angle::ReplaceSubstring, reiterating over the whole source on every replacement. This CL does a prepass on the input source and chunks it up in blocks. Search is optimized as only blocks of a certain type are string-compared (skipping large chunks of shader text). Replace is optimized as the whole shader is not shifted left or right on every replacement. Additionally, this CL modifies the layout macro to the following format: @@ LAYOUT-xx(extra, args) @@ This is used in a follow up CL to have the compiler provide additional layout qualifiers. Bug: angleproject:3220 Change-Id: I6367e781c3304d5f2e0a406e4fb4e6feb4c45f1d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592070 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang be394bad 2019-05-02T13:41:19 Vulkan: Reset swap chain image dependency information when aquiring. If an image was used by a different context previously, it's stored serial is not relevent. We always know that any work involving the swap chain image has been completed by the time we aquire a new one. BUG=angleproject:2464 Change-Id: I0b12b9ff4b9a68593d661344d2d1e2c9d94e4755 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592043 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 051b0896 2019-04-15T15:39:39 Vulkan: Fix layout substitution for struct varyings If the shader contains code such as the following: struct S { vec4 field; }; out S varStruct; The layout qualifier macro is defined as @@ LAYOUT-varStruct @@. However, the Vulkan backend was replacing @@ LAYOUT-field @@. Bug: angleproject:3220 Change-Id: Iae15003867e0bed2cc939159a6653429c7a431e0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1571389 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 989bc9a3 2019-05-02T13:31:24 Move ANGLE Platform Methods init to GetDisplay. Moving the Platform Methods init to GetDisplay allows us to override the platform methods as soon as possible. This lets Chromium override the methods via ANGLEGetDisplayPlatform. It also lets us reset the platform methods when making a new display. Note that because the methods pointer is global it's a bit tricky to manage between swapping configs in ANGLE tests. Using a separate test process for each config should help. Bug: angleproject:3393 Change-Id: I351f86422e53075563f6d8fce32efbd40023cd23 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592045 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang ca49e6dc 2019-05-01T14:20:36 Reset the default framebuffer if ContextImpl::onMakeCurrent fails. Context has the invariant that if it is not current anywhere, mCurrentSuface is null. If makeCurrent fails in ContextImpl::onMakeCurrent, the surface is not reset, breaking this invariant. BUG=angleproject:3414 Change-Id: Icb13c8e2d1edd98d87a8af091a3fbacebadb395c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592064 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi fc0be049 2019-04-18T09:44:06 Fix GL_MAX_COMBINED_UNIFORM_BLOCKS query This was previously returning maxCombinedTextureImageUnits instead of maxCombinedUniformBlocks. Fixing that exposed a bug in the GL backend where the combined values were sometimes capped to vertex+fragment values and sometimes not capped at all. The reasoning for such capping was that the combined limits as queried from GL contains stages not available in GLES (such as tessellation). However, the capping failed to take geometry shader limits into account. This change adjusts such capping to vertex+fragment+geometry. It also applies the cappping to all combined limits, rather than a select few. Bug: angleproject:2099 Change-Id: I7231058b5d7f80b1b2452d9f87d4b0ab6e1cdb17 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1572487 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 0f861bd8 2019-04-26T16:00:23 Vulkan: Don't present on surface destruction. The the user hasn't called SwapBuffers explicitly, we should not write to the window surface. This is especially a problem when the native window has already been destroyed. BUG=angleproject:2464 Change-Id: Ib4289de471ba2ad10e5cc21a8c2af946642f138c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1586355 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
shrekshao 15ce8227 2019-03-18T19:25:21 Fix error report when active color buffer has no fs output Also modify or remove some tests to sync up with the expected behavior stated in spec. Related to https://github.com/KhronosGroup/WebGL/pull/2780 If any draw buffer with an attachment does not have a defined fragment shader output, draws generate INVALID_OPERATION. Also remove Framebuffer masking for inactive outputs. This workaround is no longer necessary as the WebGL spec has changed. It also was never fully working and had bugs with certain orders of calls. Bug: angleproject:2872 Bug: chromium:927908 Bug: chromium:943538 Change-Id: I73715a6ab851ae3db7096f49ea0a9fdd6f576703 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1530018 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Geoff Lang 28383fb2 2019-04-26T16:00:06 Vulkan: Wrap aquire semaphore in a vk::Scoped If vkAcquireNextImageKHR fails, the aquireImageSemaphore would be leaked, wrap it in a vk::Scoped so it is always cleaned up. BUG=angleproject:2464 Change-Id: Ic4a0e16c89ea7c35cf060e5601760422e673c080 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1585318 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 82133763 2019-04-02T16:58:37 Vulkan: Add an unMakeCurrent for contexts. This allows contexts to flush and update state when they are no longer going to be current. BUG=angleproject:2464 Change-Id: Ie577475a94090631a0208542b32a12a239bdeb75 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553824 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang fb6fbdbc 2019-04-12T15:16:30 Return that polling queries have completed after context loss. KHR_robustness says that certain queries that poll such as GetSynciv with SYNC_STATUS should still generate errors after context loss but also return that the result is available. BUG=angleproject:3379 Change-Id: Ibf61f8481bc7c3d1b4fa8979dc404d0ca3952fcd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1566142 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5a0f64b6 2019-04-23T16:06:47 D3D: Require cube completeness to create render targets TextureD3D_Cube::isFaceLevelComplete skips checks for the base level because it assumes that isCubeComplete has already been called to verify the base level. This assumption is not correct for some cases like glCopyTextureCHROMIUM which attempts to create a render target from cube maps that may not be complete. This caused us to create render targets from incomplete cube maps and then fail to upload data to the cube faces because the sizes or formats did not match between the images and render target. TEST=conformance/more/conformance/quickCheckAPI-S_V.html BUG=angleproject:3384 Change-Id: Iceb9415debfa07436fea1eb4bc23d0ec05679839 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1578957 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Geoff Lang 1f6eb0cd 2019-04-24T16:32:00 D3D: Re-mark StreamDraw buffers as dynamic. The StreamDraw usage flag was changed to a static type in http://crrev.com/50eb1e6f77b3b0ad89d2cd00efc0d1d673365296 but it appears to have regressed performance in several Chrome benchmarks because Skia uses it as a usage flag for buffers that change data frequently. BUG=angleproject:3366 BUG=953788 BUG=954028 Change-Id: Ib6805d94714bcd1679f3c9c49f1b70574f0b658a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1582786 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Cody Northrop 83740f97 2019-04-22T11:56:56 Android: Add ANGLE version to logcat We need addtional info in logcat to diagnose ANGLE issues. Before this, only Vulkan version and hardware details are reported: ANGLE : Vulkan 1.1.87(Adreno (TM) 540 (0x05040001)) After this, we also get the ANGLE version: ANGLE : Version (2.1.0.bc20af89d498), Renderer (Vulkan 1.1.87(Adreno (TM) 540 (0x05040001))) Bug: angleproject:3395 Change-Id: I4b67fe5ce389d3d2d641a4cc8b2e0b67649dc70d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1579044 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Michael Spang c467f7b5 2019-04-17T20:20:30 Compute usage from format properties cache in glTexStorageMem2DEXT Per issue 13 in the EXT_external_objects spec, we should request all of the usage flags that are supported for the format. Bug: angleproject:3289, angleproject:3389 Change-Id: I5ef9906061af0fd619f580a9f603dd43be162932 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1573218 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org>
Kenneth Russell 51386f4a 2019-04-11T21:55:20 Reland "Define and expose EGL_ANGLE_power_preference extension." This is a reland of ac58e63295f093b7518535bdd060ff832025b0c5 The original CL was reverted in a rush because I thought there was an uninitialized variable bug, but upon later re-review this turned out to not be the case. Original change's description: > Define and expose EGL_ANGLE_power_preference extension. > > Allows application to select the integrated or discrete GPU on > dual-GPU macOS systems. > > Tested by modifying the example program at: > https://github.com/grorg/ANGLEIOSurfaceTest > > and verifying that both integrated and discrete GPUs can be selected. > (The changes to that program will be upstreamed once some build issues > are resolved.) > > Bug: 2813 > Change-Id: Ibeb17778512896456d220e9bc4cf8f222aa57057 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1570081 > Commit-Queue: Kenneth Russell <kbr@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: 2813 Tbr: geofflang@chromium.org Tbr: cwallez@chromium.org Change-Id: Iea000dd718f4f4b4f57237adb1dc44381b10106b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575419 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Kai Ninomiya 145ec7fa 2019-04-19T01:50:34 Revert "Define and expose EGL_ANGLE_power_preference extension." This reverts commit ac58e63295f093b7518535bdd060ff832025b0c5. Reason for revert: Revert on kbr's request: "has an uninitialized variable bug" Original change's description: > Define and expose EGL_ANGLE_power_preference extension. > > Allows application to select the integrated or discrete GPU on > dual-GPU macOS systems. > > Tested by modifying the example program at: > https://github.com/grorg/ANGLEIOSurfaceTest > > and verifying that both integrated and discrete GPUs can be selected. > (The changes to that program will be upstreamed once some build issues > are resolved.) > > Bug: 2813 > Change-Id: Ibeb17778512896456d220e9bc4cf8f222aa57057 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1570081 > Commit-Queue: Kenneth Russell <kbr@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,kbr@chromium.org,cwallez@chromium.org Change-Id: Icb936d91eec70deb825585da3ff8835ca2794736 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 2813 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575134 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Kenneth Russell ac58e632 2019-04-11T21:55:20 Define and expose EGL_ANGLE_power_preference extension. Allows application to select the integrated or discrete GPU on dual-GPU macOS systems. Tested by modifying the example program at: https://github.com/grorg/ANGLEIOSurfaceTest and verifying that both integrated and discrete GPUs can be selected. (The changes to that program will be upstreamed once some build issues are resolved.) Bug: 2813 Change-Id: Ibeb17778512896456d220e9bc4cf8f222aa57057 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1570081 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 85a239d0 2019-04-18T15:47:52 Vulkan: Write docs on format tables. Bug: angleproject:3372 Change-Id: Ib6cae7975484f4789f3d244adcb158e49892a246 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574619 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0631e19b 2019-04-18T16:09:12 Vulkan: Rename Vulkan "Texture" format to "Image" Also adds some comments to vk_format_utils.h. Bug: angleproject:3372 Change-Id: I529b9b189e4cdfd400c3c981a47139727d9954ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565062 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Michael Spang f02a767d 2019-04-09T18:45:23 Vulkan: Implement glTexStorageMem2DEXT This implements support for creating textures that alias vulkan images allocated inside external memory. Bug: angleproject:3289 Change-Id: Iad071f353a217793102ae737647c7cd572f7b0ad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552029 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org>
Shahbaz Youssefi 422c94bd 2019-04-12T13:37:19 Vulkan: Enable ES3 fragment output attribute locations GLSLTest_ES3 end2end tests are enabled for Vulkan, though with suppressions for other features that are missing. Bug: angleproject:3199 Change-Id: Ie744e160eab2df9a5a4f2c67ea5acf4b865ea5bf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565058 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
jchen10 82bcffa7 2019-04-17T10:45:25 Disable parallel compile for d3d11 compute To observe whether the flaky issues still show up with the feature disabled. Bug: angleproject:3349 Change-Id: I0eae861ad76212fb4a65b57c1e1b5e8c583d6a3b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1571027 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Geoff Lang 057b76e1 2019-04-12T14:48:59 Implement GL_CHROMIUM_lose_context. This is useful for testing context lost behaviour. BUG=angleproject:3379 Change-Id: If0e1538553b1761e313fc36ccde5138cd495200f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1566141 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Shahbaz Youssefi 95c0fae6 2019-04-16T22:46:08 Vulkan: Clear surface images if emulated format This was done for renderbuffers but was missing for surfaces. Bug: angleproject:2722 Change-Id: I019805d6ca43eef86d2d46e7c72c1013803f2139 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1570149 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Michael Spang 3b2c6bfd 2019-04-16T17:19:50 Vulkan: Implement glImportMemoryFdEXT Allow importing opaque file descriptors into memory objects on linux. Currently this just holds onto the file descriptor rather than calling vkAllocateMemory immediately. The latter will be easier once we have support for suballocation (anglebug.com/2162). Bug: angleproject:3289 Change-Id: Ia80ce07b2a9ec95b9063feb9bfeb24ffe77fa40e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552028 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Sunny Sachanandani b8a8ffd3 2019-04-11T21:09:37 Add support for RGB10A2 in eglCreatePbufferFromClientBuffer Bug: chromium:937108 Change-Id: I689562ebff9f9f85ecb8af918bbb788b16b0f91b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565420 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Michael Spang e0da9cef 2019-04-16T14:34:51 Pack handle type enum for glImportMemoryFd & glImportSemaphoreFd Bug: angleproject:3289 Change-Id: Ic20b1d55641494b46622e1e28d93e2ca30655ea6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1566143 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Sascha Kolodzey 50eb1e6f 2019-04-16T12:18:35 D3D: Update dynamic BufferUsage flags. Changed the mapping between gl::BufferUsage flags and D3DBufferUsage flags. Only gl::BufferUsage::DynamicDraw gets mapped to D3DBufferUsage::DYNAMIC now. This reflects a better mapping between GL and D3D. BUG=angleproject:3366 Change-Id: I5062f91fdb3664339e2c259b399d5f47401675d6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1569465 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Mingyu Hu 7d64c486 2019-03-12T14:27:40 GL_ANGLE_multiview has been renamed to GL_OVR_multiview2. changes include: 1) GL_OVR_multiview to GL_OVR_multiview2 extension directive change 2) Removal of all references to side by side. We no longer support multiple views in a single 2DTexture. Only 2DTextureArray's are supported 3) WebGL 2 (ES3) is required for multiview Bug: angleproject:3341 Change-Id: Ie0c1d21d7610f8feebdb2e4d01c6947f57e69328 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552023 Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Qin Jiajia e7da32f1 2018-12-27T15:31:47 Fix the failure in UpdateImageTextureInUse If we update the texture data between two dispatch calls, ReadPixels can't get right result after the second dispatch call. The failure reason is that after the first dispatch, ReadPixels will sync framebufer state which will update color render target. Finally, TextureD3D::ensureRenderTarget is reached. However, we are in compute pipeline. mTexStorage->isRenderTarget() will be false. That results the current texture will create a new render target storage. But the UAV is still bound with the previous texture storage. If there is no texture dirty bit between these two dispatch calls, applyTexturesForCompute won't be called. After the second dispatch, readPixels will read data from the new texture storage which is not updated. Bug: angleproject:3015 Change-Id: Ib2494ab8bf6e12faefc0a7370719d383526c36ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1390710 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Jonah Ryan-Davis 5646a7cc 2019-04-12T16:42:56 Uniform buffers not dirtied for gl_VertexID workaround on D3D11. Related to: https://chromium-review.googlesource.com/c/angle/angle/+/1520988 The program uniform buffers were dirtied for this edge case, but it should have been the driver uniform buffers. This CL fixes this and adds a tests case which catches this. Bug: 945903 Change-Id: I6142771e200513ed0251fc97cec68d371d39ec1a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565059 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shrek Shao <shrekshao@google.com>
Jamie Madill 2664da8b 2019-04-08T16:26:52 Correct texImage uses of texture type -> target. Similarly to how the subImage calls were corrected. glTexImage and the family of related functions apply to a single texture target. This means we need a different TexImage call for each cube face. This is distinct from TexStorage calls which take a Cube map directly. Note this is mostly a refactoring change. But it does increase code consistency and should allow for more efficient code reuse. Bug: angleproject:3356 Change-Id: I252f8983cdda3a8f0223c44cbbe8d8e2dd319a88 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558673 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Tim Van Patten 065f8dc3 2019-04-11T12:56:00 Vulkan: Set appropriate GL conformant bit for returned configs The Khronos conformance tests only test configs that have the conformant bit set. ANGLE is currently targetting OpenGL ES 2.0 conformance, so this change is setting the EGL_OPENGL_ES2_BIT bit to indicate this. ES 2.0 conformance reporting is being restricted by ANGLE_VULKAN_CONFORMANT_CONFIGS_ONLY for official builds, but ES 3.0 conformance will be reported for builds without ANGLE_VULKAN_CONFORMANT_CONFIGS_ONLY enabled. Bug: angleproject:3374 Test: CQ Dry Run Change-Id: Ie31f63c3ea3b7bddfceec80ebc28f079ffd363df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1564717 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Courtney Goeltzenleuchter 8f0210f7 2019-04-10T10:44:10 Always enable NPOT for Vulkan backend Vulkan natively supports non power-of-two textures so indicate that support for front-end. Bug: angle-project:3239 Test: angle_deqp_gles2_tests --gtest_filter=dEQP.GLES2/functional_texture_completeness_2d_npot_t_repeat --use-angle=vulkan Change-Id: Id9058b6e9afd1d43e5d74612f808ce39beafd35f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1561963 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 4877ef35 2019-04-12T10:36:00 Ensure deleteTexture preserves correct texture cache. Also adds a test contributed by jgilbert@mozilla.com. Bug: angleproject:3375 Change-Id: Ibd52daa074bf53b2b213193ccf5a612705a89c67 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565052 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0e30681d 2019-04-10T15:09:53 Vulkan: Add design docs on line segment raster. The docs are based on an internal google document available at go/vangle-line-rasterization. The link won't work for non-Googlers. Also cleans up the format of the markdown file somewhat. Bug: angleproject:3344 Change-Id: Ic466c44099e25f12b9afc4565bbd0fe37097af9f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1561969 Reviewed-by: Kenneth Russell <kbr@chromium.org>
Jamie Madill df5ae9f6 2019-04-11T14:49:23 Vulkan: Write design doc explaining SPIR-V generation. The two-pass approach first uses ANGLE's shader translator followed by glslang. The doc explains it in more detail with links. Bug: angleproject:3345 Change-Id: I04fd31993e3cd62ac409f2696e18f7ec39e5c6ce Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1560252 Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill cfc73cc1 2019-04-08T16:26:51 Correct subImage uses of texture type -> target. Texture "types" are the same as texture "targets" except for cube maps. Cube map targets specify a single face. Cube map types specify a whole cube map. The subImage functions should take a target instead of a type. We were using both in different places. This CL corrects all uses in subImage calls to "target". It also adds a helper for getting a target texture from a target. And clarifies the naming of the texture query methods. Bug: angleproject:3356 Change-Id: I06eb5c5666eec9b8934becf2ba57a066d5cdabde Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558672 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 2249d4a7 2019-04-05T16:48:55 Vulkan: remove clear depth ability from clearWithDraw This partially reverts the following change: 60ec8f576 Vulkan: break dependency to the depthClamp feature The feature is no longer necessary, and simplifies the usage of utility shaders. Bug: angleproject:2361 Change-Id: I1e87ac8d2517c5a3b50e3d0cddd55c852e0e3e7d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1555313 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>
Shahbaz Youssefi 127990f9 2019-04-04T13:52:04 Vulkan: Use render pass loadOp for scissored clears At this point, every clear is done through render pass loadOp, except masked color or stencil clears. The only fallback is clearWithDraw, that can clear both color and stencil at the same time. Bug: angleproject:2361 Change-Id: I805fc12475e832ad2f573f665cdfeb766e61a6d0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553740 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>
Michael Spang a0b00e97 2019-04-09T18:45:22 Vulkan: Expose GL_EXT_memory_object_fd & GL_EXT_semaphore_fd If the vulkan driver has support for VK_KHR_external_memory_fd or VK_KHR_external_semaphore_fd, add the GL versions of these to the vulkan renderer's extensions. Bug: angleproject:3289 Change-Id: I7f04b5cf883f93f6ccd579c2b75d6831b854bfd0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552027 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten f39b4f02 2019-04-09T12:04:51 Vulkan Android: Remove workaround to clamp the point size This is to remove the workaround introduced by anglebug.com/2599 since Nexus 5x devices aren't in the farm anymore and the tests pass on Pixel devices. Bug: angleproject:2599 Test: angle_deqp_gles2_tests Test: angle_end2end_tests Change-Id: I14f724494909486a2164ddd734a95b6980429f29 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1559202 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Michael Spang d3c57452 2019-04-09T15:37:10 Fix leak of MemoryObjectManager from context state Bug: chromium:951049 Change-Id: I4e9e2cfe3c287fcb6e536ec20c20acbfda1d8405 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1559203 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org>
Jamie Madill e4458b7b 2019-04-08T16:26:50 Fix glCopyTexSubImage3D. Two bugs were present in our implementation. We were using the y offset for z in ensureSubImageInitialized. And for our D3D back-end we were potentially reading from the wrong image index. Bug: chromium:947342 Change-Id: If39671a911e08fcc641b9ba6f5910e3a2c16eb5d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558671 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Shahbaz Youssefi a254fa28 2019-04-09T14:25:59 Rename getCurrentDisplay to getDisplay There is always only one display that can be associated with a context, so get*Current*Display is confusing. Bug: None Change-Id: Iff3a9fc5ad1154b046bb30d7f46a468802ba7fcc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558958 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi af0301a8 2019-04-09T10:43:04 Vulkan: fix CPU throttling frames to 2 Previously, the CPU was throttled to be at most N frames ahead, N being the number of swapchain images. N is now fixed to 2, regardless of the number of swapchain images. If N < 2, we would be stalling the CPU unnecessarily, and if N > 2, the CPU could get too far ahead. Effectively, here is how the throttling plays out with this commit: Submit (Fence 1) + Present Submit (Fence 2) + Present Wait Fence 1 Submit (Fence 3) + Present Wait Fence 2 Submit (Fence 4) + Present Wait Fence 3 Submit (Fence 5) + Present Wait Fence 4 ... Bug: angleproject:2942 Change-Id: I3b8c3bb88e52d62231306ec84aad50d2bf472d8c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558681 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 3702d8c9 2019-04-08T13:44:06 Propogate dirty bit signals from TextureImpl to Texture up to Context. If TextureImpl sets a local dirty bit and signals gl::Texture of it, the dirtyness is not propogated to context. This can result in draw calls with textures that are not synchronized BUG=949985 Change-Id: I9baf82c96598265a6a4850f1fd48e213b5e98ab5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1556699 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Shahbaz Youssefi fc15ae55 2019-04-08T23:32:32 Vulkan: parallelize internal shader compilation As glslang is rolling frequently now, internal shaders frequently require recompilation. This change parallelizes shader compilation to speed up this process. Bug: angleproject:3333 Change-Id: Icace083559bff73dfb9b5fe7cc2c59ce8137a2dc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558680 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 82418c82 2019-04-05T15:56:03 Add support for updating glslang_validator binary from Linux. Updates the glslang_validator binary for Linux in the same commit. Bug: angleproject:3333 Change-Id: Ide42781ec4951e7c09307a0a3b96c36c6ea29d23 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553828 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 65d10f3b 2019-03-21T16:30:31 Vulkan: Implement robust resource initialization If a texture or renderbuffer needs to be cleared for robust access or due to having emulated channels, it is immediately cleared. The former relies on a front-end feature that optimizes robust access clears only to levels and layers that are not fully initialized through data upload. Bug: angleproject:2722 Change-Id: Icdab856eb4ffe963f78569b6d80d9ff5cb27ff9b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1535056 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
shrekshao 8413faba 2019-04-04T17:13:18 Fix formsRenderingFeedbackLoopWith check To make it pass the following webgl conformance test https://github.com/KhronosGroup/WebGL/blob/master/sdk/tests/conformance/rendering/rendering-sampling-feedback-loop.html It used to fail due to 1. Didn't check if texture unit is sampler complete 2. Only checked active drawbuffers. But drawbuffer settings shouldn't be taken into account when checking drawing feedback loop. On top of applying these 2 functional fixes, I also tried to do some optimization by unwrapping the nested for loop for program sampler bindings and texture unit in `Program::samplesFromTexture` and putting them outside of the draw buffer loop according to the old comment by Antonie @piman. https://codereview.chromium.org/2461973002/ > ... turning it around (for each texture check if it's also an attachment, instead of for each attachment check if it's a bound texture). In particular, we have an upper bound on the number of attachments, so we can look them up outside the loop into a fixed size buffer on the stack - and the very common case will be to only have 1 of them making the inner loop cheap. But this unwraps sort of breaks the code structure. An alternative way would be passed in a framebuffer pointer into `Program::samplesFromTexture` but that would ends up in tight class coupling. I am a bit unsure here. Would like to hear if think this change is okay in terms of code style. In addition to further speed up this check (as it runs for every draw validation) I added a cache mLastColorAttachmentId indicating the last i of GL_COLORATTACHMENTi that is not GL_NONE to shorten this inner loop. In most scenario we won't have up to max number of color attachments. A side note: this is still failing https://github.com/KhronosGroup/WebGL/blob/master/sdk/tests/conformance2/rendering/depth-stencil-feedback-loop.html But it's because the test case doesn't fit the spec at this moment. I will update this test later. Bug: chromium:660844 Change-Id: I6d718dada71a5d989caac04de03f2454f2377612 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553963 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shrek Shao <shrekshao@google.com>
Shahbaz Youssefi edef895a 2019-04-04T10:03:09 Vulkan: make sure clear value is completely initialized If clearing only depth or stencil, the other channels contained garbage. Additionally, this removes the clearing of emulated channels. Emulated textures are cleared once, and they don't need to be recleared. Bug: angleproject:2361 Change-Id: I01aa6be116d44f6c0115a1c25322db2e579a7b23 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553739 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill d5ff4fad 2019-04-08T09:25:23 Add standalone glslang_validator as a download hook. This change allows us to download a copy of the standalone glslang validator during gclient runhooks. This decouples run_code_generation from the version of glslang stored in source tree. This prevents the error where a developer would run into a code generation conflict due to a change in version of glslang. Currently only the Windows version is stored in the tree. A follow-up CL will add Linux. The validator will only initially support Windows or Linux. Documentation for the script is located in tools/glslang/README.md. This CL also updates the Vulkan shader generation script to use the new binary for Windows. Bug: angleproject:3333 Change-Id: Ia6146a283a2bcfdf84c42411d6b5d8bae136bf1b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553823 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 5d50678e 2019-04-06T15:04:03 Roll glslang forward 1240db678cae..e06c7e9a515b Manual roll to unblock the autoroller stuck on presubmit failure. Bug: None Change-Id: I97094add66a42154309addea43fe6aa5e1411c43 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1556694 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c7565353 2019-04-03T14:03:56 Vulkan: break dependency to the depthClamp feature Image clear's masked clear path using a draw call was using this feature to clear the depth buffer, but this feature is not available on ARM and some Qualcomm devices. This change adds a push constant to the vertex shader used in this call to export the depth clear value, removing the need to rely on depth clamping. Bug: angleproject:3241 Change-Id: I565cd5f731c441820e0702e51dfdf02d0bc7de06 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1551522 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>
Shahbaz Youssefi f6c937f8 2019-04-02T17:04:08 Vulkan: fix masked stencil clear Previously, masked stencil clear was done by clearing every stencil bit to the ClearValue & Mask. The correct behavior as implemented in this change is to clear only the bits that are set in Mask. This can only be done through a draw call, with ClearValue as the stencil reference, and Mask as the stencil write mask. Note: this change relies on the depthClamp Vulkan feature which is not available on ARM. Bug: angleproject:3241 Change-Id: I0a181c32f881ee813f144e7bdd6f42c8ea6f1966 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1548442 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>
Tobin Ehlis 194a9674 2019-04-05T09:20:46 Vulkan:Return HW's SUBPIXEL_BITS Plumb the physical HW's subPixelPrecisionBits limit to be returned in the query for GL_SUBPIXEL_BITS. Default value remains 4 for all other backends. Bug: angleproject:3351 Change-Id: I5564e5090e7211b8daeaa91ea30eceb23c5ea227 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553967 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Tobin Ehlis <tobine@google.com>
Tim Van Patten 5f388c24 2019-03-14T09:54:23 Vulkan: dEQP-EGL.functional.image.modify.* Determine the destination internalFormat correctly. dEQP-EGL.functional.image.modify.renderbuffer_rgb565_tex_subimage_rgb8 dEQP-EGL.functional.image.modify.renderbuffer_rgba4_tex_subimage_rgba8 dEQP-EGL.functional.image.modify.tex_rgb565_tex_subimage_rgb8 dEQP-EGL.functional.image.modify.tex_rgba4_tex_subimage_rgba8 dEQP-EGL.functional.image.modify.tex_rgba8_tex_subimage_rgba5_a1 dEQP-EGL.functional.image.modify.tex_rgba8_tex_subimage_rgba4 dEQP-EGL.functional.image.modify.tex_rgba5_a1_tex_subimage_rgba8 dEQP-EGL.functional.image.modify.tex_rgba5_a1_tex_subimage_rgba4 dEQP-EGL.functional.image.modify.tex_rgba4_tex_subimage_rgba8 dEQP-EGL.functional.image.modify.tex_rgba4_tex_subimage_rgba5_a1 dEQP-EGL.functional.image.modify.renderbuffer_rgba4_tex_subimage_rgba8 dEQP-EGL.functional.image.modify.renderbuffer_rgba4_tex_subimage_rgba5_a1 dEQP-EGL.functional.image.modify.renderbuffer_rgb5_a1_tex_subimage_rgba8 dEQP-EGL.functional.image.modify.renderbuffer_rgb5_a1_tex_subimage_rgba4 Bug: angleproject:3170 Change-Id: Ic9870390b2d4a0dcbe561efd3fb1597faadb7d79 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1524404 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Michael Spang 9de3ddb5 2019-04-03T16:23:40 Generate entrypoints for GL_EXT_memory_object_fd & GL_EXT_semaphore_fd This adds entrypoints for the Linux variants of GL_EXT_memory_object & GL_EXT_semaphore. Bug: angleproject:3289 Change-Id: I40de40f27aa82cd9479d5913dac0a7493919bb8f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552026 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Michael Spang fb201c5e 2019-04-03T14:57:35 Implement resource management for GL_EXT_memory_object This implements glCreateMemoryObjectsEXT, glDeleteMemoryObjectsEXT, and glIsMemoryObjectEXT. It's not possible to do anything useful with them yet. Bug: angleproject:3289 Change-Id: I8882b657e9de564b5f97f8dea87838f67b1928f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552025 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>