iris: force reallocate on eglCreateImage with GFX >= 20
Cc: mesa-stable Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34499> (cherry picked from commit c2a46578626402c2ceebfe5a4a8e6640101678a6)
This commit is contained in:

committed by
Eric Engestrom

parent
e944636ff7
commit
d0b2f4830d
@@ -1904,7 +1904,7 @@
|
||||
"description": "iris: force reallocate on eglCreateImage with GFX >= 20",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
@@ -1641,12 +1641,19 @@ iris_flush_resource(struct pipe_context *ctx, struct pipe_resource *resource)
|
||||
const struct isl_drm_modifier_info *mod = res->mod_info;
|
||||
bool newly_external = false;
|
||||
|
||||
/* We need to reallocate because original texture is compressed and we
|
||||
* might end up doing a resolve.
|
||||
*/
|
||||
bool need_reallocate =
|
||||
res->aux.usage == ISL_AUX_USAGE_CCS_E &&
|
||||
iris_bo_is_real(res->bo) && iris_heap_is_compressed(res->bo->real.heap);
|
||||
|
||||
/* flush_resource() may be used to prepare an image for sharing externally
|
||||
* with other clients (e.g. via eglCreateImage). To account for this, we
|
||||
* make sure to eliminate suballocation and any compression that a consumer
|
||||
* wouldn't know how to handle.
|
||||
*/
|
||||
if (!iris_bo_is_real(res->bo)) {
|
||||
if (!iris_bo_is_real(res->bo) || need_reallocate) {
|
||||
assert(!(res->base.b.bind & PIPE_BIND_SHARED));
|
||||
iris_reallocate_resource_inplace(ice, res, PIPE_BIND_SHARED);
|
||||
assert(res->base.b.bind & PIPE_BIND_SHARED);
|
||||
|
Reference in New Issue
Block a user