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
2fa5a221
Commit
2fa5a221
authored
Dec 05, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the WINED3DLOCKED_BOX typedef.
parent
eafebc04
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
25 deletions
+25
-25
texture.c
dlls/d3d10core/texture.c
+4
-4
volume.c
dlls/d3d8/volume.c
+1
-1
volume.c
dlls/d3d9/volume.c
+1
-1
device.c
dlls/wined3d/device.c
+3
-3
volume.c
dlls/wined3d/volume.c
+10
-10
wined3d.h
include/wine/wined3d.h
+6
-6
No files found.
dlls/d3d10core/texture.c
View file @
2fa5a221
...
...
@@ -363,8 +363,8 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture3d_Map(ID3D10Texture3D *iface, UIN
D3D10_MAP
map_type
,
UINT
map_flags
,
D3D10_MAPPED_TEXTURE3D
*
mapped_texture
)
{
struct
d3d10_texture3d
*
texture
=
impl_from_ID3D10Texture3D
(
iface
);
struct
wined3d_mapped_box
wined3d_map_desc
;
struct
wined3d_resource
*
sub_resource
;
WINED3DLOCKED_BOX
wined3d_map_desc
;
HRESULT
hr
;
TRACE
(
"iface %p, sub_resource_idx %u, map_type %u, map_flags %#x, mapped_texture %p.
\n
"
,
...
...
@@ -380,9 +380,9 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture3d_Map(ID3D10Texture3D *iface, UIN
else
if
(
SUCCEEDED
(
hr
=
wined3d_volume_map
(
wined3d_volume_from_resource
(
sub_resource
),
&
wined3d_map_desc
,
NULL
,
0
)))
{
mapped_texture
->
pData
=
wined3d_map_desc
.
pBits
;
mapped_texture
->
RowPitch
=
wined3d_map_desc
.
RowP
itch
;
mapped_texture
->
DepthPitch
=
wined3d_map_desc
.
SliceP
itch
;
mapped_texture
->
pData
=
wined3d_map_desc
.
data
;
mapped_texture
->
RowPitch
=
wined3d_map_desc
.
row_p
itch
;
mapped_texture
->
DepthPitch
=
wined3d_map_desc
.
slice_p
itch
;
}
return
hr
;
...
...
dlls/d3d8/volume.c
View file @
2fa5a221
...
...
@@ -227,7 +227,7 @@ static HRESULT WINAPI IDirect3DVolume8Impl_LockBox(IDirect3DVolume8 *iface,
iface
,
pLockedVolume
,
pBox
,
Flags
);
wined3d_mutex_lock
();
hr
=
wined3d_volume_map
(
This
->
wined3d_volume
,
(
WINED3DLOCKED_BOX
*
)
pLockedVolume
,
hr
=
wined3d_volume_map
(
This
->
wined3d_volume
,
(
struct
wined3d_mapped_box
*
)
pLockedVolume
,
(
const
WINED3DBOX
*
)
pBox
,
Flags
);
wined3d_mutex_unlock
();
...
...
dlls/d3d9/volume.c
View file @
2fa5a221
...
...
@@ -225,7 +225,7 @@ static HRESULT WINAPI IDirect3DVolume9Impl_LockBox(IDirect3DVolume9 *iface,
iface
,
pLockedVolume
,
pBox
,
Flags
);
wined3d_mutex_lock
();
hr
=
wined3d_volume_map
(
This
->
wined3d_volume
,
(
WINED3DLOCKED_BOX
*
)
pLockedVolume
,
hr
=
wined3d_volume_map
(
This
->
wined3d_volume
,
(
struct
wined3d_mapped_box
*
)
pLockedVolume
,
(
const
WINED3DBOX
*
)
pBox
,
Flags
);
wined3d_mutex_unlock
();
...
...
dlls/wined3d/device.c
View file @
2fa5a221
...
...
@@ -4301,8 +4301,8 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive_strided(struct wined3d_devic
static
HRESULT
device_update_volume
(
struct
wined3d_device
*
device
,
struct
wined3d_volume
*
src_volume
,
struct
wined3d_volume
*
dst_volume
)
{
WINED3DLOCKED_BOX
src
;
WINED3DLOCKED_BOX
dst
;
struct
wined3d_mapped_box
src
;
struct
wined3d_mapped_box
dst
;
HRESULT
hr
;
TRACE
(
"device %p, src_volume %p, dst_volume %p.
\n
"
,
...
...
@@ -4319,7 +4319,7 @@ static HRESULT device_update_volume(struct wined3d_device *device,
return
hr
;
}
memcpy
(
dst
.
pBits
,
src
.
pBits
,
dst_volume
->
resource
.
size
);
memcpy
(
dst
.
data
,
src
.
data
,
dst_volume
->
resource
.
size
);
hr
=
wined3d_volume_unmap
(
dst_volume
);
if
(
FAILED
(
hr
))
...
...
dlls/wined3d/volume.c
View file @
2fa5a221
...
...
@@ -185,23 +185,23 @@ struct wined3d_resource * CDECL wined3d_volume_get_resource(struct wined3d_volum
}
HRESULT
CDECL
wined3d_volume_map
(
struct
wined3d_volume
*
volume
,
WINED3DLOCKED_BOX
*
lock
ed_box
,
const
WINED3DBOX
*
box
,
DWORD
flags
)
struct
wined3d_mapped_box
*
mapp
ed_box
,
const
WINED3DBOX
*
box
,
DWORD
flags
)
{
TRACE
(
"volume %p,
lock
ed_box %p, box %p, flags %#x.
\n
"
,
volume
,
lock
ed_box
,
box
,
flags
);
TRACE
(
"volume %p,
mapp
ed_box %p, box %p, flags %#x.
\n
"
,
volume
,
mapp
ed_box
,
box
,
flags
);
if
(
!
volume
->
resource
.
allocatedMemory
)
volume
->
resource
.
allocatedMemory
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
volume
->
resource
.
size
);
TRACE
(
"allocatedMemory %p.
\n
"
,
volume
->
resource
.
allocatedMemory
);
locked_box
->
RowP
itch
=
volume
->
resource
.
format
->
byte_count
*
volume
->
resource
.
width
;
/* Bytes / row */
locked_box
->
SliceP
itch
=
volume
->
resource
.
format
->
byte_count
mapped_box
->
row_p
itch
=
volume
->
resource
.
format
->
byte_count
*
volume
->
resource
.
width
;
/* Bytes / row */
mapped_box
->
slice_p
itch
=
volume
->
resource
.
format
->
byte_count
*
volume
->
resource
.
width
*
volume
->
resource
.
height
;
/* Bytes / slice */
if
(
!
box
)
{
TRACE
(
"No box supplied - all is ok
\n
"
);
locked_box
->
pBits
=
volume
->
resource
.
allocatedMemory
;
mapped_box
->
data
=
volume
->
resource
.
allocatedMemory
;
volume
->
lockedBox
.
Left
=
0
;
volume
->
lockedBox
.
Top
=
0
;
volume
->
lockedBox
.
Front
=
0
;
...
...
@@ -213,9 +213,9 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
{
TRACE
(
"Lock Box (%p) = l %d, t %d, r %d, b %d, fr %d, ba %d
\n
"
,
box
,
box
->
Left
,
box
->
Top
,
box
->
Right
,
box
->
Bottom
,
box
->
Front
,
box
->
Back
);
locked_box
->
pBits
=
volume
->
resource
.
allocatedMemory
+
(
locked_box
->
SliceP
itch
*
box
->
Front
)
/* FIXME: is front < back or vica versa? */
+
(
locked_box
->
RowP
itch
*
box
->
Top
)
mapped_box
->
data
=
volume
->
resource
.
allocatedMemory
+
(
mapped_box
->
slice_p
itch
*
box
->
Front
)
/* FIXME: is front < back or vica versa? */
+
(
mapped_box
->
row_p
itch
*
box
->
Top
)
+
(
box
->
Left
*
volume
->
resource
.
format
->
byte_count
);
volume
->
lockedBox
.
Left
=
box
->
Left
;
volume
->
lockedBox
.
Top
=
box
->
Top
;
...
...
@@ -234,7 +234,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
volume
->
locked
=
TRUE
;
TRACE
(
"Returning memory %p, row pitch %d, slice pitch %d.
\n
"
,
locked_box
->
pBits
,
locked_box
->
RowPitch
,
locked_box
->
SliceP
itch
);
mapped_box
->
data
,
mapped_box
->
row_pitch
,
mapped_box
->
slice_p
itch
);
return
WINED3D_OK
;
}
...
...
include/wine/wined3d.h
View file @
2fa5a221
...
...
@@ -1708,12 +1708,12 @@ struct wined3d_mapped_rect
void
*
data
;
};
typedef
struct
_WINED3DLOCKED_BOX
struct
wined3d_mapped_box
{
INT
RowP
itch
;
INT
SliceP
itch
;
void
*
pBits
;
}
WINED3DLOCKED_BOX
;
UINT
row_p
itch
;
UINT
slice_p
itch
;
void
*
data
;
};
typedef
struct
_WINED3DBOX
{
...
...
@@ -2452,7 +2452,7 @@ DWORD __cdecl wined3d_volume_get_priority(const struct wined3d_volume *volume);
struct
wined3d_resource
*
__cdecl
wined3d_volume_get_resource
(
struct
wined3d_volume
*
volume
);
ULONG
__cdecl
wined3d_volume_incref
(
struct
wined3d_volume
*
volume
);
HRESULT
__cdecl
wined3d_volume_map
(
struct
wined3d_volume
*
volume
,
WINED3DLOCKED_BOX
*
lock
ed_box
,
const
WINED3DBOX
*
box
,
DWORD
flags
);
struct
wined3d_mapped_box
*
mapp
ed_box
,
const
WINED3DBOX
*
box
,
DWORD
flags
);
void
__cdecl
wined3d_volume_preload
(
struct
wined3d_volume
*
volume
);
DWORD
__cdecl
wined3d_volume_set_priority
(
struct
wined3d_volume
*
volume
,
DWORD
new_priority
);
HRESULT
__cdecl
wined3d_volume_unmap
(
struct
wined3d_volume
*
volume
);
...
...
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