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
b5d0cad4
Commit
b5d0cad4
authored
Feb 16, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Explicitly translate resource map flags.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8a1a94cd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
4 deletions
+25
-4
buffer.c
dlls/d3d9/buffer.c
+2
-2
d3d9_private.h
dlls/d3d9/d3d9_private.h
+1
-0
device.c
dlls/d3d9/device.c
+19
-0
surface.c
dlls/d3d9/surface.c
+1
-1
volume.c
dlls/d3d9/volume.c
+2
-1
No files found.
dlls/d3d9/buffer.c
View file @
b5d0cad4
...
...
@@ -194,7 +194,7 @@ static HRESULT WINAPI d3d9_vertexbuffer_Lock(IDirect3DVertexBuffer9 *iface, UINT
wined3d_box
.
right
=
offset
+
size
;
wined3d_mutex_lock
();
hr
=
wined3d_resource_map
(
wined3d_buffer_get_resource
(
buffer
->
wined3d_buffer
),
0
,
&
wined3d_map_desc
,
&
wined3d_box
,
flags
);
0
,
&
wined3d_map_desc
,
&
wined3d_box
,
wined3dmapflags_from_d3dmapflags
(
flags
)
);
wined3d_mutex_unlock
();
*
data
=
wined3d_map_desc
.
data
;
...
...
@@ -490,7 +490,7 @@ static HRESULT WINAPI d3d9_indexbuffer_Lock(IDirect3DIndexBuffer9 *iface,
wined3d_box
.
right
=
offset
+
size
;
wined3d_mutex_lock
();
hr
=
wined3d_resource_map
(
wined3d_buffer_get_resource
(
buffer
->
wined3d_buffer
),
0
,
&
wined3d_map_desc
,
&
wined3d_box
,
flags
);
0
,
&
wined3d_map_desc
,
&
wined3d_box
,
wined3dmapflags_from_d3dmapflags
(
flags
)
);
wined3d_mutex_unlock
();
*
data
=
wined3d_map_desc
.
data
;
...
...
dlls/d3d9/d3d9_private.h
View file @
b5d0cad4
...
...
@@ -56,6 +56,7 @@ HRESULT vdecl_convert_fvf(DWORD FVF, D3DVERTEXELEMENT9 **ppVertexElements) DECLS
D3DFORMAT
d3dformat_from_wined3dformat
(
enum
wined3d_format_id
format
)
DECLSPEC_HIDDEN
;
BOOL
is_gdi_compat_wined3dformat
(
enum
wined3d_format_id
format
)
DECLSPEC_HIDDEN
;
enum
wined3d_format_id
wined3dformat_from_d3dformat
(
D3DFORMAT
format
)
DECLSPEC_HIDDEN
;
unsigned
int
wined3dmapflags_from_d3dmapflags
(
unsigned
int
flags
)
DECLSPEC_HIDDEN
;
void
present_parameters_from_wined3d_swapchain_desc
(
D3DPRESENT_PARAMETERS
*
present_parameters
,
const
struct
wined3d_swapchain_desc
*
swapchain_desc
)
DECLSPEC_HIDDEN
;
void
d3dcaps_from_wined3dcaps
(
D3DCAPS9
*
caps
,
const
WINED3DCAPS
*
wined3d_caps
)
DECLSPEC_HIDDEN
;
...
...
dlls/d3d9/device.c
View file @
b5d0cad4
...
...
@@ -160,6 +160,25 @@ enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format)
}
}
unsigned
int
wined3dmapflags_from_d3dmapflags
(
unsigned
int
flags
)
{
static
const
unsigned
int
handled
=
D3DLOCK_READONLY
|
D3DLOCK_NOSYSLOCK
|
D3DLOCK_NOOVERWRITE
|
D3DLOCK_DISCARD
|
D3DLOCK_DONOTWAIT
|
D3DLOCK_NO_DIRTY_UPDATE
;
unsigned
int
wined3d_flags
;
wined3d_flags
=
flags
&
handled
;
flags
&=
~
handled
;
if
(
flags
)
FIXME
(
"Unhandled flags %#x.
\n
"
,
flags
);
return
wined3d_flags
;
}
static
UINT
vertex_count_from_primitive_count
(
D3DPRIMITIVETYPE
primitive_type
,
UINT
primitive_count
)
{
switch
(
primitive_type
)
...
...
dlls/d3d9/surface.c
View file @
b5d0cad4
...
...
@@ -249,7 +249,7 @@ static HRESULT WINAPI d3d9_surface_LockRect(IDirect3DSurface9 *iface,
wined3d_mutex_lock
();
hr
=
wined3d_resource_map
(
wined3d_texture_get_resource
(
surface
->
wined3d_texture
),
surface
->
sub_resource_idx
,
&
map_desc
,
rect
?
&
box
:
NULL
,
flags
);
&
map_desc
,
rect
?
&
box
:
NULL
,
wined3dmapflags_from_d3dmapflags
(
flags
)
);
wined3d_mutex_unlock
();
if
(
SUCCEEDED
(
hr
))
...
...
dlls/d3d9/volume.c
View file @
b5d0cad4
...
...
@@ -147,7 +147,8 @@ static HRESULT WINAPI d3d9_volume_LockBox(IDirect3DVolume9 *iface,
wined3d_mutex_lock
();
if
(
FAILED
(
hr
=
wined3d_resource_map
(
wined3d_texture_get_resource
(
volume
->
wined3d_texture
),
volume
->
sub_resource_idx
,
&
map_desc
,
(
const
struct
wined3d_box
*
)
box
,
flags
)))
volume
->
sub_resource_idx
,
&
map_desc
,
(
const
struct
wined3d_box
*
)
box
,
wined3dmapflags_from_d3dmapflags
(
flags
))))
map_desc
.
data
=
NULL
;
wined3d_mutex_unlock
();
...
...
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