chromium/src/gpu.git
119 min agoRename gpu.SwapBuffers to gpu.PresentingFrame and add it to PostSubBuffer. master
geofflang@chromium.org [Thu, 24 Apr 2014 16:40:27 +0000 (16:40 +0000)]
Rename gpu.SwapBuffers to gpu.PresentingFrame and add it to PostSubBuffer.

Depending on the GL implementation, PostSubBuffer may be called instead of
SwapBuffers.  Rename gpu.SwapBuffers to a more generic gpu.PresentingFrame
and update all the tests that use the delay.

BUG=359662

Review URL: https://codereview.chromium.org/240073008

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@265936 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

19 hours agoFix slow TextureManager::StopTracking()
vmiura@chromium.org [Wed, 23 Apr 2014 23:31:03 +0000 (23:31 +0000)]
Fix slow TextureManager::StopTracking()

Iterating an ObserverList which uses WeakPtr items seems very slow.

Changing to std::vector<> gives about a 15X speedup.
Further skipping the observer call backs for TextureRefs with no current observers should cut this close to 0.

BUG=365536

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=265469

Review URL: https://codereview.chromium.org/246353002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@265771 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

30 hours agoCleanup GPU dependencies for gl_in_process_context
primiano@chromium.org [Wed, 23 Apr 2014 11:56:58 +0000 (11:56 +0000)]
Cleanup GPU dependencies for gl_in_process_context

This CL decouples the gl_in_process_context from gles2_implementation,
introducing a dedicated target (gl_in_process_context) and fixing the
corresponding dependencies.
This is a pre-requisite for crrev.com/228003006 and crbug.com/159847

BUG=159847

Review URL: https://codereview.chromium.org/247073005

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@265613 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

37 hours agoRevert 265469 "Fix slow TextureManager::StopTracking()"
sky@chromium.org [Wed, 23 Apr 2014 04:45:19 +0000 (04:45 +0000)]
Revert 265469 "Fix slow TextureManager::StopTracking()"

This broke mac and asan builders. See following for one:
http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%281%29/builds/1584/steps/gpu_unittests/logs/AsyncPixelTransfers

> Fix slow TextureManager::StopTracking()
>
> Iterating an ObserverList which uses WeakPtr items seems very slow.
>
> Changing to std::vector<> gives about a 15X speedup.
> Further skipping the observer call backs for TextureRefs with no current observers should cut this close to 0.
>
> BUG=365536
>
> Review URL: https://codereview.chromium.org/246353002

TBR=vmiura@chromium.org

Review URL: https://codereview.chromium.org/247343003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@265542 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

41 hours agoFix slow TextureManager::StopTracking()
vmiura@chromium.org [Wed, 23 Apr 2014 01:32:27 +0000 (01:32 +0000)]
Fix slow TextureManager::StopTracking()

Iterating an ObserverList which uses WeakPtr items seems very slow.

Changing to std::vector<> gives about a 15X speedup.
Further skipping the observer call backs for TextureRefs with no current observers should cut this close to 0.

BUG=365536

Review URL: https://codereview.chromium.org/246353002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@265469 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

44 hours agoRemove dependency on --gc-sections for most Android debug targets.
primiano@chromium.org [Tue, 22 Apr 2014 22:08:20 +0000 (22:08 +0000)]
Remove dependency on --gc-sections for most Android debug targets.

Android targets shouldn't rely (at least on Debug) on the linker GC.
This CL refactors gyp files to fix target dependencies
(some of them wrong for components builds due to the .so
split).
The only targets left, at this point, are chrome_shell
and content_browsertests (will take more work).

BUG=159847

Review URL: https://codereview.chromium.org/228003006

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@265378 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

45 hours agoFlag INV_OP during BeginQuery if id is not obtained from GenQueriesEXT.
puttaraju.r@samsung.com [Tue, 22 Apr 2014 21:14:43 +0000 (21:14 +0000)]
Flag INV_OP during BeginQuery if id is not obtained from GenQueriesEXT.

BUG=none

Review URL: https://codereview.chromium.org/226483003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@265360 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agogpu: Add UMA statistic for fence support.
reveman@chromium.org [Tue, 22 Apr 2014 16:04:54 +0000 (16:04 +0000)]
gpu: Add UMA statistic for fence support.

BUG=273274

Review URL: https://codereview.chromium.org/245903002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@265266 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agocc: Use CHROMIUM_sync_query for CopyResource.
reveman@chromium.org [Tue, 22 Apr 2014 10:12:35 +0000 (10:12 +0000)]
cc: Use CHROMIUM_sync_query for CopyResource.

Use COMMANDS_COMPLETED queries instead of making the assumption
that it's safe to access the source resource once the command has
been processed on the service side.

BUG=269808

Review URL: https://codereview.chromium.org/245753003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@265220 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agoFix machine_model behaviors in gpu blacklist.
zmo@chromium.org [Mon, 21 Apr 2014 20:54:13 +0000 (20:54 +0000)]
Fix machine_model behaviors in gpu blacklist.

We made the assumption that GPUInfo.machine_model is (name, version).

This is true for mac, where this machine_model was originally designed for.
Now we also use it on Android. However, the whole machine_model should just
be retreated as one name string.

Now on Android Nexus, we have "Nexus 5", "Nexus 7", so they are processed
like on Mac, which is incorrect.

I believe a few android entries in the software_rendering_list_json.cc
are not active right now due to the (name, version).

BUG=364743
TEST=gpu_unittests
R=kbr@chromium.org, tsepez@chromium.org, vrk@chromium.org
TBR=pfeldman@chromium.org

Review URL: https://codereview.chromium.org/241793002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@265062 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agoUse VAO for default_vertex_attrib_manager if available.
vmiura@chromium.org [Sat, 19 Apr 2014 03:25:17 +0000 (03:25 +0000)]
Use VAO for default_vertex_attrib_manager if available.

By using VAO's we can make virtual context switches faster
by a single glBindVertexArrayOES instead of restoring all
attributes one-by-one.

BUG=244701, 363785

Review URL: https://codereview.chromium.org/229883002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264914 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agogpu: Use ARB_sync extension for GLFence implementation when GL version is OpenGL...
reveman@chromium.org [Sat, 19 Apr 2014 01:18:28 +0000 (01:18 +0000)]
gpu: Use ARB_sync extension for GLFence implementation when GL version is OpenGL ES 3.

This increases the number of configurations for which fences are
supported.

BUG=269808,356871

Review URL: https://codereview.chromium.org/242113011

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264900 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoEnable GPU rasterization by default on Android
ajuma@chromium.org [Fri, 18 Apr 2014 05:09:14 +0000 (05:09 +0000)]
Enable GPU rasterization by default on Android

This enables hybrid GPU rasterization on Android.

BUG=362779

Review URL: https://codereview.chromium.org/241223004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264735 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoRestore bound VAO in ContextState::RestoreState().
vmiura@chromium.org [Fri, 18 Apr 2014 01:54:52 +0000 (01:54 +0000)]
Restore bound VAO in ContextState::RestoreState().

BUG=363407, 281565

