mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
iris: Allocate ZEROED BOs for shared resources
A port ofcbee2d1102("i965/screen: Allocate ZEROED BOs for images"). Cc: mesa-stable Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22487> (cherry picked from commit5e5faa1194)
This commit is contained in:
parent
599749570c
commit
612e6e6038
2 changed files with 9 additions and 2 deletions
|
|
@ -508,7 +508,7 @@
|
|||
"description": "iris: Allocate ZEROED BOs for shared resources",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -487,9 +487,16 @@ iris_resource_alloc_flags(const struct iris_screen *screen,
|
|||
if (templ->bind & PIPE_BIND_PROTECTED)
|
||||
flags |= BO_ALLOC_PROTECTED;
|
||||
|
||||
if (templ->bind & PIPE_BIND_SHARED)
|
||||
if (templ->bind & PIPE_BIND_SHARED) {
|
||||
flags |= BO_ALLOC_SHARED;
|
||||
|
||||
/* We request that the bufmgr zero because, if a buffer gets re-used
|
||||
* from the pool, we don't want to leak random garbage from our process
|
||||
* to some other.
|
||||
*/
|
||||
flags |= BO_ALLOC_ZEROED;
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue