summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/client/program_info_manager.h
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 /gpu/command_buffer/client/program_info_manager.h
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 'gpu/command_buffer/client/program_info_manager.h')
-rw-r--r--gpu/command_buffer/client/program_info_manager.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gpu/command_buffer/client/program_info_manager.h b/gpu/command_buffer/client/program_info_manager.h
index fa74ea5..fbae19a 100644
--- a/gpu/command_buffer/client/program_info_manager.h
+++ b/gpu/command_buffer/client/program_info_manager.h
@@ -38,6 +38,10 @@ class GLES2_IMPL_EXPORT ProgramInfoManager {
GLint GetUniformLocation(
GLES2Implementation* gl, GLuint program, const char* name);
+ GLint GetFragDataIndex(GLES2Implementation* gl,
+ GLuint program,
+ const char* name);
+
GLint GetFragDataLocation(
GLES2Implementation* gl, GLuint program, const char* name);
@@ -166,6 +170,9 @@ class GLES2_IMPL_EXPORT ProgramInfoManager {
bool GetUniformsiv(
GLsizei count, const GLuint* indices, GLenum pname, GLint* params);
+ GLint GetFragDataIndex(const std::string& name) const;
+ void CacheFragDataIndex(const std::string& name, GLint index);
+
GLint GetFragDataLocation(const std::string& name) const;
void CacheFragDataLocation(const std::string& name, GLint loc);
@@ -232,6 +239,7 @@ class GLES2_IMPL_EXPORT ProgramInfoManager {
std::vector<UniformES3> uniforms_es3_;
base::hash_map<std::string, GLint> frag_data_locations_;
+ base::hash_map<std::string, GLint> frag_data_indices_;
};
Program* GetProgramInfo(