[Glamor] [PATCH] modify for glx

Zhigang Gong zhigang.gong at linux.intel.com
Mon Feb 4 01:33:14 PST 2013


Where is the other patches? You may submit a complete patchset and send a
cover letter to explain
how to use them. I know it is not functional ok currently. But you can still
submit them here and let the
people who want to make glamor work with latest xorg server to reach where
you are easily. And let's
reduce duplicate effort as much as possible.

And, again, thanks for the contribution.

> -----Original Message-----
> From:
> glamor-bounces+zhigang.gong=linux.intel.com at lists.freedesktop.org
> [mailto:glamor-bounces+zhigang.gong=linux.intel.com at lists.freedesktop.o
> rg] On Behalf Of junyan.he at linux.intel.com
> Sent: Friday, February 01, 2013 9:29 AM
> To: glamor at lists.freedesktop.org
> Cc: Junyan He
> Subject: [Glamor] [PATCH] modify for glx
> 
> From: Junyan He <junyan.he at linux.intel.com>
> 
> ---
>  glx/glapi.c             |   38
> ++++++++++++++++++++++++++++++++------
>  glx/glxdri2.c           |    2 ++
>  glx/glxserver.h         |    4 ++--
>  glx/indirect_dispatch.h |    4 ++--
>  4 files changed, 38 insertions(+), 10 deletions(-)
> 
> diff --git a/glx/glapi.c b/glx/glapi.c
> index 02e06ac..e2fb333 100644
> --- a/glx/glapi.c
> +++ b/glx/glapi.c
> @@ -456,15 +456,41 @@ _glapi_add_dispatch(const char *const
> *function_names,
>      return offset;
>  }
> 
> -/*
> - * glXGetProcAddress doesn't exist in the protocol, the drivers never
call
> - * this themselves, and neither does the server.  warn if it happens
> though.
> - */
>  PUBLIC _glapi_proc
>  _glapi_get_proc_address(const char *funcName)  {
> -    ErrorF("_glapi_get_proc_address called!\n");
> -    return NULL;
> +    const char * func_name;
> +    _glapi_proc proc;
> +    GLint offset;
> +    int i;
> +
> +    DebugF("glx's _glapi_get_proc_address called!\n");
> +
> +    if (funcName[0] != 'g' || funcName[1] != 'l')
> +	return NULL;
> +
> +    offset = get_static_proc_offset(funcName);
> +
> +    if(offset < 0) {
> +	for (i = 0; i < NumExtEntryPoints; i++) {
> +	    if (strcmp(ExtEntryTable[i].name, funcName) == 0) {
> +		offset = ExtEntryTable[i].dispatch_offset;
> +		break;
> +	    }
> +	}
> +
> +	if(offset < 0) {
> +	    DebugF("Can not find the entry for func: %s\n", funcName);
> +	    return NULL;
> +	}
> +    }
> +
> +    proc = GET_by_offset(GET_DISPATCH(), offset);
> +
> +    DebugF("Find function %s address, offset is %d, address: %p",
> +	   funcName, offset, proc);
> +
> +    return proc;
>  }
> 
>  /**
> diff --git a/glx/glxdri2.c b/glx/glxdri2.c index bce1bfa..e34c851 100644
> --- a/glx/glxdri2.c
> +++ b/glx/glxdri2.c
> @@ -544,6 +544,8 @@ create_driver_context(__GLXDRIcontext *
> context,
>                  ctx_attribs[num_ctx_attribs++] = reset;
>              }
>  #endif
> +        } else {
> +            api = __DRI_API_OPENGL;
>          }
> 
>          context->driContext =
> --
> 1.7.10.4
> 
> _______________________________________________
> Glamor mailing list
> Glamor at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/glamor



More information about the Glamor mailing list