wined3d: Do not try to create a vbo more than once.
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 53c4986..2f41216 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -611,6 +611,11 @@
IWineD3DDeviceImpl *This = object->resource.wineD3DDevice; /* Needed for GL_EXTCALL */
GLenum error, glUsage;
DWORD vboUsage = object->resource.usage;
+ if(object->Flags & VBFLAG_VBOCREATEFAIL) {
+ WARN("Creating a vbo failed once, not trying again\n");
+ return;
+ }
+
TRACE("Creating an OpenGL vertex buffer object for IWineD3DVertexBuffer %p\n", object);
ENTER_GL();
@@ -694,6 +699,7 @@
FIXME("Failed to create a vertex buffer object. Continuing, but performance issues can occur\n");
if(object->vbo) GL_EXTCALL(glDeleteBuffersARB(1, &object->vbo));
object->vbo = 0;
+ object->Flags |= VBFLAG_VBOCREATEFAIL;
LEAVE_GL();
return;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index daedc52..dc0644d 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -654,6 +654,7 @@
#define VBFLAG_DIRTY 0x04 /* Buffer data has been modified */
#define VBFLAG_STREAM 0x08 /* The vertex buffer is in a stream */
#define VBFLAG_HASDESC 0x10 /* A vertex description has been found */
+#define VBFLAG_VBOCREATEFAIL 0x20 /* An attempt to create a vbo has failed */
/*****************************************************************************
* IWineD3DIndexBuffer implementation structure (extends IWineD3DResourceImpl)