Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
5ad6766c
Commit
5ad6766c
authored
Feb 13, 2007
by
H. Verbeet
Committed by
Alexandre Julliard
Feb 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Store the d3d8 vertex declaration in the d3d8 vertex shader.
parent
a0b41772
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
0 deletions
+40
-0
d3d8_private.h
dlls/d3d8/d3d8_private.h
+1
-0
device.c
dlls/d3d8/device.c
+38
-0
vertexshader.c
dlls/d3d8/vertexshader.c
+1
-0
No files found.
dlls/d3d8/d3d8_private.h
View file @
5ad6766c
...
...
@@ -586,6 +586,7 @@ struct IDirect3DVertexShader8Impl {
LONG
ref
;
shader_handle
*
handle
;
IDirect3DVertexDeclaration8
*
vertex_declaration
;
IWineD3DVertexShader
*
wineD3DVertexShader
;
};
...
...
dlls/d3d8/device.c
View file @
5ad6766c
...
...
@@ -1162,6 +1162,35 @@ static HRESULT WINAPI IDirect3DDevice8Impl_ProcessVertices(LPDIRECT3DDEVICE8 ifa
return
IWineD3DDevice_ProcessVertices
(
This
->
WineD3DDevice
,
SrcStartIndex
,
DestIndex
,
VertexCount
,
((
IDirect3DVertexBuffer8Impl
*
)
pDestBuffer
)
->
wineD3DVertexBuffer
,
NULL
,
Flags
);
}
static
HRESULT
WINAPI
IDirect3DDevice8Impl_CreateVertexDeclaration
(
IDirect3DDevice8
*
iface
,
CONST
DWORD
*
declaration
,
IDirect3DVertexDeclaration8
**
decl_ptr
)
{
IDirect3DDevice8Impl
*
This
=
(
IDirect3DDevice8Impl
*
)
iface
;
IDirect3DVertexDeclaration8Impl
*
object
;
HRESULT
hr
=
D3D_OK
;
TRACE
(
"(%p) : declaration %p
\n
"
,
This
,
declaration
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Memory allocation failed
\n
"
);
*
decl_ptr
=
NULL
;
return
D3DERR_OUTOFVIDEOMEMORY
;
}
object
->
ref_count
=
1
;
object
->
lpVtbl
=
&
Direct3DVertexDeclaration8_Vtbl
;
hr
=
IWineD3DDevice_CreateVertexDeclaration
(
This
->
WineD3DDevice
,
declaration
,
&
object
->
wined3d_vertex_declaration
,
(
IUnknown
*
)
object
);
if
(
FAILED
(
hr
))
{
ERR
(
"(%p) : IWineD3DDevice_CreateVertexDeclaration call failed
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
}
else
{
*
decl_ptr
=
(
IDirect3DVertexDeclaration8
*
)
object
;
TRACE
(
"(%p) : Created vertex declaration %p
\n
"
,
This
,
object
);
}
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DDevice8Impl_CreateVertexShader
(
LPDIRECT3DDEVICE8
iface
,
CONST
DWORD
*
pDeclaration
,
CONST
DWORD
*
pFunction
,
DWORD
*
ppShader
,
DWORD
Usage
)
{
IDirect3DDevice8Impl
*
This
=
(
IDirect3DDevice8Impl
*
)
iface
;
HRESULT
hrc
=
D3D_OK
;
...
...
@@ -1178,6 +1207,15 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateVertexShader(LPDIRECT3DDEVICE8
object
->
ref
=
1
;
object
->
lpVtbl
=
&
Direct3DVertexShader8_Vtbl
;
hrc
=
IDirect3DDevice8Impl_CreateVertexDeclaration
(
iface
,
pDeclaration
,
&
object
->
vertex_declaration
);
if
(
FAILED
(
hrc
))
{
ERR
(
"(%p) : IDirect3DDeviceImpl_CreateVertexDeclaration call failed
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppShader
=
0
;
return
D3DERR_INVALIDCALL
;
}
/* Usage is missing ..*/
hrc
=
IWineD3DDevice_CreateVertexShader
(
This
->
WineD3DDevice
,
pDeclaration
,
pFunction
,
&
object
->
wineD3DVertexShader
,
(
IUnknown
*
)
object
);
...
...
dlls/d3d8/vertexshader.c
View file @
5ad6766c
...
...
@@ -56,6 +56,7 @@ static ULONG WINAPI IDirect3DVertexShader8Impl_Release(IDirect3DVertexShader8 *i
TRACE
(
"(%p) : ReleaseRef to %d
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
IDirect3DVertexDeclaration8_Release
(
This
->
vertex_declaration
);
IWineD3DVertexShader_Release
(
This
->
wineD3DVertexShader
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment