diff --git a/src/gallium/frontends/dri/dri_helpers.c b/src/gallium/frontends/dri/dri_helpers.c index 82c77bc9693..1c6baa1f98e 100644 --- a/src/gallium/frontends/dri/dri_helpers.c +++ b/src/gallium/frontends/dri/dri_helpers.c @@ -443,7 +443,7 @@ dri2_create_from_texture(__DRIcontext *context, int target, unsigned texture, img->level = level; img->layer = depth; img->in_fence_fd = -1; - img->dri_format = driGLFormatToImageFormat(glimg->TexFormat); + img->dri_format = glimg->pt->format; img->internal_format = glimg->InternalFormat; img->loader_private = loaderPrivate;