From b794300e5551c15ab04db52a950ff10318b2f409 Mon Sep 17 00:00:00 2001 From: Zhaowei Yuan Date: Tue, 9 Aug 2016 03:40:09 +0800 Subject: [PATCH] coregl_fastpath: Convert for more parameter types Output paremeters which have types added by this patch should be converted by attaching object type Signed-off-by: Zhaowei Yuan Change-Id: Idd582f5810062b2423e8e81e621d3eecdb5735b6 --- src/modules/fastpath/coregl_fastpath_gl.c | 46 ++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/src/modules/fastpath/coregl_fastpath_gl.c b/src/modules/fastpath/coregl_fastpath_gl.c index b5a2aed..f3d5fee 100644 --- a/src/modules/fastpath/coregl_fastpath_gl.c +++ b/src/modules/fastpath/coregl_fastpath_gl.c @@ -3979,7 +3979,12 @@ _modify_get_value(GLenum pname, GLvoid *ptr, GLenum get_type, GLboolean is64) break; case GL_TEXTURE_BINDING_2D: + case GL_TEXTURE_BINDING_2D_MULTISAMPLE: + case GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES: case GL_TEXTURE_BINDING_CUBE_MAP: + case GL_IMAGE_BINDING_NAME: + case GL_TEXTURE_BINDING_BUFFER_EXT: + case GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT: case GL_ARRAY_BUFFER_BINDING: case GL_ELEMENT_ARRAY_BUFFER_BINDING: case GL_COPY_READ_BUFFER_BINDING: @@ -3988,6 +3993,10 @@ _modify_get_value(GLenum pname, GLvoid *ptr, GLenum get_type, GLboolean is64) case GL_PIXEL_UNPACK_BUFFER_BINDING: case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: case GL_UNIFORM_BUFFER_BINDING: + case GL_DRAW_INDIRECT_BUFFER_BINDING: + case GL_DISPATCH_INDIRECT_BUFFER_BINDING: + case GL_TEXTURE_BUFFER_BINDING: + case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: case GL_DRAW_FRAMEBUFFER_BINDING: case GL_READ_FRAMEBUFFER_BINDING: case GL_RENDERBUFFER_BINDING: @@ -3995,7 +4004,20 @@ _modify_get_value(GLenum pname, GLvoid *ptr, GLenum get_type, GLboolean is64) case GL_VERTEX_ARRAY_BINDING: case GL_SAMPLER_BINDING: case GL_TRANSFORM_FEEDBACK_BINDING: - case GL_PROGRAM_PIPELINE_BINDING: { + case GL_SHADER_STORAGE_BUFFER_BINDING: + case GL_ATOMIC_COUNTER_BUFFER_BINDING: + case GL_PROGRAM_PIPELINE_BINDING: + case GL_VERTEX_BINDING_BUFFER: + case GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT: + case GL_ACTIVE_PROGRAM: + case GL_VERTEX_SHADER: + case GL_FRAGMENT_SHADER: + case GL_COMPUTE_SHADER: + case GL_INFO_LOG_LENGTH: + case GL_VALIDATE_STATUS: + case GL_TESS_CONTROL_SHADER_EXT: + case GL_TESS_EVALUATION_SHADER_EXT: + case GL_GEOMETRY_SHADER_EXT:{ GLint real_obj_id = _COREGL_INT_INIT_VALUE; GLuint glue_obj_id = _COREGL_INT_INIT_VALUE; GL_Object_Type obj_type = GL_OBJECT_TYPE_UNKNOWN; @@ -4003,7 +4025,12 @@ _modify_get_value(GLenum pname, GLvoid *ptr, GLenum get_type, GLboolean is64) switch (pname) { case GL_TEXTURE_BINDING_2D: + case GL_TEXTURE_BINDING_2D_MULTISAMPLE: + case GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES: case GL_TEXTURE_BINDING_CUBE_MAP: + case GL_IMAGE_BINDING_NAME: + case GL_TEXTURE_BINDING_BUFFER_EXT: + case GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT: obj_type = GL_OBJECT_TYPE_TEXTURE; break; case GL_ARRAY_BUFFER_BINDING: @@ -4014,6 +4041,14 @@ _modify_get_value(GLenum pname, GLvoid *ptr, GLenum get_type, GLboolean is64) case GL_PIXEL_UNPACK_BUFFER_BINDING: case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: case GL_UNIFORM_BUFFER_BINDING: + case GL_SHADER_STORAGE_BUFFER_BINDING: + case GL_ATOMIC_COUNTER_BUFFER_BINDING: + case GL_DRAW_INDIRECT_BUFFER_BINDING: + case GL_DISPATCH_INDIRECT_BUFFER_BINDING: + case GL_TEXTURE_BUFFER_BINDING: + case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: + case GL_VERTEX_BINDING_BUFFER: + case GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT: obj_type = GL_OBJECT_TYPE_BUFFER; break; case GL_DRAW_FRAMEBUFFER_BINDING: @@ -4024,6 +4059,15 @@ _modify_get_value(GLenum pname, GLvoid *ptr, GLenum get_type, GLboolean is64) obj_type = GL_OBJECT_TYPE_RENDERBUFFER; break; case GL_CURRENT_PROGRAM: + case GL_ACTIVE_PROGRAM: + case GL_VERTEX_SHADER: + case GL_FRAGMENT_SHADER: + case GL_COMPUTE_SHADER: + case GL_INFO_LOG_LENGTH: + case GL_VALIDATE_STATUS: + case GL_TESS_CONTROL_SHADER_EXT: + case GL_TESS_EVALUATION_SHADER_EXT: + case GL_GEOMETRY_SHADER_EXT: obj_type = GL_OBJECT_TYPE_PROGRAM; break; case GL_VERTEX_ARRAY_BINDING: -- 2.7.4