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
cbaa17d3
Commit
cbaa17d3
authored
Aug 13, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Assume the buffer has a buffer object in buffer_add_dirty_area().
parent
4eb39ec5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
15 deletions
+12
-15
buffer.c
dlls/wined3d/buffer.c
+12
-15
No files found.
dlls/wined3d/buffer.c
View file @
cbaa17d3
...
...
@@ -34,11 +34,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
#define VB_MAXFULLCONVERSIONS 5
/* Number of full conversions before we stop converting */
#define VB_RESETFULLCONVS 20
/* Reset full conversion counts after that number of draws */
static
void
buffer_
add_dirty_area
(
struct
wined3d_buffer
*
buffer
,
UINT
offset
,
UINT
size
)
static
void
buffer_
invalidate_bo_range
(
struct
wined3d_buffer
*
buffer
,
UINT
offset
,
UINT
size
)
{
if
(
!
buffer
->
buffer_object
)
return
;
if
(
!
offset
&&
!
size
)
goto
invalidate_all
;
...
...
@@ -188,7 +185,7 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, const struc
if
(
This
->
flags
&
WINED3D_BUFFER_DOUBLEBUFFER
)
{
buffer_
add_dirty_area
(
This
,
0
,
0
);
buffer_
invalidate_bo_range
(
This
,
0
,
0
);
}
else
{
...
...
@@ -808,7 +805,7 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
/* The declaration changed, reload the whole buffer. */
WARN
(
"Reloading buffer because of a vertex declaration change.
\n
"
);
buffer_
add_dirty_area
(
buffer
,
0
,
0
);
buffer_
invalidate_bo_range
(
buffer
,
0
,
0
);
/* Avoid unfenced updates, we might overwrite more areas of the buffer than the application
* cleared for unsynchronized updates
...
...
@@ -990,19 +987,19 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
TRACE
(
"buffer %p, offset %u, size %u, data %p, flags %#x
\n
"
,
buffer
,
offset
,
size
,
data
,
flags
);
flags
=
buffer_sanitize_flags
(
buffer
,
flags
);
/* DISCARD invalidates the entire buffer, regardless of the specified
* offset and size. Some applications also depend on the entire buffer
* being uploaded in that case. Two such applications are Port Royale
* and Darkstar One. */
if
(
flags
&
WINED3D_MAP_DISCARD
)
buffer_add_dirty_area
(
buffer
,
0
,
0
);
else
if
(
!
(
flags
&
WINED3D_MAP_READONLY
))
buffer_add_dirty_area
(
buffer
,
offset
,
size
);
count
=
++
buffer
->
resource
.
map_count
;
if
(
buffer
->
buffer_object
)
{
/* DISCARD invalidates the entire buffer, regardless of the specified
* offset and size. Some applications also depend on the entire buffer
* being uploaded in that case. Two such applications are Port Royale
* and Darkstar One. */
if
(
flags
&
WINED3D_MAP_DISCARD
)
buffer_invalidate_bo_range
(
buffer
,
0
,
0
);
else
if
(
!
(
flags
&
WINED3D_MAP_READONLY
))
buffer_invalidate_bo_range
(
buffer
,
offset
,
size
);
if
(
!
(
buffer
->
flags
&
WINED3D_BUFFER_DOUBLEBUFFER
))
{
if
(
count
==
1
)
...
...
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