Bug 43094

Summary: ir_swizzle @ 0xe134ae0 specifies a channel not present in the value
Product: Mesa Reporter: Ingo Theiss <ingo.theiss>
Component: Mesa coreAssignee: Ian Romanick <idr>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: medium CC: eric
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Ingo Theiss 2011-11-19 09:17:14 UTC
While trying to play the game Ryzom with latest mesa compiled from git the program terminates with error "ir_swizzle @ 0xe134ae0 specifies a channel not present in the value".

Switching back to the stable branch mesa-7.11 (havenĀ“t tried mesa-7.11.1) the error is gone.

My glxinfo:

OpenGL renderer string: Gallium 0.4 on AMD BARTS
OpenGL version string: 2.1 Mesa 7.12-devel (git-ec174a4)
OpenGL shading language version string: 1.20


Here is the backtrace:

Core was generated by `/usr/games/ryzom_client'.
Program terminated with signal 6, Aborted.
#0 0x00007f1c03120405 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht gefunden.
in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) bt
#0 0x00007f1c03120405 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007f1c03123680 in *__GI_abort () at abort.c:92
#2 0x00007f1bfb0423ad in visit_leave (ir=0xdbaf870, this=<optimized out>) at ir_validate.cpp:465
#3 ir_validate::visit_leave (this=<optimized out>, ir=0xdbaf870) at ir_validate.cpp:456
#4 0x00007f1bfb03c0f0 in ir_expression::accept (this=0xdbaf8e0, v=0x7fff048099a0) at ir_hv_accept.cpp:155
#5 0x00007f1bfb03c0f0 in ir_expression::accept (this=0xdbafbd0, v=0x7fff048099a0) at ir_hv_accept.cpp:155
#6 0x00007f1bfb03c0f0 in ir_expression::accept (this=0xdbafcf0, v=0x7fff048099a0) at ir_hv_accept.cpp:155
#7 0x00007f1bfb03c2e6 in ir_swizzle::accept (this=0xdbafd80, v=0x7fff048099a0) at ir_hv_accept.cpp:244
#8 0x00007f1bfb03c2e6 in ir_swizzle::accept (this=0xdbafdf0, v=0x7fff048099a0) at ir_hv_accept.cpp:244
#9 0x00007f1bfb03c0f0 in ir_expression::accept (this=0xdbaff20, v=0x7fff048099a0) at ir_hv_accept.cpp:155
#10 0x00007f1bfb03c0f0 in ir_expression::accept (this=0xdbb0070, v=0x7fff048099a0) at ir_hv_accept.cpp:155
#11 0x00007f1bfb03c4ed in ir_assignment::accept (this=0xdbb0170, v=0x7fff048099a0) at ir_hv_accept.cpp:304
#12 0x00007f1bfb03bf88 in visit_list_elements (statement_list=true, l=0xdbbc1c0, v=0x7fff048099a0)
at ir_hv_accept.cpp:56
#13 ir_function_signature::accept (this=0xdbbc170, v=0x7fff048099a0) at ir_hv_accept.cpp:129
#14 0x00007f1bfb03c044 in visit_list_elements (statement_list=false, l=0xdbbbff0, v=0x7fff048099a0)
at ir_hv_accept.cpp:56
#15 ir_function::accept (this=0xdbbbfc0, v=0x7fff048099a0) at ir_hv_accept.cpp:141
#16 0x00007f1bfb03bd58 in visit_list_elements (v=0x7fff048099a0, l=<optimized out>,
statement_list=<optimized out>) at ir_hv_accept.cpp:56
#17 0x00007f1bfb042942 in validate_ir_tree (instructions=0xdbbf090) at ir_validate.cpp:621
#18 0x00007f1bfafe6533 in create_new_program (key=0x7fff04809b70, ctx=<optimized out>)
at main/ff_fragment_shader.cpp:1472
#19 _mesa_get_fixed_func_fragment_program (ctx=<optimized out>) at main/ff_fragment_shader.cpp:1540
#20 0x00007f1bfaf62890 in update_program (ctx=0x24dd700) at main/state.c:263
#21 _mesa_update_state_locked (ctx=0x24dd700) at main/state.c:676
#22 0x00007f1bfaf6393f in _mesa_update_state (ctx=0x24dd700) at main/state.c:709
#23 0x00007f1bfaec47b9 in _mesa_valid_to_render (ctx=0x24dd700, where=<optimized out>) at main/context.c:1723
#24 0x00007f1bfb060517 in check_valid_to_render (ctx=0x24dd700, function=<optimized out>)
at main/api_validate.c:105
#25 0x00007f1bfb0613b2 in _mesa_validate_DrawElements (ctx=0x24dd700, mode=<optimized out>, count=1494,
type=5123, indices=0x898ff60, basevertex=<optimized out>) at main/api_validate.c:253
#26 0x00007f1bfafb8f42 in vbo_exec_DrawElements (mode=4, count=1494, type=5123, indices=0x898ff60)
at vbo/vbo_exec_array.c:1010
#27 0x00007f1bfc984381 in NL3D::CDriverGL::renderTriangles(NL3D::CMaterial&, unsigned int, unsigned int) ()
from /usr/lib/nel/libnel_drv_opengl.so
---Type <return> to continue, or q <return> to quit---
#28 0x00007f1c05a98b27 in NL3D::CMeshMRMSkinnedGeom::renderSkinGroupSpecularRdrPass(NL3D::CMeshMRMSkinnedInstance*, unsigned int) () from /usr/lib/libnel3d.so.0
#29 0x00007f1c05c7b5cf in NL3D::CSkeletonModel::renderSkinList(NLMISC::CObjectVector<NL3D::CTransform*, false>&, float) () from /usr/lib/libnel3d.so.0
#30 0x00007f1c05c7ba66 in NL3D::CSkeletonModel::renderSkins() () from /usr/lib/libnel3d.so.0
#31 0x00007f1c05c7bc25 in NL3D::CSkeletonModel::traverseRender() () from /usr/lib/libnel3d.so.0
#32 0x00007f1c058f3ae1 in NL3D::CRenderTrav::traverse(NL3D::UScene::TRenderPart, bool) ()
from /usr/lib/libnel3d.so.0
#33 0x00007f1c05a64bc2 in NL3D::CScene::renderPart(NL3D::UScene::TRenderPart, bool) ()
from /usr/lib/libnel3d.so.0
#34 0x00007f1c05a667a9 in NL3D::CScene::render(bool) () from /usr/lib/libnel3d.so.0
#35 0x00007f1c05bd43ce in NL3D::CSceneUser::render(bool, bool) () from /usr/lib/libnel3d.so.0
#36 0x00000000009fcbe8 in CInterface3DScene::draw() ()
#37 0x0000000000a6d6f6 in CInterfaceGroup::draw() ()
#38 0x0000000000bb7388 in CInterfaceManager::drawViews(NL3D::UCamera) ()
#39 0x0000000000bb78e7 in CInterfaceManager::updateFrameViews(NL3D::UCamera) ()
#40 0x00000000006bd407 in globalMenu() ()
#41 0x00000000006bf410 in connection(std::string const&, std::string const&) ()
#42 0x000000000064de65 in main ()

Let me know if you need anything further to track down the error.

Regards,

Ingo
Comment 1 Ingo Theiss 2011-11-23 03:56:31 UTC
After some horrible bisecting I found the patch series which causes the described error.

These commits from Eric at 2011-10-18 break the game Ryzom. 

7ec2b0d0d6b6a0f760e55ffdee0bdb385a3e900a 
mesa: Convert fixed function fragment program generator to GLSL IR.

57f7978b1de40be6eb138d391c8d9f95b68cbf62
mesa: Add a flag for shader programs to allow SSO linkage in GLES2.

f868cb09639d69acbc900842263ac2d28b60bcc0
glsl: Add gl_CurrentAttrib{Vert,Frag}MESA internal builtin uniforms.	 

b64ecf7db874eed84218903f484be81514b958d9
ff_fragment_shader: Use FRAG_RESULT_COLOR to write all our colors at once.

I have added Eric to Cc List for notice.
Comment 2 Ian Romanick 2013-01-30 00:53:08 UTC
Does this bug still occur?  It sounds like bug #42517.  If it's the same, it should have been fixed (ages ago) by commit:

commit 6f5c73797087c6e7842665f84e41caedea59bb65
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Mon Nov 7 10:58:00 2011 -0800

    glsl: Clamp vector indices when lowering to swizzles
    
    This prevents other code from seeing a swizzle of the 16th component
    of a vector, for example.
    
    NOTE: This is a candidate for the 7.11 branch.
    
    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42517
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Paul Berry <stereotype441@gmail.com>
    Tested-by: Christian Holler <choller@mozilla.com>

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.