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
240912c5
Commit
240912c5
authored
Mar 17, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Ignore the dirty region for swapchain presents more explicitly.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
198042e1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
37 additions
and
33 deletions
+37
-33
swapchain.c
dlls/d3d8/swapchain.c
+5
-2
device.c
dlls/d3d9/device.c
+10
-5
swapchain.c
dlls/d3d9/swapchain.c
+5
-2
swapchain.c
dlls/dxgi/swapchain.c
+1
-1
cs.c
dlls/wined3d/cs.c
+2
-6
surface.c
dlls/wined3d/surface.c
+1
-1
swapchain.c
dlls/wined3d/swapchain.c
+8
-9
wined3d.spec
dlls/wined3d/wined3d.spec
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-4
wined3d.h
include/wine/wined3d.h
+1
-2
No files found.
dlls/d3d8/swapchain.c
View file @
240912c5
...
...
@@ -100,9 +100,12 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d8_swapchain_Present(IDirect3DSwapChai
if
(
device
->
device_state
!=
D3D8_DEVICE_STATE_OK
)
return
D3DERR_DEVICELOST
;
if
(
dirty_region
)
FIXME
(
"Ignoring dirty_region %p.
\n
"
,
dirty_region
);
wined3d_mutex_lock
();
hr
=
wined3d_swapchain_present
(
swapchain
->
wined3d_swapchain
,
src_rect
,
dst_rect
,
dst_window_override
,
dirty_region
,
0
);
hr
=
wined3d_swapchain_present
(
swapchain
->
wined3d_swapchain
,
src_rect
,
dst_rect
,
dst_window_override
,
0
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/d3d9/device.c
View file @
240912c5
...
...
@@ -759,12 +759,14 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_Present(IDirect3DDevice9Ex *
if
(
device
->
device_state
!=
D3D9_DEVICE_STATE_OK
)
return
device
->
d3d_parent
->
extended
?
S_PRESENT_OCCLUDED
:
D3DERR_DEVICELOST
;
if
(
dirty_region
)
FIXME
(
"Ignoring dirty_region %p.
\n
"
,
dirty_region
);
wined3d_mutex_lock
();
for
(
i
=
0
;
i
<
device
->
implicit_swapchain_count
;
++
i
)
{
hr
=
wined3d_swapchain_present
(
device
->
implicit_swapchains
[
i
]
->
wined3d_swapchain
,
src_rect
,
dst_rect
,
dst_window_override
,
dirty_region
,
0
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
=
wined3d_swapchain_present
(
device
->
implicit_swapchains
[
i
]
->
wined3d_swapchain
,
src_rect
,
dst_rect
,
dst_window_override
,
0
)))
{
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -3280,11 +3282,14 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_PresentEx(IDirect3DDevice9Ex
if
(
device
->
device_state
!=
D3D9_DEVICE_STATE_OK
)
return
S_PRESENT_OCCLUDED
;
if
(
dirty_region
)
FIXME
(
"Ignoring dirty_region %p.
\n
"
,
dirty_region
);
wined3d_mutex_lock
();
for
(
i
=
0
;
i
<
device
->
implicit_swapchain_count
;
++
i
)
{
if
(
FAILED
(
hr
=
wined3d_swapchain_present
(
device
->
implicit_swapchains
[
i
]
->
wined3d_swapchain
,
src_rect
,
dst_rect
,
dst_window_override
,
dirty_region
,
flags
)))
if
(
FAILED
(
hr
=
wined3d_swapchain_present
(
device
->
implicit_swapchains
[
i
]
->
wined3d_swapchain
,
src_rect
,
dst_rect
,
dst_window_override
,
flags
)))
{
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/d3d9/swapchain.c
View file @
240912c5
...
...
@@ -125,9 +125,12 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_swapchain_Present(IDirect3DSwapChai
if
(
device
->
device_state
!=
D3D9_DEVICE_STATE_OK
)
return
device
->
d3d_parent
->
extended
?
S_PRESENT_OCCLUDED
:
D3DERR_DEVICELOST
;
if
(
dirty_region
)
FIXME
(
"Ignoring dirty_region %p.
\n
"
,
dirty_region
);
wined3d_mutex_lock
();
hr
=
wined3d_swapchain_present
(
swapchain
->
wined3d_swapchain
,
src_rect
,
dst_rect
,
dst_window_override
,
dirty_region
,
flags
);
hr
=
wined3d_swapchain_present
(
swapchain
->
wined3d_swapchain
,
src_rect
,
dst_rect
,
dst_window_override
,
flags
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/dxgi/swapchain.c
View file @
240912c5
...
...
@@ -146,7 +146,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_Present(IDXGISwapChain *iface, U
if
(
flags
)
FIXME
(
"Unimplemented flags %#x
\n
"
,
flags
);
wined3d_mutex_lock
();
hr
=
wined3d_swapchain_present
(
This
->
wined3d_swapchain
,
NULL
,
NULL
,
NULL
,
NULL
,
0
);
hr
=
wined3d_swapchain_present
(
This
->
wined3d_swapchain
,
NULL
,
NULL
,
NULL
,
0
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/wined3d/cs.c
View file @
240912c5
...
...
@@ -61,7 +61,6 @@ struct wined3d_cs_present
struct
wined3d_swapchain
*
swapchain
;
const
RECT
*
src_rect
;
const
RECT
*
dst_rect
;
const
RGNDATA
*
dirty_region
;
DWORD
flags
;
};
...
...
@@ -259,13 +258,11 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
swapchain
=
op
->
swapchain
;
wined3d_swapchain_set_window
(
swapchain
,
op
->
dst_window_override
);
swapchain
->
swapchain_ops
->
swapchain_present
(
swapchain
,
op
->
src_rect
,
op
->
dst_rect
,
op
->
dirty_region
,
op
->
flags
);
swapchain
->
swapchain_ops
->
swapchain_present
(
swapchain
,
op
->
src_rect
,
op
->
dst_rect
,
op
->
flags
);
}
void
wined3d_cs_emit_present
(
struct
wined3d_cs
*
cs
,
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
HWND
dst_window_override
,
const
RGNDATA
*
dirty_region
,
DWORD
flags
)
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
HWND
dst_window_override
,
DWORD
flags
)
{
struct
wined3d_cs_present
*
op
;
...
...
@@ -275,7 +272,6 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
op
->
swapchain
=
swapchain
;
op
->
src_rect
=
src_rect
;
op
->
dst_rect
=
dst_rect
;
op
->
dirty_region
=
dirty_region
;
op
->
flags
=
flags
;
cs
->
ops
->
submit
(
cs
);
...
...
dlls/wined3d/surface.c
View file @
240912c5
...
...
@@ -4579,7 +4579,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
/* Set the swap effect to COPY, we don't want the backbuffer
* to become undefined. */
dst_swapchain
->
desc
.
swap_effect
=
WINED3D_SWAP_EFFECT_COPY
;
wined3d_swapchain_present
(
dst_swapchain
,
NULL
,
NULL
,
dst_swapchain
->
win_handle
,
NULL
,
0
);
wined3d_swapchain_present
(
dst_swapchain
,
NULL
,
NULL
,
dst_swapchain
->
win_handle
,
0
);
dst_swapchain
->
desc
.
swap_effect
=
swap_effect
;
return
WINED3D_OK
;
...
...
dlls/wined3d/swapchain.c
View file @
240912c5
...
...
@@ -133,12 +133,11 @@ void CDECL wined3d_swapchain_set_window(struct wined3d_swapchain *swapchain, HWN
}
HRESULT
CDECL
wined3d_swapchain_present
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
HWND
dst_window_override
,
const
RGNDATA
*
dirty_region
,
DWORD
flags
)
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
HWND
dst_window_override
,
DWORD
flags
)
{
TRACE
(
"swapchain %p, src_rect %s, dst_rect %s, dst_window_override %p,
dirty_region %p,
flags %#x.
\n
"
,
TRACE
(
"swapchain %p, src_rect %s, dst_rect %s, dst_window_override %p, flags %#x.
\n
"
,
swapchain
,
wine_dbgstr_rect
(
src_rect
),
wine_dbgstr_rect
(
dst_rect
),
dst_window_override
,
dirty_region
,
flags
);
dst_window_override
,
flags
);
if
(
flags
)
FIXME
(
"Ignoring flags %#x.
\n
"
,
flags
);
...
...
@@ -150,7 +149,7 @@ HRESULT CDECL wined3d_swapchain_present(struct wined3d_swapchain *swapchain,
}
wined3d_cs_emit_present
(
swapchain
->
device
->
cs
,
swapchain
,
src_rect
,
dst_rect
,
dst_window_override
,
dirty_region
,
flags
);
dst_rect
,
dst_window_override
,
flags
);
return
WINED3D_OK
;
}
...
...
@@ -467,8 +466,8 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct
device_invalidate_state
(
swapchain
->
device
,
STATE_FRAMEBUFFER
);
}
static
void
swapchain_gl_present
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect_in
,
const
RECT
*
dst_rect_in
,
const
RGNDATA
*
dirty_regio
n
,
DWORD
flags
)
static
void
swapchain_gl_present
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect_in
,
const
RECT
*
dst_rect_i
n
,
DWORD
flags
)
{
struct
wined3d_surface
*
back_buffer
=
surface_from_resource
(
wined3d_texture_get_sub_resource
(
swapchain
->
back_buffers
[
0
],
0
));
...
...
@@ -709,8 +708,8 @@ static void swapchain_gdi_frontbuffer_updated(struct wined3d_swapchain *swapchai
SetRectEmpty
(
&
swapchain
->
front_buffer_update
);
}
static
void
swapchain_gdi_present
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect_in
,
const
RECT
*
dst_rect_in
,
const
RGNDATA
*
dirty_regio
n
,
DWORD
flags
)
static
void
swapchain_gdi_present
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect_in
,
const
RECT
*
dst_rect_i
n
,
DWORD
flags
)
{
struct
wined3d_surface
*
front
,
*
back
;
...
...
dlls/wined3d/wined3d.spec
View file @
240912c5
...
...
@@ -231,7 +231,7 @@
@ cdecl wined3d_swapchain_get_desc(ptr ptr)
@ cdecl wined3d_swapchain_get_raster_status(ptr ptr)
@ cdecl wined3d_swapchain_incref(ptr)
@ cdecl wined3d_swapchain_present(ptr ptr ptr ptr
ptr
long)
@ cdecl wined3d_swapchain_present(ptr ptr ptr ptr long)
@ cdecl wined3d_swapchain_resize_buffers(ptr long long long long long long)
@ cdecl wined3d_swapchain_set_gamma_ramp(ptr long ptr)
@ cdecl wined3d_swapchain_set_palette(ptr ptr)
...
...
dlls/wined3d/wined3d_private.h
View file @
240912c5
...
...
@@ -2777,8 +2777,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
void
wined3d_cs_emit_draw
(
struct
wined3d_cs
*
cs
,
UINT
start_idx
,
UINT
index_count
,
UINT
start_instance
,
UINT
instance_count
,
BOOL
indexed
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_present
(
struct
wined3d_cs
*
cs
,
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
HWND
dst_window_override
,
const
RGNDATA
*
dirty_region
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
HWND
dst_window_override
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_reset_state
(
struct
wined3d_cs
*
cs
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_clip_plane
(
struct
wined3d_cs
*
cs
,
UINT
plane_idx
,
const
struct
wined3d_vec4
*
plane
)
DECLSPEC_HIDDEN
;
...
...
@@ -2948,8 +2947,8 @@ struct wined3d_shader_resource_view
struct
wined3d_swapchain_ops
{
void
(
*
swapchain_present
)(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
const
RGNDATA
*
dirty_region
,
DWORD
flags
);
void
(
*
swapchain_present
)(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
DWORD
flags
);
void
(
*
swapchain_frontbuffer_updated
)(
struct
wined3d_swapchain
*
swaphchain
);
};
...
...
include/wine/wined3d.h
View file @
240912c5
...
...
@@ -2419,8 +2419,7 @@ HRESULT __cdecl wined3d_swapchain_get_raster_status(const struct wined3d_swapcha
struct
wined3d_raster_status
*
raster_status
);
ULONG
__cdecl
wined3d_swapchain_incref
(
struct
wined3d_swapchain
*
swapchain
);
HRESULT
__cdecl
wined3d_swapchain_present
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
HWND
dst_window_override
,
const
RGNDATA
*
dirty_region
,
DWORD
flags
);
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
HWND
dst_window_override
,
DWORD
flags
);
HRESULT
__cdecl
wined3d_swapchain_resize_buffers
(
struct
wined3d_swapchain
*
swapchain
,
unsigned
int
buffer_count
,
unsigned
int
width
,
unsigned
int
height
,
enum
wined3d_format_id
format_id
,
enum
wined3d_multisample_type
multisample_type
,
unsigned
int
multisample_quality
);
...
...
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