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
eb24c957
Commit
eb24c957
authored
Aug 21, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Keep a reference to the resource in rendertarget views.
parent
3a160432
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
0 deletions
+64
-0
buffer.c
dlls/wined3d/buffer.c
+12
-0
surface.c
dlls/wined3d/surface.c
+12
-0
texture.c
dlls/wined3d/texture.c
+12
-0
view.c
dlls/wined3d/view.c
+4
-0
volume.c
dlls/wined3d/volume.c
+12
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+12
-0
No files found.
dlls/wined3d/buffer.c
View file @
eb24c957
...
...
@@ -1113,8 +1113,20 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer)
}
}
static
ULONG
buffer_resource_incref
(
struct
wined3d_resource
*
resource
)
{
return
wined3d_buffer_incref
(
buffer_from_resource
(
resource
));
}
static
ULONG
buffer_resource_decref
(
struct
wined3d_resource
*
resource
)
{
return
wined3d_buffer_decref
(
buffer_from_resource
(
resource
));
}
static
const
struct
wined3d_resource_ops
buffer_resource_ops
=
{
buffer_resource_incref
,
buffer_resource_decref
,
buffer_unload
,
};
...
...
dlls/wined3d/surface.c
View file @
eb24c957
...
...
@@ -1158,6 +1158,16 @@ static void surface_remove_pbo(struct wined3d_surface *surface, const struct win
surface_invalidate_location
(
surface
,
WINED3D_LOCATION_BUFFER
);
}
static
ULONG
surface_resource_incref
(
struct
wined3d_resource
*
resource
)
{
return
wined3d_surface_incref
(
surface_from_resource
(
resource
));
}
static
ULONG
surface_resource_decref
(
struct
wined3d_resource
*
resource
)
{
return
wined3d_surface_decref
(
surface_from_resource
(
resource
));
}
static
void
surface_unload
(
struct
wined3d_resource
*
resource
)
{
struct
wined3d_surface
*
surface
=
surface_from_resource
(
resource
);
...
...
@@ -1236,6 +1246,8 @@ static void surface_unload(struct wined3d_resource *resource)
static
const
struct
wined3d_resource_ops
surface_resource_ops
=
{
surface_resource_incref
,
surface_resource_decref
,
surface_unload
,
};
...
...
dlls/wined3d/texture.c
View file @
eb24c957
...
...
@@ -771,6 +771,16 @@ static const struct wined3d_texture_ops texture2d_ops =
texture2d_sub_resource_cleanup
,
};
static
ULONG
texture_resource_incref
(
struct
wined3d_resource
*
resource
)
{
return
wined3d_texture_incref
(
wined3d_texture_from_resource
(
resource
));
}
static
ULONG
texture_resource_decref
(
struct
wined3d_resource
*
resource
)
{
return
wined3d_texture_decref
(
wined3d_texture_from_resource
(
resource
));
}
static
void
wined3d_texture_unload
(
struct
wined3d_resource
*
resource
)
{
struct
wined3d_texture
*
texture
=
wined3d_texture_from_resource
(
resource
);
...
...
@@ -791,6 +801,8 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
static
const
struct
wined3d_resource_ops
texture_resource_ops
=
{
texture_resource_incref
,
texture_resource_decref
,
wined3d_texture_unload
,
};
...
...
dlls/wined3d/view.c
View file @
eb24c957
...
...
@@ -40,7 +40,10 @@ ULONG CDECL wined3d_rendertarget_view_decref(struct wined3d_rendertarget_view *v
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
view
,
refcount
);
if
(
!
refcount
)
{
wined3d_resource_decref
(
view
->
resource
);
HeapFree
(
GetProcessHeap
(),
0
,
view
);
}
return
refcount
;
}
...
...
@@ -64,6 +67,7 @@ static void wined3d_rendertarget_view_init(struct wined3d_rendertarget_view *vie
{
view
->
refcount
=
1
;
view
->
resource
=
resource
;
wined3d_resource_incref
(
resource
);
view
->
parent
=
parent
;
}
...
...
dlls/wined3d/volume.c
View file @
eb24c957
...
...
@@ -772,8 +772,20 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
return
WINED3D_OK
;
}
static
ULONG
volume_resource_incref
(
struct
wined3d_resource
*
resource
)
{
return
wined3d_volume_incref
(
volume_from_resource
(
resource
));
}
static
ULONG
volume_resource_decref
(
struct
wined3d_resource
*
resource
)
{
return
wined3d_volume_decref
(
volume_from_resource
(
resource
));
}
static
const
struct
wined3d_resource_ops
volume_resource_ops
=
{
volume_resource_incref
,
volume_resource_decref
,
volume_unload
,
};
...
...
dlls/wined3d/wined3d_private.h
View file @
eb24c957
...
...
@@ -2020,6 +2020,8 @@ static inline void context_invalidate_active_texture(struct wined3d_context *con
struct
wined3d_resource_ops
{
ULONG
(
*
resource_incref
)(
struct
wined3d_resource
*
resource
);
ULONG
(
*
resource_decref
)(
struct
wined3d_resource
*
resource
);
void
(
*
resource_unload
)(
struct
wined3d_resource
*
resource
);
};
...
...
@@ -2051,6 +2053,16 @@ struct wined3d_resource
const
struct
wined3d_resource_ops
*
resource_ops
;
};
static
inline
ULONG
wined3d_resource_incref
(
struct
wined3d_resource
*
resource
)
{
return
resource
->
resource_ops
->
resource_incref
(
resource
);
}
static
inline
ULONG
wined3d_resource_decref
(
struct
wined3d_resource
*
resource
)
{
return
resource
->
resource_ops
->
resource_decref
(
resource
);
}
void
resource_cleanup
(
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
HRESULT
resource_init
(
struct
wined3d_resource
*
resource
,
struct
wined3d_device
*
device
,
enum
wined3d_resource_type
type
,
const
struct
wined3d_format
*
format
,
...
...
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