Review URL: https://codereview.chromium.org/237893004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264705 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoRe-land: gpu: Add CHROMIUM_sync_query extension.
reveman@chromium.org [Thu, 17 Apr 2014 23:48:27 +0000 (23:48 +0000)]
Re-land: gpu: Add CHROMIUM_sync_query extension.

This adds a GL_COMMANDS_COMPLETED_CHROMIUM query target that provide
a finer granularity of synchronizing GL command completion than offered
by glFinish().

BUG=269808,356871,273274
TEST=gpu_unittests --gtest_filter=GLES2DecoderManualInitTest.BeginEndQueryEXTCommandsCompletedCHROMIUM

Review URL: https://codereview.chromium.org/238933003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264675 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoRemove unused input_shlib_path
cjhopman@chromium.org [Thu, 17 Apr 2014 23:16:50 +0000 (23:16 +0000)]
Remove unused input_shlib_path

This path is now only inferred from test_suite_name.
TBR=darin
NOTRY=true

Review URL: https://codereview.chromium.org/226353002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264666 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoRemove all uses of toolkit_use_gtk in the gyp files.
erg@chromium.org [Thu, 17 Apr 2014 19:20:23 +0000 (19:20 +0000)]
Remove all uses of toolkit_use_gtk in the gyp files.

BUG=297026
R=ben@chromium.org, brettw@chromium.org

Review URL: https://codereview.chromium.org/238633004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264609 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoBlacklist D3D11 on older nVidia drivers.
jmadill@chromium.org [Thu, 17 Apr 2014 19:20:17 +0000 (19:20 +0000)]
Blacklist D3D11 on older nVidia drivers.

Older nVidia drivers (269.73 and prior) seem to show up in crash reports
associated with turning on D3D11 by default in ANGLE. Forcing D3D9
should clear up the crashes.

BUG=349929

Review URL: https://codereview.chromium.org/240503002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264608 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoChange ACCELERATED_COMPOSITING blacklist to GPU_COMPOSITING.
danakj@chromium.org [Thu, 17 Apr 2014 17:38:48 +0000 (17:38 +0000)]
Change ACCELERATED_COMPOSITING blacklist to GPU_COMPOSITING.

Remove any checks for ACCELERATED_COMPOSITING to determine if
compositing is available, since it always is. Instead rename
the blacklist entry to GPU_COMPOSITING and use it to prevent
GL-based compositing.

Depends on: https://codereview.chromium.org/238933009/

R=jbauman@chromium.org, piman@chromium.org, zmo@chromium.org
BUG=363772

Review URL: https://codereview.chromium.org/239083006

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264566 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoAdd GPU_RASTERIZATION as one of the gpu blacklist features.
zmo@chromium.org [Thu, 17 Apr 2014 17:34:41 +0000 (17:34 +0000)]
Add GPU_RASTERIZATION as one of the gpu blacklist features.

BUG=362782
TEST=gpu_unittests
R=ajuma@chromium.org, kbr@chromium.org

Review URL: https://codereview.chromium.org/240243005

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264564 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agogpu: Remove left-over empty class declaration
jadahl@opera.com [Thu, 17 Apr 2014 08:20:56 +0000 (08:20 +0000)]
gpu: Remove left-over empty class declaration

ScopedSafeSharedMemory was removed in "GPU: Remove memory duplication in
async uploads." so lets remove this empty declaration as well.

BUG=

