wined3d: Allow SYSTEMMEM textures and surfaces.

This commit is contained in:
Stefan Dösinger 2006-05-18 22:59:33 +02:00 committed by Alexandre Julliard
parent 566cdcf55c
commit ebcbda72c4
3 changed files with 13 additions and 11 deletions

View File

@ -5231,11 +5231,9 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD Stage,
}
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_ColorFill(IWineD3DDevice *iface, IWineD3DSurfa
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;
}

View File

@ -1471,12 +1471,16 @@ HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3D
*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 |

View File

@ -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
* 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;
}