vc4->draw_call_queued = true;
}
+static void
+vc4_update_shadow_textures(struct pipe_context *pctx,
+ struct vc4_texture_stateobj *stage_tex)
+{
+ for (int i = 0; i < stage_tex->num_textures; i++) {
+ struct pipe_sampler_view *view = stage_tex->textures[i];
+ if (!view)
+ continue;
+ struct vc4_resource *rsc = vc4_resource(view->texture);
+ if (rsc->shadow_parent)
+ vc4_update_shadow_baselevel_texture(pctx, view);
+ }
+}
+
static void
vc4_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
{
return;
}
+ /* Before setting up the draw, do any fixup blits necessary. */
+ vc4_update_shadow_textures(pctx, &vc4->verttex);
+ vc4_update_shadow_textures(pctx, &vc4->fragtex);
+
vc4_get_draw_cl_space(vc4);
struct vc4_vertex_stateobj *vtx = vc4->vtx;
struct vc4_resource *orig = vc4_resource(shadow->shadow_parent);
assert(orig);
- if (shadow->writes == orig->writes)
+ if (shadow->writes == orig->writes && orig->bo->private)
return;
perf_debug("Updating shadow texture due to %s\n",
vc4->dirty |= VC4_DIRTY_TEXSTATE;
for (i = 0; i < nr; i++) {
- if (views[i]) {
- struct vc4_resource *rsc =
- vc4_resource(views[i]->texture);
+ if (views[i])
new_nr = i + 1;
- if (rsc->shadow_parent)
- vc4_update_shadow_baselevel_texture(pctx, views[i]);
- }
pipe_sampler_view_reference(&stage_tex->textures[i], views[i]);
stage_tex->dirty_samplers |= (1 << i);
}