summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_surface.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2014-02-08 09:51:14 -0800
committerBrian Paul <brianp@vmware.com>2014-02-14 08:21:44 -0700
commitd0c22a6d53a9cce2d40006f3d4d7dd7e2f63aca9 (patch)
tree1f7f0648b45321bdc2134176b65b49df648a0460 /src/gallium/drivers/svga/svga_surface.c
parentc1e60a61e8ca3bdac0530ad1aeb3c751f273b73d (diff)
downloadexternal_mesa3d-d0c22a6d53a9cce2d40006f3d4d7dd7e2f63aca9.zip
external_mesa3d-d0c22a6d53a9cce2d40006f3d4d7dd7e2f63aca9.tar.gz
external_mesa3d-d0c22a6d53a9cce2d40006f3d4d7dd7e2f63aca9.tar.bz2
svga: track which textures are rendered to
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src/gallium/drivers/svga/svga_surface.c')
-rw-r--r--src/gallium/drivers/svga/svga_surface.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c
index 5fafadf..c538e36 100644
--- a/src/gallium/drivers/svga/svga_surface.c
+++ b/src/gallium/drivers/svga/svga_surface.c
@@ -158,7 +158,7 @@ svga_texture_view_surface(struct svga_context *svga,
for (i = 0; i < key->numMipLevels; i++) {
for (j = 0; j < key->numFaces; j++) {
- if (tex->defined[j + face_pick][i + start_mip]) {
+ if (svga_is_texture_level_defined(tex, j + face_pick, i + start_mip)) {
unsigned depth = (zslice_pick < 0 ?
u_minify(tex->b.b.depth0, i + start_mip) :
1);
@@ -304,18 +304,19 @@ svga_mark_surface_dirty(struct pipe_surface *surf)
if (s->handle == tex->handle) {
/* hmm so 3d textures always have all their slices marked ? */
if (surf->texture->target == PIPE_TEXTURE_CUBE)
- tex->defined[surf->u.tex.first_layer][surf->u.tex.level] = TRUE;
+ svga_define_texture_level(tex, surf->u.tex.first_layer,
+ surf->u.tex.level);
else
- tex->defined[0][surf->u.tex.level] = TRUE;
+ svga_define_texture_level(tex, 0, surf->u.tex.level);
}
else {
/* this will happen later in svga_propagate_surface */
}
- /* Increment the view_age and texture age for this surface's slice
- * so that any sampler views into the texture are re-validated too.
+ /* Increment the view_age and texture age for this surface's mipmap
+ * level so that any sampler views into the texture are re-validated too.
*/
- svga_age_texture_view(tex, surf->u.tex.first_layer);
+ svga_age_texture_view(tex, surf->u.tex.level);
}
}
@@ -361,7 +362,7 @@ svga_propagate_surface(struct svga_context *svga, struct pipe_surface *surf)
s->dirty = FALSE;
ss->texture_timestamp++;
- tex->view_age[surf->u.tex.level] = ++(tex->age);
+ svga_age_texture_view(tex, surf->u.tex.level);
if (s->handle != tex->handle) {
SVGA_DBG(DEBUG_VIEWS,
@@ -372,7 +373,7 @@ svga_propagate_surface(struct svga_context *svga, struct pipe_surface *surf)
tex->handle, 0, 0, zslice, surf->u.tex.level, face,
u_minify(tex->b.b.width0, surf->u.tex.level),
u_minify(tex->b.b.height0, surf->u.tex.level), 1);
- tex->defined[face][surf->u.tex.level] = TRUE;
+ svga_define_texture_level(tex, face, surf->u.tex.level);
}
}