diff options
author | Patrice Mandin <[email protected]> | 2007-08-31 19:43:16 +0200 |
---|---|---|
committer | Patrice Mandin <[email protected]> | 2007-08-31 19:46:39 +0200 |
commit | b0a1e81887a831f72ffbec4fe005e1837c81018c (patch) | |
tree | d0de291a53403e42deaf91728376a3a36092442a /src/mesa/drivers/dri/nouveau/nouveau_state.c | |
parent | 214347fdb4c30dc8bac5d4b9a823458709bc53ea (diff) |
nouveau: add hw-dependent function to update modelview*projection matrix
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_state.c')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_state.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index f618dcfc99b..6c63b12c469 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -100,6 +100,16 @@ static void nouveauDepthRange(GLcontext *ctx, GLclampd near, GLclampd far) nouveauCalcViewport(ctx); } +static void nouveauUpdateModelProjMatrix(GLcontext *ctx) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + _math_matrix_mul_matrix(&(nmesa->model_proj), &(ctx->_ModelProjectMatrix), + ctx->ModelviewMatrixStack.Top); + + nmesa->hw_func.UpdateModelProjMatrix(nmesa); +} + static void nouveauDDUpdateHWState(GLcontext *ctx) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -141,6 +151,13 @@ static void nouveauDDUpdateHWState(GLcontext *ctx) static void nouveauDDInvalidateState(GLcontext *ctx, GLuint new_state) { + if ( new_state & _NEW_PROJECTION ) { + nouveauUpdateModelProjMatrix(ctx); + } + if ( new_state & _NEW_MODELVIEW ) { + nouveauUpdateModelProjMatrix(ctx); + } + _swrast_InvalidateState( ctx, new_state ); _swsetup_InvalidateState( ctx, new_state ); _vbo_InvalidateState( ctx, new_state ); |