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
29788075
Commit
29788075
authored
Jun 22, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Send sampler object desctruction through the command stream.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a4a8693e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
sampler.c
dlls/wined3d/sampler.c
+15
-10
No files found.
dlls/wined3d/sampler.c
View file @
29788075
...
...
@@ -33,23 +33,28 @@ ULONG CDECL wined3d_sampler_incref(struct wined3d_sampler *sampler)
return
refcount
;
}
ULONG
CDECL
wined3d_sampler_decref
(
struct
wined3d_sampler
*
sampler
)
static
void
wined3d_sample_destroy_object
(
void
*
object
)
{
ULONG
refcount
=
InterlockedDecrement
(
&
sampler
->
refcount
)
;
struct
wined3d_sampler
*
sampler
=
object
;
const
struct
wined3d_gl_info
*
gl_info
;
struct
wined3d_context
*
context
;
context
=
context_acquire
(
sampler
->
device
,
NULL
);
gl_info
=
context
->
gl_info
;
GL_EXTCALL
(
glDeleteSamplers
(
1
,
&
sampler
->
name
));
context_release
(
context
);
HeapFree
(
GetProcessHeap
(),
0
,
sampler
);
}
ULONG
CDECL
wined3d_sampler_decref
(
struct
wined3d_sampler
*
sampler
)
{
ULONG
refcount
=
InterlockedDecrement
(
&
sampler
->
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
sampler
,
refcount
);
if
(
!
refcount
)
{
context
=
context_acquire
(
sampler
->
device
,
NULL
);
gl_info
=
context
->
gl_info
;
GL_EXTCALL
(
glDeleteSamplers
(
1
,
&
sampler
->
name
));
context_release
(
context
);
HeapFree
(
GetProcessHeap
(),
0
,
sampler
);
}
wined3d_cs_emit_destroy_object
(
sampler
->
device
->
cs
,
wined3d_sample_destroy_object
,
sampler
);
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