[Glamor] dri3 warnings
Gaetan Nadon
memsize at videotron.ca
Sun Dec 8 05:36:29 PST 2013
On 13-12-08 06:24 AM, davyaxel at free.fr wrote:
> ../../src/glamor_egl.c:456:9: warning: passing argument 4 of 'glamor_egl->egl_create_image_khr' makes pointer from integer without a cast [enabled by default]
>
> This is because we give a texture number as argument to eglCreateImageKHR.
> The definition of this functions says it uses a EGLClientBuffer as argument, which is (void*) usually.
>
> The spec indicates that in this case we must 'cast into the type EGLClientBuffer'.
> However for me, explicitly casting to EGLClientBuffer converts the warning into an error ('error: cast to pointer from integer of different size').
image = glamor_egl->egl_create_image_khr(glamor_egl->display,
glamor_egl->context,
EGL_GL_TEXTURE_2D_KHR,
tex, attribs);
There are other calls to egl_create_image_khr which do not have this
problem. The tex variable is defined as an unsigned int in
glamor_egl_dri3_fd_name_from_tex function. Just blindly passing a number
along by casting and removing warnings does not mean it is going to work
in the end. Do you know who is responsible to make the conversion?
Sorry, I don't know the code, but it looks like something is wrong here.
Have you tested that the code actually works as it is?
More information about the Glamor
mailing list