src/libANGLE/validationEGL.cpp


Log

Author Commit Date CI Message
Geoff Lang 4e6f6545 2020-04-16T16:31:24 GLX: Support X11 pixmaps Add support for creating EGL pixmaps from X11 pixmaps using GLX. Pixmaps are needed for various external APIs such as VAAPI. Add support for EGL_NOK_texture_from_pixmap to allow binding pixmaps to textures. BUG=angleproject:4560 Change-Id: I4a6d3ad7e87151ff5317bbdaaf093ac1b46daf5f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2153805 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Sunny Sachanandani 3d5f0c82 2020-05-19T20:05:57 Use surface texture offset for clears and blits https://chromium-review.googlesource.com/c/angle/angle/+/2186176 added surface texture offset attributes for D3D11 pbuffer surfaces, but the implementation didn't apply the offset to blits or clears. This CL fixes that and includes a unit test for blit, clear, and draw. Also renames textureOffset to surfaceTextureOffset throughout since it's clearer, and fixes the dcomp surface test to specify the update offset returned by dcomp BeginDraw(). Bug: angleproject:2997 Change-Id: I9298ccf55cbb2d04c3b8f78e12f9d07dc8fa54b5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2210967 Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Sunny Sachanandani 4b225c70 2020-05-06T15:38:12 Add texture offset attributess for D3D texture pbuffer surfaces Add EGL_TEXTURE_OFFSET_X_ANGLE and EGL_TEXTURE_OFFSET_Y_ANGLE attributes to EGL_ANGLE_d3d_texture_client_buffer which are used to specify offsets used for rendering into the pbuffer surface backed by a D3D11 texture. Rendering with the correct offset is needed when Chrome gets a texture and offset from an external source e.g. when calling BeginDraw() on IDCompositionSurface. Bug: angleproject:2997 Change-Id: I363f739f3f05c38720f385e34c91e98fc6a622a0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2186176 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Patrick To a2ec926c 2020-01-02T19:07:38 Specify LUID in D3D11 Add an extension to provide the ability to specify the LUID of the GPU adapter to use when using D3D11. Corresponding chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/2096778 Bug: chromium:792657 Change-Id: Iefebea221a4b7a20f150b445ae1adf375444726d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2096663 Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jiajia Qin 85ae836f 2020-03-30T16:03:47 GL: Implement EGL_EXT_image_dma_buf_import Add support for the EGL_EXT_image_dma_buf_import on EGL implementations that support it natively. This extensin is used on ozone to import native compositing buffers. This patch also adds new tokens in EGL_EXT_image_dma_buf_import_modifiers which are used in eglCreateImageKHR. BUG=angleproject:4529 Change-Id: I49bff831b591fb19fcdcec1145c7a61f5d8020c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2128190 Commit-Queue: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jeff Vigil e20f36f4 2020-04-21T15:45:44 EGL: Implement EGL_ANDROID_native_fence_sync on vulkan Check the following - 1. Vulkan ICD supports VK_KHR_external_fence_fd 2. ExternalFenceProperties and ExternalSemaphoreProperties support Android FD. eglCreateSync - if FD was provided import to VkFence, else create VkFence with new FD and then flush and submit VkFence on next vkQueueSubmit. eglGetSyncAttrib - for status call vkGetFenceStatus. eglDupNativeFenceFdANDROID - return FD from vkGetFenceFD call. eglClientWaitSync - call vkWaitForFences. eglWaitSync - dup FD, create VkSemaphore and import FD, then flush() and add VkSemaphore to next vkQueueSubmit as a waiting semaphore. Extended end2end test suite with nativefence test cases. Bug: angleproject:2517 Test: angle_end2end_tests --gtest_filter=EGLSyncTest.AndroidNativeFence_* Change-Id: I8f6a6f4c3d71d83007f662b78377aa015a740035 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2026177 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Mohan Maiya dac5cc3b 2020-04-08T18:26:46 EGL: Add support for EGL_EXT_image_gl_colorspace extension Add support for creating images with custom colorspace. Bug: angleproject:3756 Tests: angle_end2end_tests --gtest_filter=ImageTest* Change-Id: I9c332c012541c094728d9d9bde7add4189084a33 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2104088 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Jonah Ryan-Davis 4b94d7bb 2020-03-24T17:23:19 Split EGL_CHROMIUM_sync_control into EGL_ANGLE_sync_control_rate eglGetMscRateCHROMIUM was added to EGL_CHROMIUM_sync_control based on the original extension GLX_OML_sync_control. However, this new function is not universally implemented. This CL moves it to a new extension, EGL_ANGLE_sync_control_rate, and renames it to eglGetMscRateANGLE. Bug: chromium:1064078 Change-Id: Ia2a29c6776b2b2bf2b98e58ee83b5f141ed01301 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2118154 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Julien Isorce 07044c65 2020-03-03T00:13:03 Reland "Instantiate rx::DisplayEGL when device type EGL is selected" This is a reland of 7455b54401dd55833944b5ad857ccd9852ef6a79 Original change's description: > Instantiate rx::DisplayEGL when device type EGL is selected > > Define EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE that should be > used to request a driver egl-backed implementation with ANGLE. > > Bug: angleproject:4328 > Change-Id: I6871d3a27e2bfc02af9815dcf86ae1cb6524f0cc > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2030038 > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: angleproject:4328 Change-Id: I4e997c4fa1b5b59f081436f05bd208303ffe38e9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2093412 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
Ian Elliott 03ed5f6c 2020-03-06T22:15:42 Revert "Instantiate rx::DisplayEGL when device type EGL is selected" This reverts commit 7455b54401dd55833944b5ad857ccd9852ef6a79. Reason for revert: This appears to break the "Linux FYI Ozone (Intel)" bots on the chromium.gpu.fyi waterfall. Ozone means ChromeOS. Original change's description: > Instantiate rx::DisplayEGL when device type EGL is selected > > Define EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE that should be > used to request a driver egl-backed implementation with ANGLE. > > Bug: angleproject:4328 > Change-Id: I6871d3a27e2bfc02af9815dcf86ae1cb6524f0cc > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2030038 > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,syoussefi@chromium.org,jonahr@google.com,julien.isorce@chromium.org Change-Id: I8aec6c2783b0acb67d3315d351cdc9e526f58d6b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:4328 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2091864 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Julien Isorce 7455b544 2020-03-03T00:13:03 Instantiate rx::DisplayEGL when device type EGL is selected Define EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE that should be used to request a driver egl-backed implementation with ANGLE. Bug: angleproject:4328 Change-Id: I6871d3a27e2bfc02af9815dcf86ae1cb6524f0cc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2030038 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis 698ffd02 2020-02-27T10:59:13 eglGetConfigAttrib validation missing extension check The extension EGL_ANGLE_iosurface_client_buffer adds a new attribute to the config: EGL_BIND_TO_TEXTURE_TARGET_ANGLE. However, validation was not checking the extension was present when this attribute was requested. Bug: chromium:1015454 Change-Id: I24c6e20f3b602e8a71a46f0f1e99c1472d5bbb1e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2078892 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 806ba566 2019-12-12T13:02:01 Extend ANGLE_iosurface_client_buffer to Vulkan backend for Swangle Implement an IOSurface-backed pBuffer surface for the Vulkan backend on Mac, through SwANGLE. ANGLE will pass a raw pointer to Swiftshader and handle locking/unlocking the IOSurface. Bug: chromium:1015454 Change-Id: Ia3ead55334736003d405b54ba8dcc7701706fbb2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1965434 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 1a1a1427 2020-01-23T13:57:21 Expose eglGetMscRateCHROMIUM from EGL_CHROMIUM_sync_control When ANGLE is using the GL backend on GLX, we can expose eglGetMscRateCHROMIUM via glXGetMscRateOML. Otherwise, this function should return false. Bug: chromium:1042393 Change-Id: Id9b308c2217e07ee9860e2869be0e23b7a0c7411 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2017048 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jeff Vigil 564eb6f2 2019-11-22T16:46:02 Implement EGL_IMG_context_priority Change RendererVk to have 3 VkQueues instead of one. Each queue has a priority. To match extension: Low, Med, High. gl::Context contains priority. ContextVk contains a reference to one of the queues. Every call to vulkan that uses queue, uses the associated context queue. Bug: angleproject:3962 Change-Id: Ibd913a07a81c77bd975921d6dbae6a222842e88b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1978154 Commit-Queue: Jeff Vigil <j.vigil@samsung.com> Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jeff Gilbert 23521ca3 2020-01-22T18:42:56 Validate `context` before use in ValidateStreamConsumerGLTextureExternalAttribsNV. Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1608235 Bug: angleproject:4333 Change-Id: I957b6412f7c744e4bbaa7d8084b3c81ee58d45ca Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2015838 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Alexis Hetu 94de306d 2020-01-14T16:18:56 Extensions suffixes Added NV/OES suffixes to relevant Extensions members. Bug: angleproject:3104 Change-Id: Ia1798157086230bde8d11c6fcb4fe93211e996ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2013168 Reviewed-by: Alexis Hétu <sugoi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Mohan Maiya df0203a9 2020-01-15T14:05:33 EGL: Add support for EGL_EXT_pixel_format_float extension Add support for floating point configs. On backends that support rendering to floating point formats, add them to EGL's frambuffer config list Bug: angleproject:3958 Tests: dEQP-EGL.functional.wide_color.*fp16* angle_end2end_tests --gtest_filter=EGLFloatSurfaceTest* Change-Id: Ie65f63013483267985c2b308567bf5025acf750e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1993686 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Kenneth Russell 86f73097 2020-01-10T16:19:02 Upstream support for iOS Simulator. Originally authored in the WebKit repository: https://bugs.webkit.org/show_bug.cgi?id=205618 Has been tested with WebKit's WebGL backend on top of ANGLE inside the iOS Simulator. TODOs will be addressed in forthcoming CLs. Bug: angleproject:4263 Change-Id: Ic879866aaee5f933599d956b0646d0c01db55d0d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1995824 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Jeff Vigil 8c0bbfbb 2019-11-25T14:48:11 EGL: Implement EGL_ANDROID_framebuffer_target Add attribute to configs. Add attribute matching logic. Does not set attribute in Vulkan configs, need solution to query Android for which formats are valid. anglebug.com/4208 New end2end test. Bug: angleproject:3961 Test: angle_end2end_tests --gtest_filter=EGLAndroidFramebufferTargetTest* Change-Id: I7e14c47b39e9539f6181c3c1d75c76fe63ca0f8c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1960508 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Mohan Maiya 942d9152 2019-12-23T15:31:52 EGL: Add support for EGL_KHR_gl_colorspace extension If the Vulkan backend supports VK_EXT_swapchain_colorspace extension, enable the option for applications to create surfaces with non-linear formats. Not all formats have non-linear versions and is platform specific. Tests: dEQP-EGL.functional.wide_color.* angle_deqp_egl_tests --use-angle=vulkan --deqp-gl-context-type=egl --deqp-case=dEQP-EGL.functional.wide_color.* Bug: angleproject:2514 Change-Id: I441ee797cceef92c84473bfa18605c4fd8180de1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1951963 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Xinyi He 4c7db77e 2019-10-31T15:42:31 Vulkan: Set limitation on maxComputeWorkGroupCount According to Table 20.45 and Chapter 17 in the ES 3.1 spec, MAX_COMPUTE_WORK_GROUP_COUNT is get as a GLint by using GetIntegeri_v. However, it is an unsigned integer in the Vulkan. It needs to set limitation on maxComputeWorkGroupCount[] during translating. 1. Change the data type to GLint stored in Caps. 2. Ensure that the limitation is set during initialization. 3. Add workaround for angleproject:4120 Bug: angleproject:4066 Change-Id: I1659ba1d560e30b9599cace0feeab8a18890c3ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1890586 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis a829c0b9 2019-11-14T16:49:02 Expose EGL_CHROMIUM_sync_control via GLX_OML_sync_control On GLX, we can expose the EGL_CHROMIUM_sync_control extension by forwarding to GLX_OML_sync_control when it's available. This will help with accurate vsync times for Chrome Bug: 1020252 Change-Id: I9b1e8cf0f8b1a548cc7cc7202fac2d0cdb01d74d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1918104 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill c898ec1a 2019-11-04T15:20:18 Add EGL GGP extensions. This CL adds two new extensions: * EGL_ANGLE_ggp_stream_descriptor: Introduces a new attribute to CreateWindowSurface. Allows the app to pass in a stream descriptor to VkCreateSurfaceKHR. Mirrors VK_GGP_stream_descriptor_surface. * EGL_ANGLE_swap_with_frame_token: Introduces a new function 'eglSwapBuffersWithFrameTokenANGLE'. This allows the app to pass a GGP frame token down to vkQueuePresentKHR. Mirrors VK_GGP_frame_token. Bug: angleproject:4078 Change-Id: I4313ac4c264e68999905049f661bc64b44f72fab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1897315 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Le Quyen fe26bae4 2019-10-29T18:38:53 Metal backend implementation pt 2 This is without Metal specific shader translator implemented yet. Bug: angleproject:2634 Change-Id: I95d589442251c9ba111bd05a2dc379a36739046c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1855069 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Nathan Zabriskie 5d9c4ee3 2019-09-17T15:36:25 Add D3D11on12 device option This CL adds a new D3D11on12 device option which runs the D3D11 API on top of D3D12. This is done to aid in preliminary investigations into the feasibility of creating a full D3D12 backend implementation. Bug: angleproject:3919 Change-Id: I0ad4250eb3c93b0b74274c904aac74f03753c7ad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1814404 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 7dd03446 2019-09-30T13:50:12 Ensure Features* descriptions stay up to date Created a macro to help keep Features' descriptions up to date. This will avoid confusion in the future when conditions change. Also update all descriptions to match current state. Bug: angleproject:3947 Change-Id: Ifc65e7789c916fab79f1323798dfb59d7a4efad2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1829584 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f703443b 2019-09-21T14:10:35 Use Resource IDs in RefCountObject. This lets us use strongly typed IDs pretty much everywhere. Only one or two additional places still use GLuint IDs. Mostly for external queries and for Framebuffer Attachments. With some clever type reflection helpers lets us define a single template function for handling operator== and != for resource IDs. Refactor in preparation for more Capture/Replay work. Bug: angleproject:3611 Change-Id: I1c0c848e89eb8a4b769714d57686f816daf01634 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1815550 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>
Jamie Madill 8be7a4c7 2019-09-19T12:48:31 Re-land "Vulkan: SwiftShader integration." Re-land fixes Win7 configs and placement of the SwiftShader module for ASAN/TSAN configs. Adds a new EGL extension for picking SwiftShader when using the Vulkan back-end. Also cleans up ICD enabling code RendererVk. Also includes a change to a buffer size necessary to support SwiftShader's minimum limits. Bug: angleproject:3876 Bug: b/140251624 Change-Id: I5e16057ac4de07bbdbbd248542b1b9103133294f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1810065 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jeff Vigil a7003d5f 2019-07-19T11:43:34 Reland "EGL: Implement EGL_KHR_no_config_context" Add extension string and flag to all renderers that pass Modify eglCreateContext to accept EGL_NO_CONFIG Modify eglQueryContext per specification Modify eglMakeCurrent to bypass surface-context config compatibility checks Add check for client API Create new end2end test EGLNoConfigContextTest Disable on most renderers to prevent possible fail with future configs Bug: angleproject:3635 Test: dEQP-EGL.functional.create_context.no_config* angle_end2end_tests --gtest_filter=EGLNoConfigContextTest* Change-Id: I88c1922a1e75afcc49922a9eccb4f1ae046c024a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1806140 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Zhenyao Mo db7a36f4 2019-09-17T00:22:32 Revert "Vulkan: SwiftShader integration." This reverts commit 1224802c214d8f3d5b1f31a35d4461ada39b94c1. Reason for revert: https://bugs.chromium.org/p/angleproject/issues/detail?id=3912 Original change's description: > Vulkan: SwiftShader integration. > > Adds a new EGL extension for picking SwiftShader when using the Vulkan > back-end. Also cleans up ICD enabling code RendererVk. Also includes a > change to a buffer size necessary to support SwiftShader's minimum > limits. > > 32-bit is currently left disabled to work around an issue on AMD Win7. > > Bug: angleproject:3876 > Bug: b/140251624 > Change-Id: I33c55d994801d6154caca0cad0a608c1e808d517 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1776231 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,jonahr@google.com,jmadill@chromium.org Change-Id: Id7464250f6941b0228a6b2a9bd0349823727275b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:3876, b/140251624 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1808101 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Jamie Madill 1224802c 2019-09-16T15:17:33 Vulkan: SwiftShader integration. Adds a new EGL extension for picking SwiftShader when using the Vulkan back-end. Also cleans up ICD enabling code RendererVk. Also includes a change to a buffer size necessary to support SwiftShader's minimum limits. 32-bit is currently left disabled to work around an issue on AMD Win7. Bug: angleproject:3876 Bug: b/140251624 Change-Id: I33c55d994801d6154caca0cad0a608c1e808d517 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1776231 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Zhenyao Mo d32dae1b 2019-09-13T22:06:56 Revert "EGL: Implement EGL_KHR_no_config_context" This reverts commit c4b1fbd69b12c0af30a58d0810f88d1301b8dabd. Reason for revert: https://crbug.com/1003971 Original change's description: > EGL: Implement EGL_KHR_no_config_context > > Add extension string and flag to all renderers that pass > Modify eglCreateContext to accept EGL_NO_CONFIG > Modify eglQueryContext per specification > Modify eglMakeCurrent to bypass surface-context config compatibility checks > Add check for client API > Create new end2end test EGLNoConfigContextTest > Disable on most renderers to prevent possible fail with future configs > > Bug: angleproject:3635 > Test: dEQP-EGL.functional.create_context.no_config* > angle_end2end_tests --gtest_filter=EGLNoConfigContextTest* > Change-Id: I7fbb137f1222ae7eebff4192013b7d3c5fcf0436 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762709 > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,timvp@google.com,jmadill@chromium.org,m.maiya@samsung.com,j.vigil@samsung.com Change-Id: I849aa796803e3cda9b480a39be813ef9105325bb No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:3635 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1803789 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Jeff Vigil c4b1fbd6 2019-07-19T11:43:34 EGL: Implement EGL_KHR_no_config_context Add extension string and flag to all renderers that pass Modify eglCreateContext to accept EGL_NO_CONFIG Modify eglQueryContext per specification Modify eglMakeCurrent to bypass surface-context config compatibility checks Add check for client API Create new end2end test EGLNoConfigContextTest Disable on most renderers to prevent possible fail with future configs Bug: angleproject:3635 Test: dEQP-EGL.functional.create_context.no_config* angle_end2end_tests --gtest_filter=EGLNoConfigContextTest* Change-Id: I7fbb137f1222ae7eebff4192013b7d3c5fcf0436 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762709 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Sunny Sachanandani c1af9abf 2019-08-28T14:35:32 Add support for overriding internal format for D3D11 texture EGLImages Add an optional EGL_D3D11_TEXTURE_FORMAT_ANGLE attribute that is the GL internal format to use for EGLImage being created. This will be used for RGB emulation of swap chain texture backed WebGL contexts in Chrome when they have alpha:false set. Without RGB emulation it is possible to observe side-effects of the underlying swap chain being RGBA such as reading/writing the alpha channel, BlitFramebuffer working/not working when expected, etc. Also document creating EGLImages from D3D11 textures in the existing EGL_ANGLE_d3d_texture_client_buffer extension along with RGB emulation. Bug: chromium:699566, chromium:939657 Change-Id: I4931cb7bdc46e9bc6debd56b79ecc10ea27bd78b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1777099 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Tim Van Patten 56ba54cc 2019-08-08T13:03:34 Support separate read and draw surfaces in eglMakeCurrent Update ANGLE's default framebuffer implementation to support reading and writing to different surfaces within the same framebuffer. Bug: angleproject:2620 Test: EGLSurfaceTest[3] Change-Id: I4b1ea04ca87a751f80cf190bf3adec148fc4fce3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1744746 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jeff Vigil 265fdf0c 2019-07-31T15:10:44 EGL: Set errors per spec for eglCreateContext Per spec, in eglCreateContext when client version attributes are invalid - set EGL_BAD_ATTRIBUTE. Set EGL_BAD_MATCH when config is not compatible. Rename config variables in ValidateCompatibleConfigs to distinguish context from surface configs. Context config handled differently when EGL_NO_CONFIG. Bug: angleproject:3755 Test: angle_end2end_tests --gtest_filter=EGLCreateContextAttribsTest* Change-Id: Iaea57653cf643ff60c8d4eabd3f022306bf1f4ca Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1747298 Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2ab08edc 2019-08-12T16:20:21 Use TextureID in place of GLuint handles. Bug: angleproject:3611 Change-Id: Ie6156e8732b3ca4dc6c4439c059a5481a4dfd250 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1738753 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7c7dec01 2019-08-06T17:44:11 Use RenderbufferID in place of GLuint handles. This will allow frame capture/replay to more easily emulate object handle manipulation. It also provides a bit of type safety. Also generalizes ResourceMap to handle non-GLuint IDs. Bug: angleproject:3611 Change-Id: I174fd260f326e0dbe2aca3f818215c91d82cf48c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1706559 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6a02f06d 2019-07-18T16:27:14 Implement EGL_ANGLE_create_context_backwards_compatible This extension allows the user to specify if ANGLE should create a context of the exact requested version or a higher version context that is backwards compatible. BUG=angleproject:3425 Change-Id: I7d0b75cdd7e34a2fc888aa238e1eeb67af82ae0d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1601560 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 69e46a18 2019-07-03T14:43:32 GL: Implement EGL_ANDROID_native_fence_sync This extension allows Chrome to use ANGLE on newer Android devices. BUG=angleproject:3643 Change-Id: I5456d61749399ca2bbc11cc5e98b9120f8702406 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1687121 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 3fd0b2db 2018-09-20T15:59:54 Implement EGL_ANDROID_get_native_client_buffer. BUG=angleproject:2508 Change-Id: I21e6251cd1341c1f85f1ba16ba08f5876a8ff8de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1238885 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 62934322 2019-07-03T14:39:14 Make egl::Sync a LabeledObject. This allows us to return the Sync's label when validation fails for a Sync related entry point. BUG=angleproject:3643 Change-Id: I64e8a8855a2e3b51768c2b560fdc4696bb325351 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1687120 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Sunny Sachanandani f9686af0 2019-06-04T17:49:43 Add support for D3D11 texture backed EGLImages Implement EGL_ANGLE_image_d3d11_texture extension. Images created with this extension might not be renderable based on bind flags and resource usage of the client provided texture in which case attaching them to a framebuffer won't succeed. The intended use case is to bind the front and back buffers of a swap chain to GL textures that can be used for rendering in the case of the back buffer and as a shader input for the front buffer. Bug: chromium:939655 Change-Id: Ic3328e831880292217b88be84740740df6031fa6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1646732 Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Clemen Deng ebddd1a2 2019-06-11T16:32:46 implement core egl image entry points Bug: angleproject:2467 Change-Id: Ica943a3972333e90a516aa6960f333cc9c378be2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1653714 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis fce1e2d1 2019-06-04T15:02:08 Extend eglGetPlatformDisplay to allow feature overrides. Add EGL_FEATURE_OVERRIDES_ENABLED_ANGLE and EGL_FEATURE_OVERRIDES_DISABLED_ANGLE to submit lists of strings naming the features that should be overridden (either enabled or disabled) on display creation. Bug: angleproject:1621 Change-Id: I4bb75c5dbab0e3b701a72069c38f8c60ecfffad2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1646595 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis e431aaa1 2019-06-04T11:36:43 Rename EGL_ANGLE_workaround_control to EGL_ANGLE_feature_control. For consistency, call these ANGLE "features", a subset of which may be workarounds. Also, whether the feature is enabled/disabled should be publically visible as "status". Bug: angleproject:1621 Change-Id: I0de90a932fbfe1fc9b59138153d616d29fa7268b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1643410 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jonah Ryan-Davis 2dd40a44 2019-05-30T16:40:13 Add eglQueryDisplayAttribANGLE to query workarounds count. Add eglQueryDisplayAttribANGLE based on eglQueryDisplayAttribEXT to add behavior for quering the count of all workarounds available. Used externally to build a list of workarounds. Bug: angleproject:1621 Change-Id: I793acedc76111fd018600169d58bf5d8cf4a63ee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1637817 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis f52f2637 2019-05-23T13:52:52 Add EGL_ANGLE_workaround_control extension. This extension is used to query strings from an array based on index, which will be used to query all the information about workarounds in ANGLE. Bug: angleproject:1621 Change-Id: I27157f278f7f17c92c8b4fd7753e2a5ecd0528f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1627723 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten cd078c33 2019-05-01T10:36:11 Allow mis-matched Android Context versions Remove the EGL validation related to context version numbers since a backwards compatible context could be created and shared, causing a version mis-match. Test: angle_deqp_egl_tests Bug: angleproject:3243 Change-Id: Iae818433fea1b230b50aa47c14f084e9079c3583 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592133 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kenneth Russell 51386f4a 2019-04-11T21:55:20 Reland "Define and expose EGL_ANGLE_power_preference extension." This is a reland of ac58e63295f093b7518535bdd060ff832025b0c5 The original CL was reverted in a rush because I thought there was an uninitialized variable bug, but upon later re-review this turned out to not be the case. Original change's description: > Define and expose EGL_ANGLE_power_preference extension. > > Allows application to select the integrated or discrete GPU on > dual-GPU macOS systems. > > Tested by modifying the example program at: > https://github.com/grorg/ANGLEIOSurfaceTest > > and verifying that both integrated and discrete GPUs can be selected. > (The changes to that program will be upstreamed once some build issues > are resolved.) > > Bug: 2813 > Change-Id: Ibeb17778512896456d220e9bc4cf8f222aa57057 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1570081 > Commit-Queue: Kenneth Russell <kbr@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: 2813 Tbr: geofflang@chromium.org Tbr: cwallez@chromium.org Change-Id: Iea000dd718f4f4b4f57237adb1dc44381b10106b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575419 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Kai Ninomiya 145ec7fa 2019-04-19T01:50:34 Revert "Define and expose EGL_ANGLE_power_preference extension." This reverts commit ac58e63295f093b7518535bdd060ff832025b0c5. Reason for revert: Revert on kbr's request: "has an uninitialized variable bug" Original change's description: > Define and expose EGL_ANGLE_power_preference extension. > > Allows application to select the integrated or discrete GPU on > dual-GPU macOS systems. > > Tested by modifying the example program at: > https://github.com/grorg/ANGLEIOSurfaceTest > > and verifying that both integrated and discrete GPUs can be selected. > (The changes to that program will be upstreamed once some build issues > are resolved.) > > Bug: 2813 > Change-Id: Ibeb17778512896456d220e9bc4cf8f222aa57057 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1570081 > Commit-Queue: Kenneth Russell <kbr@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,kbr@chromium.org,cwallez@chromium.org Change-Id: Icb936d91eec70deb825585da3ff8835ca2794736 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 2813 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575134 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Kenneth Russell ac58e632 2019-04-11T21:55:20 Define and expose EGL_ANGLE_power_preference extension. Allows application to select the integrated or discrete GPU on dual-GPU macOS systems. Tested by modifying the example program at: https://github.com/grorg/ANGLEIOSurfaceTest and verifying that both integrated and discrete GPUs can be selected. (The changes to that program will be upstreamed once some build issues are resolved.) Bug: 2813 Change-Id: Ibeb17778512896456d220e9bc4cf8f222aa57057 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1570081 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill cfc73cc1 2019-04-08T16:26:51 Correct subImage uses of texture type -> target. Texture "types" are the same as texture "targets" except for cube maps. Cube map targets specify a single face. Cube map types specify a whole cube map. The subImage functions should take a target instead of a type. We were using both in different places. This CL corrects all uses in subImage calls to "target". It also adds a helper for getting a target texture from a target. And clarifies the naming of the texture query methods. Bug: angleproject:3356 Change-Id: I06eb5c5666eec9b8934becf2ba57a066d5cdabde Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558672 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f455f756 2019-03-20T20:49:44 Reuse angle_end2end_test windows and displays. This both speeds up test execution and cuts down on the number of new windows and displays created for a test config. This feature is only currently enabled for Windows NVIDIA and Intel. On every other config there were blocking issues that would need investigation. Several tests were manually flagged as needed new displays on each iteration to prevent test flakiness. This feature might fix the issues with Intel test flakiness that have been prominent on the ANGLE CQ. WGL configurations have also been removed from ANGLE tests. So this removes more of the code from ANGLETest.cpp. Bug: angleproject:3261 Change-Id: Ic2864d4806ad38e0eeaa3c0afcd54ae1c548090f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1520995 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Ian Elliott 3d6e3004 2019-02-01T15:43:59 Implement EGL_ANDROID_recordable for Vulkan back-end. This initial implementation provides the extension, and always answers that the ANativeWindow is not recordable. BUG=angleproject:2511 Change-Id: Id3c57351dd1029bff7adf7166f9c82eee6e634b3 Reviewed-on: https://chromium-review.googlesource.com/c/1412507 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 5313c8a8 2019-01-14T17:02:52 Implement EGL_KHR_fence_sync and EGL_KHR_wait_sync EGL_KHR_fence_sync introduces the EGLSync object and associated create/destroy/clientWait functions. EGL_KHR_wait_sync adds the serverWait function on top of that. Bug: angleproject:2466 Change-Id: Iebb239a85c4471ea18b3c3a8a83b793af555e31d Reviewed-on: https://chromium-review.googlesource.com/c/1412261 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c3dc5d48 2018-12-30T12:12:04 Merge gl::Context and gl::ContextState. This reduces the number of indrections when accessing the Extensions or Caps structures. It will provide a small speed-up to some methods. It also cleans up the code. Bug: angleproject:2966 Change-Id: Idddac70758c42c1c2b75c885d0cacc8a5c458685 Reviewed-on: https://chromium-review.googlesource.com/c/1392391 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
Tim Van Patten 29843628 2018-11-01T17:26:51 Fix failing dEQP EGL tests. dEQP-EGL.functional.query_surface.simple.pbuffer#rgb888_depth_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgb888_depth_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgb888_depth_no_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgb888_no_depth_no_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgb565_depth_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgb565_depth_no_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgb565_no_depth_no_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgba8888_no_depth_no_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgba8888_depth_no_stencil dEQP-EGL.functional.query_surface.simple.pbuffer#rgba8888_depth_stencil dEQP-EGL.functional.negative_api#choose_config dEQP-EGL.functional.negative_api#swap_interval Bug: angleproject:2546 Change-Id: Ie80e3ee3c65f330d2030b4d7da59cb964e4ea0a5 Reviewed-on: https://chromium-review.googlesource.com/c/1313233 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 6ba22ee1 2018-10-26T16:15:40 GL: Implement EGL_ANDROID_get_frame_timestamps. BUG=angleproject:2936 Change-Id: I758d797d185b2de330cce3401bfeef76c7df590e Reviewed-on: https://chromium-review.googlesource.com/c/1302836 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang c3ee7ec0 2018-09-21T16:15:03 Implement EGL_ANDROID_image_native_buffer. BUG=angleproject:2508 Change-Id: I8ef2ce8320edeb336727905055f47bb299dec2ea Reviewed-on: https://chromium-review.googlesource.com/c/1238886 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jeff Gilbert 5c72f28d 2018-09-18T17:03:59 Remove unused include global_state.h from validationEGL.cpp. Bug: angleproject:2825 Change-Id: I34a7c520d31cf0a9321d5599046159ef9bf58be5 Reviewed-on: https://chromium-review.googlesource.com/1232973 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4230d484 2018-09-14T10:14:45 Finish fixing EGL enums. This removes the temporary defines now that Chromium is up-to-date. Bug: angleproject:2806 Change-Id: I8e3308d6b80e49c2b2a7a698ee5d8ad40f442475 Reviewed-on: https://chromium-review.googlesource.com/1227031 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill f4d429c1 2018-09-13T11:20:52 Fix EGL enum allocation. The following enums had a small typo causing them to be takend from an unused block: EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE Fix this by temporarily defining a secondary enum. Once Chromium is fixed upstream we can remove the temporary enum. Reported by dan.glastonbury@gmail.com. Bug: angleproject:2806 Change-Id: I2ce1dec0a30d5e83f2bec0ae243fd860cbcea4fc Reviewed-on: https://chromium-review.googlesource.com/1220371 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 9137adea 2018-08-27T14:22:37 Add support for EGL_ANDROID_blob_cache The functionality of MemoryProgramCache is divided up in two. BlobCache is now a generic binary cache, which interfaces with the callbacks from EGL_ANDROID_blob_cache. MemoryProgramCache handles program [de]serialization and interacts with BlobCache. Bug: angleproject:2516 Change-Id: Ie4328a2e56a26338e033d84f4e53a1103411937d Reviewed-on: https://chromium-review.googlesource.com/1194285 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tobin Ehlis d20e80b8 2018-08-17T10:02:24 More EGL validation refactor Added separate Validate* functions for CopyBuffers(), BindTexImage(), ReleaseTexImage(), SwapInterval(), and BindAPI(). For ValidateBindTexImage() the textureObject is set by validation when appropriate and then used in the core function to prevent replicating the textureObject look-up code. Bug: angleproject:798 Change-Id: Ia32076a10aa0b044c2bdc8e2e24dd36d002c5022 Reviewed-on: https://chromium-review.googlesource.com/1180090 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tobin Ehlis <tobine@google.com>
Tobin Ehlis 43a2762d 2018-08-16T14:23:00 Refactoring EGL validation Migrating much of EGL validation to use existing macros. Added new Validate* functions for eglDestroySurface(), eglDestroyContext(), eglWaitNative() functions. This continues the EGL validation refactor begun with SwapBuffers. Following similar pattern used there, but putting this out as an intermediate change to verify that code looks good and is going in the desired direction. Bug: angleproject:798 Change-Id: Id7309b9686543c20b20e273b35df1f8b9010fcd3 Reviewed-on: https://chromium-review.googlesource.com/1178750 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tobin Ehlis 3394a73d 2018-07-26T09:56:07 Refactor of EGL SwapBuffers validation Move the Validation checks for SwapBuffers into new ValidateSwapBuffers function instead of in-line. This is a first commit for refactor of EGL validation. I'll continue the refactor in a similar fashion to this. Bug: angleproject:798 Change-Id: Icb308d66c93528c9e440ae68abe85e44f98ede82 Reviewed-on: https://chromium-review.googlesource.com/1151538 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
LRN 03d132eb 2018-07-14T13:31:35 Support EGL_(WIDTH|HEIGHT) in eglSurfaceAttrib(), fixed resize Setting EGL_WIDTH or EGL_HEIGHT results in mFixedWidth and mFixedHeight changing their values. Whenever the swap chain is tested for needing a resize, surfaces with mFixedSize are treated as if they should be resized to mFixedWidth and mFixedHeight from their current size. This way fixed-size surfaces can be resized - it's enough to do a couple of eglSurfaceAttrib() calls and then either let ANGLE check surface for needing a resize in due course, or force that by calling eglWaitNative(). BUG=angleproject:2725 Change-Id: I2932d8ecd5a2f10500e4aa8583a169aa09bf01bb Reviewed-on: https://chromium-review.googlesource.com/1139055 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang faf50849 2018-07-24T13:49:05 EGL: Validate that EGL_GL_TEXTURE_ZOFFSET is used only for 3D sources. BUG=angleproject:2507 Change-Id: I0e5879acfbb7ba1b9d711f518205cebad2edb643 Reviewed-on: https://chromium-review.googlesource.com/1148657 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@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>
Rafael Cintron 05a449a7 2018-06-20T18:08:04 Replace reinterpret_cast with safer or no cast When casting types to one another in C++, the weaker the cast, the better. This change replaces instances of reinterpret_cast with static_cast or no cast where it safe and correct to do so. BUG=angleproject:2683 Change-Id: I99c9033614a65282ae1d78cf0f4b80fabd75877a Reviewed-on: https://chromium-review.googlesource.com/1109396 Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 75359664 2018-04-11T01:42:27 Implement EGL_KHR_debug. BUG=angleproject:1618 Change-Id: I790944b49badc910b6c72266469fcb8e86ac4252 Reviewed-on: https://chromium-review.googlesource.com/1019387 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang e1a057e8 2018-06-07T15:09:00 Fully format some files. Change-Id: Id6ea245849696d4c6d7eabc6860c0ac424dd8013 Reviewed-on: https://chromium-review.googlesource.com/1091309 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 1da46774 2018-05-14T14:30:30 Add support for EGL_ANDROID_presentation_time. BUG=angleproject:2506 Change-Id: I46b3c6ac7f259eabfdd8ea5799da6ef563ff81ee Reviewed-on: https://chromium-review.googlesource.com/1057997 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang c2014bce 2018-05-28T16:09:04 Expose eglCreatePlatformWindowSurfaceEXT and eglCreatePlatformPixmapSurfaceEXT These entry points are part of EGL_EXT_platform_base but were never returned by eglGetProcAddress. BUG=angleproject:2603 Change-Id: I4782df67fa8625a9af29a18df02af7b5fa73d75e Reviewed-on: https://chromium-review.googlesource.com/1075469 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 3f1eba94 2018-05-10T15:53:22 Support EGL_KHR_swap_buffers_with_damage in the EGL backend. Update the EXT extension to KHR in ANGLE. BUG=angleproject:2544 Change-Id: Ia647191c3e762d658b0f7e28a34a9ce2cc545f48 Reviewed-on: https://chromium-review.googlesource.com/1054415 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Courtney Goeltzenleuchter 390900a0 2018-05-18T09:44:59 Add support for EGL_PLATFORM_ANGLE_EGL_HANDLE_ANGLE To support ANGLE for Android need a way to tell ANGLE what library to call when using GL backend. Bug: angleproject:2418 Test: test-opengl-gl2_copyTexImage Change-Id: Ie00251b0672a036db4720e1e5b269f66a30a03da Reviewed-on: https://chromium-review.googlesource.com/1066822 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang dcda0e50 2018-05-10T12:50:43 Don't make redundant calls to Display::makeCurrent. Refactor ValidateMakeCurrent to pass egl object pointers instead of handles. BUG=angleproject:2464 Change-Id: I98859f56d238a38bd6755f00dce7344635690491 Reviewed-on: https://chromium-review.googlesource.com/1053877 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org>
Geoff Lang 1633663b 2018-04-24T16:39:15 Don't test for device loss in SwapBuffers and MakeCurrent. Simply check if the device has already been lost. Chrome already checks glGetGraphicsResetStatus after SwapBuffers and MakeCurrent. BUG=angleproject:1472 BUG=621240 Change-Id: I95fe6306fa0c09191a4b1b93840c2143e069ef53 Reviewed-on: https://chromium-review.googlesource.com/1026527 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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>
Corentin Wallez 99d492c2 2018-02-27T15:17:10 Use packed enums for the texture types and targets, part 2 This completes the refactor by using the packed enums in the gl:: layer and in the backends. The packed enum code generation is modified to support explicitly assigning values to the packed enums so that the TextureTarget cube map faces are in the correct order and easy to iterate over. BUG=angleproject:2169 Change-Id: I5903235e684ccf382e92a8a1e10c5c85b4b16a04 Reviewed-on: https://chromium-review.googlesource.com/939994 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez f0e89be6 2017-11-08T14:00:32 Use packed enums for the texture types and targets, part 1 In OpenGL there are two enum "sets" used by the API that are very similar: texture types (or bind point) and texture targets. They only differ in that texture types have GL_TEXTURE_CUBEMAP and target have GL_TEXTURE_CUBEMAP_[POSITIVE|NEGATIVE]_[X|Y|Z]. This is a problem because in ANGLE we use GLenum to pass around both types of data, making it difficult to know which of type and target a variable is. In addition these enums are placed somewhat randomly in the space of OpenGL enums, making it slow to have a mapping from texture types to some data. Such a mapping is in hot-code with gl::State::mTextures. This commit stack makes the texture types and target enums be translated to internal packed enums right at the OpenGL entry point and used throughout ANGLE to have type safety and performance gains. This is the first of two commit which does the refactor for all of the validation and stops inside gl::Context. This was the best place to split patches without having many conversions from packed enums to GL enums. BUG=angleproject:2169 Change-Id: Ib43da7e71c253bd9fe210fb0ec0de61bc286e6d3 Reviewed-on: https://chromium-review.googlesource.com/758835 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jeff Gilbert 81aa15f1 2018-02-22T18:22:52 Test `EGL_OPENGL_ES3_BIT_KHR` against `rendererType`, not `conformant`. Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1415754 BUG=angleproject:2369 Change-Id: I99cae322eb70ea3920eb296fd590abccded6dab4 Reviewed-on: https://chromium-review.googlesource.com/935149 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 3f4b87b4 2018-02-16T17:12:19 Expand the EGLIOSurfaceClientBufferTests This expands the test to check for validation errors and that multiple formats of IOSurfaces can be read from / rendered to. It fixes a couple issues in the implementation of the extension too. Minor fixes in the EGL_ANGLE_iosurface_client_buffer extension text. Fix a fragile test that was not setting the texture unit a shader is to sample from. BUG=angleproject:1649 Change-Id: Ied2a9bfff95cb3a9a7a59008260899eb2fc55575 Reviewed-on: https://chromium-review.googlesource.com/924477 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Nico Weber 41b072b6 2018-02-09T10:01:32 Prepare for -Wimplicit-fallthrough in ANGLE. Disable the warning for flex-generated output, which contains lots of intentional fallthrough. Fixes a bug where GL_SAMPLE_ALPHA_TO_ONE_EXT would fall through to GL_COVERAGE_MODULATION_CHROMIUM and hence behave like that. Fixes a bug in the D3D9 state management where invalidating DIRTY_BIT_POLYGON_OFFSET would also invalidate the stencil bits. One somewhat common incorrect pattern in ANGLE is nested switch statements that look like so: switch (a) { case a1: switch (b) { case b1: ... break; } case a2: ... } The assumption here seems to be that the breakk exits the outer case (here a1), while it in fact only exits the inner switch, so that we fall through to a2. In most places, I fixed this by adding an explicit `break` after the inner switch. This fixes a bug wher GL_PATH_JOIN_STYLE_CHROMIUM would fall through to GL_PATH_MITER_LIMIT_CHROMIUM in validation (but since the join style enum is always > 0, this happened to not have an effect in practice). This also fixes 87 bugs in GetLoadFunctionsMap() where invalid values would previously return an unrelated function map instead of the empty load function map. Bug: chromium:810767 Change-Id: Ib51388c73fbfc229160e2c10f8fb9364cc7c996c Reviewed-on: https://chromium-review.googlesource.com/911529 Commit-Queue: Nico Weber <thakis@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho d66e1939 2018-01-17T11:36:24 Allow creating EGL pbuffers from typeless D3D textures A new extension EGL_ANGLE_d3d_typeless_texture_client_buffer is added that allows creating EGL pbuffers from typeless D3D textures. The extension increases the flexibility of the API compared to plain EGL_ANGLE_D3D_texture_client_buffer. The colorspace for the created EGL pbuffer can be set by using the EGL_GL_COLORSPACE attribute. Internally this sets the ANGLE format of the buffer. There are new ANGLE formats that are used specifically for typeless textures, separate ones for SRGB and linear views into the D3D textures. The extension is only supported on the D3D11 backend of ANGLE. BUG=angleproject:2300 TEST=angle_white_box_tests Change-Id: I6a6cb873d2cc0dca0b7f18a0f2cd35e7bafcb7d8 Reviewed-on: https://chromium-review.googlesource.com/873917 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang 2aaa7b4e 2018-01-12T17:17:27 Add GLES1 targets and stub entry points. * Create a new libGLESv1_CM target. * Merge all autogenerated extension entry points into one file. * Allow creation of ES1 contexts. BUG=angleproject:2306 Change-Id: I446258363a96a3c37d657089dd7c1cff0fa3cf78 Reviewed-on: https://chromium-review.googlesource.com/865718 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill eeda03b6 2018-01-05T17:26:29 EGL: Remove internal enum for NULL driver. This is now updated in Chrome, so we can remove the last uses. Bug: angleproject:2159 Change-Id: Ia31e42b8a685756ee70450be19a52248e3efa92f Reviewed-on: https://chromium-review.googlesource.com/853119 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill f3e23295 2018-01-04T18:19:21 EGL: Expose NULL driver device selection. This makes the device type selection part of the ANGLE platform extension. We currently support NULL driver selection on all available back-ends (although on the NULL back-end, it already has no device type). Optionally we could expose certain features of this as separate extensions. This currently also supports the old hidden enum, until we can update Chrome and consolidate to the new exposed official enum. Bug: angleproject:2159 Change-Id: I85d0811098e644e8192c207673af9e18ed7c1da2 Reviewed-on: https://chromium-review.googlesource.com/846021 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 9db70de8 2017-07-04T18:28:42 Reland: Implement EGL_ANGLE_iosurface_client_buffer Includes a fix for creating pbuffers with <buftype> EGL_D3D_TEXTURE with EGL_WIDTH and EGL_HEIGHT attributes. BUG=angleproject:1649 TBR=geofflang@chromium.org Change-Id: Id2974b8fab02c3218febfac708b9b034e65cbc53 Reviewed-on: https://chromium-review.googlesource.com/823248 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 7f5c3eb7 2017-12-12T14:54:17 Revert "Implement EGL_ANGLE_iosurface_client_buffer" This reverts commit c7abc08034a30a41748eefc5b628a76d4e2daa8a. Reason for revert: Might have broken Chromium Win10 composition due to validation changes. Original change's description: > Implement EGL_ANGLE_iosurface_client_buffer > > BUG=angleproject:1649 > > Change-Id: I1e72c31d7c9497ad14039a8d3fb97317ab193cb2 > Reviewed-on: https://chromium-review.googlesource.com/559107 > Reviewed-by: Corentin Wallez <cwallez@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Corentin Wallez <cwallez@chromium.org> TBR=geofflang@chromium.org,cwallez@chromium.org Change-Id: I605b710b6d76056d6276b09822cd6ddca277bfd0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:1649 Reviewed-on: https://chromium-review.googlesource.com/822172 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez c7abc080 2017-07-04T18:28:42 Implement EGL_ANGLE_iosurface_client_buffer BUG=angleproject:1649 Change-Id: I1e72c31d7c9497ad14039a8d3fb97317ab193cb2 Reviewed-on: https://chromium-review.googlesource.com/559107 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@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>
Jeff Gilbert c5de4d29 2017-10-31T15:07:53 KHR_create_context with GLES forbids _KHR reset notification enum. EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT from EXT_create_context_robustness must be used with GLES instead. BUG=angleproject:2213 Change-Id: Icaf3c7550c4eb7cb61c6d4ed37adba7824ca4bc8 Reviewed-on: https://chromium-review.googlesource.com/759122 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
Geoff Lang af143fef 2017-10-05T13:59:43 Refactor the eglQueryContext entry point. BUG=angleproject:1635 Change-Id: Ia6ab5a2a7339d78912d7f871ed62941af1957eb1 Reviewed-on: https://chromium-review.googlesource.com/702856 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 13c0dd46 2017-07-04T18:27:01 Add texture rectangle extension. This is needed to support binding IOSurfaces to textures on OSX. This commit adds support in the API and tests, but didn't need to implement compiler changes as it already supported ARB_texture_rectangle. Implementation of CHROMIUM_opy_texture for rectangle texture and the spec are left for follow-up commits. Change-Id: I45c66be763a9d3f6f619640f9f95f39b05c70867 Reviewed-on: https://chromium-review.googlesource.com/559106 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 31ecbd70 2017-07-26T13:01:27 Refactor eglQuerySurface and eglSurfaceAttrib. BUG=angleproject:2075 Change-Id: I6911a2a1e665237e1d262c06f3ccf2d84cc09669 Reviewed-on: https://chromium-review.googlesource.com/586860 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>