broadcom/vc4: Keep pipe_sampler_view->texture matching the original texture.
authorEric Anholt <eric@anholt.net>
Fri, 28 Jul 2017 01:11:19 +0000 (18:11 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 26 Sep 2017 21:49:43 +0000 (14:49 -0700)
commit68c91a87d73cfcd947e09803ceb800b50bf9e399
treed69de616cf379a03bd166c4167aa17e1d390a7e5
parent4b407a62c757c8344736caa200e706d2bd66fb2c
broadcom/vc4: Keep pipe_sampler_view->texture matching the original texture.

I was overwriting view->texture with the shadow resource when we need to
do shadow copies (retiling or baselevel rebase), but that tripped up some
critical new sanity checking in state_tracker (making sure that stObj->pt
hasn't changed from view->texture through TexImage-related paths).

To avoid that, move the shadow resource to the vc4_sampler_view struct.

Fixes: f0ecd36ef8e1 ("st/mesa: add an entirely separate codepath for setting up buffer views")
src/gallium/drivers/vc4/vc4_context.h
src/gallium/drivers/vc4/vc4_draw.c
src/gallium/drivers/vc4/vc4_resource.c
src/gallium/drivers/vc4/vc4_resource.h
src/gallium/drivers/vc4/vc4_state.c
src/gallium/drivers/vc4/vc4_uniforms.c