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
46517461
Commit
46517461
authored
Apr 19, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Set resource bindings to NULL before releasing them on stateblock destruction.
To prevent ERRs from device_resource_released().
parent
516ade9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
stateblock.c
dlls/wined3d/stateblock.c
+17
-5
No files found.
dlls/wined3d/stateblock.c
View file @
46517461
...
...
@@ -474,6 +474,7 @@ ULONG CDECL wined3d_stateblock_decref(struct wined3d_stateblock *stateblock)
if
(
!
refcount
)
{
struct
wined3d_buffer
*
buffer
;
int
counter
;
if
(
stateblock
->
state
.
vertex_declaration
)
...
...
@@ -481,23 +482,34 @@ ULONG CDECL wined3d_stateblock_decref(struct wined3d_stateblock *stateblock)
for
(
counter
=
0
;
counter
<
MAX_COMBINED_SAMPLERS
;
counter
++
)
{
if
(
stateblock
->
state
.
textures
[
counter
])
wined3d_texture_decref
(
stateblock
->
state
.
textures
[
counter
]);
struct
wined3d_texture
*
texture
=
stateblock
->
state
.
textures
[
counter
];
if
(
texture
)
{
stateblock
->
state
.
textures
[
counter
]
=
NULL
;
wined3d_texture_decref
(
texture
);
}
}
for
(
counter
=
0
;
counter
<
MAX_STREAMS
;
++
counter
)
{
struct
wined3d_buffer
*
buffer
=
stateblock
->
state
.
streams
[
counter
].
buffer
;
buffer
=
stateblock
->
state
.
streams
[
counter
].
buffer
;
if
(
buffer
)
{
stateblock
->
state
.
streams
[
counter
].
buffer
=
NULL
;
if
(
wined3d_buffer_decref
(
buffer
))
{
WARN
(
"Buffer %p still referenced by stateblock, stream %u.
\n
"
,
buffer
,
counter
);
}
}
}
if
(
stateblock
->
state
.
index_buffer
)
wined3d_buffer_decref
(
stateblock
->
state
.
index_buffer
);
buffer
=
stateblock
->
state
.
index_buffer
;
if
(
buffer
)
{
stateblock
->
state
.
index_buffer
=
NULL
;
wined3d_buffer_decref
(
buffer
);
}
if
(
stateblock
->
state
.
vertex_shader
)
wined3d_shader_decref
(
stateblock
->
state
.
vertex_shader
);
if
(
stateblock
->
state
.
pixel_shader
)
...
...
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