summaryrefslogtreecommitdiffstats
path: root/mojo/gpu
diff options
context:
space:
mode:
authorkkinnunen <kkinnunen@nvidia.com>2015-12-04 01:36:31 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-04 09:37:12 +0000
commit8cefb231216c2777281f37a30e3fb8e67513ee2b (patch)
tree2d0163eed0729e5f7a8fb55fb03b034eddcb5305 /mojo/gpu
parent91db68e8cb2080d1e9e07858efea3f7e198112a9 (diff)
downloadchromium_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.cc17
-rw-r--r--mojo/gpu/mojo_gles2_impl_autogen.h8
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_;