util/EGLWindow.cpp


Log

Author Commit Date CI Message
Michael Spang 229fc83d 2019-01-21T18:09:15 Vulkan: Port renderer to Fuchsia (reland) Add DisplayVk and WindowSurfaceVk subclasses for Fuchsia to the vulkan renderer, as well as an implementation of OSWindow that renders fullscreen for the test suite. Disallow use of the vulkan loader from third_party as Fuchsia uses a fork of the loader and has not sent those changes upstream yet. Add a small wayland-inspired library libfuchsia-egl to provide a type "struct fuchsia_egl_window" to use as EGLNativeWindowType. This type combines a zx_handle_t to an image pipe channel and a surface size. Image pipes can only be used once to create a VkSurfaceKHR. This means we have to recreate the pipe in tests that call eglCreateWindowSurface more than once with a single OSWindow, or the second call will fail. Add a resetNativeWindow() method to accomplish this. Reland disabling -Wextra-semi. BUG=angleproject:2475 TEST=angle_end2end_tests on Fuchsia Change-Id: Ie91715bcd760c6c04d4b8a02a91daa71e32ee30c Reviewed-on: https://chromium-review.googlesource.com/c/1467603 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3f0ff409 2019-02-12T03:08:51 Revert "Vulkan: Port renderer to Fuchsia" This reverts commit 991d1cfb5e5a2f20a46961da3ad85b95da30b88a. Reason for revert: Failing compile on the fuchsia bots on the ANGLE auto-roller. https://ci.chromium.org/p/chromium/builders/luci.chromium.try/fuchsia_x64/209198 In file included from ../../third_party/angle/util/fuchsia/ScenicWindow.cpp:10: In file included from ../../third_party/angle/util/fuchsia/ScenicWindow.h:13: In file included from gen/third_party/fuchsia-sdk/sdk/fidl/fuchsia/ui/policy/cpp/fidl.h:5: In file included from ../../third_party/fuchsia-sdk/sdk/pkg/fidl_cpp/include/lib/fidl/cpp/internal/header.h:12: ../../third_party/fuchsia-sdk/sdk/pkg/fit/include/lib/fit/function.h:135:6: error: extra ';' after member function definition [-Werror,-Wextra-semi] }; ^ 1 error generated. Original change's description: > Vulkan: Port renderer to Fuchsia > > Add DisplayVk and WindowSurfaceVk subclasses for Fuchsia to the vulkan > renderer, as well as an implementation of OSWindow that renders > fullscreen for the test suite. > > Disallow use of the vulkan loader from third_party as Fuchsia uses a fork > of the loader and has not sent those changes upstream yet. > > Add a small wayland-inspired library libfuchsia-egl to provide a type > "struct fuchsia_egl_window" to use as EGLNativeWindowType. This type > combines a zx_handle_t to an image pipe channel and a surface size. > > Image pipes can only be used once to create a VkSurfaceKHR. This means we > have to recreate the pipe in tests that call eglCreateWindowSurface more > than once with a single OSWindow, or the second call will fail. Add a > resetNativeWindow() method to accomplish this. > > BUG=angleproject:2475 > TEST=angle_end2end_tests on Fuchsia > > Change-Id: I71a613a362dd1c8aada49a3c02ae461e064457bf > Reviewed-on: https://chromium-review.googlesource.com/c/1446496 > Commit-Queue: Michael Spang <spang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=spang@chromium.org,geofflang@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: I2d9abefa9db5363ba63a17c1773d0e147040d055 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2475 Reviewed-on: https://chromium-review.googlesource.com/c/1465761 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Michael Spang 991d1cfb 2019-01-21T18:09:15 Vulkan: Port renderer to Fuchsia Add DisplayVk and WindowSurfaceVk subclasses for Fuchsia to the vulkan renderer, as well as an implementation of OSWindow that renders fullscreen for the test suite. Disallow use of the vulkan loader from third_party as Fuchsia uses a fork of the loader and has not sent those changes upstream yet. Add a small wayland-inspired library libfuchsia-egl to provide a type "struct fuchsia_egl_window" to use as EGLNativeWindowType. This type combines a zx_handle_t to an image pipe channel and a surface size. Image pipes can only be used once to create a VkSurfaceKHR. This means we have to recreate the pipe in tests that call eglCreateWindowSurface more than once with a single OSWindow, or the second call will fail. Add a resetNativeWindow() method to accomplish this. BUG=angleproject:2475 TEST=angle_end2end_tests on Fuchsia Change-Id: I71a613a362dd1c8aada49a3c02ae461e064457bf Reviewed-on: https://chromium-review.googlesource.com/c/1446496 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1f56ed2a 2019-01-03T15:24:22 Add WGLWindow and WGL test configs. WGLWindow lets us use a Windows driver's bindings instead of ANGLE. This only works if the underlying driver supports OpenGL ES compatibility. Also adds the WGL headers, WGL XML, and a specialized WGL loader. Because of a small driver issue with NVIDIA I added a retry for the WGL Window initialization. Bug: angleproject:2995 Change-Id: Ie5148ece470dd03df33015f4919ad1fa79a859ec Reviewed-on: https://chromium-review.googlesource.com/c/1366021 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill ad398ee8 2019-01-03T13:01:08 Free OSWindow and EGLWindow through helpers. This cleans up any potential problems with allocating and freeing resources in different shared objects or DLLs. Previously we were using a dynamically linked allocation function and then calling the standard delete function. Also adds a base class helper for EGLWindow. Will base the WGL Window class on this. Needed for running ANGLE tests against native drivers. Bug: angleproject:2995 Change-Id: Ic92b447649ebb32c547605c20086c07a601842f0 Reviewed-on: https://chromium-review.googlesource.com/c/1393443 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill ba319ba3 2018-12-29T10:29:33 Re-land "Load entry points dynamically in tests and samples." Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL headers. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I5a8772f41a0f89570b3736b785f44b7de1539b57 Reviewed-on: https://chromium-review.googlesource.com/c/1392382 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 9f088621 2018-12-29T20:46:15 Revert "Load entry points dynamically in tests and samples." This reverts commit 03923558a7103827ffec6a4d2a1453ed91f01c6f. Reason for revert: fails compilation on Android, ChromeOS and Fuchsia during roll https://chromium-review.googlesource.com/c/chromium/src/+/1392624 Original change's description: > Load entry points dynamically in tests and samples. > > This CL adds a dynamic loader generator based on XML files. It also > refactors the entry point generation script to move the XML parsing > into a helper class. > > Additionally this includes a new GLES 1.0 base header. The new > header allows for function pointer types and hiding prototypes. > > All tests and samples now load ANGLE dynamically. In the future this > will be extended to load entry points from the driver directly when > possible. This will allow us to perform more accurate A/B testing. > > The new build configuration leads to some tests having more warnings > applied. The CL includes fixes for the new warnings. > > Bug: angleproject:2995 > Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05 > Reviewed-on: https://chromium-review.googlesource.com/c/1359516 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: I902bec2d733c2b879be29c02ab52a0b7d4eaa077 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2995 Reviewed-on: https://chromium-review.googlesource.com/c/1392381 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 03923558 2018-12-29T10:29:33 Load entry points dynamically in tests and samples. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05 Reviewed-on: https://chromium-review.googlesource.com/c/1359516 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 35cd7332 2018-12-02T12:03:33 Refactor test shader style. This change enforces a lot more consistency. We pass const char * to the Compile functions instead of std::string. Also fixes the indentation of C++11 block comments to be more consistent. Bug: angleproject:2995 Change-Id: Id6e5ea94055d8cbd420df4ea2e81b2d96cb5ce78 Reviewed-on: https://chromium-review.googlesource.com/c/1357103 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tobin Ehlis 1bf963b6 2018-07-19T14:56:37 Clean up PlatformMethods attribute enum Centralize definition of EGL_PLATFORM_ANGLE_PLATFORM_METHODS_ANGLEX in Platform.h. Bug: angleproject:2528 Change-Id: Id2b022c4ea08d2e98cbd6c3b248b58d096c20dfb Reviewed-on: https://chromium-review.googlesource.com/1144265 Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Omar El Sheikh eb4b8697 2018-07-17T10:55:40 Introduced eglMakeCurrent Perf Test Currently disabled test on android Also made the default EGL device type be EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE Updated destroy function of RendererVk to properly reset the mMemoryProperties member variable Bug: angleproject:2735 Change-Id: Ie1f8ab1ac93b18eda4c10c3b10ecd4756f1d8543 Reviewed-on: https://chromium-review.googlesource.com/1140508 Commit-Queue: Omar El Sheikh <theoking@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 24ddc7a8 2018-06-11T14:56:34 WGL: Support unvirtualized contexts and unsafe multithreading. When using unvirtualized contexts, DisplayWGL still creates a Renderer for managing any internal GL resources such as emulated back buffers for DXGISwapChainWindowSurfaceWGL or D3DTextureSurfaceWGL but also creates a new Renderer for each GL context. All created contexts share resources. BUG=angleproject:2464 Change-Id: I945502514079368e062beef70bed49c61ed44403 Reviewed-on: https://chromium-review.googlesource.com/1097459 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang 3b9b027c 2018-04-30T16:27:24 Add basic tests of (unsafe) multithreaded contexts. BUG=angleproject:2464 Change-Id: Ia0f0788a1bc4d2ecd883b058f15c629cac5fd166 Reviewed-on: https://chromium-review.googlesource.com/1036063 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0ab41fa5 2018-03-14T11:03:30 Add an EGL extension to disable GL extensions by default. BUG=angleproject:2404 Change-Id: I2667ddc92d5c9ef6e0ef115f2fdf0c3d3643d945 Reviewed-on: https://chromium-review.googlesource.com/962702 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 1fce3283 2017-10-09T16:12:03 Samples: Add command line flag to select renderer. This gives us the ability to test Vulkan without a special recompile, and keeps the default setting to the default ANGLE renderer. Only implemented for the hello_triangle sample currently. Also includes an extra error message for missing EGL config, which is where the Vulkan init fails right now, due to missing depth/stencil support. Also includes a hack to get Vulkan samples running without depth/ stencil. BUG=angleproject:2167 Change-Id: I6925b9b84956fb69cbf602a828ea95d8c7125b68 Reviewed-on: https://chromium-review.googlesource.com/707688 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang b433e872 2017-10-05T14:01:47 Change robust resource init into a context creation attribute. Enabled support on OpenGL even through the extension is not fully implemented so that testing with Chromium/Passthrough commmand decoder is still possible. BUG=angleproject:1635 Change-Id: Ia417b1779aace1eae19514325701a79cd33f4ef3 Reviewed-on: https://chromium-review.googlesource.com/678479 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jiajia Qin 8a7b3a0c 2017-08-25T16:05:48 Reland 'Remove IndexRange retrieving in validation' This change adds GL_KHR_robust_buffer_access_behavior support. The old change is in https://chromium-review.googlesource.com/c/angle/angle/+/607413 BUG=755897, angleproject:1393, angleproject:1463 Change-Id: I04a1132c3ae8d3a766194df61c4ff7bf0b084f03 Reviewed-on: https://chromium-review.googlesource.com/640750 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 222c517f 2017-07-19T16:15:42 Control Debug layers in ANGLE_platform_angle. Debug layers seem to be a universal thing among functional back-ends. D3D, OpenGL and Vulkan all need some kind of controls for debugging, so it seems to make sense to make this control part of the base extension. Default the extension to EGL_DONT_CARE, which allows the back-end to have a lot of flexibility in terms of implementation. Also enable the extension in the D3D11 and OpenGL back-ends, and set the extension to enabled for angle_end2end_tests. Remove EGLVulkanEXTTest since it no longer tests anything not tested in the base ANGLETest class. BUG=angleproject:2086 Change-Id: I52d8170effd1846b9afbe6e4052c699fe5cb0de8 Reviewed-on: https://chromium-review.googlesource.com/578369 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 293e114d 2017-07-11T13:51:05 Add tests for the cache control extension. A first test verifies the validation of the extension, and a second compiles a simple shader and checks the cache behaviour. These tests don't currently run since the extension is disabled, but they will start running as soon as we expose it. BUG=angleproject:1897 Change-Id: Id4a76b83090712a267576069b711eeee29aa81dd
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>
Jamie Madill 948bbe51 2017-06-01T13:10:42 Redesign robust resource init as a display extension. Also correct the enum allocation to values that are available to ANGLE. BUG=angleproject:1635 Change-Id: I443f5654aa6a5049b4a1ae4c253cd6473b4e446e Reviewed-on: https://chromium-review.googlesource.com/520002 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 98de826c 2017-05-29T13:01:02 Platform: Fix initialization order in tests. Because of the platform refactor in abf38572062b91 we broke the way the tests override the D3D workarounds for the tiny depth/stencil bug. This change passes a pointer to the platform directly in the EGL init logic, which solves this issue. It also removes all decltype code in the platform header which might fix the UBSAN problem we were seeing previously. Also change a present mode selection error into a warning in the Vk back-end, since this was being triggered on AMD, but is safe. BUG=angleproject:2042 Change-Id: Ibbd0c69ce11a840cf4b33c616f56020001e553aa Reviewed-on: https://chromium-review.googlesource.com/513519 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6811a316 2017-05-24T16:50:06 Use GetPlatformDisplay instead of GetPlatformDisplayEXT. This will allow us to use EGLAttrib and pass pointers as Display init parameters if necessary. BUG=angleproject:2042 Change-Id: Ib0f85d71bc9d3dff2db9453012f40303f3c3bd7c Reviewed-on: https://chromium-review.googlesource.com/513518 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: 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 e08a1d36 2017-03-07T17:24:06 Plumb robust resource init extensions. This also cleans up a few minor glitches in the extension texts, and renames the EGL extension for consistency. It incidentally fixes a bug in our EGL init where we were checking the wrong client versions for KHR_create_context. It also implements a new feature for tests which allow them to defer Context creation until the test body. This allows tests to check for EGL extension available before trying to create a context with certain extensions. BUG=angleproject:1635 Change-Id: I9311991332c357e36214082b16f2a4a57bfa8865 Reviewed-on: https://chromium-review.googlesource.com/450920 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang feb8c686 2017-02-13T16:07:35 Add extensions to disable client arrays. Chrome doesn't allow any client data in its command buffer. Add an ANGLE extension to request a context that disallows client data. BUG=602737 Change-Id: If9d5144daea3c629a73562396000df59a671aad3 Reviewed-on: https://chromium-review.googlesource.com/441986 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Fredrik Hubinette 5714a202 2016-12-13T14:08:44 D3D11: Add RGB10_A2 as a supported EGL pbuffer config format. Update EGLWindow to select configs that exactly match the requested config. Too many tests make assumptions about the default framebuffer's format. BUG=angleproject:1662 Change-Id: I4cf8aedf51013ca0f3f40f6bbd40f24a4a90561f Reviewed-on: https://chromium-review.googlesource.com/419681 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang c5a2a172 2017-01-13T15:55:07 Add EGL_EXT_pixel_format_float support, enables float EGL surfaces. Add floating point EGL configs for the D3D11 backend. BUG=angleproject:1707 Change-Id: Ic84cd3a0d41e78cc39d0275d83e7695f55673ddf Reviewed-on: https://chromium-review.googlesource.com/428294 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 0448ec84 2016-12-23T13:41:47 Vulkan: Enable validation layers on request. Also adds the build files for the Vulkan layers. The layers are enabled by default for the tests. BUG=angleproject:1319 Change-Id: I0b442b36312a1299a932922e1c4e39f00801de49 Reviewed-on: https://chromium-review.googlesource.com/367751 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f41a7151 2016-09-19T15:11:17 Add an extension to disable resource generation on bind. BUG=angleproject:1518 Change-Id: I662f7b07da5c97831496f2617b0adadf9858bdc9 Reviewed-on: https://chromium-review.googlesource.com/386799 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang c287ea6e 2016-09-16T14:46:51 Add WebGL validation extensions to ANGLE. BUG=angleproject:1523 Change-Id: I6fecb5055ed8087665aeee34b3a066ea8f38d51b Reviewed-on: https://chromium-review.googlesource.com/386281 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Austin Kinross 2a63b3f8 2016-02-08T12:29:08 Re-land "Implement EGL_experimental_present_path_angle" - Re-land with clang fix. This allows ANGLE to render directly onto a D3D swapchain in the correct orientation when using the D3D11 renderer. The trick is to add an extra uniform to each shader which takes either the value +1.0 or -1.0. When rendering to a texture, ANGLE sets this value to -1.0. When rendering to the default framebuffer, ANGLE sets this value to +1.0. ANGLE multiplies vertex positions by this value in the VS to invert rendering when appropriate. It also corrects other state (e.g. viewport/scissor rect) and shader built-in values (e.g. gl_FragCoord). This saves a substantial amount of GPU time and lowers power consumption. For example, the old method (where ANGLE renders all content onto an offscreen texture, and then copies/inverts this onto the swapchain at eglSwapBuffers() time) uses about 20% of the GPU each frame on a Lumia 630. Verification: + dEQP GL ES2 tests pass when "present path fast" is enabled + all ANGLE_end2end_tests pass when "present path fast" is enabled BUG=angleproject:1219 Change-Id: I56b339897828753a616d7bae837a2f354dba9c63 Reviewed-on: https://chromium-review.googlesource.com/326730 Tryjob-Request: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill d1c46228 2016-02-08T14:51:18 Revert "Implement EGL_experimental_present_path_angle" Compile failure on Clang/Win: The reason for reverting is: FAILED: ninja -t msvc -e environment.x86 -- "..\..\third_party/llvm-build/Release+Asserts/bin/clang-cl" -m32 /nologo /showIncludes /FC @obj\third_party\angle\src\tests\egl_tests\angle_end2end_tests.EGLPresentPathD3D11Test.obj.rsp /c ..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp /Foobj\third_party\angle\src\tests\egl_tests\angle_end2end_tests.EGLPresentPathD3D11Test.obj /Fdobj\gpu\angle_end2end_tests.cc.pdb In file included from ..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp:7: In file included from ..\..\third_party\angle\src\tests\test_utils/ANGLETest.h:13: ..\..\testing\gtest\include\gtest/gtest.h(1392,16) : error: comparison of integers of different signs: 'const int' and 'const unsigned int' [-Werror,-Wsign-compare] if (expected == actual) { ~~~~~~~~ ^ ~~~~~~ ..\..\testing\gtest\include\gtest/gtest.h(1422,12) : note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned int>' requested here return CmpHelperEQ(expected_expression, actual_expression, expected, ^ ..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp(281,9) : note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<int, unsigned int>' requested here ASSERT_EQ(mWindowWidth * 4, mappedSubresource.RowPitch); ^ ..\..\testing\gtest\include\gtest/gtest.h(1960,32) : note: expanded from macro 'ASSERT_EQ' # define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2) ^ ..\..\testing\gtest\include\gtest/gtest.h(1943,67) : note: expanded from macro 'GTEST_ASSERT_EQ' EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \ ^ BUG=angleproject:1219 This reverts commit 6b3c1db5170450bbc4946d8f18ba0d8619da43a0. Change-Id: Ia67ab82dd13295dc03235d57fa417c73f20a49e6 Reviewed-on: https://chromium-review.googlesource.com/326680 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross 6b3c1db5 2015-12-18T14:01:46 Implement EGL_experimental_present_path_angle This allows ANGLE to render directly onto a D3D swapchain in the correct orientation when using the D3D11 renderer. The trick is to add an extra uniform to each shader which takes either the value +1.0 or -1.0. When rendering to a texture, ANGLE sets this value to -1.0. When rendering to the default framebuffer, ANGLE sets this value to +1.0. ANGLE multiplies vertex positions by this value in the VS to invert rendering when appropriate. It also corrects other state (e.g. viewport/scissor rect) and shader built-in values (e.g. gl_FragCoord). This saves a substantial amount of GPU time and lowers power consumption. For example, the old method (where ANGLE renders all content onto an offscreen texture, and then copies/inverts this onto the swapchain at eglSwapBuffers() time) uses about 20% of the GPU each frame on a Lumia 630. Verification: + dEQP GL ES2 tests pass when "present path fast" is enabled + all ANGLE_end2end_tests pass when "present path fast" is enabled BUG=angleproject:1219 Change-Id: Ib6eeea46bafa6ebce4adada0ae9db3a433b8fc4c Reviewed-on: https://chromium-review.googlesource.com/321360 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 60ec6ea7 2016-01-22T15:27:19 Implement dirty bits for Framebuffer. The dirty bits set the stage for performance improvements in D3D, but don't actually reduce any of the redundant work just yet. BUG=angleproject:1260 Change-Id: Ib84e6a9b7aa40c37c41790f492361b22faaf4742 Reviewed-on: https://chromium-review.googlesource.com/318730 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Frank Henigman 82e3f3de 2016-01-22T17:55:44 Cast display parm for eglGetPlatformDisplayEXT. The native display parameter to eglGetPlatformDisplayEXT has type void*. When building with -DUSE_OZONE the native display type is intptr_t so a cast is needed. BUG=angleproject:1297 Change-Id: I947f5f9016926b6e3d590a2e29b5ee1fc883384d Reviewed-on: https://chromium-review.googlesource.com/323471 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Tested-by: Frank Henigman <fjhenigman@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>
Geoff Lang 5ade8459 2015-09-02T11:00:30 Properly check for EGL_KHR_create_context before creating ES3 context. Mark EGL_KHR_create_context as supported in the DisplayGLs. BUG=angleproject:1149 Change-Id: I20671535680eb2c3b9c08205cee243b3aa5c5821 Reviewed-on: https://chromium-review.googlesource.com/297080 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Cooper Partin 4d61f7ed 2015-08-12T10:56:50 Reland Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data' Additional warnings found with more testing and added C4267 warning disable only for angle_libpng BUG=angleproject:1120 Change-Id: Ic403dcff5a8018056fa51a8c408e64207f3362eb Reviewed-on: https://chromium-review.googlesource.com/293028 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez f3357ee2 2015-07-22T14:10:19 EGLWindow: remove the unused width and height EGLWindow does nothing with it per se, but some code was relying on it to store it. Add width and height to ANGLETest and SampleApplication instead. Also fix a typo in PerfTestParams, widowWidth -> windowWidth. BUG=angleproject:1105 Change-Id: I26da607a2e6342864b508a50ee3cf8944608f868 Reviewed-on: https://chromium-review.googlesource.com/287379 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 40888aab 2015-07-13T15:53:23 EGLWindow: correctly retrieve mAlphaBits BUG=angleproject:1065 Change-Id: I1e396d1bd4d1c65edc3ad07bb32f895135d59474 Reviewed-on: https://chromium-review.googlesource.com/285180 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Cooper Partin 1bd7dd45 2015-06-11T08:58:53 Added 16-bit formats to GLConfigs to reduce offscreen texture memory usage. BUG=angleproject:1042 Change-Id: I7024bd47601a21b08cafbf6460d512151b53d035 Reviewed-on: https://chromium-review.googlesource.com/277002 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 87bef77c 2015-06-19T15:42:09 Compile end2end tests on MacOS This includes an implementation of OSX timer and path_utils. BUG=angleproject:891 Change-Id: Id5440a8321bcfd4a61f3fe35b4a3fc0c651f564f Reviewed-on: https://chromium-review.googlesource.com/278211 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 8e695edb 2015-06-15T17:00:44 Fix support for GL_MAX_ATTRIBS attributes. *re-land with fix for AMD/ES2/OpenGL.* An off-by-one bug slipped in that broke support for these edge case shaders. Bug introduced in https://chromium-review.googlesource.com/#/c/266928/ BUG=angleproject:1045 BUG=500116 Change-Id: If44f809d432221d1e17afc407d49e87e0cb7504c Reviewed-on: https://chromium-review.googlesource.com/277664 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang dd323e95 2015-06-09T15:16:31 Only run tests that the current hardware can support. For each config, determine if a context can be created at test instantiation time. This allows skipping of ES3 tests when the hardware does not support ES3. Updated the perf_tests to use the EGLPlatformParameters struct so that they can be filtered in the same way. Change-Id: If664604b057cec4005eb4b63bebd83cd4964b7b2 Reviewed-on: https://chromium-review.googlesource.com/276460 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 39fcf263 2015-06-08T14:39:07 Use both null and real renders for draw call perf. Introduce a "null" GL renderer for this specific benchmark, which does not do any work on drawArrays and drawElements. We could use the same kind of trick for buffer and texture updates, if we need it. This gives us a good baseline for comparing GL and D3D perf. BUG=angleproject:1040 Change-Id: I4bf7c75df01932de45ddd0a4e42e8fc82f15e37e Reviewed-on: https://chromium-review.googlesource.com/276192 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill ce232678 2015-05-28T13:26:02 Add a perf test for eglInitialize. Also shutdown performance, since it's not easy to only test one. BUG=angleproject:1014 Change-Id: I9d06426788ed336031271f8876589b111f1294b7 Reviewed-on: https://chromium-review.googlesource.com/273974 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Corentin Wallez 91c2fadf 2015-05-15T10:34:14 Fix more warnings in samples and tests These warnings are currently disabled because these files are not with angle_code set to 1 in the gyp files to avoid gtest's code warnings. We hope to either fix warnings in gtest or change our build system to not use warnings for gtest. BUG=angleproject:1003 Change-Id: I281781b77f92ef8c394dd53fbbd50d525e4da5c9 Reviewed-on: https://chromium-review.googlesource.com/271412 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 1f67547b 2015-05-14T11:47:33 EGLWindow: remove redundant EGL_NONE to finish attrib list. Only one EGL_NONE is needed to signal the end of the list. BUG=angleproject:892 Change-Id: I7de349bef9d674344ccd1b2c4801d8b42c801299 Reviewed-on: https://chromium-review.googlesource.com/271157 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 12fe4dc8 2015-05-04T12:50:08 Fix pointer to int conversion warning in EGLWindow.cpp BUG=angleproject:892 Change-Id: Ic40f29c811d18efea0e081c269ca43d0170488a4 Reviewed-on: https://chromium-review.googlesource.com/269122 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/270125
Corentin Wallez bf9e4050 2015-05-06T15:13:05 EGLWindow: specify the device type only on d3d platform BUG=angleproject:892 Change-Id: I0406e26910f5a012ccb9e533af18e831522161b1 Reviewed-on: https://chromium-review.googlesource.com/269666 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/269827
Jamie Madill 4ea209f1 2015-05-07T15:32:26 Revert "EGLWindow: specify the device type only on d3d platform" Causing failures in EGLSurfaceTest.MakeCurrentTwice on Windows BUG=angleproject:892 This reverts commit 118e7195fdaa76a1f3aa52bbed30fdb97cc3fd4a. Change-Id: Ifbb17d1c9bc0390abadbfb8f78cf14dbf1bb8e83 Reviewed-on: https://chromium-review.googlesource.com/269950 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 118e7195 2015-05-06T15:13:05 EGLWindow: specify the device type only on d3d platform BUG=angleproject:892 Change-Id: I2dda3a8d15e58d15a401258a5a64c5783ea1a132 Reviewed-on: https://chromium-review.googlesource.com/269666 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez fe2f3d63 2015-05-05T17:37:39 Add a basic support for Linux for utils/ * Timer and path utils are done. * Window only implements initialize and setVisible BUG=angleproject:892 Change-Id: I3f49b68ef9ec5be324b25e211199bac2953ae11e Reviewed-on: https://chromium-review.googlesource.com/269520 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill c07c43e4 2015-05-04T18:20:24 Revert "Fix pointer to int conversion warning in EGLWindow.cpp" Causes a compile error. BUG=angleproject:892 This reverts commit d424da4a4c5f9eb08632738c53ca4604c3b808f1. Change-Id: Ieb8bb99d02f7050306974db5dab72d26474891ac Reviewed-on: https://chromium-review.googlesource.com/268996 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 72196b74 2015-05-04T12:50:53 Add missing trailing newline before EGLWindow.cpp EOF BUG=angleproject:892 Change-Id: Iaf175a310ce2acb5a8715902b3d367aa3dae8e2c Reviewed-on: https://chromium-review.googlesource.com/269124 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 75af569c 2015-05-04T12:50:30 Add missing include in EGLWindow.cpp BUG=angleproject:892 Change-Id: I23cfbd9cfbe7d41e048a2b2a4eea048f5de72d12 Reviewed-on: https://chromium-review.googlesource.com/269123 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez d424da4a 2015-05-04T12:50:08 Fix pointer to int conversion warning in EGLWindow.cpp BUG=angleproject:892 Change-Id: If6f0eb13bca10f9328faeaab35665a67e7ef6e44 Reviewed-on: https://chromium-review.googlesource.com/269122 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 77a72f6e 2015-04-14T11:18:32 Release Surface when calling makeCurrent with null. Refactorings to egl::Surface to enable ref-counting were causing a situation where we could have two Window surfaces alive at the same time. This would confuse the window procedure logic in SurfaceD3D. Releasing the surface fixes this issue and conforms closely to the wording on the spec on when Surfaces should be deleted. Also add a test for message loops and surfaces. BUG=475085 BUG=angleproject:963 Change-Id: Icdee3a7db97c9b54d779dabf1e1f82a89fefc546 Reviewed-on: https://chromium-review.googlesource.com/265064 Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 7825f619 2014-11-26T16:19:41 Update ANGLE_platform_angle_d3d to use a device type enum instead of WARP bool. BUG=angle:490 Change-Id: I1555e7f09b23138753e52ddf720d088587f7cadb Reviewed-on: https://chromium-review.googlesource.com/232104 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 15dc05fc 2015-01-22T13:31:46 Only request PostSubBuffer support when the extension is available. BUG=angle:658 Change-Id: I6828290ef89c57e8c794f0fca6e5991c492b67aa Reviewed-on: https://chromium-review.googlesource.com/242572 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0d3683c4 2014-10-23T11:08:16 Update ANGLE_platform_angle to allow requesting of Renderer versions. Added enums to allow users to request major and minor versions of the underlying API and if a WARP device is used. BUG=angle:490 Change-Id: I0bfb2ac8d327da28a47cc8e6346300e47ab9538c Reviewed-on: https://chromium-review.googlesource.com/225081 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4119ed3d 2014-10-01T10:41:40 Make OSWindow a non-static member of ANGLETest. BUG=angle:611 Change-Id: I455e1dd0ad5582191621e316c4808a2d753e9aaa Reviewed-on: https://chromium-review.googlesource.com/219867 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross 18b931d5 2014-09-29T12:58:31 Configure Google Tests to run against multiple renderers/GLES versions BUG=angle:611 Change-Id: I7d43612171c439045038db9ae82fd8716c0b31c6 Reviewed-on: https://chromium-review.googlesource.com/220400 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com>
Jamie Madill 3757a5ae 2014-08-26T13:16:36 Allow app to specify EGL Window extra parameters. Extra parameters include pixel bit sizes, swap interval and if we want multisampling. This gives parity between the tests and samples EGL creation options. BUG=angle:730 Change-Id: I68d619c2ea141794f0089456bb6bba3d3b1c2a07 Reviewed-on: https://chromium-review.googlesource.com/213296 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 586666ce 2014-08-21T10:04:05 Make the sample app own the OS Window object. This allows us to use OS Windows and EGL contexts differently for different implementations - eg, tests and samples. BUG=angle:730 Change-Id: I65e69fd829c3dbf2f1b406d90045bc296798ebb6 Reviewed-on: https://chromium-review.googlesource.com/213290 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 1cfaaf8a 2014-08-21T10:04:04 Add a util project to share between samples and tests. This code shares the Window and EGL logic between the two projects. BUG=angle:730 Change-Id: I8940371226a8f7b02579c332f51679c4a5d0e2a5 Reviewed-on: https://chromium-review.googlesource.com/212799 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>