Module: wine Branch: refs/heads/master Commit: ebcbda72c417d5a03995293c5ab46a5e6e200f59 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=ebcbda72c417d5a03995293c...
Author: Stefan Dösinger stefan@codeweavers.com Date: Thu May 18 22:59:33 2006 +0200
wined3d: Allow SYSTEMMEM textures and surfaces.
---
dlls/wined3d/device.c | 12 +++++------- dlls/wined3d/directx.c | 8 ++++++-- dlls/wined3d/surface.c | 4 ++-- 3 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 776fca6..cdedac0 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5231,11 +5231,9 @@ #endif }
if(pTexture != NULL) { - /* SetTexture isn't allowed on textures in WINED3DPOOL_SCRATCH; The same is - * the case for WINED3DPOOL_SYSTEMMEM textures unless WINED3DDEVCAPS_TEXTURESYSTEMMORY is set. - * We don't check the caps as GetDeviceCaps is inefficient and we don't set the cap anyway. - */ - if(((IWineD3DTextureImpl*)pTexture)->resource.pool == WINED3DPOOL_SCRATCH || ((IWineD3DTextureImpl*)pTexture)->resource.pool == WINED3DPOOL_SYSTEMMEM) { + /* SetTexture isn't allowed on textures in WINED3DPOOL_SCRATCH; + */ + if(((IWineD3DTextureImpl*)pTexture)->resource.pool == WINED3DPOOL_SCRATCH) { WARN("(%p) Attempt to set scratch texture rejected\n", pTexture); return WINED3DERR_INVALIDCALL; } @@ -6435,8 +6433,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_ColorF DWORD *data; TRACE("(%p) Colour fill Surface: %p rect: %p color: %ld\n", This, pSurface, pRect, color);
- if (surface->resource.pool != WINED3DPOOL_DEFAULT) { - FIXME("call to colorfill with non WINED3DPOOL_DEFAULT surface\n"); + if (surface->resource.pool != WINED3DPOOL_DEFAULT && surface->resource.pool != WINED3DPOOL_SYSTEMMEM) { + FIXME("call to colorfill with non WINED3DPOOL_DEFAULT or WINED3DPOOL_SYSTEMMEM surface\n"); return WINED3DERR_INVALIDCALL; }
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 788fbf0..b2db4d7 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1471,12 +1471,16 @@ HRESULT WINAPI IWineD3DImpl_GetDeviceCap *pCaps->CursorCaps = 0;
- *pCaps->DevCaps = WINED3DDEVCAPS_DRAWPRIMTLVERTEX | + *pCaps->DevCaps = WINED3DDEVCAPS_EXECUTESYSTEMMEMORY | + WINED3DDEVCAPS_TLVERTEXSYSTEMMEMORY| + WINED3DDEVCAPS_TLVERTEXVIDEOMEMORY | + WINED3DDEVCAPS_DRAWPRIMTLVERTEX | WINED3DDEVCAPS_HWTRANSFORMANDLIGHT | WINED3DDEVCAPS_EXECUTEVIDEOMEMORY | WINED3DDEVCAPS_PUREDEVICE | WINED3DDEVCAPS_HWRASTERIZATION | - WINED3DDEVCAPS_TEXTUREVIDEOMEMORY; + WINED3DDEVCAPS_TEXTUREVIDEOMEMORY | + WINED3DDEVCAPS_TEXTURESYSTEMMEMORY;
*pCaps->PrimitiveMiscCaps = D3DPMISCCAPS_CULLCCW | diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 5b7198c..7016f5d 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1170,9 +1170,9 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadT * In general never store scratch or system mem textures in the video ram. However it is allowed * for system memory textures when WINED3DDEVCAPS_TEXTURESYSTEMMEMORY is set but it isn't right now. */ - if (This->resource.pool == WINED3DPOOL_SCRATCH || This->resource.pool == WINED3DPOOL_SYSTEMMEM) + if (This->resource.pool == WINED3DPOOL_SCRATCH) { - FIXME("(%p) Operation not supported for scratch or SYSTEMMEM textures\n",This); + FIXME("(%p) Operation not supported for scratch textures\n",This); return WINED3DERR_INVALIDCALL; }