diff --git a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx index 5350d1794c..6ead8a3dd0 100755 --- a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx +++ b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx @@ -63,6 +63,11 @@ #include +#include + +#define tostring(x) #x +#define SDK_VERSION(major,minor) tostring(major) << "." << tostring(minor) +#define DIRECTX_SDK_VERSION SDK_VERSION (_DXSDK_PRODUCT_MAJOR, _DXSDK_PRODUCT_MINOR) << "." << SDK_VERSION (_DXSDK_BUILD_MAJOR, _DXSDK_BUILD_MINOR) #define DEBUG_LRU false @@ -2360,6 +2365,7 @@ reset() { _supports_stream_offset = (d3d_caps.DevCaps2 & D3DDEVCAPS2_STREAMOFFSET) != 0; _screen->_supports_dynamic_textures = ((d3d_caps.Caps2 & D3DCAPS2_DYNAMICTEXTURES) != 0); + _screen->_supports_automatic_mipmap_generation = ((d3d_caps.Caps2 & D3DCAPS2_CANAUTOGENMIPMAP) != 0); if (dxgsg9_cat.is_debug()) { dxgsg9_cat.debug() @@ -2386,12 +2392,17 @@ reset() { << "\nVertexShaderVersion = " << _vertex_shader_version_major << "." << _vertex_shader_version_minor << "\nPixelShaderVersion = " << _pixel_shader_version_major << "." << _pixel_shader_version_minor << "\nMaxVertexShaderConst = " << _vertex_shader_maximum_constants - << "\nsupport stream offset = " << _supports_stream_offset - << "\nsupports dynamic textures = " << _screen->_supports_dynamic_textures + << "\nsupports_stream_offset = " << _supports_stream_offset + << "\nsupports_dynamic_textures = " << _screen->_supports_dynamic_textures + << "\nsupports_automatic_mipmap_generation = " << _screen->_supports_automatic_mipmap_generation << "\nMaxAnisotropy = " << d3d_caps.MaxAnisotropy + << "\nDirectX SDK version " DIRECTX_SDK_VERSION << "\n"; } + // OVERRIDE SUPPORT SINCE IT DOES NOT WORK WELL + _screen->_supports_automatic_mipmap_generation = false; + this -> reset_render_states ( ); // minimum shader requirements diff --git a/panda/src/dxgsg9/dxgsg9base.h b/panda/src/dxgsg9/dxgsg9base.h index c88c179b27..acacfcc92e 100755 --- a/panda/src/dxgsg9/dxgsg9base.h +++ b/panda/src/dxgsg9/dxgsg9base.h @@ -208,6 +208,7 @@ struct DXScreenData { int _managed_index_buffers; bool _supports_dynamic_textures; + bool _supports_automatic_mipmap_generation; DXGraphicsStateGuardian9 *_dxgsg9; };