chromium/src/gpu.git
2 hours agoHook up command buffer with SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS master
zmo@chromium.org [Tue, 22 Jul 2014 20:40:25 +0000 (20:40 +0000)]
Hook up command buffer with SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS

BUG=393810
TEST=gpu_unittests
R=kbr@chromium.org,bajones@chromium.org

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

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

19 hours agoFix GetAMDVideoCardInfo() linkage for Chrome non-Official builds.
miu@chromium.org [Tue, 22 Jul 2014 03:15:13 +0000 (03:15 +0000)]
Fix GetAMDVideoCardInfo() linkage for Chrome non-Official builds.

Both BULID files and source code were checking for a Chrome-branded build, but
not also an Official build type.

BUG=388419
TBR=piman@chromium.org

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

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

2 days agogles2_conform_test: update expectations for CrOS Atom.
ihf@chromium.org [Sat, 19 Jul 2014 23:54:50 +0000 (23:54 +0000)]
gles2_conform_test: update expectations for CrOS Atom.

BUG=393677
TEST=Ran on Linux. The file loaded and all tests passed.

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

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

2 days agoAdd missing lock in RetireSyncPointOnGpuThread
boliu@chromium.org [Sat, 19 Jul 2014 23:17:55 +0000 (23:17 +0000)]
Add missing lock in RetireSyncPointOnGpuThread

BUG=394491

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

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

4 days agogpu: Remove Create/DeleteImage IPC by adding an X11_PIXMAP_BUFFER GpuMemoryBuffer...
reveman@chromium.org [Fri, 18 Jul 2014 15:40:59 +0000 (15:40 +0000)]
gpu: Remove Create/DeleteImage IPC by adding an X11_PIXMAP_BUFFER GpuMemoryBuffer type.

This adds a new GpuMemoryBuffer type that can be used to create
a GpuMemoryBuffer from an existing X11 pixmap.

This removes Create/DeleteImage IPC and reduces complexity
significantly as it allows the ImageManager to be moved to
the decoder and simply track images.

A new platform dependent GpuMemoryBufferFactory interface
is introduced to allow this new type of buffer to be created
on the GPU service side. To avoid the need for any global
variables, this factory instance is also responsible for
creating GLImage instances.

The old factory interface used by android_webview is renamed
InProcessGpuMemoryBufferFactory until it can be removed in
favor of this new interface.

BUG=368716
TEST=gpu_unittests, gl_tests --gtest_filter=GpuMemoryBufferTest.Lifecycle

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

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

4 days agoUpdate GPU rasterization whitelist
ajuma@chromium.org [Fri, 18 Jul 2014 13:12:20 +0000 (13:12 +0000)]
Update GPU rasterization whitelist

This updates the GPU rasterization whitelist to include
under-development Android versions. As of http://crrev.com/282281,
these are treated as version 4.4.99 for blacklisting purposes.

BUG=394504

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

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

4 days agoRevert 283958 "gles2_conform_test: update expectations for CrOS ..."
kbr@chromium.org [Fri, 18 Jul 2014 04:40:53 +0000 (04:40 +0000)]
Revert 283958 "gles2_conform_test: update expectations for CrOS ..."

Broke gles2_conform_test on chromium.gpu.fyi bots. See Issue 393677 for details.

> gles2_conform_test: update expectations for CrOS Atom.
>
> BUG=393677
> TEST=Ran without the pci id on daisy which bypassed the tests.
>
> Review URL: https://codereview.chromium.org/393223002

TBR=ihf@chromium.org

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

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

4 days agogles2_conform_test: update expectations for CrOS Atom.
ihf@chromium.org [Fri, 18 Jul 2014 01:04:39 +0000 (01:04 +0000)]
gles2_conform_test: update expectations for CrOS Atom.

BUG=393677
TEST=Ran without the pci id on daisy which bypassed the tests.

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

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

5 days agoAndroid: Disable async readpixels on pre-JB MR2 Qualcomm drivers
sievers@google.com [Thu, 17 Jul 2014 21:46:03 +0000 (21:46 +0000)]
Android: Disable async readpixels on pre-JB MR2 Qualcomm drivers

Seems to be ocassionally crashing when accessing the mapped PBO
on at least certain Adreno 330 w/Android 4.2.2 configs.

BUG=394510

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

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

5 days agoAdd PPAPI interface for OpenGL ES 2.0 Vertex Array Objects.
zork@chromium.org [Thu, 17 Jul 2014 11:14:08 +0000 (11:14 +0000)]
Add PPAPI interface for OpenGL ES 2.0 Vertex Array Objects.

BUG=72612,370496

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

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

6 days agogpu: Update CHROMIUM_copy_texture.txt to reflect that GL_TEXTURE_RECTANGLE_ARB is...
reveman@chromium.org [Wed, 16 Jul 2014 22:49:21 +0000 (22:49 +0000)]
gpu: Update CHROMIUM_copy_texture.txt to reflect that GL_TEXTURE_RECTANGLE_ARB is a supported source target.

BUG=366710
TBR=piman@chromium.org
NOTRY=true

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

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

6 days agogenerate GetAttribLocation/GetUniformLocation by build_gles2_cmd_buffer.py
jungjik.lee@samsung.com [Wed, 16 Jul 2014 20:46:09 +0000 (20:46 +0000)]
generate GetAttribLocation/GetUniformLocation by build_gles2_cmd_buffer.py

change to generate GetAttribLocation/GetUniformLocation functions by build_gles2_cmd_buffer.py
and remove HandWritten code.

Bug=None
TEST=gpu_tests --gtest_filter="GLES2FormatTest.*"

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

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

6 days agoAdd future sync point methods to ContextSupport.
jbauman@chromium.org [Wed, 16 Jul 2014 06:06:21 +0000 (06:06 +0000)]
Add future sync point methods to ContextSupport.

This way they can be used by the compositor or another consumer.

BUG=365454

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

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

10 days agoAdd missing files/deps/defines
cjhopman@chromium.org [Sat, 12 Jul 2014 04:59:22 +0000 (04:59 +0000)]
Add missing files/deps/defines

TBR=darin@chromium.org

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

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

11 days agoUse TimeTicks instead of clock() in gpu::CommandBufferHelper
hamaji@chromium.org [Fri, 11 Jul 2014 09:27:16 +0000 (09:27 +0000)]
Use TimeTicks instead of clock() in gpu::CommandBufferHelper

clock() returns a processor time, which does not change while
a thread is sleeping. So, Flush() would be called less often
than you expected.

TimeTicks uses a monotonic timer so this would be a better
choice than Time because TimeTicks is not affected by host's
time settings.

