Disable apparently buggy shader mode on r300c drivers. Fixes #780.

This was SVN commit r9308.
This commit is contained in:
Ykkrosh 2011-04-23 17:06:27 +00:00
parent f0286a72e3
commit 2d04d78db8
3 changed files with 24 additions and 4 deletions

View File

@ -143,6 +143,7 @@ function RunDetection(settings)
var disable_s3tc = undefined;
var disable_shadows = undefined;
var disable_fancywater = undefined;
var override_renderpath = undefined;
// TODO: add some mechanism for setting config values
// (overriding default.cfg, but overridden by local.cfg)
@ -223,6 +224,14 @@ function RunDetection(settings)
disable_fancywater = true;
}
// http://trac.wildfiregames.com/ticket/780
// r300 classic has problems with shader mode, so fall back to non-shader
if (os_unix && GL_RENDERER.match(/^Mesa DRI R[123]00 /))
{
override_renderpath = "fixed";
warnings.push("Some graphics features are disabled, due to bugs in old graphics drivers. Upgrading to a Gallium-based driver might help.");
}
return {
"dialog_warnings": dialog_warnings,
"warnings": warnings,
@ -230,6 +239,7 @@ function RunDetection(settings)
"disable_s3tc": disable_s3tc,
"disable_shadows": disable_shadows,
"disable_fancywater": disable_fancywater,
"override_renderpath": override_renderpath,
};
}
@ -261,4 +271,7 @@ global.RunHardwareDetection = function(settings)
if (output.disable_fancywater !== undefined)
Engine.SetDisableFancyWater(output.disable_fancywater);
if (output.override_renderpath !== undefined)
Engine.SetRenderPath(output.override_renderpath);
};

View File

@ -11,7 +11,7 @@ print("<table>");
print("<tr>");
print("<th>OS");
print("<th>GL_RENDERER");
print("<th>Disabled");
print("<th>Output");
print("<th>Warnings");
hwdetectTestData.sort(function(a, b) {
@ -29,9 +29,9 @@ for each (var settings in hwdetectTestData)
var os = (settings.os_linux ? "linux" : settings.os_macosx ? "macosx" : settings.os_win ? "win" : "???");
var disabled = [];
for each (var d in ["audio", "s3tc", "shadows", "fancywater"])
if (output["disable_"+d] !== undefined)
disabled.push(d+"="+output["disable_"+d])
for each (var d in ["disable_audio", "disable_s3tc", "disable_shadows", "disable_fancywater", "override_renderpath"])
if (output[d] !== undefined)
disabled.push(d+"="+output[d])
print("<tr>");
print("<td>" + os);

View File

@ -121,6 +121,12 @@ void SetDisableFancyWater(void* UNUSED(cbdata), bool disabled)
g_FancyWater = !disabled;
}
void SetRenderPath(void* UNUSED(cbdata), std::string renderpath)
{
if (!IsOverridden("fancywater"))
g_RenderPath = renderpath;
}
void RunHardwareDetection()
{
TIMER(L"RunHardwareDetection");
@ -131,6 +137,7 @@ void RunHardwareDetection()
scriptInterface.RegisterFunction<void, bool, &SetDisableS3TC>("SetDisableS3TC");
scriptInterface.RegisterFunction<void, bool, &SetDisableShadows>("SetDisableShadows");
scriptInterface.RegisterFunction<void, bool, &SetDisableFancyWater>("SetDisableFancyWater");
scriptInterface.RegisterFunction<void, std::string, &SetRenderPath>("SetRenderPath");
// Load the detection script: