Module: wine
Branch: master
Commit: 5fcce569ceca651cdf7e62c2853796a29af420fc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5fcce569ceca651cdf7e62c28…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Aug 31 02:31:09 2007 +0200
bcrypt: Add a skeleton bcrypt.h header and use it.
---
include/Makefile.in | 1 +
include/bcrypt.h | 43 +++++++++++++++++++++++++++++++++++++++++++
include/wincrypt.h | 2 +-
3 files changed, 45 insertions(+), 1 deletions(-)
diff --git a/include/Makefile.in b/include/Makefile.in
index bc48cfe..4607006 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -78,6 +78,7 @@ SRCDIR_INCLUDES = \
axextend.idl \
basetsd.h \
basetyps.h \
+ bcrypt.h \
cderr.h \
cfgmgr32.h \
cguid.h \
diff --git a/include/bcrypt.h b/include/bcrypt.h
new file mode 100644
index 0000000..a3d7fe0
--- /dev/null
+++ b/include/bcrypt.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2007 Francois Gouget
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_BCRYPT_H
+#define __WINE_BCRYPT_H
+
+#ifndef WINAPI
+#define WINAPI __stdcall
+#endif
+
+#ifndef IN
+#define IN
+#endif
+
+#ifndef OUT
+#define OUT
+#endif
+
+#ifndef OPTIONAL
+#define OPTIONAL
+#endif
+
+#ifndef WINE_NTSTATUS_DECLARED
+#define WINE_NTSTATUS_DECLARED
+typedef LONG NTSTATUS;
+#endif
+
+#endif /* __WINE_BCRYPT_H */
diff --git a/include/wincrypt.h b/include/wincrypt.h
index 93e9459..3213b4a 100644
--- a/include/wincrypt.h
+++ b/include/wincrypt.h
@@ -24,7 +24,7 @@
extern "C" {
#endif
-/* FIXME: #include <bcrypt.h> */
+#include <bcrypt.h>
/* FIXME: #include <ncrypt.h> */
/* some typedefs for function parameters */
Module: wine
Branch: master
Commit: 75f9bf43be46a3f9ee37b04312c8e799001fa90a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=75f9bf43be46a3f9ee37b0431…
Author: Stefan Dösinger <stefandoesinger(a)gmx.at>
Date: Wed Aug 29 20:16:13 2007 +0200
wined3d: Raise the 1x pixelshader max value to the d3d minimum.
---
dlls/wined3d/directx.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 5bf0ae8..e199f36 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -2204,12 +2204,23 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
*pCaps->PixelShaderVersion = WINED3DPS_VERSION(2,0);
else
*pCaps->PixelShaderVersion = WINED3DPS_VERSION(3,0);
- /* FIXME: The following line is card dependent. -1.0 to 1.0 is a safe default clamp range for now */
- *pCaps->PixelShader1xMaxValue = 1.0;
+ /* FIXME: The following line is card dependent. -8.0 to 8.0 is the
+ * Direct3D minimum requirement.
+ *
+ * Both GL_ARB_fragment_program and GLSL require a "maximum representable magnitude"
+ * of colors to be 2^10, and 2^32 for other floats. Should we use 1024 here?
+ *
+ * The problem is that the refrast clamps temporary results in the shader to
+ * [-MaxValue;+MaxValue]. If the card's max value is bigger than the one we advertize here,
+ * then applications may miss the clamping behavior. On the other hand, if it is smaller,
+ * the shader will generate incorrect results too. Unfortunately, GL deliberately doesn't
+ * offer a way to query this.
+ */
+ *pCaps->PixelShader1xMaxValue = 8.0;
TRACE_(d3d_caps)("Hardware pixel shader version 3.0 enabled (GLSL)\n");
} else if (ps_selected_mode == SHADER_ARB) {
*pCaps->PixelShaderVersion = WINED3DPS_VERSION(1,4);
- *pCaps->PixelShader1xMaxValue = 1.0;
+ *pCaps->PixelShader1xMaxValue = 8.0;
TRACE_(d3d_caps)("Hardware pixel shader version 1.4 enabled (ARB_PROGRAM)\n");
} else {
*pCaps->PixelShaderVersion = 0;