chromium/src/gpu.git
3 months agoUpdate GPU rasterization device whitelist master
ajuma@chromium.org [Thu, 21 Aug 2014 18:35:02 +0000 (18:35 +0000)]
Update GPU rasterization device whitelist

This replaces the whitelisting of all Qualcomm GPUs on
Android 4.4 with whitelisting all Android 4.4 devices
with GL ES version >= 3.0.

BUG=405646

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

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

3 months agoSpelling fixes for 'device' and 'service'.
tnagel@chromium.org [Thu, 21 Aug 2014 11:43:05 +0000 (11:43 +0000)]
Spelling fixes for 'device' and 'service'.

TBR=gavinp
BUG=none

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

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

3 months agoRevert of gpu: support immutable texture on Linux Mesa driver and GLES3. (patchset...
spang@chromium.org [Wed, 20 Aug 2014 20:50:45 +0000 (20:50 +0000)]
Revert of gpu: support immutable texture on Linux Mesa driver and GLES3. (patchset #2 of https://codereview.chromium.org/471603003/)

Reason for revert:
causes black rectangles on chromeos link_freon

Original issue's description:
> gpu: support immutable texture on Linux Mesa driver and GLES3.
>
> Mesa GL driver supports GL_ARB_texture_storage extensions, not
> GL_EXT_texture_storage. GLES3 supports glTexStroage2D by default.
> This CL makes Intel Chromebook and Linux take advantage of
> immutable texture.
>
> BUG=106142
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290676

TBR=bsalomon@google.com,piman@chromium.org,vangelis@chromium.org,dongseong.hwang@intel.com
NOTREECHECKS=true
NOTRY=true
BUG=106142

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

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

3 months agoMake it possible to test command buffer decoder functions with extension flags
kkinnunen@nvidia.com [Wed, 20 Aug 2014 09:23:10 +0000 (09:23 +0000)]
Make it possible to test command buffer decoder functions with extension flags

Make it possible to test command buffer decoder functions even if they
have extension_flags specified in the function info.

Create new files for these autogenerated unit tests:
  gles2_cmd_decoder_unittest_extensions{.cc,_autogen.h}.

Does not add any new unit tests, as the existing functions have manually
written tests that cover what current autogenerator can produce.

The idea is that for each new extension_flag function one would write a
new unit test class in gles2_cmd_decoder_unittest_extensions.cc. The
class initialize the decoder with the needed extensions, so that the
feature flag controlling the function would be enabled.

Changes the way the unit test class name is defined in
build_gles2_cmd_buffer.py. Now the class is parametrized by
the top-level function that writes out the service unit tests.
Thus it's not possible to use CWriter classes 'file number' property.
Instead, pass the name in the substitution dict. Define that the
methods generating service unittests accept varying number of
substitution dicts.

This is useful for supporting extensions such as upcoming
CHROMIUM_path_rendering, so that more of the decoder function unit tests
can be autogenerated.

BUG=344330

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

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

3 months agoAdd memory limits struct to in-process context
boliu@chromium.org [Wed, 20 Aug 2014 04:25:05 +0000 (04:25 +0000)]
Add memory limits struct to in-process context

Add SharedMemoryLimits struct to in-process command buffer
context. Pick a reasonable value for the reclaim limit for
synchronous compositor

BUG=402086

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

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

3 months agoSimplified GPU Tracer by removing parent base class.
dyen@chromium.org [Wed, 20 Aug 2014 00:11:57 +0000 (00:11 +0000)]
Simplified GPU Tracer by removing parent base class.

Since the Tracer factory is implemented within gpu_tracer, it is simpler
to have the GPUTracer be a flat class rather than implementing
the noop behavior in a different object through inheritance. This CL
does not change any functionality but simply flattens GPUTracer and
combines the code for GPUTracerImpl and GPUTracerARBTimerQuery.

BUG= https://code.google.com/p/chromium/issues/detail?id=397294
TEST= trybots

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

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

3 months agoGN: Remove duplicate entries from sources lists
jamesr@chromium.org [Tue, 19 Aug 2014 23:04:54 +0000 (23:04 +0000)]
GN: Remove duplicate entries from sources lists

R=brettw@chromium.org

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

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

3 months agoAndroid: Extend Mali egl fence sync blacklist to all ES2 drivers
sievers@chromium.org [Tue, 19 Aug 2014 22:36:16 +0000 (22:36 +0000)]
Android: Extend Mali egl fence sync blacklist to all ES2 drivers

BUG=398964
NOTRY=True

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

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

3 months agogpu: support immutable texture on Linux Mesa driver and GLES3.
dongseong.hwang@intel.com [Tue, 19 Aug 2014 22:10:42 +0000 (22:10 +0000)]
gpu: support immutable texture on Linux Mesa driver and GLES3.

Mesa GL driver supports GL_ARB_texture_storage extensions, not
GL_EXT_texture_storage. GLES3 supports glTexStroage2D by default.
This CL makes Intel Chromebook and Linux take advantage of
immutable texture.

BUG=106142

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

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

3 months agoEnable expanded GPU rasterization device whitelist by default
ajuma@chromium.org [Tue, 19 Aug 2014 18:03:53 +0000 (18:03 +0000)]
Enable expanded GPU rasterization device whitelist by default

This moves the devices in the expanded whitelist (currently enabled
by a field trial) into the default whitelist.

BUG=404866

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

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

3 months agoDisable HW video decoder acceleration on Samsung Galaxy Note and Galaxy S3/S4 devices.
glaznev@chromium.org [Tue, 19 Aug 2014 02:07:46 +0000 (02:07 +0000)]
Disable HW video decoder acceleration on Samsung Galaxy Note and Galaxy S3/S4 devices.
Some of these devices use buggy omx.sec.vp8.dec as a default VP8 decoder.

BUG=396578

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

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

3 months agoHook up two GPU driver bug workarounds.
zmo@chromium.org [Mon, 18 Aug 2014 18:10:27 +0000 (18:10 +0000)]
Hook up two GPU driver bug workarounds.

* scalarize_vec_and_mat_constructor_args
   per discussion with kbr, we decided to turn it on always for
   consistency.
* regenerate_struct_names
   all mac drivers, linux amd drivers

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

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

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

3 months agoUse GL_LINEAR for backing texture of offscreen framebuffer.
mazda@chromium.org [Sat, 16 Aug 2014 07:46:26 +0000 (07:46 +0000)]
Use GL_LINEAR for backing texture of offscreen framebuffer.

The texture filtering mode of backing texture of offscreen
framebuffer is used for rendering Pepper Graphics3D contents.
If GL_NEAREST is used, the contents looks bad when it is scaled
(e.g. CSS transform, changing display resolution on ChromeOS).
This CL changes the texture filtering mode of backing textures
to GL_LINEAR to prevent the contents from looking bad in such cases.

TEST=Set display resolution to 1024x680 on Pixel
TEST=Apply CSS transform to NaCl emebed element
TEST=Apply CSS transform to Flash content
BUG=384687

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

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

3 months agoAdd EGL_CHROMIUM_get_sync_values extension text
marcheu@chromium.org [Fri, 15 Aug 2014 16:09:09 +0000 (16:09 +0000)]
Add EGL_CHROMIUM_get_sync_values extension text

In order to have something for implementors to look at, let's add
this extension here. We can always replace it with a newer version
once we have everything specced.

BUG=chromium:366935
TEST=no test

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

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

3 months agoReland: Use RE string pattern matching for blacklist strings.
zmo@chromium.org [Fri, 15 Aug 2014 05:30:16 +0000 (05:30 +0000)]
Reland: Use RE string pattern matching for blacklist strings.

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

(Was reverted due to a false alarm about using uninitialized variables in re2)

Including cpu_brand, gl_vendor, gl_renderer, gl_extension, driver_vendor,
and machine_model_name.

BUG=396578
TBR=kbr@chromium.org,piman@chromium.org
TEST=gpu_unittests

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

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

3 months agoBlacklist very old ATI drivers from D3D11 due to performance issues.
shannonwoods@chromium.org [Thu, 14 Aug 2014 15:54:58 +0000 (15:54 +0000)]
Blacklist very old ATI drivers from D3D11 due to performance issues.

BUG=402134
TEST=gpu_unittests

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

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

3 months agoConsistently generate INVALID_VALUE on NaN line width
oetuaho@nvidia.com [Thu, 14 Aug 2014 15:20:56 +0000 (15:20 +0000)]
Consistently generate INVALID_VALUE on NaN line width

GL drivers are allowed to generate errors when NaN is supplied to
functions under GLES 3.0 section 2.1.1 or OpenGL 4.5 section 2.3.4.1.
NVIDIA OpenGL driver generates an error when NaN is supplied to
glLineWidth. Make this behavior consistent for Chromium, which removes
the possibility of drawing with an undefined line width, and makes sure
that errors don't leak from the GL driver.

BUG=402847
TEST=WebGL conformance tests on debug build with virtual contexts,
gpu_unittests

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

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

3 months agoExpose CHROMIUM_texture_mailbox/sync_point stubs in mojo public headers
jamesr@chromium.org [Wed, 13 Aug 2014 20:37:48 +0000 (20:37 +0000)]
Expose CHROMIUM_texture_mailbox/sync_point stubs in mojo public headers

BUG=
R=piman@chromium.org

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

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

3 months agoRevert 289308 "Revert 289154 "Revert 289067 "Use RE string patte..."
brettw@chromium.org [Wed, 13 Aug 2014 17:50:55 +0000 (17:50 +0000)]
Revert 289308 "Revert 289154 "Revert 289067 "Use RE string patte..."

this reverts the revert of the revert of the revert

> Revert 289154 "Revert 289067 "Use RE string pattern matching for..."
>
> > Revert 289067 "Use RE string pattern matching for blacklist stri..."
> >
> > Reason for revert: uninitialize memory access
> >
> > http://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20Mac%20%28valgrind%29%282%29/builds/29469/steps/memory%20test%3A%20content/logs/stdio
> >
> > > Use RE string pattern matching for blacklist strings.
> > >
> > > Including cpu_brand, gl_vendor, gl_renderer, gl_extension, driver_vendor,
> > > and machine_model_name.
> > >
> > > BUG=396578
> > > TBR=piman@chromium.org
> > > TEST=gpu_unittests
> > >
> > > Review URL: https://codereview.chromium.org/452293002
> >
> > TBR=zmo@chromium.org
> >
> > Review URL: https://codereview.chromium.org/465163002
>
> TBR=oshima@chromium.org
>
> Review URL: https://codereview.chromium.org/468223002

TBR=oshima@chromium.org

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

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

3 months agoRevert 289312 "Move StringToUpperASCII and LowerCaseEqualsASCII ..."
brettw@chromium.org [Wed, 13 Aug 2014 16:48:41 +0000 (16:48 +0000)]
Revert 289312 "Move StringToUpperASCII and LowerCaseEqualsASCII ..."

> Move StringToUpperASCII and LowerCaseEqualsASCII to the base namespace
>
> Convert LowerCaseEqualsASCII to take StringPiece. In the current patch this is
> generally a NOP but will allow me to delete the other 4 variants in a followup
> (wanted to do that separately since that will require more review, since
> callsites will be changed in nontrivial ways).
>
> In some cases, LowerCaseEqualsASCII is called with a WebString, which no
> longer is implicitly converted. I added base::string16(...) around such
> calls to force the right conversion. It happened in these files:
>   window_container_type.cc
>   savable_resources.cc
>   render_view_impl.cc
>   blink_ax_tree_source.cc
>   password_form_conversion_utils.cc
>   translate_helper.cc
>   chrome_render_view_observer.cc
>   dom_serializer_browsertest.cc
>
> R=jamesr@chromium.org
>
> Review URL: https://codereview.chromium.org/448143008

TBR=brettw@chromium.org

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

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

3 months agoMove StringToUpperASCII and LowerCaseEqualsASCII to the base namespace
brettw@chromium.org [Wed, 13 Aug 2014 16:23:25 +0000 (16:23 +0000)]
Move StringToUpperASCII and LowerCaseEqualsASCII to the base namespace

Convert LowerCaseEqualsASCII to take StringPiece. In the current patch this is
generally a NOP but will allow me to delete the other 4 variants in a followup
(wanted to do that separately since that will require more review, since
callsites will be changed in nontrivial ways).

In some cases, LowerCaseEqualsASCII is called with a WebString, which no
longer is implicitly converted. I added base::string16(...) around such
calls to force the right conversion. It happened in these files:
  window_container_type.cc
  savable_resources.cc
  render_view_impl.cc
  blink_ax_tree_source.cc
  password_form_conversion_utils.cc
  translate_helper.cc
  chrome_render_view_observer.cc
  dom_serializer_browsertest.cc

R=jamesr@chromium.org

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

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

3 months agoRevert 289154 "Revert 289067 "Use RE string pattern matching for..."
oshima@chromium.org [Wed, 13 Aug 2014 16:13:28 +0000 (16:13 +0000)]
Revert 289154 "Revert 289067 "Use RE string pattern matching for..."

> Revert 289067 "Use RE string pattern matching for blacklist stri..."
>
> Reason for revert: uninitialize memory access
>
> http://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20Mac%20%28valgrind%29%282%29/builds/29469/steps/memory%20test%3A%20content/logs/stdio
>
> > Use RE string pattern matching for blacklist strings.
> >
> > Including cpu_brand, gl_vendor, gl_renderer, gl_extension, driver_vendor,
> > and machine_model_name.
> >
> > BUG=396578
> > TBR=piman@chromium.org
> > TEST=gpu_unittests
> >
> > Review URL: https://codereview.chromium.org/452293002
>
> TBR=zmo@chromium.org
>
> Review URL: https://codereview.chromium.org/465163002

TBR=oshima@chromium.org

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

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

3 months agoWhitelist Qualcomm GPUs for GPU rasterization on Android 4.4
ajuma@chromium.org [Wed, 13 Aug 2014 15:52:11 +0000 (15:52 +0000)]
Whitelist Qualcomm GPUs for GPU rasterization on Android 4.4

This expands the GPU rasterization device whitelist to include all
Android 4.4 devices with Qualcomm GPUs.

BUG=None

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

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

3 months agoGPU context creation code duplication cleanup
oetuaho@nvidia.com [Wed, 13 Aug 2014 11:50:40 +0000 (11:50 +0000)]
GPU context creation code duplication cleanup

Use ContextCreationAttribHelper through the context creation in both
in-process and out-of-process cases, instead of duplicate structures such
as GLInProcessContextAttribs. Enums used for serializing the attributes
are now defined in only one place, instead of three.

Remove small pieces of dead code related to share groups.
share_resources_ attrib is removed since it is not in use anywhere.

gpu_unittests are changed to better model how bind_generates_resource
gets set, and new checks are added to make sure it is set consistently
everywhere.

TEST=WebGL conformance tests (with and without --in-process-gpu),
cc_unittests, gpu_unittests

BUG=

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

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

3 months agomake it possible to disable the use of libpci on linux again
mostynb@opera.com [Wed, 13 Aug 2014 10:35:40 +0000 (10:35 +0000)]
make it possible to disable the use of libpci on linux again

When CL 430573002 landed, it forced the use of libpci on linux, but
many embedded systems lack this library (and probably lack a pci bus
altogether). Let's add a new config variable to make it possible to
disable the use of libpci.

BUG=398416

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

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

3 months agoEnable async upload egl with mailbox synchronizer
boliu@chromium.org [Wed, 13 Aug 2014 03:05:54 +0000 (03:05 +0000)]
Enable async upload egl with mailbox synchronizer

With the workaround in r286800, mailbox synchronizer skips tile
textures, so is compatible with async transfer egl.

This is a partial revert of r286501.

BUG=399311

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

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

3 months agogpu: Optimize and cleanup code used for CHROMIUM_copy_texture.
dongseong.hwang@intel.com [Wed, 13 Aug 2014 02:51:57 +0000 (02:51 +0000)]
gpu: Optimize and cleanup code used for CHROMIUM_copy_texture.

When source target and destination target is GL_TEXTURE_2D, we can use
glCopyTexImage2D() directly. It avoids gl state changes, program binding and
drawing call.

|dest_target| of DoCopyTexture() is always GL_TEXTURE_2D, so remove the
redundant argument.

Perf data are as follows:
Linux (Intel IvyBridge i7-3520M): 16 us vs 6 us -> 260% faster
Android (Nexus 5): 331.8 us vs 252.7 us -> 31% faster

BUG=N/A

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

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

3 months agoRevert 289067 "Use RE string pattern matching for blacklist stri..."
oshima@chromium.org [Wed, 13 Aug 2014 01:47:40 +0000 (01:47 +0000)]
Revert 289067 "Use RE string pattern matching for blacklist stri..."

Reason for revert: uninitialize memory access

http://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20Mac%20%28valgrind%29%282%29/builds/29469/steps/memory%20test%3A%20content/logs/stdio

> Use RE string pattern matching for blacklist strings.
>
> Including cpu_brand, gl_vendor, gl_renderer, gl_extension, driver_vendor,
> and machine_model_name.
>
> BUG=396578
> TBR=piman@chromium.org
> TEST=gpu_unittests
>
> Review URL: https://codereview.chromium.org/452293002

TBR=zmo@chromium.org

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

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

3 months agoUse RE string pattern matching for blacklist strings.
zmo@chromium.org [Tue, 12 Aug 2014 21:36:15 +0000 (21:36 +0000)]
Use RE string pattern matching for blacklist strings.

Including cpu_brand, gl_vendor, gl_renderer, gl_extension, driver_vendor,
and machine_model_name.

BUG=396578
TBR=piman@chromium.org
TEST=gpu_unittests

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

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

3 months agoRevert 288481 "Use placement new to allocate GPU command buffer ..."
jbauman@chromium.org [Mon, 11 Aug 2014 17:13:17 +0000 (17:13 +0000)]
Revert 288481 "Use placement new to allocate GPU command buffer ..."

Placement new seems not to fix it on official builds.

> Use placement new to allocate GPU command buffer entries.
>
> This isn't as ugly as the crazy null check, and it seems to be compiled correctly.
>
> BUG=
>
> Review URL: https://codereview.chromium.org/427003008

BUG=402139
TBR=jbauman@chromium.org

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

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

3 months agoUse placement new to allocate GPU command buffer entries.
jbauman@chromium.org [Sat, 9 Aug 2014 00:56:56 +0000 (00:56 +0000)]
Use placement new to allocate GPU command buffer entries.

This isn't as ugly as the crazy null check, and it seems to be compiled correctly.

BUG=

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

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

3 months agoOnly switch draw buffers if the extension is supported
oetuaho@nvidia.com [Fri, 8 Aug 2014 14:02:53 +0000 (14:02 +0000)]
Only switch draw buffers if the extension is supported

Otherwise it's possible to end up crashing when calling a null function
pointer, if a framebuffer does not have a color buffer attached.

This bug applies to at least some GLES3 platforms, where DrawBuffers
function is not bound (which is reasonable, since core version of the
function behaves subtly differently than DrawBuffersEXT in relation to
GLSL ES 1.0 shaders, if the EXT_draw_buffers extension is missing). Also
possibly GLES2 platforms which implement OES_depth_texture but not
EXT_draw_buffers.

BUG=401645
TEST=gpu_unittests, WebGL conformance tests

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

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

3 months agogpu: Avoid unbounded idle queue in in-process context
boliu@chromium.org [Fri, 8 Aug 2014 09:41:41 +0000 (09:41 +0000)]
gpu: Avoid unbounded idle queue in in-process context

Before this, a task is added to the idle queue each time in flush and
ScheduleMoreIdleWork. This means that as long as there is idle work, the
size of the queue grows by one in each flush.

Fix this by not adding any idle tasks if there is already one pending.

BUG=401712

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

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

3 months agoMove StringToLowerASCII to base namespace
brettw@chromium.org [Thu, 7 Aug 2014 16:55:42 +0000 (16:55 +0000)]
Move StringToLowerASCII to base namespace

TBR=sky

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

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

3 months agoMicro-optimization in HandleVertexAttribPointer
oetuaho@nvidia.com [Tue, 5 Aug 2014 11:36:12 +0000 (11:36 +0000)]
Micro-optimization in HandleVertexAttribPointer

vertexAttribPointer is a fairly common GL call, so substituting integer
division with bitwise and which has far less latency on common CPU
architectures is a worthwhile optimization.

IsPOT function is added for asserts that make sure this does not break.
Redundant comparison against zero is dropped from IsNPOT. In C++,
unsigned integers are specified to work with mod 2^n arithmetic.

TEST=gpu_unittests
BUG=400135

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

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

3 months agoui: Add ScheduleOverlayPlane API to GLImage.
reveman@chromium.org [Fri, 1 Aug 2014 21:50:17 +0000 (21:50 +0000)]
ui: Add ScheduleOverlayPlane API to GLImage.

This makes it possible to use GLImage instances as overlay planes.

BUG=

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

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

3 months agoUse expanded heuristics for GPU rasterization on future OS versions
ajuma@chromium.org [Fri, 1 Aug 2014 19:58:26 +0000 (19:58 +0000)]
Use expanded heuristics for GPU rasterization on future OS versions

The use of expanded heuristics for triggering GPU rasterization
(this is, the use of viewport "width=device-width, minimum-scale=1.0"
as a GPU rasterization trigger) is currently controlled by a field
trial. This CL causes expanded heuristics to always be used on
under-development and future Android OS versions.

Specifically, this CL:
1) creates a new blacklistable feature for expanded heuristics for GPU
   rasterization;
2) whitelists Android OS versions >= 4.4.99; and
3) moves the field trial logic to the same place as the blacklist check.

