src/libANGLE/FramebufferAttachment.h


Log

Author Commit Date CI Message
Jamie Madill f703443b 2019-09-21T14:10:35 Use Resource IDs in RefCountObject. This lets us use strongly typed IDs pretty much everywhere. Only one or two additional places still use GLuint IDs. Mostly for external queries and for Framebuffer Attachments. With some clever type reflection helpers lets us define a single template function for handling operator== and != for resource IDs. Refactor in preparation for more Capture/Replay work. Bug: angleproject:3611 Change-Id: I1c0c848e89eb8a4b769714d57686f816daf01634 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1815550 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>
Mingyu Hu 7e44ec26 2019-08-26T15:59:48 GL_EXT_multisampled_render_to_texture extension. Part 1. Adding new parameters for extension without adding any real code change. Since no new code paths were added, we expect all tests to pass as before. Bug: angleproject:980428 Change-Id: I551b46a66f422eabd357fd021e00cf266a991efb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1772377 Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Kenneth Russell cbdf8616 2019-07-09T20:30:45 Support blitFramebuffer to and from IOSurface-backed textures. Extend validation to allow texture rectangle-backed textures as blitFramebuffer sources and destinations. Add end-to-end test covering this functionality, and run the IOSurfaceClientBufferTests against both ES2 and ES3. Bug: angleproject:3669 Change-Id: I7b8815a2c98072c12de45717afbba9e9b29ba253 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1694483 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: 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>
Jamie Madill ab2bfa81 2019-01-15T19:06:47 Enable Chromium clang style plugin for libANGLE. This fixes a few style warnings: * auto should not deduce to raw pointer type * inlined virtual methods are not allowed * non-trivial constructors and destructors should be explicit * inlined non-trivial constructors should not be in-class * missing override keywords Bug: angleproject:3069 Change-Id: I3b3e55683691da3ebf6da06a5d3c729c71b6ee53 Reviewed-on: https://chromium-review.googlesource.com/c/1407640 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 66f0d2c1 2018-11-30T15:25:36 Make Framebuffer attachments angle::Subjects. Now that there's storage change notifications in the GL front-end we no longer need to give the back-end access to the angle::Subject. The Texture object is a special case where it has mirrored dirty bits. To keep the gl::Texture class notified of when the Impl has dirty bits we make the TextureImpl class an angle::Subject that is observed by the gl::Texture class. This will enable further dirty bits improvements. Bug: angleproject:2966 Change-Id: Id22da0926f51ff4679e58af3e62903f4d7948915 Reviewed-on: https://chromium-review.googlesource.com/c/1347670 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: 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>
Jamie Madill 31116738 2018-10-09T18:30:01 Inline many more hotspots for the Texture draw test. Bug: angleproject:2763 Change-Id: Ib8193e7ff5ee7763b92f4775fb7e9adaa51c9305 Reviewed-on: https://chromium-review.googlesource.com/c/1262738 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@google.com>
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 f668a4b5 2018-09-23T17:01:20 Skip Texture::syncState when no dirty bits. We sometimes generate local dirty bits in TextureGL. To make sure the local dirty bits don't get skipped we use a Subject/Observer pattern between the TextureGL and gl::Texture. This allows us to skip syncState in the hot path. Also inlines a couple of other texture functions. And fixes a stray header in EGLBlobCacheTest. Bug: angleproject:2763 Change-Id: Ie1d8a5865deaf2a563a358c31ae28bef6b2458b1 Reviewed-on: https://chromium-review.googlesource.com/1228374 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov 2eb54074 2018-08-22T16:41:26 Fix EGLImage pixel format validation This fixes the scenario when EGLImage source and target have different types. For example, a texture is created with unsigned format using glTexImage2D, it is used as a source of EGLImage with eglCreateImageKHR, and then the EGLImage is used to create a renderbuffer target with glEGLImageTargetRenderbufferStorageOES. OES_EGL_image doesn't specify what should happen in this case, but GL implementations (Nexus 5X) seem to allow using this renderbuffer in glFramebufferRenderbuffer and the resulting framebuffer is complete. Thus, in this case, instead of checking whether the renderbuffer format can be used in glFramebufferRenderbuffer, we need to check whether the original texture can be used in glFramebufferTexture2D. Similarly in reverse direction. Also, for the case of source renderbuffer and target texture, presume that glEGLImageTargetTexture2DOES will succeed regardless of renderbuffer format. 1. Add isRenderable and isTexturable checks to egl::Image class, and perform different checks depending on source type. 2. Add isRenderable check to FramebufferAttachment and delegate EGLImage attachments check to egl::Image. 3. Use these checks in validation of EGLImageTargetTexture2D, EGLImageTargetRenderbufferStorage and when checking attachment completeness Bug: angleproject:2567 Change-Id: I8e9f4a2930a4075a4d8464f62582c6825270187e Reviewed-on: https://chromium-review.googlesource.com/1192585 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiawei Shao a8802477 2018-05-28T11:17:47 ES31: Implement FramebufferTextureEXT on OpenGL back-ends This patch intends to implement FramebufferTextureEXT on OpenGL back-ends. 1. Support layered framebuffer attachments. 2. Add new framebuffer completeness rules on layered framebuffer attachments. 3. Support FRAMEBUFFER_ATTACHMENT_LAYERED_EXT as a valid <pname> parameter of GetFramebufferAttachmentParameteriv. Note that for an entire level of a cube map: 1. It has no TextureTarget because TEXTURE_CUBE is not a valid target for TexImage*D. 2. It corresponds to 6 ImageDescs (that represents its faces) in class Texture, so when the cube map is cube complete, we return the ImageDesc of its first face, meanwhile we do not allow querying ImageDesc if it is not cube complete. BUG=angleproject:1941 TEST=angle_end2end_tests dEQP-GLES31.functional.geometry_shading.query.framebuffer_attachment_layers dEQP-GLES31.functional.geometry_shading.query.framebuffer_incomplete_layer_targets dEQP-GLES31.functional.geometry_shading.layered.* dEQP-GLES31.functional.geometry_shading.instanced.invocation_per_layer_* dEQP-GLES31.functional.geometry_shading.instanced.multiple_layers_per_invocation_* Change-Id: I44393b513ec8f1a682fd1c47d3eaa6f3b3fae877 Reviewed-on: https://chromium-review.googlesource.com/1075811 Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill d7518622 2018-03-27T09:44:31 Buffer11: Refactor Subject/Observer pattern. Instead of having a direct/static observer distinction, add two messages for 'Contents Changed' and 'Storage Changed'. This makes Buffer11 itself the subject with two different message handling cases in the onSubjectStateChange methods. Bug: angleproject:2389 Change-Id: I645cd4b7cc7ce51cb7f48a01c7fc72939cbe89fe Reviewed-on: https://chromium-review.googlesource.com/957940 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@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>
Jamie Madill 888081d5 2018-02-27T00:24:46 D3D11: Refactor dependent Framebuffer state changes. Previously, when a state change would cause a Texture to recreate its storage specific to D3D11, we would use a dependent notification from RenderTarget11 to Framebuffer11 to re-check internal dirty bits. In this new method, we instead set dirty bits on the gl::Frambuffer directly. This also means we use fewer internal objects for these notifications, because we share the same structures between the D3D11 back-end notifications and the top-level notifications we use for Robust init and Framebuffer completeness. This also allows us to get rid of one "if" that we check on every draw call in D3D11. This also introduces a dirty bits guard concept - a shadow set of dirty bits that is checked in dependent state changes to ensure that extra bits aren't set inside syncState. This also implements Framebuffer dirty bits for the D3D9 back-end. This has the side effect of cleaning up the "null colorbuffer" D3D9 workaround. Bug: angleproject:2372 Change-Id: Ie346d39030f4f6df583d735685b0babea4e745a8 Reviewed-on: https://chromium-review.googlesource.com/936691 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d444255a 2018-02-27T22:03:47 Refactor signal utils into Observer pattern. These types were over-generalized. All use cases featured arrays of resources attached to single parent resources. The channel ID is sufficient to identify the child resource in the parent, and having variadic template arguments wasn't necessary. Futhermore we can rename these types to use the common Observer pattern. This should make them more readable to new developers. Also update some classes to inherit from Subject instead of having a member Subject. This cleans up the code in a few places. This should lead to a simpler refactor to allow dependent dirty bits notifications in the Vulkan back-end. In the following patch the signal_utils files will be renamed. They are not renamed in this patch to ensure git history is preserved. Bug: angleproject:2372 Change-Id: I17a3f2c8d92afd4bb3cba2d378c3a2e8a6d7fb11 Reviewed-on: https://chromium-review.googlesource.com/936690 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 81c2e253 2017-09-09T23:32:46 Add top-level dirty bits for texture and samplers. These will have to be fleshed out in the back-ends. Also currently uses a single bit for all the bindings, and we can extend this to more fine-grained updates in the future. This patch implements top-level updates for texture completeness. Sampler completeness caches are removed from the Texture class, and replaced by a cache in the gl::State class. The State class also keeps a channel binding to the bound textures so it can be notified when textures might change from complete <-> incomplete. In future CLs we skip updating back-ends if texture state doesn't change. BUG=angleproject:1387 Change-Id: If580b4851303c86f3240e62891f5f6047eefb6a2 Reviewed-on: https://chromium-review.googlesource.com/648053 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Martin Radev 878c8b1e 2017-07-28T09:51:04 Handle viewport and scissor state changes for side-by-side framebuffers Side-by-side framebuffers have viewport offsets as part of their state which have to be applied to the viewport and scissor rectangles to generate the final viewport and scissor rectangles of each view. Whenever there is a transition to or from a side-by-side framebuffer, viewport and scissor state has to be synced. Also, because rendering is done on the same 2D texture the scissor test has to be always enabled to guarantee that no fragments leak to a neighboring view. The patch addresses this by extending the viewport and scissor state in StateManagerGL to be a vector of rectangles instead of a single rectangle. Two new dirty bits are added to cover changes in the viewport offsets and whether the framebuffer has a side-by-side layout. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I8107d7ba97d06b20cf24358f19963fa494844592 Reviewed-on: https://chromium-review.googlesource.com/585012 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev 9bc9a321 2017-07-21T14:28:17 Integrate multiview state in FBO completeness check The patch extends the FBO completeness validation to include the multiview state members according to the ANGLE_multiview specification. It also changes the numViews in FramebufferAttachment to be consistently of type GLsizei instead of GLint. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ibe550ba03204d808d96a4edf4807c68421aa1158 Reviewed-on: https://chromium-review.googlesource.com/581193 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev 5dae57b0 2017-07-14T16:15:55 Save side-by-side function arguments into attachment's state Handle glFramebufferTextureMultiviewSideBySideANGLE calls by saving the arguments into the attachment's state. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Idc5441d673b48640f47415b07b2854fbdf566c8d Reviewed-on: https://chromium-review.googlesource.com/574915 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Martin Radev e5285d29 2017-07-14T16:23:53 Handle ANGLE_multiview state queries The patch extends glGetIntegerv and glGetFramebufferAttachmentParameteriv logic to handle the new tokens from the ANGLE_multiview extension. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ide145279cd7b58cd03502458d7d3a1a0f5e9e86d Reviewed-on: https://chromium-review.googlesource.com/573780 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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>
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 1e5499db 2017-04-05T11:22:16 Refactor Signal utils into template classes. This will allow us to pass on extra information to the receiving end, such as the specific texture levels that are dirty. BUG=angleproject:1635 Change-Id: Idb7ca1d625499e50e7712c458b694f6e9bfc0595 Reviewed-on: https://chromium-review.googlesource.com/453382 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill a02315b0 2017-02-23T14:14:47 WebGL Compat: Add DEPTH_STENCIL attachments. This is a special WebGL 1 binding point, that does not correspond to any native functionality. Due to particularities in validation we need to represent this with additional state in the Framebuffer. WebGL 2 fixes this oddity by resolving to the GLES 3 native spec. In order to pass the WebGL framebuffer objects test, we will also need a chromium-side CL to work with the additional state tracking it does in the blink layer, and an additional patch to ANGLE to clear the depth buffer before the first use (robust resource init). BUG=angleproject:1708 Change-Id: I111f8f5a451cce7de6cf281a6bc335b92dd2daf2 Reviewed-on: https://chromium-review.googlesource.com/444095 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 7b57b9d7 2017-01-13T09:33:38 Vulkan: Implement basic Clear and ReadPixels. This enables the simple operations clear test on Vulkan. The current implementation is very synchronous - it will block and finish the current command buffer if there is any possibility of a race. BUG=angleproject:1319 Change-Id: If01fe9a19ed6f539639a38786193d3626164cada Reviewed-on: https://chromium-review.googlesource.com/367754 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 8aee6546 2017-01-02T11:46:25 FramebufferAttachment: Cast pointers directly. Instead of using a temporary pointer-to-pointer, try casting the pointer-to-pointer type directly. This will facilitate Vulkan's use of RenderTargets. BUG=angleproject:1319 Change-Id: I0a14762e8e442b9eaa6eba3fdf653aef3c362533 Reviewed-on: https://chromium-review.googlesource.com/424148 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill a3944d4f 2016-07-22T22:13:26 Add gl::Format to represent a texture/rb/surface format. This has a few advantages: it preserves all the information of the internal format, such as if it is sized or unsized. It also saves looking up the format multiple times in the table, which should improve speed in some cases. The extra sized-ness information will allow us to perform the correct validation in CopyTexSubImage calls. BUG=angleproject:1228 Change-Id: I42954771b0a9a968f5d787b8cf6e0af721791855 Reviewed-on: https://chromium-review.googlesource.com/362626 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 362876b1 2016-06-16T14:46:59 Cache Framebuffer completeness. Improves performance on the render-to-texture microbenchmark by ~3x on the OpenGL back-end. Wipes out several of the top profling hotspots on that benchmark. BUG=angleproject:1388 Change-Id: I6a35a0b435b2ed3c83d32acdb9df090df98214ad Reviewed-on: https://chromium-review.googlesource.com/348957 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 35170f5c 2016-05-25T12:57:38 Fix Renderer generator script. This script breaks peridocially because we don't have automated tests for it. Split the FBO attachment object class into its own file, and also fix a couple other small snags that prevented the script from running. This will facilitate generating Vulkan renderer stubs. BUG=angleproject:1319 Change-Id: I30a6ce4ab0adad962cea76731dbe82837c5c9a1b Reviewed-on: https://chromium-review.googlesource.com/347064 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 086d59ae 2016-04-29T09:06:49 In ES3, validate that depth and stencil are the same image BUG=605775 Change-Id: I9508c70a588270dae871dde79fea1df1c3fd1558 Reviewed-on: https://chromium-review.googlesource.com/341440 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 6b120b9f 2015-11-24T13:00:07 Add checks for FBO attachment layer. We would allow the app to attach layers that were out-of-bounds. Fix this by checking against the underlying resource dimensions. Also rework the code a bit to clean up the texture size query, which is available from the ImageDesc. BUG=angleproject:869 Change-Id: I984f1db16daea6ca650d795884d8ec2cb8f05ebb Reviewed-on: https://chromium-review.googlesource.com/313991 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill cc86d64e 2015-11-24T13:00:07 Make Framebuffer size check ES2-only. This is an ES2-only incompleteness check. We also need to require matching dimensions in D3D11, but make this an implementation specific check. Also make all implementation specific errors 'UNSUPPORTED' since that catches all "non-ES" framebuffer restrictions. Note that we can't be conformant here in D3D11 currently, since the spec only makes an exception for mismatching formats for UNSUPPORTED, not for size checks. However, we don't have an easy solution. BUG=angleproject:1225 Change-Id: Ic80a04bce397fc12643b010c874f432033babc5d Reviewed-on: https://chromium-review.googlesource.com/313990 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
hendrikw 75782629 2015-09-25T11:28:50 Fix possible compiler errors on linux Change-Id: Ifc45446c749690eddc406f66f144304262f04664 Reviewed-on: https://chromium-review.googlesource.com/302478 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 51706eae 2015-08-07T14:39:22 Make FramebufferAttachmentObject not refcountable Re-land with a fix for an unitialized variable Instead the refcount is done via callbacks. This allows Surface to ignore this refcounting which will be useful in a follow-up CL. BUG=angleproject:891 Change-Id: I1925ccaa4ce7b502b33088660d31c404b8313cb5 Reviewed-on: https://chromium-review.googlesource.com/293712 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 0020426e 2015-08-12T19:07:29 Revert "Make FramebufferAttachmentObject not refcountable" BUG= This reverts commit 19ba57469aa02074d094a9aef104f84d0b6d881e. Change-Id: I5dce6c8a81570e22affbcaf32183a97c97849718 Reviewed-on: https://chromium-review.googlesource.com/293351 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 19ba5746 2015-08-07T14:39:22 Make FramebufferAttachmentObject not refcountable Instead the refcount is done via callbacks. This allows Surface to ignore this refcounting which will be useful in a follow-up CL. BUG=angleproject:891 Change-Id: I39b028476e0e3ab1837c033e1121ea21e54d7970 Reviewed-on: https://chromium-review.googlesource.com/291651 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 8cf813c7 2015-05-04T12:55:18 Query attachment render targets from Impl class. *re-land with fix for D3D9* This allows us to eradicate the GetAttachmentRenderTarget methods. This improves potential performance, at the cost of exposing a Renderer-specific function at the API object level. BUG=angleproject:963 Change-Id: Iee9f985ddaed668df0c622228004b348eb4d2ea8 Reviewed-on: https://chromium-review.googlesource.com/269006 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e737b06c 2015-05-04T16:53:56 Revert "Query attachment render targets from Impl class." D3D9 bug is causing failures in the WebGL depth texture test. BUG=angleproject:963 This reverts commit 804e8436f91733e1d0f769ec10082e4741f2e549. Change-Id: I660f05033360e97258794138cb50b604f5ac16b6 Reviewed-on: https://chromium-review.googlesource.com/269005 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 804e8436 2015-04-30T09:42:23 Query attachment render targets from Impl class. This allows us to eradicate the GetAttachmentRenderTarget methods. This improves potential performance, at the cost of exposing a Renderer-specific function at the API object level. BUG=angleproject:963 Change-Id: Ifc227b5f42e87bd4deb451d685618cf61fea39f1 Reviewed-on: https://chromium-review.googlesource.com/263491 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2d06b738 2015-04-20T12:53:28 Store value types for FBO attachments. *re-land with fix for Mac* This prevents us from re-allocating FBO attachments every set. This change requires quite a bit of refactoring. BUG=angleproject:963 Change-Id: Ia1f83e3c427d446ddbe16c6703db136942149e91 Reviewed-on: https://chromium-review.googlesource.com/266691 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill aed081ce 2015-04-21T13:55:21 Revert "Store value types for FBO attachments." In file included from ../../third_party/angle/src/libANGLE/Framebuffer.cpp:10: In file included from ../../third_party/angle/src/libANGLE/Framebuffer.h:13: In file included from /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/vector:68: /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/bits/stl_construct.h:81:38: error: call to implicitly-deleted copy constructor of 'gl::FramebufferAttachment' ::new(static_cast<void*>(__p)) _T1(__value); ^ ~~~~~~~ This reverts commit 13773b26dfb29b963ea727e1ebf7bdabdc5892b1. Change-Id: If79f2797fe46798cbe5b39d83c9bcb1a7e87026d Reviewed-on: https://chromium-review.googlesource.com/266643 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 13773b26 2015-04-20T12:53:28 Store value types for FBO attachments. This prevents us from re-allocating FBO attachments every set. This change requires quite a bit of refactoring. BUG=angleproject:963 Change-Id: Iafa4e4a0f3dd66c9e7452e0e96a0cbb9753487bb Reviewed-on: https://chromium-review.googlesource.com/263489 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5160ec11 2015-04-14T08:13:48 Squash the attachment types. We can store all relevant information in the base class, which lets us avoid using any virtual methods. This will finally let us avoid using reallocations on FBO attachment sets. BUG=angleproject:963 Change-Id: Ib4b61da14efaf843478b059499c01e34f9c65e4f Reviewed-on: https://chromium-review.googlesource.com/263488 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 79481d65 2015-04-14T08:13:47 Add FramebufferAttachmentObject base class. This lets us share objects (Textures/RBs/Surface) in the attachment class. It will let us squash the attachment classes into one type, which will in turn let us store them by-value, instead of by-pointer. BUG=angleproject:963 Change-Id: Ia9a43dbc3b99475c00f6bc2ed5475deef55addc3 Reviewed-on: https://chromium-review.googlesource.com/263487 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8cf4a39b 2015-04-02T11:36:04 Return a ref for FBO attachment image indexes. This cleans up the syntax somewhat. Also place some more of the helper methods in the header. BUG=angleproject:963 Change-Id: I62419095a7b65486f54d74791027594e8e595e48 Reviewed-on: https://chromium-review.googlesource.com/263629 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7936a6d3 2015-04-02T13:52:34 Move the texture index to attachment base. This will let us squash the attachment types in a follow-up patch. BUG=angleproject:963 Change-Id: I1efb2e41aa08766189499995b3150aec6fd61c4e Reviewed-on: https://chromium-review.googlesource.com/263486 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f813eb46 2015-04-02T17:15:34 Revert "Revert "Move resource storage to attachment base."" Fix in https://chromium-review.googlesource.com/#/c/263730/ This reverts commit 0d91328b99d2a8b2c3bfe45d64faad3e7907637c. Change-Id: Ibab792001798eff94652345b7c12fb9a42cddb55 Reviewed-on: https://chromium-review.googlesource.com/263740 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0d91328b 2015-04-02T16:44:20 Revert "Move resource storage to attachment base." Giving compile errors on Clang/OSX. http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder%20%28dbg%29/builds/30008 This reverts commit 7f67b030a8ae26e3ff54f6d33c655fc69c0b9fdb. Change-Id: I5fb7d237c99ca9f2a8d50538f86dfc334d56ddd9 Reviewed-on: https://chromium-review.googlesource.com/263722 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7f67b030 2015-04-02T11:36:02 Move resource storage to attachment base. We can use GetAs() to retrieve the corresponding API object. BUG=angleproject:963 Change-Id: I472e13664e45f9f05621dea3d28135d4e833fb3d Reviewed-on: https://chromium-review.googlesource.com/263485 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4ef3c241 2015-04-02T11:36:01 Remove DefaultAttachment. This class is no longer necessary or used. BUG=angleproject:963 Change-Id: I5e6fa64822e637e1cc769be6fe777fa6e13a0d83 Reviewed-on: https://chromium-review.googlesource.com/263484 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c46f45d9 2015-03-31T13:20:55 Refactor DefaultAttachments. Instead of using an Impl type for default attachments, store the egl::Surface pointer where possible. BUG=angleproject:963 Change-Id: I3e34849e8b1ccae0c91a79617ec6f64aaaab6b10 Reviewed-on: https://chromium-review.googlesource.com/263483 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill f0d10f89 2015-03-31T12:56:52 Replace non-copyable macro with a helper class. This class provides a simpler scheme for blocking default copy and assignment operators. It also reduces the amount of code needed since it's inherited to child classes. This also fixes the conflict between our macro and the same-named macro in Chromium code. BUG=angleproject:956 Change-Id: If0dc72aa3f63fbc7b8fa34907418821c64c39e2f Reviewed-on: https://chromium-review.googlesource.com/263257 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Geoff Lang d8a2258c 2014-12-17T15:28:23 Remove all uses of "actual" formats. BUG=angle:861 Change-Id: I7cd2d1a56772fdf18bcf926456399322d13e7a4f Reviewed-on: https://chromium-review.googlesource.com/236305 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9d9132df 2014-12-03T14:46:48 Remove support for compiling libANGLE as a dynamic library. BUG=angle:733 Change-Id: Iacef45b89f234091eb5df505437adabece1e564b Reviewed-on: https://chromium-review.googlesource.com/232961 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 8bc361e1 2014-11-20T16:23:31 Support compiling libANGLE as a static or shared library. BUG=angle:733 Change-Id: If27d3330534bce0f5b691010ea7d97bcb7579122 Reviewed-on: https://chromium-review.googlesource.com/231052 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4f4207f7 2014-12-01T10:07:56 Make some FramebufferAttachment methods const. BUG=angle:841 Change-Id: I4670e417c1976ebd2198ea4c8927a00fff7bb15c Reviewed-on: https://chromium-review.googlesource.com/232380 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2207213b 2014-11-20T15:15:01 Move as many files as possible from common to libANGLE. BUG=angle:733 Change-Id: If01c91cd52ac5c2102276a9fdc4b68ebc13e47f9 Reviewed-on: https://chromium-review.googlesource.com/231850 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4349ab85 2014-11-25T15:53:34 Revert "Move as many files as possible from common to libANGLE." Chromium directly includes our common/version.h and couldn't build after this change. This reverts commit f0a2c7727f9863c38a435a16a69d513c481fbbdd. Change-Id: Iafc41b1a3973f609518fe3588fdb64cecc285332 Reviewed-on: https://chromium-review.googlesource.com/231840 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f0a2c772 2014-11-20T15:15:01 Move as many files as possible from common to libANGLE. BUG=angle:733 Change-Id: I40cee6e2e305ac493acbc8649f858785c0569aed Reviewed-on: https://chromium-review.googlesource.com/231051 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0a73dd85 2014-11-19T16:18:08 Fix include guards. BUG=angle:733 Change-Id: I08b2c11c4831f1161c178c1842b10e807185aced Reviewed-on: https://chromium-review.googlesource.com/230831 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2b5420c0 2014-11-19T14:20:15 Merge libGLESv2 and libEGL classes into libANGLE. BUG=angle:733 Change-Id: Ic491c971411fe82c56cd97c5c8325ac14ec218df Reviewed-on: https://chromium-review.googlesource.com/230830 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>