[Mesa-dev] [Bug 66850] New: glGenerateMipmap crashes when using GL_TEXTURE_2D_ARRAY with compressed internal format

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jul 12 03:59:54 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=66850

          Priority: medium
            Bug ID: 66850
          Assignee: mesa-dev at lists.freedesktop.org
           Summary: glGenerateMipmap crashes when using
                    GL_TEXTURE_2D_ARRAY with compressed internal format
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: mikjuo at gmail.com
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: git
         Component: Mesa core
           Product: Mesa

Created attachment 82363
  --> https://bugs.freedesktop.org/attachment.cgi?id=82363&action=edit
Test program, using GLUT, to reproduce the crash

At least happens on Mesa commit id 1681bd7f2b392d0b379cb0ff43a4fac33da74762 and
also on Mesa 9.1.4 that is in Debian testing repositories at the moment.

I have attached a short test program to reproduce the crash.

The crash occurs if you create and put data to a GL_TEXTURE_2D_ARRAY, using a
compressed texture format, while the number of textures in the array is greater
than 1 and then call glGenerateMipmap.

I'm not entirely sure if you are supposed to be able to generate mipmaps with
glGenerateMipmap if the zero layer texture is in compressed format but I'd
think it should at least fail gracefully, if this is the case.



This is what I could get out of GDB:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff452bd38 in do_row (datatype=5121, comps=3, srcWidth=128,
srcRowA=0x7fffffffee90, srcRowB=0x7ffffffff010, dstWidth=64, dstRow=0x90ffc0)
at ../../../src/mesa/main/mipmap.c:183
183             dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0])
/ 4;
(gdb) bt
#0  0x00007ffff452bd38 in do_row (datatype=5121, comps=3, srcWidth=128,
srcRowA=0x7fffffffee90, srcRowB=0x7ffffffff010, dstWidth=64, dstRow=0x90ffc0)
at ../../../src/mesa/main/mipmap.c:183
#1  0x00007ffff453992b in make_2d_mipmap (datatype=5121, comps=3, border=0,
srcWidth=128, srcHeight=128, srcPtr=0x7fffffffe590 "", srcRowStride=384,
dstWidth=64, dstHeight=64, 
    dstPtr=0x90fd80 "Sz_\002\023\225_37#", dstRowStride=192) at
../../../src/mesa/main/mipmap.c:1475
#2  0x00007ffff453a7f2 in _mesa_generate_mipmap_level (target=35866,
datatype=5121, comps=3, border=0, srcWidth=128, srcHeight=128, srcDepth=2,
srcData=0x7fffffffe570, srcRowStride=384, 
    dstWidth=64, dstHeight=64, dstDepth=2, dstData=0x7fffffffe568,
dstRowStride=192) at ../../../src/mesa/main/mipmap.c:1750
#3  0x00007ffff453b39f in generate_mipmap_compressed (ctx=0x621170,
target=35866, texObj=0x8c1780, srcImage=0x8ede50, maxLevel=13) at
../../../src/mesa/main/mipmap.c:2121
#4  0x00007ffff453b55b in _mesa_generate_mipmap (ctx=0x621170, target=35866,
texObj=0x8c1780) at ../../../src/mesa/main/mipmap.c:2180
#5  0x00007ffff46aa33c in _mesa_meta_GenerateMipmap (ctx=0x621170,
target=35866, texObj=0x8c1780) at ../../../src/mesa/drivers/common/meta.c:3527
#6  0x00007ffff44f08e2 in _mesa_GenerateMipmap (target=35866) at
../../../src/mesa/main/fbobject.c:2889
#7  0x00007ffff796c527 in glGenerateMipmap (target=35866) at
../../../src/mapi/glapi/glapi_mapi_tmp.h:8178
#8  0x0000000000400954 in main (argc=1, argv=0x7fffffffe8b8) at
test_program.c:31

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130712/9796611f/attachment.html>


More information about the mesa-dev mailing list