Am 24.07.2017 um 11:44 schrieb Michel Dänzer: > On 14/07/17 10:01 PM, Marek Olšák wrote: >> Reviewed-by: Marek Olšák <[email protected] <mailto:[email protected]>> > > This change broke piglit spec@ext_texture_lod_bias@lodbias for me with > radeonsi (but not with llvmpipe). > >
The S_FIXED function needs some fixing (for r600 too). The compiler takes full advantage of the fact that float to unsigned conversion is undefined for negative floats, apparently. The previous CLAMP would have used the state->lod_bias value if that was equal to the MIN value (-16) (so no way for the compiler to screw it up) whereas now it will use the -16 value. (This also means it was probably broken before, for values which were smaller than the min, albeit possibly noone cared as that would have been outside the advertized lod bias limits.) FWIW gcc generates a really terrible code for this (but that's not really dependent on the new or old macro...) (There's the same macro in mesa/main macros, but with signed numbers.) Roland _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
