[Mesa-dev] [PATCH] gallium: implement WGL_ARB_create_context

Jose Fonseca jfonseca at vmware.com
Wed Oct 19 14:51:17 PDT 2011


----- Original Message -----
> ---
>  src/gallium/state_trackers/wgl/SConscript          |    1 +
>  src/gallium/state_trackers/wgl/stw_context.c       |   39
>  ++++++++++++++++++--
>  .../state_trackers/wgl/stw_getprocaddress.c        |    3 ++
>  src/gallium/state_trackers/wgl/stw_icd.h           |    8 ++++
>  4 files changed, 48 insertions(+), 3 deletions(-)
> 
> diff --git a/src/gallium/state_trackers/wgl/SConscript
> b/src/gallium/state_trackers/wgl/SConscript
> index 7cb953b..1014b45 100644
> --- a/src/gallium/state_trackers/wgl/SConscript
> +++ b/src/gallium/state_trackers/wgl/SConscript
> @@ -22,6 +22,7 @@ if not env['gles']:
>  sources = [
>      'stw_context.c',
>      'stw_device.c',
> +    'stw_ext_context.c',

The file "stw_ext_context.c" was not included in the patch. Please add it and resend.

>      'stw_ext_extensionsstring.c',
>      'stw_ext_gallium.c',
>      'stw_ext_pbuffer.c',
> diff --git a/src/gallium/state_trackers/wgl/stw_context.c
> b/src/gallium/state_trackers/wgl/stw_context.c
> index c2839fe..875d713 100644
> --- a/src/gallium/state_trackers/wgl/stw_context.c
> +++ b/src/gallium/state_trackers/wgl/stw_context.c
> @@ -27,6 +27,11 @@
> 
>  #include <windows.h>
> 
> +#define WGL_WGLEXT_PROTOTYPES
> +
> +#include <GL/gl.h>
> +#include <GL/wglext.h>
> +
>  #include "pipe/p_compiler.h"
>  #include "pipe/p_context.h"
>  #include "pipe/p_state.h"
> @@ -121,11 +126,23 @@ DrvCreateLayerContext(
>     HDC hdc,
>     INT iLayerPlane )
>  {
> +   return DrvCreateContextAttribs(hdc, iLayerPlane, 0, 1, 0, 0,
> WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB);
> +}
> +
> +DHGLRC APIENTRY
> +DrvCreateContextAttribs(
> +   HDC hdc,
> +   INT iLayerPlane,
> +   DHGLRC hShareContext,
> +   int majorVersion, int minorVersion,
> +   int contextFlags, int profileMask)
> +{

The Drv* prefix is for entrypoints that are part of the ICD. But don't think that a "DrvCreateContextAttribs" has been defined by Microsoft as part of the ICD.

If so, please use a different funtion name, e.g., stw_create_context_attribs, and declare in it stw_context.h, instead of stw_icd.h 


Jose


More information about the mesa-dev mailing list