diff options
author | kkinnunen <kkinnunen@nvidia.com> | 2015-12-04 01:36:31 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-04 09:37:12 +0000 |
commit | 8cefb231216c2777281f37a30e3fb8e67513ee2b (patch) | |
tree | 2d0163eed0729e5f7a8fb55fb03b034eddcb5305 /mojo/gpu | |
parent | 91db68e8cb2080d1e9e07858efea3f7e198112a9 (diff) | |
download | chromium_src-8cefb231216c2777281f37a30e3fb8e67513ee2b.zip chromium_src-8cefb231216c2777281f37a30e3fb8e67513ee2b.tar.gz chromium_src-8cefb231216c2777281f37a30e3fb8e67513ee2b.tar.bz2 |
command_buffer: Implement EXT_blend_func_extended
Implement EXT_blend_func_extended for command buffer ES 2.0 and ES 3.0
contexts.
For the ES 2.0 context, the extension supports dual-source blending with
pre-defined gl_SecondaryFragColorEXT and gl_SecondaryFragDataEXT
variables.
Currently EXT_blend_func_extended is only exposed if the service context
supports program interface query. This means OpenGL context or OpenGL
ES 3.1 context. This is to simplify the unit test expectation conditions.
Theoretically also ES 2.0 and ES 3.0 service contexts could support
EXT_blend_func_extended, but probably there will never be such a driver.
BUG=506765
Review URL: https://codereview.chromium.org/1309743005
Cr-Commit-Position: refs/heads/master@{#363175}
Diffstat (limited to 'mojo/gpu')
-rw-r--r-- | mojo/gpu/mojo_gles2_impl_autogen.cc | 17 | ||||
-rw-r--r-- | mojo/gpu/mojo_gles2_impl_autogen.h | 8 |
2 files changed, 25 insertions, 0 deletions
diff --git a/mojo/gpu/mojo_gles2_impl_autogen.cc b/mojo/gpu/mojo_gles2_impl_autogen.cc index 8f817e3..2b2538a 100644 --- a/mojo/gpu/mojo_gles2_impl_autogen.cc +++ b/mojo/gpu/mojo_gles2_impl_autogen.cc @@ -1909,5 +1909,22 @@ void MojoGLES2Impl::ApplyScreenSpaceAntialiasingCHROMIUM() { MojoGLES2MakeCurrent(context_); glApplyScreenSpaceAntialiasingCHROMIUM(); } +void MojoGLES2Impl::BindFragDataLocationIndexedEXT(GLuint program, + GLuint colorNumber, + GLuint index, + const char* name) { + MojoGLES2MakeCurrent(context_); + glBindFragDataLocationIndexedEXT(program, colorNumber, index, name); +} +void MojoGLES2Impl::BindFragDataLocationEXT(GLuint program, + GLuint colorNumber, + const char* name) { + MojoGLES2MakeCurrent(context_); + glBindFragDataLocationEXT(program, colorNumber, name); +} +GLint MojoGLES2Impl::GetFragDataIndexEXT(GLuint program, const char* name) { + MojoGLES2MakeCurrent(context_); + return glGetFragDataIndexEXT(program, name); +} } // namespace mojo diff --git a/mojo/gpu/mojo_gles2_impl_autogen.h b/mojo/gpu/mojo_gles2_impl_autogen.h index e207ca4..c00372dd 100644 --- a/mojo/gpu/mojo_gles2_impl_autogen.h +++ b/mojo/gpu/mojo_gles2_impl_autogen.h @@ -888,6 +888,14 @@ class MojoGLES2Impl : public gpu::gles2::GLES2Interface { GLenum GetGraphicsResetStatusKHR() override; void BlendBarrierKHR() override; void ApplyScreenSpaceAntialiasingCHROMIUM() override; + void BindFragDataLocationIndexedEXT(GLuint program, + GLuint colorNumber, + GLuint index, + const char* name) override; + void BindFragDataLocationEXT(GLuint program, + GLuint colorNumber, + const char* name) override; + GLint GetFragDataIndexEXT(GLuint program, const char* name) override; private: MojoGLES2Context context_; |