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
83b40487
Commit
83b40487
authored
Sep 18, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Mapping a mapped volume is an error.
parent
16f99ce6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
volume.c
dlls/wined3d/volume.c
+10
-5
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-4
No files found.
dlls/wined3d/volume.c
View file @
83b40487
...
...
@@ -524,10 +524,15 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
TRACE
(
"volume %p, map_desc %p, box %p, flags %#x.
\n
"
,
volume
,
map_desc
,
box
,
flags
);
map_desc
->
data
=
NULL
;
if
(
!
(
volume
->
resource
.
access_flags
&
WINED3D_RESOURCE_ACCESS_CPU
))
{
WARN
(
"Volume %p is not CPU accessible.
\n
"
,
volume
);
map_desc
->
data
=
NULL
;
return
WINED3DERR_INVALIDCALL
;
}
if
(
volume
->
resource
.
map_count
)
{
WARN
(
"Volume is already mapped.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
flags
=
wined3d_resource_sanitize_map_flags
(
&
volume
->
resource
,
flags
);
...
...
@@ -614,7 +619,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
wined3d_volume_invalidate_location
(
volume
,
~
WINED3D_LOCATION_SYSMEM
);
}
volume
->
flags
|=
WINED3D_VFLAG_LOCKED
;
volume
->
resource
.
map_count
++
;
TRACE
(
"Returning memory %p, row pitch %d, slice pitch %d.
\n
"
,
map_desc
->
data
,
map_desc
->
row_pitch
,
map_desc
->
slice_pitch
);
...
...
@@ -631,9 +636,9 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
{
TRACE
(
"volume %p.
\n
"
,
volume
);
if
(
!
(
volume
->
flags
&
WINED3D_VFLAG_LOCKED
)
)
if
(
!
volume
->
resource
.
map_count
)
{
WARN
(
"Trying to unlock unlocked volume %p.
\n
"
,
volume
);
WARN
(
"Trying to unlock
an
unlocked volume %p.
\n
"
,
volume
);
return
WINED3DERR_INVALIDCALL
;
}
...
...
@@ -651,7 +656,7 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
context_release
(
context
);
}
volume
->
flags
&=
~
WINED3D_VFLAG_LOCKED
;
volume
->
resource
.
map_count
--
;
return
WINED3D_OK
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
83b40487
...
...
@@ -2110,10 +2110,9 @@ void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
const
struct
wined3d_gl_info
*
gl_info
)
DECLSPEC_HIDDEN
;
void
wined3d_texture_set_dirty
(
struct
wined3d_texture
*
texture
)
DECLSPEC_HIDDEN
;
#define WINED3D_VFLAG_LOCKED 0x00000001
#define WINED3D_VFLAG_ALLOCATED 0x00000002
#define WINED3D_VFLAG_SRGB_ALLOCATED 0x00000004
#define WINED3D_VFLAG_PBO 0x00000008
#define WINED3D_VFLAG_ALLOCATED 0x00000001
#define WINED3D_VFLAG_SRGB_ALLOCATED 0x00000002
#define WINED3D_VFLAG_PBO 0x00000004
#define WINED3D_LOCATION_DISCARDED 0x00000001
#define WINED3D_LOCATION_SYSMEM 0x00000002
...
...
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