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
b941665b
Commit
b941665b
authored
Dec 03, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Destroy PBOs in wined3d_texture_gl_destroy_object().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7930553e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
28 deletions
+27
-28
adapter_gl.c
dlls/wined3d/adapter_gl.c
+27
-4
texture.c
dlls/wined3d/texture.c
+0
-24
No files found.
dlls/wined3d/adapter_gl.c
View file @
b941665b
...
@@ -4765,17 +4765,39 @@ static void wined3d_texture_gl_destroy_object(void *object)
...
@@ -4765,17 +4765,39 @@ static void wined3d_texture_gl_destroy_object(void *object)
{
{
struct
wined3d_renderbuffer_entry
*
entry
,
*
entry2
;
struct
wined3d_renderbuffer_entry
*
entry
,
*
entry2
;
struct
wined3d_texture_gl
*
texture_gl
=
object
;
struct
wined3d_texture_gl
*
texture_gl
=
object
;
struct
wined3d_context
*
context
=
NULL
;
const
struct
wined3d_gl_info
*
gl_info
;
const
struct
wined3d_gl_info
*
gl_info
;
struct
wined3d_context
*
context
;
struct
wined3d_device
*
device
;
struct
wined3d_device
*
device
;
unsigned
int
sub_count
,
i
;
GLuint
buffer_object
;
TRACE
(
"texture_gl %p.
\n
"
,
texture_gl
);
TRACE
(
"texture_gl %p.
\n
"
,
texture_gl
);
sub_count
=
texture_gl
->
t
.
level_count
*
texture_gl
->
t
.
layer_count
;
for
(
i
=
0
;
i
<
sub_count
;
++
i
)
{
if
(
!
(
buffer_object
=
texture_gl
->
t
.
sub_resources
[
i
].
buffer_object
))
continue
;
TRACE
(
"Deleting buffer object %u.
\n
"
,
buffer_object
);
if
(
!
context
)
{
context
=
context_acquire
(
texture_gl
->
t
.
resource
.
device
,
NULL
,
0
);
gl_info
=
wined3d_context_gl
(
context
)
->
gl_info
;
}
GL_EXTCALL
(
glDeleteBuffers
(
1
,
&
buffer_object
));
}
if
(
!
list_empty
(
&
texture_gl
->
renderbuffers
))
if
(
!
list_empty
(
&
texture_gl
->
renderbuffers
))
{
{
device
=
texture_gl
->
t
.
resource
.
device
;
device
=
texture_gl
->
t
.
resource
.
device
;
context
=
context_acquire
(
device
,
NULL
,
0
);
if
(
!
context
)
gl_info
=
wined3d_context_gl
(
context
)
->
gl_info
;
{
context
=
context_acquire
(
device
,
NULL
,
0
);
gl_info
=
wined3d_context_gl
(
context
)
->
gl_info
;
}
LIST_FOR_EACH_ENTRY_SAFE
(
entry
,
entry2
,
&
texture_gl
->
renderbuffers
,
struct
wined3d_renderbuffer_entry
,
entry
)
LIST_FOR_EACH_ENTRY_SAFE
(
entry
,
entry2
,
&
texture_gl
->
renderbuffers
,
struct
wined3d_renderbuffer_entry
,
entry
)
{
{
...
@@ -4784,9 +4806,10 @@ static void wined3d_texture_gl_destroy_object(void *object)
...
@@ -4784,9 +4806,10 @@ static void wined3d_texture_gl_destroy_object(void *object)
gl_info
->
fbo_ops
.
glDeleteRenderbuffers
(
1
,
&
entry
->
id
);
gl_info
->
fbo_ops
.
glDeleteRenderbuffers
(
1
,
&
entry
->
id
);
heap_free
(
entry
);
heap_free
(
entry
);
}
}
}
if
(
context
)
context_release
(
context
);
context_release
(
context
);
}
wined3d_texture_gl_unload_texture
(
texture_gl
);
wined3d_texture_gl_unload_texture
(
texture_gl
);
...
...
dlls/wined3d/texture.c
View file @
b941665b
...
@@ -1118,38 +1118,14 @@ ULONG CDECL wined3d_texture_incref(struct wined3d_texture *texture)
...
@@ -1118,38 +1118,14 @@ ULONG CDECL wined3d_texture_incref(struct wined3d_texture *texture)
static
void
wined3d_texture_destroy_object
(
void
*
object
)
static
void
wined3d_texture_destroy_object
(
void
*
object
)
{
{
const
struct
wined3d_gl_info
*
gl_info
=
NULL
;
struct
wined3d_texture
*
texture
=
object
;
struct
wined3d_texture
*
texture
=
object
;
struct
wined3d_context
*
context
=
NULL
;
struct
wined3d_dc_info
*
dc_info
;
struct
wined3d_dc_info
*
dc_info
;
unsigned
int
sub_count
;
unsigned
int
sub_count
;
GLuint
buffer_object
;
unsigned
int
i
;
unsigned
int
i
;
TRACE
(
"texture %p.
\n
"
,
texture
);
TRACE
(
"texture %p.
\n
"
,
texture
);
sub_count
=
texture
->
level_count
*
texture
->
layer_count
;
sub_count
=
texture
->
level_count
*
texture
->
layer_count
;
for
(
i
=
0
;
i
<
sub_count
;
++
i
)
{
if
(
!
(
buffer_object
=
texture
->
sub_resources
[
i
].
buffer_object
))
continue
;
TRACE
(
"Deleting buffer object %u.
\n
"
,
buffer_object
);
/* We may not be able to get a context in
* wined3d_texture_destroy_object() in general, but if a buffer object
* was previously created we can. */
if
(
!
context
)
{
context
=
context_acquire
(
texture
->
resource
.
device
,
NULL
,
0
);
gl_info
=
wined3d_context_gl
(
context
)
->
gl_info
;
}
GL_EXTCALL
(
glDeleteBuffers
(
1
,
&
buffer_object
));
}
if
(
context
)
context_release
(
context
);
if
((
dc_info
=
texture
->
dc_info
))
if
((
dc_info
=
texture
->
dc_info
))
{
{
...
...
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