src/libANGLE/renderer/d3d/DisplayD3D.cpp


Log

Author Commit Date CI Message
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>
Geoff Lang 6812a55c 2015-01-06T17:26:42 Rewrite ConfigSet and make EGLConfig synonymous with egl::Config. BUG=angle:658 Change-Id: I3c33faf18af0bfda00dc5babe6356d6c8661f032 Reviewed-on: https://chromium-review.googlesource.com/238862 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5c39f688 2015-01-06T15:19:35 Have the DisplayImpl create the Renderer and Contexts. BUG=angle:658 Change-Id: I726d87b90be8382c5dd8964e4d8686711e404ffe Reviewed-on: https://chromium-review.googlesource.com/238861 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 9236b418 2015-02-02T16:51:52 Add generic Impl casting helper methods. GetAs and GetImplAs are template helpers that can replace all of our custom "makeTextureD3D", etc methods. This will help save code across different back-ends. Change-Id: Ib3215c005bfac5a819c5d8f7d60a73a725241332 Reviewed-on: https://chromium-review.googlesource.com/245390 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang c51113d0 2015-01-06T10:28:47 Generate egl configs from the DisplayImpl. Still do the actual generation in the Renderer9/11 for now but route it through the DisplayImpl. BUG=angle:658 Change-Id: Ib976fbd1b9e349146dc068bbdd4e6a3d2a5ddc69 Reviewed-on: https://chromium-review.googlesource.com/238860 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 1b765456 2014-12-11T11:58:39 Move display extension initialization to DisplayImpl. BUG=angle:658 Change-Id: I44d95fad4e1be5cc76f443d724defd37da4a268f Reviewed-on: https://chromium-review.googlesource.com/234762 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2dc4639f 2015-01-05T14:33:58 Rename SwapChain to SwapChainD3D and move it to the D3D folder. BUG=angle:681 Change-Id: Idcf24556e590e07cc0b6cf640d4701353a0cda5e Reviewed-on: https://chromium-review.googlesource.com/238472 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Cooper Partin 2676fac9 2015-01-06T15:03:47 Fixed invalid IsWindow( ) call for WinRT Windows Store applications. Change-Id: Ic5f2aca0100a842be193cec9e89872187742f2c6 Reviewed-on: https://chromium-review.googlesource.com/238821 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5b072780 2014-12-11T13:52:38 Fix DisplayD3D not initializing mRenderer. BUG=angle:658 Change-Id: If865910d52154f574f4d488d4c45fcac9a87b050 Reviewed-on: https://chromium-review.googlesource.com/234761 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 5d94a2b1 2014-12-04T11:16:00 Move native window check to the DisplayImpl. This hides the D3D-specific methods from the EGL side of things. BUG=angle:773 Change-Id: I5a1c2bbff865e02bc1a07b3295347469ef9792e3 Reviewed-on: https://chromium-review.googlesource.com/232943 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Jamie Madill 870352a1 2014-12-01T11:01:17 MANGLE egl::Display. BUG=angle:794 Change-Id: Id131f3119100030d6ee630e357a8d28396a6a813 Reviewed-on: https://chromium-review.googlesource.com/231852 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>