Commit bcb42011 authored by Oliver Stieber's avatar Oliver Stieber Committed by Alexandre Julliard

Disable support for creation FMT_Unknown textures. This gets most of

the d3d8 demos from www.codesampler.com working.
parent 04aa6a88
...@@ -829,6 +829,13 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, UINT Wid ...@@ -829,6 +829,13 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, UINT Wid
TRACE("(%p), Width(%d) Height(%d) Levels(%d) Usage(%ld) ....\n", This, Width, Height, Levels, Usage); TRACE("(%p), Width(%d) Height(%d) Levels(%d) Usage(%ld) ....\n", This, Width, Height, Levels, Usage);
/* TODO: It should only be possible to create textures for formats
that are reported as supported */
if (WINED3DFMT_UNKNOWN >= Format) {
WARN("(%p) : Texture cannot be created with a format of D3DFMT_UNKNOWN\n", This);
return D3DERR_INVALIDCALL;
}
D3DCREATERESOURCEOBJECTINSTANCE(object, Texture, D3DRTYPE_TEXTURE, 0); D3DCREATERESOURCEOBJECTINSTANCE(object, Texture, D3DRTYPE_TEXTURE, 0);
D3DINITILIZEBASETEXTURE(object->baseTexture); D3DINITILIZEBASETEXTURE(object->baseTexture);
object->width = Width; object->width = Width;
...@@ -907,6 +914,13 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface, ...@@ -907,6 +914,13 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface,
UINT tmpH; UINT tmpH;
UINT tmpD; UINT tmpD;
/* TODO: It should only be possible to create textures for formats
that are reported as supported */
if (WINED3DFMT_UNKNOWN >= Format) {
WARN("(%p) : Texture cannot be created with a format of D3DFMT_UNKNOWN\n", This);
return D3DERR_INVALIDCALL;
}
D3DCREATERESOURCEOBJECTINSTANCE(object, VolumeTexture, D3DRTYPE_VOLUMETEXTURE, 0); D3DCREATERESOURCEOBJECTINSTANCE(object, VolumeTexture, D3DRTYPE_VOLUMETEXTURE, 0);
D3DINITILIZEBASETEXTURE(object->baseTexture); D3DINITILIZEBASETEXTURE(object->baseTexture);
...@@ -1000,6 +1014,13 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface, UINT ...@@ -1000,6 +1014,13 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface, UINT
HRESULT hr; HRESULT hr;
unsigned int pow2EdgeLength = EdgeLength; unsigned int pow2EdgeLength = EdgeLength;
/* TODO: It should only be possible to create textures for formats
that are reported as supported */
if (WINED3DFMT_UNKNOWN >= Format) {
WARN("(%p) : Texture cannot be created with a format of D3DFMT_UNKNOWN\n", This);
return D3DERR_INVALIDCALL;
}
D3DCREATERESOURCEOBJECTINSTANCE(object, CubeTexture, D3DRTYPE_CUBETEXTURE, 0); D3DCREATERESOURCEOBJECTINSTANCE(object, CubeTexture, D3DRTYPE_CUBETEXTURE, 0);
D3DINITILIZEBASETEXTURE(object->baseTexture); D3DINITILIZEBASETEXTURE(object->baseTexture);
......
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