[Bug 104760] System hang when use glTexImage3D to specify a 3D texture image
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Jan 24 04:39:32 UTC 2018
https://bugs.freedesktop.org/show_bug.cgi?id=104760
Bug ID: 104760
Summary: System hang when use glTexImage3D to specify a 3D
texture image
Product: Mesa
Version: 17.2
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/DRI/i965
Assignee: intel-3d-bugs at lists.freedesktop.org
Reporter: xinghua.cao at intel.com
QA Contact: intel-3d-bugs at lists.freedesktop.org
Created attachment 136929
--> https://bugs.freedesktop.org/attachment.cgi?id=136929&action=edit
text3dsizelimit.c
Produce steps:
1. Attached file is the C source code;
2. Build the source file(I built it on Ubuntu 17.10, IntelĀ® HD Graphics
(Coffeelake 3x8 GT2)), "gcc -o tex3dsizelimit tex3dsizelimit.c -lX11 -lepoxy";
3. run "./tex3dsizelimit", system hangs.
Actually, this issue reported form WebGL Conformance Tests. If you want to
reproduce this issue on chrome, follow below steps:
1. Download latest chrome and install it on Ubuntu 17.10.
2. Open chrome, and open the link,
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/misc/tex-3d-size-limit.html?webglVersion=2&quiet=0
3. system also hangs.
I had checked the linux kernel log, and it report some messages as below:
tex3dsizelimit: page allocation stalls for 32092ms, order:0,
mode:0x14204d2(GFP_HIGHUSER|__GFP_RETRY_MAYFAIL|__GFP_RECLAIMABLE),
nodemask=(null)
The root cause seemed that could not alloc big memory for texture image.
In this case, calls TexImage3D to specify the texture image from level
maxLevels to level 0.
for(int i = 0; i < maxLevels; i++)
{
int size = 1 << i;
int level = maxLevels - i - 1;
glTexImage3D(GL_TEXTURE_3D, level, GL_RGBA, size, 1, 1, 0, GL_RGBA,
GL_UNSIGNED_BYTE, NULL);
}
If calls TexImage3D to specify the texture image from level 0 to level
maxLevels, the system will not hang.
Is there different memory alloc memory machanism between these two situations?
Is every TexImage3D call realloc a new and entire texture images?
Or may I not follow spec to use TexImage3D?
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20180124/0bd23218/attachment.html>
More information about the intel-3d-bugs
mailing list