From d6eef6416f460a88b0491b9af4531c7ba2c786f3 Mon Sep 17 00:00:00 2001 From: Zhaowei Yuan Date: Tue, 9 Aug 2016 03:09:02 +0800 Subject: [PATCH] coregl_fastpath: Remove support for unnecessary interface This patch removes some interfaces which are not supposed to go through fast path Signed-off-by: Zhaowei Yuan Change-Id: If7865ad9aee404ebaaaf7dc04e92d3f7123cf017 --- src/modules/fastpath/coregl_fastpath.c | 20 +- src/modules/fastpath/coregl_fastpath_gl.c | 326 ------------------------------ 2 files changed, 2 insertions(+), 344 deletions(-) diff --git a/src/modules/fastpath/coregl_fastpath.c b/src/modules/fastpath/coregl_fastpath.c index d7283a0..8294945 100644 --- a/src/modules/fastpath/coregl_fastpath.c +++ b/src/modules/fastpath/coregl_fastpath.c @@ -361,7 +361,6 @@ fastpath_apply_overrides_gl(int enable) if (driver_gl_version >= COREGL_GLAPI_1) { COREGL_OVERRIDE(fastpath_, glClientActiveTexture); COREGL_OVERRIDE(fastpath_, glSampleCoveragex); - COREGL_OVERRIDE(fastpath_, glVertexPointer); } COREGL_OVERRIDE(fastpath_, glGetError); @@ -369,7 +368,6 @@ fastpath_apply_overrides_gl(int enable) COREGL_OVERRIDE(fastpath_, glGetIntegerv); COREGL_OVERRIDE(fastpath_, glGetFloatv); - COREGL_OVERRIDE(fastpath_, glGetBooleanv); COREGL_OVERRIDE(fastpath_, glActiveTexture); COREGL_OVERRIDE(fastpath_, glGenTextures); @@ -495,16 +493,10 @@ fastpath_apply_overrides_gl(int enable) COREGL_OVERRIDE(fastpath_, glBindFramebufferOES); COREGL_OVERRIDE(fastpath_, glBindRenderbufferOES); - COREGL_OVERRIDE(fastpath_, glClearBufferfi); - COREGL_OVERRIDE(fastpath_, glClearBufferfv); - COREGL_OVERRIDE(fastpath_, glClearBufferiv); - COREGL_OVERRIDE(fastpath_, glClearBufferuiv); COREGL_OVERRIDE(fastpath_, glDeleteFramebuffersOES); COREGL_OVERRIDE(fastpath_, glDeleteRenderbuffersOES); COREGL_OVERRIDE(fastpath_, glDepthRangefOES); COREGL_OVERRIDE(fastpath_, glDepthRangexOES); - COREGL_OVERRIDE(fastpath_, glFramebufferParameteri); - COREGL_OVERRIDE(fastpath_, glGetFramebufferParameteriv); COREGL_OVERRIDE(fastpath_, glFramebufferRenderbufferOES); COREGL_OVERRIDE(fastpath_, glFramebufferTexture2DOES); COREGL_OVERRIDE(fastpath_, glGenFramebuffersOES); @@ -532,8 +524,8 @@ fastpath_apply_overrides_gl(int enable) COREGL_OVERRIDE(fastpath_, glDeleteVertexArraysOES); COREGL_OVERRIDE(fastpath_, glGenVertexArraysOES); COREGL_OVERRIDE(fastpath_, glIsVertexArrayOES); - COREGL_OVERRIDE(fastpath_, glClearDepthfOES ); - COREGL_OVERRIDE(fastpath_, glClearDepthxOES ); + COREGL_OVERRIDE(fastpath_, glClearDepthfOES); + COREGL_OVERRIDE(fastpath_, glClearDepthxOES); /* Start overriding GLES 3.0 */ if (driver_gl_version >= COREGL_GLAPI_3) { COREGL_OVERRIDE(fastpath_, glReadBuffer); @@ -648,18 +640,10 @@ fastpath_apply_overrides_gl(int enable) COREGL_OVERRIDE(fastpath_, glProgramUniformMatrix4x3fv); COREGL_OVERRIDE(fastpath_, glBindImageTexture); COREGL_OVERRIDE(fastpath_, glGetBooleani_v); - COREGL_OVERRIDE(fastpath_, glMemoryBarrier); - COREGL_OVERRIDE(fastpath_, glMemoryBarrierByRegion); - COREGL_OVERRIDE(fastpath_, glTexStorage2DMultisample); COREGL_OVERRIDE(fastpath_, glGetMultisamplefv); - COREGL_OVERRIDE(fastpath_, glSampleMaski); COREGL_OVERRIDE(fastpath_, glGetTexLevelParameteriv); COREGL_OVERRIDE(fastpath_, glGetTexLevelParameterfv); COREGL_OVERRIDE(fastpath_, glBindVertexBuffer); - COREGL_OVERRIDE(fastpath_, glVertexAttribFormat); - COREGL_OVERRIDE(fastpath_, glVertexAttribIFormat); - COREGL_OVERRIDE(fastpath_, glVertexAttribBinding); - COREGL_OVERRIDE(fastpath_, glVertexBindingDivisor); } if(driver_gl_version >= COREGL_GLAPI_32) { diff --git a/src/modules/fastpath/coregl_fastpath_gl.c b/src/modules/fastpath/coregl_fastpath_gl.c index 313bfea..9b85cda 100644 --- a/src/modules/fastpath/coregl_fastpath_gl.c +++ b/src/modules/fastpath/coregl_fastpath_gl.c @@ -394,21 +394,6 @@ finish: _COREGL_FASTPATH_FUNC_END(); } -void -fastpath_glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - _orig_fastpath_glVertexPointer(size, type, stride, pointer); - - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} - GLenum fastpath_glGetError(void) { @@ -4068,22 +4053,6 @@ finish: } void -fastpath_glGetBooleanv(GLenum pname, GLboolean *params) -{ - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - IF_GL_SUCCESS(_orig_fastpath_glGetBooleanv(pname, params)) { - _modify_get_value(pname, params, GL_BOOL, GL_FALSE); - } - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} - -void fastpath_glGetFloatv(GLenum pname, GLfloat *params) { DEFINE_FASTPAH_GL_FUNC(); @@ -7072,54 +7041,6 @@ finish: } void -fastpath_glMemoryBarrier (GLbitfield barriers) -{ - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - _orig_fastpath_glMemoryBarrier(barriers); - - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} - -void -fastpath_glMemoryBarrierByRegion (GLbitfield barriers) -{ - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - _orig_fastpath_glMemoryBarrierByRegion(barriers); - - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} - -void -fastpath_glTexStorage2DMultisample (GLenum target, GLsizei samples, - GLenum internalformat, GLsizei width, GLsizei height, - GLboolean fixedsamplelocations) -{ - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - _orig_fastpath_glTexStorage2DMultisample (target, samples, internalformat, - width, height, fixedsamplelocations); - - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} - -void fastpath_glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val) { DEFINE_FASTPAH_GL_FUNC(); @@ -7135,21 +7056,6 @@ finish: } void -fastpath_glSampleMaski (GLuint maskNumber, GLbitfield mask) -{ - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - _orig_fastpath_glSampleMaski(maskNumber, mask); - - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} - -void fastpath_glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params) { @@ -7198,68 +7104,6 @@ finish: } void -fastpath_glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, - GLboolean normalized, GLuint relativeoffset) -{ - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - _orig_fastpath_glVertexAttribFormat (attribindex, size, type, normalized, - relativeoffset); - - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} - -void -fastpath_glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, - GLuint relativeoffset) -{ - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - _orig_fastpath_glVertexAttribIFormat (attribindex, size, type, relativeoffset); - - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} - -void -fastpath_glVertexAttribBinding (GLuint attribindex, GLuint bindingindex) -{ - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - _orig_fastpath_glVertexAttribBinding (attribindex, bindingindex); - - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} - -void -fastpath_glVertexBindingDivisor(GLuint bindingindex, GLuint divisor) -{ - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - _orig_fastpath_glVertexBindingDivisor (bindingindex, divisor); - - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} -void fastpath_glBindFramebufferOES(GLenum target, GLuint framebuffer) { GLuint real_obj; @@ -7372,92 +7216,6 @@ finish: _COREGL_FASTPATH_FUNC_END(); } - -void -fastpath_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, - GLint stencil) -{ - GLuint real_obj; - - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) { - goto finish; - } - - _orig_fastpath_glClearBufferfi(real_obj, drawbuffer, depth, stencil); - - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} - -void -fastpath_glClearBufferfv(GLenum buffer, GLint drawbuffer, GLfloat const *value) -{ - GLuint real_obj; - - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) { - goto finish; - } - - _orig_fastpath_glClearBufferfv(buffer, drawbuffer, value); - - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} - -void -fastpath_glClearBufferiv(GLenum buffer, GLint drawbuffer, GLint const *value) -{ - GLuint real_obj; - - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) { - goto finish; - } - - _orig_fastpath_glClearBufferiv(buffer, drawbuffer, value); - - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} - -void -fastpath_glClearBufferuiv(GLenum buffer, GLint drawbuffer, GLuint const *value) -{ - GLuint real_obj; - - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - if (GET_REAL_OBJ(GL_OBJECT_TYPE_BUFFER, buffer, &real_obj) != 1) { - goto finish; - } - - _orig_fastpath_glClearBufferuiv(buffer, drawbuffer, value); - - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} - void fastpath_glDeleteFramebuffersOES(GLsizei n, const GLuint *framebuffers) { @@ -7641,90 +7399,6 @@ finish: } void -fastpath_glFramebufferParameteri(GLenum target, GLenum pname, GLint param) -{ - GLint real_obj = 0, fa_type = 0; - - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - switch (pname) { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: - param = 0; - _orig_fastpath_glFramebufferParameteri(target, pname, real_obj); - _orig_fastpath_glFramebufferParameteri(target, - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, fa_type); - switch (fa_type) { - case GL_TEXTURE: - if (GET_GLUE_OBJ(GL_OBJECT_TYPE_TEXTURE, real_obj, (GLuint *)¶m) != 1) { - param = 0; - goto finish; - } - break; - case GL_RENDERBUFFER: - if (GET_GLUE_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, real_obj, - (GLuint *)¶m) != 1) { - param = 0; - goto finish; - } - break; - } - break; - default: - _orig_fastpath_glFramebufferParameteri(target, pname, param); - break; - } - - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} - -void -fastpath_glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params) -{ - GLint real_obj = 0, fa_type = 0;; - - DEFINE_FASTPAH_GL_FUNC(); - _COREGL_FASTPATH_FUNC_BEGIN(); - INIT_FASTPATH_GL_FUNC(); - - switch (pname) { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: - params[0] = 0; - _orig_fastpath_glGetFramebufferParameteriv(target, pname, &real_obj); - _orig_fastpath_glGetFramebufferParameteriv(target, - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &fa_type); - switch (fa_type) { - case GL_TEXTURE: - if (GET_GLUE_OBJ(GL_OBJECT_TYPE_TEXTURE, real_obj, (GLuint *)params) != 1) { - params[0] = 0; - goto finish; - } - break; - case GL_RENDERBUFFER: - if (GET_GLUE_OBJ(GL_OBJECT_TYPE_RENDERBUFFER, real_obj, - (GLuint *)params) != 1) { - params[0] = 0; - goto finish; - } - break; - } - break; - default: - _orig_fastpath_glGetFramebufferParameteriv(target, pname, params); - break; - } - - goto finish; - -finish: - _COREGL_FASTPATH_FUNC_END(); -} - -void fastpath_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { -- 2.7.4