[Mesa-dev] [PATCH 01/11] gallium: Add __DRIimageDriverExtension support to gallium

Michel Dänzer michel at daenzer.net
Wed May 28 00:47:44 PDT 2014


On 28.05.2014 09:55, Axel Davy wrote:
> From: Keith Packard <keithp at keithp.com>
> 
> Provide the hook to pull textures out of __DRIimage structures and use them as
> renderbuffers.
> 
> Signed-off-by: Keith Packard <keithp at keithp.com>

This patch breaks a number of piglit tests with DRI2, see the backtrace
below. This fixes it:

diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index cd9964c..2d93686 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -761,7 +761,7 @@ dri2_flush_frontbuffer(struct dri_context *ctx,

    pipe->flush(pipe, NULL, 0);

-   if (image->flushFrontBuffer) {
+   if (image) {
       image->flushFrontBuffer(dri_drawable, dri_drawable->loaderPrivate);
    } else if (loader->flushFrontBuffer) {
       loader->flushFrontBuffer(dri_drawable, dri_drawable->loaderPrivate);



Program received signal SIGSEGV, Segmentation fault.
dri2_flush_frontbuffer (ctx=<optimized out>, drawable=0x6f60e0, statt=<optimized out>) at ../../../../../../src/gallium/state_trackers/dri/drm/dri2.c:764
764	   if (image->flushFrontBuffer) {
(gdb) bt
#0  dri2_flush_frontbuffer (ctx=<optimized out>, drawable=0x6f60e0, statt=<optimized out>) at ../../../../../../src/gallium/state_trackers/dri/drm/dri2.c:764
#1  0x00007ffff17d6315 in dri_st_framebuffer_flush_front (stctx=<optimized out>, stfbi=<optimized out>, statt=<optimized out>)
    at ../../../../../../src/gallium/state_trackers/dri/drm/dri_drawable.c:118
#2  0x00007ffff7aff57e in stub_glFlush () at tests/util/generated_dispatch.c:8122
#3  0x0000000000400df2 in piglit_display () at tests/spec/gl-1.0/front-invalidate-back.c:99
#4  0x00007ffff7aed319 in process_next_event (x11_fw=0x602010) at tests/util/piglit-framework-gl/piglit_x11_framework.c:137
#5  0x00007ffff7aed3bb in enter_event_loop (winsys_fw=0x602010) at tests/util/piglit-framework-gl/piglit_x11_framework.c:153
#6  0x00007ffff7aec8a7 in run_test (gl_fw=0x602010, argc=1, argv=0x7fffffffe768) at tests/util/piglit-framework-gl/piglit_winsys_framework.c:85
#7  0x00007ffff7ae8ff8 in piglit_gl_test_run (argc=1, argv=0x7fffffffe768, config=0x7fffffffe630) at tests/util/piglit-framework-gl.c:151
#8  0x0000000000400cc4 in main (argc=1, argv=0x7fffffffe768) at tests/spec/gl-1.0/front-invalidate-back.c:48


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


More information about the mesa-dev mailing list