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
b21f3c93
Commit
b21f3c93
authored
Jul 08, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Send buffer destruction through the command stream.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
11842376
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
buffer.c
dlls/wined3d/buffer.c
+20
-13
No files found.
dlls/wined3d/buffer.c
View file @
b21f3c93
...
...
@@ -556,28 +556,35 @@ static void wined3d_buffer_drop_bo(struct wined3d_buffer *buffer)
device_invalidate_state
(
device
,
STATE_STREAMSRC
);
}
static
void
wined3d_buffer_destroy_object
(
void
*
object
)
{
struct
wined3d_buffer
*
buffer
=
object
;
struct
wined3d_context
*
context
;
if
(
buffer
->
buffer_object
)
{
context
=
context_acquire
(
buffer
->
resource
.
device
,
NULL
);
delete_gl_buffer
(
buffer
,
context
->
gl_info
);
context_release
(
context
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
->
conversion_map
);
}
HeapFree
(
GetProcessHeap
(),
0
,
buffer
->
maps
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
ULONG
CDECL
wined3d_buffer_decref
(
struct
wined3d_buffer
*
buffer
)
{
ULONG
refcount
=
InterlockedDecrement
(
&
buffer
->
resource
.
ref
);
struct
wined3d_context
*
context
;
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
buffer
,
refcount
);
if
(
!
refcount
)
{
if
(
buffer
->
buffer_object
)
{
context
=
context_acquire
(
buffer
->
resource
.
device
,
NULL
);
delete_gl_buffer
(
buffer
,
context
->
gl_info
);
context_release
(
context
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
->
conversion_map
);
}
resource_cleanup
(
&
buffer
->
resource
);
buffer
->
resource
.
parent_ops
->
wined3d_object_destroyed
(
buffer
->
resource
.
parent
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
->
maps
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
resource_cleanup
(
&
buffer
->
resource
);
wined3d_cs_emit_destroy_object
(
buffer
->
resource
.
device
->
cs
,
wined3d_buffer_destroy_object
,
buffer
);
}
return
refcount
;
...
...
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