New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 651829 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Jul 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocked on:
issue 651843
issue 669168



Sign in to add a comment

Update Skia bindings to GLES2Interface to support OpenGL ES 3.0

Project Member Reported by bsalomon@chromium.org, Sep 30 2016

Issue description

Currently Skia uses a stub GetString implementation that downgrades the version of ES reported from 3 to 2. To move to 3 we need to hookup the ES3 functions of GLES2Interface to Skia's GrGLInterface constructed in gl_bindings_skia_cmd_buffer.cc and test to make sure nothing regresses.
 
Blockedon: 651843
I was trying to experiment with this. It seems that when I run with --enable-unsafe-es3-apis I get WebGL 2 support but the context used for GPU raster reports a ES2 version number. Is there a change required for internal contexts to be created as ES3?

Comment 3 by kbr@chromium.org, Sep 30 2016

Cc: zmo@chromium.org geoffl...@chromium.org
On what platform are you testing? On Windows at least, the GPU process should be creating ES3 contexts by default with ANGLE:
https://cs.chromium.org/chromium/src/ui/gl/gl_context_egl.cc?q=gl_context_egl.cc&sq=package:chromium&dr&l=55

Comment 4 by zmo@chromium.org, Oct 1 2016

We probably want to de-couple turning on WebGL2 from switching command buffer to ES3 for internal contexts. The latter could have potential perf regressions and increasing crash rate, so maybe let's ship WebGL2 and wait one or two releases before switching internal contexts from ES2 to ES3?

Comment 5 by zmo@chromium.org, Oct 1 2016

Yes, the underlying ANGLE is creating ES3 contexts by default right now, but command buffer is still creating ES2 internal contexts on top of ANGLE ES3.

Comment 6 by kbr@chromium.org, Oct 1 2016

Mo, could you point Brian at the code which makes the command buffer think it should create ES2 contexts except for WebGL 2.0, so he can start testing Skia's ES 3.0 code paths?

Thanks for the clarification. I didn't realize internal contexts were restricted to ES2 even when WebGL2 was enabled. I'm fine waiting a bit before turning this on for Skia but would like to start testing.

Comment 8 by zmo@chromium.org, Oct 3 2016

It seems to me just by changing ContextCreationAttribHelper::ContextCreationAttribHelper()'s context_type default from ES2 to ES3 would do the trick.  If it doesn't work, let me know.

Comment 9 by bsalo...@google.com, Nov 22 2016

I revived this effort. It seems like things are working better now, but I'm getting errors about swizzling:

[14073:14073:1122/143213:ERROR:gles2_cmd_decoder_autogen.h(2920)] [.RenderWorker-0x2ea210d6c620.GpuRasterization]GL ERROR :GL_INVALID_ENUM : glTexParameteri: pname was GL_TEXTURE_SWIZZLE_R
[14073:14073:1122/143213:ERROR:gles2_cmd_decoder_autogen.h(2920)] [.RenderWorker-0x2ea210d6c620.GpuRasterization]GL ERROR :GL_INVALID_ENUM : glTexParameteri: pname was GL_TEXTURE_SWIZZLE_G
[14073:14073:1122/143213:ERROR:gles2_cmd_decoder_autogen.h(2920)] [.RenderWorker-0x2ea210d6c620.GpuRasterization]GL ERROR :GL_INVALID_ENUM : glTexParameteri: pname was GL_TEXTURE_SWIZZLE_B
[14073:14073:1122/143213:ERROR:gles2_cmd_decoder_autogen.h(2920)] [.RenderWorker-0x2ea210d6c620.GpuRasterization]GL ERROR :GL_INVALID_ENUM : glTexParameteri: pname was GL_TEXTURE_SWIZZLE_A


Is support for this missing in the command buffer?
Here is the WIP patch: https://codereview.chromium.org/2436813005/
Also, my most recent testing that produced these errors was on Linux. Should I stick to Windows?

Comment 12 by kbr@chromium.org, Nov 22 2016

It's possible that texture swizzling was broken in the command buffer accidentally. That functionality was removed from WebGL 2.0, but in theory is supposed to still be in the non-WebGL OpenGL ES 3.0 contexts. It looks like these enums are missing from src/gpu/command_buffer/build_gles2_cmd_buffer.py . It might be as simple as adding them in, but I suspect that more changes to the code in context_state.cc may be needed.

Please feel free to file a separate bug about that and block this one on it.

Linux should be fine for testing -- any errors like this are probably common across platforms. Windows doesn't use virtualized GL contexts though by default and eliminating that variable might be helpful. Or run with the command line flag:

 --use_virtualized_gl_contexts=0

Blockedon: 669168
It doesn't appear to be related to virtual contexts.
Project Member

Comment 15 by bugdroid1@chromium.org, May 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/96a53c163a05f4d0f6ce201d685a7f335fb3de99

commit 96a53c163a05f4d0f6ce201d685a7f335fb3de99
Author: bsalomon <bsalomon@google.com>
Date: Wed May 03 17:24:33 2017

Update Skia GL bindings to ES3

The bindings are updated to include ES3 functions. However, the context that is created for GPU rasterization is still ES2 so this should have no effect. An ugly version string hack that was temporarily needed to restrict Skia to ES2 is removed as it is no longer necessary.

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

BUG= 651829 

Review-Url: https://codereview.chromium.org/2436813005
Cr-Commit-Position: refs/heads/master@{#469018}

[modify] https://crrev.com/96a53c163a05f4d0f6ce201d685a7f335fb3de99/gpu/skia_bindings/gl_bindings_skia_cmd_buffer.cc

Status: WontFix (was: Assigned)
This was targeted at using ES 3 for GPU Rasterization. With OOP-R this is no longer a goal. csmartdalton@ is investigating using ES3 for canvas 2D over command buffer in skia:8159

Sign in to add a comment