VirtualBox

Ignore:
Timestamp:
Sep 16, 2013 7:52:03 PM (11 years ago)
Author:
vboxsync
Message:

wined3d: copysingf fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/glsl_shader.c

    r48345 r48500  
    5151#  define copysignf _copysignf
    5252# else
    53 #  define _VBOX_FLOAT_BITVAL(_f) (*((const uint32_t*)((const void*)(&(_f)))))
     53#  define _VBOX_BITVAL_CAST(_t, _f) (*((const _t*)((const void*)(&(_f)))))
     54#  define _VBOX_BITVAL_TO_FLOATL(_f) _VBOX_BITVAL_CAST(float, _f)
     55#  define _VBOX_BITVAL_FROM_FLOAT(_f) _VBOX_BITVAL_CAST(uint32_t, _f)
    5456DECLINLINE(float) copysignf(float val, float sign)
    5557{
    56     return ((_VBOX_FLOAT_BITVAL(val) & 0x7fffffff) | (_VBOX_FLOAT_BITVAL(sign) & 0x80000000));
     58    uint32_t u32Val = ((_VBOX_BITVAL_FROM_FLOAT(val) & 0x7fffffff) | (_VBOX_BITVAL_FROM_FLOAT(sign) & 0x80000000));
     59    return _VBOX_BITVAL_TO_FLOATL(u32Val);
    5760}
    5861# endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette