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
fbcdf8c6
Commit
fbcdf8c6
authored
Sep 27, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Only do asynchronous clears when the application asked for them.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a6d640e8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
surface.c
dlls/ddraw/surface.c
+10
-2
cs.c
dlls/wined3d/cs.c
+2
-0
wined3d.h
include/wine/wined3d.h
+1
-0
No files found.
dlls/ddraw/surface.c
View file @
fbcdf8c6
...
...
@@ -1458,24 +1458,32 @@ static HRESULT ddraw_surface_blt(struct ddraw_surface *dst_surface, const RECT *
if
(
flags
&
DDBLT_COLORFILL
)
{
wined3d_flags
=
WINED3DCLEAR_TARGET
;
if
(
!
(
flags
&
DDBLT_ASYNC
))
wined3d_flags
|=
WINED3DCLEAR_SYNCHRONOUS
;
if
(
!
wined3d_colour_from_ddraw_colour
(
&
dst_surface
->
surface_desc
.
u4
.
ddpfPixelFormat
,
dst_surface
->
palette
,
fill_colour
,
&
colour
))
return
DDERR_INVALIDPARAMS
;
return
wined3d_device_clear_rendertarget_view
(
wined3d_device
,
ddraw_surface_get_rendertarget_view
(
dst_surface
),
dst_rect
,
WINED3DCLEAR_TARGET
,
&
colour
,
0
.
0
f
,
0
);
dst_rect
,
wined3d_flags
,
&
colour
,
0
.
0
f
,
0
);
}
if
(
flags
&
DDBLT_DEPTHFILL
)
{
wined3d_flags
=
WINED3DCLEAR_ZBUFFER
;
if
(
!
(
flags
&
DDBLT_ASYNC
))
wined3d_flags
|=
WINED3DCLEAR_SYNCHRONOUS
;
if
(
!
wined3d_colour_from_ddraw_colour
(
&
dst_surface
->
surface_desc
.
u4
.
ddpfPixelFormat
,
dst_surface
->
palette
,
fill_colour
,
&
colour
))
return
DDERR_INVALIDPARAMS
;
return
wined3d_device_clear_rendertarget_view
(
wined3d_device
,
ddraw_surface_get_rendertarget_view
(
dst_surface
),
dst_rect
,
WINED3DCLEAR_ZBUFFER
,
NULL
,
colour
.
r
,
0
);
dst_rect
,
wined3d_flags
,
NULL
,
colour
.
r
,
0
);
}
wined3d_flags
=
flags
&
~
DDBLT_ASYNC
;
...
...
dlls/wined3d/cs.c
View file @
fbcdf8c6
...
...
@@ -671,6 +671,8 @@ void wined3d_cs_emit_clear_rendertarget_view(struct wined3d_cs *cs, struct wined
wined3d_resource_acquire
(
view
->
resource
);
cs
->
ops
->
submit
(
cs
,
WINED3D_CS_QUEUE_DEFAULT
);
if
(
flags
&
WINED3DCLEAR_SYNCHRONOUS
)
cs
->
ops
->
finish
(
cs
,
WINED3D_CS_QUEUE_DEFAULT
);
}
static
void
acquire_shader_resources
(
const
struct
wined3d_state
*
state
,
unsigned
int
shader_mask
)
...
...
include/wine/wined3d.h
View file @
fbcdf8c6
...
...
@@ -1015,6 +1015,7 @@ enum wined3d_shader_type
#define WINED3DCLEAR_TARGET 0x00000001
#define WINED3DCLEAR_ZBUFFER 0x00000002
#define WINED3DCLEAR_STENCIL 0x00000004
#define WINED3DCLEAR_SYNCHRONOUS 0x80000000
/* Stream source flags */
#define WINED3DSTREAMSOURCE_INDEXEDDATA (1u << 30)
...
...
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