summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_uniforms.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2017-07-27 18:11:19 -0700
committerEric Anholt <[email protected]>2017-09-26 14:49:43 -0700
commit68c91a87d73cfcd947e09803ceb800b50bf9e399 (patch)
treed69de616cf379a03bd166c4167aa17e1d390a7e5 /src/gallium/drivers/vc4/vc4_uniforms.c
parent4b407a62c757c8344736caa200e706d2bd66fb2c (diff)
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")
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_uniforms.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_uniforms.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_uniforms.c b/src/gallium/drivers/vc4/vc4_uniforms.c
index 07781b8524e..b8169347fed 100644
--- a/src/gallium/drivers/vc4/vc4_uniforms.c
+++ b/src/gallium/drivers/vc4/vc4_uniforms.c
@@ -35,7 +35,7 @@ write_texture_p0(struct vc4_job *job,
{
struct vc4_sampler_view *sview =
vc4_sampler_view(texstate->textures[unit]);
- struct vc4_resource *rsc = vc4_resource(sview->base.texture);
+ struct vc4_resource *rsc = vc4_resource(sview->texture);
cl_reloc(job, &job->uniforms, uniforms, rsc->bo, sview->texture_p0);
}