BUG=264856
TEST=trybots

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

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

12 days agoRevert 282393 "Do not call glDrawBuffersARB when the extension i..."
scherkus@chromium.org [Thu, 10 Jul 2014 19:50:51 +0000 (19:50 +0000)]
Revert 282393 "Do not call glDrawBuffersARB when the extension i..."

Broke gpu_unittests FramebufferInfoTest.DrawBuffers:
[ RUN      ] FramebufferInfoTest.DrawBuffers
../../gpu/command_buffer/service/framebuffer_manager_unittest.cc:653: Failure
Actual function call count doesn't match EXPECT_CALL(*gl_, DrawBuffersARB(kMaxDrawBuffers, _))...
         Expected: to be called once
           Actual: never called - unsatisfied and active
../../gpu/command_buffer/service/framebuffer_manager_unittest.cc:657: Failure
Actual function call count doesn't match EXPECT_CALL(*gl_, DrawBuffersARB(kMaxDrawBuffers, _))...
         Expected: to be called once
           Actual: never called - unsatisfied and active
[  FAILED  ] FramebufferInfoTest.DrawBuffers (1 ms)

> Do not call glDrawBuffersARB when the extension is absent
>
> The function Framebuffer::ChangeDrawBuffersHelper was assuming
> that binding of an FBO with no GL_COLOR_ATTACHMENT0 was
> accompanied by setting the first draw buffer to GL_NONE with
> glDrawBuffersARB in the fix introduced in:
> https://codereview.chromium.org/315283002
>
> When the extension is not present, it can be assumed that the
> glDrawBuffersARB state need not be set and restored.
>
> BUG=(wrangling)
> NOTRY=True
>
> Review URL: https://codereview.chromium.org/375413003

TBR=ccameron@chromium.org

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

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

12 days agoDo not call glDrawBuffersARB when the extension is absent
ccameron@chromium.org [Thu, 10 Jul 2014 19:23:10 +0000 (19:23 +0000)]
Do not call glDrawBuffersARB when the extension is absent

The function Framebuffer::ChangeDrawBuffersHelper was assuming
that binding of an FBO with no GL_COLOR_ATTACHMENT0 was
accompanied by setting the first draw buffer to GL_NONE with
glDrawBuffersARB in the fix introduced in:
https://codereview.chromium.org/315283002

When the extension is not present, it can be assumed that the
glDrawBuffersARB state need not be set and restored.

BUG=(wrangling)
NOTRY=True

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

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

12 days agoQuery objects should not be shared between contexts
heejin.r.chung@samsung.com [Thu, 10 Jul 2014 08:26:01 +0000 (08:26 +0000)]
Query objects should not be shared between contexts

glQuery objects are not sharable, so managing IDs for each client
locally in GLES2Implementation.

BUG=

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

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

12 days agoProvide gtest printers for ui/gfx geometry types
jamesr@chromium.org [Thu, 10 Jul 2014 07:41:43 +0000 (07:41 +0000)]
Provide gtest printers for ui/gfx geometry types

This provides PrintTo(..) functions for the geometric types in ui/gfx/
so that failing gtest assertions pretty-print the values instead of
dumping the bytes of the objects. This way gtest assertions on these
types can be written in the form:

  EXPECT_EQ(a, b);

instead of
  EXPECT_EQ(a.ToString(), b.ToString());

which is currently used (inconsistently) to provide more readable
failure messages.

This is a bit tricky since gtest uses streams and somewhat complicated
template expansion magic to pretty print values and we don't want to
link the stream-based code into production code paths. This declares the
PrintTo() functions in the headers defining each of the geometry types,
using the <iosfwd> header to keep stream bloat to a minimum, and defines
the formatters in gfx_test_support. This way every test that
instantiates these printers has to declare a dependency on
gfx_test_support or it fails to link, but a test does not have to
#include any particular header to see the correct printer declaration
and thus expand the template correctly.

If we were to declare the PrintTo() functions in a test only header such
a gfx_util.h then the pretty printers would work reliably only if
*every* target in a translation unit that instantiated the comparison
saw this declaration. If some unit tests in a target #included the
header and some did not then it would be intederminate whether the
template instantiation linked in to the test binary was the pretty
printed one or the hex dump one (and in practice this appears to be
inconsistent across clang and gcc for whatever reason).

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

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

13 days agoRead framebuffer should have color image attached for ReadPixels/Copy{Sub}TexImage2D
zmo@chromium.org [Wed, 9 Jul 2014 18:20:34 +0000 (18:20 +0000)]
Read framebuffer should have color image attached for ReadPixels/Copy{Sub}TexImage2D

Apparently some desktop drivers do not generate an INVALID_OPERATION, so we
should enforce it in GPU command buffer.

BUG=391953
TEST=conformance_renderbuffers_framebuffer_object_attachment passing on all GPU bots
R=kbr@chromium.org,bajones@chromium.org
NOTRY=true

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

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

13 days agoFixes for re-enabling more MSVC level 4 warnings: gpu/ edition
pkasting@chromium.org [Wed, 9 Jul 2014 00:22:47 +0000 (00:22 +0000)]
Fixes for re-enabling more MSVC level 4 warnings: gpu/ edition

This contains fixes for the following sorts of issues:
* Signedness mismatch
* Possibly-uninitialized local variable

BUG=81439
TEST=none

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

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

2 weeks agoRemove blanket whitelisting of Android 4.4.4 for GPU rasterization
ajuma@chromium.org [Tue, 8 Jul 2014 23:01:43 +0000 (23:01 +0000)]
Remove blanket whitelisting of Android 4.4.4 for GPU rasterization

This makes GPU rasterization on Android 4.4.4 dependent on the device
whitelist, rather than being enabled for all devices.

BUG=391750

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

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

2 weeks agoFix gpu_unittests for new Shader Translator header.
jmadill@chromium.org [Tue, 8 Jul 2014 14:05:17 +0000 (14:05 +0000)]
Fix gpu_unittests for new Shader Translator header.

BUG=389276

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

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

2 weeks agoCC: Clean up tile size setting.
epenner@chromium.org [Thu, 3 Jul 2014 21:06:04 +0000 (21:06 +0000)]
CC: Clean up tile size setting.
This is a non-functional cleanup.

IMG introduced a memory leak so we switch to idle uploads.
The new drivers with the memory leak fixed don't need the
other workarounds either, so we can do without the size
work-arounds.

Without that work-around, we no longer need to know if the
driver is IMG, so we can move the tile-size logic to a
better place and avoid using the command-line.

BUG=365877

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

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

