mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
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:
parent
858ad38f8b
commit
a8cb490193
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue