[Mesa-dev] [PATCH] gallium/dri: Support DRI Image extension version 6 (v2)
Axel Davy
axel.davy at ens.fr
Mon Nov 25 12:22:36 PST 2013
Hi,
>+ pipe_resource_reference(&img->texture, tex);
You shouldn't reference the texture before we manage to get a correct dri_format,
in case we fail.
>+ img->level = level;
>+ img->layer = depth;
>+ img->dri_format = driGLFormatToImageFormat(obj->_BufferObjectFormat);
This doesn't give me a correct dri_format.
I think a better way to get the dri_format is to
use tex->format (of type enum pipe_format).
in dri_image_allocate_textures, there is code to convert
such a type in a dri_format.
>+
>+ img->loader_private = loaderPrivate;
>+
>+ if (img->dri_format == MESA_FORMAT_NONE) {
I assume you meant __DRI_IMAGE_FORMAT_NONE
>+ *error = __DRI_IMAGE_ERROR_BAD_PARAMETER;
>+ free(img);
>+ return NULL;
>+ }
>+
>+ *error = __DRI_IMAGE_ERROR_SUCCESS;
>+ return img;
>+}
>+
Axel Davy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131125/695a086c/attachment.html>
More information about the mesa-dev
mailing list