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
8378a786
Commit
8378a786
authored
Oct 14, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
Oct 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use wined3d_array_reserve() to pre-allocate the buffer dirty ranges array.
parent
352d0493
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
buffer.c
dlls/wined3d/buffer.c
+2
-2
No files found.
dlls/wined3d/buffer.c
View file @
8378a786
...
...
@@ -1399,7 +1399,8 @@ static HRESULT wined3d_buffer_init(struct wined3d_buffer *buffer, struct wined3d
return
E_OUTOFMEMORY
;
}
if
(
!
(
buffer
->
dirty_ranges
=
heap_alloc
(
sizeof
(
*
buffer
->
dirty_ranges
))))
if
(
!
wined3d_array_reserve
((
void
**
)
&
buffer
->
dirty_ranges
,
&
buffer
->
dirty_ranges_capacity
,
1
,
sizeof
(
*
buffer
->
dirty_ranges
)))
{
ERR
(
"Out of memory.
\n
"
);
buffer_resource_unload
(
resource
);
...
...
@@ -1407,7 +1408,6 @@ static HRESULT wined3d_buffer_init(struct wined3d_buffer *buffer, struct wined3d
wined3d_resource_wait_idle
(
resource
);
return
E_OUTOFMEMORY
;
}
buffer
->
dirty_ranges_capacity
=
1
;
if
(
buffer
->
locations
&
WINED3D_LOCATION_DISCARDED
)
buffer
->
resource
.
client
.
addr
.
buffer_object
=
CLIENT_BO_DISCARDED
;
...
...
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