forked from Mirrors/wine-wine
d3d8: Set the vertex declaration's shader handle in vertexdeclaration_init().
parent
d0aaae9987
commit
27723affc9
|
@ -542,7 +542,7 @@ typedef struct {
|
|||
} IDirect3DVertexDeclaration8Impl;
|
||||
|
||||
HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration8Impl *declaration,
|
||||
IDirect3DDevice8Impl *device, const DWORD *elements) DECLSPEC_HIDDEN;
|
||||
IDirect3DDevice8Impl *device, const DWORD *elements, DWORD shader_handle) DECLSPEC_HIDDEN;
|
||||
HRESULT vertexdeclaration_init_fvf(IDirect3DVertexDeclaration8Impl *declaration,
|
||||
IDirect3DDevice8Impl *device, DWORD fvf) DECLSPEC_HIDDEN;
|
||||
|
||||
|
|
|
@ -376,7 +376,7 @@ static const struct wined3d_parent_ops d3d8_vertexdeclaration_wined3d_parent_ops
|
|||
};
|
||||
|
||||
HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration8Impl *declaration,
|
||||
IDirect3DDevice8Impl *device, const DWORD *elements)
|
||||
IDirect3DDevice8Impl *device, const DWORD *elements, DWORD shader_handle)
|
||||
{
|
||||
WINED3DVERTEXELEMENT *wined3d_elements;
|
||||
UINT wined3d_element_count;
|
||||
|
@ -384,6 +384,7 @@ HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration8Impl *declaration,
|
|||
|
||||
declaration->lpVtbl = &Direct3DVertexDeclaration8_Vtbl;
|
||||
declaration->ref_count = 1;
|
||||
declaration->shader_handle = shader_handle;
|
||||
|
||||
wined3d_element_count = convert_to_wined3d_declaration(elements, &declaration->elements_size, &wined3d_elements);
|
||||
declaration->elements = HeapAlloc(GetProcessHeap(), 0, declaration->elements_size);
|
||||
|
|
|
@ -113,7 +113,7 @@ static HRESULT vertexshader_create_vertexdeclaration(IDirect3DDevice8Impl *devic
|
|||
return D3DERR_OUTOFVIDEOMEMORY;
|
||||
}
|
||||
|
||||
hr = vertexdeclaration_init(object, device, declaration);
|
||||
hr = vertexdeclaration_init(object, device, declaration, shader_handle);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to initialize vertex declaration, hr %#x.\n", hr);
|
||||
|
@ -121,8 +121,6 @@ static HRESULT vertexshader_create_vertexdeclaration(IDirect3DDevice8Impl *devic
|
|||
return hr;
|
||||
}
|
||||
|
||||
object->shader_handle = shader_handle;
|
||||
|
||||
TRACE("Created vertex declaration %p.\n", object);
|
||||
*decl_ptr = (IDirect3DVertexDeclaration8 *)object;
|
||||
|
||||
|
|
Loading…
Reference in New Issue