diff options
author | Marek Olšák <[email protected]> | 2017-03-23 22:35:03 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-03-29 15:44:00 +0200 |
commit | 226ff6aa30701fb1b4e69e07c5d76c4d9b5e5d77 (patch) | |
tree | 9766f6b712a0144ebb9a43a2c05df8085bf0ee57 /src/mesa/main | |
parent | bb9faba172193a33a20a86d0b1a3a4db6fabcaa0 (diff) |
mesa: inline _mesa_update_texture
Reviewed-by: Edward O'Callaghan <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/state.c | 7 | ||||
-rw-r--r-- | src/mesa/main/texstate.c | 22 | ||||
-rw-r--r-- | src/mesa/main/texstate.h | 7 |
3 files changed, 14 insertions, 22 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 5cb58a469bb..71265a537ab 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -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 ); diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index be73fc33db6..70e014cab63 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -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 *****/ /**********************************************************************/ diff --git a/src/mesa/main/texstate.h b/src/mesa/main/texstate.h index 52fe60275c2..cb329b07bfb 100644 --- a/src/mesa/main/texstate.h +++ b/src/mesa/main/texstate.h @@ -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 ); |