<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [NVC0/Codegen] Shader compilation falis in spill logic"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=79462">79462</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>nouveau@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[NVC0/Codegen] Shader compilation falis in spill logic
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>imirkin@alum.mit.edu
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/DRI/nouveau
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=100179" name="attach_100179" title="failing tgsi shader">attachment 100179</a> <a href="attachment.cgi?id=100179&action=edit" title="failing tgsi shader">[details]</a></span>
failing tgsi shader

The attached shader fails in the RA step, when inserting spill code:

nv50_ir::SpillCodeInserter::run (this=0x7ffffffec0c0, lst=std::list)
    at codegen/nv50_ir_ra.cpp:1561
1561             while (!dval->uses.empty()) {

Easily reproduced with nouveau_compiler -a c0. Apparently this shader is
generated as part of the d3d9 st, with skyrimlauncher, when it's trying to
detect the graphics card.

dval is null, which means that something out there isn't an lvalue. Or, in this
case, apparently a null value??

(gdb) p *defi
$4 = {_vptr.Instruction = 0x86e570, next = 0x0, prev = 0x0, id = -1, serial =
27, op = nv50_ir::OP_SPLIT, 
  dType = nv50_ir::TYPE_B128, sType = nv50_ir::TYPE_B128, cc = nv50_ir::CC_TR,
rnd = nv50_ir::ROUND_N, 
  cache = nv50_ir::CACHE_CA, subOp = 0, encSize = 0, saturate = 0, join = 0,
fixed = 0, terminator = 0, 
  ftz = 0, dnz = 0, ipa = 0, lanes = 15, perPatch = 0, exit = 0, mask = 0,
postFactor = 0 '\000', 
  predSrc = -1 '\377', flagsDef = -1 '\377', flagsSrc = -1 '\377', sched = 0,
bb = 0x0, 
  defs = std::deque with 4 elements = {{value = 0x0, origin = 0x0, insn =
0x200}, {value = 0x85ce30, 
      origin = 0x7ffff71a0698 <main_arena+88>, insn = 0x9e5e40}, {value = 0x0,
origin = 0x0, 
      insn = 0x9e5e40}, {value = 0x0, origin = 0x0, insn = 0x9e5e40}}, 
  srcs = std::deque with 1 elements = {{mod = {bits = 0 '\000'}, indirect =
"\377\377", 
      swizzle = 0 '\000', usedAsPtr = false, value = 0x0, insn = 0x200}}}

Note that the second def isn't null but the others are? Perhaps this happens as
part of dead code elimination? Need to investigate more.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>