<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Bad int(floatBitsToInt(vec4))"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89508#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Bad int(floatBitsToInt(vec4))"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89508">bug 89508</a>
from <span class="vcard"><a class="email" href="mailto:itoral@igalia.com" title="Iago Toral <itoral@igalia.com>"> <span class="fn">Iago Toral</span></a>
</span></b>
<pre>(In reply to Marc-Andre Lureau from <a href="show_bug.cgi?id=89508#c0">comment #0</a>)
<span class="quote">> Created <span class=""><a href="attachment.cgi?id=114179" name="attach_114179" title="Piglit shader test">attachment 114179</a> <a href="attachment.cgi?id=114179&action=edit" title="Piglit shader test">[details]</a></span>
> Piglit shader test
>
> The attached piglit shader test fails with the i965 driver, and works with
> softpipe. The line:
>
> addr0 = int(floatBitsToInt(temps[10].xxxx));
>
> always retuns 0.</span >
mmm... this is not what I see, if addr0 is always 0, then result should be a
red color (0.8, 0, 0, 0) and I see black (0.0, 0.0, 0.0, 0.0).
Just in case it helps, the expected execution of this to produce the expected
result should look like this:
Init:
temp[0] = 0.2,0,0,0 * 1,1,1,1 = 0.2,0,0,0
temp[9] = 0,0,0,0
temp[10] = 0,0,0,0
It0:
addr = 0
temp[addr] = 0.2,0,0,0
temps[9] = 0.2,0,0,0
temps[10].x = i2f(0,0,0,0 + 1,1,1,1).x = i2f(1,1,1,1).x = 1.45e-45
temps[10] = 1.4e-45,0.0.0
It1:
temp[11].x = 0
addr = 1
temp[addr] = 0,0.2,0.0 * 1,1,1,1 = 0,0.2,0,0
temps[9] = 0.2,0.2,0,0
temps[10].x = i2f(1,1,1,1 + 1,1,1,1).x = i2f(2,2,2,2).x = 2.8e-45
temps[10] = 2.8e-45,0.0.0
It2:
temp[11].x = 0
addr = 2
temp[addr] = 0,0,0.2.0 * 1,1,1,1 = 0,0,0.2,0
temps[9] = 0.2,0.2,0.2,0
temps[10].x = i2f(2,2,2,2 + 1,1,1,1).x = i2f(3,3,3,3).x = 4.2e-45
temps[10] = 4.2e-45,0.0.0
It3:
temp[11].x = 0
addr = 3
temp[addr] = 0.2,0.2,0,0 * 1,1,1,1 = 0.2,0.2,0,0
temps[9] = 0.4,0.4,0.2,0
temps[10].x = i2f(3,3,3,3 + 1,1,1,1).x = i2f(4,4,4,4).x = 5.6e-45
temps[10] = 5.6e-45,0.0.0
It4:
temp[11] = 1 => break;
Expected color = temp[9] = 0.4,0.4,0.2,0.0
I'll try to simplify the shader code, seems like it should be possible. If I am
successful I'll attach a new version.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>