rename a few structs (use _state suffix consistantly), reorder/sort fields in some...
authorBrian <brian.paul@tungstengraphics.com>
Mon, 2 Jul 2007 21:32:12 +0000 (15:32 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Mon, 2 Jul 2007 21:32:12 +0000 (15:32 -0600)
src/mesa/pipe/p_context.h
src/mesa/pipe/p_state.h
src/mesa/pipe/softpipe/sp_context.c
src/mesa/pipe/softpipe/sp_context.h
src/mesa/pipe/softpipe/sp_state.h
src/mesa/pipe/softpipe/sp_state_clip.c
src/mesa/pipe/softpipe/sp_state_setup.c
src/mesa/state_tracker/st_atom_scissor.c
src/mesa/state_tracker/st_atom_viewport.c
src/mesa/state_tracker/st_context.h

index 93dbbe6ab77586c15e9612d583283b8ce7c0c1d9..b87c42844c486b72024e459fc14465007b613561 100644 (file)
@@ -87,8 +87,8 @@ struct pipe_context {
    void (*set_setup_state)( struct pipe_context *,
                            const struct pipe_setup_state * );
 
-   void (*set_scissor_rect)( struct pipe_context *,
-                            const struct pipe_scissor_rect * );
+   void (*set_scissor_state)( struct pipe_context *,
+                              const struct pipe_scissor_state * );
 
    void (*set_stencil_state)( struct pipe_context *,
                               const struct pipe_stencil_state * );
@@ -101,8 +101,8 @@ struct pipe_context {
                               GLuint unit,
                               struct pipe_texture_object * );
 
-   void (*set_viewport)( struct pipe_context *,
-                        const struct pipe_viewport * );
+   void (*set_viewport_state)( struct pipe_context *,
+                               const struct pipe_viewport_state * );
 };
 
 
index 66a53483a305ab9104006d1dfb13082c7f8af97b..7f9a6d12de77c1f014ebee7bcc271c9ac49a89ed 100644 (file)
@@ -100,12 +100,12 @@ struct pipe_poly_stipple {
 };
 
 
-struct pipe_viewport {
+struct pipe_viewport_state {
    GLfloat scale[4];
    GLfloat translate[4];
 };
 
-struct pipe_scissor_rect {
+struct pipe_scissor_state {
    GLshort minx;
    GLshort miny;
    GLshort maxx;
index 7a0aad0973db1763b8c13f694bfdb6a86d06b54f..5bd652f3a3c8d1eeff206b5acd99c61b37cdf8a6 100644 (file)
@@ -70,9 +70,9 @@ struct pipe_context *softpipe_create( void )
    softpipe->pipe.set_clip_state = softpipe_set_clip_state;
    softpipe->pipe.set_clear_color_state = softpipe_set_clear_color_state;
    softpipe->pipe.set_depth_state = softpipe_set_depth_test_state;
-   softpipe->pipe.set_viewport = softpipe_set_viewport;
+   softpipe->pipe.set_viewport_state = softpipe_set_viewport_state;
    softpipe->pipe.set_setup_state = softpipe_set_setup_state;
-   softpipe->pipe.set_scissor_rect = softpipe_set_scissor_rect;
+   softpipe->pipe.set_scissor_state = softpipe_set_scissor_state;
    softpipe->pipe.set_fs_state = softpipe_set_fs_state;
    softpipe->pipe.set_polygon_stipple = softpipe_set_polygon_stipple;
    softpipe->pipe.set_sampler_state = softpipe_set_sampler_state;
index 7ba78b8090e602051de02aa0629b48e44479898a..a8c952591ed9a3859bff9dc0b18dc0c0ff21d073 100644 (file)
@@ -74,19 +74,19 @@ struct softpipe_context {
 
    /* The most recent drawing state as set by the driver:
     */
-   struct pipe_framebuffer_state framebuffer;
-   struct pipe_viewport     viewport;
-   struct pipe_setup_state  setup;
-   struct pipe_fs_state     fs;
-   struct pipe_blend_state  blend;
    struct pipe_alpha_test_state alpha_test;
-   struct pipe_clip_state   clip;
-   struct pipe_clear_color_state   clear_color;
+   struct pipe_blend_state blend;
+   struct pipe_clear_color_state clear_color;
+   struct pipe_clip_state clip;
    struct pipe_depth_state depth_test;
-   struct pipe_scissor_rect scissor;
+   struct pipe_framebuffer_state framebuffer;
+   struct pipe_fs_state fs;
    struct pipe_poly_stipple poly_stipple;
+   struct pipe_scissor_state scissor;
    struct pipe_sampler_state sampler[PIPE_MAX_SAMPLERS];
+   struct pipe_setup_state setup;
    struct pipe_texture_object *texture[PIPE_MAX_SAMPLERS];
+   struct pipe_viewport_state viewport;
    GLuint dirty;
 
    /* Clip derived state:
index 4086c16bcc91852fefdca01c639cbc84b181cc12..60c24885e442cf979531cf536bc0e132efd28637 100644 (file)
@@ -53,8 +53,8 @@ void softpipe_set_clip_state( struct pipe_context *,
 void softpipe_set_depth_test_state( struct pipe_context *,
                                     const struct pipe_depth_state * );
 
-void softpipe_set_viewport( struct pipe_context *,
-                          const struct pipe_viewport * );
+void softpipe_set_viewport_state( struct pipe_context *,
+                                  const struct pipe_viewport_state * );
 
 void softpipe_set_setup_state( struct pipe_context *,
                              const struct pipe_setup_state * );
@@ -67,8 +67,8 @@ void softpipe_set_texture_state( struct pipe_context *,
                                  GLuint unit,
                                  struct pipe_texture_object * );
 
-void softpipe_set_scissor_rect( struct pipe_context *,
-                              const struct pipe_scissor_rect * );
+void softpipe_set_scissor_state( struct pipe_context *,
+                                 const struct pipe_scissor_state * );
 
 void softpipe_set_fs_state( struct pipe_context *,
                           const struct pipe_fs_state * );
index 4b83f2b07ef20fc9214bd7798805a291adb94fff..c907550019cddbd949a31643d7e3864194e4c118 100644 (file)
@@ -51,8 +51,8 @@ void softpipe_set_clip_state( struct pipe_context *pipe,
 /* Called when driver state tracker notices changes to the viewport
  * matrix:
  */
-void softpipe_set_viewport( struct pipe_context *pipe,
-                          const struct pipe_viewport *viewport )
+void softpipe_set_viewport_state( struct pipe_context *pipe,
+                                  const struct pipe_viewport_state *viewport )
 {
    struct softpipe_context *softpipe = softpipe_context(pipe);
 
index a249ceb992ca05eeea4be3a7078e8b19f65acce1..55803aeac5e64c54989581119948c142be39f373 100644 (file)
@@ -103,8 +103,8 @@ void softpipe_set_setup_state( struct pipe_context *pipe,
 
 
 
-void softpipe_set_scissor_rect( struct pipe_context *pipe,
-                              const struct pipe_scissor_rect *scissor )
+void softpipe_set_scissor_state( struct pipe_context *pipe,
+                                 const struct pipe_scissor_state *scissor )
 {
    struct softpipe_context *softpipe = softpipe_context(pipe);
 
index 75bead388f38435af6bf7310bfcd74f684f7ee6b..05a9f3eed1804423674ac76ef51b0418bc78fb20 100644 (file)
@@ -42,7 +42,7 @@
 static void
 update_scissor( struct st_context *st )
 {
-   struct pipe_scissor_rect scissor;
+   struct pipe_scissor_state scissor;
    const struct gl_framebuffer *fb = st->ctx->DrawBuffer;
 
    scissor.minx = 0;
@@ -69,7 +69,7 @@ update_scissor( struct st_context *st )
    if (memcmp(&scissor, &st->state.scissor, sizeof(scissor)) != 0) {
       /* state has changed */
       st->state.scissor = scissor;  /* struct copy */
-      st->pipe->set_scissor_rect(st->pipe, &scissor); /* activate */
+      st->pipe->set_scissor_state(st->pipe, &scissor); /* activate */
    }
 }
 
index 765bcf3647e659838c9a6b025870c3fa0daf8756..ac91f628aab5f6095bfa45cd2c8a572c7a5b1687 100644 (file)
@@ -88,7 +88,7 @@ static void update_viewport( struct st_context *st )
       GLfloat half_height = ctx->Viewport.Height / 2.0;
       GLfloat half_depth = (ctx->Viewport.Far - ctx->Viewport.Near) / 2.0;
 
-      struct pipe_viewport vp;
+      struct pipe_viewport_state vp;
       
       vp.scale[0] = half_width;
       vp.scale[1] = half_height * yScale;
@@ -102,7 +102,7 @@ static void update_viewport( struct st_context *st )
 
       if (memcmp(&vp, &st->state.viewport, sizeof(vp)) != 0) {
         st->state.viewport = vp;
-        st->pipe->set_viewport(st->pipe, &vp);
+        st->pipe->set_viewport_state(st->pipe, &vp);
       }
    }
 }
index 48ea7f12ee09ba4130b968a71e4be5661adce733..3b47785a9a7c1614ddfbf479693380bc9b45ca51 100644 (file)
@@ -65,19 +65,19 @@ struct st_context
     * though, we just shove random objects across the interface.  
     */
    struct {
-      struct pipe_framebuffer_state framebuffer;
-      struct pipe_viewport     viewport;
-      struct pipe_setup_state  setup;
-      struct pipe_fs_state     fs;
       struct pipe_alpha_test_state  alpha_test;
       struct pipe_blend_state  blend;
       struct pipe_clear_color_state clear_color;
-      struct pipe_clip_state   clip;
-      struct pipe_depth_state  depth;
-      struct pipe_sampler_state sampler[PIPE_MAX_SAMPLERS];
-      struct pipe_scissor_rect scissor;
+      struct pipe_clip_state clip;
+      struct pipe_depth_state depth;
+      struct pipe_framebuffer_state framebuffer;
+      struct pipe_fs_state     fs;
       struct pipe_poly_stipple poly_stipple;
+      struct pipe_sampler_state sampler[PIPE_MAX_SAMPLERS];
+      struct pipe_scissor_state scissor;
+      struct pipe_setup_state  setup;
       struct pipe_stencil_state stencil;
+      struct pipe_viewport_state viewport;
    } state;
 
    struct {