Review URL: https://codereview.chromium.org/237673016

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264469 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoRevert of gpu: Add CHROMIUM_sync_query extension. (https://codereview.chromium.org...
hayato@chromium.org [Thu, 17 Apr 2014 04:22:33 +0000 (04:22 +0000)]
Revert of gpu: Add CHROMIUM_sync_query extension. (https://codereview.chromium.org/238933003/)

Reason for revert:
[gardening]

Seems that QueryTest.SyncQueryBasic started to fail on Android Tests (dbug).

http://build.chromium.org/p/chromium.webkit/builders/Android%20Tests%20%28dbg%29
http://build.chromium.org/p/chromium.webkit/builders/Android%20Tests%20%28dbg%29/builds/18673/steps/gl_tests/logs/stdio

[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from QueryTest
[ RUN      ] QueryTest.SyncQueryBasic
../../gpu/command_buffer/tests/gl_query_unittest.cc:154: Failure
Value of: GLTestHelper::HasExtension("GL_CHROMIUM_sync_query")
  Actual: false
Expected: true
[0417/014324:ERROR:gles2_cmd_decoder.cc(9542)] [GroupMarkerNotSet(crbug.com/242999)!:04B0A600]GL ERROR :GL_INVALID_OPERATION : glBeginQueryEXT: not enabled for commands completed queries
[0417/014324:ERROR:gles2_cmd_decoder.cc(9617)] [GroupMarkerNotSet(crbug.com/242999)!:04B0A600]GL ERROR :GL_INVALID_OPERATION : glEndQueryEXT: No active query
../../gpu/command_buffer/tests/gl_query_unittest.cc:166: Failure
Value of: available
  Actual: false
Expected: true
../../gpu/command_buffer/tests/gl_manager.cc:241: Failure
Value of: glGetError() == GL_NONE
  Actual: false
Expected: true
[  FAILED  ] QueryTest.SyncQueryBasic (70 ms)
[----------] 1 test from QueryTest (71 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (71 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] QueryTest.SyncQueryBasic

In range 264168:264191, this patch might be the culprit.

Let me revert this patch and watch whether Android Tests will cycle to green or not.

Original issue's description:
> gpu: Add CHROMIUM_sync_query extension.
>
> This adds a GL_COMMANDS_COMPLETED_CHROMIUM query target that provide
> a finer granularity of synchronizing GL command completion than offered
> by glFinish().
>
> BUG=269808,356871,273274
> TEST=gpu_unittests --gtest_filter=GLES2DecoderManualInitTest.BeginEndQueryEXTCommandsCompletedCHROMIUM
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=264173

TBR=piman@chromium.org,epenner@chromium.org,sievers@chromium.org,reveman@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=269808,356871,273274

Review URL: https://codereview.chromium.org/240273006

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264407 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoWire GL_CHROMIUM_map_sub functions up to Skia.
bsalomon@google.com [Thu, 17 Apr 2014 00:01:26 +0000 (00:01 +0000)]
Wire GL_CHROMIUM_map_sub functions up to Skia.

BUG=skia:2402

Review URL: https://codereview.chromium.org/231993002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264358 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoRemove ForceCompositingMode from the GPU blacklist.
danakj@chromium.org [Wed, 16 Apr 2014 18:40:30 +0000 (18:40 +0000)]
Remove ForceCompositingMode from the GPU blacklist.

This mode is always on for everything we ship, so we never need to
blacklist it.

R=jbauman@chromium.org
BUG=363772

Review URL: https://codereview.chromium.org/239253005

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264263 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoMove vertex and fragment shader uniform vector workarounds to gpu driver bug list.
puttaraju.r@samsung.com [Wed, 16 Apr 2014 16:49:52 +0000 (16:49 +0000)]
Move vertex and fragment shader uniform vector workarounds to gpu driver bug list.

BUG=none

Review URL: https://codereview.chromium.org/224233003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264215 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoRevert 264104 "Restore bound VAO in ContextState::RestoreState()."
phoglund@chromium.org [Wed, 16 Apr 2014 12:24:29 +0000 (12:24 +0000)]
Revert 264104 "Restore bound VAO in ContextState::RestoreState()."

> Restore bound VAO in ContextState::RestoreState().
>
> BUG=363407
>
> Review URL: https://codereview.chromium.org/237893004

This patch seems to have broken the WebRTC Nexus 5 bots:
http://chromegw.corp.google.com/i/chromium.webrtc/builders/Android%20Tests%20%28dbg%29%20%28KK%20Nexus5%29

The logcat was full of these warnings:
ERROR:gpu_video_decode_accelerator_host.cc(204)]

BUG=364005
TBR=vmiura@chromium.org

Review URL: https://codereview.chromium.org/240113003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264179 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agogpu: Add CHROMIUM_sync_query extension.
reveman@chromium.org [Wed, 16 Apr 2014 11:37:09 +0000 (11:37 +0000)]
gpu: Add CHROMIUM_sync_query extension.

This adds a GL_COMMANDS_COMPLETED_CHROMIUM query target that provide
a finer granularity of synchronizing GL command completion than offered
by glFinish().

BUG=269808,356871,273274
TEST=gpu_unittests --gtest_filter=GLES2DecoderManualInitTest.BeginEndQueryEXTCommandsCompletedCHROMIUM

Review URL: https://codereview.chromium.org/238933003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264173 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoAvoid GetState IPC call during AllocateRingbuffer.
puttaraju.r@samsung.com [Wed, 16 Apr 2014 09:50:55 +0000 (09:50 +0000)]
Avoid GetState IPC call during AllocateRingbuffer.

SetGetBuffer(id) resets get and put offsets to 0.
So no need to ask CommandBuffer::State through GetState() IPC call.

CreateTransferBuffer() allocates new cmd buffer of size 1MB.
No need to check for num_entries after new allocation of ring_buffer, as always state.num_entries==num_ring_buffer_entries after this new allocation.

BUG=none

Review URL: https://codereview.chromium.org/220243003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264166 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoRestore bound VAO in ContextState::RestoreState().
vmiura@chromium.org [Wed, 16 Apr 2014 03:50:53 +0000 (03:50 +0000)]
Restore bound VAO in ContextState::RestoreState().

BUG=363407

Review URL: https://codereview.chromium.org/237893004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264104 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoAdd support for EXT_shader_texture_lod to the command buffer.
nicolascapens@chromium.org [Wed, 16 Apr 2014 02:46:06 +0000 (02:46 +0000)]
Add support for EXT_shader_texture_lod to the command buffer.

BUG=angle:551

Review URL: https://codereview.chromium.org/239223004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264080 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoReduce the number of flushes while using glQueries.
puttaraju.r@samsung.com [Wed, 16 Apr 2014 01:45:32 +0000 (01:45 +0000)]
Reduce the number of flushes while using glQueries.

BUG=none

Review URL: https://codereview.chromium.org/228653004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264057 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoPCI scan to find GPU: not limited to just VGA.
zmo@chromium.org [Tue, 15 Apr 2014 23:04:35 +0000 (23:04 +0000)]
PCI scan to find GPU: not limited to just VGA.

On Thinkpad T430s with NVIDIA Optimus, the NVIDIA GPU is listed as a
3D controller, not a VGA compatible controller.

BUG=363418
TEST=
R=kbr@chromium.org

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=263998

Review URL: https://codereview.chromium.org/237673004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264028 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoRevert 263998 "PCI scan to find GPU: not limited to just VGA."
zmo@chromium.org [Tue, 15 Apr 2014 23:00:34 +0000 (23:00 +0000)]
Revert 263998 "PCI scan to find GPU: not limited to just VGA."

Accidentally commited something unrelated to this CL.

> PCI scan to find GPU: not limited to just VGA.
>
> On Thinkpad T430s with NVIDIA Optimus, the NVIDIA GPU is listed as a
> 3D controller, not a VGA compatible controller.
>
> BUG=363418
> TEST=
> R=kbr@chromium.org
>
> Review URL: https://codereview.chromium.org/237673004

TBR=zmo@chromium.org

Review URL: https://codereview.chromium.org/239453004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264023 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoglDeleteVertexArraysOES on bound VAO restores default VAO 0.
vmiura@chromium.org [Tue, 15 Apr 2014 21:36:11 +0000 (21:36 +0000)]
glDeleteVertexArraysOES on bound VAO restores default VAO 0.

The default VAO attributes were not being restored when using emulated
VAO, for example on ARM GPUs (e.g. Nexus 10) Chrome forces VAO emulation,
and the following WebGL conformance test fails:

http://www.khronos.org/registry/webgl/sdk/tests/conformance/extensions/oes-vertex-array-object.html

BUG=263398

Review URL: https://codereview.chromium.org/237603003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@264005 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoPCI scan to find GPU: not limited to just VGA.
zmo@chromium.org [Tue, 15 Apr 2014 21:12:09 +0000 (21:12 +0000)]
PCI scan to find GPU: not limited to just VGA.

On Thinkpad T430s with NVIDIA Optimus, the NVIDIA GPU is listed as a
3D controller, not a VGA compatible controller.

BUG=363418
TEST=
R=kbr@chromium.org

Review URL: https://codereview.chromium.org/237673004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@263998 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 days agoBlacklist AMD driver version 13.101 on linux
piman@chromium.org [Tue, 15 Apr 2014 12:50:42 +0000 (12:50 +0000)]
Blacklist AMD driver version 13.101 on linux

BUG=363378

Review URL: https://codereview.chromium.org/237923002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@263818 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 days agox11: Remove X11 message-pump.
sadrul@chromium.org [Tue, 15 Apr 2014 03:34:54 +0000 (03:34 +0000)]
x11: Remove X11 message-pump.

The remaining use of the X11 mesage-pump was opening the connection to the
X11 server. This patch moves that out of the message-pump, into gfx. This
allows us to remove the X11 message-pump, and just use the base Glib-based
message-pump on Linux and ChromeOS.

BUG=354062
R=darin@chromium.org, sky@chromium.org

Previously landed in r263726, but reverted in r263733 to allow reverting another CL.

Review URL: https://codereview.chromium.org/235043005

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@263777 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 days agoRevert 263726 "x11: Remove X11 message-pump."
fischman@chromium.org [Mon, 14 Apr 2014 22:45:15 +0000 (22:45 +0000)]
Revert 263726 "x11: Remove X11 message-pump."

Reason for revert: along with 263718 blamed for
http://build.chromium.org/p/chromium.linux/builders/Linux%20Tests%20%28dbg%29%282%29/builds/45298
http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%281%29/builds/29956

> x11: Remove X11 message-pump.
>
> The remaining use of the X11 mesage-pump was opening the connection to the
> X11 server. This patch moves that out of the message-pump, into gfx. This
> allows us to remove the X11 message-pump, and just use the base Glib-based
> message-pump on Linux and ChromeOS.
>
> BUG=354062
> R=darin@chromium.org, sky@chromium.org
>
> Review URL: https://codereview.chromium.org/235043005

TBR=sadrul@chromium.org

Review URL: https://codereview.chromium.org/238093002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@263733 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 days agox11: Remove X11 message-pump.
sadrul@chromium.org [Mon, 14 Apr 2014 21:13:20 +0000 (21:13 +0000)]
x11: Remove X11 message-pump.

The remaining use of the X11 mesage-pump was opening the connection to the
X11 server. This patch moves that out of the message-pump, into gfx. This
allows us to remove the X11 message-pump, and just use the base Glib-based
message-pump on Linux and ChromeOS.

BUG=354062
R=darin@chromium.org, sky@chromium.org

Review URL: https://codereview.chromium.org/235043005

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@263726 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agoSupport ANGLE_instanced_arrays on GLES3
oetuaho@nvidia.com [Mon, 14 Apr 2014 10:49:17 +0000 (10:49 +0000)]
Support ANGLE_instanced_arrays on GLES3

glDrawArraysInstanced, glDrawElementsInstanced, and glVertexAttribDivisor
are parts of ES3 core. Expose them through ANGLE_instanced_arrays on ES3.

BUG=362530
TEST=WebGL conformance tests, gpu_unittests

Review URL: https://codereview.chromium.org/234873003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@263609 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agogpu: Add trace event to GLES2DecoderImpl::DoCopyTextureCHROMIUM.
reveman@chromium.org [Mon, 14 Apr 2014 02:40:08 +0000 (02:40 +0000)]
gpu: Add trace event to GLES2DecoderImpl::DoCopyTextureCHROMIUM.

BUG=269808
TBR=piman

Review URL: https://codereview.chromium.org/225993004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@263580 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoImplement CollectDriverInfoGL for Ozone.
kalyan.kondapally@intel.com [Sat, 12 Apr 2014 10:47:19 +0000 (10:47 +0000)]
Implement CollectDriverInfoGL for Ozone.

Review URL: https://codereview.chromium.org/231863009

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@263513 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoRemove stale GPU code on Windows/Mac
piman@chromium.org [Sat, 12 Apr 2014 05:09:08 +0000 (05:09 +0000)]
Remove stale GPU code on Windows/Mac

- on Windows: with Aura + removal of the accelerated surface support, the only
"transport"-type surfaces are TextureImageTransportSurfaces and
IOSurfaceImageTransportSurface. The GpuHostMsg_AcceleratedSurface* messages can
go directly to the UI thread without the need for filtering on the IO thread.
- on both Mac and Windows, we use the compositor thread always, so we don't need
the ViewMsg_SwapBuffers_ACK and associated logic any more.

BUG=None

Review URL: https://codereview.chromium.org/137663006

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@263475 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agogpu: InProcessCommandBuffer::DestroyTransferBuffer thread safe
boliu@chromium.org [Fri, 11 Apr 2014 21:08:36 +0000 (21:08 +0000)]
gpu: InProcessCommandBuffer::DestroyTransferBuffer thread safe

Accessing InProcessCommandBuffer::command_buffer_ must hold the
command_buffer_lock_ lock and DestroyTransferBuffer did not.

BUG=362346

Review URL: https://codereview.chromium.org/235503004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@263355 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoRemove a bunch of TOOLKIT_GTK in content/ and gpu/, as well as NPAPI plugins on linux
piman@chromium.org [Fri, 11 Apr 2014 18:25:58 +0000 (18:25 +0000)]
Remove a bunch of TOOLKIT_GTK in content/ and gpu/, as well as NPAPI plugins on linux

BUG=297026

Review URL: https://codereview.chromium.org/234533002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@263288 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoAttempt to prevent NULL-pointer error accessing command-buffer entries.
jbauman@chromium.org [Fri, 11 Apr 2014 07:27:57 +0000 (07:27 +0000)]
Attempt to prevent NULL-pointer error accessing command-buffer entries.

It looks like MSVC is mostly optimizing out the NULL pointer check. We can attempt to placate its alias analysis by returning a void* from the function (instead of a different pointer type) and switching to static_cast from reinterpret_cast (which apparently is illegal with a void*).

BUG=361936

Review URL: https://codereview.chromium.org/233873002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@263171 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoDelete the GTK+ port of Chrome.
erg@chromium.org [Thu, 10 Apr 2014 22:20:52 +0000 (22:20 +0000)]
Delete the GTK+ port of Chrome.

BUG=297026
R=ben@chromium.org

Review URL: https://codereview.chromium.org/231733005

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@263101 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoPlumb ScheduleOverlayPlane into the GPU process.
alexst@chromium.org [Wed, 9 Apr 2014 16:50:01 +0000 (16:50 +0000)]
Plumb ScheduleOverlayPlane into the GPU process.

BUG=

Review URL: https://codereview.chromium.org/222333002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@262715 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoFilter redundant state changes in gles2::ContextState::RestoreGlobalState().
vmiura@chromium.org [Wed, 9 Apr 2014 12:39:34 +0000 (12:39 +0000)]
Filter redundant state changes in gles2::ContextState::RestoreGlobalState().

Reduce GL calls in Virtual GL context restore, by checking for differences
from previous state.

BUG=244701, 353822

Review URL: https://codereview.chromium.org/228263007

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@262664 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoRemove default textures in (!bind_generates_resource) context groups.
vmiura@chromium.org [Tue, 8 Apr 2014 03:51:57 +0000 (03:51 +0000)]
Remove default textures in (!bind_generates_resource) context groups.

Previously texture ids for default textures in Renderer
compositor and Browser compositor contexts are different,
so during a context switch we'd be restoring default
textures for all units which can be slow.

This change makes all default textures 'null' for context groups
with bind_generates_resource == false.

Since Renderer and Browser compositors will both have 'null' default
textures, state switching will be avoided.

BUG=333063, 353822

Review URL: https://codereview.chromium.org/224763002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@262288 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoFix -Wunused-local-typedefs errors with GCC 4.7+
fdegans@chromium.org [Mon, 7 Apr 2014 19:07:31 +0000 (19:07 +0000)]
Fix -Wunused-local-typedefs errors with GCC 4.7+

BUG=321833

Review URL: https://codereview.chromium.org/213693007

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@262172 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoPass GL context bind_generates_resources flag to GPU Service.
vmiura@chromium.org [Thu, 3 Apr 2014 23:00:50 +0000 (23:00 +0000)]
Pass GL context bind_generates_resources flag to GPU Service.

GPU Client has been respecting the bind_generates_resources attrib,
however the GPU Service has been forcing it to always 'true'.  This
means glBind semantic validation has been incorrect when
bind_generates_resources is 'false' on the Client.

This patch passes the bind_generates_resources attrib for
WebGraphicsContext3DCommandBufferImpl, and checks that all contexts
in the same ContextGroup use the same setting.

BUG=333063, 244968

Review URL: https://codereview.chromium.org/213743003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@261563 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoMake ShaderTranslatorCache per thread refcounted
boliu@chromium.org [Thu, 3 Apr 2014 15:58:14 +0000 (15:58 +0000)]
Make ShaderTranslatorCache per thread refcounted

After crbug.com/332146 is fixed, in Android WebView, GLES2Decoder can be
used on two threads. Make sure a ShaderTranslatorCache instance is only
used on a single thread by refcounting an instance between all decoders.

Also protect ShInitialize by using the thread safety guarantees of
LazyInstance.

For tests, a new instance of ShaderTranslatorCache is passed for each
ContextGroup.

BUG=

Review URL: https://codereview.chromium.org/217813004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@261427 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoRevert r258965 aka reland r258122
sievers@chromium.org [Thu, 3 Apr 2014 14:44:55 +0000 (14:44 +0000)]
Revert r258965 aka reland r258122

gpu: Allow fences to check whether a flush has occurred

This skips waiting on a fence that was created but never committed.

BUG=352419,355275
TBR=piman@chromium.org

> Original Review URL: https://codereview.chromium.org/197563003

Review URL: https://codereview.chromium.org/222103008

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@261383 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoInitialize overlay validator in GpuBrowserCompositorOutputSurface.
alexst@chromium.org [Thu, 3 Apr 2014 07:26:24 +0000 (07:26 +0000)]
Initialize overlay validator in GpuBrowserCompositorOutputSurface.

Plus refactor overlay transform into separate file to use the same type in cc, ozone and context_support.

BUG=

Review URL: https://codereview.chromium.org/220723006

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@261301 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agogpu: Add explicit dependency on X11/Xext when building with X11.
sadrul@chromium.org [Thu, 3 Apr 2014 07:03:06 +0000 (07:03 +0000)]
gpu: Add explicit dependency on X11/Xext when building with X11.

BUG=none
R=piman@chromium.org

Review URL: https://codereview.chromium.org/214133012

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@261288 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoMove force sync readpixel to gpu driver bug list
zmo@chromium.org [Thu, 3 Apr 2014 00:26:12 +0000 (00:26 +0000)]
Move force sync readpixel to gpu driver bug list

BUG=351466
TEST=bots
R=bajones@chromium.org, ccameron@chromium.org, kbr@chromium.org

Review URL: https://codereview.chromium.org/199473002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@261239 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoAppend (instead of replace) gpu driver bug workarounds from commandline.
zmo@chromium.org [Thu, 3 Apr 2014 00:06:45 +0000 (00:06 +0000)]
Append (instead of replace) gpu driver bug workarounds from commandline.

Before if we specify a workaround through commandline, then
we bypass loading them from the built-in json list.

After this, we append it to the workarounds from the
built-in json list, not overwriting them.

If we don't want the workarounds from the json list, we can
specify "--disable-gpu-driver-bug-workarounds", and on top
of that, adding any workarounds we want.

This provides most flexibility for testing purpose.

BUG=359348
TEST=gpu_unittests,manual
R=kbr@chromium.org

Review URL: https://codereview.chromium.org/212223010

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@261232 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoRefactor gpu::Buffer to allow different types of backing
piman@chromium.org [Wed, 2 Apr 2014 23:54:09 +0000 (23:54 +0000)]
Refactor gpu::Buffer to allow different types of backing

This is so that we can use either base::SharedMemory or mojo::SharedBuffer to
back gpu::Buffer.

BUG=333157
R=darin@chromium.org, viettrungluu@chromium.org

Review URL: https://codereview.chromium.org/213353005

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@261228 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoOnly turn on force_gl_finish_after_compositing when Intel GPU is active.
zmo@chromium.org [Wed, 2 Apr 2014 22:16:07 +0000 (22:16 +0000)]
Only turn on force_gl_finish_after_compositing when Intel GPU is active.

This fixes a Maps perf regression on Mac with dual GPUs.

BUG=358953
TEST=gpu_unittests, maps page perf mentioned in the bug
R=kbr@chromium.org

Review URL: https://codereview.chromium.org/222933002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@261196 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agogpu: Bind dummy GL API when no context is current
sievers@google.com [Wed, 2 Apr 2014 18:37:12 +0000 (18:37 +0000)]
gpu: Bind dummy GL API when no context is current

Also make platform behavior consistent in always releasing
any previously current context when MakeCurrent() fails.

This catches GL call sites with no context current.
It also avoids problems with GL implementations potentially not liking
this (and crashing) or even us ending up calling into the wrong context
(for example accidentally deleting a resource in the wrong context).

BUG=355275
R=piman@chromium.org

Review URL: https://codereview.chromium.org/221433004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@261153 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoAdd gpu blacklist semantic of applying only to the "active" gpu.
zmo@chromium.org [Wed, 2 Apr 2014 17:33:13 +0000 (17:33 +0000)]
Add gpu blacklist semantic of applying only to the "active" gpu.

This is currently effective on mac os x, where we track gpu switching.

This is to unblock https://codereview.chromium.org/199473002/

BUG=351466
TEST=gpu_unittests
R=cdn@chromium.org, kbr@chromium.org

Review URL: https://codereview.chromium.org/219343007

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@261142 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agogpu: Lose context when BeginQueryEXT fails to allocate.
danakj@chromium.org [Wed, 2 Apr 2014 14:43:13 +0000 (14:43 +0000)]
gpu: Lose context when BeginQueryEXT fails to allocate.

Instead of crashes, raise a GL_OUT_OF_MEMORY error. Since compositor
does not want to deal with these errors and it would leave it in a
bad state, add the ability to lose the context when GL_OUT_OF_MEMORY
occurs.

R=dmichael@chromium.org, jamesr@chromium.org, piman@chromium.org, piman
BUG=351587

Review URL: https://codereview.chromium.org/199443004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@261120 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoRevert of gpu: Raise GL_OUT_OF_MEMORY when BeginQueryEXT fails to allocate. (https...
pfeldman@chromium.org [Wed, 2 Apr 2014 04:56:18 +0000 (04:56 +0000)]
Revert of gpu: Raise GL_OUT_OF_MEMORY when BeginQueryEXT fails to allocate. (https://codereview.chromium.org/199443004/)

Reason for revert:
Build failure in content/common/gpu/client/gl_helper_benchmark.cc.

http://build.chromium.org/p/chromium/builders/Linux%20x64/builds/63241/steps/compile/logs/stdio

Original issue's description:
> gpu: Lose context when BeginQueryEXT fails to allocate.
>
> Instead of crashes, raise a GL_OUT_OF_MEMORY error. Since compositor
> does not want to deal with these errors and it would leave it in a
> bad state, add the ability to lose the context when GL_OUT_OF_MEMORY
> occurs.
>
> R=piman
> BUG=351587
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261064

TBR=piman@chromium.org,dmichael@chromium.org,jamesr@chromium.org,danakj@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=351587

Review URL: https://codereview.chromium.org/221783002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@261075 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agogpu: Lose context when BeginQueryEXT fails to allocate.
danakj@chromium.org [Wed, 2 Apr 2014 04:16:29 +0000 (04:16 +0000)]
gpu: Lose context when BeginQueryEXT fails to allocate.

Instead of crashes, raise a GL_OUT_OF_MEMORY error. Since compositor
does not want to deal with these errors and it would leave it in a
bad state, add the ability to lose the context when GL_OUT_OF_MEMORY
occurs.

R=piman
BUG=351587

Review URL: https://codereview.chromium.org/199443004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@261064 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoUpdate fields for translator resources.
jmadill@chromium.org [Tue, 1 Apr 2014 17:27:47 +0000 (17:27 +0000)]
Update fields for translator resources.

Handle both the new translator header and the old until we converge on
the new ES3 ANGLE branch.

BUG=356760

Review URL: https://codereview.chromium.org/217183002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@260898 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoRemove CommandBuffer::GetTransferBuffer.
piman@chromium.org [Tue, 1 Apr 2014 09:06:43 +0000 (09:06 +0000)]
Remove CommandBuffer::GetTransferBuffer.

The only time we call GetTransferBuffer is on Pepper, right after
CreateTransferBuffer, so combine the two. This lets us dramatically remove all
the maintenance burden (maps) and extra IPCs.

Also separate service-only calls out of CommandBuffer, into CommandBufferServiceBase

BUG=None

Review URL: https://codereview.chromium.org/215803002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@260806 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoGPU: Fix NULL gpu::Buffer dereference.
epenner@chromium.org [Tue, 1 Apr 2014 00:36:37 +0000 (00:36 +0000)]
GPU: Fix NULL gpu::Buffer dereference.

After refactoring buffer from POD type to pointers, we missed
two possible NULL dereferences. This patch handles these
gracefully, as well as adds some DCHECKs in other places
(where we can safely assume Buffers are not NULL).

BUG=177063, 353822, 357140

Review URL: https://codereview.chromium.org/217593004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@260717 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoRevert 260560 "Roll ANGLE with a translator gyp change."
ccameron@chromium.org [Mon, 31 Mar 2014 18:08:21 +0000 (18:08 +0000)]
Revert 260560 "Roll ANGLE with a translator gyp change."

Linux Debug started failing GLHelperTest.ARGBSyncReadbackTest, stack blames:
third_party/angle/src/compiler/translator/PoolAlloc.cpp:38
TPoolAllocator* GetGlobalPoolAllocator():
    Assertion `PoolIndex != (static_cast<OS_TLSIndex>(-1))' failed.

> Roll ANGLE with a translator gyp change.
>
> BUG=356760
>
> Review URL: https://codereview.chromium.org/217123002

TBR=jmadill@chromium.org

Review URL: https://codereview.chromium.org/218733007

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@260605 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoWhitelist Intel Haswell gpu (0x0a16) on linux with newer mesa drivers.
zmo@chromium.org [Mon, 31 Mar 2014 17:59:32 +0000 (17:59 +0000)]
Whitelist Intel Haswell gpu (0x0a16) on linux with newer mesa drivers.

BUG=340886
TEST=gpu_unittests
TBR=kbr@chromium.org

Review URL: https://codereview.chromium.org/219823002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@260602 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoEnable gpu features for AMD gpu with newer Mesa drivers on Linux
zmo@chromium.org [Mon, 31 Mar 2014 17:49:11 +0000 (17:49 +0000)]
Enable gpu features for AMD gpu with newer Mesa drivers on Linux

BUG=357314
TEST=gpu_unittests
R=kbr@chromium.org

Review URL: https://codereview.chromium.org/215493002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@260595 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoui: Cleanup gfx::GpuMemoryBuffer interface.
reveman@chromium.org [Mon, 31 Mar 2014 16:42:43 +0000 (16:42 +0000)]
ui: Cleanup gfx::GpuMemoryBuffer interface.

Fix description of interface and improve the comments in general.

Clang format all *gpu_memory_buffer* files.

This also make the interface a bit easier to use by not having Map()
unnecessarily use a parameter for return value.

Also add myself to ui/gfx/OWNERS and content/common/gpu/OWNERS

BUG=

Review URL: https://codereview.chromium.org/216333004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@260566 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoWire glDiscardFramebuffer up to Skia.
bsalomon@google.com [Mon, 31 Mar 2014 16:35:56 +0000 (16:35 +0000)]
Wire glDiscardFramebuffer up to Skia.

BUG=skia:2349

Review URL: https://codereview.chromium.org/216833005

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@260562 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoRoll ANGLE with a translator gyp change.
jmadill@chromium.org [Mon, 31 Mar 2014 16:33:24 +0000 (16:33 +0000)]
Roll ANGLE with a translator gyp change.

BUG=356760

Review URL: https://codereview.chromium.org/217123002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@260560 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agogpu: Reuse transfer buffers more aggresively
jadahl@opera.com [Mon, 31 Mar 2014 09:07:02 +0000 (09:07 +0000)]
gpu: Reuse transfer buffers more aggresively

By keeping track of transfer buffer usage (both sync and async), it is
possible to reuse an existing transfer buffer earlier than it is today.

For synchronous uploads, this is done by inserting tokens marking a
buffer's last usage. If such a token has passed, the buffer can be
reused.

For asynchronous uploads, this is done by adding an internal async
upload token to the GLES2Implementation and GLES2CmdDecoderImpl that
enumerates all asynchronous uploads. When an upload is completed, the
token is synchronized with the client which then can free the memory
associated with the async token.

The fenced allocator and mapped memory manager gets a callback that is
used to allow fenced allocator to make the user, in this case
GLES2Implementation, poll the current async upload token and free any
associated memory.

BUG=328808

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260177

Review URL: https://codereview.chromium.org/116863003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@260507 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoBlacklist Intel GPU driver version 8.15.10.1749. This is an old driver (circa 2009...
vangelis@chromium.org [Mon, 31 Mar 2014 07:06:52 +0000 (07:06 +0000)]
Blacklist Intel GPU driver version 8.15.10.1749.  This is an old driver (circa 2009) that accounts for a disproportionate majority of our GPU process hangs.

BUG=350566

Review URL: https://codereview.chromium.org/209353015

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@260499 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoMojo: Move C gles2 header files to mojo/public/c/gles2.
viettrungluu@chromium.org [Sun, 30 Mar 2014 20:40:17 +0000 (20:40 +0000)]
Mojo: Move C gles2 header files to mojo/public/c/gles2.

(C++ files still to do.)

Also, as a drive-by, update the generated copyright notice in
build_gles2_cmd_buffer.py to the correct, current one (no "(c)").

R=darin@chromium.org
TBR=piman@chromium.org

Review URL: https://codereview.chromium.org/218193002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@260459 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoPlumb overlay processing into DirectRenderer.
alexst@chromium.org [Fri, 28 Mar 2014 20:49:07 +0000 (20:49 +0000)]
Plumb overlay processing into DirectRenderer.

This change tests for overlays inside DirectRenderer::DrawFrame and if
new overlay passes were produced, it skips rendering them and forwards the
information to FinishDrawingFrame to allow subclasses like GLRenderer and
SoftwareRenderer to schedule overlays in a manner specific to their
implementation.

GLRenderer schedules overlays via ContextSupport.

Adds more tests to ensure overlay quads are not drawn and if no overlays
are present, no quads are skipped.

BUG=

Review URL: https://codereview.chromium.org/208213003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@260267 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoRevert 260177 "By keeping track of transfer buffer usage (both s..."
creis@chromium.org [Fri, 28 Mar 2014 18:00:29 +0000 (18:00 +0000)]
Revert 260177 "By keeping track of transfer buffer usage (both s..."

Caused a heap-use-after-free in GLES2DecoderManualInitTest.AsyncPixelTransfers
on Linux ASan+LSan Tests (1):
http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%2BLSan%20Tests%20%281%29/builds/863

> By keeping track of transfer buffer usage (both sync and async), it is
> possible to reuse an existing transfer buffer earlier than it is today.
>
> For synchronous uploads, this is done by inserting tokens marking a
> buffer's last usage. If such a token has passed, the buffer can be
> reused.
>
> For asynchronous uploads, this is done by adding an internal async
> upload token to the GLES2Implementation and GLES2CmdDecoderImpl that
> enumerates all asynchronous uploads. When an upload is completed, the
> token is synchronized with the client which then can free the memory
> associated with the async token.
>
> The fenced allocator and mapped memory manager gets a callback that is
> used to allow fenced allocator to make the user, in this case
> GLES2Implementation, poll the current async upload token and free any
> associated memory.
>
> BUG=328808
>
> Review URL: https://codereview.chromium.org/116863003

TBR=jadahl@opera.com

Review URL: https://codereview.chromium.org/216673006

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@260193 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 weeks agoBy keeping track of transfer buffer usage (both sync and async), it is
jadahl@opera.com [Fri, 28 Mar 2014 17:10:48 +0000 (17:10 +0000)]
By keeping track of transfer buffer usage (both sync and async), it is
possible to reuse an existing transfer buffer earlier than it is today.

For synchronous uploads, this is done by inserting tokens marking a
buffer's last usage. If such a token has passed, the buffer can be
reused.

For asynchronous uploads, this is done by adding an internal async
upload token to the GLES2Implementation and GLES2CmdDecoderImpl that
enumerates all asynchronous uploads. When an upload is completed, the
token is synchronized with the client which then can free the memory
associated with the async token.

The fenced allocator and mapped memory manager gets a callback that is
used to allow fenced allocator to make the user, in this case
GLES2Implementation, poll the current async upload token and free any
associated memory.

BUG=328808

Review URL: https://codereview.chromium.org/116863003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@260177 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 weeks agoGLHelper: Use preferred BGRA read pixels for YUV read back
robert.bradford@intel.com [Thu, 27 Mar 2014 11:44:21 +0000 (11:44 +0000)]
GLHelper: Use preferred BGRA read pixels for YUV read back

When copying to the PBO the driver can use a blit if the requested
format matches the underlying format of the data. Mesa on Intel is
storing the data internally as BGRA (byte order).

This change moves the choice of format to the caller of the
ReadbackAsync and ReadbackPlane functions.

We then use GL_BGRA to read in the plane data for the YUV readback
object. However since the format is now swizzled we must swizzle the
pixel data back. This is done using the existing mechanism for swizzling
the result in the scaling shaders.

The activation of the use of GL_BGRA and swizzling is controlled by
querying the GL implementation for it's preferred format and type. In
the GPU code we pass this request onto the underlying GL implementation
if it supports the GL_OES_read_format extension.

As a result of this change glReadPixels can return immediately after
setting up the blit to the PBO and as such the asynchronous glReadPixels
works as expected when reading back YUV data for Tab Casting.

This is a revised version of the patch that correctly handles that the
extension above can trigger an error but that the GLES specification does not
specify than an error can occur.

Original CL: https://codereview.chromium.org/178583008/

TEST=With the change observe that the time spent in the
HandleReadPixels tracepoint is reduced.
BUG=348015

Review URL: https://codereview.chromium.org/208223004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@259832 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 weeks agoGPU: Remove memory duplication in async uploads.
epenner@chromium.org [Thu, 27 Mar 2014 06:10:12 +0000 (06:10 +0000)]
GPU: Remove memory duplication in async uploads.

Now that gpu::Buffer is ref-counted, we can avoid duplicating
memory for security (to prevent use-after-free).

BUG=177063, 353822

Review URL: https://codereview.chromium.org/211493006

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@259807 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 weeks agoGPU:'Pass' SharedMemory when possible.
epenner@chromium.org [Thu, 27 Mar 2014 03:06:14 +0000 (03:06 +0000)]
GPU:'Pass' SharedMemory when possible.

This avoids some duplication of shared memory handles just
for the purposes of passing them around. Instead we Map
immediately when the memory arrives in the process, and then
'Pass' the shared memory from there.

BUG=177063, 353822

Review URL: https://codereview.chromium.org/211703003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@259772 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 weeks agoGPU: Reference count gpu::Buffer.
epenner@chromium.org [Wed, 26 Mar 2014 04:53:58 +0000 (04:53 +0000)]
GPU: Reference count gpu::Buffer.

We tend to duplicate shared memory within the same process
when we don't need to, causing extra page faults etc when
accessing the memory.

With reference counting we can more easily re-use blocks of
shared memory in the same process, and make security easier
(objects in shared memory can hold a reference to their
memory and prevent use-after-free).

BUG=177063, 353822

Review URL: https://codereview.chromium.org/209353002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@259491 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 weeks agogpu: Generate GLES2Implementation::UseProgram().
dongseong.hwang@intel.com [Tue, 25 Mar 2014 23:35:53 +0000 (23:35 +0000)]
gpu: Generate GLES2Implementation::UseProgram().

glUseProgram() is kind of Bind function, although prefix is Use, not Bind. So
reuse bind type harness.

The benefits:
1. Unit tests are generated.
2. Cache a program state in the same manner of other bind states.

BUG=160370

Review URL: https://codereview.chromium.org/195973010

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@259396 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 weeks agoRevert 258122 "gpu: Allow fences to check whether a flush has oc..."
sievers@google.com [Mon, 24 Mar 2014 18:02:02 +0000 (18:02 +0000)]
Revert 258122 "gpu: Allow fences to check whether a flush has oc..."

Seems to expose some GL call sites without current context.
Reverting for the time being...

BUG=355275

> gpu: Allow fences to check whether a flush has occurred
>
> This skips waiting on a fence that was created but never committed.
>
> BUG=352419
>
> Review URL: https://codereview.chromium.org/197563003

TBR=sievers@chromium.org

Review URL: https://codereview.chromium.org/209853004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@258965 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 weeks agoBlacklist partial swaps on linux
piman@chromium.org [Sat, 22 Mar 2014 02:43:43 +0000 (02:43 +0000)]
Blacklist partial swaps on linux

BUG=339493

Review URL: https://codereview.chromium.org/207443007

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@258740 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 weeks agoBlacklist GLX indirect rendering
piman@chromium.org [Sat, 22 Mar 2014 00:37:18 +0000 (00:37 +0000)]
Blacklist GLX indirect rendering

Several part to this CL:
1- Implement gathering the direct rendering information. It needs a context, so
it is done through the CollectGraphicsInfoGL hook
2- Implement logic to hook the information to the blacklist
3- In some cases, indirect rendering causes creating surfaces/contexts, needed
to collect the info, to fail. So expose the failure mode (fatal vs non-fatal) to
the caller so that we can fully fail GPU things in that case.

BUG=72373,339244

Review URL: https://codereview.chromium.org/194303002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@258721 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 weeks agoGPU: Only restore one texture unit in ScopedTextureBinder.
epenner@chromium.org [Fri, 21 Mar 2014 22:05:27 +0000 (22:05 +0000)]
GPU: Only restore one texture unit in ScopedTextureBinder.

We only set one, so only one needs to be restored.

Restoring all can really add up with multiple targets and
potentially hundreds of units.

BUG=353879, 353822

Review URL: https://codereview.chromium.org/205843002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@258678 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 weeks agoRevert 258402 "GLHelper: Use preferred BGRA read pixels for YUV ..."
brettw@chromium.org [Thu, 20 Mar 2014 21:56:10 +0000 (21:56 +0000)]
Revert 258402 "GLHelper: Use preferred BGRA read pixels for YUV ..."

This broke GLReadbackTest.ReadPixelsFloat
http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu_triggered_tests/builds/552/steps/gl_tests/logs/stdio
Also failed on tries on this patch on the linux gpu bot.

> GLHelper: Use preferred BGRA read pixels for YUV read back
>
> When copying to the PBO the driver can use a blit if the requested
> format matches the underlying format of the data. Mesa on Intel is
> storing the data internally as BGRA (byte order).
>
> This change moves the choice of format to the caller of the
> ReadbackAsync and ReadbackPlane functions.
>
> We then use GL_BGRA to read in the plane data for the YUV readback
> object. However since the format is now swizzled we must swizzle the
> pixel data back. This is done using the existing mechanism for swizzling
> the result in the scaling shaders.
>
> The activation of the use of GL_BGRA and swizzling is controlled by
> querying the GL implementation for it's preferred format and type. In
> the GPU code we pass this request onto the underlying GL implementation
> if it supports the GL_OES_read_format extension.
>
> As a result of this change glReadPixels can return immediately after
> setting up the blit to the PBO and as such the asynchronous glReadPixels
> works as expected when reading back YUV data for Tab Casting.
>
> TEST=With the change observe that the time spent in the
> HandleReadPixels tracepoint is reduced.
> BUG=348015
>
> Review URL: https://codereview.chromium.org/178583008

TBR=robert.bradford@intel.com

Review URL: https://codereview.chromium.org/206993002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@258428 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 weeks agoGLHelper: Use preferred BGRA read pixels for YUV read back
robert.bradford@intel.com [Thu, 20 Mar 2014 20:56:17 +0000 (20:56 +0000)]
GLHelper: Use preferred BGRA read pixels for YUV read back

When copying to the PBO the driver can use a blit if the requested
format matches the underlying format of the data. Mesa on Intel is
storing the data internally as BGRA (byte order).

This change moves the choice of format to the caller of the
ReadbackAsync and ReadbackPlane functions.

We then use GL_BGRA to read in the plane data for the YUV readback
object. However since the format is now swizzled we must swizzle the
pixel data back. This is done using the existing mechanism for swizzling
the result in the scaling shaders.

The activation of the use of GL_BGRA and swizzling is controlled by
querying the GL implementation for it's preferred format and type. In
the GPU code we pass this request onto the underlying GL implementation
if it supports the GL_OES_read_format extension.

As a result of this change glReadPixels can return immediately after
setting up the blit to the PBO and as such the asynchronous glReadPixels
works as expected when reading back YUV data for Tab Casting.

TEST=With the change observe that the time spent in the
HandleReadPixels tracepoint is reduced.
BUG=348015

Review URL: https://codereview.chromium.org/178583008

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@258402 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 weeks agogpu: Allow fences to check whether a flush has occurred
sievers@chromium.org [Wed, 19 Mar 2014 22:09:44 +0000 (22:09 +0000)]
gpu: Allow fences to check whether a flush has occurred

This skips waiting on a fence that was created but never committed.

BUG=352419

Review URL: https://codereview.chromium.org/197563003

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@258122 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 weeks agoBreak gpu -> ui_base dependency
jamesr@chromium.org [Wed, 19 Mar 2014 06:14:36 +0000 (06:14 +0000)]
Break gpu -> ui_base dependency

This is the same change as https://codereview.chromium.org/159373002, but with
the correct new ui target name since it was renamed.

R=piman

Review URL: https://codereview.chromium.org/200703005

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@257865 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 weeks agoReplace command buffer FlushSync with WaitForTokenInRange and WaitForGetOffsetInRange
jbauman@chromium.org [Tue, 18 Mar 2014 21:52:36 +0000 (21:52 +0000)]
Replace command buffer FlushSync with WaitForTokenInRange and WaitForGetOffsetInRange

This allows the command-buffer interface to be more clear about what's happening, so we'll later be able to create IPCs that wait specifically for one of these events to happen. Currently both function are still implemented by looping on the GetStateFast IPC.

BUG=349632

Review URL: https://codereview.chromium.org/189123004

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@257771 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 weeks agoFix "unreachable code" warnings (MSVC warning 4702), misc. edition.
pkasting@chromium.org [Tue, 18 Mar 2014 19:04:21 +0000 (19:04 +0000)]
Fix "unreachable code" warnings (MSVC warning 4702), misc. edition.

This CL covers top-level directories that only had one or two modified files.

BUG=346399
TEST=none
R=darin@chromium.org

Review URL: https://codereview.chromium.org/203043002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@257705 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 weeks agoUpdate PRESUBMIT for tryserver.chromium.gpu
phajdan.jr@chromium.org [Tue, 18 Mar 2014 03:16:29 +0000 (03:16 +0000)]
Update PRESUBMIT for tryserver.chromium.gpu

BUG=334892
R=kbr@chromium.org

Review URL: https://codereview.chromium.org/200493007

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@257589 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 weeks agoMove CommandLine to base namespace.
brettw@chromium.org [Mon, 17 Mar 2014 23:07:15 +0000 (23:07 +0000)]
Move CommandLine to base namespace.

Fix all forward-declares and header files referencing CommandLine.

This keeps a "using base::CommandLine" in the command line header file so that the rest of the source files can be changes in a follow-up.

TBR=sky

Review URL: https://codereview.chromium.org/196413016

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@257514 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 weeks agogpu: Add extension check when initializing MailboxSync
boliu@chromium.org [Sat, 15 Mar 2014 05:28:41 +0000 (05:28 +0000)]
gpu: Add extension check when initializing MailboxSync

And do not enable accelerated canvas in webview if extensions are
missing.

BUG=332146

Review URL: https://codereview.chromium.org/196653019

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@257295 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 weeks agoMake GLImage interface pure virtual
sievers@chromium.org [Sat, 15 Mar 2014 00:25:49 +0000 (00:25 +0000)]
Make GLImage interface pure virtual

Review URL: https://codereview.chromium.org/199783002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@257260 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 weeks agoDrop gpu command_buffer_service dependency on ui
jamesr@chromium.org [Sat, 15 Mar 2014 00:10:51 +0000 (00:10 +0000)]
Drop gpu command_buffer_service dependency on ui

This is a reland of r247966 that should be safe now that the dependencies on
X11 libraries are cleaned up (see bug 339518).

BUG=339518
R=piman@chromium.org

Review URL: https://codereview.chromium.org/159373002

git-svn-id: http://src.chromium.org/svn/trunk/src/gpu@257253 4ff67af0-8c30-449e-8e8b-ad334ec8d88c