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
db2e44a9
Commit
db2e44a9
authored
Sep 25, 2014
by
Johannes Brandstätter
Committed by
Alexandre Julliard
Sep 26, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Add support for map_type flags D3D10_MAP_READ,…
d3d10core: Add support for map_type flags D3D10_MAP_READ, D3D10_MAP_WRITE_NO_OVERWRITE and D3D10_MAP_DISCARD.
parent
f23b4646
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
9 deletions
+27
-9
buffer.c
dlls/d3d10core/buffer.c
+2
-3
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+1
-0
texture.c
dlls/d3d10core/texture.c
+2
-6
utils.c
dlls/d3d10core/utils.c
+22
-0
No files found.
dlls/d3d10core/buffer.c
View file @
db2e44a9
...
...
@@ -154,12 +154,11 @@ static HRESULT STDMETHODCALLTYPE d3d10_buffer_Map(ID3D10Buffer *iface, D3D10_MAP
TRACE
(
"iface %p, map_type %u, map_flags %#x, data %p.
\n
"
,
iface
,
map_type
,
map_flags
,
data
);
if
(
map_type
!=
D3D10_MAP_READ_WRITE
)
FIXME
(
"Ignoring map_type %#x.
\n
"
,
map_type
);
if
(
map_flags
)
FIXME
(
"Ignoring map_flags %#x.
\n
"
,
map_flags
);
return
wined3d_buffer_map
(
buffer
->
wined3d_buffer
,
0
,
0
,
(
BYTE
**
)
data
,
0
);
return
wined3d_buffer_map
(
buffer
->
wined3d_buffer
,
0
,
0
,
(
BYTE
**
)
data
,
wined3d_map_flags_from_d3d10_map_type
(
map_type
));
}
static
void
STDMETHODCALLTYPE
d3d10_buffer_Unmap
(
ID3D10Buffer
*
iface
)
...
...
dlls/d3d10core/d3d10core_private.h
View file @
db2e44a9
...
...
@@ -63,6 +63,7 @@ DXGI_FORMAT dxgi_format_from_wined3dformat(enum wined3d_format_id format) DECLSP
enum
wined3d_format_id
wined3dformat_from_dxgi_format
(
DXGI_FORMAT
format
)
DECLSPEC_HIDDEN
;
DWORD
wined3d_usage_from_d3d10core
(
UINT
bind_flags
,
enum
D3D10_USAGE
usage
)
DECLSPEC_HIDDEN
;
struct
wined3d_resource
*
wined3d_resource_from_resource
(
ID3D10Resource
*
resource
)
DECLSPEC_HIDDEN
;
DWORD
wined3d_map_flags_from_d3d10_map_type
(
D3D10_MAP
map_type
)
DECLSPEC_HIDDEN
;
static
inline
void
read_dword
(
const
char
**
ptr
,
DWORD
*
d
)
{
...
...
dlls/d3d10core/texture.c
View file @
db2e44a9
...
...
@@ -176,15 +176,13 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture2d_Map(ID3D10Texture2D *iface, UIN
TRACE
(
"iface %p, sub_resource_idx %u, map_type %u, map_flags %#x, mapped_texture %p.
\n
"
,
iface
,
sub_resource_idx
,
map_type
,
map_flags
,
mapped_texture
);
if
(
map_type
!=
D3D10_MAP_READ_WRITE
)
FIXME
(
"Ignoring map_type %#x.
\n
"
,
map_type
);
if
(
map_flags
)
FIXME
(
"Ignoring map_flags %#x.
\n
"
,
map_flags
);
if
(
!
(
sub_resource
=
wined3d_texture_get_sub_resource
(
texture
->
wined3d_texture
,
sub_resource_idx
)))
hr
=
E_INVALIDARG
;
else
if
(
SUCCEEDED
(
hr
=
wined3d_surface_map
(
wined3d_surface_from_resource
(
sub_resource
),
&
wined3d_map_desc
,
NULL
,
0
)))
&
wined3d_map_desc
,
NULL
,
wined3d_map_flags_from_d3d10_map_type
(
map_type
)
)))
{
mapped_texture
->
pData
=
wined3d_map_desc
.
data
;
mapped_texture
->
RowPitch
=
wined3d_map_desc
.
row_pitch
;
...
...
@@ -451,15 +449,13 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture3d_Map(ID3D10Texture3D *iface, UIN
TRACE
(
"iface %p, sub_resource_idx %u, map_type %u, map_flags %#x, mapped_texture %p.
\n
"
,
iface
,
sub_resource_idx
,
map_type
,
map_flags
,
mapped_texture
);
if
(
map_type
!=
D3D10_MAP_READ_WRITE
)
FIXME
(
"Ignoring map_type %#x.
\n
"
,
map_type
);
if
(
map_flags
)
FIXME
(
"Ignoring map_flags %#x.
\n
"
,
map_flags
);
if
(
!
(
sub_resource
=
wined3d_texture_get_sub_resource
(
texture
->
wined3d_texture
,
sub_resource_idx
)))
hr
=
E_INVALIDARG
;
else
if
(
SUCCEEDED
(
hr
=
wined3d_volume_map
(
wined3d_volume_from_resource
(
sub_resource
),
&
wined3d_map_desc
,
NULL
,
0
)))
&
wined3d_map_desc
,
NULL
,
wined3d_map_flags_from_d3d10_map_type
(
map_type
)
)))
{
mapped_texture
->
pData
=
wined3d_map_desc
.
data
;
mapped_texture
->
RowPitch
=
wined3d_map_desc
.
row_pitch
;
...
...
dlls/d3d10core/utils.c
View file @
db2e44a9
...
...
@@ -389,6 +389,28 @@ struct wined3d_resource *wined3d_resource_from_resource(ID3D10Resource *resource
}
}
DWORD
wined3d_map_flags_from_d3d10_map_type
(
D3D10_MAP
map_type
)
{
switch
(
map_type
)
{
case
D3D10_MAP_READ_WRITE
:
return
0
;
case
D3D10_MAP_READ
:
return
WINED3D_MAP_READONLY
;
case
D3D10_MAP_WRITE_DISCARD
:
return
WINED3D_MAP_DISCARD
;
case
D3D10_MAP_WRITE_NO_OVERWRITE
:
return
WINED3D_MAP_NOOVERWRITE
;
default:
FIXME
(
"Unhandled map_type %#x.
\n
"
,
map_type
);
return
0
;
}
}
void
skip_dword_unknown
(
const
char
**
ptr
,
unsigned
int
count
)
{
unsigned
int
i
;
...
...
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