Bug 17602 - Implementation of min and max in gallium/cell
Summary: Implementation of min and max in gallium/cell
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-15 23:44 UTC by Guillaume Melquiond
Modified: 2009-08-24 12:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Melquiond 2008-09-15 23:44:10 UTC
(Disclaimer: I have no clue about Gallium or Cell, so I may just be confused by the names of the functions.)

The emit_MAX function in cell/ppu/cell_gen_fp.c seems dubious. When s2 >= s1, it correctly returns s2. But when s2 < s1, it returns ~s1 & s2 instead of s1. There is a similar issue for emit_MIN.

As a side note, why not use the selb instruction? (See disclaimer above, perhaps there is no such instruction.)

spe_fcgt(gen->f, d_reg, s2_reg, s1_reg);
spe_selb(gen->f, d_reg, s1_reg, s2_reg, d_reg);
Comment 1 Brian Paul 2008-09-16 06:20:15 UTC
Yes, I spotted these things yesterday.  They'll be fixed.
There may be all kinds of bugs in the driver since it's presently under active development.
Comment 2 Adam Jackson 2009-08-24 12:30:51 UTC
Mass version move, cvs -> git


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.