src/libANGLE/renderer/vulkan


Log

Author Commit Date CI Message
Luc Ferron e6a40d07 2018-03-22T10:30:57 Vulkan: Depth / stencil attachments bug fixes I found a couple of bugs trying to enable polygon offset render states. This is just pre-work to get to a better state. Bug:angleproject:2353 Change-Id: If6af949a09af1340e870afb627ae427d01c6e77c Reviewed-on: https://chromium-review.googlesource.com/975631 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Luc Ferron 49cef9a5 2018-03-21T17:28:53 Vulkan: Support of A8 textures Bug:angleproject:2358 Change-Id: I56a86de7cc21dee00a95f1d054d2940262797ca7 Reviewed-on: https://chromium-review.googlesource.com/974305 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Olli Etuaho 107c7247 2018-03-20T15:45:35 ShaderVariable: separate fields for staticUse and active Thus far the compiler has used the "staticUse" flag to mark variables that should have rather been marked "active", meaning that the code may actually execute in a way that accesses the variable. There's a clear definition for this use of the term "active" in the GLES 3.0.5 spec, section 2.12.6, and in GLES 3.1 section 7.3.1. Having separate fields for recording static use and "activeness" of a variable is the first step to fixing this. According to the spec, usually only active resources should be considered when checking use against max limits. Also, only active uniforms get assigned a location. libANGLE code now correctly checks the active flag rather than the static use flag in these cases. The static use field still mirrors the active field for now, since some code in Chromium also needs to be fixed to use the active field correctly before the two can diverge. After Chromium is fixed, we can fix ANGLE so that static use information is recorded earlier during compilation and will accurately reflect whether variables are statically used. Currently the compiler only records variables once some static use may already have been pruned from the AST. BUG=angleproject:2262 TEST=angle_unittests, angle_end2end_tests Change-Id: I025bb71361246ae00c911a1f8b66ec045f665f29 Reviewed-on: https://chromium-review.googlesource.com/970962 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Luc Ferron 60284223 2018-03-20T16:01:44 Vulkan: Support of npot textures The bug was with the readPixels not using the rowPitch, and not really with the support of npot. Bug:angleproject:2413 Change-Id: I09c0d87768bc29d3beb452ae83996cd4d2b4a600 Reviewed-on: https://chromium-review.googlesource.com/971830 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Luc Ferron daedf4d2 2018-03-16T09:28:53 Vulkan: Add a DynamicDescriptorPool class. In order to manage the life of descriptor sets better and allow allocating descriptor sets infinitely. Bug:angleproject:2392 Change-Id: Ia3c7145d85d697c04e8008e8d8839c428dd2e864 Reviewed-on: https://chromium-review.googlesource.com/966786 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Luc Ferron e3dc5dd0 2018-03-16T07:37:21 Vulkan: Add 2 features to StreamingBuffer This is prerequisite work to dynamic uniform buffer updates. 1- Alignment parameter to be able to allocate by chunks of this alignment. 2- Out boolean to indicate if a new VkBuffer has been assigned on the allocate operation. Bug:angleproject:2392 Change-Id: If346e13200455febbe78045e908ae89c9dc93cdb Reviewed-on: https://chromium-review.googlesource.com/965612 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Luc Ferron 41918387 2018-03-13T11:37:54 Vulkan: Additional texture formats support. RGB565, RGBA4444, RGBA5551 Bug:angleproject:2358 Change-Id: I4dc19f9e4cc7b51f215b57d440a108cdf17aec24 Reviewed-on: https://chromium-review.googlesource.com/960573 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 5eaddbd0 2018-03-14T16:16:03 Vulkan: Flag uniforms as dirty when they are updated. Currently changing uniform values will not always be seen. Bug: angleproject:2392 Bug: angleproject:2403 Change-Id: Ie315a64ad6094f2c23e48e901de2e03e4d98516a Reviewed-on: https://chromium-review.googlesource.com/963296 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org>
Luc Ferron 5b64aca8 2018-03-14T14:55:58 Vulkan: Support of float uniform matrixes (2,3,4). Bug:angleproject:2392 Change-Id: I97efea83e604d19b1745d9db4ab8f02997a1b7fc Reviewed-on: https://chromium-review.googlesource.com/962666 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Luc Ferron 7cec3353 2018-03-13T13:29:34 Vulkan: Get/SetUniform for float / int and vec* Bug:angleproject:2392 Change-Id: I2110ecde653a85a28b515dc9d8473a1b37a73eb6 Reviewed-on: https://chromium-review.googlesource.com/962718 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Jamie Madill 0cec82a5 2018-03-14T09:21:07 Vulkan: Implement basic depth/stencil buffers. This implements basic depth/stencil states and clearing. This also implements "fallback" texture formats in the texture generation. Fallback formats are those that are chosen at runtime for replacements for main formats which lack driver support. They are different from override formats, which are always used because we assume there is no driver support. The Vulkan spec only asserts that one of the two of D32 or D24 has mandatory support. In the case of AMD, D24 is not supported fully, and we need the fallback format support emulation. Bug: angleproject:2357 Change-Id: Ic86cede3c69ff9893a06b3a55c3b5d2d897fa55f Reviewed-on: https://chromium-review.googlesource.com/916701 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 690c8eb7 2018-03-12T15:20:03 Framebuffer: syncState before internal format query. Since querying the internal format of an attachment might need ot look at the RenderTarget for some back-ends, or otherwise flush attachment changes, we should call syncState internally. This means that we can't mark these queries as const. Bug: angleproject:2372 Change-Id: I9bfb43a472bcd7dfdd6ea7fab4751d494e1126bb Reviewed-on: https://chromium-review.googlesource.com/948784 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Luc Ferron 64e5ed2a 2018-03-09T16:32:32 Vulkan: Fix scissor clears + enable dEQP tests Vulkan does not support receiving out of bounds numbers for the scissor region but no validation errors are sent. This change clips the region received to fit the current viewport and it fixes many dEQP tests. Bug:angleproject:2356 Change-Id: I5dcf739366ba1f62b56593eaaccedf5f14d0c200 Reviewed-on: https://chromium-review.googlesource.com/957758 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Jamie Madill b7d924a8 2018-03-10T11:16:54 Vulkan: Make free part of DescriptorPool. This also fixes a missed VkResult error. In order to do this we also return an error from ProgramImpl::destroy. Bug: angleproject:2396 Change-Id: I649b19e64732785bb33eebadea7f361245137d0f Reviewed-on: https://chromium-review.googlesource.com/958406 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7b5fc46b 2018-03-09T15:54:33 Vulkan: Add Vk format overrides table. This generalizes the overriding mechanism in gen_Vk_format_table.py. Instead of defining overrides inline, we keep the vk_format_map as a 1:1 mapping from angle format to vk format, and use the overrides map to specify any additional emulation or features we need to support OpenGL textures on Vulkan. This will simplify the implementation for Depth/Stencil formats by making the generator script a bit easier to work with. No code changes, generator script refactor only. Bug: angleproject:2357 Change-Id: I7132d991795eb91d6ad838481c52545c891215bc Reviewed-on: https://chromium-review.googlesource.com/957433 Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 67ae6c58 2018-03-09T11:49:01 Vulkan: Use free descriptor set bits in pool. This forces us to free descriptor sets when we're done with them, but saves us from needing to track when a descriptor set pool is no longer in use. We may need to revisit this in the future if we want to support pool allocation for performance. Bug: angleproject:2396 Change-Id: I3f3184f3dd9e4c2911e1aade4dcb95962a26c3a7 Reviewed-on: https://chromium-review.googlesource.com/956574 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Luc Ferron 1505c750 2018-03-09T11:28:23 Vulkan: Fix issue in blending factor conversions The blend factor were not converted correctly from GL enum types to their VK equivalents. I found this by running many dEQP tests related to blending. Bug:angleproject:2346 Change-Id: I3c332bb5e5c44d2bec4ff9d62e0df2421507e136 Reviewed-on: https://chromium-review.googlesource.com/956241 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Luc Ferron 33140409 2018-03-08T13:57:52 Vulkan: Fix readPixels to support sub image reads correctly Also, do not return InvalidOperation from flush in order to be able to support running dEQP tests for Vulkan. Bug:angleproject:2346 Change-Id: I12f3bd115034e044fb0fa2d94687321ede4a1e9d Reviewed-on: https://chromium-review.googlesource.com/955889 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Luc Ferron 80964f97 2018-03-08T10:31:24 Vulkan: Support of GL_UNSIGNED_BYTE type in drawElements Bug:angleproject:1683 Change-Id: I8c79cc92406b210c9d143761ffe4ef74e14c6bed Reviewed-on: https://chromium-review.googlesource.com/956090 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 19fa1c6f 2018-03-08T09:47:21 Return an Error from Framebuffer::syncState. This pipes errors up from the Impl to the top level. There are still a few places were error swallowing is needed, because the Framebuffer API doesn't support returning an error. Bug: angleproject:2372 Change-Id: Idc06bda1817fd28075940f69874d8b6ba69194f9 Reviewed-on: https://chromium-review.googlesource.com/954290 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org>
Jamie Madill 66546be2 2018-03-08T09:47:20 Vulkan: Use RenderTargetCache in FramebufferVk. The RenderTargetCache avoids many multiple calls to getRenderTarget, and should speed up the code somewhat on state changes. Also as a side benefit removes a bunch of swallowed ANGLE errors. Bug: angleproject:2372 Change-Id: I072481856aae8607f17a116e25c71acf04b4cc68 Reviewed-on: https://chromium-review.googlesource.com/948785 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Luc Ferron 5242d5bf 2018-02-15T07:14:35 Vulkan: Implement scissored clears. Bug: angleproject:2356 Change-Id: I33888f9b4ebaf4b0b5af4ad59b12ad963325a790 Reviewed-on: https://chromium-review.googlesource.com/921882 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Luc Ferron 5164b797 2018-03-06T09:10:12 Vulkan: Support GL_LUMINANCE and GL_LUMINANCE_ALPHA The dEQP tests cannot be turned on before immediate data for drawElements is supported. Bug:angleproject:2364 Change-Id: Id5fd6fbc0c74f2dba08341f36ca0091d540f4ed8 Reviewed-on: https://chromium-review.googlesource.com/951402 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Jamie Madill ed8b4919 2018-03-07T20:34:03 Vulkan: Fix missing depth/stencil access flags. This regressed in http://crrev.com/c/948782. It may have also exposed a problem where our bots are not correctly using the layers. Bug: angleproject:2361 Change-Id: I764bb821b5bfd2571a4c43f9444dcef67ea65bc4 Reviewed-on: https://chromium-review.googlesource.com/954412 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e4c5a23b 2018-03-02T21:00:31 Vulkan: Always use LOAD for RenderPass attachments. The RenderPass load/store ops allow us to specify how we want to use the data from the attachments. Previously we had the load op set to CLEAR always, which would prevent us from doing multiple kinds of operation. Using LOAD should conversatively work in any situation as long as we can ensure each Image is cleared before we use it. To this effect this patch also inserts a preliminary clear into each Texture or Renderbuffer Image's initialization. We already had this for Surfaces. In the future we'll improve this by inserting proper load/store ops, but this unblocks a lot more functionality in the interim. Bug: angleproject:2361 Change-Id: I7610eaa39d81b23dd74b4a24b7f28a66a6dfffc6 Reviewed-on: https://chromium-review.googlesource.com/948782 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Frank Henigman a53d0e18 2018-02-13T00:06:06 Vulkan: support indices in client memory. glDrawElements will now work with indices and/or vertex data in client memory, as well as in a buffer object. Enable corresponding tests. BUG=angleproject:1683 Change-Id: Iefb9796a48b21ed6f9a837b08b0ad3218ff6dd6b Reviewed-on: https://chromium-review.googlesource.com/915721 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Frank Henigman 6dd4a92a 2018-03-02T16:35:13 Vulkan: track attributes in client memory. To support indexed draws it's useful to have a cheap query for the presence of vertex attribute data in client memory. This patch adds a bit mask to keep track of such attributes. It also lets us simplify VertexArrayVk::streamVertexData() slightly. BUG=angleproject:1683 Change-Id: I871bfb885112650b025e110c383db3c391eafb90 Reviewed-on: https://chromium-review.googlesource.com/947927 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 99d492c2 2018-02-27T15:17:10 Use packed enums for the texture types and targets, part 2 This completes the refactor by using the packed enums in the gl:: layer and in the backends. The packed enum code generation is modified to support explicitly assigning values to the packed enums so that the TextureTarget cube map faces are in the correct order and easy to iterate over. BUG=angleproject:2169 Change-Id: I5903235e684ccf382e92a8a1e10c5c85b4b16a04 Reviewed-on: https://chromium-review.googlesource.com/939994 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Luc Ferron 879f90d2 2018-03-01T11:45:20 Vulkan: Avoid recopying the data every time we draw line loops Use the Observer pattern to get notified when the BufferVk we've copied our data from is changing. We will only recopy the data if anything has changed, but otherwise we'll keep drawing with the same index buffer we've created previously. Bug: angleproject:2335 Change-Id: Ib65677b4d5ec90c46a5e3b975fffd1fddeed59e7 Reviewed-on: https://chromium-review.googlesource.com/948622 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 7b21381e 2018-03-06T10:13:13 Vulkan: Support changing in-flight Renderbuffers. Bug: angleproject:2347 Change-Id: I9bb1494a960969bb6e7c8656c27c7c180ddba069 Reviewed-on: https://chromium-review.googlesource.com/922458 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill dc0cdba8 2018-02-28T00:42:20 Vulkan: Fix Texture attachment state changes. This implements a notification to the Framebuffer that an attachment had a state change that might require recreating the VkFramebuffer. This implementation is much simpler than the prior method with signal notifications. Only currently implemented for TextureVk but will also be implemented for RenderbufferVk. Bug: angleproject:2347 Change-Id: I05f7da4132f6ed2bda02671e8ba5ee9805252928 Reviewed-on: https://chromium-review.googlesource.com/930024 Reviewed-by: Luc Ferron <lucferron@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Luc Ferron 78e39b3f 2018-02-26T07:42:44 Vulkan: Line loops for indexed draw calls Bug: angleproject:2335 Change-Id: Iabd6ae8181c6d3fb487f953a6fbf699db568a1c9 Reviewed-on: https://chromium-review.googlesource.com/941261 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Frank Henigman a8e868f2 2018-01-28T23:32:25 Vulkan: use correct vertex stride. It was passing the attribute size, not the stride, so it worked only when they were the same. Enable corresponding tests. BUG=angleproject:2310 Change-Id: Ie3ab13567c16c302aa9aeda5d059e5fd4eb92b4e Reviewed-on: https://chromium-review.googlesource.com/875304 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Luc Ferron 360098d5 2018-02-21T07:33:50 Vulkan: Implement GL_LINE_LOOP support for non-indexed draw calls Line loops aren't supported in Vulkan directly, so we use line strips with an indexed buffer to emulate them. To hide the complexity of that, I've created the LineLoopHandler class in vk_utils. Bug: angleproject:2335 Change-Id: Id3e020d27e5265565e61e96d3fd0187c4fe2b152 Reviewed-on: https://chromium-review.googlesource.com/931421 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 06a87ec8 2018-02-25T22:07:27 Vulkan: Fix offsets in BufferVk::setDataImpl. We were using a src offset instead of a dest offset. The staging buffer should always start at the zero offset, while the dest buffer (the real buffer) should use the offset argument to Buffer*Data. Bug: angleproject:2374 Change-Id: I9ee702709d9c15945935f4eae25f308b71e0d1e8 Reviewed-on: https://chromium-review.googlesource.com/937022 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Frank Henigman df4b6316 2018-01-18T18:22:19 Vulkan: Add unmap in BufferVk::getIndexRange. There was a map() without a corresponding unmap(). Add a test which does multiple indexed draws, triggering the problem. BUG=angleproject:2310 Change-Id: Id33d66f24de2005ec3f9958d33ab4c2630b49dc5 Reviewed-on: https://chromium-review.googlesource.com/875318 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 1f46bc12 2018-02-20T16:09:43 Vulkan: Add CommandGraph class. This also renames CommandBufferNode to CommandGraphNode. It also renames some of the intenal members to more closely represent the tree relationships (parents/children). This should clean up the command graph classes and make them a bit easier to understand. Bug: angleproject:2361 Change-Id: I024bffcc7f4157c78072ef902a3c40a07a08b18a Reviewed-on: https://chromium-review.googlesource.com/922121 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e703c606 2018-02-20T10:21:48 Add gl::RenderbufferState shared state helper. This shared state will be read-only visible in the RenderbufferImpl class. It mirrors existing structs for Textures, Buffers, and other classes. It allows the implementation class to have a read-only view as to the current GL state of an object. This will be useful to the Vulkan back-end, which would like to know the current Renderbuffer state before having to redefine the storage. If the current parameters match, it might not have to redefine the storage at all. The solution involves passing around the gl::RenderbufferState through various factory methods. Also name the Renderbuffer implementation pointer consistently and make it use std::unique_ptr. Bug: angleproject:2347 Change-Id: Ied6e0358e24e74a7fedbe4aea692edee909b5838 Reviewed-on: https://chromium-review.googlesource.com/922457 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 0cbfa586 2018-02-15T14:45:41 Vulkan: Implement basic Renderbuffer attachments. Creating an ImageView for color Renderbuffers allows us to render to them in a RenderPass. We will also need additional functionality to support depth/stencil Renderbuffers. Bug: angleproject:2347 Change-Id: I5d4f7d8242ad4fbca38cb08c0cf6b43edca57c8f Reviewed-on: https://chromium-review.googlesource.com/922456 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Frank Henigman 17448956 2017-01-05T15:48:26 Vulkan: vertex attributes in client memory. Support vertex data stored in client memory passed to glVertexAttribPointer. Only GL_FLOAT data is supported at this time. Includes a simple test. BUG=angleproject:1683 Change-Id: I3bc0cdefe02b02c046b0e85822019a0f1762235e Reviewed-on: https://chromium-review.googlesource.com/425137 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f618c9e5 2018-02-15T14:45:40 Vulkan: Add depth/stencil surfaces. This change lets us create egl::Surfaces from a D24S8 config. This is a bit hacky, because the spec only mandates 24 -or- 32 bit depth support, but not both or either individually. Will need follow-up work for proper EGL config setup. A single depth buffer is allocated for the entire set of swapchain images and is used with each. This also might be a problem if we're rendering to multiple frames at the same time. We'll likely have to revisit this in the future as well. This adds a new RenderTargetVk to the SurfaceVk class which points to the Depth/Stencil image. Since ImageViews must refer to either the depth or stencil, but not both, we'll need to address this when we get to implementing depth/stencil texture reads in shaders. Bug: angleproject:2357 Change-Id: Ibed0eed7e1d0efb272758dbfc79fa2c5aa93997f Reviewed-on: https://chromium-review.googlesource.com/919761 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill f4d693c0 2018-02-14T16:38:16 Vulkan: Cache clear color in ContextVk. This makes the current clear color a bit more accessible than using the current GL state clear color directly. It is stored in the Context using the Vulkan clear color struct. This also cleans up the attachment clear values in FramebufferVk and paves the way for depth/stencil clear when support for depth/stencil exists. Bug: angleproject:2357 Change-Id: I0553e4447249325115625a44e9f4b1623c7cb0bc Reviewed-on: https://chromium-review.googlesource.com/919550 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 57fbfd80 2018-02-14T12:45:34 Vulkan: Pass RendererVk to Allocate helpers. Passing the Renderer pointer instead of the Context pointer makes these methods a bit easier to work with from the "EGL" sections of the code. This is a refactoring-only change to aid the Depth/Stencil implementation. Bug: angleproject:2357 Change-Id: Icbcc72a1daff4edd947a21672744498781cfc064 Reviewed-on: https://chromium-review.googlesource.com/919523 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 12eb3d74 2018-02-14T12:34:45 Vulkan: Implement basic Renderbuffer creation. Bug: angleproject:2347 Change-Id: I56edfde2dbc020d5c792cc4f107aa4b9d6b71840 Reviewed-on: https://chromium-review.googlesource.com/905895 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Luc Ferron 0aa1ffe3 2018-02-08T13:42:36 Vulkan: Autogen mandatory texture caps * This commit includes a JS file to execute on the spec and generate the JSON output of all the mandatory texture caps. Bug: angleproject:2348 Change-Id: I57e969915bdd0e7104e00a73fd3743ff1ecf0a6d Reviewed-on: https://chromium-review.googlesource.com/911615 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Luc Ferron 2900c3be 2018-02-09T16:02:41 Vulkan: Add culling rasterization states tests and invert front face Bug: angleproject:2352 Change-Id: I0ac83f3173d22a2ee8bc98d2fd7bfa1875d46b8c Reviewed-on: https://chromium-review.googlesource.com/912358 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Luc Ferron d50537a7 2018-02-07T17:02:08 Vulkan: Texture caps map We are generating the caps map using various bits from the results of vkGetPhysicalDeviceFormatProperties. This contains all the information required to fill out "renderable", "texturable" and "filterable". Later we'll need to read from vkGetPhysicalDeviceImageFormatProperties as well to get the sampleCounts. The tests for now are not very meaningful since they use the same logic as the caps code to build the expected results, however as soon as we'll add the hard-coded list of mandatory texture caps, the test will be a good validator that we are not breaking anything. We only check the optimal set of flags since it is the most restrictive set. isTexturable = flags contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT isFilterable = flags contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT isRenderable = flags contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT OR VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT Bug: angleproject:2348 Change-Id: I9da0712190d2678d7e377d6fcd4ca83d23eefd38 Reviewed-on: https://chromium-review.googlesource.com/908712 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
jchen10 046fa0ef 2018-02-02T14:51:36 Vulkan: Prepend layer path to VK_LAYER_PATH Directly setting this variable overwrites old value, as might be unexpected. Instead the path can be prepended to it, so that old value can still work. This is needed in order to use additional debugging layers, like the "api_dump" layer. See https://github.com/LunarG/VulkanTools for more. BUG=angleproject:2333 Change-Id: I5338a5b928ffa792cc9b6db5b69713320b5b0842 Reviewed-on: https://chromium-review.googlesource.com/898591 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Luc Ferron f8be756e 2018-02-06T15:59:11 Vulkan: Implement blend states and add a simple test for it Bug: angleproject:2346 Change-Id: I462a2cb29ceda5563f48b4a3cc1d0aa20f4a49fc Reviewed-on: https://chromium-review.googlesource.com/907169 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0e65454d 2018-02-07T14:50:06 Vulkan: Fix circular dependency with resource updates. The old implementation would try to keep recording draw commands to the same framebuffer write operation even if the vertex array buffer data changed. This would lead to a broken dependency graph. Fix this by forcing any current render operations to create a new node in this case, giving a correct command graph. Old design: - render (creates a CommandBufferNode A) - update buffer (creates a CommandBufferNode B which happens after A) - render (to CommandBuffer A, and gives a circular dependency with B) New design - render (CommandBufferNode A) - update buffer (CommandBufferNode B, happens after A) - render (CommandBufferNode C, happens after B) This also renames some methods to try to clarify them. Bug: angleproject:2350 Change-Id: I6559bed4ed3f58f68771662422c5bef6a505282b Reviewed-on: https://chromium-review.googlesource.com/907416 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Luc Ferron 00155d58 2018-02-06T10:48:47 Vulkan: Implement scissor test and add a simple test for it Bug: angleproject:2338 Change-Id: I699189fcd41feca1656c8553fdf4c1078421524d Reviewed-on: https://chromium-review.googlesource.com/904861 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 57dd97aa 2018-02-06T17:10:49 Vulkan: Add helper for allocating image memory. Also refactors some memory index searching code that was duplicated. This will lead the way to having more code reuse for our Renderbuffers implementation in Vulkan, and for other types of Texture. Bug: angleproject:2347 Change-Id: I49cbd77328c01f945d66f92e6ec4ba7c552abeff Reviewed-on: https://chromium-review.googlesource.com/904684 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Luc Ferron ceb7190b 2018-02-05T15:18:47 Vulkan: Fix bug in reuse of vertex input bindings Fix bug that used previously used vertex bindings. Now we use the current program mask to only initialize the vulkan pipeline with the active vertex input bindings. + adjust dEQP expectations Bug: angleproject:2334 Change-Id: Ie6176eee99f87dc7a95f664d28e8312b9cb274bc Reviewed-on: https://chromium-review.googlesource.com/902434 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Yuly Novikov 9a608c0e 2018-02-02T16:21:01 Vulkan: request coherent memory for StagingImage Otherwise vkInvalidateMappedMemoryRanges is needed, if allocated memory is not coherent, which was happening on Nexus 5X and was caught by validation layers. BUG=angleproject:2314 TEST=all angle_end2end_tests pass on Nexus 5X Change-Id: I008aae45b99c6ca87029ff1614913fae32f66ec3 Reviewed-on: https://chromium-review.googlesource.com/900203 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill df9ad2be 2018-02-02T12:40:01 Vulkan: Minor refactor to RendererVk::initialize. Bug: angleproject:2314 Change-Id: Ic3fa5f8ff5a0933e22b9fd5803b7ab3fbbfd449f Reviewed-on: https://chromium-review.googlesource.com/899686 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Luc Ferron f70e0237 2018-01-29T10:32:47 Vulkan: Finish implementing caps limitations for ES 2.0 support Bug: angleproject:1577 Change-Id: Id22af039109b175f60f11cea1d6b8b2308c5cfff Reviewed-on: https://chromium-review.googlesource.com/891420 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
jchen10 191a84a8 2018-01-31T16:09:45 Fix VK_NOT_READY for vkAcquireNextImageKHR The error was not handled, as is the cause for the bug. So far we'd better wait until a valid image index is ready. BUG=angleproject:2301 Change-Id: I49a5545d0f2e0cf6cfbb3f604ab0602f8a131d12 Reviewed-on: https://chromium-review.googlesource.com/895402 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov 199f4294 2018-01-19T19:04:05 Vulkan: Enable on Android Add Android DisplayVk and WindowSurfaceVk variants. Build Vulkan backend and validation layers on Android if toolchain uses required NDK API level. Fix validation layers discovery to work on Android. BUG=angleproject:2314 TEST=angle_end2end_tests builds and runs on Nexus 5X, 12 VULKAN tests pass Change-Id: Iac2ec4ecd6470a7552f9f60c023ba1760aa090c5 Reviewed-on: https://chromium-review.googlesource.com/887797 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang bd6ae4aa 2018-01-29T15:51:18 Vulkan: Don't create zero-sized textures. Make sure the old resources are deleted but do not create new resources. BUG=angleproject:2161 Change-Id: Ia6685e5c67b160d9bcd503983aee9607b2bd402c Reviewed-on: https://chromium-review.googlesource.com/891644 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill efb5a5c8 2018-01-29T15:56:59 Vulkan: Fix swaps done right after a clear. We were missing a dependency insertion between the Framebuffer and its attachments, only during clear operations. Also renames a few methods to make them more consistent. Bug: angleproject:2264 Change-Id: Ic3af5b34b6de900ea2cc1b765f8d3d69f7f9a131 Reviewed-on: https://chromium-review.googlesource.com/891985 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5dd4ad89 2018-01-29T13:53:43 Vulkan: Add a perf test for the Pipeline cache. This micro-benchmark can be used to measure the performance impact of changing the Pipeline cache. For instance, we can check if changing the size of the hash key affects performance significantly. Also updates the build files so angle_perftests can see vulkan.h, and makes the Vulkan headers an explicit source set. This test currently shows that a lot of time is spent in PMurmurHash, with some time also spent in memcmp. Bug: angleproject:2163 Change-Id: Ie8bb3e31d58590f373d28cbbb59f7e372b80cc29 Reviewed-on: https://chromium-review.googlesource.com/884882 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Luc Ferron e4741fd0 2018-01-25T13:25:27 Vulkan: Begin implementing caps mappings Bug: angleproject:1577 Change-Id: Ibed36dee9120e9182362bc9858cf513f798079cf Reviewed-on: https://chromium-review.googlesource.com/887225 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill ffa4cbb6 2018-01-23T13:04:07 Vulkan: Implement the Pipeline cache. This currently keeps a cache of every PSO compiled and does not trim the cache or evict old members on memory pressure. This will be done as a follow-up. Improves the speed of the Draw Call microbenchmark 50x when using a single state change. Bug: angleproject:2163 Change-Id: I2cceb38ca57ae639f36a944f4571b627481b92da Reviewed-on: https://chromium-review.googlesource.com/876954 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 2e551f6b 2018-01-24T21:45:34 Vulkan: Fix DebugReportCallback definition Fixes 32bit Android build BUG=angleproject:2314 Change-Id: I55e8fc8ee3ffa6397e6612ccf43c67e4a7a9dc75 Reviewed-on: https://chromium-review.googlesource.com/885504 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov 12da5e75 2018-01-23T18:34:53 Vulkan: use supported composite alpha Try VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR first, if not supported, try VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR. Fail if it is not supported either. BUG=angleproject:2314 Change-Id: I875a60f7b51b9880da2d2916d602a6e7e8ca479f Reviewed-on: https://chromium-review.googlesource.com/882320 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 01b21b19 2018-01-23T15:46:28 Vulkan: get render target format from config Instead of hardcoded GL_BGRA8_EXT. Also change renderTargetFormat to GL_BGRA8_EXT in DisplayVk::generateConfigs() BUG=angleproject:2314 Change-Id: I47471add4e681fd0b8101d475c4a33ab59920c5c Reviewed-on: https://chromium-review.googlesource.com/881952 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 112a3a8e 2018-01-23T13:04:06 Vulkan: De-couple Program from VertexArrayVk dirtyiness. The VertexArrayVk is responsible for filling out the packed shader input info in ANGLE's packed PipelineDesc info structure. This packed info structure is used for Pipeline init and caching lookup. The prior design had this info depend on the active inputs in the current Program. This was undesirable because then, on a Program change, the ContextVk would have to call into the VertexArrayVk to invalidate this info. Instead, keep a working copy of the VertexArrayVk bits and only update the bits corresponding to dirty vertex attributes. This simplifies the cached state management a little bit for ContextVk. This also means we don't have to update the cached copy in the VertexArray on a change in VertexArray binding. Bug: angleproject:2163 Change-Id: I5ba74535367aed74957d17bdc61f882508562d0e Reviewed-on: https://chromium-review.googlesource.com/881703 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Yuly Novikov 37968133 2018-01-23T18:19:29 Vulkan: limit max texture bindings by physical device limits Already limited by IMPLEMENTATION_MAX_ACTIVE_TEXTURES, but Nexus 5X doesn't support that many. BUG=angleproject:2314 Change-Id: I43b530ba25e9cf7055e74525f479fb10cc7394a2 Reviewed-on: https://chromium-review.googlesource.com/882443 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho d66e1939 2018-01-17T11:36:24 Allow creating EGL pbuffers from typeless D3D textures A new extension EGL_ANGLE_d3d_typeless_texture_client_buffer is added that allows creating EGL pbuffers from typeless D3D textures. The extension increases the flexibility of the API compared to plain EGL_ANGLE_D3D_texture_client_buffer. The colorspace for the created EGL pbuffer can be set by using the EGL_GL_COLORSPACE attribute. Internally this sets the ANGLE format of the buffer. There are new ANGLE formats that are used specifically for typeless textures, separate ones for SRGB and linear views into the D3D textures. The extension is only supported on the D3D11 backend of ANGLE. BUG=angleproject:2300 TEST=angle_white_box_tests Change-Id: I6a6cb873d2cc0dca0b7f18a0f2cd35e7bafcb7d8 Reviewed-on: https://chromium-review.googlesource.com/873917 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 3c424b48 2018-01-19T12:35:09 Vulkan: Add vk_cache_utils.h. This file contains the Pipeline and RenderPass cache utils. Also renames renderervk_utils.h to vk_utils.h and the format utils file. Refactoring change only. Bug: angleproject:2163 Change-Id: I5113a9a2c6f0b0960d38e6c2d8e391fa2d9f5f6a Reviewed-on: https://chromium-review.googlesource.com/876505 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Frank Henigman f661686c 2018-01-15T23:49:14 Fix gyp/gcc build. Gcc complains about an unused variable. Adjust a #include to work with the gyp build. BUG=none Change-Id: Ia94abf70f3a9bb7952eb53d1f0a3cfcca5df0836 Reviewed-on: https://chromium-review.googlesource.com/867655 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Geoff Lang e1aa9219 2018-01-08T17:53:05 Create a new DeviceImpl each time one is requested from a DisplayImpl. This makes sure that the Device to DeviceImpl ratio is always 1:1 and avoids any potential double-deletion or unexpected deletion of DeviceImpl objects. BUG=742034 Change-Id: I778068ccd09b7478d3683123456062b94be242a1 Reviewed-on: https://chromium-review.googlesource.com/854627 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang 540a1dfe 2018-01-08T17:22:55 Refactor DeviceImpl creation. Add an initialize function to match other impl objects and simplify the creation of DeviceImpls. BUG=742034 Change-Id: I569c8252d5d23c8af98835f6c08e7a3b640fc3f3 Reviewed-on: https://chromium-review.googlesource.com/854626 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 28334a41 2018-01-08T17:05:11 Remove the externallyForced method of DeviceImpl. It can be inferred from the presence of an owning display. BUG=742034 Change-Id: I6a33378f4256733da6d9658d47763153e431ad70 Reviewed-on: https://chromium-review.googlesource.com/854625 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill f2f6d379 2018-01-10T21:37:23 Vulkan: Add PipelineDesc. The PipelineDesc class is a 512-byte packed description of the entire Vulkan pipeline state. It uses the alignas keyword and some static asserts to verify that the structures are packed. This ensures that when ANGLE uses MurmurHash to hash the entire struct, and memcmp to check for identity, that there are no garbage padding bits. This CL does not implement the Pipeline cache, but it will help, since now we have a packed type that can be used as the key to a hash map. Bug: angleproject:2163 Change-Id: I16efa927f08d30d89a9c4c8943edd211c6878ac8 Reviewed-on: https://chromium-review.googlesource.com/829893 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 97f39b3c 2018-01-05T13:14:29 Vulkan: Add missing command queue reset to flush. This was causing a heavy performance regression in the Vulkan perf test. Local testing shows it recovers most of the performance gap with this fix. Bug: angleproject:2264 Bug: chromium:799372 Change-Id: Ia2bbf526b305e1b2e901d904574dbe5618e6e5ef Reviewed-on: https://chromium-review.googlesource.com/852365 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 47c8ea3f 2018-01-03T18:27:59 Vulkan: Fix looped clears. These were broken by command re-ordering. The first problem was that the Framebuffer RenderNode was not correctly being flagged as dirty. This is fixed by keeping a serial instead of a bool to track the RenderNode's cleanliness. The second issue was that an image layout transition was being set with incorrect bits. Fix this by using the correct access mask. This fixes angle_perftests's Vulkan render test. Bug: angleproject:2264 Bug: chromium:798866 Change-Id: I268b0f7aeb2c5e22892f6ef59dec62391b30bfb4 Reviewed-on: https://chromium-review.googlesource.com/848539 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8c3988c5 2017-12-21T14:44:56 Vulkan: Use one pipeline layout for all Programs. This simplifies the pipeline state object caching. We will not need to use any extra bits to cache based on program properties - instead all programs will be compatible. The pipeline layout strucutre is described in the design docs. It currently only has two bind groups: the first for default uniforms, and the second for Textures. In the future we might re-organize this to handle driver uniforms, dynamic push constants, and/or program uniform buffers with ES 3.0. Instead of storing only the Textures that are required by a Program, we reserve space for the maximum possible Texture units. We might have to revisit this very simple design in the future to support texture arrays, which are handled specially in Vulkan. Bug: angleproject:2163 Change-Id: I3e1656c2c73045aed56838a5f1267b246a623362 Reviewed-on: https://chromium-review.googlesource.com/837943 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 49ac74bd 2017-12-21T14:42:33 Vulkan: Implement command re-ordering. This introduces a new CommandBufferNode class. Nodes are linked together to form a graph based on their dependencies. When the app triggers a readback or swap, the graph is flushed entirely. This sends the queued ANGLE Vulkan work to the Vulkan queue which is then processed on the GPU with the right dependencies. This design allows us to save on some unnecessary RenderPass creation and also allows us to know what load/store ops to use. It also allows us to take advantage of the Vulkan automatic RenderPass transitions for performance. Load/Store ops and automatic transitions will be implemented in later patches. Bug: angleproject:2264 Change-Id: I0e729c719e38254202c6fedcede4e63125eb4810 Reviewed-on: https://chromium-review.googlesource.com/780849 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8a57b468 2017-12-28T12:25:03 Re-land "Vulkan: Roll loader/validation layers SDK. (2/2)" Second re-land fixes git.bat access on developer machines. Re-landing with upstream fixes to the layers so they no longer need to copy the parameter validation errors to the current working directory of the layer generation. Also includes fixes for the GCC build. This hasn't been updated in a while, so there are many changes. It should also include better validation for memory barriers. Also includes updated builds for SPIRV Tools and glslang. A few pull requests need to land before landing this in ANGLE. This second step re-enables Vulkan and includes the updated build. Includes a workaround for parameter_validation.h no longer being auto-generated, and the stale file clobbering the build. Also includes a fix for an incorrect memory barrier. Bug: angleproject:2237 Change-Id: Ic1a3ad7458bb743d7279a1af9334693ab6cb59d6 Reviewed-on: https://chromium-review.googlesource.com/845859 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Zhenyao Mo 06f86377 2017-12-22T19:28:35 Revert "Re-land "Vulkan: Roll loader/validation layers SDK. (2/2)"" This reverts commit 755a9317ff1ec983f2704fc9f4619cac49992960. Reason for revert: Broke local win build. crbug.com/797253 Original change's description: > Re-land "Vulkan: Roll loader/validation layers SDK. (2/2)" > > Re-landing with upstream fixes to the layers so they no longer > need to copy the parameter validation errors to the current > working directory of the layer generation. Also includes fixes > for the GCC build. > > This hasn't been updated in a while, so there are many changes. > It should also include better validation for memory barriers. > > Also includes updated builds for SPIRV Tools and glslang. > A few pull requests need to land before landing this in ANGLE. > > This second step re-enables Vulkan and includes the updated build. > > Includes a workaround for parameter_validation.h no longer being > auto-generated, and the stale file clobbering the build. > > Also includes a fix for an incorrect memory barrier. > > Bug: angleproject:2237 > Change-Id: I1ed87ecfa84f51ee1edf6a8581d9b3c8f9a6f26e > Reviewed-on: https://chromium-review.googlesource.com/834429 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=fjhenigman@chromium.org,jmadill@chromium.org Change-Id: I605d72207d64c7d0853678595e255b74ad69d887 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2237 Reviewed-on: https://chromium-review.googlesource.com/842918 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Jamie Madill 755a9317 2017-12-21T14:34:05 Re-land "Vulkan: Roll loader/validation layers SDK. (2/2)" Re-landing with upstream fixes to the layers so they no longer need to copy the parameter validation errors to the current working directory of the layer generation. Also includes fixes for the GCC build. This hasn't been updated in a while, so there are many changes. It should also include better validation for memory barriers. Also includes updated builds for SPIRV Tools and glslang. A few pull requests need to land before landing this in ANGLE. This second step re-enables Vulkan and includes the updated build. Includes a workaround for parameter_validation.h no longer being auto-generated, and the stale file clobbering the build. Also includes a fix for an incorrect memory barrier. Bug: angleproject:2237 Change-Id: I1ed87ecfa84f51ee1edf6a8581d9b3c8f9a6f26e Reviewed-on: https://chromium-review.googlesource.com/834429 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Qin Jiajia 62fcf62a 2017-11-30T16:16:12 ES31: Add DispatchComputeIndirect suport for OpenGL backend BUG=angleproject:2270 TEST=dEQP-GLES31.functional.compute.indirect_dispatch.* Change-Id: Id062a80188b2a37f28833aaae8e6d31bac382276 Reviewed-on: https://chromium-review.googlesource.com/802763 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Xinghua Cao 89c422ad 2017-11-29T18:24:20 ES31: Support memoryBarrier and memoryBarrierRegion APIs BUG=angleproject:2280 TEST=dEQP-GLES31.functional.compute.basic.image_barrier_single dEQP-GLES31.functional.compute.basic.image_barrier_multiple dEQP-GLES31.functional.compute.basic.ssbo_cmd_barrier_single dEQP-GLES31.functional.compute.basic.ssbo_cmd_barrier_multiple dEQP-GLES31.functional.synchronization.* Change-Id: If14debab21247dc4b446e86d1642fbc9376b6dd7 Reviewed-on: https://chromium-review.googlesource.com/798803 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 647dca76 2017-12-15T21:31:00 Revert "Vulkan: Roll loader/validation layers SDK. (2/2)" This reverts commit f15f9cec318b5b0042cca7f819b1df9dbd1872ee. Reason for revert: Causing a compile failure on the Fuchsia config, due to a path difference. Will fix upstream and re-land, since it's breaking the auto-roller. https://chromium-review.googlesource.com/c/chromium/src/+/829878 FAILED: clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan/parameter_validation.cpp python ../../third_party/vulkan-validation-layers/src/scripts/lvl_genvk.py -o clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan -registry ../../third_party/vulkan-validation-layers/src/scripts/vk.xml parameter_validation.cpp -quiet Error: Could not find vk_validation_error_messages.h [906/1359] ACTION //third_party/angle/src/vulkan_support:vulkan_gen_object_tracker_cpp(//build/toolchain/linux:clang_x64) FAILED: clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan/object_tracker.cpp python ../../third_party/vulkan-validation-layers/src/scripts/lvl_genvk.py -o clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan -registry ../../third_party/vulkan-validation-layers/src/scripts/vk.xml object_tracker.cpp -quiet Error: Could not find vk_validation_error_messages.h Original change's description: > Vulkan: Roll loader/validation layers SDK. (2/2) > > This hasn't been updated in a while, so there are many changes. > It should also include better validation for memory barriers. > > Also includes updated builds for SPIRV Tools and glslang. > A few pull requests need to land before landing this in ANGLE. > > This second step re-enables Vulkan and includes the updated build. > > Includes a workaround for parameter_validation.h no longer being > auto-generated, and the stale file clobbering the build. > > Also includes a fix for an incorrect memory barrier. > > Bug: angleproject:2237 > Change-Id: Iae611764870281ed6aa7b187ec0c4e44226c722a > Reviewed-on: https://chromium-review.googlesource.com/759197 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Frank Henigman <fjhenigman@chromium.org> TBR=fjhenigman@chromium.org,jmadill@chromium.org,cwallez@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: angleproject:2237 Change-Id: I9bc60860668c1da773b6e2fdb83ecc20215e9125 Reviewed-on: https://chromium-review.googlesource.com/830926 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill f414121d 2017-12-12T15:08:07 D3D11: Fix program uniform buffer dity bits. There were actually three missing state synchronization points: 1. When re-binding a uniform buffer, we had no dirty bits. 2. When modifying the Program bindings, we also had no update. 3. When triggering a dependent state update via BufferData. This fixes all the missing syncs and adds tests for the cases. Bug: angleproject:1390 Change-Id: I2f05766545784248bcca8308ae34ac5720237ab1 Reviewed-on: https://chromium-review.googlesource.com/823150 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f15f9cec 2017-12-13T15:02:24 Vulkan: Roll loader/validation layers SDK. (2/2) This hasn't been updated in a while, so there are many changes. It should also include better validation for memory barriers. Also includes updated builds for SPIRV Tools and glslang. A few pull requests need to land before landing this in ANGLE. This second step re-enables Vulkan and includes the updated build. Includes a workaround for parameter_validation.h no longer being auto-generated, and the stale file clobbering the build. Also includes a fix for an incorrect memory barrier. Bug: angleproject:2237 Change-Id: Iae611764870281ed6aa7b187ec0c4e44226c722a Reviewed-on: https://chromium-review.googlesource.com/759197 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill bef918cb 2017-12-13T13:11:30 Vulkan: Add packed RenderPass descriptions. This change is two-fold: it splits the compatible parts from the RenderPass description, which allows for correct caching. It also will allow the pipeline state cache to cache the compatible RenderPass bits. In order to do this we introduce a packed version of the RenderPass description, which uses carefully aligned bit representations so we can hash the descriptions easily using MurmurHash, and compare them with memcmp. Bug: angleproject:2163 Change-Id: I4179c0ff8762df81f29082168bd6e3056ceb1318 Reviewed-on: https://chromium-review.googlesource.com/815816 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Qin Jiajia a98a2811 2017-11-30T18:12:06 ES31: Add support for GL_DISPATCH_INDIRECT_BUFFER_BINDING binding point BUG=angleproject:2270 TEST=dEQP-GLES31.functional.state_query.integer.dispatch_indirect_buffer_binding_* Change-Id: I2c286c219c5c849d7ba417069f53f2d0fae6abf1 Reviewed-on: https://chromium-review.googlesource.com/799990 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Xinghua Cao 10a4d434 2017-11-28T14:46:26 ES31: Enable some dirty bits and dirty objects for compute pipeline BUG=angleproject:2265 TEST=dEQP-GLES31.functional.shaders.builtin_var.compute.* angle_end2end_test.ShaderStorageBufferTest31 .MultiStorageBuffersForMultiPrograms Change-Id: Icc3df122602951a2328003c10a76696ab4c9f0d8 Reviewed-on: https://chromium-review.googlesource.com/792951 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jeff Gilbert 3dddccff 2017-11-14T16:44:36 Support RGB gl-tex-external stream consumers for StreamProducerNV12. This makes it relatively simple to sample from a D3D11Texture of arbitrary format. From: https://bugzilla.mozilla.org/show_bug.cgi?id=1322746 BUG=angleproject:2233 TEST=angle_end2end_tests Change-Id: I10cd3043b5cb0c5d36dd613467ba6c0ceadf41af Reviewed-on: https://chromium-review.googlesource.com/758042 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang ded7923b 2017-11-28T15:21:11 GL backend: Only synchronize transform feedback state when it changes. BUG=angleproject:2188 Change-Id: I5bfcc038c887dde0770564d103eb3cb234b248c9 Reviewed-on: https://chromium-review.googlesource.com/794100 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 3de2703d 2017-11-30T12:16:47 Fix handling matrix qualifiers on block members Individual block member row_major/column_major layout qualifiers may override the qualifiers set on the block. During parsing, this was already being handled correctly, so that the qualifier is resolved for each block member and recorded for each TField / InterfaceBlockField. Now we always write the qualifiers on a per-member granularity to the output GLSL shaders, so that the native driver gets the correct per-member qualifiers. This replaces earlier behavior where the matrix qualifiers were only written per-block. Also only use qualifiers from individual members in block layout. Since the block-level qualifier information is no longer used after parsing, it is no longer kept in the AST. A dummy value is still set to the InterfaceBlock structs exposed through the ShaderVars interface, since that has existing usage in Chromium that needs to be removed before the field can be removed. Some AMD OpenGL drivers don't seem to handle matrix layout qualifiers correctly, so most of the added tests need to be skipped for AMD GL. On NVIDIA and Intel the tests pass. BUG=angleproject:2271 TEST=angle_unittests, angle_end2end_tests, dEQP-GLES31.functional.program_interface_query.uniform.matrix* Change-Id: I1baa7a633bc2da548743c2190cb72db491b5227a Reviewed-on: https://chromium-review.googlesource.com/800174 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 5b18f487 2017-11-30T17:24:22 Vulkan: Implement basic TexSubImage2D. This also adds a test for updating a Texture that is in-use. This will ensure our Texture updates occur at the right time when we're implementing command re-ordering. Bug: angleproject:2264 Bug: angleproject:2200 Change-Id: Id6040d7238eca031e3cc7b27564d8ea815bf3d73 Reviewed-on: https://chromium-review.googlesource.com/801031 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill da854a27 2017-11-30T17:24:21 Vulkan: Clean up VAO cached resources. We can actually store a pointer to the base ResourceVk instead of BufferVk for updating serials. This will work a little nicer with streaming vertex data, which won't have a BufferVk but will have an accessible ResourceVk pointer. Also add an element array resource pointer for serial update. This was missing and could lead to incorrect behaviour. Also change the types of the caches from std::vector to gl::AttribArray, which is a std::array. Bug: angleproject:2264 Change-Id: Ibd79b7676b5dbc3875ae9d110be477d228e01c5c Reviewed-on: https://chromium-review.googlesource.com/798170 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 9f2a8613 2017-11-30T12:43:09 Vulkan: Implement a RenderPass cache. This cache replaces the RenderPass-per-Framebuffer approach. Although the concepts of a RenderPass are closely associated with rendering to a Framebuffer, there can be multiple RenderPasses used with a single FBO, especially considering the nature of Load and Store operations. This code will then lend itself to the implementation of the deferred RenderPasses, which are created on flush. These RenderPasses won't be owned by a Framebuffer. Bug: angleproject:2264 Change-Id: I4dce07c302118f7e05f5225e2a3b0569ad1e52bf Reviewed-on: https://chromium-review.googlesource.com/789534 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e218f15f 2017-11-30T12:38:50 Vulkan: Remove std::vector arg from beginRenderPass. We don't want to force the RenderPass code to use std::vector when we are working with static data. Change it to take a pointer. Bug: angleproject:2264 Change-Id: I07a077719fb9b4abc33a0cfcccc178d0544b7f06 Reviewed-on: https://chromium-review.googlesource.com/789535 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 0b684ce3 2017-11-23T12:57:39 Vulkan: Move RenderPass init into a helper function. Here it can be more easily accessed for command re-ordering, which will use a RenderPass cache instead of having RenderPasses be owned by the Framebuffer. Bug: angleproject:2264 Change-Id: I9b06cff43e536a526d44e7e0c04027bc450051cf Reviewed-on: https://chromium-review.googlesource.com/789533 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill afa02a2f 2017-11-23T12:57:38 ContextImpl: Make flush/finish take a gl::Context. This will more easily allow us to call gl::BindingPointer methods. The binding pointer will be used temporarily in the command graph. This is only temporary since we will likely not be using BindingPointer in the end result code, but it could be necessary for future work. Bug: angleproject:2264 Change-Id: I33cf40ec2a1e334c4abfdcff2ad20bbcda3c9d78 Reviewed-on: https://chromium-review.googlesource.com/789532 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 5d5253a3 2017-11-22T14:51:12 Clean up usage of EXT_debug_marker and KHR_debug in the backends. In RendererGL, the EXT_debug_marker functions were calling the KHR_debug entry points, now they fall back only when EXT_debug_marker is missing. Separated the ContextImpl methods for the two extensions. BUG=781164 Change-Id: I615b5965b705e55eb730ebefa6e27e0ee6d86c31 Reviewed-on: https://chromium-review.googlesource.com/786337 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>