diff options
author | Charmaine Lee <[email protected]> | 2015-08-21 10:36:24 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2015-09-02 13:22:42 -0600 |
commit | 5a5e5e39592292a8ffa861e6f9b21934af428b9b (patch) | |
tree | ae1d31ce5671461843c36988ed2e4c354388a2bb /src/gallium/drivers/svga/svga_surface.c | |
parent | b2fd41ce465e16a178d51000b843b5228640b670 (diff) |
svga: increment texture age when surface is to be marked as dirty
Commit b9ba8492 removes an unneeded pipe_surface_release() from
st_render_texture(). This implies a surface can now be reused for a
render buffer. Currently, when we render to a texture, we mark the
surface as dirty. But in svga_mark_surface_dirty(), if the surface
is already marked as dirty, it does not increment the texture age.
Any view to this texture might not be updated properly then.
With this patch, the texture age is incremented regardless of whether
the surface is already marked as dirty or not.
Fix bug 1499181.
Reviewed-by: Sinclair Yeh <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_surface.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_surface.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c index 4b0f9417c32..477a938ccdd 100644 --- a/src/gallium/drivers/svga/svga_surface.c +++ b/src/gallium/drivers/svga/svga_surface.c @@ -512,10 +512,9 @@ static void svga_mark_surface_dirty(struct pipe_surface *surf) { struct svga_surface *s = svga_surface(surf); + struct svga_texture *tex = svga_texture(surf->texture); if (!s->dirty) { - struct svga_texture *tex = svga_texture(surf->texture); - s->dirty = TRUE; if (s->handle == tex->handle) { @@ -526,12 +525,12 @@ 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 mipmap - * level so that any sampler views into the texture are re-validated too. - */ - svga_age_texture_view(tex, surf->u.tex.level); } + + /* 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.level); } |