wined3d: Allow SYSTEMMEM textures and surfaces.
This commit is contained in:
parent
566cdcf55c
commit
ebcbda72c4
|
@ -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
|
||||||
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
|
||||||
*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) {
|
||||||
* 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue