<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - glDrawElements: Invalid cast!"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=106824">106824</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>glDrawElements: Invalid cast!
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>18.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>major
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/Gallium/swr
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>milan.jaros@vsb.cz
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=140029" name="attach_140029" title="example of using glDrawElements">attachment 140029</a> <a href="attachment.cgi?id=140029&action=edit" title="example of using glDrawElements">[details]</a></span>
example of using glDrawElements

The program "test" (see the attachment) crashes with this error:

[login3]$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${PWD}/install/mesa1811/lib
[login3]$ export GALLIUM_DRIVER=swr
[login3]$ ml LLVM/4.0.0-GCC-6.3.0-2.27  #or "ml LLVM/5.0.0-GCC-6.3.0-2.27"
[login3]$ g++ hellogl.cpp -o test -lglut -lGL ; ./test

SWR detected AVX2 instruction support (using: libswrAVX2.so).

test:
/apps/easybuild/build/LLVM/4.0.0/GCC-6.3.0-2.27/llvm-4.0.0.src/lib/IR/Instructions.cpp:2592:
static llvm::CastInst* llvm::CastInst::Create(llvm::Instruction::CastOps,
llvm::Value*, llvm::Type*, const llvm::Twine&, llvm::Instruction*): Assertion
`castIsValid(op, S, Ty) && "Invalid cast!"' failed.
Aborted (core dumped)

Thank you for your help.
Milan</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>