Commit 042d0394 authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Alexandre Julliard

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.
parent cd7825c8
......@@ -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;
......
......@@ -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");
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment