st/dri: Add dri2 prefix for all dri2.c functions
authorJakob Bornecrantz <wallbraker@gmail.com>
Thu, 25 Mar 2010 16:54:41 +0000 (17:54 +0100)
committerJakob Bornecrantz <wallbraker@gmail.com>
Thu, 25 Mar 2010 16:55:59 +0000 (17:55 +0100)
src/gallium/state_trackers/dri/dri2.c
src/gallium/state_trackers/dri/dri2.h
src/gallium/state_trackers/dri/dri_screen.c
src/gallium/state_trackers/dri/dri_st_api.c

index 2c6a0621ae7a05bf62c1a96e38ee5b0144716b4a..108b18e9d3cdfa1ff46844161f5bd7039864d409 100644 (file)
@@ -107,8 +107,8 @@ static const __DRItexBufferExtension dri2TexBufferExtension = {
  * Get the format of an attachment.
  */
 static INLINE enum pipe_format
-dri_drawable_get_format(struct dri_drawable *drawable,
-                        enum st_attachment_type statt)
+dri2_drawable_get_format(struct dri_drawable *drawable,
+                         enum st_attachment_type statt)
 {
    enum pipe_format format;
 
@@ -134,9 +134,9 @@ dri_drawable_get_format(struct dri_drawable *drawable,
  * Retrieve __DRIbuffer from the DRI loader.
  */
 static __DRIbuffer *
-dri_drawable_get_buffers(struct dri_drawable *drawable,
-                         const enum st_attachment_type *statts,
-                         unsigned *count)
+dri2_drawable_get_buffers(struct dri_drawable *drawable,
+                          const enum st_attachment_type *statts,
+                          unsigned *count)
 {
    __DRIdrawable *dri_drawable = drawable->dPriv;
    struct __DRIdri2LoaderExtensionRec *loader = drawable->sPriv->dri2.loader;
@@ -159,7 +159,7 @@ dri_drawable_get_buffers(struct dri_drawable *drawable,
       enum pipe_format format;
       int att, bpp;
 
-      format = dri_drawable_get_format(drawable, statts[i]);
+      format = dri2_drawable_get_format(drawable, statts[i]);
       if (format == PIPE_FORMAT_NONE)
          continue;
 
@@ -238,8 +238,8 @@ dri_drawable_get_buffers(struct dri_drawable *drawable,
  * Process __DRIbuffer and convert them into pipe_textures.
  */
 static void
-dri_drawable_process_buffers(struct dri_drawable *drawable,
-                             __DRIbuffer *buffers, unsigned count)
+dri2_drawable_process_buffers(struct dri_drawable *drawable,
+                              __DRIbuffer *buffers, unsigned count)
 {
    struct dri_screen *screen = dri_screen(drawable->sPriv);
    __DRIdrawable *dri_drawable = drawable->dPriv;
@@ -302,7 +302,7 @@ dri_drawable_process_buffers(struct dri_drawable *drawable,
          break;
       }
 
-      format = dri_drawable_get_format(drawable, statt);
+      format = dri2_drawable_get_format(drawable, statt);
       if (statt == ST_ATTACHMENT_INVALID || format == PIPE_FORMAT_NONE)
          continue;
 
@@ -326,20 +326,20 @@ dri_drawable_process_buffers(struct dri_drawable *drawable,
  */
 
 void
-dri_allocate_textures(struct dri_drawable *drawable,
-                      const enum st_attachment_type *statts,
-                      unsigned count)
+dri2_allocate_textures(struct dri_drawable *drawable,
+                       const enum st_attachment_type *statts,
+                       unsigned count)
 {
    __DRIbuffer *buffers;
    unsigned num_buffers = count;
 
-   buffers = dri_drawable_get_buffers(drawable, statts, &num_buffers);
-   dri_drawable_process_buffers(drawable, buffers, num_buffers);
+   buffers = dri2_drawable_get_buffers(drawable, statts, &num_buffers);
+   dri2_drawable_process_buffers(drawable, buffers, num_buffers);
 }
 
 void
-dri_flush_frontbuffer(struct dri_drawable *drawable,
-                      enum st_attachment_type statt)
+dri2_flush_frontbuffer(struct dri_drawable *drawable,
+                       enum st_attachment_type statt)
 {
    __DRIdrawable *dri_drawable = drawable->dPriv;
    struct __DRIdri2LoaderExtensionRec *loader = drawable->sPriv->dri2.loader;
@@ -373,7 +373,7 @@ static const __DRIextension *dri_screen_extensions[] = {
  * Returns the __GLcontextModes supported by this driver.
  */
 const __DRIconfig **
-dri_init_screen2(__DRIscreen * sPriv)
+dri2_init_screen(__DRIscreen * sPriv)
 {
    struct dri_screen *screen;
    struct drm_create_screen_arg arg;
index e1afcf8ca8dbe5f275fc1f45642abc352e4105b6..379963431fb84dc2ce436471440e6114c27c0bdd 100644 (file)
 #include "dri_wrapper.h"
 
 const __DRIconfig **
-dri_init_screen2(__DRIscreen * sPriv);
+dri2_init_screen(__DRIscreen * sPriv);
 
 void
-dri_flush_frontbuffer(struct dri_drawable *drawable,
+dri2_flush_frontbuffer(struct dri_drawable *drawable,
                        enum st_attachment_type statt);
 
 void
-dri_allocate_textures(struct dri_drawable *drawable,
-                      const enum st_attachment_type *statts,
-                      unsigned count);
+dri2_allocate_textures(struct dri_drawable *drawable,
+                       const enum st_attachment_type *statts,
+                       unsigned count);
 
 #endif /* DRI2_H */
index ae311641042bdc884ed369d88c0992512a25a58b..3029d3378781b499cdc06d702bcdf57f6fb0b936 100644 (file)
@@ -328,7 +328,7 @@ const struct __DriverAPIRec driDriverAPI = {
    .GetSwapInfo = dri_get_swap_info,
    .GetDrawableMSC = driDrawableGetMSC32,
    .WaitForMSC = driWaitForMSC32,
-   .InitScreen2 = dri_init_screen2,
+   .InitScreen2 = dri2_init_screen,
 
    .InitScreen = dri1_init_screen,
    .SwapBuffers = dri1_swap_buffers,
index 2b98c487c84a549999fea634d7d0ca0b082758ef..31d2c582aa0fdef96de5c9425a0b1d97db238b7d 100644 (file)
@@ -73,7 +73,7 @@ dri_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
          dri1_allocate_textures(drawable, statt_mask);
       }
       else {
-         dri_allocate_textures(drawable, statts, count);
+         dri2_allocate_textures(drawable, statts, count);
       }
 #else
       if (new_stamp)
@@ -115,7 +115,7 @@ dri_st_framebuffer_flush_front(struct st_framebuffer_iface *stfbi,
       dri1_flush_frontbuffer(drawable, statt);
    }
    else {
-      dri_flush_frontbuffer(drawable, statt);
+      dri2_flush_frontbuffer(drawable, statt);
    }
 #else
    drisw_flush_frontbuffer(drawable, statt);