From f9002c26287e6aedfbe8a930d20af9f23f87ca51 Mon Sep 17 00:00:00 2001 From: Roderick Colenbrander Date: Sat, 15 Sep 2007 21:51:27 +0200 Subject: [PATCH] wined3d: Don't create a pbo for system memory surfaces. --- dlls/wined3d/surface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index d9a4e29e1bd..948b9bd26a4 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -758,10 +758,10 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED This->Flags &= ~SFLAG_INSYSMEM; /* This is the marker that surface data has to be downloaded */ } - /* Create a PBO for dynamicly locked surfaces but don't do it for converted or non-pow2 surfaces */ - if(GL_SUPPORT(ARB_PIXEL_BUFFER_OBJECT) && (This->Flags & SFLAG_DYNLOCK) && !(This->Flags & (SFLAG_PBO | SFLAG_CONVERTED | SFLAG_NONPOW2))) { + /* Create a PBO for dynamicly locked surfaces but don't do it for converted or non-pow2 surfaces. + * Also don't create a PBO for systemmem surfaces. */ + if(GL_SUPPORT(ARB_PIXEL_BUFFER_OBJECT) && (This->Flags & SFLAG_DYNLOCK) && !(This->Flags & (SFLAG_PBO | SFLAG_CONVERTED | SFLAG_NONPOW2)) && (This->resource.pool != WINED3DPOOL_SYSTEMMEM)) { GLenum error; - ENTER_GL(); GL_EXTCALL(glGenBuffersARB(1, &This->pbo));