util/windows/WGLWindow.cpp


Log

Author Commit Date CI Message
Mark Lobodzinski 9e47cbd3 2023-05-18T14:40:37 Capture/Replay: Rework trace EGLDisplay handling Refactor the trace-replay EGLDisplay handling to allow initializing the global EGLDisplay handle in the InitializeReplay4() body. This included adding support for eglGetCurrentDisplay() to the EGL-on- WGL shim. Test: angle_trace_tests --gtest_filter=infinity_ops Bug: b/282725258 Change-Id: I2319fd9a35f8fb9c0a7f10547ca39f49ce402b8d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4546267 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Mark Łobodziński <mark@lunarg.com>
Cody Northrop 202fcb8d 2022-11-21T15:05:13 TraceTest: Route EGLSync entry points through WGL Test: diablo_immortal trace Bug: angleproject:7402 Bug: angleproject:7839 Change-Id: I8897337bac38cb1923e58a9503de01454766158d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4044865 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop bae82cfa 2022-10-31T17:11:45 TraceTest: Route eglGetError through WGL eglGetError is not implemented, but shouldn't crash on Windows. Bug: angleproject:7799 Change-Id: I61158ab21b86539020b5d492486333a56908ab69 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3995984 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill 5b3781ec 2022-10-03T16:09:35 Remove namespacing from all ANGLE loaders. This will make it easier to work with pure C files. Bug: angleproject:7731 Change-Id: I2fe9af486af5f339d973c9149f082eb1f2efa8c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3925426 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 785353fd 2022-05-24T12:40:16 Support Desktop OpenGL context creation in end2end tests Validation of Desktop GL versions and profile masks is unimplemented. Bug: angleproject:7360 Change-Id: Ifae94215b6aada895c2b02318a1d05c9515e9b96 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3664916 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gert Wollny fd9301c1 2022-06-17T12:25:10 Capture/Replay: Capture egl surface related calls Creation from a pbuffer and generalized destruction are implemented, as well as binding and releasing a TexImage and making the context current with explicit draw and read surfaces given. Bug: angleproject:4964 Bug: angleproject:6180 Bug: angleproject:6512 Change-Id: Id8be6486125d45341905f3aabdbae4366cd568b7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3711741 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gert Wollny 029a4c94 2022-05-10T13:02:03 util: Add calls for createImage* and destroyImage* to GLWindow This adds the interface to the GLWindowBase, an implementation to EGLWindow, and placeholder functions to WGLWindow. Bug: angleproject:4964 Change-Id: Ia13f5237500cece9564910c95c6c5eea67ca022d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3637559 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Lubosz Sarnecki e024635d 2021-09-10T13:56:28 ANGLEPerfTest: Skip tests when missing color space support. Make tests where a non-linear colorspace was requested on platforms that do not support EGL_KHR_gl_colorspace non-fatal. Add a initializeGLWithResult function to GLWindowBase, returning a new GLWindowResult enum and wrap it in EGLWindow and WGLWindow. Bug: angleproject:6366 Change-Id: Ib57327c4d988d82064272f229f8ad59287541623 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3151833 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Lubosz Sarnecki 952cb6a1 2021-09-24T11:24:15 WGLWindow: Add support for color spaces. Add WGL_ARB_pixel_format and WGL_EXT_colorspace to generate_loader.py. Call wglChoosePixelFormatARB from WGL_ARB_pixel_format and use enums from WGL_EXT_colorspace. Fall back to ChoosePixelFormat if wglChoosePixelFormatARB is not available or does not find a format. Bug: angleproject:6366 Change-Id: I900f6fd6ee0501d5343f21c303b40f1347a53765 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3181720 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Tim Van Patten 58bb11ca 2021-04-16T12:28:50 Capture/Replay: Multi-Context Support Add support for capturing and replaying multiple contexts. 1.) Create and initialize the Contexts in the share group during SetupReplay(). 2.) Track the Context the command stream is for, and if the Context ID changes, inject an eglMakeCurrent() call to switch to the new Context. 3.) Intercept eglCreateContext() and eglMakeCurrent() to route to either EGLWindow or WGLWindow, depending on the current platform. Specifically, this enables capturing and replaying Asphalt 9. Bug: angleproject:5878 Change-Id: I5bc9b7ece5388ce405ba3f9e9dc3967e78662000 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2830145 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 308078b0 2020-07-24T11:02:21 Tests: Add getProcAddress method to GLWindowBase. This will allow the Trace tests to load a custom GL after the GL window has already loaded the default entry points. Bug: angleproject:4845 Change-Id: Ic1b65b6cf1a582ea7c2f58a9f76077760e5cf0d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2315626 Reviewed-by: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill aad69df9 2020-06-11T13:27:52 Run TracePerfTests in WGL configs. Uses the "native" naming pattern. Bug: angleproject:4728 Change-Id: I28cafcdb8c5c1fb48bba51adeca641e88bfe3446 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2241619 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 930b2641 2020-03-23T14:47:03 Allow tests to run on native EGL. Adds support for Linux and Android native EGL testing. This can be useful for doing performance comparisons of ANGLE vs a native GL driver. Only enabled for the trace perf tests due to limitations in the test harness. Bug: angleproject:4596 Change-Id: Iba6d3ccd7c1275cf095893fab824a0ea33dc3a79 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2116254 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill a6206854 2019-10-24T12:55:09 Enable "-Wmissing-field-initializers". This is another warning required by Skia. This one didn't find anything that surprising. Enabling the warning does help enforce code consistency and avoids a bit of possible undefined behaviour. Bug: angleproject:4046 Change-Id: Ifec7f4afad49cd820bf3c0a79df3f46559473ee2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1877477 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 57b37b6b 2019-09-25T18:29:28 Rename util/system_utils to util/test_utils. This removes a GN naming conflict between util/system_utils and common/system_utils. This conflict was preventing us from adding unit tests to utils' version of system_utils. Since these functions are only useful to tests and samples rename them test_utils for simplicity. Will enable further development of ANGLE's standalone testing harness. Bug: angleproject:3162 Change-Id: I9e34fb69f96c5de6dc2453fce4148a0f285e15ed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1825268 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3089f92e 2019-05-01T15:11:46 Move EGL Display config into EGLPlatformParameters. This CL moves all of the EGLDisplay configuration into an EGL platform struct. Consolidating display configuration in the struct allows us to move configuration out of the test constructor. Then when we filter test configs we don't need to wait for the individual test setup. Bug: angleproject:3393 Change-Id: I5bd06dcdc9f2867ebc43c1d4984077ada35cafc8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574674 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 0659c991 2019-04-30T16:14:43 Set swap interval explicitly. The swap interval can be changed independent of the Surface config. Thus it makes more sense to set it explicitly in test setup. This simplifies the test config. Also updates some of the API for GLWindowBase. Return an explicit error from makeCurrent. Bug: angleproject:3393 Change-Id: Ic62b33018e872bc0e38f2848e2427ed898b60749 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574672 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0f566fc7 2019-03-20T11:36:29 Introduce ConfigParameters test helper struct. This allows us to more easily compare sets of parameters used in our tests. The config parameters are stuff like the red / gree / blue bits used in an EGL config. Or particular sets of extensions or other EGL options. This will more easily allow us to determine when we need to use a new EGL display instead of reusing a prior. Bug: angleproject:3261 Change-Id: Ia1f0ede988e0b4084fbb4d55097e94fd89ee4899 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1531535 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 57041007 2019-03-14T13:33:24 Revert "Fix several WGL test failures." This reverts commit 13a8c4d84e16137c47cb2f958b24c08797527cfc. Reason for revert: Seems to have led to a flakier situation: https://ci.chromium.org/p/chromium/builders/ci/Win10%20FYI%20Debug%20%28NVIDIA%29/3006 https://ci.chromium.org/p/chromium/builders/try/win-angle-rel/1231 Original change's description: > Fix several WGL test failures. > > SimpleOperationTest.ClearAndSwap/ES2_WGL failed when run in isolation, > since getGLWindow()->hasError() would report a previous error, > instead of result of swapBuffers(). > When running after an OPENGL test, swapBuffers() would clear > the previous error, but that doesn't happen in isolation. > > The previous error is from loading WGL functions, some of which are > expected not to be present. Clear the error in GetProcAddressWithFallback, > but verify that there is no error entering it. > > This uncovers more errors in angle_perftests: > DrawCallPerfBenchmark.Run/wgl > DrawCallPerfBenchmark.Run/wgl_tex_change > DrawCallPerfBenchmark.Run/wgl_vbo_change > DrawElementsPerfBenchmark.Run/wgl_ushort > They come from redundant calls when destroying a window. Fix this as well. > > Several more errors where uncovered by debug prints, fix those, too. > > Bug: angleproject:3153 > Change-Id: I559c098be9dcdfd3add83f045f745d190250b986 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1515602 > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> TBR=ynovikov@chromium.org,geofflang@chromium.org,syoussefi@chromium.org,jmadill@chromium.org Change-Id: I095fadc0dd3a2c998c1dc86f3760184ae6fd7309 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:3153 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1523527 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 13a8c4d8 2019-03-11T15:54:47 Fix several WGL test failures. SimpleOperationTest.ClearAndSwap/ES2_WGL failed when run in isolation, since getGLWindow()->hasError() would report a previous error, instead of result of swapBuffers(). When running after an OPENGL test, swapBuffers() would clear the previous error, but that doesn't happen in isolation. The previous error is from loading WGL functions, some of which are expected not to be present. Clear the error in GetProcAddressWithFallback, but verify that there is no error entering it. This uncovers more errors in angle_perftests: DrawCallPerfBenchmark.Run/wgl DrawCallPerfBenchmark.Run/wgl_tex_change DrawCallPerfBenchmark.Run/wgl_vbo_change DrawElementsPerfBenchmark.Run/wgl_ushort They come from redundant calls when destroying a window. Fix this as well. Several more errors where uncovered by debug prints, fix those, too. Bug: angleproject:3153 Change-Id: I559c098be9dcdfd3add83f045f745d190250b986 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1515602 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 624ce6a3 2019-01-04T14:17:24 Pass GN header visibility check. Updates angle_util to see the loader includes even if the loader is not enabled. This makes the GN check happy. Bug: angleproject:3052 Change-Id: Ifd23070385beefede4358c7b4c1823dc87b5ded8 Reviewed-on: https://chromium-review.googlesource.com/c/1395809 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: 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>