Hide texture layout details from the state tracker.

pipe->get_tex_surface() has to be used for access to texture image data.
This commit is contained in:
Michel Dänzer
2007-11-30 20:48:03 +01:00
parent 5935626818
commit 753db0d840
42 changed files with 929 additions and 882 deletions

View File

@@ -51,24 +51,24 @@ update_textures(struct st_context *st)
for (u = 0; u < st->ctx->Const.MaxTextureImageUnits; u++) {
struct gl_texture_object *texObj
= st->ctx->Texture.Unit[u]._Current;
struct pipe_mipmap_tree *mt;
struct pipe_texture *pt;
if (texObj) {
GLboolean flush, retval;
retval = st_finalize_mipmap_tree(st->ctx, st->pipe, u, &flush);
retval = st_finalize_texture(st->ctx, st->pipe, u, &flush);
#if 0
printf("finalize_mipmap_tree returned %d, flush = %d\n",
printf("finalize_texture returned %d, flush = %d\n",
retval, flush);
#endif
mt = st_get_texobj_mipmap_tree(texObj);
pt = st_get_texobj_texture(texObj);
}
else {
mt = NULL;
pt = NULL;
}
st->state.texture[u] = mt;
st->pipe->set_texture_state(st->pipe, u, mt);
st->state.texture[u] = pt;
st->pipe->set_texture_state(st->pipe, u, pt);
}
}