Commit ebcbda72 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Allow SYSTEMMEM textures and surfaces.

parent 566cdcf5
...@@ -5231,11 +5231,9 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD Stage, ...@@ -5231,11 +5231,9 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD Stage,
} }
if(pTexture != NULL) { if(pTexture != NULL) {
/* SetTexture isn't allowed on textures in WINED3DPOOL_SCRATCH; The same is /* SetTexture isn't allowed on textures in WINED3DPOOL_SCRATCH;
* 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) {
*/
if(((IWineD3DTextureImpl*)pTexture)->resource.pool == WINED3DPOOL_SCRATCH || ((IWineD3DTextureImpl*)pTexture)->resource.pool == WINED3DPOOL_SYSTEMMEM) {
WARN("(%p) Attempt to set scratch texture rejected\n", pTexture); WARN("(%p) Attempt to set scratch texture rejected\n", pTexture);
return WINED3DERR_INVALIDCALL; return WINED3DERR_INVALIDCALL;
} }
...@@ -6435,8 +6433,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface, IWineD3DSurfa ...@@ -6435,8 +6433,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface, IWineD3DSurfa
DWORD *data; DWORD *data;
TRACE("(%p) Colour fill Surface: %p rect: %p color: %ld\n", This, pSurface, pRect, color); TRACE("(%p) Colour fill Surface: %p rect: %p color: %ld\n", This, pSurface, pRect, color);
if (surface->resource.pool != WINED3DPOOL_DEFAULT) { if (surface->resource.pool != WINED3DPOOL_DEFAULT && surface->resource.pool != WINED3DPOOL_SYSTEMMEM) {
FIXME("call to colorfill with non WINED3DPOOL_DEFAULT surface\n"); FIXME("call to colorfill with non WINED3DPOOL_DEFAULT or WINED3DPOOL_SYSTEMMEM surface\n");
return WINED3DERR_INVALIDCALL; return WINED3DERR_INVALIDCALL;
} }
......
...@@ -1471,12 +1471,16 @@ HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3D ...@@ -1471,12 +1471,16 @@ HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3D
*pCaps->CursorCaps = 0; *pCaps->CursorCaps = 0;
*pCaps->DevCaps = WINED3DDEVCAPS_DRAWPRIMTLVERTEX | *pCaps->DevCaps = WINED3DDEVCAPS_EXECUTESYSTEMMEMORY |
WINED3DDEVCAPS_TLVERTEXSYSTEMMEMORY|
WINED3DDEVCAPS_TLVERTEXVIDEOMEMORY |
WINED3DDEVCAPS_DRAWPRIMTLVERTEX |
WINED3DDEVCAPS_HWTRANSFORMANDLIGHT | WINED3DDEVCAPS_HWTRANSFORMANDLIGHT |
WINED3DDEVCAPS_EXECUTEVIDEOMEMORY | WINED3DDEVCAPS_EXECUTEVIDEOMEMORY |
WINED3DDEVCAPS_PUREDEVICE | WINED3DDEVCAPS_PUREDEVICE |
WINED3DDEVCAPS_HWRASTERIZATION | WINED3DDEVCAPS_HWRASTERIZATION |
WINED3DDEVCAPS_TEXTUREVIDEOMEMORY; WINED3DDEVCAPS_TEXTUREVIDEOMEMORY |
WINED3DDEVCAPS_TEXTURESYSTEMMEMORY;
*pCaps->PrimitiveMiscCaps = D3DPMISCCAPS_CULLCCW | *pCaps->PrimitiveMiscCaps = D3DPMISCCAPS_CULLCCW |
......
...@@ -1170,9 +1170,9 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { ...@@ -1170,9 +1170,9 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) {
* In general never store scratch or system mem textures in the video ram. However it is allowed * 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. * 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; return WINED3DERR_INVALIDCALL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment