Bug 15380 - [i915 i965 FBO] glFramebufferTexture2D Segmentation fault in some case
[i915 i965 FBO] glFramebufferTexture2D Segmentation fault in some case
Status: VERIFIED FIXED
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915
unspecified
All Linux (All)
: medium normal
Assigned To: Eric Anholt
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-06 20:30 UTC by Shuang He
Modified: 2008-07-28 19:16 UTC (History)
1 user (show)

See Also:


Attachments
test case (2.11 KB, text/plain)
2008-04-06 20:30 UTC, Shuang He
Details
xorg conf (3.63 KB, text/plain)
2008-04-06 20:33 UTC, Shuang He
Details
xorg log (24.79 KB, text/plain)
2008-04-06 20:33 UTC, Shuang He
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shuang He 2008-04-06 20:30:49 UTC
Created attachment 15729 [details]
test case

System Environment:
--------------------------

--Platforms:
i915 & i965

--Architecture(32-bit,64-bit,compatiblity): all

--2D driver:
commit 645980596450ed21c3b8927410a6bfe38a0c55d1

--3D driver:
commit 3e0797f3b702a1363bf238eb4826385860346137

--Xserver:
commit b8ea9f2a25aad88aee77a68f8e20ac07276f0dab

--Drm
commit 562f95ea96f08e1d73a872dc87237614292c873a

--Kernel:
2.6.23.1


Bug detailed description:
-------------------------
This issue doesn't happen in software rendering
When you write codes in following sequences:
1. glTexImage2D() to allocate memory for a 128x128 texture for level 0
2. glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 1);
3. glTexImage2D() to allocate memory for a 128x128 texture for level 1
4. glFramebufferTexture2DEXT() to attach level 1 of this texture 

will get a segment fault.

Reproduce steps:
----------------
1. start X
2. compile and run attached test case


Current result:
----------------
it doesnt' work as expected.


Expected result:
----------------
should not get segment fault
Comment 1 Shuang He 2008-04-06 20:31:38 UTC
backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212086576 (LWP 12151)]
intel_miptree_image_offset (mt=0x0, face=0, level=1) at intel_mipmap_tree.c:358
358        if (mt->target == GL_TEXTURE_CUBE_MAP_ARB)
(gdb) bt
#0  intel_miptree_image_offset (mt=0x0, face=0, level=1)
    at intel_mipmap_tree.c:358
#1  0xb79f232b in intel_render_texture (ctx=0x8055310, fb=0x8345c08,
    att=0x8345e5c) at intel_fbo.c:650
#2  0xb7a5d35e in _mesa_set_texture_attachment (ctx=0x8055310, fb=0x8345c08,
    att=0x8345e5c, texObj=0x8334b60, texTarget=3553, level=1, zoffset=0)
    at main/fbobject.c:207
#3  0xb7a5d626 in framebuffer_texture (ctx=0x8055310,
    caller=<value optimized out>, target=<value optimized out>,
    attachment=36064, textarget=3553, texture=1, level=1, zoffset=0)
    at main/fbobject.c:1245
#4  0xb7a5d7e9 in _mesa_FramebufferTexture2DEXT (target=36160,
    attachment=36064, textarget=3553, texture=1, level=1)
    at main/fbobject.c:1288
#5  0xb7ed7a62 in glFramebufferTexture2DEXT (target=36160, attachment=36064,
    textarget=3553, texture=1, level=1)
    at ../../../src/mesa/glapi/glapitemp.h:5396
#6  0x08048c20 in test () at fbo.c:56
#7  0x08048ca0 in display () at fbo.c:76
#8  0xb7e781ef in processWindowWorkList (window=0x8050e58) at glut_event.c:1306
#9  0xb7e78cc2 in glutMainLoop () at glut_event.c:1353
#10 0x08048d1c in main (argc=1, argv=0xbffbc8c4) at fbo.c:89
Comment 2 Shuang He 2008-04-06 20:33:06 UTC
Created attachment 15730 [details]
xorg conf
Comment 3 Shuang He 2008-04-06 20:33:46 UTC
Created attachment 15731 [details]
xorg log
Comment 4 Shuang He 2008-07-28 19:16:10 UTC
This issue has gone for both i915 and i965 with latest GEM.
Comment 5 Shuang He 2008-07-28 19:16:36 UTC
verified