<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 - Shader Disk Cache 32/64 bit detection has a flaw. Missed existence of x32 ABI"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=100073">100073</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Shader Disk Cache 32/64 bit detection has a flaw.  Missed existence of x32 ABI
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

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

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

        <tr>
          <th>Severity</th>
          <td>critical
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Mesa core
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>oiaohm@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre><a href="https://cgit.freedesktop.org/mesa/mesa/commit/?id=11f0efec2e615f5233defdd8ca9693c54ea49b1f">https://cgit.freedesktop.org/mesa/mesa/commit/?id=11f0efec2e615f5233defdd8ca9693c54ea49b1f</a>

This is the commit with the problem.


<a href="https://en.wikipedia.org/wiki/X32_ABI">https://en.wikipedia.org/wiki/X32_ABI</a>

This explains X32_ABI is.   I don't know if anything else like this is around
where (void *) will return 4 and there will be a different register count and
different functionality.   This will be important for software rendering
pre-building shades in cases where X32_ABI is being used to get the most
performance.    Yes Linux you can run a 32 bit and a x32 and a 64 bit at the
same time. 

As far as I know Linux is the only thing with this third mode.

I don't know what an acceptable test would be to split X32 and 32bit as they
need to be.   This is a platform particular thing.


I don't know if there are any other OS modes with different register counts and
functionality that will return the same size pointer with.

get_arch_bitness_str as function maybe totally wrong.   
<a href="https://wiki.debian.org/X32Port">https://wiki.debian.org/X32Port</a>
In fact I am not sure if this code for bitness is right at all.

Normal convention is that 32 bit code calls 32 bit libraries.  64 bit code
calls 64 bit libraries and x32 code calls x32 libraries.
So you short out this bitness stuff with complier preprocessor flags at build
time no runtime code.   As what is recommend on the Debian site.

The current code is depending on complier solving out what may not happen in
all cases so result in a pointless waste of cpu time.

So I have this horible feeling the complete patch is wrong because it
disobeying conventions.   This is why I set this to All I don't believe this
patch is right for any platform in it current form as it depending on the
complier to transform it out by optimisation.

Yes writing it using preprocessor macros for all the platforms is a pain but
that will always solve out and would be good in a header shared.

I know a lot resort to runtime testing but with items like X32 this is not
wise.</pre>
        </div>
      </p>


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

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