st/dri: Reuse stored texture format
When we create a texture, we allocate a pipe_resource for it with a given format. When we export the texture to an EGLImage, we go look up what the GL format was and try to re-derive the pipe_format back again. Instead of doing that, just immediately reuse the pipe_format for the image's format. Signed-off-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user