Re: [PATCH 1/6] drivers/dri/common: A few dri2 functions are not actually DRI2 specific

2013-11-05 Thread Kristian Høgsberg
On Thu, Oct 31, 2013 at 04:13:11PM -0700, Keith Packard wrote:
 This just renames them so that they can be used with the DRI3 extension
 without causing too much confusion.
 
 Signed-off-by: Keith Packard kei...@keithp.com
 ---
  src/mesa/drivers/dri/common/dri_util.c | 50 
 +-
  1 file changed, 25 insertions(+), 25 deletions(-)

Reviewed-by: Kristian Høgsberg k...@bitplanet.net

 diff --git a/src/mesa/drivers/dri/common/dri_util.c 
 b/src/mesa/drivers/dri/common/dri_util.c
 index c28b0fc..539fb4b 100644
 --- a/src/mesa/drivers/dri/common/dri_util.c
 +++ b/src/mesa/drivers/dri/common/dri_util.c
 @@ -291,13 +291,13 @@ validate_context_version(__DRIscreen *screen,
  /*@{*/
  
  static __DRIcontext *
 -dri2CreateContextAttribs(__DRIscreen *screen, int api,
 -  const __DRIconfig *config,
 -  __DRIcontext *shared,
 -  unsigned num_attribs,
 -  const uint32_t *attribs,
 -  unsigned *error,
 -  void *data)
 +driCreateContextAttribs(__DRIscreen *screen, int api,
 +const __DRIconfig *config,
 +__DRIcontext *shared,
 +unsigned num_attribs,
 +const uint32_t *attribs,
 +unsigned *error,
 +void *data)
  {
  __DRIcontext *context;
  const struct gl_config *modes = (config != NULL) ? config-modes : NULL;
 @@ -442,22 +442,22 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api,
  }
  
  static __DRIcontext *
 -dri2CreateNewContextForAPI(__DRIscreen *screen, int api,
 -const __DRIconfig *config,
 -__DRIcontext *shared, void *data)
 +driCreateNewContextForAPI(__DRIscreen *screen, int api,
 +  const __DRIconfig *config,
 +  __DRIcontext *shared, void *data)
  {
  unsigned error;
  
 -return dri2CreateContextAttribs(screen, api, config, shared, 0, NULL,
 - error, data);
 +return driCreateContextAttribs(screen, api, config, shared, 0, NULL,
 +   error, data);
  }
  
  static __DRIcontext *
 -dri2CreateNewContext(__DRIscreen *screen, const __DRIconfig *config,
 -   __DRIcontext *shared, void *data)
 +driCreateNewContext(__DRIscreen *screen, const __DRIconfig *config,
 +__DRIcontext *shared, void *data)
  {
 -return dri2CreateNewContextForAPI(screen, __DRI_API_OPENGL,
 -   config, shared, data);
 +return driCreateNewContextForAPI(screen, __DRI_API_OPENGL,
 + config, shared, data);
  }
  
  /**
 @@ -609,9 +609,9 @@ static void dri_put_drawable(__DRIdrawable *pdp)
  }
  
  static __DRIdrawable *
 -dri2CreateNewDrawable(__DRIscreen *screen,
 -   const __DRIconfig *config,
 -   void *data)
 +driCreateNewDrawable(__DRIscreen *screen,
 + const __DRIconfig *config,
 + void *data)
  {
  __DRIdrawable *pdraw;
  
 @@ -698,7 +698,7 @@ dri2ConfigQueryf(__DRIscreen *screen, const char *var, 
 GLfloat *val)
  }
  
  static unsigned int
 -dri2GetAPIMask(__DRIscreen *screen)
 +driGetAPIMask(__DRIscreen *screen)
  {
  return screen-api_mask;
  }
 @@ -741,13 +741,13 @@ const __DRIdri2Extension driDRI2Extension = {
  .base = { __DRI_DRI2, 4 },
  
  .createNewScreen= dri2CreateNewScreen,
 -.createNewDrawable  = dri2CreateNewDrawable,
 -.createNewContext   = dri2CreateNewContext,
 -.getAPIMask = dri2GetAPIMask,
 -.createNewContextForAPI = dri2CreateNewContextForAPI,
 +.createNewDrawable  = driCreateNewDrawable,
 +.createNewContext   = driCreateNewContext,
 +.getAPIMask = driGetAPIMask,
 +.createNewContextForAPI = driCreateNewContextForAPI,
  .allocateBuffer = dri2AllocateBuffer,
  .releaseBuffer  = dri2ReleaseBuffer,
 -.createContextAttribs   = dri2CreateContextAttribs,
 +.createContextAttribs   = driCreateContextAttribs
  .createNewScreen2   = dri2CreateNewScreen2,
  };
  
 -- 
 1.8.4.2
 
 
 --
 Android is increasing in popularity, but the open development platform that
 developers love is also attractive to malware creators. Download this white
 paper to learn more about secure code signing practices that can help keep
 Android apps secure.
 http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk
 --
 ___
 Dri-devel mailing list
 Dri-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/dri-devel
 ___
 

[PATCH 1/6] drivers/dri/common: A few dri2 functions are not actually DRI2 specific

2013-10-31 Thread Keith Packard
This just renames them so that they can be used with the DRI3 extension
without causing too much confusion.

Signed-off-by: Keith Packard kei...@keithp.com
---
 src/mesa/drivers/dri/common/dri_util.c | 50 +-
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/src/mesa/drivers/dri/common/dri_util.c 
b/src/mesa/drivers/dri/common/dri_util.c
index c28b0fc..539fb4b 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -291,13 +291,13 @@ validate_context_version(__DRIscreen *screen,
 /*@{*/
 
 static __DRIcontext *
-dri2CreateContextAttribs(__DRIscreen *screen, int api,
-const __DRIconfig *config,
-__DRIcontext *shared,
-unsigned num_attribs,
-const uint32_t *attribs,
-unsigned *error,
-void *data)
+driCreateContextAttribs(__DRIscreen *screen, int api,
+const __DRIconfig *config,
+__DRIcontext *shared,
+unsigned num_attribs,
+const uint32_t *attribs,
+unsigned *error,
+void *data)
 {
 __DRIcontext *context;
 const struct gl_config *modes = (config != NULL) ? config-modes : NULL;
@@ -442,22 +442,22 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api,
 }
 
 static __DRIcontext *
-dri2CreateNewContextForAPI(__DRIscreen *screen, int api,
-  const __DRIconfig *config,
-  __DRIcontext *shared, void *data)
+driCreateNewContextForAPI(__DRIscreen *screen, int api,
+  const __DRIconfig *config,
+  __DRIcontext *shared, void *data)
 {
 unsigned error;
 
-return dri2CreateContextAttribs(screen, api, config, shared, 0, NULL,
-   error, data);
+return driCreateContextAttribs(screen, api, config, shared, 0, NULL,
+   error, data);
 }
 
 static __DRIcontext *
-dri2CreateNewContext(__DRIscreen *screen, const __DRIconfig *config,
- __DRIcontext *shared, void *data)
+driCreateNewContext(__DRIscreen *screen, const __DRIconfig *config,
+__DRIcontext *shared, void *data)
 {
-return dri2CreateNewContextForAPI(screen, __DRI_API_OPENGL,
- config, shared, data);
+return driCreateNewContextForAPI(screen, __DRI_API_OPENGL,
+ config, shared, data);
 }
 
 /**
@@ -609,9 +609,9 @@ static void dri_put_drawable(__DRIdrawable *pdp)
 }
 
 static __DRIdrawable *
-dri2CreateNewDrawable(__DRIscreen *screen,
- const __DRIconfig *config,
- void *data)
+driCreateNewDrawable(__DRIscreen *screen,
+ const __DRIconfig *config,
+ void *data)
 {
 __DRIdrawable *pdraw;
 
@@ -698,7 +698,7 @@ dri2ConfigQueryf(__DRIscreen *screen, const char *var, 
GLfloat *val)
 }
 
 static unsigned int
-dri2GetAPIMask(__DRIscreen *screen)
+driGetAPIMask(__DRIscreen *screen)
 {
 return screen-api_mask;
 }
@@ -741,13 +741,13 @@ const __DRIdri2Extension driDRI2Extension = {
 .base = { __DRI_DRI2, 4 },
 
 .createNewScreen= dri2CreateNewScreen,
-.createNewDrawable  = dri2CreateNewDrawable,
-.createNewContext   = dri2CreateNewContext,
-.getAPIMask = dri2GetAPIMask,
-.createNewContextForAPI = dri2CreateNewContextForAPI,
+.createNewDrawable  = driCreateNewDrawable,
+.createNewContext   = driCreateNewContext,
+.getAPIMask = driGetAPIMask,
+.createNewContextForAPI = driCreateNewContextForAPI,
 .allocateBuffer = dri2AllocateBuffer,
 .releaseBuffer  = dri2ReleaseBuffer,
-.createContextAttribs   = dri2CreateContextAttribs,
+.createContextAttribs   = driCreateContextAttribs
 .createNewScreen2   = dri2CreateNewScreen2,
 };
 
-- 
1.8.4.2


--
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel