<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 - Strange splashRound behaviour that sometimes causes all white render on windows."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=91188">91188</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Strange splashRound behaviour that sometimes causes all white render on windows.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>poppler
          </td>
        </tr>

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

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

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

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

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

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

        <tr>
          <th>Component</th>
          <td>splash backend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>poppler-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>lztoad@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=116871" name="attach_116871" title="Suggested patch">attachment 116871</a> <a href="attachment.cgi?id=116871&action=edit" title="Suggested patch">[details]</a></span>
Suggested patch

With USE_FLOAT=ON on windows the splashRound from splash/SplashMath.h always
returns 0. So it renders all white pdfs.

It is caused by the line

 __asm fld QWORD PTR x

Looks like for floats it should be.

 __asm fld DWORD PTR x

I don't know assembler, so have no idea why (and, actually, if, I haven't
compiled it for LNX) it is working with GCC for double and float values with
"fldl   %4" and is it safe.

Strange is that there is no workaround, like in the other rounding functions in
the file. That is, like

#elif USE_FLOAT
  return (int)roundf(x);

So, actually maybe it is better to use this method to fix the issue and not the
attached patch.
Attached is the patch to change the windows assembly code.</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>