mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
zink: force streamout rebind when mapping a streamout buffer for writing
if the contents of the buffer change between uses, trigger the rebind path next time a draw happens for synchronization Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10882>
This commit is contained in:
parent
a29688a0d1
commit
517484ea89
1 changed files with 6 additions and 0 deletions
|
|
@ -943,6 +943,12 @@ buffer_transfer_map(struct zink_context *ctx, struct zink_resource *res, unsigne
|
|||
}
|
||||
|
||||
if (!ptr) {
|
||||
/* if writing to a streamout buffer, ensure synchronization next time it's used */
|
||||
if (usage & PIPE_MAP_WRITE && res->bind_history & ZINK_RESOURCE_USAGE_STREAMOUT) {
|
||||
ctx->dirty_so_targets = true;
|
||||
/* force counter buffer reset */
|
||||
res->bind_history &= ~ZINK_RESOURCE_USAGE_STREAMOUT;
|
||||
}
|
||||
ptr = map_resource(screen, res);
|
||||
if (!ptr)
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue