zink: propagate valid_buffer_range when replacing buffer storage this is otherwise unreliable cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21739> (cherry picked from commit a4b1ae1f03c422957cb16a6c57cec5e9f90eab95)
diff --git a/.pick_status.json b/.pick_status.json index 2be2462..e886179 100644 --- a/.pick_status.json +++ b/.pick_status.json
@@ -1192,7 +1192,7 @@ "description": "zink: propagate valid_buffer_range when replacing buffer storage", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null },
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index dd35868..18bd412 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c
@@ -4642,6 +4642,7 @@ zink_batch_reference_resource(&ctx->batch, d); /* don't be too creative */ zink_resource_object_reference(screen, &d->obj, s->obj); + d->valid_buffer_range = s->valid_buffer_range; /* force counter buffer reset */ d->so_valid = false; if (num_rebinds && rebind_buffer(ctx, d, rebind_mask, num_rebinds) < num_rebinds)