i965: don't forget to set screen on duped image

We'll start using this field more for querying image properties.
Without it we run into a crash.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4861>
(cherry picked from commit e41e820648)
This commit is contained in:
Lionel Landwerlin 2020-06-02 11:52:35 +03:00 committed by Eric Engestrom
parent be8f4197e1
commit 0db300ddea
2 changed files with 2 additions and 1 deletions

View file

@ -1444,7 +1444,7 @@
"description": "i965: don't forget to set screen on duped image",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": null
},

View file

@ -980,6 +980,7 @@ intel_dup_image(__DRIimage *orig_image, void *loaderPrivate)
return NULL;
brw_bo_reference(orig_image->bo);
image->screen = orig_image->screen;
image->bo = orig_image->bo;
image->internal_format = orig_image->internal_format;
image->planar_format = orig_image->planar_format;