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
ace5f8e6
Commit
ace5f8e6
authored
Jan 18, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass an IWineD3DVolumeImpl pointer to volume_add_dirty_box().
parent
ad6bc944
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
23 deletions
+21
-23
volume.c
dlls/wined3d/volume.c
+16
-18
volumetexture.c
dlls/wined3d/volumetexture.c
+4
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/volume.c
View file @
ace5f8e6
...
@@ -63,28 +63,26 @@ static void volume_bind_and_dirtify(IWineD3DVolume *iface) {
...
@@ -63,28 +63,26 @@ static void volume_bind_and_dirtify(IWineD3DVolume *iface) {
container
->
baseTexture
.
texture_ops
->
texture_bind
(
container
,
FALSE
);
container
->
baseTexture
.
texture_ops
->
texture_bind
(
container
,
FALSE
);
}
}
void
volume_add_dirty_box
(
IWineD3DVolume
*
ifac
e
,
const
WINED3DBOX
*
dirty_box
)
void
volume_add_dirty_box
(
struct
IWineD3DVolumeImpl
*
volum
e
,
const
WINED3DBOX
*
dirty_box
)
{
{
IWineD3DVolumeImpl
*
This
=
(
IWineD3DVolumeImpl
*
)
iface
;
volume
->
dirty
=
TRUE
;
This
->
dirty
=
TRUE
;
if
(
dirty_box
)
if
(
dirty_box
)
{
{
This
->
lockedBox
.
Left
=
min
(
This
->
lockedBox
.
Left
,
dirty_box
->
Left
);
volume
->
lockedBox
.
Left
=
min
(
volume
->
lockedBox
.
Left
,
dirty_box
->
Left
);
This
->
lockedBox
.
Top
=
min
(
This
->
lockedBox
.
Top
,
dirty_box
->
Top
);
volume
->
lockedBox
.
Top
=
min
(
volume
->
lockedBox
.
Top
,
dirty_box
->
Top
);
This
->
lockedBox
.
Front
=
min
(
This
->
lockedBox
.
Front
,
dirty_box
->
Front
);
volume
->
lockedBox
.
Front
=
min
(
volume
->
lockedBox
.
Front
,
dirty_box
->
Front
);
This
->
lockedBox
.
Right
=
max
(
This
->
lockedBox
.
Right
,
dirty_box
->
Right
);
volume
->
lockedBox
.
Right
=
max
(
volume
->
lockedBox
.
Right
,
dirty_box
->
Right
);
This
->
lockedBox
.
Bottom
=
max
(
This
->
lockedBox
.
Bottom
,
dirty_box
->
Bottom
);
volume
->
lockedBox
.
Bottom
=
max
(
volume
->
lockedBox
.
Bottom
,
dirty_box
->
Bottom
);
This
->
lockedBox
.
Back
=
max
(
This
->
lockedBox
.
Back
,
dirty_box
->
Back
);
volume
->
lockedBox
.
Back
=
max
(
volume
->
lockedBox
.
Back
,
dirty_box
->
Back
);
}
}
else
else
{
{
This
->
lockedBox
.
Left
=
0
;
volume
->
lockedBox
.
Left
=
0
;
This
->
lockedBox
.
Top
=
0
;
volume
->
lockedBox
.
Top
=
0
;
This
->
lockedBox
.
Front
=
0
;
volume
->
lockedBox
.
Front
=
0
;
This
->
lockedBox
.
Right
=
This
->
currentDesc
.
Width
;
volume
->
lockedBox
.
Right
=
volume
->
currentDesc
.
Width
;
This
->
lockedBox
.
Bottom
=
This
->
currentDesc
.
Height
;
volume
->
lockedBox
.
Bottom
=
volume
->
currentDesc
.
Height
;
This
->
lockedBox
.
Back
=
This
->
currentDesc
.
Depth
;
volume
->
lockedBox
.
Back
=
volume
->
currentDesc
.
Depth
;
}
}
}
}
...
@@ -255,7 +253,7 @@ static HRESULT WINAPI IWineD3DVolumeImpl_Map(IWineD3DVolume *iface,
...
@@ -255,7 +253,7 @@ static HRESULT WINAPI IWineD3DVolumeImpl_Map(IWineD3DVolume *iface,
if
(
!
(
flags
&
(
WINED3DLOCK_NO_DIRTY_UPDATE
|
WINED3DLOCK_READONLY
)))
if
(
!
(
flags
&
(
WINED3DLOCK_NO_DIRTY_UPDATE
|
WINED3DLOCK_READONLY
)))
{
{
volume_add_dirty_box
(
iface
,
&
This
->
lockedBox
);
volume_add_dirty_box
(
This
,
&
This
->
lockedBox
);
This
->
container
->
baseTexture
.
texture_rgb
.
dirty
=
TRUE
;
This
->
container
->
baseTexture
.
texture_rgb
.
dirty
=
TRUE
;
This
->
container
->
baseTexture
.
texture_srgb
.
dirty
=
TRUE
;
This
->
container
->
baseTexture
.
texture_srgb
.
dirty
=
TRUE
;
}
}
...
@@ -368,7 +366,7 @@ HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT
...
@@ -368,7 +366,7 @@ HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT
memset
(
&
volume
->
lockedBox
,
0
,
sizeof
(
volume
->
lockedBox
));
memset
(
&
volume
->
lockedBox
,
0
,
sizeof
(
volume
->
lockedBox
));
volume
->
dirty
=
TRUE
;
volume
->
dirty
=
TRUE
;
volume_add_dirty_box
(
(
IWineD3DVolume
*
)
volume
,
NULL
);
volume_add_dirty_box
(
volume
,
NULL
);
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
dlls/wined3d/volumetexture.c
View file @
ace5f8e6
...
@@ -70,9 +70,9 @@ static void volumetexture_preload(IWineD3DBaseTextureImpl *texture, enum WINED3D
...
@@ -70,9 +70,9 @@ static void volumetexture_preload(IWineD3DBaseTextureImpl *texture, enum WINED3D
{
{
for
(
i
=
0
;
i
<
texture
->
baseTexture
.
level_count
;
++
i
)
for
(
i
=
0
;
i
<
texture
->
baseTexture
.
level_count
;
++
i
)
{
{
IWineD3DVolume
*
volume
=
(
IWineD3DVolume
*
)
texture
->
baseTexture
.
sub_resources
[
i
];
IWineD3DVolume
Impl
*
volume
=
(
IWineD3DVolumeImpl
*
)
texture
->
baseTexture
.
sub_resources
[
i
];
volume_add_dirty_box
(
volume
,
NULL
);
volume_add_dirty_box
(
volume
,
NULL
);
IWineD3DVolume_LoadTexture
(
volume
,
i
,
srgb_mode
);
IWineD3DVolume_LoadTexture
(
(
IWineD3DVolume
*
)
volume
,
i
,
srgb_mode
);
}
}
}
}
else
else
...
@@ -336,11 +336,11 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_Unmap(IWineD3DVolumeTexture *ifa
...
@@ -336,11 +336,11 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_Unmap(IWineD3DVolumeTexture *ifa
static
HRESULT
WINAPI
IWineD3DVolumeTextureImpl_AddDirtyBox
(
IWineD3DVolumeTexture
*
iface
,
const
WINED3DBOX
*
dirty_box
)
static
HRESULT
WINAPI
IWineD3DVolumeTextureImpl_AddDirtyBox
(
IWineD3DVolumeTexture
*
iface
,
const
WINED3DBOX
*
dirty_box
)
{
{
IWineD3DBaseTextureImpl
*
texture
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
IWineD3DBaseTextureImpl
*
texture
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
IWineD3DVolume
*
volume
;
IWineD3DVolume
Impl
*
volume
;
TRACE
(
"iface %p, dirty_box %p.
\n
"
,
iface
,
dirty_box
);
TRACE
(
"iface %p, dirty_box %p.
\n
"
,
iface
,
dirty_box
);
if
(
!
(
volume
=
(
IWineD3DVolume
*
)
basetexture_get_sub_resource
(
texture
,
0
)))
if
(
!
(
volume
=
(
IWineD3DVolume
Impl
*
)
basetexture_get_sub_resource
(
texture
,
0
)))
{
{
WARN
(
"Failed to get sub-resource.
\n
"
);
WARN
(
"Failed to get sub-resource.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
...
...
dlls/wined3d/wined3d_private.h
View file @
ace5f8e6
...
@@ -2001,7 +2001,7 @@ typedef struct IWineD3DVolumeImpl
...
@@ -2001,7 +2001,7 @@ typedef struct IWineD3DVolumeImpl
BOOL
dirty
;
BOOL
dirty
;
}
IWineD3DVolumeImpl
;
}
IWineD3DVolumeImpl
;
void
volume_add_dirty_box
(
IWineD3DVolume
*
ifac
e
,
const
WINED3DBOX
*
dirty_box
)
DECLSPEC_HIDDEN
;
void
volume_add_dirty_box
(
struct
IWineD3DVolumeImpl
*
volum
e
,
const
WINED3DBOX
*
dirty_box
)
DECLSPEC_HIDDEN
;
HRESULT
volume_init
(
IWineD3DVolumeImpl
*
volume
,
IWineD3DDeviceImpl
*
device
,
UINT
width
,
HRESULT
volume_init
(
IWineD3DVolumeImpl
*
volume
,
IWineD3DDeviceImpl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
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