diff options
author | egdaniel <egdaniel@google.com> | 2014-10-24 15:00:50 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-24 15:00:50 -0700 |
commit | 27c1521ccf0f833affa1182d6d9bc5e31b3af351 (patch) | |
tree | 65c5fb4ee7919e33026824b7ea70b520ea2684fc /src | |
parent | f622a6c8fd176acf9944de8df00d7f0bb56b67d3 (diff) |
Add gpu support for glVertexAttrb1f, 2fv, and 3fv
BUG=skia:
Review URL: https://codereview.chromium.org/662583003
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/gl/GrGLAssembleInterface.cpp | 6 | ||||
-rw-r--r-- | src/gpu/gl/GrGLCreateNullInterface.cpp | 3 | ||||
-rw-r--r-- | src/gpu/gl/GrGLInterface.cpp | 5 | ||||
-rw-r--r-- | src/gpu/gl/GrGLNoOpInterface.cpp | 9 | ||||
-rw-r--r-- | src/gpu/gl/GrGLNoOpInterface.h | 6 | ||||
-rw-r--r-- | src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp | 6 | ||||
-rw-r--r-- | src/gpu/gl/debug/GrGLCreateDebugInterface.cpp | 3 |
7 files changed, 38 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLAssembleInterface.cpp b/src/gpu/gl/GrGLAssembleInterface.cpp index c5c0785fe8..425ed647c5 100644 --- a/src/gpu/gl/GrGLAssembleInterface.cpp +++ b/src/gpu/gl/GrGLAssembleInterface.cpp @@ -183,6 +183,9 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) { GET_PROC(UniformMatrix4fv); GET_PROC(UnmapBuffer); GET_PROC(UseProgram); + GET_PROC(VertexAttrib1f); + GET_PROC(VertexAttrib2fv); + GET_PROC(VertexAttrib3fv); GET_PROC(VertexAttrib4fv); GET_PROC(VertexAttribPointer); GET_PROC(Viewport); @@ -412,6 +415,9 @@ const GrGLInterface* GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get) { GET_PROC(UniformMatrix3fv); GET_PROC(UniformMatrix4fv); GET_PROC(UseProgram); + GET_PROC(VertexAttrib1f); + GET_PROC(VertexAttrib2fv); + GET_PROC(VertexAttrib3fv); GET_PROC(VertexAttrib4fv); GET_PROC(VertexAttribPointer); GET_PROC(Viewport); diff --git a/src/gpu/gl/GrGLCreateNullInterface.cpp b/src/gpu/gl/GrGLCreateNullInterface.cpp index 9cac1c675a..6275ced6fc 100644 --- a/src/gpu/gl/GrGLCreateNullInterface.cpp +++ b/src/gpu/gl/GrGLCreateNullInterface.cpp @@ -454,6 +454,9 @@ const GrGLInterface* GrGLCreateNullInterface() { functions->fUniformMatrix4fv = noOpGLUniformMatrix4fv; functions->fUnmapBuffer = nullGLUnmapBuffer; functions->fUseProgram = nullGLUseProgram; + functions->fVertexAttrib1f = noOpGLVertexAttrib1f; + functions->fVertexAttrib2fv = noOpGLVertexAttrib2fv; + functions->fVertexAttrib3fv = noOpGLVertexAttrib3fv; functions->fVertexAttrib4fv = noOpGLVertexAttrib4fv; functions->fVertexAttribPointer = noOpGLVertexAttribPointer; functions->fViewport = nullGLViewport; diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp index 063de56aeb..8054fd5d1e 100644 --- a/src/gpu/gl/GrGLInterface.cpp +++ b/src/gpu/gl/GrGLInterface.cpp @@ -184,6 +184,11 @@ bool GrGLInterface::validate() const { NULL == fFunctions.fUniformMatrix3fv || NULL == fFunctions.fUniformMatrix4fv || NULL == fFunctions.fUseProgram || +#if 0 + NULL == fFunctions.fVertexAttrib1f || + NULL == fFunctions.fVertexAttrib2fv || + NULL == fFunctions.fVertexAttrib3fv || +#endif NULL == fFunctions.fVertexAttrib4fv || NULL == fFunctions.fVertexAttribPointer || NULL == fFunctions.fViewport || diff --git a/src/gpu/gl/GrGLNoOpInterface.cpp b/src/gpu/gl/GrGLNoOpInterface.cpp index df32d2a7cf..6b8880ed81 100644 --- a/src/gpu/gl/GrGLNoOpInterface.cpp +++ b/src/gpu/gl/GrGLNoOpInterface.cpp @@ -367,6 +367,15 @@ GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix4fv(GrGLint location, const GrGLfloat* value) { } + GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib1f(GrGLuint indx, const GrGLfloat value) { +} + + GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib2fv(GrGLuint indx, const GrGLfloat* values) { +} + + GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib3fv(GrGLuint indx, const GrGLfloat* values) { +} + GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib4fv(GrGLuint indx, const GrGLfloat* values) { } diff --git a/src/gpu/gl/GrGLNoOpInterface.h b/src/gpu/gl/GrGLNoOpInterface.h index 3e146d330b..c7bc9d8cbb 100644 --- a/src/gpu/gl/GrGLNoOpInterface.h +++ b/src/gpu/gl/GrGLNoOpInterface.h @@ -266,6 +266,12 @@ GrGLvoid GR_GL_FUNCTION_TYPE noOpGLUniformMatrix4fv(GrGLint location, GrGLboolean transpose, const GrGLfloat* value); + GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib1f(GrGLuint indx, const GrGLfloat value); + + GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib2fv(GrGLuint indx, const GrGLfloat* values); + + GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib3fv(GrGLuint indx, const GrGLfloat* values); + GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttrib4fv(GrGLuint indx, const GrGLfloat* values); GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribPointer(GrGLuint indx, diff --git a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp index 9e745eadb3..99219d0fd5 100644 --- a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp +++ b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp @@ -182,6 +182,12 @@ static GrGLFuncPtr android_get_gl_proc(void* ctx, const char name[]) { return (GrGLFuncPtr) glUniformMatrix4fv; } else if (0 == strcmp("glUseProgram", name)) { return (GrGLFuncPtr) glUseProgram; + } else if (0 == strcmp("glVertexAttrib1f", name)) { + return (GrGLFuncPtr) glVertexAttrib1f; + } else if (0 == strcmp("glVertexAttrib2fv", name)) { + return (GrGLFuncPtr) glVertexAttrib2fv; + } else if (0 == strcmp("glVertexAttrib3fv", name)) { + return (GrGLFuncPtr) glVertexAttrib3fv; } else if (0 == strcmp("glVertexAttrib4fv", name)) { return (GrGLFuncPtr) glVertexAttrib4fv; } else if (0 == strcmp("glVertexAttribPointer", name)) { diff --git a/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp b/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp index 287a43fad0..f6b497432a 100644 --- a/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp +++ b/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp @@ -948,6 +948,9 @@ const GrGLInterface* GrGLCreateDebugInterface() { functions->fUniformMatrix4fv = noOpGLUniformMatrix4fv; functions->fUnmapBuffer = debugGLUnmapBuffer; functions->fUseProgram = debugGLUseProgram; + functions->fVertexAttrib1f = noOpGLVertexAttrib1f; + functions->fVertexAttrib2fv = noOpGLVertexAttrib2fv; + functions->fVertexAttrib3fv = noOpGLVertexAttrib3fv; functions->fVertexAttrib4fv = noOpGLVertexAttrib4fv; functions->fVertexAttribPointer = noOpGLVertexAttribPointer; functions->fViewport = noOpGLViewport; |