i965: don't forget to set screen on duped image
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 2 Jun 2020 08:52:35 +0000 (11:52 +0300)
committerMarge Bot <eric+marge@anholt.net>
Thu, 4 Jun 2020 07:31:38 +0000 (07:31 +0000)
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>

src/mesa/drivers/dri/i965/intel_screen.c

index 8f5e4102cb61e3e38806c63964484ba25dd66b97..3d6551ec516488d1d6b7c051f5bc18d40d78e4fe 100644 (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;