d3d10core: Implement d3d10_vertex_shader_SetPrivateData().
This commit is contained in:
parent
168e915c91
commit
fe06bb1492
|
@ -200,6 +200,7 @@ struct d3d10_vertex_shader
|
|||
ID3D10VertexShader ID3D10VertexShader_iface;
|
||||
LONG refcount;
|
||||
|
||||
struct wined3d_private_store private_store;
|
||||
struct wined3d_shader *wined3d_shader;
|
||||
ID3D10Device1 *device;
|
||||
};
|
||||
|
|
|
@ -209,10 +209,12 @@ static HRESULT STDMETHODCALLTYPE d3d10_vertex_shader_GetPrivateData(ID3D10Vertex
|
|||
static HRESULT STDMETHODCALLTYPE d3d10_vertex_shader_SetPrivateData(ID3D10VertexShader *iface,
|
||||
REFGUID guid, UINT data_size, const void *data)
|
||||
{
|
||||
FIXME("iface %p, guid %s, data_size %u, data %p stub!\n",
|
||||
struct d3d10_vertex_shader *shader = impl_from_ID3D10VertexShader(iface);
|
||||
|
||||
TRACE("iface %p, guid %s, data_size %u, data %p.\n",
|
||||
iface, debugstr_guid(guid), data_size, data);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return d3d10_set_private_data(&shader->private_store, guid, data_size, data);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d10_vertex_shader_SetPrivateDataInterface(ID3D10VertexShader *iface,
|
||||
|
@ -238,6 +240,9 @@ static const struct ID3D10VertexShaderVtbl d3d10_vertex_shader_vtbl =
|
|||
|
||||
static void STDMETHODCALLTYPE d3d10_vertex_shader_wined3d_object_destroyed(void *parent)
|
||||
{
|
||||
struct d3d10_vertex_shader *shader = parent;
|
||||
|
||||
wined3d_private_store_cleanup(&shader->private_store);
|
||||
HeapFree(GetProcessHeap(), 0, parent);
|
||||
}
|
||||
|
||||
|
@ -257,12 +262,14 @@ HRESULT d3d10_vertex_shader_init(struct d3d10_vertex_shader *shader, struct d3d1
|
|||
|
||||
shader->ID3D10VertexShader_iface.lpVtbl = &d3d10_vertex_shader_vtbl;
|
||||
shader->refcount = 1;
|
||||
wined3d_private_store_init(&shader->private_store);
|
||||
|
||||
shader_info.input_signature = &input_signature;
|
||||
shader_info.output_signature = &output_signature;
|
||||
if (FAILED(hr = shader_extract_from_dxbc(byte_code, byte_code_length, &shader_info)))
|
||||
{
|
||||
ERR("Failed to extract shader, hr %#x.\n", hr);
|
||||
wined3d_private_store_cleanup(&shader->private_store);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
@ -278,6 +285,7 @@ HRESULT d3d10_vertex_shader_init(struct d3d10_vertex_shader *shader, struct d3d1
|
|||
if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to create wined3d vertex shader, hr %#x.\n", hr);
|
||||
wined3d_private_store_cleanup(&shader->private_store);
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue