src/libANGLE/renderer/vulkan/RenderbufferVk.cpp


Log

Author Commit Date CI Message
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>
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>
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>
Shahbaz Youssefi 2660b503 2019-03-21T12:08:40 Vulkan: Restore CommandBuffer to namespace vk Moved vk::CommandBuffer and vk::SecondaryCommandBuffer to vk::priv:: and aliased vk::CommandBuffer to one or the other. This allows the rest of the classes to continue seeing vk::CommandBuffer as they used to do. Used a special alias for the primary command buffer that gets submitted (vk::PrimaryCommandBuffer). Bug: angleproject:3136 Change-Id: I61236fd182230991db7395d05e3da3be5e3f45be Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1534456 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Tobin Ehlis 134425c7 2019-03-15T17:02:17 Vulkan:Integrate SecondaryCommandBuffers Integrate the custom SecondaryCommandBuffer type into the CommandGraph nodes by adding new ANGLE_USE_CUSTOM_VULKAN_CMD_BUFFERS define that can be set in the BUILD gn args with angle_enable_custom_vulkan_cmd_buffers set to "true." Initially the custom cmd buffers are disabled by default. This adds some support functions to SecondaryCommandBuffer to make the integration easier by matching the wrapped cmd buffer interface: initialize(), end(), valid(). Bug: angleproject:3136 Change-Id: Ib910554583192550757bb8ce89914e3ea8737988 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1526556 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 009696c5 2019-01-31T14:47:07 Vulkan: Support EGL_ANDROID_image_native_buffer on Android. BUG=angleproject:2668 BUG=angleproject:3121 Change-Id: I0dfb2ec0737ebd963b0fadb78cf720a90874f00b Reviewed-on: https://chromium-review.googlesource.com/c/1452264 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang eca36cb5 2019-01-18T14:03:52 Vulkan: Support EGL images sourced from cube maps. Store an image array offset and source texture type in ImageVk to select the correct cube face from the source texture. BUG=angleproject:2668 Change-Id: I03ad25feccb769c906dd28fb573ec342e7816863 Reviewed-on: https://chromium-review.googlesource.com/c/1422542 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 4a298703 2019-01-18T10:49:36 Vulkan: Support creating EGL images from non-zero mipmaps of textures. Store a mip offset in TextureVK to apply to all operations on the ImageHelper. There is no need to store the mip offset in RenderbufferVk because it creates the resource with the mip offset on the call to setStorageEGLImageTarget. Store a mipmap level in the RenderTargetVk object so that clear operations will target the correct mipmap of the image. BUG=angleproject:2668 Change-Id: Ie976e3dd3a8de8135a7fbb8c84bd51eec0dddce8 Reviewed-on: https://chromium-review.googlesource.com/c/1422059 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang fe59f6b5 2019-01-16T09:34:30 Vulkan: Implement EGL Images for 2D and Renderbuffer sources. No support for non-zero mipmaps as sources yet. Suppress dEQP tests due to apparent driver bugs with scissored clears on depth or stencil attachments. BUG=angleproject:2668 Change-Id: Idaa5e70ce9b0c91232fbb989cbf4de1b9134aafb Reviewed-on: https://chromium-review.googlesource.com/c/1415010 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang f3e823db 2019-01-14T12:40:34 Vulkan: Store ImageHelper as a pointer in TextureVk and RenderbufferVk Storing ImageHelper as a pointer allows the storage to be swapped or shared with other objects. BUG=angleproject:2668 Change-Id: I2e51f24737be59ffe9f472e9b0b592774a792cd1 Reviewed-on: https://chromium-review.googlesource.com/c/1409404 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 08f8fa66 2019-01-10T14:25:47 Vulkan: Merge the PixelBuffer logic into ImageHelper. To support EGL images efficiently, the pixel buffer needs to be tightly coupled with the image it will upload data to allowing textures to upload data to EGL images sourced from renderbuffers. The data will be uploaded to the image in the correct order if it comes from multiple sources and the check for pending uploads does not need to traverse EGL image siblings. BUG=angleproject:2668 Change-Id: Iebf59ed1e358ddc76843b8bcfac39b0363f66a3f Reviewed-on: https://chromium-review.googlesource.com/c/1405710 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b5ba549a 2019-01-02T15:19:22 Vulkan: Shader path for texture copy when image is not initialized This change implements staging image/texture copies when the destination image is not yet fully initialized. With this change, CPU readback for glCopyTex[Sub]Image2D and glCopy[Sub]TextureCHROMIUM should happen only if the texture formats don't allow a fragment-shader based copy. Bug: angleproject:2958 Change-Id: I04087e14ea8fb6fbc731598c5493e44651c22c01 Reviewed-on: https://chromium-review.googlesource.com/c/1393909 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 29b49417 2019-01-07T14:03:06 Make copy texture test more extensive By doing the copy multiple times, we exercise both paths where the destination is already initialized and when it's not. This adds tests for all combinations of formats and flags. Bug: angleproject:2958 Change-Id: I56afb44496acd1b4d5a8527f4dbee29afbac9c81 Reviewed-on: https://chromium-review.googlesource.com/c/1398643 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi f83a28a6 2018-12-09T03:48:34 Vulkan: Shader path for framebuffer-to-texture copy Part 1 in a series of changes to perform image copies on the GPU. Bug: angleproject:2958 Change-Id: I6264a880865c4738c0866f2dc71af63425fc4118 Reviewed-on: https://chromium-review.googlesource.com/c/1370724 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7c985f5c 2018-11-29T18:16:17 Make angle::Result an enum. This moves away from a class type to a value type. This should improve performance when using angle::Result as a return value. Previously the generated code would return a pointer instead of a value. Improves performance in the most targeted microbenchmark by 10%. In more realistic scanarios it will have a smaller improvement. Also simplifies the class implementation and usage. Includes some unrelated code generation changes. Bug: angleproject:2491 Change-Id: Ifcf86870bf1c00a2f73c39ea6e4f05ca705050aa Reviewed-on: https://chromium-review.googlesource.com/c/1356139 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi d856ca48 2018-10-31T16:55:12 Vulkan: add clear test for emulated stencil or depth formats S8_UINT and D24_UNORM_X8_UINT are the only formats currently that are single-aspect and are possibly emulated with a packed depth-stencil format if it's not supported. A flag to FeaturesVk has been added as a way to force this behavior for the sake of testing. This test is added to ensure the correct clear algorithm is used for this case. Additionally, this case is detected and the other aspect is forcefully cleared to 0 whenever the original aspect is cleared. Bug: angleproject:2815 Change-Id: Ief3039d66bbf46468213b9e3224f7cc7541c3a2e Reviewed-on: https://chromium-review.googlesource.com/c/1312453 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 3d86e89b 2018-11-02T16:29:44 Vulkan: properly handle 0-width or 0-height framebuffers The test for whether 0-width or 0-height is not given was doing width != 0 || height != 0 which mistakenly used || instead of &&. Bug: angleproject:2910 Change-Id: Iaa41edffcfe1f8553e8fbefb9bc3b12a7f33a5a6 Reviewed-on: https://chromium-review.googlesource.com/c/1316028 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill c2328a15 2018-10-18T15:00:29 Use angle::Result in front-end (Part 4) Handles the gl::Renderbuffer class and its implementation. Bug: angleproject:2491 Change-Id: I3ef718b492dc39ba640c8f68ed80b536f89ff378 Reviewed-on: https://chromium-review.googlesource.com/c/1283309 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6f755b21 2018-10-09T12:48:54 Use angle::Result in front-end. (Part 1) This covers most of the hot paths used in draw calls. Gives in the order of a 5% reduction in draw call overhead. Bug: angleproject:2491 Change-Id: I2d53afb1163eaceed61fb9cd9ce6c1267c85c0fa Reviewed-on: https://chromium-review.googlesource.com/c/1258149 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2d03ff4a 2018-09-27T15:04:26 Vulkan: Make Buffer/Image be CommandGraphResources. Don't make TextureVk/RenderbufferVk/SurfaceVk/BufferVk own the manipulation of the command graph. Instead put the operations close to the buffers and images used to render. This will lead towards implementing implicit barriers on the command graph resources. Bug: angleproject:2828 Change-Id: I07b742b6792c60285b280d6454f90e963d667e0e Reviewed-on: https://chromium-review.googlesource.com/1246983 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e2d2270a 2018-09-19T08:11:48 Vulkan: Merge append/beginWriteResource. The new API is named 'recordCommands'. These two APIs were basically doing the same thing. We don't need to have an understanding of creating a new graph node to know that we want to record some Vulkan commands to a command buffer. The prior design was actually masking a bug where we would allow appending commands to a command graph node that had already started a render pass. Fix this by adding a render pass check to recordCommands. Also removes 'hasStartedWriteResource' since this method wasn't used anywhere. Also renames 'onResourceChanged' to 'finishCurrentCommands'. Bug: angleproject:2828 Change-Id: I00bd5b893fcfc37172b6c1706cb2f5fc57e79f54 Reviewed-on: https://chromium-review.googlesource.com/1235654 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 55e57f96 2018-09-18T11:32:43 Remove some redundant dirty bits notifications. These were already being signaled in the front end. Bug: angleproject:2763 Change-Id: Id78d3d764e80e687c29c08395b59048d314bfbe2 Reviewed-on: https://chromium-review.googlesource.com/1204490 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3f3b358f 2018-09-14T10:38:44 Vulkan: Fix cube map attachment clears and readpixels. These were both missing the correct layer offset. Cache the layer inside the RenderTargetVk for easy access. Bug: angleproject:2470 Change-Id: I690dbf0702d7ec52f44ba0a9429b6ef0e51baf6b Reviewed-on: https://chromium-review.googlesource.com/1225910 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 21061026 2018-07-12T23:56:30 Vulkan: Use angle::Result error handling. Introduces a vk::Context class to contain an error handler and Renderer pointer. This abtracts the common code path for ContextVk + DisplayVk. Removes vk::Error in favor of the POD angle::Result class. There are a few remaining usages of gl::Error that will have to be cleaned up when we can change the front-end APIs. Bug: angleproject:2713 Change-Id: I5e68f223d595c6c561b59d6a85759e5738ed43c6 Reviewed-on: https://chromium-review.googlesource.com/1128924 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Geoff Lang 9e14164d 2018-06-27T11:43:18 VK: Support pbuffer surfaces. TEST=PbufferTest TEST=dEQP-EGL.functional.color_clears.single_context.gles2.rgba8888_pbuffer TEST=dEQP-EGL.functional.color_clears.multi_context.gles2.rgba8888_pbuffer TEST=dEQP-EGL.functional.render.single_context.gles2.rgba8888_pbuffer TEST=dEQP-EGL.functional.render.multi_context.gles2.rgba8888_pbuffer BUG=angleproject:2622 Change-Id: I99f64689c274fbb565b365f4a05b52252528fc38 Reviewed-on: https://chromium-review.googlesource.com/1117030 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c57ee259 2018-05-30T19:53:48 Vulkan: Clean up object releasing APIs. This cleans up the confusing releaseResource/releaseObject pair in the RendererVk class. It also makes getQueueSerial private in ResourceVk but keeps a public isResourceInUse API for external use. Bug: angleproject:2539 Change-Id: I6b4f24db16e36130a85ef03fc2c3b26d8d9e1fba Reviewed-on: https://chromium-review.googlesource.com/1069291 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Luc Ferron c20b950e 2018-05-24T09:30:17 Vulkan: Fix clear of specific mip level was clearing all mip levels Bug: angleproject:2502 Change-Id: Iffa012dce14584318c4dfd3d9b3a304291c9cebf Reviewed-on: https://chromium-review.googlesource.com/1070666 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill bcf467f2 2018-05-23T09:46:00 Vulkan: Encapsulate RenderTargetVk. This makes the members private and adds more functionality. This moves more responsibility out of vk::CommandGraphNode and also makes the RenderPass init in the CommandGraphNode class better encapsulated. Bug: angleproject:2539 Change-Id: Ia16f3f39cf011548c6473805b8b28e284808e856 Reviewed-on: https://chromium-review.googlesource.com/1040279 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Luc Ferron 66410530 2018-04-20T12:47:45 Vulkan: Textures mipmaps support Note that generate mipmaps is not yet supported, but uploading mipmaps is. This also enables 64 tests in dEQP gles2 to validate the changes. While trying to enable tests in functional.texture.mipmap.*, I found an issue where the graph ends up in an invalid state and triggers and assert in onReadResource in ContextVk.cpp:188. It seems like an unrelated bug to mip maps, I will investigate to enable these tests separately in a following CL. Bug: angleproject:2479 Change-Id: If51776d8ef3d994bee620d6a1cf982bb51838ff0 Reviewed-on: https://chromium-review.googlesource.com/1022232 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 20fa8d5c 2018-04-15T10:09:32 Vulkan: Implement cube map texture sampling. This changes the TextureVk class to have a queue of staging copies, instead of a single copy at a time. This will allow us to upload multiple sub regions of a texture image at once when we need to resolve the Image at sampling time. Enables the remainder of the texture.format tests, and all non-mipped tests in the texture.size tests. Also updates the expectations with the bug number for mipmap support. Bug: angleproject:2318 Change-Id: Ie55f8f2dc24d7b133ad735e37f0f78937f022b5b Reviewed-on: https://chromium-review.googlesource.com/980775 Reviewed-by: Luc Ferron <lucferron@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 858c1ccc 2018-03-31T14:19:13 Vulkan: Move image layout into helper. Now that we're using the helper everywhere, we can clean up the vk::Image class and move the layout tracking into ImageHelper. Bug: angleproject:2318 Change-Id: I9636835a2a3a76f181dac629bd4182bc5815cdee Reviewed-on: https://chromium-review.googlesource.com/980774 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Luc Ferron 364a9557 2018-03-29T09:44:51 Vulkan: Implement stencil test support All the fragment_ops.depth and the fragment_ops.depth tests in dEQP are now working, but not the fragment_ops.depth_stencil. Still debugging these separately and will come up with a fix for them in another commit. Bug: angleproject:2443 Change-Id: I84c3a22f612fb6dcf30598434f96c2100fd29f9c Reviewed-on: https://chromium-review.googlesource.com/993654 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill bc54342b 2018-03-30T10:43:19 Vulkan: Make RenderTargetVk use ImageHelper. Bug: angleproject:2318 Change-Id: I9bc4bb7f5bcd3029a31c8570809f253cf5e4b12a Reviewed-on: https://chromium-review.googlesource.com/980773 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 93edca16 2018-03-30T10:43:18 Vulkan: Add an Image helper class. This class wraps a lot of the common functionality of a vk::Image. It keeps an associated DeviceMemory and ImageView. Eventually we can probably merge this class with RenderTargetVk. We can also use it to implement the same functionality between Renderbuffer and Texture and abstract different storage types, like 2D and Cube. Bug: angleproject:2318 Change-Id: I39239f47b483cfb96290a15b06edd264f7f4bb34 Reviewed-on: https://chromium-review.googlesource.com/980772 Reviewed-by: Frank Henigman <fjhenigman@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 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>
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>
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 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>
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>
Jamie Madill 05b35b21 2017-10-03T09:01:44 D3D11: Lazy robust resource init. This patch moves the robust resource init logic to the GL front-end. Instead of initializing texture resources immediately on creation in D3D11, it defers the clear until before a draw call in some cases, or skips the update if we can determine if a texture (or other resource) has been fully initialized. Currently lazy init is only implemented for Textures, Renderbuffers, and Surfaces. Various places where lazy resource init is triggered: * Framebuffer operations (Draw, Blit, CopyTexImage, Clear, ReadPixels) * Texture operations (SubImage, GenerateMipmap, CopyTexImage) Some efficiency gains remain to be implemented, such as when a SubImage call fills the entire object. Similarly for Blit, and a few other operations. In these cases we can skip lazy init as an optimization. Edge cases with EGLImage are mostly untested. BUG=angleproject:2107 Change-Id: I2bf3a69b1eae0d4feeb5b17daca23451f1037be8 Reviewed-on: https://chromium-review.googlesource.com/576058 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill ea84f6ff 2017-09-20T13:20:30 Pass Context to Framebuffer11 dirty callback. This allows us to call StateManager11::invalidateRenderTarget from the Framebuffer11::signal function, which will then trigger state refresh on the next draw call. This requires passing Context through a few more Renderbuffer methods, and reorganizing the RenderTarget signalling so that it doesn't signal dirty in the destructor. Instead they are signaled as they are destroyed in the containing classes. BUG=angleproject:2151 Change-Id: I4cf575e4a01b48275ff78d75bc55b2d1fced591d Reviewed-on: https://chromium-review.googlesource.com/673139 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 4928b7ca 2017-06-20T12:57:39 Proliferate gl::Context everywhere. This gives the D3D back-end access to the GL state almost anywhere. This uses the onDestroy hook for Textures to push errors up from destructors, although they still don't quite make it to the Context. There are places, such as in EGL object (Context/Surface) destruction, where we end up calling through to GL implementation internals without having access to a gl::Context. We handle this via a proxy Context to a Display, basically a null context, that has access to impl-side state like the Renderer pointer if necessary. It does not have access to the normal GL state. Also Pass gl::Context to RefCountObject::release(). Since we're using destroy() methods now, we should not ever call the destructor directly. BUG=angleproject:1156 Change-Id: Ie4c32ad6bf6caaff0289901f30b5c6bafa2ce259 Reviewed-on: https://chromium-review.googlesource.com/529707 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuly Novikov c4d18aac 2017-03-09T18:45:02 Use ErrorStream everywhere Eliminates one more usage of FormatString and its static initializer. Add more ErrorStream types and replace gl::Error and egl::Error with them. BUG=angleproject:1644 Change-Id: Ib498d0ae4b81a332ec71aed7cf709993b154e6bb Reviewed-on: https://chromium-review.googlesource.com/505429 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4fd95d54 2017-04-05T11:22:18 Stop using FramebufferAttachment::Target. Target includes the binding (DEPTH/STENCIL/COLOR), which is not useful for many operations. Simplify this to just passing the mip/layer. This allows us to stop using this internal struct in other classes. BUG=angleproject:1635 Change-Id: Ic5a11781bf45fe7835437fa1e363c190b876d453 Reviewed-on: https://chromium-review.googlesource.com/469152 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9e54b5af 2016-05-25T12:57:39 Add Vulkan stubs. Currently enabled for Windows by default. BUG=angleproject:1319 Change-Id: I87921c579bee466465fb1e3f629bb3a40fdff659 Reviewed-on: https://chromium-review.googlesource.com/328730 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>