Bug 13915 - glDrawPixels segment fault if format is GL_DEPTH_COMPONENT and DrawBuffer set to GL_NONE
Summary: glDrawPixels segment fault if format is GL_DEPTH_COMPONENT and DrawBuffer set...
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: haihao
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-03 17:10 UTC by WuNian
Modified: 2009-08-24 12:29 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
test case (1.07 KB, text/plain)
2008-01-03 17:11 UTC, WuNian
Details

Description WuNian 2008-01-03 17:10:17 UTC
if DrawBuffer set to GL_NONE and format is GL_DEPTH_COMPONENT, glDrawPixels will exit with segment fault.

The backtrace info:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1211491728 (LWP 11027)]
0xb7aae7a0 in i915_do_emit_state (intel=0x8057c18) at i915_vtbl.c:359
359           OUT_RELOC(state->draw_region->buffer,
(gdb) bt
#0  0xb7aae7a0 in i915_do_emit_state (intel=0x8057c18) at i915_vtbl.c:359
#1  0xb7aaf58f in i915_emit_state (intel=0x8057c18) at i915_vtbl.c:466
#2  0xb7a9f46a in intelDrawPixels (ctx=0x8057c18, x=0, y=0, width=32,
    height=32, format=6402, type=5126, unpack=0x80638ac, pixels=0xbfae8160)
    at intel_pixel_draw.c:68
#3  0xb7be759c in _mesa_DrawPixels (width=32, height=32, format=6402,
    type=5126, pixels=0xbfae8160) at main/drawpix.c:186
#4  0xb7f58e52 in glDrawPixels (width=32, height=32, format=6402, type=5126,
    pixels=0xbfae8160) at ../../../src/mesa/glapi/glapitemp.h:1370
#5  0x08048a2d in test () at pxtrans-depth.c:30
#6  0x08048bd8 in display () at pxtrans-depth.c:58
#7  0xb7eed53f in processWindowWorkList (window=0x804eae8) at glut_event.c:1306
#8  0xb7eee012 in glutMainLoop () at glut_event.c:1353
#9  0x08048c54 in main (argc=1, argv=0xbfae9404) at pxtrans-depth.c:70

No matter if INTEL_NO_TTM is set, the bug exists.
Comment 1 WuNian 2008-01-03 17:11:11 UTC
Created attachment 13498 [details]
test case
Comment 2 Eric Anholt 2008-02-15 13:50:26 UTC
Fixed by two commits, eed5e6f40f1728ae5ae346d44ce45ba767bbf24c and c741d287ecce1bd95d4e024d60e274abfcfbe22f.

Note that this testcase crashes with a pure software mesa, so it would be useful to see it make it into glean.
Comment 3 Brian Paul 2008-02-16 08:58:31 UTC
I've fixed the issue in sw/xlib Mesa too (master and 7.0 branch).
Comment 4 WuNian 2008-02-17 18:30:08 UTC
verified with both i915 driver and xlib driver.
Comment 5 Adam Jackson 2009-08-24 12:29:04 UTC
Mass version move, cvs -> git


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.