wined3d: Add a registry key to allow/disallow multisampling.

Right now it is set to disabled due to an Nvidia GLXBadDrawable
bug. Second there is some issue (driver bug too?) in FBO mode.
This commit is contained in:
Roderick Colenbrander 2008-06-02 21:06:01 +00:00 committed by Alexandre Julliard
parent cd7825c893
commit 042d0394dc
3 changed files with 17 additions and 1 deletions

View file

@ -1775,6 +1775,12 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, U
if (WINED3DMULTISAMPLE_NONE == MultiSampleType) return WINED3D_OK;
/* By default multisampling is disabled right now as it causes issues
* on some Nvidia driver versions and it doesn't work well in combination
* with FBOs yet. */
if(!wined3d_settings.allow_multisampling)
return WINED3DERR_NOTAVAILABLE;
desc = getFormatDescEntry(SurfaceFormat, &Adapters[Adapter].gl_info, &glDesc);
if(!desc || !glDesc) {
return WINED3DERR_INVALIDCALL;

View file

@ -44,7 +44,8 @@ wined3d_settings_t wined3d_settings =
ORM_BACKBUFFER, /* Use the backbuffer to do offscreen rendering */
RTL_AUTO, /* Automatically determine best locking method */
0, /* The default of memory is set in FillGLCaps */
NULL /* No wine logo by default */
NULL, /* No wine logo by default */
FALSE /* Disable multisampling for now due to Nvidia driver bugs which happens for some users */
};
IWineD3D* WINAPI WineDirect3DCreate(UINT SDKVersion, UINT dxVersion, IUnknown *parent) {
@ -260,6 +261,14 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
wined3d_settings.logo = HeapAlloc(GetProcessHeap(), 0, strlen(buffer) + 1);
if(wined3d_settings.logo) strcpy(wined3d_settings.logo, buffer);
}
if ( !get_config_key( hkey, appkey, "Multisampling", buffer, size) )
{
if (!strcmp(buffer,"enabled"))
{
TRACE("Allow multisampling\n");
wined3d_settings.allow_multisampling = TRUE;
}
}
}
if (wined3d_settings.vs_mode == VS_HW)
TRACE("Allow HW vertex shaders\n");

View file

@ -248,6 +248,7 @@ typedef struct wined3d_settings_s {
/* Memory tracking and object counting */
unsigned int emulated_textureram;
char *logo;
int allow_multisampling;
} wined3d_settings_t;
extern wined3d_settings_t wined3d_settings;