v3d: never replace a mapped bo
The application might have a pointer into the mapped bo. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25362>
This commit is contained in:
@@ -101,6 +101,10 @@ v3d_resource_bo_alloc(struct v3d_resource *rsc)
|
||||
struct pipe_screen *pscreen = prsc->screen;
|
||||
struct v3d_bo *bo;
|
||||
|
||||
/* never replace a mapped bo */
|
||||
if (rsc->bo && rsc->bo->map)
|
||||
return false;
|
||||
|
||||
/* Buffers may be read using ldunifa, which prefetches the next
|
||||
* 4 bytes after a read. If the buffer's size is exactly a multiple
|
||||
* of a page size and the shader reads the last 4 bytes with ldunifa
|
||||
|
||||
Reference in New Issue
Block a user