BUG=399306

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

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

3 months agoRemove GLInProcessContext::CreateContext()
heejin.r.chung@samsung.com [Fri, 1 Aug 2014 07:31:17 +0000 (07:31 +0000)]
Remove GLInProcessContext::CreateContext()

Change all CreateContext() calls to Context() and remove unnecessary code.

BUG=

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

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

3 months agoDuring image destroy, delete textures only if we have a GL context.
sohan.jyoti@samsung.com [Thu, 31 Jul 2014 15:01:24 +0000 (15:01 +0000)]
During image destroy, delete textures only if we have a GL context.

This adds Destroy function for ImageManager and invoke it from
command decoder destroy path with GL context info.
This is to ensure that when we destroy the image,
textures to which the image is bound to,
is deleted only if we have a GL context.

BUG=375507

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

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

3 months agoAndroid Webview: Skip managed resources in mailbox sync
sievers@chromium.org [Thu, 31 Jul 2014 13:51:43 +0000 (13:51 +0000)]
Android Webview: Skip managed resources in mailbox sync

BUG=399226
NOTRY=True

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

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

3 months agoAndroid WebView: Fall back to idle uploads if draw functor table not set
sievers@google.com [Wed, 30 Jul 2014 12:52:51 +0000 (12:52 +0000)]
Android WebView: Fall back to idle uploads if draw functor table not set

