diff options
author | Brian Paul <brianp@vmware.com> | 2012-06-18 10:22:06 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2012-06-18 13:26:07 -0600 |
commit | 6dd127000887071f30ded5b39ac799b917ad88a0 (patch) | |
tree | f82122d6fadf1e9abb37cef93c42537c5e694c95 | |
parent | 29c67f920356553759e79f29e1e4648e4d389adf (diff) |
svga: fix synchronization bug between sampler views and surfaces
This fixes a bug where a sampler view was using stale texture/resource
data when the texture was modified through a surface (render to texture).
Bumping the texture and layer ages triggers sampler view revalidation.
Fixes piglit fbo-blit failure.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
(cherry picked from commit 8ae93c68ea3538e9e2c2462710a87192e026238d)
-rw-r--r-- | src/gallium/drivers/svga/svga_surface.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c index 2f9379bc420..942c0eed263 100644 --- a/src/gallium/drivers/svga/svga_surface.c +++ b/src/gallium/drivers/svga/svga_surface.c @@ -320,6 +320,11 @@ svga_mark_surface_dirty(struct pipe_surface *surf) 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. + */ + tex->view_age[surf->u.tex.first_layer] = ++(tex->age); } } |