Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
4c3d55f1
Commit
4c3d55f1
authored
Mar 14, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of IWineD3DVolumeTexture::Map().
parent
2ce5be2c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
49 deletions
+42
-49
texture.c
dlls/d3d10core/texture.c
+11
-11
volumetexture.c
dlls/d3d8/volumetexture.c
+11
-5
volumetexture.c
dlls/d3d9/volumetexture.c
+11
-7
volume.c
dlls/wined3d/volume.c
+5
-0
volumetexture.c
dlls/wined3d/volumetexture.c
+0
-20
wined3d.spec
dlls/wined3d/wined3d.spec
+2
-0
wined3d.idl
include/wine/wined3d.idl
+2
-6
No files found.
dlls/d3d10core/texture.c
View file @
4c3d55f1
...
@@ -346,32 +346,32 @@ static UINT STDMETHODCALLTYPE d3d10_texture3d_GetEvictionPriority(ID3D10Texture3
...
@@ -346,32 +346,32 @@ static UINT STDMETHODCALLTYPE d3d10_texture3d_GetEvictionPriority(ID3D10Texture3
return
0
;
return
0
;
}
}
static
HRESULT
STDMETHODCALLTYPE
d3d10_texture3d_Map
(
ID3D10Texture3D
*
iface
,
UINT
sub_resource
,
static
HRESULT
STDMETHODCALLTYPE
d3d10_texture3d_Map
(
ID3D10Texture3D
*
iface
,
UINT
sub_resource
_idx
,
D3D10_MAP
map_type
,
UINT
map_flags
,
D3D10_MAPPED_TEXTURE3D
*
mapped_texture
)
D3D10_MAP
map_type
,
UINT
map_flags
,
D3D10_MAPPED_TEXTURE3D
*
mapped_texture
)
{
{
struct
d3d10_texture3d
*
texture
=
(
struct
d3d10_texture3d
*
)
iface
;
struct
d3d10_texture3d
*
texture
=
(
struct
d3d10_texture3d
*
)
iface
;
struct
wined3d_resource
*
sub_resource
;
WINED3DLOCKED_BOX
wined3d_map_desc
;
WINED3DLOCKED_BOX
wined3d_map_desc
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, sub_resource %u, map_type %u, map_flags %#x, mapped_texture %p.
\n
"
,
TRACE
(
"iface %p, sub_resource
_idx
%u, map_type %u, map_flags %#x, mapped_texture %p.
\n
"
,
iface
,
sub_resource
,
map_type
,
map_flags
,
mapped_texture
);
iface
,
sub_resource
_idx
,
map_type
,
map_flags
,
mapped_texture
);
if
(
map_type
!=
D3D10_MAP_READ_WRITE
)
if
(
map_type
!=
D3D10_MAP_READ_WRITE
)
FIXME
(
"Ignoring map_type %#x.
\n
"
,
map_type
);
FIXME
(
"Ignoring map_type %#x.
\n
"
,
map_type
);
if
(
map_flags
)
if
(
map_flags
)
FIXME
(
"Ignoring map_flags %#x.
\n
"
,
map_flags
);
FIXME
(
"Ignoring map_flags %#x.
\n
"
,
map_flags
);
hr
=
IWineD3DVolumeTexture_Map
(
texture
->
wined3d_texture
,
sub_resource
,
&
wined3d_map_desc
,
NULL
,
0
);
if
(
!
(
sub_resource
=
IWineD3DVolumeTexture_GetSubResource
(
texture
->
wined3d_texture
,
sub_resource_idx
)))
if
(
FAILED
(
hr
))
hr
=
E_INVALIDARG
;
else
if
(
SUCCEEDED
(
hr
=
IWineD3DVolume_Map
(
wined3d_volume_from_resource
(
sub_resource
),
&
wined3d_map_desc
,
NULL
,
0
)))
{
{
WARN
(
"Failed to map texture, hr %#x.
\n
"
,
hr
);
mapped_texture
->
pData
=
wined3d_map_desc
.
pBits
;
return
hr
;
mapped_texture
->
RowPitch
=
wined3d_map_desc
.
RowPitch
;
mapped_texture
->
DepthPitch
=
wined3d_map_desc
.
SlicePitch
;
}
}
mapped_texture
->
pData
=
wined3d_map_desc
.
pBits
;
mapped_texture
->
RowPitch
=
wined3d_map_desc
.
RowPitch
;
mapped_texture
->
DepthPitch
=
wined3d_map_desc
.
SlicePitch
;
return
hr
;
return
hr
;
}
}
...
...
dlls/d3d8/volumetexture.c
View file @
4c3d55f1
...
@@ -277,16 +277,22 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetVolumeLevel(IDirect3DVolume
...
@@ -277,16 +277,22 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetVolumeLevel(IDirect3DVolume
return
D3D_OK
;
return
D3D_OK
;
}
}
static
HRESULT
WINAPI
IDirect3DVolumeTexture8Impl_LockBox
(
LPDIRECT3DVOLUMETEXTURE8
iface
,
UINT
Level
,
D3DLOCKED_BOX
*
pLockedVolume
,
CONST
D3DBOX
*
pBox
,
DWORD
Flags
)
{
static
HRESULT
WINAPI
IDirect3DVolumeTexture8Impl_LockBox
(
IDirect3DVolumeTexture8
*
iface
,
IDirect3DVolumeTexture8Impl
*
This
=
(
IDirect3DVolumeTexture8Impl
*
)
iface
;
UINT
level
,
D3DLOCKED_BOX
*
locked_box
,
const
D3DBOX
*
box
,
DWORD
flags
)
{
IDirect3DVolumeTexture8Impl
*
texture
=
(
IDirect3DVolumeTexture8Impl
*
)
iface
;
struct
wined3d_resource
*
sub_resource
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, level %u, locked_box %p, box %p, flags %#x.
\n
"
,
TRACE
(
"iface %p, level %u, locked_box %p, box %p, flags %#x.
\n
"
,
iface
,
Level
,
pLockedVolume
,
pBox
,
F
lags
);
iface
,
level
,
locked_box
,
box
,
f
lags
);
wined3d_mutex_lock
();
wined3d_mutex_lock
();
hr
=
IWineD3DVolumeTexture_Map
(
This
->
wineD3DVolumeTexture
,
Level
,
if
(
!
(
sub_resource
=
IWineD3DVolumeTexture_GetSubResource
(
texture
->
wineD3DVolumeTexture
,
level
)))
(
WINED3DLOCKED_BOX
*
)
pLockedVolume
,
(
const
WINED3DBOX
*
)
pBox
,
Flags
);
hr
=
D3DERR_INVALIDCALL
;
else
hr
=
IDirect3DVolume8_LockBox
((
IDirect3DVolume8
*
)
wined3d_resource_get_parent
(
sub_resource
),
locked_box
,
box
,
flags
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
return
hr
;
return
hr
;
...
...
dlls/d3d9/volumetexture.c
View file @
4c3d55f1
...
@@ -339,18 +339,22 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetVolumeLevel(IDirect3DVolume
...
@@ -339,18 +339,22 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetVolumeLevel(IDirect3DVolume
return
D3D_OK
;
return
D3D_OK
;
}
}
static
HRESULT
WINAPI
IDirect3DVolumeTexture9Impl_LockBox
(
LPDIRECT3DVOLUMETEXTURE9
iface
,
UINT
Level
,
D3DLOCKED_BOX
*
pLockedVolume
,
CONST
D3DBOX
*
pBox
,
DWORD
Flags
)
{
static
HRESULT
WINAPI
IDirect3DVolumeTexture9Impl_LockBox
(
IDirect3DVolumeTexture9
*
iface
,
IDirect3DVolumeTexture9Impl
*
This
=
(
IDirect3DVolumeTexture9Impl
*
)
iface
;
UINT
level
,
D3DLOCKED_BOX
*
locked_box
,
const
D3DBOX
*
box
,
DWORD
flags
)
{
IDirect3DVolumeTexture9Impl
*
texture
=
(
IDirect3DVolumeTexture9Impl
*
)
iface
;
struct
wined3d_resource
*
sub_resource
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, level %u, locked_box %p, box %p, flags %#x.
\n
"
,
TRACE
(
"iface %p, level %u, locked_box %p, box %p, flags %#x.
\n
"
,
iface
,
Level
,
pLockedVolume
,
pBox
,
F
lags
);
iface
,
level
,
locked_box
,
box
,
f
lags
);
wined3d_mutex_lock
();
wined3d_mutex_lock
();
if
(
!
(
sub_resource
=
IWineD3DVolumeTexture_GetSubResource
(
texture
->
wineD3DVolumeTexture
,
level
)))
hr
=
IWineD3DVolumeTexture_Map
(
This
->
wineD3DVolumeTexture
,
Level
,
hr
=
D3DERR_INVALIDCALL
;
(
WINED3DLOCKED_BOX
*
)
pLockedVolume
,
(
const
WINED3DBOX
*
)
pBox
,
Flags
);
else
hr
=
IDirect3DVolume9_LockBox
((
IDirect3DVolume9
*
)
wined3d_resource_get_parent
(
sub_resource
),
locked_box
,
box
,
flags
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
return
hr
;
return
hr
;
...
...
dlls/wined3d/volume.c
View file @
4c3d55f1
...
@@ -277,6 +277,11 @@ static HRESULT WINAPI IWineD3DVolumeImpl_Map(IWineD3DVolume *iface,
...
@@ -277,6 +277,11 @@ static HRESULT WINAPI IWineD3DVolumeImpl_Map(IWineD3DVolume *iface,
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
IWineD3DVolume
*
CDECL
wined3d_volume_from_resource
(
struct
wined3d_resource
*
resource
)
{
return
(
IWineD3DVolume
*
)
volume_from_resource
(
resource
);
}
static
HRESULT
WINAPI
IWineD3DVolumeImpl_Unmap
(
IWineD3DVolume
*
iface
)
static
HRESULT
WINAPI
IWineD3DVolumeImpl_Unmap
(
IWineD3DVolume
*
iface
)
{
{
IWineD3DVolumeImpl
*
This
=
(
IWineD3DVolumeImpl
*
)
iface
;
IWineD3DVolumeImpl
*
This
=
(
IWineD3DVolumeImpl
*
)
iface
;
...
...
dlls/wined3d/volumetexture.c
View file @
4c3d55f1
...
@@ -273,25 +273,6 @@ static struct wined3d_resource * WINAPI IWineD3DVolumeTextureImpl_GetSubResource
...
@@ -273,25 +273,6 @@ static struct wined3d_resource * WINAPI IWineD3DVolumeTextureImpl_GetSubResource
return
basetexture_get_sub_resource
(
texture
,
sub_resource_idx
);
return
basetexture_get_sub_resource
(
texture
,
sub_resource_idx
);
}
}
static
HRESULT
WINAPI
IWineD3DVolumeTextureImpl_Map
(
IWineD3DVolumeTexture
*
iface
,
UINT
sub_resource_idx
,
WINED3DLOCKED_BOX
*
locked_box
,
const
WINED3DBOX
*
box
,
DWORD
flags
)
{
IWineD3DBaseTextureImpl
*
texture
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
struct
wined3d_resource
*
sub_resource
;
TRACE
(
"iface %p, sub_resource_idx %u, locked_box %p, box %p, flags %#x.
\n
"
,
iface
,
sub_resource_idx
,
locked_box
,
box
,
flags
);
if
(
!
(
sub_resource
=
basetexture_get_sub_resource
(
texture
,
sub_resource_idx
)))
{
WARN
(
"Failed to get sub-resource.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
return
IWineD3DVolume_Map
((
IWineD3DVolume
*
)
volume_from_resource
(
sub_resource
),
locked_box
,
box
,
flags
);
}
static
HRESULT
WINAPI
IWineD3DVolumeTextureImpl_Unmap
(
IWineD3DVolumeTexture
*
iface
,
UINT
sub_resource_idx
)
static
HRESULT
WINAPI
IWineD3DVolumeTextureImpl_Unmap
(
IWineD3DVolumeTexture
*
iface
,
UINT
sub_resource_idx
)
{
{
IWineD3DBaseTextureImpl
*
texture
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
IWineD3DBaseTextureImpl
*
texture
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
...
@@ -352,7 +333,6 @@ static const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl =
...
@@ -352,7 +333,6 @@ static const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl =
IWineD3DVolumeTextureImpl_IsCondNP2
,
IWineD3DVolumeTextureImpl_IsCondNP2
,
IWineD3DVolumeTextureImpl_GetSubResource
,
IWineD3DVolumeTextureImpl_GetSubResource
,
/* volume texture */
/* volume texture */
IWineD3DVolumeTextureImpl_Map
,
IWineD3DVolumeTextureImpl_Unmap
,
IWineD3DVolumeTextureImpl_Unmap
,
IWineD3DVolumeTextureImpl_AddDirtyBox
IWineD3DVolumeTextureImpl_AddDirtyBox
};
};
...
...
dlls/wined3d/wined3d.spec
View file @
4c3d55f1
...
@@ -69,3 +69,5 @@
...
@@ -69,3 +69,5 @@
@ cdecl wined3d_vertex_declaration_decref(ptr)
@ cdecl wined3d_vertex_declaration_decref(ptr)
@ cdecl wined3d_vertex_declaration_get_parent(ptr)
@ cdecl wined3d_vertex_declaration_get_parent(ptr)
@ cdecl wined3d_vertex_declaration_incref(ptr)
@ cdecl wined3d_vertex_declaration_incref(ptr)
@ cdecl wined3d_volume_from_resource(ptr)
include/wine/wined3d.idl
View file @
4c3d55f1
...
@@ -2395,12 +2395,6 @@ interface IWineD3DCubeTexture : IWineD3DBaseTexture
...
@@ -2395,12 +2395,6 @@ interface IWineD3DCubeTexture : IWineD3DBaseTexture
]
]
interface
IWineD3DVolumeTexture
:
IWineD3DBaseTexture
interface
IWineD3DVolumeTexture
:
IWineD3DBaseTexture
{
{
HRESULT
Map
(
[
in
]
UINT
sub_resource_idx
,
[
out
]
WINED3DLOCKED_BOX
*
locked_box
,
[
in
]
const
WINED3DBOX
*
box
,
[
in
]
DWORD
flags
)
;
HRESULT
Unmap
(
HRESULT
Unmap
(
[
in
]
UINT
sub_resource_idx
[
in
]
UINT
sub_resource_idx
)
;
)
;
...
@@ -3200,3 +3194,5 @@ ULONG __cdecl wined3d_stateblock_incref(struct wined3d_stateblock *stateblock);
...
@@ -3200,3 +3194,5 @@ ULONG __cdecl wined3d_stateblock_incref(struct wined3d_stateblock *stateblock);
ULONG
__cdecl
wined3d_vertex_declaration_decref
(
struct
wined3d_vertex_declaration
*
declaration
)
;
ULONG
__cdecl
wined3d_vertex_declaration_decref
(
struct
wined3d_vertex_declaration
*
declaration
)
;
void
*
__cdecl
wined3d_vertex_declaration_get_parent
(
const
struct
wined3d_vertex_declaration
*
declaration
)
;
void
*
__cdecl
wined3d_vertex_declaration_get_parent
(
const
struct
wined3d_vertex_declaration
*
declaration
)
;
ULONG
__cdecl
wined3d_vertex_declaration_incref
(
struct
wined3d_vertex_declaration
*
declaration
)
;
ULONG
__cdecl
wined3d_vertex_declaration_incref
(
struct
wined3d_vertex_declaration
*
declaration
)
;
IWineD3DVolume
*
__cdecl
wined3d_volume_from_resource
(
struct
wined3d_resource
*
resource
)
;
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