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
4428bda4
Commit
4428bda4
authored
Jul 31, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Apply clear state after depth / stencil setup in device_clear_render_targets().
parent
03eb6a4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
device.c
dlls/wined3d/device.c
+16
-16
No files found.
dlls/wined3d/device.c
View file @
4428bda4
...
...
@@ -680,13 +680,6 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
return
WINED3D_OK
;
}
if
(
!
context_apply_clear_state
(
context
,
device
,
rt_count
,
fb
))
{
context_release
(
context
);
WARN
(
"Failed to apply clear state, skipping clear.
\n
"
);
return
WINED3D_OK
;
}
if
(
target
)
{
render_offscreen
=
context
->
render_offscreen
;
...
...
@@ -699,6 +692,22 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
drawable_height
=
fb
->
depth_stencil
->
pow2Height
;
}
if
(
flags
&
WINED3DCLEAR_ZBUFFER
)
{
DWORD
location
=
render_offscreen
?
SFLAG_DS_OFFSCREEN
:
SFLAG_DS_ONSCREEN
;
if
(
location
==
SFLAG_DS_ONSCREEN
&&
fb
->
depth_stencil
!=
device
->
onscreen_depth_stencil
)
device_switch_onscreen_ds
(
device
,
context
,
fb
->
depth_stencil
);
prepare_ds_clear
(
fb
->
depth_stencil
,
context
,
location
,
draw_rect
,
rect_count
,
clear_rect
);
}
if
(
!
context_apply_clear_state
(
context
,
device
,
rt_count
,
fb
))
{
context_release
(
context
);
WARN
(
"Failed to apply clear state, skipping clear.
\n
"
);
return
WINED3D_OK
;
}
ENTER_GL
();
/* Only set the values up once, as they are not changing. */
...
...
@@ -718,15 +727,6 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
if
(
flags
&
WINED3DCLEAR_ZBUFFER
)
{
DWORD
location
=
render_offscreen
?
SFLAG_DS_OFFSCREEN
:
SFLAG_DS_ONSCREEN
;
if
(
location
==
SFLAG_DS_ONSCREEN
&&
fb
->
depth_stencil
!=
device
->
onscreen_depth_stencil
)
{
LEAVE_GL
();
device_switch_onscreen_ds
(
device
,
context
,
fb
->
depth_stencil
);
ENTER_GL
();
}
prepare_ds_clear
(
fb
->
depth_stencil
,
context
,
location
,
draw_rect
,
rect_count
,
clear_rect
);
surface_modify_location
(
fb
->
depth_stencil
,
SFLAG_INDRAWABLE
,
TRUE
);
glDepthMask
(
GL_TRUE
);
...
...
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