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
f31ed983
Commit
f31ed983
authored
Mar 22, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Simplify device_resource_released() a little.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e5ab987d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
31 deletions
+25
-31
device.c
dlls/wined3d/device.c
+25
-31
No files found.
dlls/wined3d/device.c
View file @
f31ed983
...
...
@@ -5073,55 +5073,49 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
case
WINED3D_RTYPE_TEXTURE_3D
:
for
(
i
=
0
;
i
<
MAX_COMBINED_SAMPLERS
;
++
i
)
{
struct
wined3d_texture
*
texture
=
texture_from_resource
(
resource
);
if
(
device
->
state
.
textures
[
i
]
==
texture
)
if
(
&
device
->
state
.
textures
[
i
]
->
resource
==
resource
)
{
ERR
(
"Texture
%p is still in use, stage %u.
\n
"
,
textur
e
,
i
);
ERR
(
"Texture
resource %p is still in use, stage %u.
\n
"
,
resourc
e
,
i
);
device
->
state
.
textures
[
i
]
=
NULL
;
}
if
(
device
->
recording
&&
device
->
update_state
->
textures
[
i
]
==
textur
e
)
if
(
device
->
recording
&&
&
device
->
update_state
->
textures
[
i
]
->
resource
==
resourc
e
)
{
ERR
(
"Texture %p is still in use by recording stateblock %p, stage %u.
\n
"
,
textur
e
,
device
->
recording
,
i
);
ERR
(
"Texture
resource
%p is still in use by recording stateblock %p, stage %u.
\n
"
,
resourc
e
,
device
->
recording
,
i
);
device
->
update_state
->
textures
[
i
]
=
NULL
;
}
}
break
;
case
WINED3D_RTYPE_BUFFER
:
for
(
i
=
0
;
i
<
MAX_STREAMS
;
++
i
)
{
struct
wined3d_buffer
*
buffer
=
buffer_from_resource
(
resource
);
for
(
i
=
0
;
i
<
MAX_STREAMS
;
++
i
)
if
(
&
device
->
state
.
streams
[
i
].
buffer
->
resource
==
resource
)
{
if
(
device
->
state
.
streams
[
i
].
buffer
==
buffer
)
{
ERR
(
"Buffer %p is still in use, stream %u.
\n
"
,
buffer
,
i
);
device
->
state
.
streams
[
i
].
buffer
=
NULL
;
}
if
(
device
->
recording
&&
device
->
update_state
->
streams
[
i
].
buffer
==
buffer
)
{
ERR
(
"Buffer %p is still in use by stateblock %p, stream %u.
\n
"
,
buffer
,
device
->
recording
,
i
);
device
->
update_state
->
streams
[
i
].
buffer
=
NULL
;
}
ERR
(
"Buffer resource %p is still in use, stream %u.
\n
"
,
resource
,
i
);
device
->
state
.
streams
[
i
].
buffer
=
NULL
;
}
if
(
device
->
state
.
index_buffer
==
buffer
)
if
(
device
->
recording
&&
&
device
->
update_state
->
streams
[
i
].
buffer
->
resource
==
resource
)
{
ERR
(
"Buffer %p is still in use as index buffer.
\n
"
,
buffer
);
device
->
state
.
index_buffer
=
NULL
;
ERR
(
"Buffer resource %p is still in use by stateblock %p, stream %u.
\n
"
,
resource
,
device
->
recording
,
i
);
device
->
update_state
->
streams
[
i
].
buffer
=
NULL
;
}
}
if
(
device
->
recording
&&
device
->
update_state
->
index_buffer
==
buffer
)
{
ERR
(
"Buffer %p is still in use by stateblock %p as index buffer.
\n
"
,
buffer
,
device
->
recording
);
device
->
update_state
->
index_buffer
=
NULL
;
}
if
(
&
device
->
state
.
index_buffer
->
resource
==
resource
)
{
ERR
(
"Buffer resource %p is still in use as index buffer.
\n
"
,
resource
);
device
->
state
.
index_buffer
=
NULL
;
}
if
(
device
->
recording
&&
&
device
->
update_state
->
index_buffer
->
resource
==
resource
)
{
ERR
(
"Buffer resource %p is still in use by stateblock %p as index buffer.
\n
"
,
resource
,
device
->
recording
);
device
->
update_state
->
index_buffer
=
NULL
;
}
break
;
...
...
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