2 weeks agoSheriff duty july 3rd cleaning up log statements
cpu@chromium.org [Thu, 3 Jul 2014 17:39:12 +0000 (17:39 +0000)]
Sheriff duty july 3rd cleaning up log statements

Logging at error level when it is not fatal or polluting the log
output makes sheriffing hard.

NOTRY=true
BUG=none
TEST=none

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

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

2 weeks agoImplement ScheduleOverlayPlaneCHROMIUM via GLSurface.
achaulk@chromium.org [Thu, 3 Jul 2014 17:19:10 +0000 (17:19 +0000)]
Implement ScheduleOverlayPlaneCHROMIUM via GLSurface.

BUG=380861

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

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

2 weeks agoUpdate shader translator for new ANGLE header.
jmadill@chromium.org [Thu, 3 Jul 2014 17:18:26 +0000 (17:18 +0000)]
Update shader translator for new ANGLE header.

ANGLE now uses GLenums to identify shader type and data type
for variable queries. Use preprocessor guards to support both
the old and new method until we resolve on the new style.

BUG=389276

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

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

3 weeks agoFix GLImageSync::GetSize() to return actual texture size
sievers@chromium.org [Tue, 1 Jul 2014 02:31:39 +0000 (02:31 +0000)]
Fix GLImageSync::GetSize() to return actual texture size

BUG=

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

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

3 weeks agoAdd support for strong future sync points.
jbauman@chromium.org [Tue, 1 Jul 2014 00:27:22 +0000 (00:27 +0000)]
Add support for strong future sync points.

If InsertFutureSyncPoint() is used (this is only allowed from the browser process), the sync point will not be retired automatically but can be retired later manually with RetireSyncPoint. Any command buffer that waits on it before it's retired can wait indefinitely.

BUG=365454

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

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

3 weeks agoUse gles2_c_lib target instead of sources in tests
jamesr@chromium.org [Fri, 27 Jun 2014 21:52:15 +0000 (21:52 +0000)]
Use gles2_c_lib target instead of sources in tests

The gles2_c_lib target is used to bind the C GLES2 interface to a few
different gles2_implementation flavors. Instead of compiling the source
files into multiple different test targets, this depends on the static
library target gles2_c_lib and drops the gles2_c_lib -> gles2_implementation
dependency so targets can pick their own gles2_implementation variant.

R=piman@chromium.org

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

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

3 weeks agogpu: Make GL Renderbuffer restore lazy.
vmiura@chromium.org [Fri, 27 Jun 2014 08:33:47 +0000 (08:33 +0000)]
gpu: Make GL Renderbuffer restore lazy.

glBindRenderbufferEXT appears to cause framebuffer resolves on
Adreno 3xx drivers.  This API shows up as a hotspot in
gles2::ContextState::RestoreState().

This CL makes Renderbuffer restore lazy.  ContextState::RestoreState()
now only marks the currently bound Renderbuffer as invalid.  The
Renderbuffer is bound just before any glRenderbufferStorage*() calls.

BUG=386536

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

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

3 weeks agogpu/gles2_conform_support: On Chrome OS, don't use system.gyp to pull in GTK+
josh@joshtriplett.org [Fri, 27 Jun 2014 03:24:33 +0000 (03:24 +0000)]
gpu/gles2_conform_support: On Chrome OS, don't use system.gyp to pull in GTK+

Normally, gles2_conform_support uses system.gyp:gtk to pull in a system copy
of GTK+; however, Chrome OS already installs GTK+, and system.gyp
intentionally does not provide a gtk target on Chrome OS.  Make the
dependencies on system.gyp:gtk conditional on 'chromeos==0'.

BUG=chromium:388784
TEST=Manually build gles2_conform_test on Chrome OS
R=piman@google.com, sievers@chromium.org

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

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

3 weeks agoExpose a low-end device mode override flags for non-android OSs as well
c.shu@samsung.com [Thu, 26 Jun 2014 16:55:27 +0000 (16:55 +0000)]
Expose a low-end device mode override flags for non-android OSs as well

BUG=324824

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

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

3 weeks agoglGetString(GL_VENDOR) would possible return NULL, add NULL check here.
changjun.yang@intel.com [Thu, 26 Jun 2014 01:46:20 +0000 (01:46 +0000)]
glGetString(GL_VENDOR) would possible return NULL, add NULL check here.

BUG=

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

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

3 weeks agogpu: Always use EGL_KHR_fence_sync with mailbox sync
sievers@chromium.org [Wed, 25 Jun 2014 20:32:00 +0000 (20:32 +0000)]
gpu: Always use EGL_KHR_fence_sync with mailbox sync

This is the only GLFence implementation that works across
contexts and share groups. This codepath is only used by
Android WebView.

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

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

3 weeks agogpu: Expose GLFence impls
sievers@chromium.org [Wed, 25 Jun 2014 06:01:15 +0000 (06:01 +0000)]
gpu: Expose GLFence impls

Move implementations to their own header+source files.

Then specifically use EGL_KHR_fence_sync implementation for
mailbox synchronizing because it's the only one working across
contexts and share groups.

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

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

4 weeks agoMake blacklist robust enough to handle non numeric OS versions.
zmo@chromium.org [Mon, 23 Jun 2014 22:47:30 +0000 (22:47 +0000)]
Make blacklist robust enough to handle non numeric OS versions.

Currently if we encounter an OS version with letters, we set it to "0".

This is problematic, for example, if we encounter an android version
set as "P", then all the "<=4.0" entries will apply.

BUG=387179
TEST=gpu_unittests
R=sieves@chromium.org

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

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

4 weeks agoFix parameter type for glGenTextures.
heejin.r.chung@samsung.com [Mon, 23 Jun 2014 04:26:04 +0000 (04:26 +0000)]
Fix parameter type for glGenTextures.

First parameter for glGenTextures should be int(GLsizei).
Plus some code cleanup for texture manager.

BUG=

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

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

4 weeks agoAdd common GLFence::IsSupported() check
sievers@google.com [Fri, 20 Jun 2014 23:33:04 +0000 (23:33 +0000)]
Add common GLFence::IsSupported() check

Cconsolidate the logic inside gl_fence.cc
to allow checking if a GLFence can be created.

R=reveman@chromium.org

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

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

4 weeks agogpu: Update disable_egl_khr_fence_sync for Android 4.4.4
sievers@google.com [Fri, 20 Jun 2014 18:43:20 +0000 (18:43 +0000)]
gpu: Update disable_egl_khr_fence_sync for Android 4.4.4

Include this in the blacklist, since it was just released, so
assume still broken.

R=boliu@chromium.org

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

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

