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
2f03ad1a
Commit
2f03ad1a
authored
Sep 20, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Just return the declaration from wined3d_device_get_vertex_declaration().
parent
01918d05
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
43 deletions
+15
-43
device.c
dlls/d3d8/device.c
+5
-14
device.c
dlls/d3d9/device.c
+5
-18
device.c
dlls/wined3d/device.c
+3
-8
wined3d.spec
dlls/wined3d/wined3d.spec
+1
-1
wined3d.h
include/wine/wined3d.h
+1
-2
No files found.
dlls/d3d8/device.c
View file @
2f03ad1a
...
...
@@ -2153,33 +2153,24 @@ static HRESULT WINAPI d3d8_device_GetVertexShader(IDirect3DDevice8 *iface, DWORD
struct
d3d8_device
*
device
=
impl_from_IDirect3DDevice8
(
iface
);
struct
wined3d_vertex_declaration
*
wined3d_declaration
;
struct
d3d8_vertex_declaration
*
d3d8_declaration
;
HRESULT
hr
;
TRACE
(
"iface %p, shader %p.
\n
"
,
iface
,
shader
);
wined3d_mutex_lock
();
if
(
FAILED
(
hr
=
wined3d_device_get_vertex_declaration
(
device
->
wined3d_device
,
&
wined3d_declaration
)))
if
(
(
wined3d_declaration
=
wined3d_device_get_vertex_declaration
(
device
->
wined3d_device
)))
{
wined3d_mutex_unlock
();
WARN
(
"Failed to get wined3d vertex declaration, hr %#x.
\n
"
,
hr
);
return
hr
;
d3d8_declaration
=
wined3d_vertex_declaration_get_parent
(
wined3d_declaration
);
*
shader
=
d3d8_declaration
->
shader_handle
;
}
if
(
!
wined3d_declaration
)
else
{
wined3d_mutex_unlock
();
*
shader
=
0
;
return
D3D_OK
;
}
d3d8_declaration
=
wined3d_vertex_declaration_get_parent
(
wined3d_declaration
);
wined3d_vertex_declaration_decref
(
wined3d_declaration
);
wined3d_mutex_unlock
();
*
shader
=
d3d8_declaration
->
shader_handle
;
TRACE
(
"Returning %#x.
\n
"
,
*
shader
);
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d8_device_DeleteVertexShader
(
IDirect3DDevice8
*
iface
,
DWORD
shader
)
...
...
dlls/d3d9/device.c
View file @
2f03ad1a
...
...
@@ -2088,22 +2088,19 @@ static HRESULT WINAPI d3d9_device_GetVertexDeclaration(IDirect3DDevice9Ex *iface
IDirect3DVertexDeclaration9
**
declaration
)
{
struct
d3d9_device
*
device
=
impl_from_IDirect3DDevice9Ex
(
iface
);
struct
wined3d_vertex_declaration
*
wined3d_declaration
=
NULL
;
struct
wined3d_vertex_declaration
*
wined3d_declaration
;
struct
d3d9_vertex_declaration
*
declaration_impl
;
HRESULT
hr
;
TRACE
(
"iface %p, declaration %p.
\n
"
,
iface
,
declaration
);
if
(
!
declaration
)
return
D3DERR_INVALIDCALL
;
wined3d_mutex_lock
();
hr
=
wined3d_device_get_vertex_declaration
(
device
->
wined3d_device
,
&
wined3d_declaration
);
if
(
SUCCEEDED
(
hr
)
&&
wined3d_declaration
)
if
((
wined3d_declaration
=
wined3d_device_get_vertex_declaration
(
device
->
wined3d_device
)))
{
declaration_impl
=
wined3d_vertex_declaration_get_parent
(
wined3d_declaration
);
*
declaration
=
&
declaration_impl
->
IDirect3DVertexDeclaration9_iface
;
IDirect3DVertexDeclaration9_AddRef
(
*
declaration
);
wined3d_vertex_declaration_decref
(
wined3d_declaration
);
}
else
{
...
...
@@ -2112,7 +2109,7 @@ static HRESULT WINAPI d3d9_device_GetVertexDeclaration(IDirect3DDevice9Ex *iface
wined3d_mutex_unlock
();
TRACE
(
"Returning %p.
\n
"
,
*
declaration
);
return
hr
;
return
D3D_OK
;
}
static
struct
wined3d_vertex_declaration
*
device_get_fvf_declaration
(
struct
d3d9_device
*
device
,
DWORD
fvf
)
...
...
@@ -2215,24 +2212,14 @@ static HRESULT WINAPI d3d9_device_GetFVF(IDirect3DDevice9Ex *iface, DWORD *fvf)
struct
d3d9_device
*
device
=
impl_from_IDirect3DDevice9Ex
(
iface
);
struct
wined3d_vertex_declaration
*
wined3d_declaration
;
struct
d3d9_vertex_declaration
*
d3d9_declaration
;
HRESULT
hr
;
TRACE
(
"iface %p, fvf %p.
\n
"
,
iface
,
fvf
);
wined3d_mutex_lock
();
if
(
FAILED
(
hr
=
wined3d_device_get_vertex_declaration
(
device
->
wined3d_device
,
&
wined3d_declaration
)))
{
wined3d_mutex_unlock
();
WARN
(
"Failed to get vertex declaration, hr %#x.
\n
"
,
hr
);
*
fvf
=
0
;
return
hr
;
}
if
(
wined3d_declaration
)
if
((
wined3d_declaration
=
wined3d_device_get_vertex_declaration
(
device
->
wined3d_device
)))
{
d3d9_declaration
=
wined3d_vertex_declaration_get_parent
(
wined3d_declaration
);
*
fvf
=
d3d9_declaration
->
fvf
;
wined3d_vertex_declaration_decref
(
wined3d_declaration
);
}
else
{
...
...
@@ -2242,7 +2229,7 @@ static HRESULT WINAPI d3d9_device_GetFVF(IDirect3DDevice9Ex *iface, DWORD *fvf)
TRACE
(
"Returning FVF %#x.
\n
"
,
*
fvf
);
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d9_device_CreateVertexShader
(
IDirect3DDevice9Ex
*
iface
,
...
...
dlls/wined3d/device.c
View file @
2f03ad1a
...
...
@@ -2442,16 +2442,11 @@ void CDECL wined3d_device_set_vertex_declaration(struct wined3d_device *device,
device_invalidate_state
(
device
,
STATE_VDECL
);
}
HRESULT
CDECL
wined3d_device_get_vertex_declaration
(
const
struct
wined3d_device
*
device
,
struct
wined3d_vertex_declaration
**
declaration
)
struct
wined3d_vertex_declaration
*
CDECL
wined3d_device_get_vertex_declaration
(
const
struct
wined3d_device
*
device
)
{
TRACE
(
"device %p, declaration %p.
\n
"
,
device
,
declaration
);
*
declaration
=
device
->
stateBlock
->
state
.
vertex_declaration
;
if
(
*
declaration
)
wined3d_vertex_declaration_incref
(
*
declaration
);
TRACE
(
"device %p.
\n
"
,
device
);
return
WINED3D_OK
;
return
device
->
stateBlock
->
state
.
vertex_declaration
;
}
HRESULT
CDECL
wined3d_device_set_vertex_shader
(
struct
wined3d_device
*
device
,
struct
wined3d_shader
*
shader
)
...
...
dlls/wined3d/wined3d.spec
View file @
2f03ad1a
...
...
@@ -88,7 +88,7 @@
@ cdecl wined3d_device_get_texture(ptr long ptr)
@ cdecl wined3d_device_get_texture_stage_state(ptr long long ptr)
@ cdecl wined3d_device_get_transform(ptr long ptr)
@ cdecl wined3d_device_get_vertex_declaration(ptr
ptr
)
@ cdecl wined3d_device_get_vertex_declaration(ptr)
@ cdecl wined3d_device_get_vertex_shader(ptr)
@ cdecl wined3d_device_get_viewport(ptr ptr)
@ cdecl wined3d_device_get_vs_consts_b(ptr long ptr long)
...
...
include/wine/wined3d.h
View file @
2f03ad1a
...
...
@@ -2164,8 +2164,7 @@ HRESULT __cdecl wined3d_device_get_texture_stage_state(const struct wined3d_devi
UINT
stage
,
enum
wined3d_texture_stage_state
state
,
DWORD
*
value
);
void
__cdecl
wined3d_device_get_transform
(
const
struct
wined3d_device
*
device
,
enum
wined3d_transform_state
state
,
struct
wined3d_matrix
*
matrix
);
HRESULT
__cdecl
wined3d_device_get_vertex_declaration
(
const
struct
wined3d_device
*
device
,
struct
wined3d_vertex_declaration
**
declaration
);
struct
wined3d_vertex_declaration
*
__cdecl
wined3d_device_get_vertex_declaration
(
const
struct
wined3d_device
*
device
);
struct
wined3d_shader
*
__cdecl
wined3d_device_get_vertex_shader
(
const
struct
wined3d_device
*
device
);
void
__cdecl
wined3d_device_get_viewport
(
const
struct
wined3d_device
*
device
,
struct
wined3d_viewport
*
viewport
);
HRESULT
__cdecl
wined3d_device_get_vs_consts_b
(
const
struct
wined3d_device
*
device
,
...
...
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