src/libANGLE/AttributeMap.cpp


Log

Author Commit Date CI Message
Jamie Madill 2265e37b 2022-10-12T09:27:16 Capture/Replay: Auto-generate EGL capture code. Replaces the custom code in the EGL stubs. Skips a few "Get" entry points because this CL doesn't implement pointer capture like we do for all the GL entry points. Includes a new state in the AttributeMap that indicates which type of attribute values we used when initializing the map. Bug: angleproject:4035 Change-Id: I272eac5e4068602ce710ef66c9a1dce5387943a5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949911 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill a4a52f78 2021-11-10T12:43:37 EGL: Validate CreatePbufferSurface attributes. This fixes an ASAN issue with a dEQP negative test: dEQP.EGL/functional_negative_api_create_pbuffer_surface Bug: angleproject:6660 Change-Id: I2d052f9f948b7a2a6fe3fbb1f1621dd280bb0d36 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270978 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 393785b7 2021-11-10T12:14:03 Add attribute validation for context creation. This fixes another ASAN bug that popped up with the dEQP EGL tests: dEQP.EGL/functional_negative_api_create_context Bug: angleproject:6660 Change-Id: I8f5ca1cc9ca77f2be28ecf120a90c9efcf9d4b24 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270977 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 2d4bee83 2021-11-04T10:16:16 EGL: Add early exit when hitting invalid attribute. According to the EGL spec, we stop checking attributes when we encounter an invalid enum. That means it's valid for an application to pass in a list of attributes without EGL_NONE as long as one of them is invalid. To handle this, we add lazy attribute validation to the AttributeMap class, that gets triggered in the validation calls. We only implement the early exit validation for the config attributes to fix an EGL test that would access out of bounds memory. Bug: angleproject:6660 Change-Id: I264d0f98b4ddd9e74187846e9e668270a6fbaee1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3262478 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Gert Wollny fb7a2445 2021-02-12T09:29:11 libANGLE: Declare copy operator if copy constructor is defined If the copy constructor is defined then the copy assignment must also be defined, but we can use the default here. v2: Don't inline because the chromium-style errors out on this Bug: angleproject:4486 Change-Id: Iec0f63342244249da32b455b49a0b89b6558cab9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2690953 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
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 b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill acf2f3ad 2017-11-21T19:22:44 Apply Chromium style fixes. This addresses several minor code quality issues that are validated in Chromium, but not yet applied to ANGLE: * constructors and destructors must be defined out-of-line * auto is not allowed for simple pointer types * use override everywhere instead of virtual * virtual functions must also be defined out-of-line Slightly reduces binary size for me (~2k on Win, 150k on Linux). Bug: angleproject:1569 Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6 Reviewed-on: https://chromium-review.googlesource.com/779959 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang e159717d 2017-10-05T12:02:30 Filter EGL attributes before passing them to the native driver. Adding extensions that are not native driver extensions would cause surface creation to fail. BUG=angleproject:1635 Change-Id: I2f683ee0560e463aa06f3ba92d0bf3f3d8c8927d Reviewed-on: https://chromium-review.googlesource.com/701602 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill e09bd5d3 2016-11-29T16:20:35 Vulkan: Add display creation, test and extension. With this CL we have the ability to create Vulkan test configs and run basic tests, although the only thing that works is creating a Vulkan Renderer using the extension. BUG=angleproject:1319 Change-Id: I8ad17bba01241334be7da16e68fea38762ca6a20 Reviewed-on: https://chromium-review.googlesource.com/367750 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 46d7932a 2016-06-07T13:10:50 Fix MSVS x64 build EGLAttrib can be a 64-bit type on some configurations, in which case it needs an explicit cast to be converted to EGLint. TEST=standalone MSVS 2015 x64 debug build Change-Id: I6b3e0ae705e8862e079e81e516d6bf99409732e7 Reviewed-on: https://chromium-review.googlesource.com/350411 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yuly Novikov a6426d67 2016-06-03T00:18:38 Android GL backend and end2end tests Just the bare minimum implementation for end2end tests to run. BUG=angleproject:1362 TEST=angle_end2end_tests on Nexus 5X Change-Id: I92293e0f8bdc2ffaa5d4661927750d7cb3d931e6 Reviewed-on: https://chromium-review.googlesource.com/349353 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Ian Ewell bda75597 2016-04-18T17:25:54 Finish NV12 support via streams. The main functionality for NV12 texture support through EGL streams has been added. Updates to the compiler, texture code, and stream code were added to support binding to external D3D11 NV12 textures. An end2end test was also added to test sampling of YUV textures and converting to RGB. There is also a new script to convert BMP files to an NV12 texture ready to load into D3D11 for testing purposes. BUG=angleproject:1332 Change-Id: I39b6ec393ea338e2c843fb911acc1b36cd1158a0 Reviewed-on: https://chromium-review.googlesource.com/339454 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com> Reviewed-on: https://chromium-review.googlesource.com/341254 Reviewed-by: Ian Ewell <ewell@google.com>
Corentin Wallez 9670b03e 2016-04-29T09:47:47 Revert "Finish NV12 support via streams." Broke Windows Clang compilation, see https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Win%20Clang%20Builder%20%28dbg%29/builds/3583/steps/compile/logs/stdio and search for TextureStorage11.h This reverts commit 9b8b359fa3615be7c7492239a48f61103b2e4fcc. Change-Id: I6e54305eba02b40927a35577594df39e951adb32 Reviewed-on: https://chromium-review.googlesource.com/341430 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Ian Ewell 9b8b359f 2016-04-18T17:25:54 Finish NV12 support via streams. The main functionality for NV12 texture support through EGL streams has been added. Updates to the compiler, texture code, and stream code were added to support binding to external D3D11 NV12 textures. An end2end test was also added to test sampling of YUV textures and converting to RGB. There is also a new script to convert BMP files to an NV12 texture ready to load into D3D11 for testing purposes. BUG=angleproject:1332 Change-Id: I098940e6f25e113dcc4fc8d22ffed4b5a16fd860 Reviewed-on: https://chromium-review.googlesource.com/339454 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Ian Ewell 4a48d9a3 2016-03-31T16:46:25 Initial implementation of ANGLE_stream_producer_d3d_texture_nv12. Add the validation and entrypoints for ANGLE_stream_producer_d3d_texture_nv12, which is a new EGL extension currently being written. The purpose of this extension is to allow insertion of D3D11 NV12 textures to be inserted into a stream. This acts as the producer of the EGL stream. BUG=angleproject:1332 Change-Id: I50d4565cc82b63f7da7632adad4ac4c77d8800f2 Reviewed-on: https://chromium-review.googlesource.com/336695 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Ian Ewell ec2c0c5e 2016-04-05T13:46:26 Update internal AttributeMap type to EGLAttrib. Newer EGL functions use EGLAttrib to pass in attributes, which can be either 32-bit or 64-bit depending on the system while the old attributes are passed in as EGLints, which are usually 32-bits. To support these newer functions, AttributeMap now uses EGLAttrib internally instead of EGLint, and all the code using AttributeMap has been updated to cast properly. BUG=angleproject:1348 Change-Id: I7c4dd9ef23ea1b1741f3a565502fb5e26bf962d7 Reviewed-on: https://chromium-review.googlesource.com/337162 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Geoff Lang 6812a55c 2015-01-06T17:26:42 Rewrite ConfigSet and make EGLConfig synonymous with egl::Config. BUG=angle:658 Change-Id: I3c33faf18af0bfda00dc5babe6356d6c8661f032 Reviewed-on: https://chromium-review.googlesource.com/238862 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e65d145b 2014-12-30T15:35:39 Accept no attributes in GetPlatformDisplayEXT. It is quite valid for the app to pass in NULL for the attribs list. In this case we currently crash. We could trigger this error using dEQP. Change-Id: I64aba1077f9095bd099c6b60f789ec076cb3d385 Reviewed-on: https://chromium-review.googlesource.com/238081 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2b5420c0 2014-11-19T14:20:15 Merge libGLESv2 and libEGL classes into libANGLE. BUG=angle:733 Change-Id: Ic491c971411fe82c56cd97c5c8325ac14ec218df Reviewed-on: https://chromium-review.googlesource.com/230830 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>