mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-16 12:40:34 +01:00
This fixes TC's buffer invalidation code for buffers that are shared between contexts. TC is unable to notify other TCs in case it replaces a shared buffer's underlying storage when invalidating, causing those other TCs to use wrong buffer IDs for busyness tracking, which leads to corruption due to invalidation fast-paths being triggered when they shouldn't be. This patch addresses this issue by tracking if a buffer is shared, and if it is, disabling buffer storage replacement for the affected buffer. This is achieved by tracking which TC instance first accessed a certain buffer. If a second instance then accesses it as well, it will realize that it isn't the only one working on the buffer and mark the buffer accordingly. If TC needs to invalidate a buffer for the correctness of an operation at any point, it will fall back to doing the operation in a synchronous fashion with this patch if the buffer is shared and currently busy. It might be possible to later detect that a buffer has become un-shared; however, this is outside of the scope of this bugfix patch. v2: Do not disable buffer busyness tracking for shared buffers. Fixes: |
||
|---|---|---|
| .. | ||
| amd | ||
| android_stub | ||
| asahi | ||
| broadcom | ||
| c11 | ||
| compiler | ||
| drm-shim | ||
| egl | ||
| etnaviv | ||
| freedreno | ||
| gallium | ||
| gbm | ||
| getopt | ||
| glx | ||
| gtest | ||
| hgl | ||
| imagination | ||
| imgui | ||
| intel | ||
| loader | ||
| mapi | ||
| mesa | ||
| microsoft | ||
| nouveau | ||
| panfrost | ||
| tool | ||
| util | ||
| virtio | ||
| vulkan | ||
| meson.build | ||