<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 - nv50ir: isImmediate doesn't properly work for integers if Value is typed as float"
href="https://bugs.freedesktop.org/show_bug.cgi?id=102382">102382</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>nv50ir: isImmediate doesn't properly work for integers if Value is typed as float
</td>
</tr>
<tr>
<th>Product</th>
<td>xorg
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>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>Driver/nouveau
</td>
</tr>
<tr>
<th>Assignee</th>
<td>nouveau@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>karolherbst@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>xorg-team@lists.x.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=133728" name="attach_133728" title="TGSI">attachment 133728</a> <a href="attachment.cgi?id=133728&action=edit" title="TGSI">[details]</a></span>
TGSI
codegen should generate a texfetch instruction with a lod according to
IMM[1].xxxx, which is of value 2, but in
<a href="https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp#n140">https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp#n140</a>
the isInteger(0) call assumes the Value being a F32, which leads to a is
2.8E-45 == 0 check returning true resulting into the lod argument being removed
from texfetch.
This causes a fail in the KHR-GL44.robust_buffer_access_behavior.texel_fetch
CTS test.
Other isInteger calls might be broken as well where an immediate of type float
is interpreted as int by the instruction.</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>