src/libANGLE/renderer/gl/renderergl_utils.h


Log

Author Commit Date CI Message
Geoff Lang de09f8db 2021-09-02T18:21:37 Revert "GL: Update StateManagerGL binding funcs to use ANGLE_GL_TRY" This reverts commit 4b5a774e855af2493d64b0635f56053bd795c5c5. Reason for revert: broken on iOS and Skia Original change's description: > GL: Update StateManagerGL binding funcs to use ANGLE_GL_TRY > > Bug: angleproject:3020 > Change-Id: Iff460a1012d06e1c5feff84d91117de87e7c870a > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3123167 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Bug: angleproject:3020 Change-Id: I54d81a7b734d007f65ff97990008f5e6eb8536f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3140453 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 4b5a774e 2020-04-03T14:56:36 GL: Update StateManagerGL binding funcs to use ANGLE_GL_TRY Bug: angleproject:3020 Change-Id: Iff460a1012d06e1c5feff84d91117de87e7c870a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3123167 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang f3bccd9d 2021-08-26T18:04:13 Revert "GL: Update StateManagerGL binding funcs to use ANGLE_GL_TRY" This reverts commit 8d7f4cc986778bfff0b242dbea6083346da6c54d. Reason for revert: Broke CrOS build. Original change's description: > GL: Update StateManagerGL binding funcs to use ANGLE_GL_TRY > > Bug: angleproject:3020 > Change-Id: If60448f80daaeeb1503b41db8ac309e45923fd13 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2135929 > Commit-Queue: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: angleproject:3020 Change-Id: I0930c1bdb5356d533fae563428893aa8a9f91a52 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3123266 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Geoff Lang 8d7f4cc9 2020-04-03T14:56:36 GL: Update StateManagerGL binding funcs to use ANGLE_GL_TRY Bug: angleproject:3020 Change-Id: If60448f80daaeeb1503b41db8ac309e45923fd13 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2135929 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 18c6d628 2021-03-09T13:46:13 GL: Support VAOs without native VAOs. Share the default VAO state between all frontend VAO when there is no native VAO support. Forcefully sync state every time a new frontend VAO is bound. Bug: angleproject:5577, chromium:1167179 Change-Id: Ieaedb5108ad28fc78e7e58b74495639c5246bb05 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2665266 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Peng Huang <penghuang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev a272a8ac 2021-03-07T20:04:49 Fix PVRTC1 frontend validation PVRTC1 texture dimensions must always be powers of two. Moreover, Apple hardware requires them to be squares. Bug: angleproject:5731, angleproject:2634 Change-Id: I5fcdc364b37d17b60cf772c21ba38795272236fd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2741585 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shrek Shao 2b55f876 2021-01-29T18:02:21 Reland "Workaround for Mac Intel drawArraysInstanced with first > 0" This is a reland of 027bc47ca5b7b291fbda907173eefa05ad3d45a8 Original change's description: > Workaround for Mac Intel drawArraysInstanced with first > 0 > > Workaround by forcefully set instanced arrays (divisor > 0) > as streaming attributes and apply extra offset at front. Recover > those attribute bindings when first == 0 and other draw calls > (drawElementsInstanced) > > Bug: chromium:1144207, chromium:1144247, chromium:1144373 > Change-Id: Ie7836cc71b45a290513f34f90d49bd15b14ddba8 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2661095 > Commit-Queue: Shrek Shao <shrekshao@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: chromium:1144207 Bug: chromium:1144247 Bug: chromium:1144373 Bug: angleproject:5271 Change-Id: Id0b818b25a605376c98c2366c1f2029e2490c6cb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2704799 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 95584459 2021-02-18T09:32:16 Revert "Workaround for Mac Intel drawArraysInstanced with first > 0" This reverts commit 027bc47ca5b7b291fbda907173eefa05ad3d45a8. Reason for revert: InstancingTests fail on Mac FYI Release (Intel UHD 630), see https://ci.chromium.org/ui/p/chromium/builders/ci/Mac%20FYI%20Release%20(Intel%20UHD%20630)/1729/overview Original change's description: > Workaround for Mac Intel drawArraysInstanced with first > 0 > > Workaround by forcefully set instanced arrays (divisor > 0) > as streaming attributes and apply extra offset at front. Recover > those attribute bindings when first == 0 and other draw calls > (drawElementsInstanced) > > Bug: chromium:1144207, chromium:1144247, chromium:1144373 > Change-Id: Ie7836cc71b45a290513f34f90d49bd15b14ddba8 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2661095 > Commit-Queue: Shrek Shao <shrekshao@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: chromium:1144207 Bug: chromium:1144247 Bug: chromium:1144373 Change-Id: Ia4a6026a8c446490346b373c33fe2b1724c1761f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2704052 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Shrek Shao 027bc47c 2021-01-29T18:02:21 Workaround for Mac Intel drawArraysInstanced with first > 0 Workaround by forcefully set instanced arrays (divisor > 0) as streaming attributes and apply extra offset at front. Recover those attribute bindings when first == 0 and other draw calls (drawElementsInstanced) Bug: chromium:1144207, chromium:1144247, chromium:1144373 Change-Id: Ie7836cc71b45a290513f34f90d49bd15b14ddba8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2661095 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis e174c358 2021-02-04T15:14:10 GL: Consolidate glGetString calls First step for cacheing the result of glGetString calls is mostly cleanup. Bug: chromium:1173672 Change-Id: I47281a09b9bd5859655d16376977a6eabcfbb3c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2676203 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis 0be050a4 2020-09-23T15:12:56 Pass GL_VERSION info through ANGLE's GL_RENDERER string Chrome needs ANGLE to pass through the underlying driver vendor and version, which cannot always be determined by the SystemInfo library. This is done by construction GL_RENDERER in the frontend through combining GL_VENDOR, GL_RENDERER, and GL_VERSION from the backends. Example changes are in the doc: https://docs.google.com/document/d/1p0dvrLlu8NKhO-RCU5gqlQ_LvcQj-ZqhvfwSk1n3Sz8/edit?usp=sharing Bug: chromium:1126526 Bug: chromium:1131248 Bug: chromium:1134669 Bug: chromium:1169861 Change-Id: Ia618ebcd7f3caaeb376b4b6a03446732efdaeecb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2427383 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Maksim Sisov 4b2a9cbc 2020-05-21T08:57:02 move duplicated SwapControlData to rendergl_utils. Both DisplayOzone and DisplayGLX have SwapControlData declared and defined. In the future, when both of them will be compiled (DisplayGLX will be required for Ozone/X11), they will result in a compilation error stating about multiple definitions of the struct. Thus, move that rendergl_utils. Bug: chromium:1084458 Change-Id: Ib174d0e8de1ac4773c841fe286175358acb15d79 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2210702 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yan 17b3c2f3 2019-10-14T14:13:59 Implement SamplerVideoWEBGL for WEBGL_video_texture extension on desktop WEBGL_video_texture is an extension that will improve uploading video frame to WebGL performance. (https://www.khronos.org/registry/webgl/extensions/proposals/WEBGL_video_texture/) This extension introduced a new texture type TEXTURE_VIDEO_IMAGE_WEBGL and a new sampler type samplerVideoWEBGL to sample it. In chromium implementation, TEXTURE_VIDEO_IMAGE_WEBGL maps to different native texture type based on platform. On desktop, it maps to GL_TEXTURE2D(Currently supported). On Android, it should map to GL_TEXTURE_EXTERNAL(TODO). SamplerVideoWEBGL needs to be mapped to sampler2D or samplerExternalOES according to TEXTURE_VIDEO_IMAGE_WEBGL implementation. This patch implements samplerVideoWEBGL in Angle to support WEBGL_video_texture on desktop. In this case, samplerVideoWEBGL should map to sampler2D. Bug: chromium:776222, angleproject:3889 Change-Id: Idb0a5fcde37ca75ccc1181226b91f257212e7500 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866274 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 3a8b8908 2019-10-23T13:26:13 GL: Follow-up primitive restart emulation fixes. - Use the existing utility function for computing the primitive restart index. - Fix bad merge that removed the unfoldShortCircuits feature. BUG=1017337 BUG=angleproject:3997 Change-Id: I4ba5ada9816731bdd29a0e518ce225bdd69a762e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1876453 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0b779a7c 2019-10-10T14:54:09 GL: Emulate primitive restart when PRIMITIVE_RESTART_FIXED_INDEX is unavailable. PRIMITIVE_RESTART_FIXED_INDEX isn't available until desktop GL 4.3. When it is not available, emulate it by enabling PRIMITIVE_RESTART and set the primitive restart index before each draw call based on the index type. TEST=deqp/functional/gles3/primitiverestart/* BUG=angleproject:3997 Change-Id: Id736f1056cb07da91c6d592693406333142e6265 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1853885 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Jonah Ryan-Davis 70d79b76 2019-09-11T11:43:55 GL: Add state validation functions to GL backend These functions validate that the driver's reported state matches ANGLE's internal state. Can be useful for debugging Bug: angleproject:3900 Change-Id: I35d15e991986dcab114939c551a88549f09bd263 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1797254 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 2a19c59f 2019-08-23T14:10:24 GL: Check for errors around GL calls. Add a macro to check for GL errors after each GL call to catch errors as they happen even if the debug callbacks are unavailable. GL errors are only checked when asserts are enabled unless explicitly requested with the ANGLE_GL_TRY_ALWAYS_CHECK macro to verify GL calls that may allocate memory. Updated TextureGL to use the macro. BUG=angleproject:3020 Change-Id: I7678b204899e940824b010ab4be7e7f159bee6de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1764476 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@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>
Geoff Lang 5ff8cae9 2019-06-21T11:09:25 GL/D3D: Use texture uploads instead of clearing for robust init. Chrome uses regular texture uploads on all platforms except OpenGL on Mac to do robust resource init for textures because multiple bugs have been observed with texture corruption. BUG=883276 BUG=882580 BUG=941620 Change-Id: I5fcd6862147822a08c7533e6a6a9277223034ebd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1669104 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 857880e5 2019-05-27T13:39:15 GL: Add extensions to enable hardware video decode on Android. The Android SurfaceTexture API has to be initialized with a texture id which Chrome has to query from an ANGLE external texture. It also rebinds and sets the texture dimensions on calls to SurfaceTexture.updateTexImage so ANGLE must be notified about these changes so that state tracking and validation continue to function. BUG=967410 Change-Id: I92e9077f75835b088da3a8caffb3ff40e9ad0361 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1630293 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis beb0eb2d 2019-06-14T15:10:33 Clean up workarounds/features to single location. Rename all workarounds structs to features, and move the lists to a shared location in include/platform (to help with documentation, see: https://cs.chromium.org/chromium/src/ui/gl/gl_switches.cc?sq=package:chromium&g=0&l=69) Bug: angleproject:1621 Change-Id: I4069f08131db5e886047a007efb5d7764dfee5f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1660952 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 78a51911 2019-06-12T14:28:14 Clean up and expose frontend features to egl. gl::Workarounds was used to hold frontend features. Change ownership of this struct from Context to Display, so it can be exposed to egl. Also rename to features and clean up for consistency. Bug: angleproject:1621 Change-Id: I82e98e53873abb7a402c93e60f8a662a7263e0d5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1655772 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> 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 abfbc0fe 2018-10-09T12:48:52 Use angle::Result in allocation and math check macros. Replace these with ANGLE_CHECK_*_ALLOC and ANGLE_CHECK_*_MATH depending on the specific error type. Bug: angleproject:2491 Change-Id: Ic4395101fe701c563ae2b92aa2c55c93b934a7de Reviewed-on: https://chromium-review.googlesource.com/c/1262737 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e39e8f46 2018-10-05T08:17:38 GL back-end error refactor. Adds explicit error handling to a few scoped state handler classes. Otherwise mostly mechanical refactoring. Bug: angleproject:2753 Change-Id: I2bf969a68f45880902b6e7902297c1340a76a1c4 Reviewed-on: https://chromium-review.googlesource.com/c/1255647 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1395134c 2018-09-30T15:24:28 Remove more uses of gl::ErrorOrResult. Only gl::LinkResult remains. Bug: angleproject:2753 Change-Id: I5e9c68c11453e8ab9db4908451957d7b3db0b110 Reviewed-on: https://chromium-review.googlesource.com/c/1254044 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 3f332584 2018-06-26T21:00:14 Revert "RendererGL: Limit warning output to 5 per message type." This reverts commit 7c37ca1836402b654dbbf5f00007e09bdf2a7051. Reason for revert: Causes crashes on Android. Original change's description: > RendererGL: Limit warning output to 5 per message type. > > BUG=768943 > > Change-Id: I8ed69c70d1914b56145c52ffe26f13193fb55e9e > Reviewed-on: https://chromium-review.googlesource.com/685278 > Commit-Queue: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Corentin Wallez <cwallez@chromium.org> TBR=geofflang@chromium.org,cwallez@chromium.org Change-Id: I641ac5d508d238e275eaeef4fac4033d9015960d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 768943 Reviewed-on: https://chromium-review.googlesource.com/1115658 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 7c37ca18 2017-09-26T16:56:32 RendererGL: Limit warning output to 5 per message type. BUG=768943 Change-Id: I8ed69c70d1914b56145c52ffe26f13193fb55e9e Reviewed-on: https://chromium-review.googlesource.com/685278 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 6110763f 2018-05-09T11:32:46 Refactor the GL surfaces and framebuffers to not hold renderer objects. BUG=angleproject:2464 Change-Id: I20aabeef3de6cf1fc13a29b6220e040aa83184d7 Reviewed-on: https://chromium-review.googlesource.com/1039986 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Geoff Lang 3cd48fff 2017-10-03T15:37:16 Implement robust resource initialization for OpenGL. BUG=angleproject:2107 BUG=angleproject:2407 BUG=angleproject:2408 BUG=693090 Change-Id: I6444f80f9703d6341f2ec67518050adc88f71d96 Reviewed-on: https://chromium-review.googlesource.com/678482 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@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 cda6af19 2017-10-30T19:20:37 Split pixelBuffer from pack/unpack state This will refactor will help use packed enums for buffer targets. BUG=angleproject:2169 Change-Id: Ie7ed3e105f89457c67027e6598d7e29503ad355c Reviewed-on: https://chromium-review.googlesource.com/745181 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 47bb4933 2017-08-03T11:52:13 Implement CopyTexture functions for uint texture formats. BUG=angleproject:1932 Change-Id: I6474237cbb82b59a0bd40c1b9b9e2455952d3755 Reviewed-on: https://chromium-review.googlesource.com/600510 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Martin Radev 318f9aa5 2017-05-17T17:47:28 Initialize ANGLE_multiview caps and workaround state The patch checks whether ANGLE_multiview can be supported in the OpenGL renderer, updates the caps and adds a workaround field to enable multiview support through the NV_viewport_array2 extension. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I99dae10564db7bcca41d7624f8de272c1d996e09 Reviewed-on: https://chromium-review.googlesource.com/567934 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 761b02c8 2017-06-23T16:27:06 Add an applyNativeWorkarounds context impl hook. This method can allow the implementation to override the Context's workarounds. Use this design pattern now that we have access to the gl::Context everywhere - we don't need to cache a local copy in the Renderer objects. This will be used to apply a Shader Program Cache workaround on the GL level, that will only be used for the GLES back-end on Qualcomm. BUG=angleproject:2088 Change-Id: I6da25c5c29c3ba01b8820c5234d1b92dd2d2121a Reviewed-on: https://chromium-review.googlesource.com/549980 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 80cdc376 2017-04-18T13:27:30 DisplayWGL: try all GL context version from the highest The only way to get a core profile context of the highest version using CreateContextAttrib is to try creationg contexts in decreasing version numbers. It might look that asking for a core context of version (0, 0) works on some driver but it create a _compatibility_ context of the highest version instead which might not be supported on some drivers. BUG=angleproject:1994 Change-Id: Ic8a33243909c54ea5940ee81c9c866b141bea420 Reviewed-on: https://chromium-review.googlesource.com/480739 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shao 86904b81 2017-03-21T09:30:59 ES31: Add workaround for illegal MAX_VERTEX_ATTRIB_STRIDE on Linux AMD Query of MAX_VERTEX_ATTRIB_STRIDE on some Linux AMD OpenGL drivers returns 0 even if the context is OpenGL 4.4 and 4.5, which is against SPEC and will block the implementation of ES3.1 feature Vertex Attrib Binding. This patch adds the workaround for this bug by choosing an emulated value (2048) as the value of MAX_VERTEX_ATTRIB_STRIDE on Linux AMD OpenGL drivers. BUG=angleproject:1936 TEST=angle_end2end_tests Change-Id: I831bda6cb94b2489d09735622150d35aa1948274 Reviewed-on: https://chromium-review.googlesource.com/457254 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang a20fc005 2016-08-08T15:19:56 Implement GL_CHROMIUM_sync_query for GL. BUG=angleproject:1366 Change-Id: I9e44679754eb704b390191c28206dedc3dc7cc4f Reviewed-on: https://chromium-review.googlesource.com/367082 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jiawei-Shao 9f4583dd 2016-10-19T11:19:51 Add Platform Detection and Tighten the workarounds on Intel GPU This patch intends to add platform detection to ANGLE and tighten the driver bug workarounds on Intel GPU. BUG=angleproject:1548 Change-Id: I1ea57e174f688a175da8b658de4337295037fcab Reviewed-on: https://chromium-review.googlesource.com/399914 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 886de369 2016-09-27T10:49:35 Factor code between PixelUnpackState and PixelPackState BUG=angleproject:1512 Change-Id: I4c60472d216bfc5198e635d70fd197a5738dde98 Reviewed-on: https://chromium-review.googlesource.com/390133 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez cc068e93 2016-02-29T16:37:04 Add DisplayGL::getDriverVersion and implementation on Linux NVIDIA Some GPU driver bug workarounds should be active only for specific driver version ranges. This adds NVIDIA Linux driver detection using the XNVCtrl X11 extension. BUG=590870 Change-Id: I8cbf692a0c8a6da7473169f29d720bdc2d07663d Reviewed-on: https://chromium-review.googlesource.com/329637 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 90a96efc 2016-01-27T14:53:36 Allow BufferGL to function without being able to map buffers for read. Reading back buffer data is required for index range validation but without glMapBufferRange it is not possible to read back buffer data on OpenGL ES. To work around this, keep a shadow copy of the buffer data when this function is not available. BUG=angleproject:1145 Change-Id: I8e9b3b174574316d3af0022bd29c7d9c96d168c3 Reviewed-on: https://chromium-review.googlesource.com/324092 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang eaaeb7fb 2016-01-27T16:07:07 Disable support for OpenGL ES targets with WGL on Intel drivers. BUG=angleproject:1145 Change-Id: I9f3a8926eaad88076026f58922289487f90518c7 Reviewed-on: https://chromium-review.googlesource.com/324270 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang cab7e1d1 2015-07-27T11:20:41 Add stubs for RendererGL workarounds. BUG=angleproject:884 Change-Id: I9e48803f6150b9d8cd70a36ab9197f78fd01a50f Reviewed-on: https://chromium-review.googlesource.com/288583 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 862c0ba4 2015-05-25T15:31:16 Implement the remaining caps queries. Limit the supported ES version based on these caps. BUG=angleproject:879 Change-Id: If3a097576465b33af0015fcb28dab10e88fdc4d9 Reviewed-on: https://chromium-review.googlesource.com/273160 Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 8c5aeb6c 2015-05-21T08:17:18 Add some string helper classes. *re-land with build fix for Clang* These helper functions mirror some utilities in Chrome, for splitting strings along whitespace, or reading file contents into a string. Also remove the hack for skipping the doubly-defined GLX header. BUG=angleproject:892,angleproject:998 Change-Id: Ife43fbf5035a3be7820460bea1b26d0e632a4fb0 Reviewed-on: https://chromium-review.googlesource.com/272518 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill a30c78ae 2015-05-21T12:15:43 Revert "Add some string helper classes." Build errors on Clang: FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/angle/src/common/angle_common.string_utils.o.d -DV8_DEPRECATION_WARNINGS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=233105-2 -DTOOLKIT_VIEWS=1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DDONT_EMBED_BUILD_METADATA -DDCHECK_ALWAYS_ON=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_WIFI_BOOTSTRAPPING=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../third_party/angle/src -I../../third_party/angle/include -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -O2 -gdwarf-2 -fvisibility=hidden -Werror -Wnewline-eof -mmacosx-version-min=10.6 -arch x86_64 -Wendif-labels -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -std=c++11 -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /b/build/slave/GPU_Mac_Builder/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -fcolor-diagnostics -fno-strict-aliasing -c ../../third_party/angle/src/common/string_utils.cpp -o obj/third_party/angle/src/common/angle_common.string_utils.o ../../third_party/angle/src/common/string_utils.cpp:72:19: error: no matching constructor for initialization of 'std::ifstream' (aka 'basic_ifstream<char>') std::ifstream inFile(path); ^ ~~~~ /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1/fstream:465:7: note: candidate constructor not viable: no known conversion from 'const std::string' (aka 'const basic_string<char>') to 'const char *' for 1st argument basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in) ^ /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1/bits/fstream.tcc:894:25: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const std::string' (aka 'const basic_string<char>') to 'const std::basic_ifstream<char>' for 1st argument extern template class basic_ifstream<char>; ^ /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1/fstream:451:7: note: candidate constructor not viable: requires 0 arguments, but 1 was provided basic_ifstream() : __istream_type(), _M_filebuf() ^ 1 error generated. FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/angle/src/common/angle_unittests.string_utils_unittest.o.d -DV8_DEPRECATION_WARNINGS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=233105-2 -DTOOLKIT_VIEWS=1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DDONT_EMBED_BUILD_METADATA -DDCHECK_ALWAYS_ON=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_WIFI_BOOTSTRAPPING=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DGL_APICALL= -DGL_GLEXT_PROTOTYPES= -DEGLAPI= '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ "d3dcompiler_47.dll", "d3dcompiler_46.dll", "d3dcompiler_43.dll" }' -DANGLE_TRANSLATOR_STATIC -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../.. -I../../third_party/angle/include -I../../third_party/angle/src -I../../third_party/angle/src/compiler/preprocessor -I../../third_party/angle/src/tests -Igen/angle -I../../testing/gmock/include -I../../testing/gtest/include -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -O2 -gdwarf-2 -fvisibility=hidden -Werror -Wnewline-eof -mmacosx-version-min=10.6 -arch x86_64 -Wall -Wendif-labels -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -std=c++11 -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /b/build/slave/GPU_Mac_Builder/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -fcolor-diagnostics -fno-strict-aliasing -c ../../third_party/angle/src/common/string_utils_unittest.cpp -o obj/third_party/angle/src/common/angle_unittests.string_utils_unittest.o In file included from ../../third_party/angle/src/common/string_utils_unittest.cpp:12: ../../testing/gtest/include/gtest/gtest.h:1481:16: error: comparison of integers of different signs: 'const int' and 'const unsigned int' [-Werror,-Wsign-compare] if (expected == actual) { ~~~~~~~~ ^ ~~~~~~ ../../testing/gtest/include/gtest/gtest.h:1511:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned int>' requested here return CmpHelperEQ(expected_expression, actual_expression, expected, ^ ../../third_party/angle/src/common/string_utils_unittest.cpp:55:5: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<int, unsigned int>' requested here EXPECT_EQ(0xBADF00D, uintValue); ^ ../../testing/gtest/include/gtest/gtest.h:2017:67: note: expanded from macro 'EXPECT_EQ' EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \ ^ ../../testing/gtest/include/gtest/gtest_pred_impl.h:162:23: note: expanded from macro 'EXPECT_PRED_FORMAT2' GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_) ^ ../../testing/gtest/include/gtest/gtest_pred_impl.h:147:17: note: expanded from macro 'GTEST_PRED_FORMAT2_' GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \ ^ ../../testing/gtest/include/gtest/gtest_pred_impl.h:77:52: note: expanded from macro 'GTEST_ASSERT_' if (const ::testing::AssertionResult gtest_ar = (expression)) \ ^ BUG=angleproject:892,angleproject:998 This reverts commit fa5fb6f1ef685af316b320530ffbb425bb63446e. Change-Id: I949debbd365926301ec19225f262484fa3b8e13b Reviewed-on: https://chromium-review.googlesource.com/272548 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill fa5fb6f1 2015-05-20T16:13:48 Add some string helper classes. These helper functions mirror some utilities in Chrome, for splitting strings along whitespace, or reading file contents into a string. Also remove the hack for skipping the doubly-defined GLX header. BUG=angleproject:892,angleproject:998 Change-Id: Ie617be7e02c2ccc684028500aabb54561c9c6c14 Reviewed-on: https://chromium-review.googlesource.com/272436 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 4f691690 2015-05-19T13:40:28 FunctionsGLX: Remove all but one of the ANGLE dependencies A follow-up CL will make it so the dependencies on TokenizeExtensionString doesn't pull the GL headers, this will then allow use to remove the hack for the inclusion of glx.h BUG=angleproject:892 Change-Id: I51c5466617057e2c580bd5e8056307515bcecc4b Reviewed-on: https://chromium-review.googlesource.com/272206 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 94b3a078 2015-05-05T17:00:07 Factor GL extension parsing in renderergl_utils.cpp DisplayGLX will use it for the GLX extensions too. BUG=angleproject:892 Change-Id: I5e4f80776a558fcdcc7e7b83767145112bcfee98 Reviewed-on: https://chromium-review.googlesource.com/269461 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang a4903b70 2015-03-02T16:02:48 Support multisampled framebuffers with the GL backend. Move validation of sample counts into the Renderbuffer implementations because the exact supported sample counts are not always known. BUG=angleoproject:886 Change-Id: I9c90d9d435e940b852343a29a6aa11d6cb1ad23b Reviewed-on: https://chromium-review.googlesource.com/255513 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang dab84368 2015-03-02T15:43:57 Add texture format utilities for GL and generate GL texture caps. BUG=angleproject:884 Change-Id: Ib1b13f59a6b21399c4b35695c704c369f572914e Reviewed-on: https://chromium-review.googlesource.com/264399 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang d16daa29 2015-04-07T19:27:57 Revert "Add texture format utilities for GL and generate GL texture caps." This reverts commit 69bde01adf1f9d94cb1ea91c2902267ef3340f02. Change-Id: If21c22e91cf5d72364839bbcc21cb83901a3f2cd Reviewed-on: https://chromium-review.googlesource.com/264418 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 69bde01a 2015-03-02T15:43:57 Add texture format utilities for GL and generate GL texture caps. BUG=angleproject:884 Change-Id: Iba0108b22e6a404842ec1013d22c00d206c865d3 Reviewed-on: https://chromium-review.googlesource.com/255512 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang ddc7446d 2015-02-25T11:48:09 Move RendererGL caps generation to renderergl_utils. Change-Id: Ia385fc9739174472d698367e2c6093ba1963b1fe Reviewed-on: https://chromium-review.googlesource.com/253634 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>