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

wined3d: Add a wined3d private WINED3DSBT_RECORDED.

parent b21c7854
......@@ -1165,6 +1165,12 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateStateBlock(LPDIRECT3DDEVICE8 if
TRACE("(%p) Relay\n", This);
if(Type != D3DSBT_ALL && Type != D3DSBT_PIXELSTATE &&
Type != D3DSBT_VERTEXSTATE ) {
WARN("Unexpected stateblock type, returning D3DERR_INVALIDCALL\n");
return D3DERR_INVALIDCALL;
}
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DStateBlock8Impl));
if (NULL == object) {
*pToken = 0;
......
......@@ -122,6 +122,12 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateStateBlock(LPDIRECT3DDEVICE9 iface, D3
TRACE("(%p) Relay\n", This);
if(Type != D3DSBT_ALL && Type != D3DSBT_PIXELSTATE &&
Type != D3DSBT_VERTEXSTATE ) {
WARN("Unexpected stateblock type, returning D3DERR_INVALIDCALL\n");
return D3DERR_INVALIDCALL;
}
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DStateBlock9Impl));
if (NULL == object) return E_OUTOFMEMORY;
object->lpVtbl = &Direct3DStateBlock9_Vtbl;
......
......@@ -5070,6 +5070,11 @@ IDirect3DDeviceImpl_7_CreateStateBlock(IDirect3DDevice7 *iface,
WARN("BlockHandle == NULL, returning DDERR_INVALIDPARAMS\n");
return DDERR_INVALIDPARAMS;
}
if(Type != D3DSBT_ALL && Type != D3DSBT_PIXELSTATE &&
Type != D3DSBT_VERTEXSTATE ) {
WARN("Unexpected stateblock type, returning DDERR_INVALIDPARAMS\n");
return DDERR_INVALIDPARAMS;
}
EnterCriticalSection(&ddraw_cs);
*BlockHandle = IDirect3DDeviceImpl_CreateHandle(This);
......
......@@ -1208,6 +1208,7 @@ typedef enum _WINED3DSTATEBLOCKTYPE {
WINED3DSBT_ALL = 1,
WINED3DSBT_PIXELSTATE = 2,
WINED3DSBT_VERTEXSTATE = 3,
WINED3DSBT_RECORDED = 4, /* WineD3D private */
WINED3DSBT_FORCE_DWORD = 0xffffffff
} WINED3DSTATEBLOCKTYPE;
......
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