Disable map_image if draw functor table is not set,
and disallow EGL async uploads if MailboxSync is on (doesn't work).

R=boliu@chromium.org

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

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

3 months agoMake vertex attrib divisor affect non-instanced calls as in spec
oetuaho@nvidia.com [Wed, 30 Jul 2014 12:00:10 +0000 (12:00 +0000)]
Make vertex attrib divisor affect non-instanced calls as in spec

In the ANGLE_instanced_arrays spec, drawArrays and drawElements are
redefined in terms of drawArraysOneInstance and drawElementsOneInstance.
Fix the validation checks in the command buffer to reflect this.

BUG=398337
TEST=gpu_unittests, WebGL conformance tests

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

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

3 months agoAdd GPU exception for Microsoft's RemoteFX driver.
kbr@chromium.org [Wed, 30 Jul 2014 08:21:17 +0000 (08:21 +0000)]
Add GPU exception for Microsoft's RemoteFX driver.

Also removed redundant blacklist entry for drivers older than 01/2007.

BUG=386764

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

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

3 months agoShare GPU collector code between X11 and Ozone platforms
dnicoara@chromium.org [Wed, 30 Jul 2014 05:37:18 +0000 (05:37 +0000)]
Share GPU collector code between X11 and Ozone platforms

 - Moved gpu_info_collector_x11.cc to gpu_info_collector_linux.cc since most of
the functionality isn't X11 dependent.
 - Extracted the NVidia utility to the *_x11.cc file since that depends on X11.
 - Removed the Ozone utilities in favour of the common linux ones.

BUG=398416

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

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

3 months agoTurn off scalarize_vec_and_mat_constructor_args workaround everywhere
zmo@chromium.org [Wed, 30 Jul 2014 03:55:10 +0000 (03:55 +0000)]
Turn off scalarize_vec_and_mat_constructor_args workaround everywhere

There is a bug in the workaround, so we should fix it before turning it on.

This is simply removing a few entries in the json file,
plus surpressing affected WebGL conformance tests.

Very safe CL.

BUG=398694
TEST=gpu_unitests, gpu linux bots green
TBR=kbr@chromium.org
NOTRY=true

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

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

3 months agoRevert 286368 "Turn off scalarize_vec_and_mat_constructor_args w..."
zmo@chromium.org [Wed, 30 Jul 2014 01:41:23 +0000 (01:41 +0000)]
Revert 286368 "Turn off scalarize_vec_and_mat_constructor_args w..."

Will reland with proper bug id and also need to surpress affected webgl conformance tests.

> Turn off scalarize_vec_and_mat_constructor_args workaround everywhere
>
> There is a bug in the workaround, so we should fix it before turning it on.
>
> This is simply removing a few entries in the json file, very safe CL.
>
> BUG=
> TEST=gpu_unitests
> TBR=kbr@chromium.org
> NOTRY=true
>
> Review URL: https://codereview.chromium.org/425163003

TBR=zmo@chromium.org

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

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

3 months agoTurn off scalarize_vec_and_mat_constructor_args workaround everywhere
zmo@chromium.org [Wed, 30 Jul 2014 01:03:59 +0000 (01:03 +0000)]
Turn off scalarize_vec_and_mat_constructor_args workaround everywhere

There is a bug in the workaround, so we should fix it before turning it on.

This is simply removing a few entries in the json file, very safe CL.

BUG=
TEST=gpu_unitests
TBR=kbr@chromium.org
NOTRY=true

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

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

3 months agoSimplified GPU Tracer by removing base Trace class.
dyen@chromium.org [Tue, 29 Jul 2014 23:26:32 +0000 (23:26 +0000)]
Simplified GPU Tracer by removing base Trace class.

First step in simplifying the GPU Tracer is by removing
the parent Trace class. Because the Trace class is created
and managed directly by the GPUTracer class, there is no
reason to have a separate base Trace class that can be
overridden through virtual functions.

BUG= https://code.google.com/p/chromium/issues/detail?id=397294
TEST= trybots

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

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

3 months agoGN: Fix up gpu targets in component build
jamesr@chromium.org [Tue, 29 Jul 2014 09:14:02 +0000 (09:14 +0000)]
GN: Fix up gpu targets in component build

The gles2_cmd_helper files should only be linked into the gpu component
when using the component build and can be linked standalone in the
static build. This corrects the _IMPLEMENTATION define for these files,
hides the actual source list in a visibility-restricted source_set, and
adds a group called gles2_cmd_helper that expands out to the expected
thing for clients who just want to use this functionality without caring
about which component or library provides it.

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

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

3 months agoPrevent duplicate navigation to debug URLs from Telemetry.
vmiura@chromium.org [Tue, 29 Jul 2014 08:01:43 +0000 (08:01 +0000)]
Prevent duplicate navigation to debug URLs from Telemetry.

Previously Telemetry enabled navigation to Debug URLs by adding a custom
URL handler.  However, URL handlers can be called multiple times per
Navigation, and Debug URL actions must happen only once.

This CL enables Telemetry URL handling to be done by the normal
NavigationControllerImpl::LoadURLWithParams() to HandleDebugURL() path.

This also removes the prior workaround added in crrev.com/277113002 .

BUG=395326

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

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

4 months agoRestrict nvidia gralloc workaround to < gles 3.1
boliu@chromium.org [Mon, 28 Jul 2014 21:53:27 +0000 (21:53 +0000)]
Restrict nvidia gralloc workaround to < gles 3.1

No need to for this workaround on newer versions of nvidia driver, and has
signficant perf impact otherwise.

BUG=397348

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

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

4 months agoRe-enable various MSVC warnings.
pkasting@chromium.org [Sat, 26 Jul 2014 00:01:53 +0000 (00:01 +0000)]
Re-enable various MSVC warnings.

BUG=81439
TEST=none

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

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

4 months agoMiscellaneous GN updates.
brettw@chromium.org [Thu, 24 Jul 2014 23:10:53 +0000 (23:10 +0000)]
Miscellaneous GN updates.

Removes some unnecessary prints accidentally checked in to the Android build.

Removes a GYP TODO now that angle has rolled.

Updates commented-out labels of targets that now exist.

R=dpranke@chromium.org

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

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

4 months agoFix GN linking issues.
brettw@chromium.org [Thu, 24 Jul 2014 21:19:28 +0000 (21:19 +0000)]
Fix GN linking issues.

This gets rid of most of the non-webrtc/jingle linker errors for webkit_tests.

R=jamesr@chromium.org

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

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

4 months agoReuse GLESUtil code instead of defining new function in TextureManager
heejin.r.chung@samsung.com [Thu, 24 Jul 2014 14:00:03 +0000 (14:00 +0000)]
Reuse GLESUtil code instead of defining new function in TextureManager

Use GLES2Util::IndexToGLFaceTarget instead of redefining in TextureManager
and move GLTargetToFaceIndex to GLES2Util for possible future use.

BUG=None

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

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

4 months agoAdd osmesa to GN build.
brettw@chromium.org [Wed, 23 Jul 2014 22:35:10 +0000 (22:35 +0000)]
Add osmesa to GN build.

Rename gpu_unittest_utils test_utils for project consistency.

Add angle unit tests.

Update comments in GPU GYP file referencing GN targets.

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

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

4 months agoForce disable-d3d11 for Matrox video cards.
jmadill@chromium.org [Wed, 23 Jul 2014 21:00:42 +0000 (21:00 +0000)]
Force disable-d3d11 for Matrox video cards.

These cards either do not support D3D11 fully, or interact with an
unknown ANGLE bug to cause black screens and an unusable browser.
Force off D3D11 until we can diagnose if a fix is possible.

BUG=395861

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

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

4 months agoCleanup test_support target names.
tfarina@chromium.org [Tue, 22 Jul 2014 23:26:48 +0000 (23:26 +0000)]
Cleanup test_support target names.

In GN it is redundat to include the parent directory name, as in
ui/gfx:gfx_test_support. Instead we can write it as ui/gfx:test_support
which is shorter and nicer to read.

Targets found with the following command line:
$ for f in $(g ls-files | grep BUILD); do grep _test_support $f; echo
$f; done

BUG=None
TEST=None
R=brettw@chromium.org
TBR=darin@chromium.org

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

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

4 months agoHook up command buffer with SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS
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

4 months 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

4 months 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

4 months 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 months 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 months 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 months 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 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

4 months 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

5 months 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

5 months 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

5 months 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

5 months 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

5 months 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

5 months 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

5 months 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

5 months 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

5 months 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

5 months 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

5 months 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

5 months 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

5 months 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