[Mesa-dev] Mesa (master): st/dri: add support for dma-buf importer (DRIimage v8)

Michel Dänzer michel at daenzer.net
Mon Mar 3 01:30:21 PST 2014


On Son, 2014-03-02 at 17:21 -0800, Dave Airlie wrote:
> Module: Mesa
> Branch: master
> Commit: 15b4ff3f4e9460320dd629026743e17fa7109156
> URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=15b4ff3f4e9460320dd629026743e17fa7109156
> 
> Author: Dave Airlie <airlied at redhat.com>
> Date:   Wed Dec 18 10:01:27 2013 +1000
> 
> st/dri: add support for dma-buf importer (DRIimage v8)
> 
> This is just a simple implementation that stores the extra values into the DRIimage
> struct and just uses the fd importer. I haven't looked into what is required
> to import YUV or deal with the extra parameters.
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>

This change is causing problems for me with glamor on radeonsi. Running
piglit gpu.py, the X server crashes because loader is NULL in st/dri's
dri2_lookup_egl_image(), see backtrace below. Patching it to return NULL
in that case, piglit runs to completion, but some Mesa errors appear in
the X server's stderr:

Mesa: User error: GL_INVALID_OPERATION in glFramebufferTexture2DEXT(non existant texture)
Mesa: 2 similar GL_INVALID_OPERATION errors
Mesa: User error: GL_INVALID_OPERATION in glTexSubImage2D(invalid texture image)
Mesa: 4 similar GL_INVALID_OPERATION errors
Mesa: User error: GL_INVALID_OPERATION in glFramebufferTexture2DEXT(non existant texture)

And some test windows leave artifacts on the screen.


Any ideas for a solution?


#0  0x00007f62aa4137b0 in dri2_lookup_egl_image (screen=<optimized out>, handle=0x3684790) at ../../../../../../src/gallium/state_trackers/dri/drm/dri2.c:555
#1  0x00007f62aa4123fd in dri_get_egl_image (smapi=0x2da3c60, egl_image=0x3684790, stimg=0x7fff24059bc0) at ../../../../../../src/gallium/state_trackers/dri/drm/dri_screen.c:321
#2  0x00007f62aa1b03fc in st_manager_get_egl_image_surface (st=0x342acb0, eglimg=<optimized out>) at ../../../src/mesa/state_tracker/st_manager.c:798
#3  0x00007f62aa187fb6 in st_egl_image_target_texture_2d (ctx=0x35f17b0, target=<optimized out>, texObj=0x34382f0, texImage=0x36a3710, image_handle=<optimized out>)
    at ../../../src/mesa/state_tracker/st_cb_eglimage.c:147
#4  0x00007f62aa1181eb in _mesa_EGLImageTargetTexture2DOES (target=3553, image=0x3684790) at ../../../src/mesa/main/teximage.c:3364
#5  0x00007f62aba619b8 in glamor_create_texture_from_image (image=image at entry=0x3684790, texture=texture at entry=0x7fff24059cec, glamor_egl=<optimized out>, glamor_egl=<optimized out>)
    at ../../src/glamor_egl.c:217
#6  0x00007f62aba61ca3 in glamor_egl_create_argb8888_based_texture (screen=<optimized out>, w=<optimized out>, h=<optimized out>) at ../../src/glamor_egl.c:255
#7  0x00007f62abc8fbec in _glamor_create_tex (glamor_priv=glamor_priv at entry=0x25d7ec0, w=w at entry=16, h=h at entry=22, format=format at entry=6408) at ../../src/glamor_fbo.c:344
#8  0x00007f62abc9025f in glamor_create_fbo (glamor_priv=glamor_priv at entry=0x25d7ec0, w=w at entry=16, h=h at entry=22, format=format at entry=6408, flag=flag at entry=0) at ../../src/glamor_fbo.c:392
#9  0x00007f62abc6c7c8 in glamor_create_pixmap (screen=screen at entry=0x25d48c0, w=w at entry=16, h=h at entry=22, depth=depth at entry=24, usage=usage at entry=0) at ../../src/glamor.c:175
#10 0x00007f62ac103953 in radeon_glamor_create_pixmap (screen=0x25d48c0, w=16, h=22, depth=24, usage=0) at ../../src/radeon_glamor.c:185
#11 0x0000000000432837 in ProcCreatePixmap (client=0x3228080) at ../../dix/dispatch.c:1393
#12 0x00000000004368fe in Dispatch () at ../../dix/dispatch.c:433
#13 0x000000000043a6ba in dix_main (argc=3, argv=0x7fff2405a088, envp=<optimized out>) at ../../dix/main.c:294


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer



More information about the mesa-dev mailing list