[Mesa-dev] [PATCH 05/16] i965: Fix bitcast operations with negate
Iago Toral
itoral at igalia.com
Thu Dec 11 23:11:03 PST 2014
On Thu, 2014-12-11 at 16:52 -0800, Kenneth Graunke wrote:
> On Thursday, December 11, 2014 11:34:11 PM Eduardo Lima Mitev wrote:
> > From: Iago Toral Quiroga <itoral at igalia.com>
> >
> > For code such as this in a vertex or fragment shader:
> >
> > uniform float in0;
> > flat out float out0;
> > ...
> > out0 = ceil(in0)
> >
> > We generate this IR:
> >
> > (assign (x) (var_ref packed:out0)
> > (expression int bitcast_f2i
> > (expression float ceil (var_ref in0) ) ) )
> >
> > In i965, this would eventually become:
> >
> > rndd(8) g14<1>.xF -g3<0,4,1>.xF
> > mov(8) g6<1>.xD -g14<4,4,1>.xD
> > mov(8) g116<1>D g6<4,4,1>D
>
> Weird...it does indeed use RNDD. Shouldn't it use RNDU instead?
Right, that is what I thought too but then I realized that RNDU isn't
even defined in brw_fs.h so I figured that maybe there was a reason for
that. The implementation with RNDD does work though...
Iago
More information about the mesa-dev
mailing list