mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 19:50:11 +01:00
v3d: Don't implicitly clear the content of the imported buffer
v3d driver will implicitly clear the buffer's content on the first write operation. This clearing operation is helpful for allocated buffers, initializing them with zeros instead of having memory garbage. Also, this avoids reading the buffer from the RAM to the GPU cache before rendering, making the first write operation slightly faster. The clearing operation should not happen for imported buffers where the buffer may already contain valuable data and the user may want to render into the buffer only partially. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26136>
This commit is contained in:
parent
656afd8ede
commit
56451ce773
1 changed files with 3 additions and 0 deletions
|
|
@ -989,6 +989,9 @@ v3d_resource_from_handle(struct pipe_screen *pscreen,
|
||||||
slice->stride = whandle->stride;
|
slice->stride = whandle->stride;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Prevent implicit clearing of the imported buffer contents. */
|
||||||
|
rsc->writes = 1;
|
||||||
|
|
||||||
return prsc;
|
return prsc;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue