Can you use the fe* class of functions for this? Not entirely sure what this is setting, but you should be able to do it with fegetenv/fesetenv, or the more specialized functions.
On Fri, Apr 24, 2015 at 4:09 PM, Axel Davy <axel.d...@ens.fr> wrote: > From: Tiziano Bacocco <tizb...@gmail.com> > > Signed-off-by: Tiziano Bacocco <tizb...@gmail.com> > --- > src/gallium/state_trackers/nine/device9.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/src/gallium/state_trackers/nine/device9.c > b/src/gallium/state_trackers/nine/device9.c > index 1a776a7..4ef02bb 100644 > --- a/src/gallium/state_trackers/nine/device9.c > +++ b/src/gallium/state_trackers/nine/device9.c > @@ -53,6 +53,18 @@ > > #define DBG_CHANNEL DBG_DEVICE > > +static void nine_setup_fpu(void) > +{ > +#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) > + WORD cw; > + __asm__ volatile ("fnstcw %0" : "=m" (cw)); > + cw = (cw & ~0xf3f) | 0x3f; > + __asm__ volatile ("fldcw %0" : : "m" (cw)); > +#else > + WARN_ONCE("FPU setup not supported on non-x86 platforms\n"); > +#endif > +} > + > static void > NineDevice9_SetDefaultState( struct NineDevice9 *This, boolean is_reset ) > { > @@ -168,6 +180,9 @@ NineDevice9_ctor( struct NineDevice9 *This, > IDirect3D9_AddRef(This->d3d9); > ID3DPresentGroup_AddRef(This->present); > > + if (!(This->params.BehaviorFlags & D3DCREATE_FPU_PRESERVE)) > + nine_setup_fpu(); > + > This->pipe = This->screen->context_create(This->screen, NULL); > if (!This->pipe) { return E_OUTOFMEMORY; } /* guess */ > > -- > 2.1.0 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev