mesa/st: split updating vertex and fragment shader stages.
authorDave Airlie <airlied@redhat.com>
Wed, 18 May 2011 07:27:39 +0000 (17:27 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 18 May 2011 07:31:51 +0000 (17:31 +1000)
this seems like a logical thing to do and sets the correct st flags
for vertex textures.

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/state_tracker/st_atom.c
src/mesa/state_tracker/st_atom.h
src/mesa/state_tracker/st_atom_texture.c

index bf160fe10809bcbe6c576918f628c69fe3618c05..e1eac818e110d3cf3630561b67ec2cd116f66542 100644 (file)
@@ -56,6 +56,7 @@ static const struct st_tracked_state *atoms[] =
    &st_update_scissor,
    &st_update_blend,
    &st_update_sampler,
+   &st_update_vertex_texture,
    &st_update_texture,
    &st_update_framebuffer,
    &st_update_msaa,
index 6a5ea365ebca77d4a8042466cb58557ace3f0acb..930a08444abe958952df892cd2fe57c8d3ddfaa6 100644 (file)
@@ -60,6 +60,7 @@ extern const struct st_tracked_state st_update_blend;
 extern const struct st_tracked_state st_update_msaa;
 extern const struct st_tracked_state st_update_sampler;
 extern const struct st_tracked_state st_update_texture;
+extern const struct st_tracked_state st_update_vertex_texture;
 extern const struct st_tracked_state st_finalize_textures;
 extern const struct st_tracked_state st_update_fs_constants;
 extern const struct st_tracked_state st_update_gs_constants;
index 990b50438f02d5add60c7470b6895e65709fd4c7..072eb977ebb748ebfc455cae4b4c3852f74c209d 100644 (file)
@@ -317,20 +317,22 @@ update_fragment_textures(struct st_context *st)
                                   st->state.sampler_views);
 }
 
-static void 
-update_textures(struct st_context *st)
-{
-  update_fragment_textures(st);
-  update_vertex_textures(st);
-}
-
 const struct st_tracked_state st_update_texture = {
    "st_update_texture",                                        /* name */
    {                                                   /* dirty */
       _NEW_TEXTURE,                                    /* mesa */
       ST_NEW_FRAGMENT_PROGRAM,                         /* st */
    },
-   update_textures                                     /* update */
+   update_fragment_textures                            /* update */
+};
+
+const struct st_tracked_state st_update_vertex_texture = {
+   "st_update_vertex_texture",                                 /* name */
+   {                                                   /* dirty */
+      _NEW_TEXTURE,                                    /* mesa */
+      ST_NEW_VERTEX_PROGRAM,                           /* st */
+   },
+   update_vertex_textures                              /* update */
 };
 
 static void