4 weeks agoAdd semantics to apply gpu blakclist to AMD swichable when a discrete/integrated...
zmo@chromium.org [Fri, 20 Jun 2014 13:56:48 +0000 (13:56 +0000)]
Add semantics to apply gpu blakclist to AMD swichable when a discrete/integrated GPU is in use

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

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

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

4 weeks agoRemove GL query processing from DrawElements/DrawArrays.
vmiura@chromium.org [Thu, 19 Jun 2014 23:49:52 +0000 (23:49 +0000)]
Remove GL query processing from DrawElements/DrawArrays.

Polling GL queries is taking ~7us each time on Android.  Processing
queries from ::DrawElements & ::DrawArrays may not be a good idea as
50 to 100 draw calls per-frame with GPU rendering is common
i.e. 350~700us, and more so as we aim for handling higher draw call
counts in the future.

Pending queries are still polled in the following cases:
 - After glFlush().
 - After glFinish().
 - After processing any GpuCommandBufferStub  IPC message.
 - As delayed work, at up to 1000Hz.

BUG=385937

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

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

4 weeks agoDeprecate disable_egl_khr_fence_sync on future Android releases
sievers@chromium.org [Thu, 19 Jun 2014 22:46:00 +0000 (22:46 +0000)]
Deprecate disable_egl_khr_fence_sync on future Android releases

NOTRY=True

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

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

4 weeks agoRemoved ManagedMemoryStats.
vmpstr@chromium.org [Thu, 19 Jun 2014 07:01:41 +0000 (07:01 +0000)]
Removed ManagedMemoryStats.

As of r277056, the gpu memory manager is no longer using
managed memory stats produced. This patch removes the managed
memory stats calculation from the tile manager. As well, this
patch removes ununsed gpu managed memory stats plumbing.

BUG=377065

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

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

4 weeks agoRemove the no longer used AMDVideoCardType enums.
zmo@chromium.org [Thu, 19 Jun 2014 06:50:10 +0000 (06:50 +0000)]
Remove the no longer used AMDVideoCardType enums.

BUG=376562
TEST=chromium / chrome official builds fine
TBR=kbr@chromium.org

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

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

4 weeks agogpu: Add base class for gpu service tests
sievers@google.com [Wed, 18 Jun 2014 18:49:21 +0000 (18:49 +0000)]
gpu: Add base class for gpu service tests

This allows for properly setting up and tearing down GL bindings.
Before this patch bindings were intialized in unittest_main.cc but also
reinitialized with a different GL version and extension in some
GLES2CmdDecoderTests which leaves room for problems depending on which order
tests happen to run in.

More importantly, this will allow me to initialize GL bindings with a certain
GL version and extension bindings for some tests.

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

R=danakj@chromium.org

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

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

4 weeks agoRevert 278059 "gpu: Add base class for gpu service tests"
macourteau@chromium.org [Wed, 18 Jun 2014 14:56:51 +0000 (14:56 +0000)]
Revert 278059 "gpu: Add base class for gpu service tests"

Does not compile on Linux GN:
http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/7304/steps/compile/logs/stdio

> gpu: Add base class for gpu service tests
>
> This allows for properly setting up and tearing down GL bindings.
> Before this patch bindings were intialized in unittest_main.cc but also
> reinitialized with a different GL version and extension in some
> GLES2CmdDecoderTests which leaves room for problems depending on which order
> tests happen to run in.
>
> More importantly, this will allow me to initialize GL bindings with a certain
> GL version and extension bindings for some tests.
>
> Review URL: https://codereview.chromium.org/332303002

TBR=sievers@chromium.org

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

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

4 weeks agogpu: Add base class for gpu service tests
sievers@chromium.org [Wed, 18 Jun 2014 14:42:06 +0000 (14:42 +0000)]
gpu: Add base class for gpu service tests

This allows for properly setting up and tearing down GL bindings.
Before this patch bindings were intialized in unittest_main.cc but also
reinitialized with a different GL version and extension in some
GLES2CmdDecoderTests which leaves room for problems depending on which order
tests happen to run in.

More importantly, this will allow me to initialize GL bindings with a certain
GL version and extension bindings for some tests.

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

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

4 weeks agoGN: Fix up various gpu targets
jamesr@chromium.org [Wed, 18 Jun 2014 07:01:08 +0000 (07:01 +0000)]
GN: Fix up various gpu targets

This makes the gl_tests and gpu_unittests targets link and run and fixes
up a few other misc issues:

*) outdated nss filelists and defines
*) outdated cc file lists

R=brettw@chromium.org, piman@chromium.org
TBR=ben@chromium.org for ui/events/ change

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

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

5 weeks agoChange GLInternalFormat param from GLint to GLenum.
jungjik.lee@samsung.com [Tue, 17 Jun 2014 10:55:18 +0000 (10:55 +0000)]
Change GLInternalFormat param from GLint to GLenum.

