mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 21:50:11 +01:00
freedreno: Handle xfb invalidation
So using the same buffer for CPU writes and GPU writes might be kinda unusual. But I noticed we were missing handling for the case while debugging something unrelated. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18732>
This commit is contained in:
parent
3449b2187e
commit
8300554ba1
2 changed files with 14 additions and 0 deletions
|
|
@ -85,6 +85,18 @@ rebind_resource_in_ctx(struct fd_context *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
/* xfb/so buffers: */
|
||||
if (rsc->dirty & FD_DIRTY_STREAMOUT) {
|
||||
struct fd_streamout_stateobj *so = &ctx->streamout;
|
||||
|
||||
for (unsigned i = 0;
|
||||
i < so->num_targets && !(ctx->dirty & FD_DIRTY_STREAMOUT);
|
||||
i++) {
|
||||
if (so->targets[i]->buffer == prsc)
|
||||
fd_context_dirty(ctx, FD_DIRTY_STREAMOUT);
|
||||
}
|
||||
}
|
||||
|
||||
const enum fd_dirty_3d_state per_stage_dirty =
|
||||
FD_DIRTY_CONST | FD_DIRTY_TEX | FD_DIRTY_IMAGE | FD_DIRTY_SSBO;
|
||||
|
||||
|
|
|
|||
|
|
@ -611,6 +611,8 @@ fd_set_stream_output_targets(struct pipe_context *pctx, unsigned num_targets,
|
|||
ctx->streamout.verts_written = 0;
|
||||
}
|
||||
|
||||
if (so->targets[i])
|
||||
fd_resource_set_usage(so->targets[i]->buffer, FD_DIRTY_STREAMOUT);
|
||||
pipe_so_target_reference(&so->targets[i], targets[i]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue