svga: fix backed surface view regression
authorCharmaine Lee <charmainel@vmware.com>
Thu, 13 Aug 2015 22:08:22 +0000 (15:08 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 2 Sep 2015 19:22:42 +0000 (13:22 -0600)
commitb2fd41ce465e16a178d51000b843b5228640b670
tree848b85a71e86ed7dded7ca6aa77c09eadd393fd9
parent9390cb84593bda516e8c1521c87a08475574d1be
svga: fix backed surface view regression

Commit b9ba8492 removes an unneeded pipe_surface_release() from
st_render_texture() and exposes a bug in the backed surface view
creation.  Currently a backed surface view for a conflicted surface view
is created at framebuffer emit time. But if shader sampler views are changed
but framebuffer surface views remain unchanged, emit_framebuffer() will not
be called and conflicted surface views will not be detected.

To fix this, also check for conflicted surface views when setting sampler
views. If there is any conflicted surface views, enable the
framebuffer dirty bit so that the framebuffer emit code has a chance to
create a backed surface view for the conflicted surface view.

Fix cinebench-r11-test regression.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/svga/svga_pipe_sampler.c
src/gallium/drivers/svga/svga_sampler_view.h
src/gallium/drivers/svga/svga_state_sampler.c
src/gallium/drivers/svga/svga_surface.c