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
d01e0647
Commit
d01e0647
authored
Apr 24, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Get rid of IDirect3DBaseTexture9Impl.
parent
5145b131
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
17 deletions
+20
-17
d3d9_private.h
dlls/d3d9/d3d9_private.h
+1
-14
device.c
dlls/d3d9/device.c
+9
-3
texture.c
dlls/d3d9/texture.c
+10
-0
No files found.
dlls/d3d9/d3d9_private.h
View file @
d01e0647
...
...
@@ -289,20 +289,6 @@ HRESULT indexbuffer_init(IDirect3DIndexBuffer9Impl *buffer, IDirect3DDevice9Impl
UINT
size
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
)
DECLSPEC_HIDDEN
;
IDirect3DIndexBuffer9Impl
*
unsafe_impl_from_IDirect3DIndexBuffer9
(
IDirect3DIndexBuffer9
*
iface
)
DECLSPEC_HIDDEN
;
/* --------------------- */
/* IDirect3DBaseTexture9 */
/* --------------------- */
/*****************************************************************************
* IDirect3DBaseTexture9 implementation structure
*/
typedef
struct
IDirect3DBaseTexture9Impl
{
const
IDirect3DBaseTexture9Vtbl
*
lpVtbl
;
LONG
ref
;
struct
wined3d_texture
*
wined3d_texture
;
}
IDirect3DBaseTexture9Impl
;
struct
d3d9_texture
{
IDirect3DBaseTexture9
IDirect3DBaseTexture9_iface
;
...
...
@@ -317,6 +303,7 @@ HRESULT texture_init(struct d3d9_texture *texture, IDirect3DDevice9Impl *device,
UINT
width
,
UINT
height
,
UINT
levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
)
DECLSPEC_HIDDEN
;
HRESULT
volumetexture_init
(
struct
d3d9_texture
*
texture
,
IDirect3DDevice9Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
)
DECLSPEC_HIDDEN
;
struct
d3d9_texture
*
unsafe_impl_from_IDirect3DBaseTexture9
(
IDirect3DBaseTexture9
*
iface
)
DECLSPEC_HIDDEN
;
/* ----------------------- */
/* IDirect3DStateBlock9 */
...
...
dlls/d3d9/device.c
View file @
d01e0647
...
...
@@ -975,14 +975,17 @@ static HRESULT WINAPI IDirect3DDevice9Impl_UpdateTexture(IDirect3DDevice9Ex *ifa
IDirect3DBaseTexture9
*
src_texture
,
IDirect3DBaseTexture9
*
dst_texture
)
{
IDirect3DDevice9Impl
*
This
=
impl_from_IDirect3DDevice9Ex
(
iface
);
struct
d3d9_texture
*
src_impl
,
*
dst_impl
;
HRESULT
hr
;
TRACE
(
"iface %p, src_texture %p, dst_texture %p.
\n
"
,
iface
,
src_texture
,
dst_texture
);
src_impl
=
unsafe_impl_from_IDirect3DBaseTexture9
(
src_texture
);
dst_impl
=
unsafe_impl_from_IDirect3DBaseTexture9
(
dst_texture
);
wined3d_mutex_lock
();
hr
=
wined3d_device_update_texture
(
This
->
wined3d_device
,
((
IDirect3DBaseTexture9Impl
*
)
src_texture
)
->
wined3d_texture
,
((
IDirect3DBaseTexture9Impl
*
)
dst_texture
)
->
wined3d_texture
);
src_impl
->
wined3d_texture
,
dst_impl
->
wined3d_texture
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -1717,13 +1720,16 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetTexture(IDirect3DDevice9Ex *iface,
IDirect3DBaseTexture9
*
texture
)
{
IDirect3DDevice9Impl
*
device
=
impl_from_IDirect3DDevice9Ex
(
iface
);
struct
d3d9_texture
*
texture_impl
;
HRESULT
hr
;
TRACE
(
"iface %p, stage %u, texture %p.
\n
"
,
iface
,
stage
,
texture
);
texture_impl
=
unsafe_impl_from_IDirect3DBaseTexture9
(
texture
);
wined3d_mutex_lock
();
hr
=
wined3d_device_set_texture
(
device
->
wined3d_device
,
stage
,
texture
?
((
IDirect3DBaseTexture9Impl
*
)
texture
)
->
wined3d_texture
:
NULL
);
texture
_impl
?
texture_impl
->
wined3d_texture
:
NULL
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/d3d9/texture.c
View file @
d01e0647
...
...
@@ -1243,6 +1243,16 @@ static const IDirect3DVolumeTexture9Vtbl d3d9_texture_3d_vtbl =
d3d9_texture_3d_AddDirtyBox
,
};
struct
d3d9_texture
*
unsafe_impl_from_IDirect3DBaseTexture9
(
IDirect3DBaseTexture9
*
iface
)
{
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
(
const
IDirect3DBaseTexture9Vtbl
*
)
&
d3d9_texture_2d_vtbl
||
iface
->
lpVtbl
==
(
const
IDirect3DBaseTexture9Vtbl
*
)
&
d3d9_texture_cube_vtbl
||
iface
->
lpVtbl
==
(
const
IDirect3DBaseTexture9Vtbl
*
)
&
d3d9_texture_3d_vtbl
);
return
CONTAINING_RECORD
(
iface
,
struct
d3d9_texture
,
IDirect3DBaseTexture9_iface
);
}
static
void
STDMETHODCALLTYPE
d3d9_texture_wined3d_object_destroyed
(
void
*
parent
)
{
HeapFree
(
GetProcessHeap
(),
0
,
parent
);
...
...
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