src/libANGLE/renderer/gl/renderergl_utils.cpp


Log

Author Commit Date CI Message
Shahbaz Youssefi 8f6f52b5 2021-07-23T10:14:27 GL: Temporarily disable sync control on all GPUs on Linux This workaround is supposed to be limited to Intel GPUs with a recent mesa version, but due to anglebug.com/6174 is not actually enabled on dual-GPU systems. The workaround is temporarily disabled on all GPUs until said issue is fixed. Bug: chromium:1187475 Bug: angleproject:6174 Change-Id: Ieee430b1e2a04e36d6f8d60cabc9e391f0e49988 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3048237 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Qin Jiajia 397fc145 2021-07-15T09:20:28 Fix the ext-texture-norm16 with RG16 failures Don't apply the readPixelsUsingImplementationColorReadFormatForNorm16 workaround for Intel GPU. With this workaround, below error will be printed: GL_INVALID_OPERATION in glReadPixels(invalid format GL_RG and/or type GL_UNSIGNED_SHORT) in FramebufferGL.cpp, readPixelsAllAtOnce Test: conformance2/extensions/ext-texture-norm16.html Bug: chromium:1208297 Change-Id: Ic9016c3afd8a0d2add61247adbf0d9434e8ce9f4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3028810 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Jonah Ryan-Davis 428d7c4d 2021-07-12T15:23:45 GL: Widen scope of disable_sync_control_support workaround. Crashes and hangs are still happening on Linux/Intel/Mesa 20. This should already not expose the OML_sync_control extension, so widen the scope of the workaround to see if there is an issue detecting Mesa version. Bug: chromium:1187475 Change-Id: I6397f459cd58dba449913ef1c7ce897e8a06cbd1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3022222 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Qin Jiajia 17a4b6e7 2021-07-07T11:00:48 Fix that clear-srgb-color-buffer is not correct This change removes the limitation that syncClearState/ syncClearBufferState is only for STANDARD_GL_DESKTOP so that it works on chromeos. Test: conformance2/rendering/clear-srgb-color-buffer.html deqp/functional/gles3/fbocolorbuffer/clear.html Bug: chromium:1208297 Change-Id: I7c5fed3545f623cca3f2245c67fddaf3401388b5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3010630 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Yuly Novikov 89f2a619 2021-07-08T21:45:11 Revert "GL: Use glClear for robust init on Android." This reverts commit 37c5d36fef783406c30a8ed8b8b4455f35374834. Reason for revert: crashes on Pixel 4, see https://chromium-review.googlesource.com/c/chromium/src/+/3016164 Original change's description: > GL: Use glClear for robust init on Android. > > The allowClearForRobustResourceInit was used to work around driver > bugs on other Windows and Linux and has a lot of CPU overhead. > > Re-enable it on Android (except some older Adreno). > > Bug: chromium:983167 > Change-Id: Ibfb4eb4fcdc7310fb6181c57f5c8d7a645ffad9d > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3011420 > Reviewed-by: Peng Huang <penghuang@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Bug: chromium:983167 Change-Id: I74e9a61484de77fd66e8dde8d50665fdbb470a95 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3016763 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang 37c5d36f 2021-07-07T13:15:13 GL: Use glClear for robust init on Android. The allowClearForRobustResourceInit was used to work around driver bugs on other Windows and Linux and has a lot of CPU overhead. Re-enable it on Android (except some older Adreno). Bug: chromium:983167 Change-Id: Ibfb4eb4fcdc7310fb6181c57f5c8d7a645ffad9d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3011420 Reviewed-by: Peng Huang <penghuang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Peng Huang 5a2bd6fd 2021-05-03T14:43:35 Disable shader cache for PowerVR Rogue GPUs. We disable shader cache for Validating decoder in chrome, so port this workaround into ANGLE to see if it can fix crbug.com/1203652. Bug: chromium:1203652,chromium:480992 Change-Id: I08611c148217abc9c32d11fefe8a7d15873f3b30 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2867269 Commit-Queue: Peng Huang <penghuang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 5b314268 2021-06-15T17:37:45 Vulkan: Support OVR_multiview and OVR_multiview2 Multiview is supported in Vulkan simply by specifying the number of views in the render pass, and creating the appropriate image views. A number of changes to the way image views and render targets are stored are made to support those that don't cover the entire range of layers. One particular detail that is not implemented in this change is the use of queries in combination with multiview. Vulkan specifies that N queries are actually produced (N being the number of views) which must be summed by the application, but this is not currently done. Bug: angleproject:6048 Change-Id: I1d4a9894c232d3a93d7a97c9fa0eedc334e57469 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2967625 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Brandon Schade 69f2fb00 2021-03-08T10:49:31 Vulkan: Expose OES_geometry_shader extension Modify the symbol table generation script to accept a list of supported extensions. This allows for the EXT and OES versions of the geometry shader extension to be exposed. Test: angle_deqp_khr_gles31_tests --deqp-case=*geometry_shader* Bug: angleproject:3571 Change-Id: Ia7127a03dbd3fce78957f0505d3ce0c9bab6cb15 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2765011 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang c12f594a 2021-05-31T10:48:20 GL: Chunk uploads of texture data >120kb on Mac. Mac drivers are hanging and crashing after large glTexSubImage uploads. Chunk those uploads to avoid this problematic path in the driver. Bug: chromium:1181068 Change-Id: I7dca0b8e49420f015ff7830283c14283a0515826 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2928098 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis fe93fcdd 2021-05-27T13:28:18 Workaround Mesa 20 Intel driver bug with GLX_OML_sync_control Disable the use of this extension on Mesa 20/intel, it's causing GPU hangs. Bug: chromium:1187475 Change-Id: Ic7029b1f72bd0b0f4a2c11a7fceb0a59f51be8aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2920811 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Geoff Lang f410e81a 2021-04-20T14:26:54 GL: Implement multisampled_render_to_texture Bug: angleproject:2894, angleproject:5988 Change-Id: I17b55f0655d32d9f41cb55a0467b93a00fba751b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2841084 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 5a0925de 2021-05-14T15:25:07 GL: Recreate textures on eglReleaseTexImage. Texture data should be reset on eglReleaseTexImage but ANGLE sometimes skipped this because it generated GL errors on Mac. Instead, delete and recreate the native texture to make sure ANGLE doesn't hold any references. Bug: chromium:1181068 Change-Id: I1252b0900361852f66f73b8c9d20a29c53897ee4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2897544 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Geoff Lang ce89d99f 2021-04-29T12:03:30 GL: Flush after framebuffer change on Mac 9th gen Intel GPUs Speculative fix for crashes during flush on Mac. Mirrors the flush_on_framebuffer_change workaround in Chrome from http://crbug.com/783979 Bug: chromium:1181068 Change-Id: Ic84b1bfc44babf27016b306393da308d504d7fd9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2859984 Reviewed-by: Peng Huang <penghuang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Peng Huang 19f24ede 2021-04-26T18:05:31 Disable workderContext on Android Bug: chromium:1202928 Change-Id: I54c4c28c30714fea60b4b6f3dd3ec49101341602 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2851362 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Peng Huang be2f7b1c 2021-04-20T13:54:47 Unbind fbo before context switching for PowerVR GPUs Imagination GL drivers are buggy with context switching. We need to ubind fbo to workaround a crash in the driver. Bug: chromium:1187513 Change-Id: Ie5142b5f43a3f23a9743ba7af0d90567fedd00d3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2841083 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Jonah Ryan-Davis 2d873e0c 2021-03-01T14:38:39 GL: Workaround to sanitize amdgpu renderer strings. On Linux with the amdgpu driver, the GL_RENDERER string contains precise kernel and DRM version info. We should sanitize this info before using these strings for user privacy. Bug: chromium:1181193 Change-Id: I047d1abf5b51412b4258a021761cc450385ef0fe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2727658 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@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 ad55bdbe 2021-04-02T22:59:07 GL: Align emulated ETC1 handling with other backends Use emulatedEtc1 limitation to hide it from WebGL. Bug: chromium:1048244 Change-Id: Id2fd6b5d934f3caeb455e8f0fc198445e8c00084 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2803136 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Peng Huang f16fd9ea 2021-03-25T21:33:31 Only enable framebufferMultisample with framebufferBlitANGLE Based on [1], GL_ANGLE_framebuffer_multisample requires GL_ANGLE_framebuffer_blit, so only enable framebufferMultisample with framebufferBlitANGLE. [1] https://www.khronos.org/registry/OpenGL/extensions/ANGLE/ANGLE_framebuffer_multisample.txt Bug: chromium:1192060 Change-Id: I44e8310d5a94578c0bb7e1d30a7276657965366c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2785394 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Peng Huang 90e3d86c 2021-03-22T12:49:26 Disable timestamp queries for Mali-G31 and older GPUs Bug: chromium:1178333 Change-Id: I8f21cd1c8f815a5cd7344778d2d1b28710dc6763 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2779211 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Peng Huang c99e405c 2021-03-12T12:39:27 Disable timestamp queries for some GPUs on Android Copy some workaround from chromium. Bug: chromium:702980,chromium:477514,chromium:462553,chromium:1178333 Change-Id: I9acb6ef49c91193a9e6bb03c6fc5eabf336cba9a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2756728 Commit-Queue: Peng Huang <penghuang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Peng Huang 7ee24229 2021-03-03T15:16:07 Reland "Fix two issues with GLES2 devices" This is a reland of c0ed204de972c76a5428834c94aaa34fd2953329 Original change's description: > Fix two issues with GLES2 devices > > * make sure maxColorAttachments is greater than 0 > * Do not sync read buffer if maxDrawBuffers is 0 > > Bug: chromium:1167731 > Change-Id: Icd0fb5e65ec6ffdc0d6f6325ccd1207958922254 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2733268 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Peng Huang <penghuang@chromium.org> Bug: chromium:1167731 Change-Id: Iccd7b0986c4728e362fccaeda6fbeff2860d888c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2743665 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Peng Huang 02a9d011 2021-03-09T15:23:52 Revert "Fix two issues with GLES2 devices" This reverts commit c0ed204de972c76a5428834c94aaa34fd2953329. Reason for revert: crbug.com/1186140 Original change's description: > Fix two issues with GLES2 devices > > * make sure maxColorAttachments is greater than 0 > * Do not sync read buffer if maxDrawBuffers is 0 > > Bug: chromium:1167731 > Change-Id: Icd0fb5e65ec6ffdc0d6f6325ccd1207958922254 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2733268 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Peng Huang <penghuang@chromium.org> Bug: chromium:1167731 Change-Id: Ibd05424889feac0bdb7293426ab41eb1f4753b35 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2743662 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Peng Huang <penghuang@chromium.org>
Peng Huang 9bc9ac8d 2021-03-04T08:18:54 Disable worker contexts on Android emulator Bug: chromium:1184692 Change-Id: I1b15e24d0cddd287f32ecb7f28568658f16b776d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2735375 Commit-Queue: Peng Huang <penghuang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Peng Huang 4efe33e3 2021-03-04T07:45:20 Fix two GL_OES_texture_half_float related problems with GLES2 * Fix incorrect ASSERT in formatutilsgl.cpp * CheckInternalFormatRenderbufferRenderability() and CheckSizedInternalFormatTextureRenderability() may cause GL errors, we should clear them. Bug: chromium:1174074 Change-Id: Ieef5e79b68f317833b459da34cc2e5362f813304 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2735374 Commit-Queue: Peng Huang <penghuang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Peng Huang c0ed204d 2021-03-03T15:16:07 Fix two issues with GLES2 devices * make sure maxColorAttachments is greater than 0 * Do not sync read buffer if maxDrawBuffers is 0 Bug: chromium:1167731 Change-Id: Icd0fb5e65ec6ffdc0d6f6325ccd1207958922254 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2733268 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Peng Huang <penghuang@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>
Peng Huang a73818aa 2021-03-03T12:41:58 Workaround a GL_OES_depth32 bug on Android emulator Bug: chromium:1184261 Change-Id: I7aac7c696ff2d08dc2aaac86abc1c3b0e54cda1c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2733287 Commit-Queue: Peng Huang <penghuang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
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>
Peng Huang d6e0b0ca 2021-02-17T15:59:52 Remove a debugging code in renderergl_utils.cpp Bug: chromium:1171371 Change-Id: I7cf00edbc337150e40e7afb4f6c5fc88862f0734 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2700332 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Peng Huang 46203e32 2021-02-10T18:41:06 Workaround context lost for Adreno 42x and 3xx Bug: chromium:1171371 Change-Id: I8c2e13f3f35bf1f780526ad1d9d483226ce5ea34 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2688901 Commit-Queue: Peng Huang <penghuang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 1094d324 2021-02-12T03:14:38 GL: Add allow_etc_formats workaround Enable ETC2/EAC formats on newer Intel GPUs. Bug: angleproject:1552 Change-Id: I240b07d6d81d48e1e03dfcd56aad6fa9f1d7817f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2690952 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
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>
Geoff Lang 409c1d5e 2021-01-15T10:32:56 GL: Add detection of IMG and Vivante GPUs. Future workarounds will depend on being able to detect these GPUs. Bug: chromium:983167 Change-Id: I0aee848594e6340550507a0cee8638c9b68785f1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633422 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev ebdd8abb 2021-01-13T23:42:44 OpenGL: Remove avoidDXT1sRGBTextureFormat workaround Bug: angleproject:5543 Change-Id: I2a7e2d563aa60e6e53dd6b6c32fbc449368e4e06 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2627425 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Geoff Lang 50c82f42 2021-01-14T15:15:10 Don't index into SystemInfo gpus if it's empty. angle::GetSystemInfo may return success on some platforms without writing any entires into the gpus vector. Make sure we don't index into this vector when it's empty. Bug:chromium:1166338 Change-Id: I4cafeadf7aa9ac55b25a1afa04c8d28a2edf52e0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2628140 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
James Darpinian 6c608e94 2020-12-29T16:24:08 iOS sRGB mipmap generation is broken too Enable the encodeAndDecodeSRGBForGenerateMipmap workaround for iOS. Bug: angleproject:5417 Change-Id: I39d9e7c371f0ee5ec5119669f3b855251691f9e2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2606657 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Jonah Ryan-Davis fb35201a 2020-12-22T13:14:41 GL: Expose NV_framebuffer_blit for ES2 contexts when available ANGLE_framebuffer_blit is already exposed but has restrictions on scaling/flipping and mismatched color buffer formats. When NV_framebuffer_blit, EXT_framebuffer_blit, or an ES3 context is available we can expose a less restrictive BlitFramebuffer. Bug: angleproject:5474 Bug: chromium:1157057 Change-Id: I916ee39c8d6120216f91461080eb3ee9ca777e29 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2601165 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
James Darpinian 7061af26 2020-12-22T10:43:45 Fix BlitFramebuffer issues with large rects on iOS Enable adjustSrcDstRegionBlitFramebuffer workaround on iOS and fix a conflict when it is enabled in combination with clipSrcRegionBlitFramebuffer. Bug: angleproject:5417 Change-Id: I1de0f9f392643fbcf6900bad86d83084cb6d4009 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2601106 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
jchen10 0322fc1a 2020-12-16T11:02:13 Disable syncFramebufferBindingsOnTexImage on Intel/Win/GL The driver fix is available already. Bug: angleproject:2906 Change-Id: Id607fa5217360afd99e5de0d2e5f35f79615d160 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2594323 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Kenneth Russell 011e0ad1 2020-12-16T17:34:50 Promote RGBA4444 and RGB565 to RGB[A]8 on macOS with AMD GPUs. There are bugs in Apple's OpenGL driver when uploading to textures of these formats via pixel buffer objects. Because automatic graphics switching might activate the AMD GPU at any time, use this workaround on dual-GPU MacBook Pros even if the Intel GPU is active. Fixes the following WebGL 2.0 conformance tests: deqp/functional/gles3/texturespecification/ teximage2d_pbo_2d_00.html teximage2d_pbo_2d_01.html texsubimage2d_pbo_2d_00.html texsubimage2d_pbo_2d_01.html texsubimage2d_pbo_cube_01.html Bug: angleproject:5469 Change-Id: I7d65dc5f664159b4b59d46400a8d9c492f67040b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2595245 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi e59d8716 2020-12-07T16:41:35 GL: Expose OES_shader_io_blocks As extra validation that new tests are indeed correct. Bug: angleproject:3580 Change-Id: I4792bd8e26f96ab6c988f2605f053ce5789a782f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2577818 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
James Darpinian b47f6868 2020-11-18T16:50:09 Don't use CGL in Mac Catalyst on Apple Silicon This change was made downstream in WebKit: https://bugs.webkit.org/show_bug.cgi?id=218303 It turns out we must use EAGL in macCatalyst on Apple Silicon in all cases, not just in-process in iOS apps (the problem is not just about coexistence of the two GLs, but actually about our ability to load the accelerated renderer /at all/ in macCatalyst processes). I left the runtime switching in place, because there is a future in which we /can/ use CGL in non-iOS-app processes, but that future is not now. Bug: angleproject:5369 Change-Id: I9a523d038eeeeef81efa3b97771443db857e97c8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2548316 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Jonah Ryan-Davis c7d2c434 2020-11-18T18:26:44 GL: Fix missing BufferBinding case in GetBufferBindingQuery Texture buffers were missing from the query, which was crashing the GPU process immediately on startup when ANGLE was used on Mac. Bug: angleproject:3573 Change-Id: I02657964de1be700b604b7259f3ea10361614f86 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2548741 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 946d527a 2020-11-16T15:42:10 GL: Support OES_shader_image_atomic Bug: angleproject:5342 Change-Id: I4fc4133b1f5bba001112c0d06764146e449c3314 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2542310 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 5b419533 2020-11-03T13:33:44 GL: Implement EXT_YUV_target Add test coverage of YUV format sampling as RGB or directly as YUV and rendering as YUV using layout(yuv). Initializing YUV AHardwareBuffers requires Android API 29 so ANGLE must be compiled with: android32_ndk_api_level = 29 android64_ndk_api_level = 29 The following tests can still run with Android API 26 because they don't need to initialize the buffer: ImageTestES3.ClearYUVAHB ImageTestES3.YUVValidation Bug: angleproject:4852 Bug: b/172649538 Change-Id: I4fe9afb2a68fb827dc5a5732b213b5eb60d585ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2517562 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 43acf3ba 2020-07-31T15:43:57 GL: Compiler changes for GL_OES_texture_buffer This extension is core in GLES 3.2 This CL enables the extension, added 412 new dEQP tests for texture buffer. 410 of these tests pass, but there are two tests that fail, detailed in anglebug.com/4933 Also includes a fix for completeness checks. Based on a CL by Jonah Ryan-Davis. Bug: angleproject:3573 Bug: angleproject:4933 Change-Id: I45759d765c88c64f21b592eab01d910dc4bc8da3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2521239 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
James Darpinian e53efb18 2020-11-03T16:22:19 Allow choosing EAGL or CGL at runtime Dean Jackson made this change downstream in WebKit: https://bugs.webkit.org/show_bug.cgi?id=216722 Change ANGLE to dynamically load either EAGL (OpenGLES) or CGL (OpenGL) depending on both compile and runtime configurations. Intel Mac -> CGL Intel Mac Catalyst -> CGL Intel iOS Simulator -> EAGL iOS Device -> EAGL Apple Silicon Mac -> CGL Apple Silicon Mac Catalyst (with Mac app) -> CGL Apple Silicon Mac Catalyst (with iOS app) -> EAGL The trickiest bit is Apple Silicon Mac Catalyst, which depends on the type of the application it is attempting to run. In that case ANGLE must compile both the CGL and EAGL interfaces and then pick one to use after launch. Bug: angleproject:5253 Change-Id: Iba167b3cc3105e457dcfc9bc14147d0fc3e70bac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2500185 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Jamie Madill fbaae6ce 2020-07-24T11:47:12 GL: Add support for GL_OES/EXT_texture_buffer This extension is core in 3.2 Based on a CL by Jonah Ryan-Davis. Bug: angleproject:3573 Bug: angleproject:4933 Change-Id: Ib5ce038414075a5cdce36e9404e25d7af33fb39c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2519401 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang f02a6e0c 2020-10-26T14:35:14 Work around Mac glGenerateMipmap with missing levels bug. Some Mac GL drivers fail to generate mipmaps if level zero is not set before the texture is first used, all mipmap data is black. To work around this, whenever a texture level is allocated, ensure that level zero is also allocated with at least a 1x1 image. Bug: angleproject:5223 Change-Id: If1a728e017dec600c77a54f7ae185b719aaaae84 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2497569 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
James Darpinian babce049 2020-10-16T16:32:17 iOS: Disable worker contexts, and use sized formats Kimmo Kinnunen made this change downstream in WebKit. https://bugs.webkit.org/show_bug.cgi?id=215908 Disable ANGLE workers until EAGL implementation is more complete. Current implementation fails to compile any shader, since the compilation happens in the worker thread and worker EAGL context which does not use the same sharegroup as the main context. The shader objects are created in the main context but the shader source setting and compilation happens in the worker context. EAGL needs a flush between state changes, and adding that correctly is a bigger change to be done later. Use sized formats when calling [EAGLContext -texImageIOSurface] from EGL_ANGLE_iosurface_client_buffer code. The texImageIOSurface accepts parameters with glTexImage2D logic. On ES3, some of the internal formats must be sized formats. The EAGLContext instantiated by ANGLE is ES3, even if the ANGLE context would be ES2. No tests added since this should be caught with the many video related tests. It's unclear why this is not the case -- at least on real hw. This is to be investigated later, too. Bug: angleproject:5104 Change-Id: Iebf1a04488c5137d55a278d973a34511e8dc46bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2481850 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Geoff Lang 6d3d381e 2019-08-23T16:45:05 GL: Update BufferGL to use ANGLE_GL_TRY. Refactor the check for keeping shadow data into a feature so it's only initialized once. Bug: angleproject:3020 Change-Id: I45575c246afa7cd54e3a07d7a8464f4d4f45b3be Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769064 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 1da7ac0f 2020-10-13T12:13:36 GLX: Workaround to disable GLX_OML_sync_control support. Some users on Linux/Wayland are reporting issues rendering Chrome unusable when ANGLE exposes GLX_OML_sync_control. This CL adds a new feature to ANGLE to disable this extension, but for now we leave the feature off by default, so users can test it via command line flags. Bug: chromium:1137851 Change-Id: I804ea935fe441c4794b93ee62ca335e78b9e453a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2468216 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Geoff Lang cd8eb564 2020-10-08T09:59:10 GL: Work around Mac glBindBufferRange issue. Mac GL drivers generat errors when binding transform feedback buffers with glBindBufferBase/glBindBufferRange when the buffer has not been bound to any binding point before. Work around this by simply binding the buffer first. Bug: angleproject:5140 Change-Id: I1895f8367412135c100a5072117c929be8a8e90b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2461826 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
James Darpinian 74ed9b65 2020-09-16T16:50:31 Support EXT_color_buffer_half_float on WebGL 2.0 contexts EXT_color_buffer_half_float was recently updated to be valid for WebGL 2 contexts because iOS can't support EXT_color_buffer_float. Bug: angleproject:5038 Change-Id: Ib0d35c6b26a6cd215ff6725e92c47d1efd64e048 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2415187 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
James Darpinian 3af07fd5 2020-09-24T14:26:11 EXT_float_blend is core in ES 3.2 Bug: angleproject:5098 Change-Id: I084defba9dd83153a9b8d2ee83f7d50e82eb154c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2430164 Reviewed-by: Shrek Shao <shrekshao@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jiawei Shao 0c8f66c7 2020-09-04T11:01:55 OpenGL: Get VendorID and DeviceID with angle::GetSystemInfo() Previously on the OpenGL backend we get the device ID with funtion GetDeviceID() which just supports a few types of devices. This patch fixes this issue by using angle::GetSystemInfo() instead. Bug: angleproject:5011 Change-Id: Ief0e1228bb1871a73755f05f2debd3a8e5c75597 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2392634 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Jonah Ryan-Davis 9a7b0a2d 2020-09-01T15:46:02 Workaround bogus MscRate reported by some XWayland drivers. XWayland defaults to a 1hz refresh rate when the surface is not visible, but this can sometimes cause issues in Chrome. If we see a bogus rate like that, ANGLE can just report 30hz. Bug: chromium:1042393 Change-Id: I554b05b4107cea528525ced6e95a5ce529eec3b1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2388700 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 7e815c77 2020-07-08T13:43:40 Implement EXT_shadow_samplers Bug: angleproject:4863,b/161716126 Change-Id: I6beb45d91f59a851787c9f40b40266fb985198d5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2288330 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis e5f188b2 2020-08-31T15:36:31 Check for "Radeon" in renderer string. AMD workarounds relied on the vendor string containing "AMD" or "ATI". Some vendor strings only contain "Radeon", which lead to workarounds not being enabled. Bug: angleproject:5004 Change-Id: Ie32852212afd1df1f3f691c87a5459e1b53b74b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2385932 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kenneth Russell 08c4d094 2020-07-16T18:48:59 Improve WebGL 2.0 readPixels support. Emulate GL_PACK_SKIP_PIXELS and GL_PACK_SKIP_ROWS on macOS, where it appears the OpenGL driver ignores these parameters. Add WebGL 2.0-specific validation constraints for pixel pack and unpack parameters. Bug: angleproject:4849 Change-Id: Iab566299223e05484a009817acb1ed2816023823 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2303905 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis e2de2c1c 2020-06-25T11:59:14 Fix disable_native_parallel_compile workaround condition. This workaround should only be enabled when ANGLE is built with TSAN on. Bug: chromium:1094869 Change-Id: If527457c11ce744b543ac69761cc64235d2f1dd8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2267420 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Jonah Ryan-Davis c70b8f84 2020-06-17T17:06:27 GL: Workaround NVIDIA issue in glLinkProgram When TSAN is enabled, it catches some bad memory access in the NVIDIA driver on Linux during glLinkProgram with multithreaded linking. To workaround this, assume we don't have native support for KHR_parallel_shader_compile Bug: chromium:1094869 Change-Id: I92f042b39028df108de2c5378311cc0c7b683e08 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2250938 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Kenneth Russell af727792 2020-06-10T21:55:43 Improve EGL_ANGLE_power_preference on dual-GPU MacBook Pros. Add the ability to release and reacquire the high-power GPU, and to respond to changes in the active GPU. In Chromium, the GPU process can not access the WindowServer. An external process must inform ANGLE that the active GPU has changed, and that ANGLE should switch its internal context to the new GPU. Incorporates a couple of functions from WebKit, used with permission, to effect this GPU switch. A follow-on change in Chromium which uses these new APIs will make the existing dual-GPU tests pass with ANGLE and the passthrough command decoder. Carry forward Chromium's workaround of disabling GPU switching on older MacBook Pros to ensure stability. Document the process of adding new EGL extensions to ANGLE. Bug: chromium:1091824 Change-Id: I499739156e851b493555d4d6e4aef87d8b97fa31 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2240638 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
James Darpinian 336e8915 2020-05-29T16:09:47 Workaround broken copyTexImage2D on iOS Use BlitGL to reimplement copyTex[Sub]Image2D on iOS. Bug: angleproject:4674 Change-Id: Ie3018d6d33da57797162922410f76557124df4b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2222718 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 60803838 2020-05-20T17:24:49 GL: Work around drivers that generate mipmaps in linear color space Mac drivers generate mipmaps in linear color space. To work around this, copy the sRGB texture to a linear texture, generate mipmaps and then copy back. TEST=conformance2/textures/misc/tex-srgb-mipmap.html BUG=angleproject:4646 Change-Id: I8675d0ab004bcd2985f685d64cbb84deff5f1c86 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2211083 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: 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>
Jonah Ryan-Davis 2383f344 2020-05-28T12:32:21 Port disable_timestamp_queries GPU workaround to ANGLE There is a driver bug in VMWare drivers related to timer queries. This driver is already disabled in Chrome, this CL ports the workaround to ANGLE. Bug: chromium:1075876 Bug: chromium:811661 Change-Id: I87ab28b803191884658d0c1ad4bfdfdd1b727fd0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2219420 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jonah Ryan-Davis eadc387c 2020-04-01T16:53:31 GL: Support GL_OES_texture_cube_map_array in shader translator GL_OES_texture_cube_map_array is core in 3.2. This CL adds support for this extension in the shader translator. Now passes dEQP.KHR_GLES31/core_texture_cube_map_array.*, dEQP.GLES31/functional_fbo_color_texcubearray_*, and dEQP.GLES31/functional_opaque_type_indexing*samplercubearray* with GL backend. Bug: angleproject:3584 Change-Id: I1a8485c7d9d3fffb9b5109d292b35b0c56a3c665 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2133086 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jonah Ryan-Davis 7fde3673 2020-05-25T15:48:06 GL: Support GL_OES_texture_cube_map_array in frontend/GL backend GL_OES_texture_cube_map_array is core in 3.2. This CL adds the necessary validation for the frontend, as well as support for this extension on the GL backend. The next step is to add the changes to the translator. Bug: angleproject:3584 Change-Id: I751a9c9f71a553b05fdf6673250290806d8cfbff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2215306 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
James Darpinian ab851162 2020-05-18T17:35:10 Enable regenerateStructNames workaround on iOS In https://bugs.webkit.org/show_bug.cgi?id=207858, the WebGL conformance test conformance/glsl/misc/shader-struct-scope.html was failing. The workaround that fixes this test was enabled only on desktop GL, but it's necessary for iOS as well. Bug: angleproject:4642 Change-Id: I29b96f16dd0608bb9597a4a9903e375a64dadf3d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2207636 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Mohan Maiya daed369c 2020-05-05T14:24:26 EGL: Add support for GL_EXT_EGL_image_array extension Add support for creating 2D array EGLImages. 2D array textures are core in GLES3.0. Enable the eglImageArray bool that controls exposure of the extension for all contexts >= GLES3.0 Bug: angleproject:4604 Tests: angle_end2end_tests --gtest_filter=ImageTest.*2DArray* Change-Id: Iebc1ad184fe7209ca89d620290337438ac251c56 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2176109 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 6193fd69 2020-03-07T21:19:05 OpenGL: Implement OES_draw_buffers_indexed OpenGL state sync issues as few GL commands as possible to update the blend state regardless of an application input. Enhanced ClearTestES3.MaskedIndexedClearMultipleAttachments regression test. Disabled OES_draw_buffers_indexed on Windows/AMD/OpenGL. Bug: angleproject:4394 Change-Id: I244ac2975678bc559634152cf4eb997d9dbe83d0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2145874 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Le Hoang Quyen dadd1986 2020-04-21T01:50:00 Implement GL_APPLE_clip_distance - Built-in variable gl_ClipDistance has been added to compiler. - Desktop GL: gl_ClipDistance is supported since GL 3.0. Enable/Disable each gl_ClipDistances[i] works out of the box via glEnable(). - Vulkan/Metal: Use uniform variable to control writing to each gl_ClipDistance. One bit flag controls one element in the gl_ClipDistance array. The writing to the disabled element in vertex shader will be ignored, and turned into zero assignment instead. - Direct3D/Mobile GL: Not implemented yet. - Added ClipDistanceTest to gl_tests and compiler unittests. - GL_APPLE_clip_distance is a subset of GL_EXT_clip_cull_distance, so GL_EXT_clip_cull_distance could be implemented in future if needed. Bug: angleproject:4452 Change-Id: I571ac8b56826989808a680226a04bec4cf59988e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2084324 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 9dc322d7 2020-04-21T11:41:43 GL: Make sure primitive restart emulation is disabled below GL 3.1 If the GL driver version is below 3.1, we cannot set the primitive restart fixed index (ES3 wont be supported anyway). Make sure the feature is disabled. Speculative fix for crbug.com/1073020 BUG=chromium:1073020 BUG=angleproject:3997 Change-Id: I67756b377aa951da2e70c26f7db978ede9010586 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2159289 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 8cae5e19 2020-04-08T12:28:03 GL: Re-enable emulatePrimitiveRestartFixedIndex This workaround is needed when the GL driver is less than 4.3 (all MacOS). The driver will generate many errors during execution without this enabled which blocks GL driver error checking. Add additional workarounds for Intel drivers that need a sufficiently large primitive restart index when doing DrawArrays calls. BUG=angleproject:3997 Change-Id: Idd293ff1dbc0a3609b11ea1d6b30da0a99e8f5c5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2141714 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Geoff Lang 23196076 2020-04-08T10:47:33 GL: Protect against infinite loops with CONTEXT_LOST in CheckError If the GL context generates a CONTEXT_LOST error, stop checking for errors. This error will be generated continuously and result in an infinite loop. BUG=angleproject:3020 Change-Id: Ib78d1ff3f84103e658307f2f892538700916449d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2142312 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Mohan Maiya 96c26c68 2020-04-03T07:52:52 Add support for NV_shader_noperspective_interpolation Added support for GL_NV_shader_noperspective_interpolation on the Vulkan and Desktop OpenGL backends Bug: angleproject:4388 Test: angle_end2end_tests --gtest_filter=ShaderInterpTest.NoPerspective/* Change-Id: I12473830c0ea8b4fffeae9c4a8ec92d979c8e18c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2107234 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kenneth Russell 91ea27ae 2020-03-27T16:22:14 Apply limitMaxMSAASamplesTo4 workaround to macOS. On dual-GPU MacBook Pros, the maximum number of supported samples can differ between the integrated and discrete GPUs, leading to unexpected OpenGL errors in applications. Detected with WebGL conformance tests in Safari with ANGLE as the WebGL backend. Bug: angleproject:4518 Change-Id: I54997cbb83afd76d98b16d138d117d0afdeec5e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2125407 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Cody Northrop 74e816bf 2020-03-26T17:40:25 Vulkan: Expose extension for ETC1 usage with subimage updates This CL implements the GL_EXT_compressed_ETC1_RGB8_sub_texture extension, which was added to relax restrictions on using ETC1_RGB8_OES for subimage updates. Test: Temple Run on Android Bug: b:152512564 Change-Id: I78cfd7dfd54fab36dee59a93b3ec3bfce17e73e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2123232 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang dd4e09ef 2020-03-20T14:54:36 Update conditions for exposing ASTC extensions. Add commenents to explain the Vulkan ASTC situation. Expose GL_KHR_texture_compression_astc_sliced_3d when the HDR profile exists. Bug: angleproject:4447 Change-Id: I00a86cb3c44873a28397aab33a47fb363d4ecfe9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2112283 Reviewed-by: Alexis Hétu <sugoi@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 07467b4a 2020-03-20T10:40:56 Remove GL_CHROMIUM_path_rendering Bug: chromium:1063193 Bug: angleproject:4270 Change-Id: I35b24b7d8d892181955e49dd2495655bc57cb0df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2112275 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Alexis Hetu 91f44a9a 2020-03-20T12:08:24 ASTC: LDR support doesn't imply HDR support There are SwiftShader related failures related to enabling the textureCompressionASTCHDRKHR feature without properly checking if the VK_EXT_texture_compression_astc_hdr extension is available, so HDR support shouldn't be enabled only based on the LDR support being enabled. Bug: angleproject:4447 Change-Id: Icde34892c9e2efff4b71e8c4e960c2fcff786700 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2080594 Commit-Queue: Alexis Hétu <sugoi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Mohan Maiya 62b72552 2020-03-20T07:51:26 Add support for EXT_EGL_image_external_wrap_modes Allows for more wrap modes to TEXTURE_EXTERNAL_OES textures Test: angle_end2end_tests --gtest_filter=ExternalWrapTest.* Bug: angleproject:4443 Change-Id: I37bde091b166d7471c13c14fd6b0174136b52ecf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2103433 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Peng Huang fa9eff37 2020-02-17T23:49:36 Disable GL_EXT_semaphore_fd for Mesa version < 19.3.5 on AMD GPUs Bug: chromium:1053516 Change-Id: Idfc271ac70c8ded7d05a258beb4a7578a5a652c3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2062162 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Xinghua Cao c8676d4b 2019-11-25T11:38:19 Unlimit texture size on relatively new linux If limit texture size to a small number, application may need to reshape texture, lead to more discontinuous memory access and performance loss. Bug: angleproject:4086 Change-Id: I502a90535c2e3d13738e23827f4712a77987585e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1934048 Reviewed-by: Xinghua Cao <xinghua.cao@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
Alexey Knyazev d8c4b5fb 2020-01-31T16:47:51 Expose ASTC 2D on OpenGL Bug: angleproject:4372 Change-Id: Ic1800ac10b12547ca9816f7ad9dfd62f83f227c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033066 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Alexey Knyazev 9e774041 2020-01-31T15:09:01 Update S3TC GL extension strings Added avoid_dxt1_srgb_texture_format workaround Bug: angleproject:4266 Change-Id: I286a9c66f6ea1d2c9d3587f6ca85608336eb44a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033065 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Kenneth Russell 07795d47 2020-01-31T16:08:52 Disable rewriteRowMajorMatrices workaround. It's causing flaky crashes in tests. Leave the revised code in place so it's easier to debug. Disable test which required the workaround. Bug: angleproject:2273 Bug: angleproject:3843 Change-Id: Iebb682bd3c6282031cc57eda5d3d4d5636be7294 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033870 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Kenneth Russell e196bc85 2020-01-17T13:11:20 Add driver bug workaround for rewriting row major matrices. Joint work with syoussefi@, who wrote the RewriteRowMajorMatrices pass, and revised it for this CL to not rely on the NameNamelessUniformBuffers pass - which was breaking it on the GL backend. Hook up previously written RewriteRowMajorMatrices transformation, and enable on all GPU types on macOS. It is needed at least for AMD and Intel GPUs. Add a new test which verifies the behavior of dynamically-indexed arrays of row-major matrices. Bug: angleproject:2273 Bug: angleproject:3843 Change-Id: Id582f9cf6b9b1a59091aab1786539174f360b705 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2008717 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
shrekshao eca11cc8 2020-01-28T14:18:40 SH_CLAMP_INDIRECT_ARRAY_BOUNDS logic update Remain the old hardware requirement for turning on clampArrayAccess. But also turns it on universally for WebGL context. So that we won't suffer from clampArrayAccess not handled properly on some compute shader deqp tests. Bug: chromium:1042252, angleproject:4361 Change-Id: Ib11affd6df27ce7d2100980d2b8decdee36876e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2026029 Reviewed-by: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shrek Shao <shrekshao@google.com>
shrekshao 571ceb5f 2020-01-24T13:11:54 Turn on clampArrayAccess globally but off for compute shaders out-of-bounds-uniform-array-access.html could fail on Linux Nvidia OpenGL even if GL_KHR_robust_buffer_access_behavior is available. Turning clampArrayAccess on globally but turn it off for Compute Shader, which is not used by WebGL so should be okay. FYI: The failures when turning this on globally are all in compute shaders. One could be fixed by using int cast instead of float for the clamp modifier. The other is due to array.length() couldn't return correct result for array in SSBO. Bug: chromium:1042252 Change-Id: Ic6f7adae4600d35207646881b18990a0c25a889a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2020463 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
James Darpinian 512abe85 2020-01-23T13:28:01 Clamp array accesses when robust buffer access not available Apple doesn't support GL_KHR_robust_buffer_access_behavior, so we don't know if we can trust the driver to be safe with out of bounds array accesses. It's not currently failing the out of bounds access tests, but this may be coincidental. In general it makes sense to always clamp array accesses when GL_KHR_robust_buffer_access_behavior is not supported. The validating command decoder actually enables this workaround unconditionally, but that seems unnecessary. Bug: angleproject:2978 Change-Id: Ib061dd4db10e044ced0dff95d0aac6a91f15b100 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2018182 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: James Darpinian <jdarpinian@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>
Alexis Hetu e0a28ba4 2020-01-14T09:44:27 Add blendable checks to GL_EXT_color_buffer_float The GL_EXT_color_buffer_float spec https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_color_buffer_float.txt mentions that some of the formats must be blendable: "Blending applies only if the color buffer has a fixed-point or floating-point format. If the color buffer has an integer format, proceed to the next operation. Furthermore, an INVALID_OPERATION error is generated by DrawArrays and the other drawing commands defined in section 2.8.3 (10.5 in ES 3.1) if blending is enabled and any draw buffer has 32-bit floating-point format components." So any non 32-bit floating-point must be blendable. Bug: angleproject:4291 Change-Id: I850fb13b71e4ad03fd07e2a265896c9106bc0ce1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2001478 Commit-Queue: Alexis Hétu <sugoi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kenneth Russell 12ce8f68 2020-01-03T16:40:06 Upstream WebKit's iOS port of ANGLE. Added the EAGL backend authored by Dean Jackson from Apple, and the refactoring changes needed to support it side-by-side with the macOS backend. Ran "git cl format" against these diffs. Defined the EGL_ANGLE_device_eagl extension and allocated an enum out of ANGLE's reserved range. The iOS backend is not yet included in any of the GN files. Bug: angleproject:4263 Change-Id: I631c32930433c03bb16a242955ffedf55174bb29 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1987278 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: James Darpinian <jdarpinian@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>