Original GLInternalFormat type is GLenum (http://goo.gl/fXcvqh).
But GLint is used in AsyncTexImage2DCHROMIUM params.
This is a patch for changing the type
from GLint to GLenum.

BUG=None

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

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

5 weeks agoRemove unneeded shm versions of bucket functions from command buffer
kkinnunen@nvidia.com [Tue, 17 Jun 2014 10:06:00 +0000 (10:06 +0000)]
Remove unneeded shm versions of bucket functions from command buffer

Remove shm versions of bucket functions from command buffer for commands
that do not need two different ways to send pointer data.

The actual code uses only bucket commands. The shm versions are
either unused or used only by the unit tests.

Make the unit tests use the immediate commands.

Solves the problem of not having to implement one useless function for
the a new command when using bucket commands.

Support the case of CompressedTex{,Sub}Image2D, where the function
is implemented with shm and bucket commands.

In the code generator function info table, replace 'immediate': False
and 'bucket': True properties of function info objects with
'data_transfer_method': ['immediate', 'bucket', 'shm' ] property.

Remove the handwritten GetAttribLocation command and rename
GetAttribLocationBucket to GetAttribLocation. This is consistent with
other handwritten commands: the command name is the gl call name, and it
just happens to use buckets to communicate some of its arguments.  The
command does not have 'Bucket' prefix due to it not being a 'Bucket'
variant. Do the same with GetUniformLocation and
GetUniformLocationBucket.

BUG=373763

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

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

5 weeks agoUse the updated AMD switchable info collection code.
zmo@chromium.org [Fri, 13 Jun 2014 18:31:11 +0000 (18:31 +0000)]
Use the updated AMD switchable info collection code.

BUG=376562
TEST=
R=kbr@chromium.org
NOTRY=true

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

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

5 weeks agoRevert of Revert of Implement software fallback for PPB_VideoDecoder. (https://codere...
schenney@chromium.org [Fri, 13 Jun 2014 15:00:14 +0000 (15:00 +0000)]
Revert of Revert of Implement software fallback for PPB_VideoDecoder. (https://codereview.chromium.org/337683002/)

Reason for revert:
Revert of revert, which apparently wasn't a full revert.

Original issue's description:
> Revert of Implement software fallback for PPB_VideoDecoder. (https://codereview.chromium.org/311853005/)
>
> Reason for revert:
> Broke blink Linux tests compile.http://build.chromium.org/p/chromium.webkit/builders/Linux%20Tests/builds/37259
>
> Original issue's description:
> > Implement software fallback for PPB_VideoDecoder.
> > This modifies the proxy to implement software fallback mode.
> > The main change is to the host, which now can work with
> > media::VideoDecoders.
> >
> > media::VideoDecoder works differently from media::VideoDecodeAccelerator
> > so an adapter object, content::VideoDecoderShim is defined. It lives on the main thread and drives the actual decoder on the media thread via a child DecoderImpl class, which sends back frames of video. VideoDecoderShim receives those and converts frames to GL textures.
> >
> > gpu::Mailboxes are used so the host can create textures that are aliased
> > to the plugin's textures.
> >
> > The test plugin has been changed to include bitstream data for VP8 in order to
> > test the software decoder. The data is in ppapi/examples/video_decode/testdata.h
> > alongside the H264 data. The file diff is too large for this site but is structured
> > something like this:
> >
> > const unsigned char kData[] = {
> > #if defined USE_VP8_TESTDATA_INSTEAD_OF_H264
> > ...  lots of VP8 data
> >
> > #else  // !USE_VP8_TESTDATA_INSTEAD_OF_H264
> > ...  lots of H264 data
> >
> > #endif  // USE_VP8_TESTDATA_INSTEAD_OF_H264
> > };
> >
> >
> > There is a TODO to convert the example to load a file. I'm not sure how to go
> > about that but am willing to do the work if someone can point the way.
> >
> > BUG=281689
> > R=dmichael@chromium.org, fischman@chromium.org, sievers@chromium.org, tsepez@chromium.org
> >
> > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=277012
>
> TBR=dmichael@chromium.org,fischman@chromium.org,igorc@chromium.org,piman@chromium.org,sievers@chromium.org,tsepez@chromium.org,bbudge@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=281689
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=277015

TBR=dmichael@chromium.org,fischman@chromium.org,igorc@chromium.org,piman@chromium.org,sievers@chromium.org,tsepez@chromium.org,bbudge@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=281689

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

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

5 weeks agoRevert of Implement software fallback for PPB_VideoDecoder. (https://codereview.chrom...
schenney@chromium.org [Fri, 13 Jun 2014 14:35:15 +0000 (14:35 +0000)]
Revert of Implement software fallback for PPB_VideoDecoder. (https://codereview.chromium.org/311853005/)

Reason for revert:
Broke blink Linux tests compile.http://build.chromium.org/p/chromium.webkit/builders/Linux%20Tests/builds/37259

Original issue's description:
> Implement software fallback for PPB_VideoDecoder.
> This modifies the proxy to implement software fallback mode.
> The main change is to the host, which now can work with
> media::VideoDecoders.
>
> media::VideoDecoder works differently from media::VideoDecodeAccelerator
> so an adapter object, content::VideoDecoderShim is defined. It lives on the main thread and drives the actual decoder on the media thread via a child DecoderImpl class, which sends back frames of video. VideoDecoderShim receives those and converts frames to GL textures.
>
> gpu::Mailboxes are used so the host can create textures that are aliased
> to the plugin's textures.
>
> The test plugin has been changed to include bitstream data for VP8 in order to
> test the software decoder. The data is in ppapi/examples/video_decode/testdata.h
> alongside the H264 data. The file diff is too large for this site but is structured
> something like this:
>
> const unsigned char kData[] = {
> #if defined USE_VP8_TESTDATA_INSTEAD_OF_H264
> ...  lots of VP8 data
>
> #else  // !USE_VP8_TESTDATA_INSTEAD_OF_H264
> ...  lots of H264 data
>
> #endif  // USE_VP8_TESTDATA_INSTEAD_OF_H264
> };
>
>
> There is a TODO to convert the example to load a file. I'm not sure how to go
> about that but am willing to do the work if someone can point the way.
>
> BUG=281689
> R=dmichael@chromium.org, fischman@chromium.org, sievers@chromium.org, tsepez@chromium.org
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=277012

TBR=dmichael@chromium.org,fischman@chromium.org,igorc@chromium.org,piman@chromium.org,sievers@chromium.org,tsepez@chromium.org,bbudge@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=281689

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

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

5 weeks agoImplement software fallback for PPB_VideoDecoder.
bbudge@chromium.org [Fri, 13 Jun 2014 13:43:11 +0000 (13:43 +0000)]
Implement software fallback for PPB_VideoDecoder.
This modifies the proxy to implement software fallback mode.
The main change is to the host, which now can work with
media::VideoDecoders.

media::VideoDecoder works differently from media::VideoDecodeAccelerator
so an adapter object, content::VideoDecoderShim is defined. It lives on the main thread and drives the actual decoder on the media thread via a child DecoderImpl class, which sends back frames of video. VideoDecoderShim receives those and converts frames to GL textures.

gpu::Mailboxes are used so the host can create textures that are aliased
to the plugin's textures.

The test plugin has been changed to include bitstream data for VP8 in order to
test the software decoder. The data is in ppapi/examples/video_decode/testdata.h
alongside the H264 data. The file diff is too large for this site but is structured
something like this:

const unsigned char kData[] = {
#if defined USE_VP8_TESTDATA_INSTEAD_OF_H264
...  lots of VP8 data

#else  // !USE_VP8_TESTDATA_INSTEAD_OF_H264
...  lots of H264 data

#endif  // USE_VP8_TESTDATA_INSTEAD_OF_H264
};

There is a TODO to convert the example to load a file. I'm not sure how to go
about that but am willing to do the work if someone can point the way.

BUG=281689
R=dmichael@chromium.org, fischman@chromium.org, sievers@chromium.org, tsepez@chromium.org

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

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

5 weeks agoRevert of Use the updated AMD switchable info collection code. (https://codereview...
rouslan@chromium.org [Fri, 13 Jun 2014 01:32:34 +0000 (01:32 +0000)]
Revert of Use the updated AMD switchable info collection code. (https://codereview.chromium.org/332843003/)

Reason for revert:
The patch appears to have broken windows perf bot:

http://build.chromium.org/p/chromium.perf/builders/Win%20Builder/builds/69732

Original issue's description:
> Use the updated AMD switchable info collection code.
>
> BUG=376562
> TEST=
> R=kbr@chromium.org
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276865

TBR=kbr@chromium.org,zmo@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=376562

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

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

5 weeks agoUse the updated AMD switchable info collection code.
zmo@chromium.org [Fri, 13 Jun 2014 00:26:46 +0000 (00:26 +0000)]
Use the updated AMD switchable info collection code.

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

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

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

5 weeks agoAndroid: Disable EGL_KHR_fence_sync on all Qualcomm drivers
sievers@chromium.org [Tue, 10 Jun 2014 23:31:44 +0000 (23:31 +0000)]
Android: Disable EGL_KHR_fence_sync on all Qualcomm drivers

Apparently the combination of ES2/Adreno 2xx and KitKat is still
broken. Give up on trying to find drivers where this works, since
it would only be ES3 drivers on which we prefer the core fence
API anyways.

TBR=reveman@chromium.org
NOTRY=True
BUG=382686

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

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

6 weeks agoAdding bindless variants mailbox produce/consume
bajones@chromium.org [Tue, 10 Jun 2014 17:51:22 +0000 (17:51 +0000)]
Adding bindless variants mailbox produce/consume

BUG=354697

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

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

6 weeks agoDelete non-CoreAnimation code in RWHVMac
ccameron@chromium.org [Sat, 7 Jun 2014 08:18:37 +0000 (08:18 +0000)]
Delete non-CoreAnimation code in RWHVMac

This is dead code now, and is just getting in the way. The non-CA code
in ui/cocoa may still be useful for reference and debugging for a little
longer, but this stuff is way past that point.

BUG=

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

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

6 weeks agoExpand GPU rasterization device whitelist for field trial
ajuma@chromium.org [Sat, 7 Jun 2014 00:24:06 +0000 (00:24 +0000)]
Expand GPU rasterization device whitelist for field trial

This creates an expanded GPU rasterization device whitelist
for a field trial.

BUG=380694

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

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

6 weeks agoFramebuffer clear() needs to consider the situation some draw buffers are disabled.
zmo@chromium.org [Fri, 6 Jun 2014 05:21:42 +0000 (05:21 +0000)]
Framebuffer clear() needs to consider the situation some draw buffers are disabled.

This is when we expose DrawBuffers extension.

BUG=376951
TEST=the attached test case, webgl conformance
R=kbr@chromium.org,bajones@chromium.org

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

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

6 weeks agoHook up V8 to more of the GN build.
brettw@chromium.org [Thu, 5 Jun 2014 20:26:48 +0000 (20:26 +0000)]
Hook up V8 to more of the GN build.

Implement webkit/common/gpu.

Minor fixes to the gin unit tests (it defines its own test runner so shouldn't depend on run_all_unittests -- GN found this because run_all_unittests in the GN build is a source_set instead of a static library and results in a duplicate definition).

R=jochen@chromium.org

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

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

6 weeks agoRemove IOSurfaceSupport
ccameron@chromium.org [Wed, 4 Jun 2014 09:25:53 +0000 (09:25 +0000)]
Remove IOSurfaceSupport

Link against IOSurface.framework instead -- this is an option starting in 10.6.

BUG=314190

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

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

6 weeks agogpu: Blacklist ARB_sync on MacOSX.
reveman@chromium.org [Wed, 4 Jun 2014 01:14:22 +0000 (01:14 +0000)]
gpu: Blacklist ARB_sync on MacOSX.

BUG=371530
R=sievers
NOTRY=true

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

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

6 weeks agogpu: Blacklist ARB_sync for two more device_ids on MacOSX.
reveman@chromium.org [Wed, 4 Jun 2014 00:59:31 +0000 (00:59 +0000)]
gpu: Blacklist ARB_sync for two more device_ids on MacOSX.

BUG=371530
TBR=sievers
NOTRY=true

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

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

7 weeks agoFix desynched GPU stencil mask cache values.
jmadill@chromium.org [Tue, 3 Jun 2014 01:00:36 +0000 (01:00 +0000)]
Fix desynched GPU stencil mask cache values.

In a few places, the command buffer used glStencilMask directly
instead of calling through to the helper function which updated
the mask cache values. This could cause some strange behaviour
in ANGLE, such as the front and back stencil masks getting split.
The split mask values could cause unexpected GL errors during draw.

BUG=378754

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

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

7 weeks agogpu: Blacklist ARB_sync for yet another device_id on MacOSX.
reveman@chromium.org [Sun, 1 Jun 2014 20:26:48 +0000 (20:26 +0000)]
gpu: Blacklist ARB_sync for yet another device_id on MacOSX.

BUG=371530
NOTRY=true
TBR=sievers

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

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

7 weeks agogn fixes for ui/gl and mac
jamesr@chromium.org [Sun, 1 Jun 2014 12:16:59 +0000 (12:16 +0000)]
gn fixes for ui/gl and mac

With this the ui/gl target compiles on mac and fails to link with some skia
thingy.

R=brettw@chromium.org
TBR=ben@chromium.org

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

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

7 weeks agogpu: Blacklist ARB_sync for one more device_id on MacOSX.
reveman@chromium.org [Sat, 31 May 2014 23:04:43 +0000 (23:04 +0000)]
gpu: Blacklist ARB_sync for one more device_id on MacOSX.

BUG=371530
NOTRY=true
TBR=sievers

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

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

7 weeks agogpu: Add disable_arb_sync workaround and blacklist some MacOSX drivers.
reveman@chromium.org [Sat, 31 May 2014 04:06:21 +0000 (04:06 +0000)]
gpu: Add disable_arb_sync workaround and blacklist some MacOSX drivers.

BUG=371530

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

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

7 weeks agoReland: Updating calls to offscreen buffers to use a size of (0,0) when they do not...
dnicoara@chromium.org [Fri, 30 May 2014 01:27:47 +0000 (01:27 +0000)]
Reland: Updating calls to offscreen buffers to use a size of (0,0) when they do not require an actual buffer

These updates would enable the surfaceless context extension where available.

BUG=377497

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

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

7 weeks agoWorkaround VAO related driver bug.
zmo@chromium.org [Fri, 30 May 2014 00:13:23 +0000 (00:13 +0000)]
Workaround VAO related driver bug.

If a VAO is bound, glVertexAttribPointer will incorrectly generate an
GL_INVALID_OPERATION if no ARRAY_BUFFER is bound and pointer is NULL.

BUG=373974
TEST=gpu_unittests, webgl conformance tests on AMD
R=kbr@chromium.org, piman@chromium.org, bajones@chromium.org, vmiura@chromium.org

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

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

7 weeks agoAndroid: Blacklist EGL_KHR_fence_sync on Mali-400 MP and Broadcom
sievers@google.com [Thu, 29 May 2014 23:39:52 +0000 (23:39 +0000)]
Android: Blacklist EGL_KHR_fence_sync on Mali-400 MP and Broadcom

Testing fences does not work there.

BUG=378691, 373360, 371530
NOTRY=True
R=reveman@chromium.org

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

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

7 weeks agoAdd tracing for places that make sync GL calls in compositor init
jamesr@chromium.org [Thu, 29 May 2014 23:15:14 +0000 (23:15 +0000)]
Add tracing for places that make sync GL calls in compositor init

We make several synchronous GL calls during compositor initialization, some
of which appear unnecessary. This adds some more tracing to make these calls
easier to understand.

R=jbauman

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

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

7 weeks agoReducing code duplication between WGC3D(InProcess)CommandBufferImpl
bajones@chromium.org [Thu, 29 May 2014 21:18:49 +0000 (21:18 +0000)]
Reducing code duplication between WGC3D(InProcess)CommandBufferImpl

Currently any time a new GL function is added both classes need to be updated
with identical code. This patch moves the shared portion of the code into a
common location.

R=piman@chromium.org

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

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

7 weeks agoAdd CC to the GN build, work on GPU more
brettw@chromium.org [Thu, 29 May 2014 20:54:24 +0000 (20:54 +0000)]
Add CC to the GN build, work on GPU more

BUG=
R=jamesr@chromium.org
TBR=piman

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

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

7 weeks agoRevert of Updating calls to offscreen buffers to use a size of (0,0) when they do...
nkostylev@chromium.org [Thu, 29 May 2014 10:20:46 +0000 (10:20 +0000)]
Revert of Updating calls to offscreen buffers to use a size of (0,0) when they do not require an actual buffer (https://codereview.chromium.org/293293002/)

Reason for revert:
This CL broke VMTest on ChromiumOS bot:
http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20%28x86%29/builds/21999
http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20%28x86%29/builds/21999/steps/VMTest%20%28attempt%201%29/logs/stdio

See http://crbug.com/378430

Original issue's description:
> Updating calls to offscreen buffers to use a size of (0,0) when they do not require an actual buffer
>
> These updates would enable the surfaceless context extension where available.
>
> BUG=377497
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273225

TBR=kbr@chromium.org,dnicoara@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=377497,378430

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

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

7 weeks agoUpdating calls to offscreen buffers to use a size of (0,0) when they do not require...
dnicoara@chromium.org [Wed, 28 May 2014 14:41:42 +0000 (14:41 +0000)]
Updating calls to offscreen buffers to use a size of (0,0) when they do not require an actual buffer

These updates would enable the surfaceless context extension where available.

BUG=377497

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

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

7 weeks agoAndroid: Disable EGL_KHR_fence_sync on IMG
sievers@chromium.org [Wed, 28 May 2014 05:47:48 +0000 (05:47 +0000)]
Android: Disable EGL_KHR_fence_sync on IMG

Testing fences does not work there.

BUG=371530

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

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

7 weeks agoAdd unit test for GL_CHROMIUM_sync_query
sievers@chromium.org [Wed, 28 May 2014 05:45:41 +0000 (05:45 +0000)]
Add unit test for GL_CHROMIUM_sync_query

BUG=371530

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

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

7 weeks agoFix a bug in gpu_unittests mock expectations for VAO.
zmo@chromium.org [Wed, 28 May 2014 02:59:02 +0000 (02:59 +0000)]
Fix a bug in gpu_unittests mock expectations for VAO.

I notcied this bug while trying to fix the WebGL VAO related regressions
on Linux AMD.

Before the generated ID is not set, so by default it's 0, which
is wrong, because 0 is reserved to unbind instead of bind.

Also, turn on VAO support for majority of tests as the emulated code path
is more isolated and its tests are also more isolated.  I feel it's better
to test with VAO on by default.

BUG=373974
TEST=gpu_unittests
R=vmiura@chromium.org,kbr@chromium.org,piman@chromium.org,jbauman@chromium.org

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

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

8 weeks agoAdd ppapi, improve Windows GN build.
brettw@chromium.org [Tue, 27 May 2014 20:15:20 +0000 (20:15 +0000)]
Add ppapi, improve Windows GN build.

This adds ppapi-related targets except the tests to the GN build.

Did some minor tweaks to the .gypi ppapi lists. Some files were duplicated between the trusted and common lists which causes errors in GN (it doesn't uniquify the lists like GYP). Common is used in every place trusted is, so I just removed the duplicates from the trusted list.

Fixed some warnings in skia and tcmalloc. Added the ability to undefine NOMINMAX on Windows.

Fixed some src/ui Windows compilation issues.

BUG=
R=scottmg@chromium.org

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

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

8 weeks agoRemove shm versions of immediate commands from command buffer
kkinnunen@nvidia.com [Tue, 27 May 2014 17:15:16 +0000 (17:15 +0000)]
Remove shm versions of immediate commands from command buffer

The actual code uses only immediate commands. The shm versions are
either unused or used only by the unit tests.

Make the unit tests use the immediate commands.

Solves the problem of not having to implement one useless function for
the a new command when using immediate commands.

BUG=373763

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

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

8 weeks agoDisable multisampling on Mali-400 GPUs and Android < 4.3
tsniatowski@opera.com [Mon, 26 May 2014 20:15:27 +0000 (20:15 +0000)]
Disable multisampling on Mali-400 GPUs and Android < 4.3

This avoids a GL error from a buggy glGetIntegerv(GL_MAX_SAMPLES_ANGLE)
call. Based on patch by mkisilev@yandex-team.ru

BUG=362435
R=sievers@chromium.org

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

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

8 weeks agoRemove scoped_array references in src/gpu
shannonwoods@chromium.org [Sat, 24 May 2014 13:04:16 +0000 (13:04 +0000)]
Remove scoped_array references in src/gpu

scoped_array is deprecated in favor of scoped_ptr[]
as of https://codereview.chromium.org/14081006

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

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

8 weeks agoFix an early return and the error status in glLoseContextCHROMIUM impl
kkinnunen@nvidia.com [Fri, 23 May 2014 13:05:03 +0000 (13:05 +0000)]
Fix an early return and the error status in glLoseContextCHROMIUM impl

The implementation of glLoseContextCHROMIUM did not return early
in gl error conditions of invalid enums passed as arguments. Add
the early returns and tests for the invalid enums.

Upon successful glLoseContextCHROMIUM, the subsequent calls
such as glGetError would also fail, because the implementation
would set the decoder error variable as well as return the error
value. Fix this by just setting the decoder error variable. Add
a test for this (LoseContextCHROMIUMValidArgs)

BUG=373159

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

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

8 weeks agoAdd win8.1 support to GPUBotConfig
zmo@chromium.org [Fri, 23 May 2014 11:08:53 +0000 (11:08 +0000)]
Add win8.1 support to GPUBotConfig

Also add some error message in case LoadCurrentConfig fails.

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

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

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

8 weeks agoReturn early after errors in glVertexAttribDivisor and glCopyTexImage2D implementations
kkinnunen@nvidia.com [Fri, 23 May 2014 07:07:53 +0000 (07:07 +0000)]
Return early after errors in glVertexAttribDivisor and glCopyTexImage2D implementations

Command buffer command decoder is missing few early returns.  Add early
returns after error handling in glVertexAttribDivisorANGLE if no
extension is present and glCopyTexImage2D if texture is immutable.

BUG=373159

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

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

2 months agoSome build changes for nacl on Android
sehr@chromium.org [Thu, 22 May 2014 22:19:32 +0000 (22:19 +0000)]
Some build changes for nacl on Android

1) Use TOOLCHAIN_OS rather than OS for package names
2) gpu_nacl.gyp shouldn't include trusted code test dependencies.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3032
R=bbudge@chromium.org, bradnelson@google.com, piman@chromium.org, sievers@chromium.org

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

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

2 months agoAsk driver for driver specific extension
boliu@chromium.org [Thu, 22 May 2014 19:09:06 +0000 (19:09 +0000)]
Ask driver for driver specific extension

EGL_KHR_fence_sync is an EGL only extension that is not returned by the
cross-platform glGetString(GL_EXTENSIONS).

Add a workaround for qualcomm devices before 4.4, which had a bug with
the EGL_KHR_fence_sync extension.

BUG=375365,278606,371530

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

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

2 months agoMoves responsibility for shader resource string generation to ANGLE.
shannonwoods@chromium.org [Wed, 21 May 2014 20:05:40 +0000 (20:05 +0000)]
Moves responsibility for shader resource string generation to ANGLE.

BUG=374942

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

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

2 months agoAdd GPU command buffer sevice and protobuf to GN build
brettw@chromium.org [Wed, 21 May 2014 19:42:31 +0000 (19:42 +0000)]
Add GPU command buffer sevice and protobuf to GN build

Adds a protobuf target and a template for defining protos. This handles doing host builds of protoc when cross-compiling.

The command buffer sevice wants more optimization on Android, so this patch generalizes the solution. Normally Android, like Windows, optimizes for size. This now adds support on Android for speed optimization just like Windows does. Mac & Linux always optimize for speed.

Removes the declare_args call around the gcc_version. This was parameterized to be different if is_android was set, which isn't valid because build parameters can't vary across toolchains. Since this value is derived from the environment, I just removed the declare_args call.

BUG=
R=piman@chromium.org

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

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

2 months agoGN build improvements, misc plus
brettw@chromium.org [Tue, 20 May 2014 19:20:40 +0000 (19:20 +0000)]
GN build improvements, misc plus

Parameterize webrtc enabling.

Add use_seccomp_pbf flag

Add a webkit version target

Work on ui/base GN build, especially on Windows. This target is a mess (in GYP). This patch tries to make it make a bit more sense while fixing the errors I found.

Fix ui/gl target for non-Linux platform. A bunch of X11 stuff was not parameterized.

Add unscaled resources target

BUG=
R=scottmg@chromium.org

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

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

2 months agoAndroid: cleanup gtest_target_type conditions.
bulach@chromium.org [Sat, 17 May 2014 16:09:58 +0000 (16:09 +0000)]
Android: cleanup gtest_target_type conditions.

For a long time (crrev.com/133053) OS==android implies:
gtest_target_type=shared_library
Cleanup the spurious conditions and obsolete TODOs.

BUG=

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

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

2 months agoAdd size info to texture upload traces.
vangelis@chromium.org [Sat, 17 May 2014 15:33:13 +0000 (15:33 +0000)]
Add size info to texture upload traces.

Add texture width and height to existing texture upload trace calls in the
command buffer service.

BUG=373074

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

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

2 months agoGN build: GPU work, Windows compile, "check" errors
brettw@chromium.org [Fri, 16 May 2014 19:34:34 +0000 (19:34 +0000)]
GN build: GPU work, Windows compile, "check" errors

Fix the "gn check" header errors.

Remove the extra "gles2_utils" target which "gn check" flags as an error. This target is actually inseparable from "command_buffer_common" but exists this way to prevent cycles in GYP files (but not GYP targets). GN doesn't have this problem, so I merged them.

Moved the GPU targets out into build files closer to their files (gpu/command_buffer/client and .../common). This leaves a BUILD.gn file in gpu/ with a comment listing the forwarding locations, since that's where people will look for a BUILD.gn file first.

Delete the duplicate gfx_unittests target, leave a comment for where it is in case somebody does a search for that name.

Make webp compile on Windows

Make ui/gfx compile on Windows. There were some duplicate symbols for ozone. I changed some of the filtering around to do += instead of exclusion. I think in these cases it's easier to follow and maintain.

BUG=
R=piman@chromium.org, urvang@google.com

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

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

2 months agogpu: Assert that FencedAllocator is empty in destructor
jadahl@opera.com [Fri, 16 May 2014 11:41:38 +0000 (11:41 +0000)]
gpu: Assert that FencedAllocator is empty in destructor

With the commit "gpu: Reuse transfer buffers more aggresively" mapped
memory is free:ed on lost context. This means that we can reinstate the
DCHECKs in the FencedAllocator destructor that checks that all blocks
have been free:ed by their owner.

Tests that didn't explicitly free mapped memory now do so, and one test
that tested that leaking was OK has been removed.

BUG=328808

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

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

2 months agoBe more strict with detecting Optimus on Linux.
zmo@chromium.org [Thu, 15 May 2014 20:44:39 +0000 (20:44 +0000)]
Be more strict with detecting Optimus on Linux.

I don't really this is the root cause of r371851, but anyway,
tighten up the logic seems reasonable.

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

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

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

2 months agoAdd GN build for parts of gpu and ozone.
brettw@chromium.org [Thu, 15 May 2014 19:39:14 +0000 (19:39 +0000)]
Add GN build for parts of gpu and ozone.

Moves existing ozone platform flag to new .gni file with all ozone flags in it.

R=piman@chromium.org, rjkroege@chromium.org, spang@chromium.org

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

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