Some changed for non-C99 compilers
authorAlan Hourihane <alanh@tungstengraphics.com>
Fri, 2 May 2008 10:08:03 +0000 (10:08 +0000)
committerAlan Hourihane <alanh@tungstengraphics.com>
Fri, 2 May 2008 10:30:34 +0000 (10:30 +0000)
17 files changed:
src/mesa/state_tracker/st_atom_blend.c [changed mode: 0644->0755]
src/mesa/state_tracker/st_atom_clip.c [changed mode: 0644->0755]
src/mesa/state_tracker/st_atom_constbuf.c [changed mode: 0644->0755]
src/mesa/state_tracker/st_atom_depth.c
src/mesa/state_tracker/st_atom_fixedfunction.c
src/mesa/state_tracker/st_atom_framebuffer.c
src/mesa/state_tracker/st_atom_pixeltransfer.c
src/mesa/state_tracker/st_atom_rasterizer.c
src/mesa/state_tracker/st_atom_sampler.c
src/mesa/state_tracker/st_atom_scissor.c
src/mesa/state_tracker/st_atom_shader.c
src/mesa/state_tracker/st_atom_stipple.c
src/mesa/state_tracker/st_atom_texture.c
src/mesa/state_tracker/st_atom_viewport.c
src/mesa/state_tracker/st_cb_clear.c
src/mesa/state_tracker/st_draw.c
src/mesa/state_tracker/st_extensions.c

