src/libANGLE/renderer/d3d/DisplayD3D.cpp


Log

Author Commit Date CI Message
Jamie Madill e84b0154 2021-09-13T16:04:20 Update extension boolean names. This is in preparation for auto-gen, which uses a simple naming scheme. This fixes the bool names to be totally consistent with the extension names. Bug: angleproject:6379 Change-Id: Ia212449be04accb0e4f006b55b1813ab4481fa0b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3157417 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 4968f6f2 2021-02-04T16:40:36 Move getRendererDescription from ContextImpl to DisplayImpl The other backend description strings are in DisplayImpl. This will help with caching the result of glGetString in the GL backend. Also Update the getters to not be const in order to allow caching. Bug: chromium:1173672 Change-Id: I43df35688762b23429f47f169c04482cf4cd089a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2676881 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jonah Ryan-Davis 0be050a4 2020-09-23T15:12:56 Pass GL_VERSION info through ANGLE's GL_RENDERER string Chrome needs ANGLE to pass through the underlying driver vendor and version, which cannot always be determined by the SystemInfo library. This is done by construction GL_RENDERER in the frontend through combining GL_VENDOR, GL_RENDERER, and GL_VERSION from the backends. Example changes are in the doc: https://docs.google.com/document/d/1p0dvrLlu8NKhO-RCU5gqlQ_LvcQj-ZqhvfwSk1n3Sz8/edit?usp=sharing Bug: chromium:1126526 Bug: chromium:1131248 Bug: chromium:1134669 Bug: chromium:1169861 Change-Id: Ia618ebcd7f3caaeb376b4b6a03446732efdaeecb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2427383 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Sunny Sachanandani 137271ff 2021-01-13T14:34:12 Support specifying array slice for D3D11 texture EGLImage Client can specify array slice for creating the SRV/RTV with EGL_D3D11_TEXTURE_ARRAY_SLICE_ANGLE. Test: D3DTextureTest.TextureArrayImage* Bug: angleproject:5538, chromium:1116101 Change-Id: I81cb2823df2145f1d05ad1526b0e36d6a0724d5e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2628609 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Ian Elliott 08142700 2020-10-01T19:30:03 Work-around test runner & DebugAnnotator Note: This precedes another CL that needs this change. DebugAnnotator uses a global variable. The test runner doesn't change state between testing different back-ends. This works-around the problem by setting the global variable when the context is switched. Because the GL back-end doesn't have its own DebugAnnotator sub-class, add a Display* to DisplayImpl::makeCurrent(), so that DisplayGL::makeCurrent() can install the front-end-Display's DebugAnnotator. Note: the Vulkan back-end gets this fix even though the new DebugAnnotatorVk class will be added in a follow-on CL. Bug: b/162068318 Bug: b/169243237 Bug: angleproject:5121 Change-Id: If08626a5310f9b4e3210e1a897a6886248e4d8ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2451423 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Kai Ninomiya da61c40e 2020-10-06T01:57:55 Revert "Work-around test runner & DebugAnnotator" This reverts commit e44c94d96a9b65615fe8f5038e124763ac8c45e5. Reason for revert: Breaks build of DisplayGbm on ChromeOS: src/libANGLE/renderer/gl/egl/gbm/DisplayGbm.{h,cpp} First failing builds: https://ci.chromium.org/p/chromium/builders/ci/ChromeOS%20FYI%20Release%20%28amd64-generic%29/1608 https://ci.chromium.org/p/chromium/builders/ci/ChromeOS%20FYI%20Release%20%28kevin%29/2212 Original change's description: > Work-around test runner & DebugAnnotator > > Note: This precedes another CL that needs this change. > > DebugAnnotator uses a global variable. The test runner doesn't change > state between testing different back-ends. This works-around the > problem by setting the global variable when the context is switched. > > Because the GL back-end doesn't have its own DebugAnnotator sub-class, > add a Display* to DisplayImpl::makeCurrent(), so that > DisplayGL::makeCurrent() can install the front-end-Display's > DebugAnnotator. > > Note: the Vulkan back-end gets this fix even though the new > DebugAnnotatorVk class will be added in a follow-on CL. > > Bug: b/162068318 > Bug: b/169243237 > Bug: angleproject:5121 > Change-Id: I748e8a1fd09b72e07242ac7fb39154537dcce534 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444095 > Reviewed-by: Ian Elliott <ianelliott@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> > Commit-Queue: Ian Elliott <ianelliott@google.com> TBR=courtneygo@google.com,ianelliott@google.com,jmadill@chromium.org Change-Id: I99df2716951726ead24961dc3d27a7ec63aeda80 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: b/162068318 Bug: b/169243237 Bug: angleproject:5121 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2451420 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Ian Elliott e44c94d9 2020-10-01T19:30:03 Work-around test runner & DebugAnnotator Note: This precedes another CL that needs this change. DebugAnnotator uses a global variable. The test runner doesn't change state between testing different back-ends. This works-around the problem by setting the global variable when the context is switched. Because the GL back-end doesn't have its own DebugAnnotator sub-class, add a Display* to DisplayImpl::makeCurrent(), so that DisplayGL::makeCurrent() can install the front-end-Display's DebugAnnotator. Note: the Vulkan back-end gets this fix even though the new DebugAnnotatorVk class will be added in a follow-on CL. Bug: b/162068318 Bug: b/169243237 Bug: angleproject:5121 Change-Id: I748e8a1fd09b72e07242ac7fb39154537dcce534 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444095 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Jamie Madill bb96aefa 2020-09-11T13:50:09 GN: Componentize D3D back-ends. This also isolates headers for D3D9 / D3D11 from each other. Bug: angleproject:3943 Change-Id: I04edbe7db68461ae4fc78ac7f9c22451debcb768 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2405807 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Wander Lairson Costa ee9c4fe4 2020-07-14T15:29:40 D3D: Make possible to build angle without D3D11 A few files inside the D3D11 tree are used by D3D9 and WGL backends. We add these files to the build system even when D3D11 is disabled. Also, we fix the use the of ANGLE_DEFAULT_D3D11 symbol. Bug: angleproject:4839 Change-Id: I981f4bfc60d973c02549caa737c5aed5ccf31282 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2298143 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Charlie Lao 29bb612e 2020-05-28T10:32:26 Add egl::ShareGroup class to abstract the share context group Vulkan backend has a barrier tracker that tracks memory barrier needs of all shared resources. Because the buffer/texture objects are shared resources within a shared group, the tracker can not live in a context. Putting it in a device/renderer requires locks. It fits perfectly in a shareGroup object. The work is already done at API level to handle the mutex lock for shared context access so that no extra lock needs to be taken in the backend. This CL adds egl::ShareGroup class that represents the object that are shared among all share context group. At the front end this usually will include all the shared resource managers (not done in this CL). The ShareGroup object is accessible from gl::State object. This CL also adds ability for backend driver to allocate implementation specific ShareGroupImpl object. Vulkan backend will then use it to keeps the barrier tracker and other things that naturally fits the share group concept. Bug: angleproject:4664 Change-Id: Ifcd975cbdf5130022e21c41397894afc28f572e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2217252 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Alexis Hetu 94de306d 2020-01-14T16:18:56 Extensions suffixes Added NV/OES suffixes to relevant Extensions members. Bug: angleproject:3104 Change-Id: Ia1798157086230bde8d11c6fcb4fe93211e996ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2013168 Reviewed-by: Alexis Hétu <sugoi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 47a1fda2 2019-12-02T09:23:45 D3D: Log why a renderer fails to initialize. BUG=1029091 Change-Id: I80a69f5d5294522d7229976f41ba5a61a6c2724d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1945891 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Sunny Sachanandani c1af9abf 2019-08-28T14:35:32 Add support for overriding internal format for D3D11 texture EGLImages Add an optional EGL_D3D11_TEXTURE_FORMAT_ANGLE attribute that is the GL internal format to use for EGLImage being created. This will be used for RGB emulation of swap chain texture backed WebGL contexts in Chrome when they have alpha:false set. Without RGB emulation it is possible to observe side-effects of the underlying swap chain being RGBA such as reading/writing the alpha channel, BlitFramebuffer working/not working when expected, etc. Also document creating EGLImages from D3D11 textures in the existing EGL_ANGLE_d3d_texture_client_buffer extension along with RGB emulation. Bug: chromium:699566, chromium:939657 Change-Id: I4931cb7bdc46e9bc6debd56b79ecc10ea27bd78b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1777099 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Sunny Sachanandani <sunnyps@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>
Geoff Lang 6a02f06d 2019-07-18T16:27:14 Implement EGL_ANGLE_create_context_backwards_compatible This extension allows the user to specify if ANGLE should create a context of the exact requested version or a higher version context that is backwards compatible. BUG=angleproject:3425 Change-Id: I7d0b75cdd7e34a2fc888aa238e1eeb67af82ae0d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1601560 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Sunny Sachanandani f9686af0 2019-06-04T17:49:43 Add support for D3D11 texture backed EGLImages Implement EGL_ANGLE_image_d3d11_texture extension. Images created with this extension might not be renderable based on bind flags and resource usage of the client provided texture in which case attaching them to a framebuffer won't succeed. The intended use case is to bind the front and back buffers of a swap chain to GL textures that can be used for rendering in the case of the back buffer and as a shader input for the front buffer. Bug: chromium:939655 Change-Id: Ic3328e831880292217b88be84740740df6031fa6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1646732 Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis beb0eb2d 2019-06-14T15:10:33 Clean up workarounds/features to single location. Rename all workarounds structs to features, and move the lists to a shared location in include/platform (to help with documentation, see: https://cs.chromium.org/chromium/src/ui/gl/gl_switches.cc?sq=package:chromium&g=0&l=69) Bug: angleproject:1621 Change-Id: I4069f08131db5e886047a007efb5d7764dfee5f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1660952 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis f52f2637 2019-05-23T13:52:52 Add EGL_ANGLE_workaround_control extension. This extension is used to query strings from an array based on index, which will be used to query all the information about workarounds in ANGLE. Bug: angleproject:1621 Change-Id: I27157f278f7f17c92c8b4fd7753e2a5ecd0528f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1627723 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0c667215 2019-01-01T14:40:36 Pass ErrorSet to ContextImpl constructor. This removes the need for the setErrorSet method. Also update some egl::Error TODO bugs. Bug: angleproject:2491 Change-Id: I0aba07c4a53b579835a88c3dacae294f752e6b17 Reviewed-on: https://chromium-review.googlesource.com/c/1392393 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c3dc5d48 2018-12-30T12:12:04 Merge gl::Context and gl::ContextState. This reduces the number of indrections when accessing the Extensions or Caps structures. It will provide a small speed-up to some methods. It also cleans up the code. Bug: angleproject:2966 Change-Id: Idddac70758c42c1c2b75c885d0cacc8a5c458685 Reviewed-on: https://chromium-review.googlesource.com/c/1392391 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
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 c1fd7376 2018-10-26T22:48:39 Move index range calculations into VertexArray. This is in preparation for removing the entire DrawCallParams struct. This struct was big enough to cause a performance hit on draw call perf tests just by virtue of initializing the fields. Also dereferencing the struct members is slower than reading function parameters since it adds an indirection. Also includes some error refactoring to enable moving code to a shared location. In total this patch series reduces overhead by up to 5%. Bug: angleproject:2933 Change-Id: Ib663f2538c14ac30d4c31fd10d6350be469626e2 Reviewed-on: https://chromium-review.googlesource.com/c/1298380 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 038e725a 2018-07-27T08:12:49 D3D11: Use angle::Result error pattern. 2/3 This CL introduces d3d::Context. This new class can wrap a DisplayD3D and a Context9/11 so we can use them through the same code paths. It also refactors the D3D11 resource allocation to always have access to a d3d::Context. Bug: angleproject:2738 Change-Id: I8161acdffee7a868cc26f2d49715413bcca7cc2b Reviewed-on: https://chromium-review.googlesource.com/1151451 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang cd7cd2a8 2018-07-19T11:25:54 Pass Context to EGLImage creation and Display to EGLImage initialization. BUG=angleproject:2507 Change-Id: I6c195434131709203f892be6037e974002c174c2 Reviewed-on: https://chromium-review.googlesource.com/1143453 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 6fb8ba4e 2018-07-16T19:12:33 DisplayD3D: Don't release bound texture in restoreLostDevice. If we are restoring a lost device we should have deleted all Contexts. This would have freed any bound textures. Remove the release call and replace it with an ASSERT. One usage of the Proxy Context remains: Display::destroyImage. Bug: angleproject:2714 Change-Id: Id3e4b7b0341092a8fae37705a6bb171167196fe2 Reviewed-on: https://chromium-review.googlesource.com/1137880 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 30b84854 2018-07-09T09:18:50 SwapchainD3D: Take Display instead of Context. This cleans up another use of the proxy context. Bug: angleproject:2714 Change-Id: Icba5bf76a3e9f811ee571529de16fd8162c76b3a Reviewed-on: https://chromium-review.googlesource.com/1128928 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 853f8255 2018-07-09T09:18:50 DisplayImpl: Make waitClient/waitNative non-const. These methods can mutate the display resources. Necessary for getting rid of ProxyContext and for the Vulkan error refactor. Bug: angleproject:2714 Bug: angleproject:2713 Change-Id: Ibffb1a382ecb064daaa7c664f9fc65cbcf927b37 Reviewed-on: https://chromium-review.googlesource.com/1128927 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 3cacf69b 2018-06-20T16:49:57 Pass all context creation parameters to DisplayImpl::createContext. Knowing the share context at native context creation time is required if we want to honor the requested share group instead of virtualizing contexts or using global share groups. BUG=angleproject:2464 Change-Id: I1fb4d71de266b3191986b1754e73d474e49445bb Reviewed-on: https://chromium-review.googlesource.com/1108743 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@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>
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>
Jamie Madill acf2f3ad 2017-11-21T19:22:44 Apply Chromium style fixes. This addresses several minor code quality issues that are validated in Chromium, but not yet applied to ANGLE: * constructors and destructors must be defined out-of-line * auto is not allowed for simple pointer types * use override everywhere instead of virtual * virtual functions must also be defined out-of-line Slightly reduces binary size for me (~2k on Win, 150k on Linux). Bug: angleproject:1569 Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6 Reviewed-on: https://chromium-review.googlesource.com/779959 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 71c88b31 2017-09-14T22:20:29 Enable [[nodiscard]] for gl::Error. This forces all return values to be checked for gl::Error. Requires quite a bit of minor refactoring. I also added a macro to swallow an error without returning from a function. We could look at storing the errors in the Context at some point, since almost always when we're generating errors that we need to discard we have access to the Context as a parameter. BUG=angleproject:2150 Change-Id: I457e48a30c002eda0993acbcd3180ba87bf169fb Reviewed-on: https://chromium-review.googlesource.com/665173 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 9c335865 2017-07-18T11:51:38 Refactor StateManager11 for dirty bits. This will make iterating over an internal set of dirty bits simpler. This also reorganizes the framebuffer invalidation logic a bit, including how the sample count is pulled from the Framebuffer. BUG=angleproject:1156 Change-Id: I79dbcd11704ab52568c587d836af9c1bff1d2d1f Reviewed-on: https://chromium-review.googlesource.com/529708 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
Jamie Madill fe54834f 2017-06-19T11:13:24 Proliferate gl::Context. This enables a few small things: it will enable making the platform a property of the Display rather than a global. The same goes for the global logging annotator. Also it ensures all back-end implementations have access to the GL / EGL state when available. Also introduces a smart pointer helper class to angleutils for objects that prefer to be destroyed with a context (gl::Context/egl::Display) parameter. We were using std::unique_ptr in a few places that would not work well with these objects. BUG=angleproject:1156 Change-Id: I59e288a3d6f766ff8a0f4b48ff3a1fbf7489daba Reviewed-on: https://chromium-review.googlesource.com/529706 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>
Bryan Bernhart (Intel Americas Inc) 151d5de6 2017-04-13T09:52:23 Enable MSAA for texture client buffers Enhancement to the EGL_ANGLE_d3d_texture_client_buffer extension to allow use of a shared D3D texture that can be multi-sampled. BUG=angleproject:1917 Change-Id: Iaf59bbd575a5dfb29345f55b549bc4017bf2d7d0 Reviewed-on: https://chromium-review.googlesource.com/446907 Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 76b8f469 2017-04-21T12:23:40 Use a shared state for egl::Image. This allows us to stop duplicating some information in the impl. BUG=angleproject:1635 Change-Id: If8f7d2418571c3254729f48c463814ec18ed2644 Reviewed-on: https://chromium-review.googlesource.com/469153 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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 3311d474 2017-01-02T17:55:02 Display: Add a shared state object. This will allow us to manage the SurfaceSet in the GL layer. BUG=angleproject:1684 Change-Id: Iab8243157710beab2667ef10275571078ce9ae8e Reviewed-on: https://chromium-review.googlesource.com/424228 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill a26c6b7c 2016-12-15T11:27:50 Surface: Make the egl::Config part of SurfaceState. This will be accessible to the Impl, so they won't have to store a copy of the pointer. BUG=angleproject:1319 Change-Id: I298a11a243d3d32f4c885273e55162e6862f3e16 Reviewed-on: https://chromium-review.googlesource.com/419697 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2f6435e0 2016-11-02T10:43:21 Change UNIMPLEMENTED to not assert by default. It is not feasible to run dEQP against ES 3.1 on the bots without removing this assertion. Messages will still be logged and UNREACHABLE will still generate assertion failures when the behaviour is needed. This matches the behaviour of Chromium's NOTIMPLEMENTED macro. Remove the ANGLE_TEST_CONFIG macro, it was not doing anything useful anymore. BUG=angleproject:1442 Change-Id: I76376817a87e1a75ad1a938e1db1d7763e094372 Reviewed-on: https://chromium-review.googlesource.com/406928 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2018c0ba 2015-12-08T11:48:51 Add a EGL_ANGLE_d3d_texture_client_buffer extension. Allows creation of pbuffers from D3D texture objects. BUG=540829 BUG=angleproject:1144 Change-Id: If8ea717ef011608cd01357c217837133d726d3ea Reviewed-on: https://chromium-review.googlesource.com/316804 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Martin Radev 6230dd54 2016-08-23T15:20:03 Check for OpenGL ES support when creating context Support for an OpenGL ES version can come either through OpenGL ES, OpenGL core or available extensions. The context creation should fail if the requested OpenGL ES version is not supported. BUG=angleproject:1477 TEST=angle_end2end_tests Change-Id: I810d004a1bd62f75f162d775d3cf92c4283252a3 Reviewed-on: https://chromium-review.googlesource.com/374338 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Austin Kinross 91e71ed9 2016-08-23T09:29:22 Misc minor WinRT fixes and cleanups Change-Id: Ibf041e74d81ef266791e6b6a3bb43bf504b035b3 Reviewed-on: https://chromium-review.googlesource.com/374040 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 9c721c64 2016-08-02T14:56:23 Check for device loss on all applicable EGL entry-points This will make applications aware of device loss on all EGL calls that need to have an initialized display. For that purpose, we track the device loss state at the egl::Display level instead of always querying the implementation. This is correct because at device-loss at the display level is non-recoverable. It also deduplicates the tracking that would have to be done in all the EGL backends. Changes made in this commit: - Cached device loss in egl::Display - Check isDeviceLost in ValidateDisplay - Changed EGL entry-points testing isDeviceLost to explicitely request a testDeviceLost - Add calls to ValidateDisplay to entry-points missing it - Removed unused virtual qualifiers for some robustness methods BUG=angleproject:1463 Change-Id: I92bea81f2ecd5423c445cff31557a4d9783557d5 Reviewed-on: https://chromium-review.googlesource.com/365450 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 64ae9952 2016-07-25T17:55:27 D3D11: Get driver version from DXGI adapter. This is a simpler and more portable design. Thanks for Austin from MS. BUG=angleproject:1452 Change-Id: I93e8f3fc61107f13c4b2c1cf7fbaf2bb7ccdfafb Reviewed-on: https://chromium-review.googlesource.com/363041 Reviewed-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill ce1ed238 2016-07-24T12:45:17 D3D11: Detect driver version for blit workaround. Since the newer driver versions are required for WebGL 2 conformance, we need a solution that can detect a driver version to know if we should apply the workaround. Use a modified copy of Chrome's Windows GPU driver detection code. In the future we should extend this to a full module when we port the command buffer workarounds. BUG=angleproject:1452 Change-Id: I783d5726454671cc22585a2bf990c071d539aa9f Reviewed-on: https://chromium-review.googlesource.com/361962 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang fed6d0e2 2016-07-05T11:33:53 Check for out-of-date swap chains during eglWait calls. BUG=angleproject:1438 Change-Id: I9b8d0da30e41c133ee92685d00f5f0239c7b2574 Reviewed-on: https://chromium-review.googlesource.com/358490 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yuly Novikov 07529ff8 2016-06-04T02:19:03 Remove const qualifier from generateConfigs Requested in https://chromium-review.googlesource.com/349353 BUG=angleproject:1362 Change-Id: I989757c2fb8f65d5afcfb177b7f8da1414871e6f Reviewed-on: https://chromium-review.googlesource.com/349694 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 62baf0cf 2016-05-19T13:13:36 Add a shared egl::SurfaceState struct. This structure can share GL-level properties (immutably) with the implementation. BUG=angleproject:1369 Change-Id: I1e9406f18b6b88bb7db2a8f87b5e6d547cc7ecb1 Reviewed-on: https://chromium-review.googlesource.com/342061 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d3a5b185 2016-05-19T13:13:35 Make inheritance heirarchy for egl::Surface. This will allow us to select the Impl constructor more easily createWindowSurface createPbufferSurface createPbufferSurfaceFromClientBuffer createPixmapSurface This in turn lets us pass an EGLImplFactory to the constructor and will allow us to pass in the local SurfaceState to the constructor. BUG=angleproject:1369 Change-Id: I6b13c1548c54bd5c493d59b68bfdaf55226b6bb5 Reviewed-on: https://chromium-review.googlesource.com/342060 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 53ea9cc6 2016-05-17T10:12:52 Replace rx::Renderer with rx::ContextImpl. Previously Context had no Impl class, but had a special relationship with the instanced Renderer class. Having a ContextImpl backing every Context will allow new designs to enable things like multithreading (where each ContextImpl stores a Context-specific device) or non- virtual Contexts on Android or other platforms where it is more efficient. A large refactoring patch that touches every back-end. BUG=angleproject:1363 Change-Id: Icb73a7d37447f08a664eeb499a310ba05d71a57e Reviewed-on: https://chromium-review.googlesource.com/342052 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Ewell bda75597 2016-04-18T17:25:54 Finish NV12 support via streams. The main functionality for NV12 texture support through EGL streams has been added. Updates to the compiler, texture code, and stream code were added to support binding to external D3D11 NV12 textures. An end2end test was also added to test sampling of YUV textures and converting to RGB. There is also a new script to convert BMP files to an NV12 texture ready to load into D3D11 for testing purposes. BUG=angleproject:1332 Change-Id: I39b6ec393ea338e2c843fb911acc1b36cd1158a0 Reviewed-on: https://chromium-review.googlesource.com/339454 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com> Reviewed-on: https://chromium-review.googlesource.com/341254 Reviewed-by: Ian Ewell <ewell@google.com>
Corentin Wallez 9670b03e 2016-04-29T09:47:47 Revert "Finish NV12 support via streams." Broke Windows Clang compilation, see https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Win%20Clang%20Builder%20%28dbg%29/builds/3583/steps/compile/logs/stdio and search for TextureStorage11.h This reverts commit 9b8b359fa3615be7c7492239a48f61103b2e4fcc. Change-Id: I6e54305eba02b40927a35577594df39e951adb32 Reviewed-on: https://chromium-review.googlesource.com/341430 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Ian Ewell 9b8b359f 2016-04-18T17:25:54 Finish NV12 support via streams. The main functionality for NV12 texture support through EGL streams has been added. Updates to the compiler, texture code, and stream code were added to support binding to external D3D11 NV12 textures. An end2end test was also added to test sampling of YUV textures and converting to RGB. There is also a new script to convert BMP files to an NV12 texture ready to load into D3D11 for testing purposes. BUG=angleproject:1332 Change-Id: I098940e6f25e113dcc4fc8d22ffed4b5a16fd860 Reviewed-on: https://chromium-review.googlesource.com/339454 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Geoff Lang b0a53105 2016-04-01T11:43:54 Add a NativeWindowD3D abstract class to handle native window interactions. The previous NativeWindow class included D3D11 headers while being included in all D3D backds and had platform-dependent includes and members. This turns it into an abstract class that only implements the minimal functionality for each renderer. BUG=angleproject:1345 Change-Id: I8f20339dd6bba719e574a1dcb3ec859897c9228f Reviewed-on: https://chromium-review.googlesource.com/336780 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Ian Ewell ec2c0c5e 2016-04-05T13:46:26 Update internal AttributeMap type to EGLAttrib. Newer EGL functions use EGLAttrib to pass in attributes, which can be either 32-bit or 64-bit depending on the system while the old attributes are passed in as EGLints, which are usually 32-bits. To support these newer functions, AttributeMap now uses EGLAttrib internally instead of EGLint, and all the code using AttributeMap has been updated to cast properly. BUG=angleproject:1348 Change-Id: I7c4dd9ef23ea1b1741f3a565502fb5e26bf962d7 Reviewed-on: https://chromium-review.googlesource.com/337162 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Ian Ewell 701b74b0 2016-03-02T15:26:39 Add support for EGL_KHR_stream. EGL_KHR_stream is now implemented. Since the extension does not come with any producers or consumers, it does not have much functionality and the implementation is therefore very simple (validation layers and a new object to store some attributes). This however add the groundwork to add the appropriate consumer and producer extensions to stream D3D NV12 textures directly into ANGLE which will significantly improve video performance on Chromium on D3D-based platforms. BUG=angleproject:1332 Change-Id: Ie240c73869f5098d1215cc5e27aa5decd06c3ed1 Reviewed-on: https://chromium-review.googlesource.com/330003 Commit-Queue: Ian Ewell <ewell@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 436e32ae 2016-01-15T15:53:12 GLX backend: check for child window resizes on eglWaitNative This is the standard way, if not often used, for application to notify the driver of window size changes. Chromium uses it to resize when it is done rendering and swapping so that drivers do not clobber the backbuffer. This fixes black flickering appearing when resizing the Chromium windows with --use-gl=angle. BUG=angleproject:1281 Change-Id: Ic76f3c3ef453eae07eb59122135290411f86764d Reviewed-on: https://chromium-review.googlesource.com/322390 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez a433388d 2016-01-14T17:24:50 Implement eglWait* This mostly does nothing except on X11 where it calls the equivalent glXWait*. eglWait* are needed because they are used by Chromium and were triggering an UNREACHABLE(). BUG=angleproject:1281 Change-Id: Iff9c127b16841bc27728304a5ba2caff49ff11b5 Reviewed-on: https://chromium-review.googlesource.com/322360 Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 46e6c7a5 2016-01-18T14:42:30 Add stubs for no_error extension. In some cases ANGLE flushes state for FBOs during validation. For testing of the state synching code for FBOs, this makes end-to-end testing impossible. Solve this by partially implementing a hidden no_error extension, hidden to the user by not exposing the extension string, but allowing us to skip validation of some of the FBO methods that require checking for complete FBOs. BUG=angleproject:1280 BUG=angleproject:1260 Change-Id: I708f348ccec6697b974c48cd890ec75a703abe21 Reviewed-on: https://chromium-review.googlesource.com/322210 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>
John Bauman 49ae88ba 2015-12-09T16:44:29 Implement EGL_ANGLE_direct_composition extension On D3D11, if dcomp.dll can be loaded then EGL_ANGLE_direct_composition is exposed. Setting EGL_DIRECT_COMPOSITION_ANGLE as an attrib on a surface will force it to use DirectComposition to draw to the screen, possibly saving power. BUG=524838 Change-Id: I3ea175a97bbca1a3388ffe52fdd1587a2f0c2ce7 Reviewed-on: https://chromium-review.googlesource.com/319214 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: John Bauman <jbauman@chromium.org>
Geoff Lang 7f448b58 2015-12-16T13:31:57 Add an EGL_ANGLE_surface_orientation extension. BUG=angleproject:1262 Change-Id: Ifbb0f5302311a68a0c6f02baaea706cbb7055a52 Reviewed-on: https://chromium-review.googlesource.com/320011 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 666cb828 2016-01-04T17:44:09 Revert "Add an EGL_ANGLE_surface_orientation extension." Compilation warnings on clang. This reverts commit 18cc14b5951842ede85c06dcbc0bba230bcedc45. Change-Id: If58047486116e34ef30c4b317d3fb47cd2349d15 Reviewed-on: https://chromium-review.googlesource.com/319822 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 18cc14b5 2015-12-16T13:31:57 Add an EGL_ANGLE_surface_orientation extension. BUG=angleproject:1262 Change-Id: I863c46c8557604da045447550f7d69831c9f06b5 Reviewed-on: https://chromium-review.googlesource.com/318780 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 70d0f499 2015-12-10T17:45:46 Implement GL_KHR_debug. BUG=angleproject:520 Change-Id: I9ced3e7ab1515feddf2ec103c26b2610a45b1784 Reviewed-on: https://chromium-review.googlesource.com/319830 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 66988745 2015-12-22T19:39:19 Revert "Implement GL_KHR_debug." This reverts commit 6c521b7a70a53b1c9f7762e53e34b5a8146b0f7b. Change-Id: I6ff981198e31f34d3e405edea6277ee75516d6ee Reviewed-on: https://chromium-review.googlesource.com/319820 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6c521b7a 2015-12-10T17:45:46 Implement GL_KHR_debug. BUG=angleproject:520 Change-Id: I78d14cc8c94f5cef58604220f0ca847473b25bf8 Reviewed-on: https://chromium-review.googlesource.com/317820 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross 063d9e78 2015-11-19T17:24:47 Add support for EGL_EXT_platform_device This allows an application to use EGLDeviceEXT to initialize EGL. For example, if an application wants to initialize EGL using an existing D3D11 device (instead of ANGLE creating its D3D device), then the app may create an EGLDeviceEXT using EGL_ANGLE_device_creation_d3d11, and use this device to initialize EGL via EGL_EXT_platform_device. BUG=angleproject:1190 Change-Id: Ife91ce95a63e29eb2b3f05aedfb668e4cac8f5ce Reviewed-on: https://chromium-review.googlesource.com/313444 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com>
Austin Kinross a313f7aa 2015-10-28T12:58:03 Refactor EGLDeviceEXT to remove renderer dependency BUG=angleproject:1190 Change-Id: I38604de469c5f7efaf37bcebf20bc6425df35e62 Reviewed-on: https://chromium-review.googlesource.com/309512 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com>
Geoff Lang 362c0a79 2015-08-12T14:44:38 Implement EGL image classes for the D3D renderers. BUG=angleproject:970 Change-Id: I24d393fcd75dd4ee510785e8475b093868701c77 Reviewed-on: https://chromium-review.googlesource.com/295152 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6238e353 2015-08-12T13:26:19 Generate the egl Display extensions in Renderer9 and Renderer11. With the addition of EGL Image, the display extensions generated by Renderer9 and Renderer11 become significantly different. Instead of generating them via getXSupport() methods, generate them inside the renderers themselves. BUG=angleproject:970 Change-Id: Ib3fffabcca3e3cdef13ef994aa0b06dba0f00362 Reviewed-on: https://chromium-review.googlesource.com/293271 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jeff Muizelaar d17c016b 2014-10-27T14:10:35 Add support for RESOURCE_MISC_SHARED_KEYEDMUTEX Change-Id: I225f38b4616ac47e690dccbcb67074fedc571d61 Reviewed-on: https://chromium-review.googlesource.com/225642 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang dcab33be 2015-07-21T13:03:16 Add stubs for EGL image entry points and validation. BUG=angleproject:970 Change-Id: Ic3b9f9f60146920571e0e5f00fac2273c35fff2f Reviewed-on: https://chromium-review.googlesource.com/287162 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6cd03cf9 2015-05-12T19:28:10 Revert "Create a child window in SurfaceD3D when needed." Reverting until chromium sandbox issues are resolved. This reverts commit b7f1a8b0ab3489a7463749e7fc088187bfafbd35. BUG=484963 BUG=angleproject:961 Change-Id: I4b030329a322d0a96a18e6ae875d500c5f755ddd Reviewed-on: https://chromium-review.googlesource.com/270490 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 98e7d071 2015-05-07T12:35:47 Use a D3D11 renderer by default, when available. Also update SampleApplication to request the default renderer instead of explicitely asking for d3d11 BUG=angleproject:892 Change-Id: I70c431b3c1ba78c3ce7844d7f276cc19ac17d7f5 Reviewed-on: https://chromium-review.googlesource.com/269999 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 443e1d9b 2015-05-05T12:57:55 Refactor egl::Surface constructors. We can reduce the code in these classes quite a bit by calling the common code in egl::Display. BUG=angleproject:994 Change-Id: Idf0ffa054fc6a70cf8c65a0b98fd963911715591 Reviewed-on: https://chromium-review.googlesource.com/269258 Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 30cb86d8 2015-04-22T10:07:23 Create a child window in SurfaceD3D when needed. BUG=angleproject:961 BUG=angleproject:860 Change-Id: I137d27bafc4d690b159ffef8cc69d6f1c5a05131 Reviewed-on: https://chromium-review.googlesource.com/267681 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3fe36ebd 2015-04-28T16:44:12 Revert "Create a child window in SurfaceD3D when needed." Causing errors with D3D9, see build: http://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20%28NVIDIA%29/builds/15149 This reverts commit b7f1a8b0ab3489a7463749e7fc088187bfafbd35. Change-Id: I6f1c3fd119f76a298e5b3fb676ddcb208cd1234b Reviewed-on: https://chromium-review.googlesource.com/267673 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3a12f776 2015-04-28T16:44:59 Revert "Fix compile failure on build systems with UNICODE defined." Earlier patch causing errors on D3D9: http://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20%28NVIDIA%29/builds/15149 This reverts commit acb0a1a6d74100833dbccd49d3eca317b56fd004. Change-Id: I1956c57224ecf1c0caee2c3f624d1a871d171686 Reviewed-on: https://chromium-review.googlesource.com/267674 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang acb0a1a6 2015-04-28T10:39:10 Fix compile failure on build systems with UNICODE defined. BUG=angleproject:961 Change-Id: I32053309a8384a27d1c2a991ddfaa195195f88c8 Reviewed-on: https://chromium-review.googlesource.com/267637 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang b7f1a8b0 2015-04-22T10:07:23 Create a child window in SurfaceD3D when needed. BUG=angleproject:961 Change-Id: I61931961f8cb86b47012edd2bc08d0e1e7a5d0f7 Reviewed-on: https://chromium-review.googlesource.com/266515 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: John Bauman <jbauman@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jacek Caban fa60f690 2015-04-27T18:23:44 Fixed compilation with mingw. Change-Id: Icc40c61b5c6df5a0aed4e175f1724ca55f981625 Reviewed-on: https://chromium-review.googlesource.com/267412 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill d41c649a 2015-04-20T16:32:09 Add histograms helper macros. These macros mimic Chromium's histogram_macros.h, so we can use similar values for our histograms. BUG=angleproject:944 BUG=436191 Change-Id: If77abaf71964d26a6269183e51b68b76bb562085 Reviewed-on: https://chromium-review.googlesource.com/266523 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cooper Partin 97d61eb5 2015-04-14T09:08:16 Add extension EGL_ANGLE_device_d3d Access to the D3D device is needed for some advanced scenarios. New entry points eglQueryDisplayAttribANGLE and eglQueryDeviceAttribANGLE have been added in this change to implement this extension. BUG=angleproject:935 Change-Id: Ie39e86a2b6c6d8d05a08964b2907fb9fba5dec13 Reviewed-on: https://chromium-review.googlesource.com/265591 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 1ea8284d 2015-04-14T15:28:56 Revert "Add extension EGL_ANGLE_device_d3d" Compile error on clang: src/libANGLE/Display.cpp:259:23: error: allocation of incomplete type 'egl::Device' mDevice = new Device(this, impl); ^~~~~~ src/libANGLE/Display.h:36:7: note: forward declaration of 'egl::Device' class Device; ^ In file included from src/libANGLE/Display.cpp:11: In file included from src/libANGLE/Display.h:17: In file included from src/libANGLE/Error.h:80: In file included from src/libANGLE/Error.inl:9: src/common/angleutils.h:66:5: error: deleting pointer to incomplete type 'egl::Device' may cause undefined behavior [-Werror,-Wdelete-incomplete] delete resource; ^ ~~~~~~~~ src/libANGLE/Display.cpp:209:5: note: in instantiation of function template specialization 'SafeDelete<egl::Device>' requested here SafeDelete(mDevice); ^ src/libANGLE/Display.h:36:7: note: forward declaration of 'egl::Device' class Device; ^ 2 errors generated. This reverts commit 6dacaff4e03d4f6b4c444a3fff018c1297cd25ba. Change-Id: Ide348e156324a5af668604362c0b249ea73b6083 Reviewed-on: https://chromium-review.googlesource.com/265626 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Cooper Partin 6dacaff4 2015-02-19T16:31:57 Add extension EGL_ANGLE_device_d3d Access to the D3D device is needed for some advanced scenarios. New entry points eglQueryDisplayAttribANGLE and eglQueryDeviceAttribANGLE have been added in this change to implement this extension. BUG=angleproject:935 Change-Id: Id1560b0887fa5882b9858af7bad9043ada67038d Reviewed-on: https://chromium-review.googlesource.com/251610 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 1aca922a 2015-03-19T12:02:50 Track more information at the egl::Surface level. Many of the members of SurfaceImpl could be stored in egl::Surface instead. This makes SurfaceImpl a pure interface and makes Surface constructors much simpler. BUG=angleproject:795 Change-Id: Ifa797b4bef84afe66f9fb3f3a6be260f726ca55c Reviewed-on: https://chromium-review.googlesource.com/261358 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 7dcd2c7b 2015-03-18T17:22:38 Add stubs for EGL pixmap surface creation. BUG=angleproject:795 Change-Id: I76b44e837eb6919f9d3c1eb56c2d3af84bc5ab09 Reviewed-on: https://chromium-review.googlesource.com/260943 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 6bd58312 2015-03-13T10:45:27 Make Platform methods global. This will allow them to be imported dynamically without name mangling. This is necessary because sometimes SwiftShader overrides libGLESv2 and libEGL, so we need to determine at run-time if we are running with "actual" ANGLE. BUG=466735 Change-Id: I396d717b79066feb8ed0d577ee7386b33eb1d160 Reviewed-on: https://chromium-review.googlesource.com/259954 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross bc8a1772 2015-02-26T14:11:43 Fix WinRT build break due to D3D9 histogram assumption Change-Id: Id8e8bed76a813e5cf082659671bb6f4a112ecf24 Reviewed-on: https://chromium-review.googlesource.com/254340 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill a2643b64 2015-02-19T11:07:56 Add UMA histogram for D3D9 init results. Similar to D3D11 results, this can add statistics for the result of initializing the D3D9 Renderer. BUG=436191 Change-Id: I746c95a8dbb27456613844fde816e17352dc4b8d Reviewed-on: https://chromium-review.googlesource.com/248660 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill b9293977 2015-02-19T11:07:54 Add UMA histogram for D3D11 init failures. This will give ANGLE in Chrome a sense of device init calls fails in D3D11, and why. BUG=436191 Change-Id: Ia7b1bfa334cec595b6f0265357385d0dcc2d6cbf Reviewed-on: https://chromium-review.googlesource.com/248632 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang f6bf23fd 2015-01-20T11:43:54 Split up the Display::create*Surface and have them match the API. BUG=angle:658 Change-Id: Id0054406a5ce6f6ffef28ce84737547c1869efde Reviewed-on: https://chromium-review.googlesource.com/242038 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b2a5e342 2015-02-11T13:13:21 Return egl::Error from Renderer::initialize. This extra Error info can be useful for passing back additional info. In the short-term this means we can implement a UMA histogram at some point with a code that represents a more specific reason why the init failed. BUG=436191 Change-Id: If5e099a9ce32e87843754cd4f40d726dd5bad4b8 Reviewed-on: https://chromium-review.googlesource.com/246564 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 38832d17 2015-02-09T10:01:47 Add Display getters for native display and attribs. This simplifies the logic in the Renderer init. BUG=angle:905 Change-Id: I01bf3701dd85f50e369e2c11e0e2a7cb638ccf00 Reviewed-on: https://chromium-review.googlesource.com/247650 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Régis Fénéon 83107970 2015-02-05T12:57:44 Implement eglQueryContext BUG=angle:895 Change-Id: I5e709f772d6222cdb7b5d7c060830a75eac9f815 Reviewed-on: https://chromium-review.googlesource.com/246490 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 1d8ae673 2015-01-19T14:44:29 Add a makeCurrent method to Display. BUG=angle:658 Change-Id: If1830fb164d31e2ee8092414d012e127ec344d69 Reviewed-on: https://chromium-review.googlesource.com/242033 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f21a1080 2015-01-09T14:41:27 Generate the full EGL configs in the Renderers. Specify the default framebuffer formats in GL formats but still use BGRA and ANGLEX formats for now. BUG=angle:658 Change-Id: I7192db4ca76ab4b0b42daa43785a7ddd9528a9ca Reviewed-on: https://chromium-review.googlesource.com/239902 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>