Initialize FeatureAvailable array to false for legacy pipeline.

It has been broken in commit 271a26eaf0.

It solves some issues with etnaviv gallium driver. It may also solve a crash on old intel 965gm on windows, but I can't test it atm.
This commit is contained in:
Deve 2017-11-07 22:43:33 +01:00
parent 046403e1df
commit 3baefcd6a7
2 changed files with 5 additions and 6 deletions

View File

@ -336,15 +336,16 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer, bool useCoreCon
else else
os::Printer::log("OpenGL driver version is not 1.2 or better.", ELL_WARNING); os::Printer::log("OpenGL driver version is not 1.2 or better.", ELL_WARNING);
if (!useCoreContext)
{ {
for (u32 i = 0; i < IRR_OpenGL_Feature_Count; i++)
FeatureAvailable[i] = false;
const char* t = NULL; const char* t = NULL;
size_t len = 0; size_t len = 0;
c8 *str = 0; c8 *str = 0;
if (!useCoreContext) t = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS));
{
t = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS));
}
if (t) if (t)
{ {

View File

@ -932,8 +932,6 @@ class COpenGLExtensionHandler
//! queries the features of the driver, returns true if feature is available //! queries the features of the driver, returns true if feature is available
bool queryOpenGLFeature(EOpenGLFeatures feature) const bool queryOpenGLFeature(EOpenGLFeatures feature) const
{ {
if (COpenGLExtensionHandler::IRR_EXT_packed_depth_stencil)
return true;
return FeatureAvailable[feature]; return FeatureAvailable[feature];
} }