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>
This commit is contained in:
Lionel Landwerlin 2020-06-02 11:52:35 +03:00 committed by Marge Bot
parent 604a86e46f
commit e41e820648

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;