Module: wine Branch: refs/heads/master Commit: fd2739b0239f3e4186664868b300a133cdc073b2 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=fd2739b0239f3e4186664868...
Author: H. Verbeet hverbeet@gmail.com Date: Mon Mar 6 18:27:53 2006 +0000
wined3d: Don't call glCompressedTexImage2DARB without allocatedMemory.
Don't call glCompressedTexImage2DARB if we haven't got allocatedMemory (yet). Fix a small typo.
---
dlls/wined3d/surface.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index a4d9770..f8e6abf 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1029,7 +1029,9 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadT This->resource.format == WINED3DFMT_DXT3 || This->resource.format == WINED3DFMT_DXT4 || This->resource.format == WINED3DFMT_DXT5) { - if (GL_SUPPORT(EXT_TEXTURE_COMPRESSION_S3TC)) { + if (!GL_SUPPORT(EXT_TEXTURE_COMPRESSION_S3TC)) { + FIXME("Using DXT1/3/5 without advertized support\n"); + } else if (This->resource.allocatedMemory) { TRACE("Calling glCompressedTexImage2D %x i=%d, intfmt=%x, w=%d, h=%d,0=%d, sz=%d, Mem=%p\n", This->glDescription.target, This->glDescription.level, @@ -1050,7 +1052,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadT 0, This->resource.size, This->resource.allocatedMemory); - checkGLcall("glCommpressedTexTexImage2D"); + checkGLcall("glCommpressedTexImage2D");
LEAVE_GL();
@@ -1058,9 +1060,6 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadT HeapFree(GetProcessHeap(), 0, This->resource.allocatedMemory); This->resource.allocatedMemory = NULL; } - - } else { - FIXME("Using DXT1/3/5 without advertized support\n"); } } else {