Author: tfaber
Date: Thu Apr 26 17:20:53 2012
New Revision: 56432
URL:
http://svn.reactos.org/svn/reactos?rev=56432&view=rev
Log:
[WINED3D]
- Do not rely on undefined behavior to get values easily accessible as constants.
- Quick build fix. Will be sent to Wine, possibly modified.
Modified:
trunk/reactos/dll/directx/wine/CMakeLists.txt
trunk/reactos/dll/directx/wine/wined3d/state.c
trunk/reactos/dll/directx/wine/wined3d/wined3d_private.h
Modified: trunk/reactos/dll/directx/wine/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/CMakeList…
==============================================================================
--- trunk/reactos/dll/directx/wine/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/CMakeLists.txt [iso-8859-1] Thu Apr 26 17:20:53 2012
@@ -23,6 +23,4 @@
add_subdirectory(d3dx9_41)
add_subdirectory(d3dx9_42)
add_subdirectory(ddraw)
-if(NOT MSVC)
- add_subdirectory(wined3d)
-endif()
+add_subdirectory(wined3d)
Modified: trunk/reactos/dll/directx/wine/wined3d/state.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/wined3d/s…
==============================================================================
--- trunk/reactos/dll/directx/wine/wined3d/state.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/wined3d/state.c [iso-8859-1] Thu Apr 26 17:20:53 2012
@@ -1042,7 +1042,7 @@
fogend = tmpvalue.f;
/* In GL, fogstart == fogend disables fog, in D3D everything's fogged.*/
if(fogstart == fogend) {
- fogstart = -1.0f / 0.0f;
+ fogstart = -INFINITY;
fogend = 0.0f;
}
break;
Modified: trunk/reactos/dll/directx/wine/wined3d/wined3d_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/wined3d/w…
==============================================================================
--- trunk/reactos/dll/directx/wine/wined3d/wined3d_private.h [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/wined3d/wined3d_private.h [iso-8859-1] Thu Apr 26
17:20:53 2012
@@ -199,8 +199,8 @@
} else if(e < 31) {
return sgn * powf(2, (float)e - 15.0f) * (1.0f + ((float)m / 1024.0f));
} else {
- if(m == 0) return sgn / 0.0f; /* +INF / -INF */
- else return 0.0f / 0.0f; /* NAN */
+ if(m == 0) return sgn * INFINITY; /* +INF / -INF */
+ else return NAN; /* NAN */
}
}
@@ -221,8 +221,8 @@
}
else
{
- if (m == 0) return sgn / 0.0f; /* +INF / -INF */
- else return 0.0f / 0.0f; /* NAN */
+ if (m == 0) return sgn * INFINITY; /* +INF / -INF */
+ else return NAN; /* NAN */
}
}