<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;">>+ void *loaderPrivate)
>+{
>+ __DRIimage *img;
>+ struct gl_context *ctx = ((struct st_context *)dri_context(context))->ctx;
>+ struct gl_texture_object *obj;
>+ struct pipe_resource *tex;
>+ GLuint face = 0;
This part doesn't work.
A dri_context can be converted to a st_context.
To get the pipe_resource, we should use the st_context_iface in dri_context, and the function get_resource_for_egl_image.
Unfortunately, this function isn't implemented in mesa.
I've found this three years old patch, which implements it: <a class="moz-txt-link-freetext" href="http://marc.info/?l=mesa3d-dev&m=128431813411436">http://marc.info/?l=mesa3d-dev&m=128431813411436</a>
The get_resource_for_egl_image we need is at the end of the patch, and the implementation look correct to me.
Could a state_tracker expert review it and push the part of the patch we need?
><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">+ img->dri_format = driGLFormatToImageFormat(obj->_BufferObjectFormat);
This part doesn't work either: it doesn't give the correct format.
Getting this function right would really help to write glamor dri3 helpers
Axel Davy
<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;"></pre></pre>
</body>
</html>