wined3d: Keep track of shaders.
This commit is contained in:
parent
c3c6c6f543
commit
09bf3d5aea
|
@ -1142,6 +1142,7 @@ ULONG WINAPI IWineD3DBaseShaderImpl_Release(IWineD3DBaseShader *iface) {
|
|||
shader_delete_constant_list(&This->baseShader.constantsF);
|
||||
shader_delete_constant_list(&This->baseShader.constantsB);
|
||||
shader_delete_constant_list(&This->baseShader.constantsI);
|
||||
list_remove(&This->baseShader.shader_list_entry);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
return ref;
|
||||
|
|
|
@ -1883,6 +1883,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexShader(IWineD3DDevice *ifac
|
|||
IWineD3DVertexShader_Release(*ppVertexShader);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
list_add_head(&This->shaders, &object->baseShader.shader_list_entry);
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
@ -1897,6 +1898,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreatePixelShader(IWineD3DDevice *iface
|
|||
hr = IWineD3DPixelShader_SetFunction(*ppPixelShader, pFunction);
|
||||
if (WINED3D_OK == hr) {
|
||||
TRACE("(%p) : Created Pixel shader %p\n", This, *ppPixelShader);
|
||||
list_add_head(&This->shaders, &object->baseShader.shader_list_entry);
|
||||
} else {
|
||||
WARN("(%p) : Failed to create pixel shader\n", This);
|
||||
}
|
||||
|
|
|
@ -2742,6 +2742,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
|
|||
IWineD3D_AddRef(object->wineD3D);
|
||||
object->parent = parent;
|
||||
list_init(&object->resources);
|
||||
list_init(&object->shaders);
|
||||
|
||||
if(This->dxVersion == 7) {
|
||||
object->surface_alignment = 8;
|
||||
|
|
|
@ -675,6 +675,7 @@ struct IWineD3DDeviceImpl
|
|||
UINT NumberOfSwapChains;
|
||||
|
||||
struct list resources; /* a linked list to track resources created by the device */
|
||||
struct list shaders; /* a linked list to track shaders (pixel and vertex) */
|
||||
|
||||
/* Render Target Support */
|
||||
IWineD3DSurface **render_targets;
|
||||
|
@ -1970,6 +1971,7 @@ typedef struct IWineD3DBaseShaderClass
|
|||
|
||||
/* Pointer to the parent device */
|
||||
IWineD3DDevice *device;
|
||||
struct list shader_list_entry;
|
||||
|
||||
} IWineD3DBaseShaderClass;
|
||||
|
||||
|
|
Loading…
Reference in New Issue