forked from bartvdbraak/blender
Fix T45708: OpenSubdiv crashes on Windows with Intel cards
Disable Intel cards for until we'll go to the root of the issue of the crash. This will take a bit, so being so close to the release we go safe and disable unstable GPU, so blender at least doesn't crash. This could be bypassed by setting OPENSUBDIV_ALLOW_INTEL environment variable.
This commit is contained in:
parent
182b5736fb
commit
3f05d72a98
@ -30,6 +30,7 @@
|
|||||||
# include "iso646.h"
|
# include "iso646.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
|
|
||||||
#include <opensubdiv/osd/glMesh.h>
|
#include <opensubdiv/osd/glMesh.h>
|
||||||
@ -294,6 +295,28 @@ const struct OpenSubdiv_TopologyRefinerDescr *openSubdiv_getGLMeshTopologyRefine
|
|||||||
|
|
||||||
int openSubdiv_supportGPUDisplay(void)
|
int openSubdiv_supportGPUDisplay(void)
|
||||||
{
|
{
|
||||||
|
{
|
||||||
|
/* Currently Intel GPUs has hard time working on Windows.
|
||||||
|
*
|
||||||
|
* For until we've got access to a hardware which demonstrates
|
||||||
|
* the issue we disable OpenSubdiv on Intel GPUs.
|
||||||
|
*/
|
||||||
|
static bool vendor_checked = false;
|
||||||
|
static bool is_intel = false;
|
||||||
|
if (!vendor_checked) {
|
||||||
|
const char *vendor = (const char *)glGetString(GL_VENDOR);
|
||||||
|
const char *renderer = (const char *)glGetString(GL_RENDERER);
|
||||||
|
if (strstr(vendor, "Intel")) {
|
||||||
|
if(getenv("OPENSUBDIV_ALLOW_INTEL") == NULL) {
|
||||||
|
is_intel = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (is_intel) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return GLEW_EXT_geometry_shader4 &&
|
return GLEW_EXT_geometry_shader4 &&
|
||||||
GLEW_ARB_gpu_shader5 &&
|
GLEW_ARB_gpu_shader5 &&
|
||||||
GLEW_ARB_uniform_buffer_object;
|
GLEW_ARB_uniform_buffer_object;
|
||||||
|
Loading…
Reference in New Issue
Block a user