[Mesa-dev] [Bug 36919] Yo Frankie: Crash in dst_register

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue May 10 05:46:02 PDT 2011


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

--- Comment #12 from José Fonseca <jfonseca at vmware.com> 2011-05-10 05:46:02 PDT ---
I reproduced the bug here:

(gdb) bt
#0  0x00007ffff681aaa7 in _debug_assert_fail (expr=0x7ffff70285d7 "reg.File !=
TGSI_FILE_NULL", 
    file=0x7ffff70285b0 "src/gallium/auxiliary/tgsi/tgsi_ureg.h", line=863,
function=0x7ffff7028c51 "ureg_writemask")
    at src/gallium/auxiliary/util/u_debug.c:282
#1  0x00007ffff6765607 in ureg_writemask (reg=..., writemask=7) at
src/gallium/auxiliary/tgsi/tgsi_ureg.h:863
#2  0x00007ffff6766667 in translate_dst (t=0x7fffffffc1d0, DstReg=0xd217f34,
saturate=0 '\000') at src/mesa/state_tracker/st_mesa_to_tgsi.c:310
#3  0x00007ffff6767699 in compile_instruction (t=0x7fffffffc1d0,
inst=0xd217f18) at src/mesa/state_tracker/st_mesa_to_tgsi.c:673
#4  0x00007ffff67691bb in st_translate_mesa_program (ctx=0xf444b0, procType=0,
ureg=0xf3ef2d0, program=0x111b7010, numInputs=2, 
    inputMapping=0x7fffffffd3a0, inputSemanticName=0x7fffffffd4b0 "\001\003",
<incomplete sequence \372>, inputSemanticIndex=0x7fffffffd490 "", 
    interpMode=0x7fffffffd320, numOutputs=0, outputMapping=0x7fffffffd420,
outputSemanticName=0x7fffffffd470 "\002", 
    outputSemanticIndex=0x7fffffffd450 "\240\324\377\377\377\177",
passthrough_edgeflags=0 '\000') at
src/mesa/state_tracker/st_mesa_to_tgsi.c:1230
#5  0x00007ffff66a48c0 in st_translate_fragment_program (st=0xf94810,
stfp=0x111b7010, key=0x7fffffffd5a0) at src/mesa/state_tracker/st_program.c:609
#6  0x00007ffff66a4a23 in st_get_fp_variant (st=0xf94810, stfp=0x111b7010,
key=0x7fffffffd5a0) at src/mesa/state_tracker/st_program.c:667
#7  0x00007ffff674dc6d in update_fp (st=0xf94810) at
src/mesa/state_tracker/st_atom_shader.c:86
#8  0x00007ffff6749e05 in st_validate_state (st=0xf94810) at
src/mesa/state_tracker/st_atom.c:196
#9  0x00007ffff67559ed in st_Clear (ctx=0xf444b0, mask=16) at
src/mesa/state_tracker/st_cb_clear.c:497
#10 0x00007ffff66cb7df in _mesa_Clear (mask=256) at src/mesa/main/clear.c:250
#11 0x00000000006fbd36 in KX_KetsjiEngine::RenderShadowBuffers(KX_Scene*) ()
#12 0x00000000006fc1f3 in KX_KetsjiEngine::Render() ()
#13 0x000000000055ef12 in GPG_Application::processEvent(GHOST_IEvent*) ()
#14 0x000000000056be14 in GHOST_EventManager::dispatchEvent(GHOST_IEvent*) ()
#15 0x000000000056bd1d in GHOST_EventManager::dispatchEvent() ()
#16 0x000000000056bd6c in GHOST_EventManager::dispatchEvents() ()
#17 0x000000000056b548 in GHOST_System::dispatchEvents() ()
#18 0x000000000055d906 in main ()
(gdb) call _mesa_print_instruction(&program->Instructions[i])
LRP OUTPUT[2].xyz, TEMP[1].xxxx, TEMP[0], STATE[1];
(gdb) call _mesa_print_program(program)
# Fragment Program/Shader 0
  0: MAD_SAT TEMP[1].x, INPUT[3].xxxx, STATE[0].xxxx, STATE[0].yyyy;
  1: LRP OUTPUT[2].xyz, TEMP[1].xxxx, TEMP[0], STATE[1];
  2: MOV OUTPUT[2].w, TEMP[0];
  3: END
(gdb) 

The problem is that stfp->Base.Base.OutputsWritten is 0, which causes
st_translate_mesa_program() is receiving a bad numOutputs=0, and eventually the
assertion.


(gdb) p stfp->Base.Base.OutputsWritten
$18 = 0
(gdb) p stfp->Base.Base
$19 = {
  Id = 0, 
  String = 0x0, 
  RefCount = 3, 
  Target = 34820, 
  Format = 34933, 
  Resident = 1 '\001', 
  Instructions = 0xd217ed0, 
  InputsRead = 10, 
  OutputsWritten = 0, 
  SystemValuesRead = 0, 
  InputFlags = {0 <repeats 32 times>}, 
  OutputFlags = {0 <repeats 64 times>}, 
  TexturesUsed = {0 <repeats 16 times>}, 
  SamplersUsed = 0, 
  ShadowSamplers = 0, 
  Parameters = 0xc8e2a90, 
  LocalParams = {{0, 0, 0, 0} <repeats 1024 times>}, 
  Varying = 0x0, 
  Attributes = 0x0, 
  SamplerUnits = "\000\001\002\003\004\005\006\a\b\t\n\v\f\r\016\017", 
  SamplerTargets = {TEXTURE_BUFFER_INDEX <repeats 16 times>}, 
  IndirectRegisterFiles = 0, 
  NumInstructions = 4, 
  NumTemporaries = 2, 
  NumParameters = 0, 
  NumAttributes = 0, 
  NumAddressRegs = 0, 
  NumAluInstructions = 1, 
  NumTexInstructions = 0, 
  NumTexIndirections = 1, 
  NumNativeInstructions = 0, 
  NumNativeTemporaries = 0, 
  NumNativeParameters = 0, 
  NumNativeAttributes = 0, 
  NumNativeAddressRegs = 0, 
  NumNativeAluInstructions = 0, 
  NumNativeTexInstructions = 0, 
  NumNativeTexIndirections = 0
}

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the mesa-dev mailing list