| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change splits the GL binding initialization into to phases: core
functions and extension functions. This is motivated by two
peculiarities of the EGL window binding layer:
1. Pointers to core GL entry points may not be queried through
eglGetProcAddress().
2. The return value of eglGetProcAddress() is not specified to be NULL
for unsupported functions.
In light of these limitations, the current strategy of blindly querying
all GL entry points from eglGetProcAddress() and falling back to dlsym()
results in bogus function pointers on some EGL implementations.
This patch fixes the problem as follows:
1. Add GetGLCoreProcAddress() that only queries dlsym() and use it to
initialize pointers to all entry points. On EGL based platforms
pointers to extension functions will most likely be NULL at this
point.
2. When a context is first made current, look up the set of supported
extensions and use GetGLProcAddress() to populate the remaining
extension function pointers.
The reworked GL bindings generator uses the standard Khronos headers to
recognize the extension functions and produce appropriate initialization
code.
Note that the patch also updates gl2ext.h to match the upstream Khronos
version and corrects some minor errors in the downstream changes.
BUG=5427391
TEST=
Review URL: http://codereview.chromium.org/8381001
Patch from Sami Kyostila <skyostil@chromium.org>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107602 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change Chrome to allocate most OpenGL contexts with the
kCGLPFAAllowOfflineRenderers flag, and specify
NSSupportsAutomaticGraphicsSwitching in the Info.plist for the main
executable and helper apps. This keeps Chrome on the integrated GPU
except when using WebGL, accelerated 2D Canvas, Pepper 3D, and Core
Animation-based plugins (except Flash).
Chrome shares resources between OpenGL contexts in order to display WebGL
and other content in the compositor, and resource sharing doesn't work
between contexts allocated on different GPUs. Therefore, when the first
context for a given renderer requests the discrete GPU, the channel is
dropped and all contexts are reallocated on the discrete GPU. Similarly,
when the last context requesting the discrete GPU for a given renderer is
shut down, all contexts are dropped and reallocated on the integrated GPU.
Currently dynamic GPU switching is only supported on the latest Mac OS X
10.7 update and MacBook Pros with dual AMD / Intel GPUs, though this will
improve in future OS updates.
Tested with WebGL, CSS 3D, Flash and Unity3D content and observed desired
GPU switching behavior. Also added a layout test to WebKit under
https://bugs.webkit.org/show_bug.cgi?id=69776 which when run in Chrome
catches an assertion failure related to the destruction of contexts. The
intent is to add it as a UI layout test on the GPU bots.
BUG=88788
TEST=none
Review URL: http://codereview.chromium.org/8233027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105399 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ScopedMakeCurrent to make it easier to briefly make another context
current. Use it in AcceleratedSurface implementation and verify in the
caller that it is working.
This infrastructure would have made it possible to catch
http://crbug.com/95492 and similar bugs where the wrong context was
current.
BUG=95962
TEST=ran CSS 3D example poster-circle; no assertion failures
Review URL: http://codereview.chromium.org/7787022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100528 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I considered merging these into ui.dll, but the respective GYP files are pretty
customized, and merging all of the special casing into ui.gyp seemed like it
would just make things messy. Plus, some components only need to link to
surface and not all of ui.
One thing that I'm not entirely sure about is the naming convention. In this
case the modules are named gl, compositor and surface instead of ui_gfx_gl, and
so on. I thought about declaring UI_GFX_GL_EXPORT, but I opted for the shorter
GL_EXPORT instead. I think Ben has been thinking about moving these
directories out of ui/gfx/ anyways since it is a bit odd for them to live there.
R=rvargas
Originally reviewed at http://codereview.chromium.org/7645004
Review URL: http://codereview.chromium.org/7659017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97325 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I considered merging these into ui.dll, but the respective GYP files are pretty
customized, and merging all of the special casing into ui.gyp seemed like it
would just make things messy. Plus, some components only need to link to
surface and not all of ui.
One thing that I'm not entirely sure about is the naming convention. In this
case the modules are named gl, compositor and surface instead of ui_gfx_gl, and
so on. I thought about declaring UI_GFX_GL_EXPORT, but I opted for the shorter
GL_EXPORT instead. I think Ben has been thinking about moving these
directories out of ui/gfx/ anyways since it is a bit odd for them to live there.
R=rvargas
Review URL: http://codereview.chromium.org/7645004
TBR=darin@chromium.org
Review URL: http://codereview.chromium.org/7659015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96997 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I considered merging these into ui.dll, but the respective GYP files are pretty
customized, and merging all of the special casing into ui.gyp seemed like it
would just make things messy. Plus, some components only need to link to
surface and not all of ui.
One thing that I'm not entirely sure about is the naming convention. In this
case the modules are named gl, compositor and surface instead of ui_gfx_gl, and
so on. I thought about declaring UI_GFX_GL_EXPORT, but I opted for the shorter
GL_EXPORT instead. I think Ben has been thinking about moving these
directories out of ui/gfx/ anyways since it is a bit odd for them to live there.
R=rvargas
Review URL: http://codereview.chromium.org/7645004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96982 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(This CL was originally reviewed under
http://codereview.chromium.org/7331020/ . The only difference is the
removal of an #include from command_buffer.h that was accidentally
left in and which caused a significant increase in the number of files
containing static initializers, presumably because of the dependent
#include of <iostream>.)
This initial patch changes the Linux port to use
GLX_ARB_create_context_robustness when available, and tests
periodically whether the context has been lost after each draw call
and when making the context current. The detection of context loss
also works with EGL and ANGLE, although it always reports an unknown
reset status.
WebKit changes will follow which test the reset status and determine
what to do in response; for example, the policy might be to never
restore a WebGL context which was lost (due to a GPU reset) and which
was determined to be the guilty context.
Tested manually with WebGL stress tests and verified on Linux and
Windows that in at least some situations it is possible to detect
guilty contexts and shut down the associated WebGL application. Some
precision of this detection was recently lost and will need to be
fixed in following CLs. Also updated and ran GPU unit tests.
BUG=88106
TEST=none (tested manually; try servers)
R=gman,apatrick,piman
Review URL: http://codereview.chromium.org/7362005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92453 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GL_ARB_robustness. (Regressed static initalizer size on Linux -- will need to reexamine code to understand why.)
This initial patch changes the Linux port to use
GLX_ARB_create_context_robustness when available, and tests
periodically whether the context has been lost after each draw call
and when making the context current. The detection of context loss
also works with EGL and ANGLE, although it always reports an unknown
reset status.
WebKit changes will follow which test the reset status and determine
what to do in response; for example, the policy might be to never
restore a WebGL context which was lost (due to a GPU reset) and which
was determined to be the guilty context.
Tested manually with WebGL stress tests and verified on Linux and
Windows that in at least some situations it is possible to detect
guilty contexts and shut down the associated WebGL application. Some
precision of this detection was recently lost and will need to be
fixed in following CLs. Also updated and ran GPU unit tests.
BUG=88106
TEST=none (tested manually; try servers)
Review URL: http://codereview.chromium.org/7331020
TBR=kbr@chromium.org
Review URL: http://codereview.chromium.org/7346032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92434 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This initial patch changes the Linux port to use
GLX_ARB_create_context_robustness when available, and tests
periodically whether the context has been lost after each draw call
and when making the context current. The detection of context loss
also works with EGL and ANGLE, although it always reports an unknown
reset status.
WebKit changes will follow which test the reset status and determine
what to do in response; for example, the policy might be to never
restore a WebGL context which was lost (due to a GPU reset) and which
was determined to be the guilty context.
Tested manually with WebGL stress tests and verified on Linux and
Windows that in at least some situations it is possible to detect
guilty contexts and shut down the associated WebGL application. Some
precision of this detection was recently lost and will need to be
fixed in following CLs. Also updated and ran GPU unit tests.
BUG=88106
TEST=none (tested manually; try servers)
Review URL: http://codereview.chromium.org/7331020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92429 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(and renderer process) in the same share group.
This is work towards allowing offscreen canvas contexts to be allocated before compositor view contexts are created. This is a problem because a canvas might be created before the window it will be displayed in exists.
This does not fix the bug on its own.
BUG=80703
Review URL: http://codereview.chromium.org/7104148
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89395 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
This command allows a previously created GPU surface to be made current for a command buffer. There are no surfaces registered at this point so this command is currently a no-op.
Review URL: http://codereview.chromium.org/7077001
Review URL: http://codereview.chromium.org/7006019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87408 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
This command allows a previously created GPU surface to be made current for a command buffer. There are no surfaces registered at this point so this command is currently a no-op.
Review URL: http://codereview.chromium.org/7077001
TBR=apatrick@chromium.org
Review URL: http://codereview.chromium.org/7027008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87373 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
| |
This command allows a previously created GPU surface to be made current for a command buffer. There are no surfaces registered at this point so this command is currently a no-op.
Review URL: http://codereview.chromium.org/7077001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87371 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
This is part of an ongoing effort to treat GL contexts and GL surfaces as independent entities.
TEST=run WebGL on mac, windows and linux, trybots
BUG=none
Review URL: http://codereview.chromium.org/7021014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86332 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLSurface::Create*GLSurface plus a
surface type independent GLContext::CreateGLContext
TEST=try, including layout tests
BUG=none
Review URL: http://codereview.chromium.org/7013037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85207 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
GLSurface::Create*GLSurface plus a
surface type independent GLContext::CreateGLContext".
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85124 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
GLSurface::Create*GLSurface plus a surface type independent GLContext::CreateGLContext.
TEST=webgl on windows and mac, trybots
BUG=none
Review URL: http://codereview.chromium.org/6997003
Review URL: http://codereview.chromium.org/7015016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85081 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLSurface::Create*GLSurface plus a surface type independent GLContext::CreateGLContext.
TEST=webgl on windows and mac, trybots
BUG=none
Review URL: http://codereview.chromium.org/6997003
TBR=apatrick@chromium.org
Review URL: http://codereview.chromium.org/7015003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85016 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
surface type independent GLContext::CreateGLContext.
TEST=webgl on windows and mac, trybots
BUG=none
Review URL: http://codereview.chromium.org/6997003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85013 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
process.Removed the sync IPC that it used to ask the browser process to resize on Linux. Adapted windows to use the same mechanism.TEST=test webgl pages on windows (ANGLE and GL), linux and mac, run try job on windows, linux, mac. checkdeps failure look unrelated to patch.BUG=77536
Review URL: http://codereview.chromium.org/6880218
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83248 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLContext::LosesAllContextsOnContextLost specifies whether or not all contexts need to be destroyed when recovering from lost context condition. GpuCommandBufferStub::OnFlush and GpuCommandBufferStub::OnAsyncFlush will instruct soon-to-be-renamed GpuRenderThread to close all channels when the context is lost and LosesAllContextsOnContextLost returns true. From the EGL 1.4 spec:
"...On detection of this error, the application must destroy all contexts (by calling eglDestroyContext for each context). To continue rendering the application must recreate any contexts it requires, and subsequently restore any client API state and objects it wishes to use."
However even with this change Angle still doesn't recover correctly.
BUG=76753
TEST=breakpoint on eglDestroyContext
Review URL: http://codereview.chromium.org/6813010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81437 0039d316-1c4b-4281-b951-d872f2087c98
|
|
This is the final patch in the sequence. Note that gl.gyp is introduced because dependency checking on the Mac is done on a per file (rather than per target) basis.
BUG=none
TEST=trybots
Review URL: http://codereview.chromium.org/6722026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79599 0039d316-1c4b-4281-b951-d872f2087c98
|