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
d30d9d5e
Commit
d30d9d5e
authored
Mar 17, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Merge the IWineD3DBaseTexture::AddDirtyRegion() implementations.
parent
afa93a5b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
45 deletions
+47
-45
basetexture.c
dlls/wined3d/basetexture.c
+19
-0
cubetexture.c
dlls/wined3d/cubetexture.c
+8
-15
texture.c
dlls/wined3d/texture.c
+8
-15
volumetexture.c
dlls/wined3d/volumetexture.c
+8
-15
wined3d_private.h
dlls/wined3d/wined3d_private.h
+4
-0
No files found.
dlls/wined3d/basetexture.c
View file @
d30d9d5e
...
...
@@ -338,6 +338,25 @@ HRESULT basetexture_bind(IWineD3DBaseTextureImpl *texture,
return
hr
;
}
HRESULT
basetexture_add_dirty_region
(
IWineD3DBaseTextureImpl
*
texture
,
UINT
layer
,
const
WINED3DBOX
*
dirty_region
)
{
struct
wined3d_resource
*
sub_resource
;
TRACE
(
"texture %p, layer %u, dirty_region %p.
\n
"
,
texture
,
layer
,
dirty_region
);
if
(
!
(
sub_resource
=
basetexture_get_sub_resource
(
texture
,
layer
*
texture
->
baseTexture
.
level_count
)))
{
WARN
(
"Failed to get sub-resource.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
basetexture_set_dirty
(
texture
,
TRUE
);
texture
->
baseTexture
.
texture_ops
->
texture_sub_resource_add_dirty_region
(
sub_resource
,
dirty_region
);
return
WINED3D_OK
;
}
/* GL locking is done by the caller */
static
void
apply_wrap
(
const
struct
wined3d_gl_info
*
gl_info
,
GLenum
target
,
WINED3DTEXTUREADDRESS
d3d_wrap
,
GLenum
param
,
BOOL
cond_np2
)
...
...
dlls/wined3d/cubetexture.c
View file @
d30d9d5e
...
...
@@ -135,6 +135,12 @@ static void cubetexture_preload(IWineD3DBaseTextureImpl *texture, enum WINED3DSR
if
(
context
)
context_release
(
context
);
}
static
void
cubetexture_sub_resource_add_dirty_region
(
struct
wined3d_resource
*
sub_resource
,
const
WINED3DBOX
*
dirty_region
)
{
surface_add_dirty_rect
(
surface_from_resource
(
sub_resource
),
dirty_region
);
}
/* Do not call while under the GL lock. */
static
void
cubetexture_unload
(
struct
wined3d_resource
*
resource
)
{
...
...
@@ -161,6 +167,7 @@ static const struct wined3d_texture_ops cubetexture_ops =
{
cubetexture_bind
,
cubetexture_preload
,
cubetexture_sub_resource_add_dirty_region
,
};
static
const
struct
wined3d_resource_ops
cubetexture_resource_ops
=
...
...
@@ -324,21 +331,7 @@ static struct wined3d_resource * WINAPI IWineD3DCubeTextureImpl_GetSubResource(I
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_AddDirtyRegion
(
IWineD3DBaseTexture
*
iface
,
UINT
layer
,
const
WINED3DBOX
*
dirty_region
)
{
IWineD3DBaseTextureImpl
*
texture
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
struct
wined3d_resource
*
sub_resource
;
TRACE
(
"iface %p, layer %u, dirty_region %p.
\n
"
,
iface
,
layer
,
dirty_region
);
if
(
!
(
sub_resource
=
basetexture_get_sub_resource
(
texture
,
layer
*
texture
->
baseTexture
.
level_count
)))
{
WARN
(
"Failed to get sub-resource.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
basetexture_set_dirty
(
texture
,
TRUE
);
surface_add_dirty_rect
(
surface_from_resource
(
sub_resource
),
dirty_region
);
return
WINED3D_OK
;
return
basetexture_add_dirty_region
((
IWineD3DBaseTextureImpl
*
)
iface
,
layer
,
dirty_region
);
}
static
const
IWineD3DBaseTextureVtbl
IWineD3DCubeTexture_Vtbl
=
...
...
dlls/wined3d/texture.c
View file @
d30d9d5e
...
...
@@ -159,6 +159,12 @@ static void texture_preload(IWineD3DBaseTextureImpl *texture, enum WINED3DSRGB s
gl_tex
->
dirty
=
FALSE
;
}
static
void
texture_sub_resource_add_dirty_region
(
struct
wined3d_resource
*
sub_resource
,
const
WINED3DBOX
*
dirty_region
)
{
surface_add_dirty_rect
(
surface_from_resource
(
sub_resource
),
dirty_region
);
}
/* Do not call while under the GL lock. */
static
void
texture_unload
(
struct
wined3d_resource
*
resource
)
{
...
...
@@ -184,6 +190,7 @@ static const struct wined3d_texture_ops texture_ops =
{
texture_bind
,
texture_preload
,
texture_sub_resource_add_dirty_region
,
};
static
const
struct
wined3d_resource_ops
texture_resource_ops
=
...
...
@@ -348,21 +355,7 @@ static struct wined3d_resource * WINAPI IWineD3DTextureImpl_GetSubResource(IWine
static
HRESULT
WINAPI
IWineD3DTextureImpl_AddDirtyRegion
(
IWineD3DBaseTexture
*
iface
,
UINT
layer
,
const
WINED3DBOX
*
dirty_region
)
{
IWineD3DBaseTextureImpl
*
texture
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
struct
wined3d_resource
*
sub_resource
;
TRACE
(
"iface %p, layer %u, dirty_region %p.
\n
"
,
iface
,
layer
,
dirty_region
);
if
(
!
(
sub_resource
=
basetexture_get_sub_resource
(
texture
,
layer
*
texture
->
baseTexture
.
level_count
)))
{
WARN
(
"Failed to get sub-resource.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
basetexture_set_dirty
(
texture
,
TRUE
);
surface_add_dirty_rect
(
surface_from_resource
(
sub_resource
),
dirty_region
);
return
WINED3D_OK
;
return
basetexture_add_dirty_region
((
IWineD3DBaseTextureImpl
*
)
iface
,
layer
,
dirty_region
);
}
static
const
IWineD3DBaseTextureVtbl
IWineD3DTexture_Vtbl
=
...
...
dlls/wined3d/volumetexture.c
View file @
d30d9d5e
...
...
@@ -83,6 +83,12 @@ static void volumetexture_preload(IWineD3DBaseTextureImpl *texture, enum WINED3D
texture
->
baseTexture
.
texture_rgb
.
dirty
=
FALSE
;
}
static
void
volumetexture_sub_resource_add_dirty_region
(
struct
wined3d_resource
*
sub_resource
,
const
WINED3DBOX
*
dirty_region
)
{
volume_add_dirty_box
(
volume_from_resource
(
sub_resource
),
dirty_region
);
}
/* Do not call while under the GL lock. */
static
void
volumetexture_unload
(
struct
wined3d_resource
*
resource
)
{
...
...
@@ -104,6 +110,7 @@ static const struct wined3d_texture_ops volumetexture_ops =
{
volumetexture_bind
,
volumetexture_preload
,
volumetexture_sub_resource_add_dirty_region
,
};
static
const
struct
wined3d_resource_ops
volumetexture_resource_ops
=
...
...
@@ -265,21 +272,7 @@ static struct wined3d_resource * WINAPI IWineD3DVolumeTextureImpl_GetSubResource
static
HRESULT
WINAPI
IWineD3DVolumeTextureImpl_AddDirtyRegion
(
IWineD3DBaseTexture
*
iface
,
UINT
layer
,
const
WINED3DBOX
*
dirty_region
)
{
IWineD3DBaseTextureImpl
*
texture
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
struct
wined3d_resource
*
sub_resource
;
TRACE
(
"iface %p, layer %u, dirty_region %p.
\n
"
,
iface
,
layer
,
dirty_region
);
if
(
!
(
sub_resource
=
basetexture_get_sub_resource
(
texture
,
layer
*
texture
->
baseTexture
.
level_count
)))
{
WARN
(
"Failed to get sub-resource.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
basetexture_set_dirty
(
texture
,
TRUE
);
volume_add_dirty_box
(
volume_from_resource
(
sub_resource
),
dirty_region
);
return
WINED3D_OK
;
return
basetexture_add_dirty_region
((
IWineD3DBaseTextureImpl
*
)
iface
,
layer
,
dirty_region
);
}
static
const
IWineD3DBaseTextureVtbl
IWineD3DVolumeTexture_Vtbl
=
...
...
dlls/wined3d/wined3d_private.h
View file @
d30d9d5e
...
...
@@ -1888,6 +1888,8 @@ struct wined3d_texture_ops
HRESULT
(
*
texture_bind
)(
struct
IWineD3DBaseTextureImpl
*
texture
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
srgb
);
void
(
*
texture_preload
)(
struct
IWineD3DBaseTextureImpl
*
texture
,
enum
WINED3DSRGB
srgb
);
void
(
*
texture_sub_resource_add_dirty_region
)(
struct
wined3d_resource
*
sub_resource
,
const
WINED3DBOX
*
dirty_region
);
};
typedef
struct
IWineD3DBaseTextureClass
...
...
@@ -1932,6 +1934,8 @@ static inline struct gl_texture *basetexture_get_gl_texture(IWineD3DBaseTextureI
:
&
texture
->
baseTexture
.
texture_rgb
;
}
HRESULT
basetexture_add_dirty_region
(
IWineD3DBaseTextureImpl
*
texture
,
UINT
layer
,
const
WINED3DBOX
*
dirty_region
)
DECLSPEC_HIDDEN
;
void
basetexture_apply_state_changes
(
IWineD3DBaseTextureImpl
*
texture
,
const
DWORD
samplerStates
[
WINED3D_HIGHEST_SAMPLER_STATE
+
1
],
const
struct
wined3d_gl_info
*
gl_info
)
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