<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<pre style="white-space: pre-wrap; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">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
</pre>
</body>
</html>