SHARE
TWEET

Untitled

a guest Feb 2nd, 2014 5,734 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
  2. index b76783f..aa45d5c 100644
  3. --- a/dlls/wined3d/resource.c
  4. +++ b/dlls/wined3d/resource.c
  5. @@ -352,8 +352,12 @@ BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource)
  6.      void **p;
  7.      SIZE_T align = RESOURCE_ALIGNMENT - 1 + sizeof(*p);
  8.      void *mem;
  9. +    UINT size = resource->size;
  10.  
  11. -    if (!(mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, resource->size + align)))
  12. +    if (resource->width <= 64 && resource->height <= 64)
  13. +        size *= 2;
  14. +
  15. +    if (!(mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size + align)))
  16.          return FALSE;
  17.  
  18.      p = (void **)(((ULONG_PTR)mem + align) & ~(RESOURCE_ALIGNMENT - 1)) - 1;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top