old mode 100644 (file)
new mode 100755 (executable)
index 2a0e922..35c09c3
@@ -223,15 +223,10 @@ update_blend( struct st_context *st )
 
 
 const struct st_tracked_state st_update_blend = {
-   .name = "st_update_blend",
-   .dirty = {
-      .mesa = (_NEW_COLOR),  /* XXX _NEW_BLEND someday? */
-      .st  = 0,
+   "st_update_blend",                                  /* name */
+   {                                                   /* dirty */
+      (_NEW_COLOR),  /* XXX _NEW_BLEND someday? */     /* mesa */
+      0,                                               /* st */
    },
-   .update = update_blend
+   update_blend,                                       /* update */
 };
-
-
-
-
-
old mode 100644 (file)
new mode 100755 (executable)
index a6f0568..23d709b
@@ -62,15 +62,10 @@ static void update_clip( struct st_context *st )
 
 
 const struct st_tracked_state st_update_clip = {
-   .name = "st_update_clip",
-   .dirty = {
-      .mesa = (_NEW_TRANSFORM),
-      .st  = 0,
+   "st_update_clip",                                   /* name */
+   {                                                   /* dirty */
+      (_NEW_TRANSFORM),                                        /* mesa */
+      0,                                               /* st */
    },
-   .update = update_clip
+   update_clip                                         /* update */
 };
-
-
-
-
-
old mode 100644 (file)
new mode 100755 (executable)
index 2b659ae..2856e0f
@@ -113,12 +113,12 @@ static void update_vs_constants(struct st_context *st )
 }
 
 const struct st_tracked_state st_update_vs_constants = {
-   .name = "st_update_vs_constants",
-   .dirty = {
-      .mesa  = 0,  /* set dynamically above */
-      .st   = ST_NEW_VERTEX_PROGRAM,
+   "st_update_vs_constants",                           /* name */
+   {                                                   /* dirty */
+      0,  /* set dynamically above */                  /* mesa */
+      ST_NEW_VERTEX_PROGRAM,                           /* st */
    },
-   .update = update_vs_constants
+   update_vs_constants                                 /* update */
 };
 
 /* Fragment shader:
@@ -132,11 +132,11 @@ static void update_fs_constants(struct st_context *st )
 }
 
 const struct st_tracked_state st_update_fs_constants = {
-   .name = "st_update_fs_constants",
-   .dirty = {
-      .mesa  = 0,  /* set dynamically above */
-      .st   = ST_NEW_FRAGMENT_PROGRAM,
+   "st_update_fs_constants",                           /* name */
+   {                                                   /* dirty */
+      0,  /* set dynamically above */                  /* mesa */
+      ST_NEW_FRAGMENT_PROGRAM,                         /* st */
    },
-   .update = update_fs_constants
+   update_fs_constants                                 /* update */
 };
 
index ef467582c00346c469462f6c03f7da9fbdd98085..0e791ceb20873dfec2282c9caee42d29a69a458a 100644 (file)
@@ -142,10 +142,10 @@ update_depth_stencil_alpha(struct st_context *st)
 
 
 const struct st_tracked_state st_update_depth_stencil_alpha = {
-   .name = "st_update_depth_stencil",
-   .dirty = {
-      .mesa = (_NEW_DEPTH|_NEW_STENCIL|_NEW_COLOR),
-      .st  = 0,
+   "st_update_depth_stencil",                          /* name */
+   {                                                   /* dirty */
+      (_NEW_DEPTH|_NEW_STENCIL|_NEW_COLOR),            /* mesa */
+      0,                                               /* st */
    },
-   .update = update_depth_stencil_alpha
+   update_depth_stencil_alpha                          /* update */
 };
index 3f137e163392dbc40764b0cec8fac1d5665c5d69..165567af70c713b92e78b45422222f9e71a39da0 100644 (file)
@@ -55,12 +55,12 @@ static void update_tnl( struct st_context *st )
 
 
 const struct st_tracked_state st_update_tnl = {
-   .name = "st_update_tnl",
-   .dirty = {
-      .mesa  = TNL_FIXED_FUNCTION_STATE_FLAGS,
-      .st   = 0
+   "st_update_tnl",                                    /* name */
+   {                                                   /* dirty */
+      TNL_FIXED_FUNCTION_STATE_FLAGS,                  /* mesa */
+      0                                                        /* st */
    },
-   .update = update_tnl
+   update_tnl                                          /* update */
 };
 
 
index 14eeb58cc1bb58d74ed018b9a8f0b2a9c96b4840..0a6974d8a7fe5f9bb54105bf8db073ea3424b284 100644 (file)
@@ -96,11 +96,11 @@ update_framebuffer_state( struct st_context *st )
 
 
 const struct st_tracked_state st_update_framebuffer = {
-   .name = "st_update_framebuffer",
-   .dirty = {
-      .mesa = _NEW_BUFFERS,
-      .st  = 0,
+   "st_update_framebuffer",                            /* name */
+   {                                                   /* dirty */
+      _NEW_BUFFERS,                                    /* mesa */
+      0,                                               /* st */
    },
-   .update = update_framebuffer_state
+   update_framebuffer_state                            /* update */
 };
 
index 76356bbad76dd1ccde565fa0589cf99f20b20956..999c14844908a10eb6fa052b34a6f30bf2d1c211 100644 (file)
@@ -463,10 +463,10 @@ update_pixel_transfer(struct st_context *st)
 
 
 const struct st_tracked_state st_update_pixel_transfer = {
-   .name = "st_update_pixel_transfer",
-   .dirty = {
-      .mesa = _NEW_PIXEL | _NEW_COLOR_MATRIX,
-      .st  = 0,
+   "st_update_pixel_transfer",                         /* name */
+   {                                                   /* dirty */
+      _NEW_PIXEL | _NEW_COLOR_MATRIX,                  /* mesa */
+      0,                                               /* st */
    },
-   .update = update_pixel_transfer
+   update_pixel_transfer                               /* update */
 };
index bb14cf9045a6bf47d5240b2eed01e88f069804a5..87a91d56d06b07d57d8f75cd8965395b472cb98e 100644 (file)
@@ -267,11 +267,11 @@ static void update_raster_state( struct st_context *st )
 }
 
 const struct st_tracked_state st_update_rasterizer = {
-   .name = "st_update_rasterizer",
-   .dirty = {
-      .mesa = (_NEW_LIGHT | _NEW_POLYGON | _NEW_LINE | _NEW_SCISSOR |
-               _NEW_POINT | _NEW_BUFFERS | _NEW_MULTISAMPLE),
-      .st  = 0,
+   "st_update_rasterizer",                                     /* name */
+   {                                                           /* dirty */
+      (_NEW_LIGHT | _NEW_POLYGON | _NEW_LINE | _NEW_SCISSOR |  /* mesa */
+               _NEW_POINT | _NEW_BUFFERS | _NEW_MULTISAMPLE),  
+      0,                                                       /* st */
    },
-   .update = update_raster_state
+   update_raster_state                                         /* update */
 };
index 0237da3693a055084a5003f8552aa5668a4b951a..7515bb30cc72b1a500081ac3a2cff77014ee0af2 100644 (file)
@@ -185,15 +185,10 @@ update_samplers(struct st_context *st)
 
 
 const struct st_tracked_state st_update_sampler = {
-   .name = "st_update_sampler",
-   .dirty = {
-      .mesa = _NEW_TEXTURE,
-      .st  = 0,
+   "st_update_sampler",                                        /* name */
+   {                                                   /* dirty */
+      _NEW_TEXTURE,                                    /* mesa */
+      0,                                               /* st */
    },
-   .update = update_samplers
+   update_samplers                                     /* update */
 };
-
-
-
-
-
index 59601e91a11f90fa2e77b00a21c0e7e784e52cb9..f5db4924037dc94ef9b7b7ec3572284096aa4806 100644 (file)
@@ -83,15 +83,10 @@ update_scissor( struct st_context *st )
 
 
 const struct st_tracked_state st_update_scissor = {
-   .name = "st_update_scissor",
-   .dirty = {
-      .mesa = (_NEW_SCISSOR | _NEW_BUFFERS),
-      .st  = 0,
+   "st_update_scissor",                                        /* name */
+   {                                                   /* dirty */
+      (_NEW_SCISSOR | _NEW_BUFFERS),                   /* mesa */
+      0,                                               /* st */
    },
-   .update = update_scissor
+   update_scissor                                      /* update */
 };
-
-
-
-
-
index 3f5ec7111287e209f775dc939c459055dbddea73..652500f52a24c3ebedf597537720c36cb08d0928 100644 (file)
@@ -281,10 +281,10 @@ update_linkage( struct st_context *st )
 
 
 const struct st_tracked_state st_update_shader = {
-   .name = "st_update_shader",
-   .dirty = {
-      .mesa  = 0,
-      .st   = ST_NEW_VERTEX_PROGRAM | ST_NEW_FRAGMENT_PROGRAM
+   "st_update_shader",                                 /* name */
+   {                                                   /* dirty */
+      0,                                               /* mesa */
+      ST_NEW_VERTEX_PROGRAM | ST_NEW_FRAGMENT_PROGRAM  /* st */
    },
-   .update = update_linkage
+   update_linkage                                      /* update */
 };
index c91214059a72c554508c8d04c4613e28afb07d9a..f395930ab40343bc2e89f9686bf194300a69ad96 100644 (file)
@@ -54,10 +54,10 @@ update_stipple( struct st_context *st )
 
 
 const struct st_tracked_state st_update_polygon_stipple = {
-   .name = "st_update_polygon_stipple",
-   .dirty = {
-      .mesa = (_NEW_POLYGONSTIPPLE),
-      .st  = 0,
+   "st_update_polygon_stipple",                                /* name */
+   {                                                   /* dirty */
+      (_NEW_POLYGONSTIPPLE),                           /* mesa */
+      0,                                               /* st */
    },
-   .update = update_stipple
+   update_stipple                                      /* update */
 };
index d15da5895ab05512c9b7a9b281c7ad77214bcca7..f42b2f8d662d659e5ead788175c0ce70d1219473 100644 (file)
@@ -111,15 +111,10 @@ update_textures(struct st_context *st)
 
 
 const struct st_tracked_state st_update_texture = {
-   .name = "st_update_texture",
-   .dirty = {
-      .mesa = _NEW_TEXTURE,
-      .st  = ST_NEW_FRAGMENT_PROGRAM,
+   "st_update_texture",                                        /* name */
+   {                                                   /* dirty */
+      _NEW_TEXTURE,                                    /* mesa */
+      ST_NEW_FRAGMENT_PROGRAM,                         /* st */
    },
-   .update = update_textures
+   update_textures                                     /* update */
 };
-
-
-
-
-
index eb3f62cfbeae41ee1d68585574ec092443dcdb8a..4b51521470bf962a2b2b479a83ea72bb3796df5f 100644 (file)
@@ -82,10 +82,10 @@ update_viewport( struct st_context *st )
 
 
 const struct st_tracked_state st_update_viewport = {
-   .name = "st_update_viewport",
-   .dirty = {
-      .mesa = _NEW_BUFFERS | _NEW_VIEWPORT,
-      .st = 0,
+   "st_update_viewport",                               /* name */
+   {                                                   /* dirty */
+      _NEW_BUFFERS | _NEW_VIEWPORT,                    /* mesa */
+      0,                                               /* st */
    },
-   .update = update_viewport
+   update_viewport                                     /* update */
 };
index fe979f10bd561f354fe80167b2e654751c943e23..b7d72046339c3fe4d8e88a880039c620cd6568a0 100644 (file)
@@ -34,8 +34,8 @@
 #include "main/glheader.h"
 #include "main/macros.h"
 #include "shader/prog_instruction.h"
-#include "st_atom.h"
 #include "st_context.h"
+#include "st_atom.h"
 #include "st_cb_accum.h"
 #include "st_cb_clear.h"
 #include "st_cb_fbo.h"
index 0fe4d198bd8929fdeb0a96cb4d9367acdcb23b63..a3bffbfc95bb054fcf2109193ab8e1d0c4855cdb 100644 (file)
@@ -35,8 +35,8 @@
 
 #include "vbo/vbo.h"
 
-#include "st_atom.h"
 #include "st_context.h"
+#include "st_atom.h"
 #include "st_cb_bufferobjects.h"
 #include "st_draw.h"
 #include "st_program.h"
@@ -549,9 +549,10 @@ st_feedback_draw_vbo(GLcontext *ctx,
       unsigned indexSize;
       struct gl_buffer_object *bufobj = ib->obj;
       struct st_buffer_object *stobj = st_buffer_object(bufobj);
-      index_buffer_handle = stobj->buffer;
       void *map;
 
+      index_buffer_handle = stobj->buffer;
+
       switch (ib->type) {
       case GL_UNSIGNED_INT:
          indexSize = 4;
index 260a2efe8863a1b16cbd21322bf016166a86bd2b..6f94ba39aebd14e7d5b9d74ead5561dba52dcf48 100644 (file)
 #include "st_extensions.h"
 
 
-static int min(int a, int b)
+static int _min(int a, int b)
 {
    return (a < b) ? a : b;
 }
 
-static int max(int a, int b)
+static int _max(int a, int b)
 {
    return (a > b) ? a : b;
 }
 
-static int clamp(int a, int min, int max)
+static int _clamp(int a, int min, int max)
 {
    if (a < min)
       return min;
@@ -69,42 +69,42 @@ void st_init_limits(struct st_context *st)
    struct gl_constants *c = &st->ctx->Const;
 
    c->MaxTextureLevels
-      = min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS),
+      = _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS),
             MAX_TEXTURE_LEVELS);
 
    c->Max3DTextureLevels
-      = min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_3D_LEVELS),
+      = _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_3D_LEVELS),
             MAX_3D_TEXTURE_LEVELS);
 
    c->MaxCubeTextureLevels
-      = min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS),
+      = _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS),
             MAX_CUBE_TEXTURE_LEVELS);
 
    c->MaxTextureRectSize
-      = min(1 << (c->MaxTextureLevels - 1), MAX_TEXTURE_RECT_SIZE);
+      = _min(1 << (c->MaxTextureLevels - 1), MAX_TEXTURE_RECT_SIZE);
 
    c->MaxTextureUnits
       = c->MaxTextureImageUnits
       = c->MaxTextureCoordUnits
-      = min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS),
+      = _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS),
             MAX_TEXTURE_IMAGE_UNITS);
 
    c->MaxDrawBuffers
-      = clamp(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
+      = _clamp(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
               1, MAX_DRAW_BUFFERS);
 
    c->MaxLineWidth
-      = max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_LINE_WIDTH));
+      = _max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_LINE_WIDTH));
    c->MaxLineWidthAA
-      = max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_LINE_WIDTH_AA));
+      = _max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_LINE_WIDTH_AA));
 
    c->MaxPointSize
-      = max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_POINT_WIDTH));
+      = _max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_POINT_WIDTH));
    c->MaxPointSizeAA
-      = max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_POINT_WIDTH_AA));
+      = _max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_POINT_WIDTH_AA));
 
    c->MaxTextureMaxAnisotropy
-      = max(2.0, screen->get_paramf(screen, PIPE_CAP_MAX_TEXTURE_ANISOTROPY));
+      = _max(2.0, screen->get_paramf(screen, PIPE_CAP_MAX_TEXTURE_ANISOTROPY));
 
    c->MaxTextureLodBias
       = screen->get_paramf(screen, PIPE_CAP_MAX_TEXTURE_LOD_BIAS);