From 8ae93c68ea3538e9e2c2462710a87192e026238d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 18 Jun 2012 10:22:06 -0600 Subject: [PATCH] svga: fix synchronization bug between sampler views and surfaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/gallium/drivers/svga/svga_surface.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c index 44c18926e11..6c4f06d4289 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); } } -- 2.30.2