src/libANGLE/renderer/gl/RendererGL.h


Log

Author Commit Date CI Message
Shahbaz Youssefi 400d9fe4 2022-04-23T01:08:19 Rename feature files to *_autogen.h To clarify further that they are not to be edited by hand. Bug: angleproject:6435 Change-Id: Iaf79706d2b688a43b3ebb65700cfbdd71a49a742 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3603842 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 7a85d114 2022-03-25T15:01:17 Use [[nodiscard]] on RAII classes Scoped* classes provide an RAII way of adding cleanup/restore state/etc in a robust way. Unfortunatley, it's very easy to mistakenly leave the variable name, leading to the destructor being called immediately instead of at the end of the scope: { ScopedX(parameters); // instead of ScopedX x(parameters); // Code here is run after destructor } The [[nodiscard]] attribute, if specified on the ScopedX class would lead to a warning (turned to error with -Werror). This change does that for classes named *Scoped* in ANGLE. Bug: chromium:1103817 Change-Id: I65c9922c9b4eba1f9c033e093fe8fe534648ab62 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3552092 Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 222a81cf 2021-06-11T14:34:52 Reland: GL: Skip redundant flushes. Skip flushes when there is no work submitted since the last flush. Bug: chromium:1181068 Change-Id: Iab31f8949f7eb07dffb7b0930069cbb3ca69ef57 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2956453 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Kenneth Russell 565bba3d 2021-05-26T17:58:18 Revert "GL: Skip redundant flushes." This reverts commit 7a38f3f50f3bb2f747ad3731d307f6af4c0552d2. Reason for revert: caused numerous test failures on FYI waterfall per http://crbug.com/1213507 . Original change's description: > GL: Skip redundant flushes. > > Skip flushes when there is no work submitted since the last > flush. > > Clone of geofflang's: > https://chromium-review.googlesource.com/2911879 > > Bug: chromium:1181068 > Change-Id: Idd8a1c61b814d746bf1e0225cfc4ca375a7bb224 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2915675 > Commit-Queue: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: chromium:1181068 Bug: chromium:1213507 No-Try: True Change-Id: Icd1662e4ea541375b44bddaa839a5241cdad5302 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2919503 Commit-Queue: Kenneth Russell <kbr@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 7a38f3f5 2021-05-21T15:07:44 GL: Skip redundant flushes. Skip flushes when there is no work submitted since the last flush. Clone of geofflang's: https://chromium-review.googlesource.com/2911879 Bug: chromium:1181068 Change-Id: Idd8a1c61b814d746bf1e0225cfc4ca375a7bb224 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2915675 Commit-Queue: Geoff Lang <geofflang@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>
Jonah Ryan-Davis 4968f6f2 2021-02-04T16:40:36 Move getRendererDescription from ContextImpl to DisplayImpl The other backend description strings are in DisplayImpl. This will help with caching the result of glGetString in the GL backend. Also Update the getters to not be const in order to allow caching. Bug: chromium:1173672 Change-Id: I43df35688762b23429f47f169c04482cf4cd089a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2676881 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
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>
Tim Van Patten c859c0ac 2020-11-24T17:21:38 Batch replace std::unordered_map with angle::HashMap in src/ There are a few places that will remain std::unordered_map due to build or run-time errors, which will need to be evaluated more closely to determine if they should remain std::unordered_map or if there is another Abseil data structure that would be more efficient while still working correctly. Bug: angleproject:4873 Change-Id: Ib04253e3ad6398e63f4cc2bfe12c0f9e57cb112b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2558873 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
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>
Kenneth Russell 7a37d3ac 2020-01-05T13:52:03 Work around Intel driver bug with CopyTex{Sub}Image2D/DeleteTextures. Dependencies seem to be incorrectly tracked in some Intel OpenGL drivers (on macOS specifically), causing crashes in glDeleteTextures if a GL command buffer is being constructed where those textures are destinations of CopyTexImage2D/CopyTexSubImage2D. Work around this bug by flushing before texture deletion if CopyTex{Sub}Image have been called recently. The tracking is only done on a per-context rather than a per-device basis, but seems sufficient to work around the problem as identified. Tested both with new ANGLE test on affected hardware, and in WebKit's ANGLE backend for WebGL. Works around the crash reported in https://bugs.webkit.org/show_bug.cgi?id=205707 . Bug: angleproject:4267 Change-Id: I2266a5590759f6a3f19080def08710ef4b66d463 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1987932 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@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>
Jonah Ryan-Davis fce1e2d1 2019-06-04T15:02:08 Extend eglGetPlatformDisplay to allow feature overrides. Add EGL_FEATURE_OVERRIDES_ENABLED_ANGLE and EGL_FEATURE_OVERRIDES_DISABLED_ANGLE to submit lists of strings naming the features that should be overridden (either enabled or disabled) on display creation. Bug: angleproject:1621 Change-Id: I4bb75c5dbab0e3b701a72069c38f8c60ecfffad2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1646595 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 057b76e1 2019-04-12T14:48:59 Implement GL_CHROMIUM_lose_context. This is useful for testing context lost behaviour. BUG=angleproject:3379 Change-Id: If0e1538553b1761e313fc36ccde5138cd495200f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1566141 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
jchen10 7d53c60b 2019-02-15T21:06:42 ParallelCompile: use the native extensions This enhances to use the native parallel compile extensions if available. Bug: 873724 Change-Id: I0aaed314accd75e1bfa596b322225b56d729d3a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1475234 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 4d153383 2019-02-26T15:08:11 Reland "Vulkan: Implement debug markers" This reverts commit 0c01e36783b20a0177c653490cb4f8ea4a896075. Reason for revert: Its dependency that was reverted has now relanded: https://chromium-review.googlesource.com/c/angle/angle/+/1489153 Original change's description: > Revert "Vulkan: Implement debug markers" > > This reverts commit 983e446921946734fe47217c345a8fe2f079319d. > > Reason for revert: Depends on a CL that's reverted: https://chromium-review.googlesource.com/c/angle/angle/+/1470605 > > Original change's description: > > Vulkan: Implement debug markers > > > > Covers both GL_KHR_debug and GL_EXT_debug_marker. > > > > Debug markers are used to specify events or hierarchically categorize a > > set of commands within the command buffer. When debugging, this allows > > for quicker navigation to the draw calls of interest, and otherwise > > provides context to debug output. > > > > Bug: angleproject:2853 > > Change-Id: Id65e11fc877d9e70b6fd0fae7f0bbbcb1164bf10 > > Reviewed-on: https://chromium-review.googlesource.com/c/1403956 > > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > > Reviewed-by: Jamie Madill <jmadill@chromium.org> > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > TBR=geofflang@chromium.org,jmadill@chromium.org,syoussefi@chromium.org > > Change-Id: I7fcfc8683195d396aec61848719f52c0fa049ece > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: angleproject:2853 > Reviewed-on: https://chromium-review.googlesource.com/c/1470606 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> TBR=geofflang@chromium.org,jmadill@google.com,syoussefi@chromium.org Bug: angleproject:2853 Change-Id: Ie19ae103244d54dcf7108d5f61c24e318fc44057 Reviewed-on: https://chromium-review.googlesource.com/c/1489154 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@google.com>
Shahbaz Youssefi 0c01e367 2019-02-13T21:27:23 Revert "Vulkan: Implement debug markers" This reverts commit 983e446921946734fe47217c345a8fe2f079319d. Reason for revert: Depends on a CL that's reverted: https://chromium-review.googlesource.com/c/angle/angle/+/1470605 Original change's description: > Vulkan: Implement debug markers > > Covers both GL_KHR_debug and GL_EXT_debug_marker. > > Debug markers are used to specify events or hierarchically categorize a > set of commands within the command buffer. When debugging, this allows > for quicker navigation to the draw calls of interest, and otherwise > provides context to debug output. > > Bug: angleproject:2853 > Change-Id: Id65e11fc877d9e70b6fd0fae7f0bbbcb1164bf10 > Reviewed-on: https://chromium-review.googlesource.com/c/1403956 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: I7fcfc8683195d396aec61848719f52c0fa049ece No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2853 Reviewed-on: https://chromium-review.googlesource.com/c/1470606 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 983e4469 2019-01-18T16:04:50 Vulkan: Implement debug markers Covers both GL_KHR_debug and GL_EXT_debug_marker. Debug markers are used to specify events or hierarchically categorize a set of commands within the command buffer. When debugging, this allows for quicker navigation to the draw calls of interest, and otherwise provides context to debug output. Bug: angleproject:2853 Change-Id: Id65e11fc877d9e70b6fd0fae7f0bbbcb1164bf10 Reviewed-on: https://chromium-review.googlesource.com/c/1403956 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Nico Weber a7429204 2019-01-30T09:29:06 Remove some extra semicolons. No behavior change. Bug: chromium:926235 Change-Id: I9215b4799a3c68887b8403be057180796ab5777a Reviewed-on: https://chromium-review.googlesource.com/c/1446311 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org>
jchen10 a100d8f4 2018-12-29T16:39:55 ParallelCompile: add GL backend support For GL backend, at first each worker thread must have a naitve context for its own to work in. These worker contexts have to be shared from the main context, so that all shader and program objects are seen in any context. This extends backend displays to create and destroy the worker contexts. RendererGL manages and allocates them to the worker threads. ShaderImpl has a new compile method added to do the actual glCompile work in worker thread. The ProgramGL's link method is broken down by introducing the LinkEventGL class. Bug: chromium:849576 Change-Id: Idc2c51b4b6c978781ae77810e62c480acc67ebb5 Reviewed-on: https://chromium-review.googlesource.com/c/1373015 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill c3dc5d48 2018-12-30T12:12:04 Merge gl::Context and gl::ContextState. This reduces the number of indrections when accessing the Extensions or Caps structures. It will provide a small speed-up to some methods. It also cleans up the code. Bug: angleproject:2966 Change-Id: Idddac70758c42c1c2b75c885d0cacc8a5c458685 Reviewed-on: https://chromium-review.googlesource.com/c/1392391 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
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 5a206950 2018-10-22T09:58:25 GL: Move draw functions from Renderer to Context. This avoids one more function call + register pushing/popping. Slight improvement in the command_buffer_perftests. Bug: angleproject:2877 Change-Id: Ia50a330e62f0bd32266c9f0999810243cbaa41e0 Reviewed-on: https://chromium-review.googlesource.com/c/1293630 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill f38cb6d3 2018-10-22T11:53:40 StateManagerGL: Optimize state application. There are two main optimizations: 1. Inline setDraw*State and maskOutInactiveOutputDrawBuffers. 2. Remove Multiview dirty bits. The first change is a refactoring only. It moves the code around a bit so we can hit a fast path and never have to push/pop registers. The second change is also a no-op since the multiview dirty bits were made redundant. Improves performance in the command buffer perftests by 1-5%. Bug: angleproject:2877 Change-Id: I1632a838371ec8b85c2e06b3b86f08727ca9dacf Reviewed-on: https://chromium-review.googlesource.com/c/1293629 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
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 1c3a94aa 2018-05-07T15:23:42 WGL: Update the Renderer to own the native GL context. Adds a RendererWGL which owns the native WGL GL context. Adds a ContextWGL which owns the RendererWGL and communicates the native WGL context back to DisplayWGL for making current. BUG=angleproject:2464 Change-Id: Ideb11c164da2c304f860c544a56450d0ad8fafac Reviewed-on: https://chromium-review.googlesource.com/1038131 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang 5da6690f 2018-06-05T12:24:06 Hold RendererGL objects with a shared_ptr. To support both virtualized and unvirtualized contexts, the RendererGL object represents the native context. Update ContexGL and the various DisplayGLs to hold RendererGL with a shared_ptr so that deletion of the renderer happens at the correct time. Update RendererGL to take ownership of FunctionsGL. BUG=angleproject:2464 Change-Id: Id040a8053973d73936c0a7ff0ab5edb1a3f16dc6 Reviewed-on: https://chromium-review.googlesource.com/1085851 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 493f9571 2018-05-24T19:52:15 Add PrimitiveMode packed GLenum. Bug: angleproject:2574 Change-Id: I3d7bd7ca0d69a364a611dc04799ea34906fc4a6c Reviewed-on: https://chromium-review.googlesource.com/1067114 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Qin Jiajia 62fcf62a 2017-11-30T16:16:12 ES31: Add DispatchComputeIndirect suport for OpenGL backend BUG=angleproject:2270 TEST=dEQP-GLES31.functional.compute.indirect_dispatch.* Change-Id: Id062a80188b2a37f28833aaae8e6d31bac382276 Reviewed-on: https://chromium-review.googlesource.com/802763 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Xinghua Cao 89c422ad 2017-11-29T18:24:20 ES31: Support memoryBarrier and memoryBarrierRegion APIs BUG=angleproject:2280 TEST=dEQP-GLES31.functional.compute.basic.image_barrier_single dEQP-GLES31.functional.compute.basic.image_barrier_multiple dEQP-GLES31.functional.compute.basic.ssbo_cmd_barrier_single dEQP-GLES31.functional.compute.basic.ssbo_cmd_barrier_multiple dEQP-GLES31.functional.synchronization.* Change-Id: If14debab21247dc4b446e86d1642fbc9376b6dd7 Reviewed-on: https://chromium-review.googlesource.com/798803 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 5d5253a3 2017-11-22T14:51:12 Clean up usage of EXT_debug_marker and KHR_debug in the backends. In RendererGL, the EXT_debug_marker functions were calling the KHR_debug entry points, now they fall back only when EXT_debug_marker is missing. Separated the ContextImpl methods for the two extensions. BUG=781164 Change-Id: I615b5965b705e55eb730ebefa6e27e0ee6d86c31 Reviewed-on: https://chromium-review.googlesource.com/786337 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 6d94f064 2017-10-21T22:19:40 Add more complete NULL driver for the GL back-end. This implements a NULL driver in OpenGL by stubbing out most of the GL functions in FunctionsGL except a few static "Gets" that are needed for initialization with Chromium and the tests. It is intended to be used for performance testing ONLY and will not have correct behaviour. It also adds a define to enable conditionally excluding the null entry points for implementations that wish to save on a bit of binary size. Also fixes some of the typedefs in functionsgl_typesdefs.h that were turned up after implementing the direct assignment from NULL stub entry point, generated from gl.xml, to the function pointer with type defined from functionsgl_typedefs.h. BUG=angleproject:2188 Change-Id: Ifa1e4739cb471ab6b52a4bf24c16d9eb4b334ac5 Reviewed-on: https://chromium-review.googlesource.com/727530 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev 5e424fae 2017-08-09T16:25:36 Handle Clear* commands for layered framebuffers The patch adds support for clearing the layers of 2D array textures attached to a multi-view framebuffer. According to the ANGLE_multiview spec, the layers which are outside of the range [baseViewIndex; baseViewIndex + numViews) should remain unmodified. Because the native Clear* commands clear all of the layers, a workaround is implemented which creates a FBO, attaches a single layer from all multi-view attachments and clears the contents. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ibf711d02046233eed16bdd3f9c96fc38f82ed0a8 Reviewed-on: https://chromium-review.googlesource.com/615242 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Qin Jiajia 1da00653 2017-06-20T17:16:25 Remove IndexRange in DrawElements functions This change will remove IndexRange parameter in DrawElements functions. And calculate it until we truly need it. Meanwhile we add direct drawing path to avoid retrieving index range for DrawElements* functions in D3D11 backend. This change may not bring much performance improvement since we still need to retrieve index range in validation at the beginning of every DrawElements* call entry point. BUG=angleproject:1393 Change-Id: I86a8739c0893954c94eb398db62820ced7871565 Reviewed-on: https://chromium-review.googlesource.com/544634 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 222c517f 2017-07-19T16:15:42 Control Debug layers in ANGLE_platform_angle. Debug layers seem to be a universal thing among functional back-ends. D3D, OpenGL and Vulkan all need some kind of controls for debugging, so it seems to make sense to make this control part of the base extension. Default the extension to EGL_DONT_CARE, which allows the back-end to have a lot of flexibility in terms of implementation. Also enable the extension in the D3D11 and OpenGL back-ends, and set the extension to enabled for angle_end2end_tests. Remove EGLVulkanEXTTest since it no longer tests anything not tested in the base ANGLETest class. BUG=angleproject:2086 Change-Id: I52d8170effd1846b9afbe6e4052c699fe5cb0de8 Reviewed-on: https://chromium-review.googlesource.com/578369 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@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>
Jamie Madill 4928b7ca 2017-06-20T12:57:39 Proliferate gl::Context everywhere. This gives the D3D back-end access to the GL state almost anywhere. This uses the onDestroy hook for Textures to push errors up from destructors, although they still don't quite make it to the Context. There are places, such as in EGL object (Context/Surface) destruction, where we end up calling through to GL implementation internals without having access to a gl::Context. We handle this via a proxy Context to a Display, basically a null context, that has access to impl-side state like the Renderer pointer if necessary. It does not have access to the normal GL state. Also Pass gl::Context to RefCountObject::release(). Since we're using destroy() methods now, we should not ever call the destructor directly. BUG=angleproject:1156 Change-Id: Ie4c32ad6bf6caaff0289901f30b5c6bafa2ce259 Reviewed-on: https://chromium-review.googlesource.com/529707 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 231c7f56 2017-04-26T13:45:37 Apply clang-format to many files. This cleans up the formatting in many places. BUG=None Change-Id: I6c6652ebc042f1f0ffecced53582d09d66b4f384 Reviewed-on: https://chromium-review.googlesource.com/487884 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 876429b7 2017-04-20T15:46:24 Update gl2.h and update entry points. Some method signatures were updated. Types like GLclampf and GLvoid were replaced with other equivalents. BUG=angleproject:1309 Change-Id: I05e8e2072c5a063d87ad96a855b907424661e680 Reviewed-on: https://chromium-review.googlesource.com/475011 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Xinghua Cao 2b39659d 2017-03-29T15:36:04 ES31: Implement glDispatchCompute for OpenGL backend This patch refers to https://chromium-review.googlesource.com/c/380639/ BUG=angleproject:1955 TESTCASE=angle_end2end_tests Change-Id: Iafd7a6ba2d71c0b332d9267a1260d9dbd9800c02 Reviewed-on: https://chromium-review.googlesource.com/462089 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Yunchao He <yunchao.he@intel.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiajia Qin d9671226 2016-11-29T16:30:31 Implement ES3.1 glDraw*Indirect entry points for OpenGL BUG=angleproject:1595 TEST=dEQP-GLES31.functional.draw_indirect.* Change-Id: I82f5d0864e70d6e7abdccf5f10330ddfa099ec62 Reviewed-on: https://chromium-review.googlesource.com/417250 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez b920e360 2016-08-03T18:19:41 Implement GL_ARB_create_context_robustness on GLX and WGL BUG=angleproject:1463 Change-Id: I5bdcfd757d6f7d6411558c368fa7a26c8a38c9ba Reviewed-on: https://chromium-review.googlesource.com/365971 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 87fbe1c2 2016-08-03T14:41:42 ContextImpl: only expose getResetStatus for robustness This will allow each backend to implement this method separately. The current set of ContextImpl methods used for robustness are slightly D3D-centric. BUG=angleproject:1463 Change-Id: I101f8ada2c49de4cf110db48b1e8380c52b50fb2 Reviewed-on: https://chromium-review.googlesource.com/365829 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Sami Väisänen d59ca052 2016-06-21T16:10:00 Support instanced CHROMIUM_path_rendering This implements instanced path rendering. BUG=angleproject:1382 Change-Id: I4654251882975d707b22c7bb522af14ae34eb1a1 Reviewed-on: https://chromium-review.googlesource.com/355401 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Sami Väisänen <svaisanen@nvidia.com>
Sami Väisänen e45e53bd 2016-05-25T10:36:04 Support CHROMIUM_path_rendering This is partial support for CHROMIUM_path_rendering and implements basic path management and non-instanced rendering. BUG=angleproject:1382 Change-Id: I9c0e88183e0a915d522889323933439d25b45b5f Reviewed-on: https://chromium-review.googlesource.com/348630 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill dfde6abf 2016-06-09T07:07:18 Context: Remove mutable gl::State getter. This will preserve layering - the API layer doesn't mutate the state directly, it passes the API call through to the Context. Is also removes the possiblity of any shenanigans of the Validation layer changing the GL state. Also, this CL refactors a few validation entry points to take ValidationContext instead of Context. ValidationContext will be the correct way to interact with the gl::Context in the Validation code. Finally, additional refactorings make ContextState a proper class with private data. This allows the ContextState itself to keep a mutable pointer to the gl::State, so ValidationContext can modify it if necessary (and it will be necessary for Framebuffer completeness caching). BUG=angleproject:1388 Change-Id: I86ab3561573caa9535c8d1b8aad4ab3d0e7cd470 Reviewed-on: https://chromium-review.googlesource.com/348954 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 53ea9cc6 2016-05-17T10:12:52 Replace rx::Renderer with rx::ContextImpl. Previously Context had no Impl class, but had a special relationship with the instanced Renderer class. Having a ContextImpl backing every Context will allow new designs to enable things like multithreading (where each ContextImpl stores a Context-specific device) or non- virtual Contexts on Android or other platforms where it is more efficient. A large refactoring patch that touches every back-end. BUG=angleproject:1363 Change-Id: Icb73a7d37447f08a664eeb499a310ba05d71a57e Reviewed-on: https://chromium-review.googlesource.com/342052 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 77ae8d57 2016-05-06T14:19:01 Share TextureState structure with TextureImpl This refactoring patch removes the need to pass texture state to methods of TextureImpl in some cases. It also adds target value to TextureState, and moves TextureState definition to Texture.h. The effective base level can now also be queried from TextureState, which reduces the need to pass it around. Two different code paths that dealt with the TextureStorage11 SRV cache are combined into one. Besides refactoring, this patch fixes applying mTopLevel twice when determining the amount of mip levels TextureStorage11. BUG=angleproject:596 TEST=angle_end2end_tests, angle_unittests Change-Id: I1add3d9ad847bec56774e394125156cf9cb0fc2a Reviewed-on: https://chromium-review.googlesource.com/342940 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 8415b5fd 2016-04-26T13:41:39 Pass ContextImpl to Framebuffer methods instead of ContextState. BUG=angleproject:1363 Change-Id: I7e7524d95f2ca31c35918f9fe5c0cb681ed93616 Reviewed-on: https://chromium-review.googlesource.com/340746 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 437fa654 2016-05-03T15:13:24 Add a ContextImpl class. This class can contain impl-specific functionality for a Context. This will eventually replace the Renderer class, and we can then start passing around a gl::Context instead of gl::ContextState. In D3D11, the ContextImpl could hold a DeferredContext, which would enable multi-thread rendering. In GL, we can implement non-virtual (native) Contexts. In Vulkan it might store the logical device. BUG=angleproject:1363 Change-Id: I39617e6d1a605d1a9574832e4d322400b09867ec Reviewed-on: https://chromium-review.googlesource.com/340745 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3f572680 2016-04-26T13:41:36 Rename gl::VertexArray::Data to gl::VertexArrayState. BUG=angleproject:1363 Change-Id: I5acf670bd88988941676cc9bc75606d55cca224e Reviewed-on: https://chromium-review.googlesource.com/340744 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 15243d9b 2016-04-26T13:41:35 Rename gl::Shader::Data to gl::ShaderState. BUG=angleproject:1363 Change-Id: I49cb5d7319742487c8c00c58ec58f9a29561b9c1 Reviewed-on: https://chromium-review.googlesource.com/340743 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 48ef11b2 2016-04-27T15:21:52 Rename gl::Framebuffer::Data to gl::FramebufferState. Moving this out of the Framebuffer class allows us to forward- declare it. BUG=angleproject:1363 Change-Id: I91971c37a92151df508cdf7f0eb8c3e93506d112 Reviewed-on: https://chromium-review.googlesource.com/340741 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9082b982 2016-04-27T15:21:51 Rename gl::Data to gl::ContextState. Part of the new world order of renaming the Obj::Data classes to ObjState. BUG=angleproject:1363 Change-Id: I15cf002b8b093d687f540b9e86f045874af24a7e Reviewed-on: https://chromium-review.googlesource.com/340740 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Ewell 292f005f 2016-02-04T10:37:32 Fix context virtualization for timer queries In the current implementation of query virtualization, queries are paused/resumed during draw calls. Timer queries however are affected by every OpenGL call, so virtualization and context switches for timer queries must happen every time there is a context switch. Thus the logic for context-switching queries was moved to a new function in the GL state manager that is called everytime a makeCurrent call on the context is made. Since queries may be made after a context is made current, the state manager needs to keep track of any new queries that are started in a context, so an additional delegate function was added to the state manager that is called every time a glBeginQuery() call is made that adds the query object to a set. All the queries in that set are paused when a context switch is made and the queries in the new context are then loaded and resumed. BUG=angleproject:1307 Change-Id: I4e596d83739274cb2e14152a39e86e0e51b0f95c Reviewed-on: https://chromium-review.googlesource.com/325811 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Ian Ewell 53f59f4e 2016-01-28T17:36:55 Finish basic timer query support in GL backend EXT_disjoint_timer_query is feature complete with the WebGL tests passing with Chromium using ANGLE as a backend. There is some flakiness in the timestamp query test on WebGL, but investigation revealed a bug on Chromium's end and a fix is being made there. Since the extension is feature complete, it is now enabled by default on OpenGL so that it can be regression tested. BUG=angleproject:1265 Change-Id: If018b7e3ae84aff7e40c73ff8e672a86689ae6c4 Reviewed-on: https://chromium-review.googlesource.com/324580 Tryjob-Request: Ian Ewell <ewell@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Ian Ewell <ewell@google.com>
Dian Xiang 3e03ebd6 2015-12-07T13:15:10 Using dirty bits notification for D3D9 blend state BUG=angleproject:1249 Dirty bit notifications are used in GL and D3D11 for state tracking. This is a continuation of D3D dirty bit refactor for D3D9 Change-Id: Ifaa1826a93cf36c83d68150107b164d1d269c2b0 Reviewed-on: https://chromium-review.googlesource.com/316475 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Dian Xiang <dianx@google.com> Tested-by: Dian Xiang <dianx@google.com>
Jamie Madill 63e4e724 2015-11-06T19:15:11 Revert "Using dirty bits notification for blend state" Failing the dEQP-GLES3 tests: http://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20dEQP%20%28NVIDIA%29/builds/4036/ 3 tests failed: dEQP_GLES3.Default/functional_multisample_fbo_4_samples_sample_coverage_invert (c:\b\build\slave\gpu_win_builder\build\src\third_party\angle\src\tests\deqp_support\angle_deqp_gtest.cpp:234) dEQP_GLES3.Default/functional_multisample_fbo_8_samples_sample_coverage_invert (c:\b\build\slave\gpu_win_builder\build\src\third_party\angle\src\tests\deqp_support\angle_deqp_gtest.cpp:234) dEQP_GLES3.Default/functional_multisample_fbo_max_samples_sample_coverage_invert (c:\b\build\slave\gpu_win_builder\build\src\third_party\angle\src\tests\deqp_support\angle_deqp_gtest.cpp:234) BUG=angleproject:1161 This reverts commit ff2ab571b00023926ce39a91bfe20e13578d1281. Change-Id: Ibf61fc2c64ffc31778645bfe0292516b1f107397 Reviewed-on: https://chromium-review.googlesource.com/311243 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Dian Xiang ff2ab571 2015-10-05T16:48:06 Using dirty bits notification for blend state BUG=angleproject:1161 Dirty bit notifications are used in GL for state tracking, but not D3D. Before, D3D would use memcmp to check a change in state for every call. This showed up as a hot spot in the perf test runs. Hence, switching D3D over to the dirty bit system similar to GL backend will help. Change-Id: I482edc852f1dcc888af3038ff3a61916496a02bc Reviewed-on: https://chromium-review.googlesource.com/305295 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Dian Xiang <dianx@google.com> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang f0aa8429 2015-09-29T15:08:34 Implement QueryGL. Passes all tests in: * dEQP-GLES3.functional.occlusion_query * angle_end2end_tests BUG=angleproject:887 Change-Id: I643ab4c28cb545de9e7b0e1740e3fd8e2aa9d3d9 Reviewed-on: https://chromium-review.googlesource.com/302338 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang afd7f0a8 2015-09-09T15:33:31 Explicitly enable framebuffer SRGB blending in StateManagerGL. In DesktopGL, SRGB blending must be enabled or linear blending will be used. reland: Work around issues on AMD drivers where SRGB blending would be used on clears of linear attachments. Passes all dEQP-GLES3.functional.fragment_ops.blend.fbo_srgb.* tests (1106 new passing tests). BUG=angleproject:883 BUG=angleproject:885 Change-Id: I974a55fe3acc77ac77e93f19c83ee3b76f784df2 Reviewed-on: https://chromium-review.googlesource.com/302336 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 543e7ff7 2015-09-29T14:15:15 Revert "Explicitly enable framebuffer SRGB blending in StateManagerGL." More compile errors on mac. This reverts commit 056fae4a01db306b8f9c1e57374e18ebffbdf8eb. Change-Id: I579b9e50ded7240be4f488a48588a89ecb4bea44 Reviewed-on: https://chromium-review.googlesource.com/302571 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 056fae4a 2015-09-09T15:33:31 Explicitly enable framebuffer SRGB blending in StateManagerGL. In DesktopGL, SRGB blending must be enabled or linear blending will be used. reland: Work around issues on AMD drivers where SRGB blending would be used on clears of linear attachments. Passes all dEQP-GLES3.functional.fragment_ops.blend.fbo_srgb.* tests (1106 new passing tests). BUG=angleproject:883 BUG=angleproject:885 Change-Id: I6c2b4552c571707a8d8d80d3573bcb38797c3929 Reviewed-on: https://chromium-review.googlesource.com/302791 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang ec3123bb 2015-09-28T19:21:01 Revert "Explicitly enable framebuffer SRGB blending in StateManagerGL." Compilation failure on mac and linux. This reverts commit e19d7f90355f02ac7a7cd0a2ac130e0859cd3cc7. Change-Id: I638c3ffebb8c7ad0e3fe2e1e65d6212487bfc6ae Reviewed-on: https://chromium-review.googlesource.com/302790 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang e19d7f90 2015-09-09T15:33:31 Explicitly enable framebuffer SRGB blending in StateManagerGL. In DesktopGL, SRGB blending must be enabled or linear blending will be used. reland: Work around issues on AMD drivers where SRGB blending would be used on clears of linear attachments. Passes all dEQP-GLES3.functional.fragment_ops.blend.fbo_srgb.* tests (1106 new passing tests). BUG=angleproject:883 BUG=angleproject:885 Change-Id: I03fbb0910ce414552ba841099a177446d0ace7b6 Reviewed-on: https://chromium-review.googlesource.com/301702 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0af0b81d 2015-09-23T13:56:25 Add a SamplerImpl object and implement it for the GL backend. Passes all tests in dEQP-GLES3.functional.samplers BUG=angleproject:1162 Change-Id: I7713031a677aac2b41889a6b4297ab512e184863 Reviewed-on: https://chromium-review.googlesource.com/301582 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 006cbc5b 2015-09-23T16:47:54 Remove rx::ShaderSh and move the shared code to the GL. The GL layer can interact with the translator directly, to query all the active shader variables and call ShCompile. BUG=angleproject:1159 Change-Id: I334a9bef28f93cf85dd8cac0fb8542ac567cc3ec Reviewed-on: https://chromium-review.googlesource.com/299877 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 91445bce 2015-09-23T16:47:53 Make a shader Shader::Data state structure. This design follows the similar designs for Program, Framebuffer, etc. Because of the current design, share a mutable pointer with the Impl so the patch becomes a bit smaller and easier to review. In a follow- up patch we can move the shared code into the GL layer. BUG=angleproject:1159 Change-Id: Ib243e74779f23be51cdca80f1b5c6e5f3e36059d Reviewed-on: https://chromium-review.googlesource.com/299876 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 83f349ea 2015-09-23T09:50:36 Remove CompilerImpl and merge code to gl::Compiler. This class uses no Impl-specific code. We can also do a similar code relocation for the gl::Shader class, but in several steps because it is a bit more complex. BUG=angleproject:1159 Change-Id: I4d3ce3253df0a2bdee1d98e46cfd4b999d86be6e Reviewed-on: https://chromium-review.googlesource.com/299874 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 3edfe034 2015-09-04T16:38:24 Support primitive restart in RendererGL. Store index ranges in a new struct that tracks how many real indices were seen. Update index caching to key on primitive restart being enabled and update index counting functions to skip primitive restart indicies when needed. Passes dEQP-GLES3.functional.primitive_restart.* Change-Id: Id1e25a5adcdcd4e998836e8ff6679c64be4c3066 Reviewed-on: https://chromium-review.googlesource.com/297770 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f6db098d 2015-08-25T13:04:00 Split the Context and Renderer draw* to one per entry point. BUG=angleproject:1136 Change-Id: Ic7ff9c23201e1fe03c5a2135be24d61cfe3d6268 Reviewed-on: https://chromium-review.googlesource.com/295232 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 53b8aec0 2015-08-24T10:33:25 Work around deprecated LUMA formats in the core profile. Use R and RG textures with swizzle states to emulate them. A manual blit is required when calling CopyTex[Sub]Image from a RGB[A] framebuffer to an emulated L[A] texture so that the alpha channel ends up in the correct channel of the destination texture. Fixes the following tests when using the core profile: * conformance/extensions/oes-texture-float.html * conformance/extensions/oes-texture-half-float.html * conformance/textures/misc/tex-sub-image-2d.html * conformance/textures/misc/texture-formats-test.html * conformance/textures/misc/texture-npot.html BUG=angleproject:1113 Change-Id: If5540e66d9017596bd83d95ec3ede043cbcfe0d2 Reviewed-on: https://chromium-review.googlesource.com/293905 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 37c3979e 2015-08-20T14:19:46 Revert "Revert "Make the default framebuffer owned by Surface"" Reland the commit after fixing a bug in FramebufferAttachment. This reverts commit 18fdcbcf1d02d3b3b4b5c712f05058f2e8d629c6. BUG=angleproject:891 Change-Id: I07e08de52bfce8d84d070fc7bc15883009298a4d Reviewed-on: https://chromium-review.googlesource.com/294831 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 18fdcbcf 2015-08-19T18:12:44 Revert "Make the default framebuffer owned by Surface" Seems to be causing failures on the Mac GPU FYI bots. SurfaceTest.DestructionDeletesImpl seems to crash. BUG=angleproject:891 BUG=522557 This reverts commit 264ab56f2e70431e8310f9353952acd3b22b466f. Change-Id: I80aeecb8e191de011d9afe6534d0285dcffa82a3 Reviewed-on: https://chromium-review.googlesource.com/294540 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 264ab56f 2015-08-12T12:39:52 Make the default framebuffer owned by Surface Reland with a fix for SurfaceTest in angle_unittests and fixes for signed-unsigned warnings In CGL there is no notion of default Framebuffer and MakeCurrent only makes a context current but not a drawable. Instead, everything is done via render to texture. For that reason, different surfaces will have different FBOs as default framebuffers, which causes that change. BUG=angleproject:891 Change-Id: I0664896bc335b1a757226aaa212536b8f9d0f08f Reviewed-on: https://chromium-review.googlesource.com/293752 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 11cd6af6 2015-08-18T15:54:01 Revert "Make the default framebuffer owned by Surface" Compilation warning on Windows This reverts commit 6cb2ae8292e69aa110c89e0465366b9f049c1168. Change-Id: I4ecadf5d8e909f986da186a7326cfa0922ae8710 Reviewed-on: https://chromium-review.googlesource.com/294241 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 6cb2ae82 2015-08-12T12:39:52 Make the default framebuffer owned by Surface Reland with a fix for SurfaceTest in angle_unittests and fixes for signed-unsigned warnings In CGL there is no notion of default Framebuffer and MakeCurrent only makes a context current but not a drawable. Instead, everything is done via render to texture. For that reason, different surfaces will have different FBOs as default framebuffers, which causes that change. BUG=angleproject:891 Change-Id: Ie9a72de01a58e583a1bfa3f4a055debb860b912f Reviewed-on: https://chromium-review.googlesource.com/293713 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 5c6b7bfe 2015-08-17T12:53:35 Add a Program::Data shared state structure. Similar to the Framebuffer and other classes, this gives the Impl class a read-only view of the object's state. BUG=angleproject:1123 Change-Id: I580eaebe2de236adf8131d6e3f54633cecce8c25 Reviewed-on: https://chromium-review.googlesource.com/293760 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 1bf40bfe 2015-08-12T15:52:04 Revert "Make the default framebuffer owned by Surface" This reverts commit 87e63a9982803b5e4c12afa9a40ff0e2b04a7369. Speculative revert to fix the webgl cts on Windows D3D9 and the unittests on Linux. BUG= Change-Id: I488f4e0b2dc67270eed45f1c10bfba1d13c98739 Reviewed-on: https://chromium-review.googlesource.com/293350 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 87e63a99 2015-08-12T12:39:52 Make the default framebuffer owned by Surface In CGL there is no notion of default Framebuffer and MakeCurrent only makes a context current but not a drawable. Instead, everything is done via render to texture. For that reason, different surfaces will have different FBOs as default framebuffers, which causes that change. BUG=angleproject:891 Change-Id: I3f6da7b587353316026ea39a5c87f91265e0f1ba Reviewed-on: https://chromium-review.googlesource.com/289872 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 1b94d432 2015-08-07T13:23:23 Implement dirty bits for RendererGL's basic state. BUG=angleproject:1040 TEST=angle_end2end_tests,angle_perftests,WebGL Change-Id: I72beaf7e178e042440337fbb8b9669638c5ad016 Reviewed-on: https://chromium-review.googlesource.com/289558 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@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 6941a556 2015-07-27T11:06:45 Rename Workarounds to WorkaroundsD3D. It is not referenced outside of the d3d classes. BUG=angleproject:884 Change-Id: Ibeec034b1b78b569bea2f1c77d6a686b58b8e010 Reviewed-on: https://chromium-review.googlesource.com/288582 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross 02df796f 2015-07-01T10:03:42 Centralize renderer limitations for non-conformant renderers Some renderer configurations (e.g. D3D11 Feature Level 9_3) have some limitations and aren't quite conformant. This change generates errors when applications hit these limitations, and informs developers that they must work around them. BUG=angleproject:1055 Change-Id: I6a4a9e5cc71288ca366a54c769ca0eb82e79a7f7 Reviewed-on: https://chromium-review.googlesource.com/282814 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8e34494f 2015-07-09T14:22:07 Share data between VertexArray and Impl. Using the same design as for the Framebuffer::Data helper, we can use a struct to share between the object and the Impl. This also gives the Impl access to the maxEnabledAttrib, and saves some duplicated storage. BUG=angleproject:1040 TEST=WebGL CTS, end2end_tests, unittests Change-Id: I55c91e8a5f3dcae302cab441182320aafd5375ef Reviewed-on: https://chromium-review.googlesource.com/283930 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross 6ee1e786 2015-05-29T17:05:37 Implement GL_EXT_debug_marker in D3D9/D3D11 renderers BUG=angleproject:1043 Change-Id: I7f3bfb35050662520b901828d0478719fa8d11b3 Reviewed-on: https://chromium-review.googlesource.com/274054 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com>
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 39fcf263 2015-06-08T14:39:07 Use both null and real renders for draw call perf. Introduce a "null" GL renderer for this specific benchmark, which does not do any work on drawArrays and drawElements. We could use the same kind of trick for buffer and texture updates, if we need it. This gives us a good baseline for comparing GL and D3D perf. BUG=angleproject:1040 Change-Id: I4bf7c75df01932de45ddd0a4e42e8fc82f15e37e Reviewed-on: https://chromium-review.googlesource.com/276192 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 831b1953 2015-05-05T11:02:27 Move the IndexRangeCache and Range types to the gl namespace. BUG=angleproject:881 Change-Id: Ib05149facee9fcc7714cb957ca8647b3498a36b6 Reviewed-on: https://chromium-review.googlesource.com/269254 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Jamie Madill 4ef3c241 2015-04-02T11:36:01 Remove DefaultAttachment. This class is no longer necessary or used. BUG=angleproject:963 Change-Id: I5e6fa64822e637e1cc769be6fe777fa6e13a0d83 Reviewed-on: https://chromium-review.googlesource.com/263484 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f0d10f89 2015-03-31T12:56:52 Replace non-copyable macro with a helper class. This class provides a simpler scheme for blocking default copy and assignment operators. It also reduces the amount of code needed since it's inherited to child classes. This also fixes the conflict between our macro and the same-named macro in Chromium code. BUG=angleproject:956 Change-Id: If0dc72aa3f63fbc7b8fa34907418821c64c39e2f Reviewed-on: https://chromium-review.googlesource.com/263257 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Geoff Lang 4ad1709f 2015-03-10T16:47:44 Implement FramebufferGL. BUG=angleproject:885 Change-Id: Ifb5818f185236c671cd7f20ed352edb887b49675 Reviewed-on: https://chromium-review.googlesource.com/258420 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill d1405e51 2015-03-05T15:41:39 Share FBO state with object and Impl. This patch introduces a new Framebuffer::Data class, which stores attachment related state. This will eliminate the need to store duplicated state between the classes. BUG=angleproject:930 Change-Id: I80de4db39ab99d623b0ad8306bf3cbb794cd8bd5 Reviewed-on: https://chromium-review.googlesource.com/254100 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 94463d58 2015-02-18T13:09:37 Add a state manager for the currently applied GL state. BUG=angle:883 Change-Id: Ie69c883c5ee539f911480fdcd9e73c46a3001b33 Reviewed-on: https://chromium-review.googlesource.com/250930 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>