mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
intel buggy driver hack
This commit is contained in:
parent
f6030da8bc
commit
12539bfd45
@ -120,6 +120,15 @@ ConfigVariableBool dx_preserve_fpu_state
|
||||
ConfigVariableInt dx_preferred_device_id
|
||||
("dx-preferred-device-id", -1);
|
||||
|
||||
ConfigVariableBool dx_intel_compressed_texture_bug
|
||||
("dx-intel-compressed-texture-bug", true,
|
||||
PRC_DESC("Set this true to work around a bug in the Intel driver "
|
||||
"igdumd32.dll, for at least the 965 Express chipset family, "
|
||||
"which breaks compressed texture images smaller "
|
||||
"than about 256x256 (even mipmap levels). The workaround is "
|
||||
"simply to disable compressed texture support when this "
|
||||
"driver is detected."));
|
||||
|
||||
#ifdef _DEBUG
|
||||
ConfigVariableDouble dx_global_miplevel_bias
|
||||
("dx-global-miplevel-bias", 0.0);
|
||||
|
@ -47,6 +47,8 @@ extern ConfigVariableBool dx_do_vidmemsize_check;
|
||||
extern ConfigVariableBool dx_preserve_fpu_state;
|
||||
extern ConfigVariableInt dx_preferred_device_id;
|
||||
|
||||
extern ConfigVariableBool dx_intel_compressed_texture_bug;
|
||||
|
||||
#ifndef NDEBUG
|
||||
extern ConfigVariableInt dx_force_backface_culling;
|
||||
#endif
|
||||
|
@ -2678,11 +2678,20 @@ reset() {
|
||||
_compressed_texture_formats.set_bit(Texture::CM_dxt##num);\
|
||||
}
|
||||
|
||||
CHECK_FOR_DXTVERSION(1)
|
||||
CHECK_FOR_DXTVERSION(2)
|
||||
CHECK_FOR_DXTVERSION(3)
|
||||
CHECK_FOR_DXTVERSION(4)
|
||||
CHECK_FOR_DXTVERSION(5)
|
||||
if (_screen->_intel_compressed_texture_bug) {
|
||||
dxgsg9_cat.info()
|
||||
<< "Buggy Intel driver detected; disabling compressed textures.\n";
|
||||
_screen->_supported_tex_formats_mask &=
|
||||
~(DXT1_FLAG | DXT2_FLAG | DXT3_FLAG | DXT4_FLAG | DXT5_FLAG);
|
||||
|
||||
} else {
|
||||
// Check for available compressed formats normally.
|
||||
CHECK_FOR_DXTVERSION(1);
|
||||
CHECK_FOR_DXTVERSION(2);
|
||||
CHECK_FOR_DXTVERSION(3);
|
||||
CHECK_FOR_DXTVERSION(4);
|
||||
CHECK_FOR_DXTVERSION(5);
|
||||
}
|
||||
|
||||
#undef CHECK_FOR_DXTVERSION
|
||||
|
||||
|
@ -210,6 +210,7 @@ struct DXScreenData {
|
||||
|
||||
bool _supports_dynamic_textures;
|
||||
bool _supports_automatic_mipmap_generation;
|
||||
bool _intel_compressed_texture_bug;
|
||||
};
|
||||
|
||||
|
||||
|
@ -930,6 +930,7 @@ choose_device() {
|
||||
MAX_DEVICE_IDENTIFIER_STRING);
|
||||
devinfo.VendorID = adapter_info.VendorId;
|
||||
devinfo.DeviceID = adapter_info.DeviceId;
|
||||
devinfo._driver_version = adapter_info.DriverVersion;
|
||||
devinfo._monitor = _monitor;
|
||||
devinfo.cardID = i;
|
||||
|
||||
@ -1136,6 +1137,15 @@ consider_device(wdxGraphicsPipe9 *dxpipe, DXDeviceInfo *device_info) {
|
||||
_wcontext._display_mode.RefreshRate = D3DPRESENT_RATE_DEFAULT;
|
||||
_wcontext._monitor = device_info->_monitor;
|
||||
|
||||
if (strcmp(device_info->szDriver, "igdumd32.dll") == 0 &&
|
||||
device_info->_driver_version.QuadPart <= 0x0007000e000a0531LL &&
|
||||
dx_intel_compressed_texture_bug) {
|
||||
// Disable compressed textures for this buggy driver (7.14.10.1329
|
||||
// and earlier--I don't know whether any other drivers also
|
||||
// exhibit the bug).
|
||||
_wcontext._intel_compressed_texture_bug = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -61,6 +61,7 @@ private:
|
||||
char szDescription[MAX_DEVICE_IDENTIFIER_STRING];
|
||||
GUID guidDeviceIdentifier;
|
||||
DWORD VendorID, DeviceID;
|
||||
LARGE_INTEGER _driver_version;
|
||||
HMONITOR _monitor;
|
||||
};
|
||||
typedef pvector<DXDeviceInfo> DXDeviceInfoVec;
|
||||
|
Loading…
x
Reference in New Issue
Block a user