I've had a look at it and come with more efficient variants of the two opcodes. Actually, we don't need the native r5xx SGT instruction, not idea why it exists. See the commit <a href="http://cgit.freedesktop.org/mesa/mesa/commit/?id=f0896e7f80c2c00d263b3ecd7bb18dfffa9a01a8" target="_blank">f0896e7f80c2c00d263b3ecd7bb18dfffa9a01a8</a>.<br>
<br>Anyway, thank you for the (bug) report.<br><br>-Marek<br><br><div class="gmail_quote">On Tue, May 25, 2010 at 9:25 PM, gianluca <span dir="ltr"><<a href="mailto:gianluca@sottospazio.it" target="_blank">gianluca@sottospazio.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>On Tue, May 25, 2010 at 11:57:23AM +0200, Marek Olšák wrote:<br>
> The patch looks good but it's r5xx-only. I'll commit this when an r3xx<br>
> version is implemented too.<br>
<br>
</div>yes I realized that the opcode is R500 only. I've taken a different approach<br>
using transformations which works too, but I don't know if it's acceptable.<br>
<br>
I'm attaching the patch which also handles the SLE case.<br>
<div><div></div><div><br>
><br>
> -Marek<br>
><br>
> On Mon, May 24, 2010 at 6:00 PM, Gianluca Anzolin<br>
> <<a href="mailto:gianluca@sottospazio.it" target="_blank">gianluca@sottospazio.it</a>>wrote:<br>
><br>
> > Hello,<br>
> ><br>
> > Yesterday I was trying to run an example taken from chapter 6 of the book<br>
> > OpenGl<br>
> > Shading Language with the new gallium driver (I have a RV570 graphic card),<br>
> > but<br>
> > I got this error when compiling the vertex shader: Unknown opcode 35.<br>
> ><br>
> > Digging in the source code I found that the opcode 35 is for the > operator<br>
> > between two vectors (RC_OPCODE_SGT). It's related to the following vertex<br>
> > shader code:<br>
> ><br>
> > if (diffuse > 0.0)<br>
> > {<br>
> > spec = max(dot(reflectVec, viewVec), 0.0);<br>
> > spec = pow(spec, 16.0);<br>
> > }<br>
> ><br>
> ><br>
> ><br>
> > When I changed the comparison to ">=" the problem disappeared. Infact there<br>
> > is<br>
> > no switch case for RC_OPCODE_SGT in the file r3xx_vertprog.c. I added that<br>
> > case<br>
> > to the switch statement (see the patch attached) and I got it working even<br>
> > with<br>
> > the ">" operator.<br>
> ><br>
> > I hope the patch is correct, if there is a better fix I'd really like to<br>
> > know.<br>
> ><br>
> > Thanks,<br>
> ><br>
> > Gianluca<br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > mesa-dev mailing list<br>
> > <a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
> > <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
> ><br>
> ><br>
</div></div></blockquote></div><br>