summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-03-23 22:59:08 +0100
committerMarek Olšák <[email protected]>2017-03-29 15:44:00 +0200
commit96a1c2406db4ac79335a7f6e6d61d80d985df76e (patch)
tree998ac489e36bcc1ce6f73f692a621f9e079d7209 /src/mesa
parentd68150f15d41756fa7153cd6b597ff52ec85a933 (diff)
mesa: don't use _NEW_TEXTURE mainly in mesa/main
v2: add missing %s 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')
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_upload.c3
-rw-r--r--src/mesa/main/attrib.c2
-rw-r--r--src/mesa/main/debug.c5
-rw-r--r--src/mesa/main/state.c10
-rw-r--r--src/mesa/main/texstate.c11
5 files changed, 17 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index f22567d2f6e..9c0b82cb3a7 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -585,9 +585,10 @@ static struct dirty_bit_map mesa_bits[] = {
DEFINE_BIT(_NEW_POLYGONSTIPPLE),
DEFINE_BIT(_NEW_SCISSOR),
DEFINE_BIT(_NEW_STENCIL),
- DEFINE_BIT(_NEW_TEXTURE),
+ DEFINE_BIT(_NEW_TEXTURE_OBJECT),
DEFINE_BIT(_NEW_TRANSFORM),
DEFINE_BIT(_NEW_VIEWPORT),
+ DEFINE_BIT(_NEW_TEXTURE_STATE),
DEFINE_BIT(_NEW_ARRAY),
DEFINE_BIT(_NEW_RENDERMODE),
DEFINE_BIT(_NEW_BUFFERS),
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index ada2203ec0b..8e738c91c8f 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1385,7 +1385,7 @@ _mesa_PopAttrib(void)
struct texture_state *texstate
= (struct texture_state *) attr->data;
pop_texture_group(ctx, texstate);
- ctx->NewState |= _NEW_TEXTURE;
+ ctx->NewState |= _NEW_TEXTURE_OBJECT | _NEW_TEXTURE_STATE;
}
break;
case GL_VIEWPORT_BIT:
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 3471b26aad8..7b76a949698 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -72,7 +72,7 @@ void
_mesa_print_state( const char *msg, GLuint state )
{
_mesa_debug(NULL,
- "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
+ "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
msg,
state,
(state & _NEW_MODELVIEW) ? "ctx->ModelView, " : "",
@@ -91,9 +91,10 @@ _mesa_print_state( const char *msg, GLuint state )
(state & _NEW_POLYGONSTIPPLE) ? "ctx->PolygonStipple, " : "",
(state & _NEW_SCISSOR) ? "ctx->Scissor, " : "",
(state & _NEW_STENCIL) ? "ctx->Stencil, " : "",
- (state & _NEW_TEXTURE) ? "ctx->Texture, " : "",
+ (state & _NEW_TEXTURE_OBJECT) ? "ctx->Texture(Object), " : "",
(state & _NEW_TRANSFORM) ? "ctx->Transform, " : "",
(state & _NEW_VIEWPORT) ? "ctx->Viewport, " : "",
+ (state & _NEW_TEXTURE_STATE) ? "ctx->Texture(State), " : "",
(state & _NEW_ARRAY) ? "ctx->Array, " : "",
(state & _NEW_RENDERMODE) ? "ctx->RenderMode, " : "",
(state & _NEW_BUFFERS) ? "ctx->Visual, ctx->DrawBuffer,, " : "");
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 71265a537ab..07629d8ccac 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -384,15 +384,15 @@ _mesa_update_state_locked( struct gl_context *ctx )
/* Determine which state flags effect vertex/fragment program state */
if (ctx->FragmentProgram._MaintainTexEnvProgram) {
- prog_flags |= (_NEW_BUFFERS | _NEW_TEXTURE | _NEW_FOG |
+ prog_flags |= (_NEW_BUFFERS | _NEW_TEXTURE_OBJECT | _NEW_FOG |
_NEW_VARYING_VP_INPUTS | _NEW_LIGHT | _NEW_POINT |
_NEW_RENDERMODE | _NEW_PROGRAM | _NEW_FRAG_CLAMP |
- _NEW_COLOR);
+ _NEW_COLOR | _NEW_TEXTURE_STATE);
}
if (ctx->VertexProgram._MaintainTnlProgram) {
- prog_flags |= (_NEW_VARYING_VP_INPUTS | _NEW_TEXTURE |
+ prog_flags |= (_NEW_VARYING_VP_INPUTS | _NEW_TEXTURE_OBJECT |
_NEW_TEXTURE_MATRIX | _NEW_TRANSFORM | _NEW_POINT |
- _NEW_FOG | _NEW_LIGHT |
+ _NEW_FOG | _NEW_LIGHT | _NEW_TEXTURE_STATE |
_MESA_NEW_NEED_EYE_COORDS);
}
@@ -409,7 +409,7 @@ _mesa_update_state_locked( struct gl_context *ctx )
if (new_state & _NEW_TEXTURE_MATRIX)
_mesa_update_texture_matrices(ctx);
- if (new_state & (_NEW_TEXTURE | _NEW_PROGRAM))
+ if (new_state & (_NEW_TEXTURE_OBJECT | _NEW_TEXTURE_STATE | _NEW_PROGRAM))
_mesa_update_texture_state(ctx);
if (new_state & _NEW_POLYGON)
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 87c4d4a8881..ada0dfdb660 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -350,8 +350,8 @@ _mesa_ClientActiveTexture(GLenum texture)
/**
* \note This routine refers to derived texture attribute values to
* compute the ENABLE_TEXMAT flags, but is only called on
- * _NEW_TEXTURE_MATRIX. On changes to _NEW_TEXTURE, the ENABLE_TEXMAT
- * flags are updated by _mesa_update_textures(), below.
+ * _NEW_TEXTURE_MATRIX. On changes to _NEW_TEXTURE_OBJECT/STATE,
+ * the ENABLE_TEXMAT flags are updated by _mesa_update_textures(), below.
*
* \param ctx GL context.
*/
@@ -686,8 +686,9 @@ update_ff_texture_state(struct gl_context *ctx,
/**
* \note This routine refers to derived texture matrix values to
* compute the ENABLE_TEXMAT flags, but is only called on
- * _NEW_TEXTURE. On changes to _NEW_TEXTURE_MATRIX, the ENABLE_TEXMAT
- * flags are updated by _mesa_update_texture_matrices, above.
+ * _NEW_TEXTURE_OBJECT/STATE. On changes to _NEW_TEXTURE_MATRIX,
+ * the ENABLE_TEXMAT flags are updated by _mesa_update_texture_matrices,
+ * above.
*
* \param ctx GL context.
*/
@@ -711,7 +712,7 @@ _mesa_update_texture_state(struct gl_context *ctx)
}
/* TODO: only set this if there are actual changes */
- ctx->NewState |= _NEW_TEXTURE;
+ ctx->NewState |= _NEW_TEXTURE_OBJECT | _NEW_TEXTURE_STATE;
ctx->Texture._GenFlags = 0x0;
ctx->Texture._TexMatEnabled = 0x0;