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
07079d11
Commit
07079d11
authored
Aug 22, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove locked and dirty boxes from volumes.
parent
518ac4c2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
46 deletions
+0
-46
texture.c
dlls/wined3d/texture.c
+0
-2
volume.c
dlls/wined3d/volume.c
+0
-40
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-4
No files found.
dlls/wined3d/texture.c
View file @
07079d11
...
...
@@ -1095,7 +1095,6 @@ static void texture3d_preload(struct wined3d_texture *texture, enum WINED3DSRGB
for
(
i
=
0
;
i
<
texture
->
level_count
;
++
i
)
{
struct
wined3d_volume
*
volume
=
volume_from_resource
(
texture
->
sub_resources
[
i
]);
volume_add_dirty_box
(
volume
,
NULL
);
wined3d_volume_load
(
volume
,
context
,
texture
->
flags
&
WINED3D_TEXTURE_IS_SRGB
);
}
}
...
...
@@ -1113,7 +1112,6 @@ static void texture3d_preload(struct wined3d_texture *texture, enum WINED3DSRGB
static
void
texture3d_sub_resource_add_dirty_region
(
struct
wined3d_resource
*
sub_resource
,
const
struct
wined3d_box
*
dirty_region
)
{
volume_add_dirty_box
(
volume_from_resource
(
sub_resource
),
dirty_region
);
}
static
void
texture3d_sub_resource_cleanup
(
struct
wined3d_resource
*
sub_resource
)
...
...
dlls/wined3d/volume.c
View file @
07079d11
...
...
@@ -48,28 +48,6 @@ static void volume_bind_and_dirtify(const struct wined3d_volume *volume, struct
container
->
texture_ops
->
texture_bind
(
container
,
context
,
FALSE
);
}
void
volume_add_dirty_box
(
struct
wined3d_volume
*
volume
,
const
struct
wined3d_box
*
dirty_box
)
{
if
(
dirty_box
)
{
volume
->
lockedBox
.
left
=
min
(
volume
->
lockedBox
.
left
,
dirty_box
->
left
);
volume
->
lockedBox
.
top
=
min
(
volume
->
lockedBox
.
top
,
dirty_box
->
top
);
volume
->
lockedBox
.
front
=
min
(
volume
->
lockedBox
.
front
,
dirty_box
->
front
);
volume
->
lockedBox
.
right
=
max
(
volume
->
lockedBox
.
right
,
dirty_box
->
right
);
volume
->
lockedBox
.
bottom
=
max
(
volume
->
lockedBox
.
bottom
,
dirty_box
->
bottom
);
volume
->
lockedBox
.
back
=
max
(
volume
->
lockedBox
.
back
,
dirty_box
->
back
);
}
else
{
volume
->
lockedBox
.
left
=
0
;
volume
->
lockedBox
.
top
=
0
;
volume
->
lockedBox
.
front
=
0
;
volume
->
lockedBox
.
right
=
volume
->
resource
.
width
;
volume
->
lockedBox
.
bottom
=
volume
->
resource
.
height
;
volume
->
lockedBox
.
back
=
volume
->
resource
.
depth
;
}
}
void
volume_set_container
(
struct
wined3d_volume
*
volume
,
struct
wined3d_texture
*
container
)
{
TRACE
(
"volume %p, container %p.
\n
"
,
volume
,
container
);
...
...
@@ -248,12 +226,6 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
{
TRACE
(
"No box supplied - all is ok
\n
"
);
map_desc
->
data
=
volume
->
resource
.
allocatedMemory
;
volume
->
lockedBox
.
left
=
0
;
volume
->
lockedBox
.
top
=
0
;
volume
->
lockedBox
.
front
=
0
;
volume
->
lockedBox
.
right
=
volume
->
resource
.
width
;
volume
->
lockedBox
.
bottom
=
volume
->
resource
.
height
;
volume
->
lockedBox
.
back
=
volume
->
resource
.
depth
;
}
else
{
...
...
@@ -263,17 +235,10 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
+
(
map_desc
->
slice_pitch
*
box
->
front
)
/* FIXME: is front < back or vica versa? */
+
(
map_desc
->
row_pitch
*
box
->
top
)
+
(
box
->
left
*
volume
->
resource
.
format
->
byte_count
);
volume
->
lockedBox
.
left
=
box
->
left
;
volume
->
lockedBox
.
top
=
box
->
top
;
volume
->
lockedBox
.
front
=
box
->
front
;
volume
->
lockedBox
.
right
=
box
->
right
;
volume
->
lockedBox
.
bottom
=
box
->
bottom
;
volume
->
lockedBox
.
back
=
box
->
back
;
}
if
(
!
(
flags
&
(
WINED3D_MAP_NO_DIRTY_UPDATE
|
WINED3D_MAP_READONLY
)))
{
volume_add_dirty_box
(
volume
,
&
volume
->
lockedBox
);
wined3d_texture_set_dirty
(
volume
->
container
,
TRUE
);
}
...
...
@@ -301,7 +266,6 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
}
volume
->
flags
&=
~
WINED3D_VFLAG_LOCKED
;
memset
(
&
volume
->
lockedBox
,
0
,
sizeof
(
volume
->
lockedBox
));
return
WINED3D_OK
;
}
...
...
@@ -337,12 +301,8 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_device
return
hr
;
}
memset
(
&
volume
->
lockedBox
,
0
,
sizeof
(
volume
->
lockedBox
));
volume_add_dirty_box
(
volume
,
NULL
);
volume
->
texture_level
=
level
;
return
WINED3D_OK
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
07079d11
...
...
@@ -2058,9 +2058,6 @@ struct wined3d_volume
struct
wined3d_resource
resource
;
struct
wined3d_texture
*
container
;
struct
wined3d_box
lockedBox
;
struct
wined3d_box
dirtyBox
;
DWORD
flags
;
GLint
texture_level
;
};
...
...
@@ -2070,7 +2067,6 @@ static inline struct wined3d_volume *volume_from_resource(struct wined3d_resourc
return
CONTAINING_RECORD
(
resource
,
struct
wined3d_volume
,
resource
);
}
void
volume_add_dirty_box
(
struct
wined3d_volume
*
volume
,
const
struct
wined3d_box
*
dirty_box
)
DECLSPEC_HIDDEN
;
void
wined3d_volume_load
(
struct
wined3d_volume
*
volume
,
struct
wined3d_context
*
context
,
BOOL
srgb_mode
)
DECLSPEC_HIDDEN
;
void
volume_set_container
(
struct
wined3d_volume
*
volume
,
struct
wined3d_texture
*
container
)
DECLSPEC_HIDDEN
;
...
...
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