mesa: inline _mesa_update_texture
authorMarek Olšák <marek.olsak@amd.com>
Thu, 23 Mar 2017 21:35:03 +0000 (22:35 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 29 Mar 2017 13:44:00 +0000 (15:44 +0200)
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/main/state.c
src/mesa/main/texstate.c
src/mesa/main/texstate.h

index 5cb58a469bb4b843927dc496084d01385a0db2f0..71265a537ab0685ce81c23e5752c14a21fcdf02e 100644 (file)
@@ -406,8 +406,11 @@ _mesa_update_state_locked( struct gl_context *ctx )
    if (new_state & (_NEW_MODELVIEW|_NEW_PROJECTION))
       _mesa_update_modelview_project( ctx, new_state );
 
-   if (new_state & (_NEW_PROGRAM|_NEW_TEXTURE|_NEW_TEXTURE_MATRIX))
-      _mesa_update_texture( ctx, new_state );
+   if (new_state & _NEW_TEXTURE_MATRIX)
+      _mesa_update_texture_matrices(ctx);
+
+   if (new_state & (_NEW_TEXTURE | _NEW_PROGRAM))
+      _mesa_update_texture_state(ctx);
 
    if (new_state & _NEW_POLYGON)
       update_frontbit( ctx );
index be73fc33db6429426bfa7e34225ca19162fca888..70e014cab6375129a527a41c082ffedefe612fdc 100644 (file)
@@ -355,8 +355,8 @@ _mesa_ClientActiveTexture(GLenum texture)
  *
  * \param ctx GL context.
  */
-static void
-update_texture_matrices( struct gl_context *ctx )
+void
+_mesa_update_texture_matrices(struct gl_context *ctx)
 {
    GLuint u;
 
@@ -691,8 +691,8 @@ update_ff_texture_state(struct gl_context *ctx,
  *
  * \param ctx GL context.
  */
-static void
-update_texture_state( struct gl_context *ctx )
+void
+_mesa_update_texture_state(struct gl_context *ctx)
 {
    struct gl_program *prog[MESA_SHADER_STAGES];
    int i;
@@ -747,20 +747,6 @@ update_texture_state( struct gl_context *ctx )
 }
 
 
-/**
- * Update texture-related derived state.
- */
-void
-_mesa_update_texture( struct gl_context *ctx, GLuint new_state )
-{
-   if (new_state & _NEW_TEXTURE_MATRIX)
-      update_texture_matrices( ctx );
-
-   if (new_state & (_NEW_TEXTURE | _NEW_PROGRAM))
-      update_texture_state( ctx );
-}
-
-
 /**********************************************************************/
 /*****                      Initialization                        *****/
 /**********************************************************************/
index 52fe60275c23095d273c9aeb2d9a4659062fe1d9..cb329b07bfb9e791471f50c10ea1b9607d59371c 100644 (file)
@@ -91,8 +91,11 @@ _mesa_ClientActiveTexture( GLenum target );
  */
 /*@{*/
 
-extern void 
-_mesa_update_texture( struct gl_context *ctx, GLuint new_state );
+extern void
+_mesa_update_texture_matrices(struct gl_context *ctx);
+
+extern void
+_mesa_update_texture_state(struct gl_context *ctx);
 
 extern GLboolean
 _mesa_init_texture( struct gl_context *ctx );