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
053071e3
Commit
053071e3
authored
Jun 27, 2011
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jul 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a struct wined3d_fb_state to device_clear_render_targets.
parent
cd96c59d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
19 deletions
+21
-19
device.c
dlls/wined3d/device.c
+14
-14
surface.c
dlls/wined3d/surface.c
+4
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-3
No files found.
dlls/wined3d/device.c
View file @
053071e3
...
...
@@ -649,12 +649,12 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context
}
/* Do not call while under the GL lock. */
HRESULT
device_clear_render_targets
(
struct
wined3d_device
*
device
,
UINT
rt_count
,
struct
wined3d_surface
**
rts
,
struct
wined3d_surface
*
depth_stencil
,
UINT
rect_count
,
const
RECT
*
rects
,
const
RECT
*
draw_rect
,
DWORD
flags
,
const
WINED3DCOLORVALUE
*
color
,
float
depth
,
DWORD
stencil
)
HRESULT
device_clear_render_targets
(
struct
wined3d_device
*
device
,
UINT
rt_count
,
const
struct
wined3d_fb_state
*
fb
,
UINT
rect_count
,
const
RECT
*
rects
,
const
RECT
*
draw_rect
,
DWORD
flags
,
const
WINED3DCOLORVALUE
*
color
,
float
depth
,
DWORD
stencil
)
{
const
RECT
*
clear_rect
=
(
rect_count
>
0
&&
rects
)
?
(
const
RECT
*
)
rects
:
NULL
;
struct
wined3d_surface
*
target
=
rt_count
?
r
ts
[
0
]
:
NULL
;
struct
wined3d_surface
*
target
=
rt_count
?
fb
->
render_targe
ts
[
0
]
:
NULL
;
UINT
drawable_width
,
drawable_height
;
struct
wined3d_context
*
context
;
GLbitfield
clear_mask
=
0
;
...
...
@@ -673,7 +673,7 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
{
for
(
i
=
0
;
i
<
rt_count
;
++
i
)
{
if
(
rts
[
i
])
surface_load_location
(
r
ts
[
i
],
SFLAG_INDRAWABLE
,
NULL
);
if
(
fb
->
render_targets
[
i
])
surface_load_location
(
fb
->
render_targe
ts
[
i
],
SFLAG_INDRAWABLE
,
NULL
);
}
}
...
...
@@ -685,7 +685,7 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
return
WINED3D_OK
;
}
if
(
!
context_apply_clear_state
(
context
,
device
,
rt_count
,
rts
,
depth_stencil
))
if
(
!
context_apply_clear_state
(
context
,
device
,
rt_count
,
fb
->
render_targets
,
fb
->
depth_stencil
))
{
context_release
(
context
);
WARN
(
"Failed to apply clear state, skipping clear.
\n
"
);
...
...
@@ -700,8 +700,8 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
else
{
render_offscreen
=
TRUE
;
drawable_width
=
depth_stencil
->
pow2Width
;
drawable_height
=
depth_stencil
->
pow2Height
;
drawable_width
=
fb
->
depth_stencil
->
pow2Width
;
drawable_height
=
fb
->
depth_stencil
->
pow2Height
;
}
ENTER_GL
();
...
...
@@ -725,14 +725,14 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
{
DWORD
location
=
render_offscreen
?
SFLAG_DS_OFFSCREEN
:
SFLAG_DS_ONSCREEN
;
if
(
location
==
SFLAG_DS_ONSCREEN
&&
depth_stencil
!=
device
->
onscreen_depth_stencil
)
if
(
location
==
SFLAG_DS_ONSCREEN
&&
fb
->
depth_stencil
!=
device
->
onscreen_depth_stencil
)
{
LEAVE_GL
();
device_switch_onscreen_ds
(
device
,
context
,
depth_stencil
);
device_switch_onscreen_ds
(
device
,
context
,
fb
->
depth_stencil
);
ENTER_GL
();
}
prepare_ds_clear
(
depth_stencil
,
context
,
location
,
draw_rect
,
rect_count
,
clear_rect
);
surface_modify_location
(
depth_stencil
,
SFLAG_INDRAWABLE
,
TRUE
);
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
);
device_invalidate_state
(
device
,
STATE_RENDER
(
WINED3DRS_ZWRITEENABLE
));
...
...
@@ -745,7 +745,7 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
{
for
(
i
=
0
;
i
<
rt_count
;
++
i
)
{
if
(
rts
[
i
])
surface_modify_location
(
r
ts
[
i
],
SFLAG_INDRAWABLE
,
TRUE
);
if
(
fb
->
render_targets
[
i
])
surface_modify_location
(
fb
->
render_targe
ts
[
i
],
SFLAG_INDRAWABLE
,
TRUE
);
}
glColorMask
(
GL_TRUE
,
GL_TRUE
,
GL_TRUE
,
GL_TRUE
);
...
...
@@ -4043,7 +4043,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
device_get_draw_rect
(
device
,
&
draw_rect
);
return
device_clear_render_targets
(
device
,
device
->
adapter
->
gl_info
.
limits
.
buffers
,
device
->
fb
.
render_targets
,
device
->
fb
.
depth_stencil
,
rect_count
,
rects
,
&
device
->
fb
,
rect_count
,
rects
,
&
draw_rect
,
flags
,
&
c
,
depth
,
stencil
);
}
...
...
dlls/wined3d/surface.c
View file @
053071e3
...
...
@@ -6392,8 +6392,9 @@ static HRESULT ffp_blit_color_fill(struct wined3d_device *device, struct wined3d
const
RECT
*
dst_rect
,
const
WINED3DCOLORVALUE
*
color
)
{
const
RECT
draw_rect
=
{
0
,
0
,
dst_surface
->
resource
.
width
,
dst_surface
->
resource
.
height
};
struct
wined3d_fb_state
fb
=
{
&
dst_surface
,
NULL
};
return
device_clear_render_targets
(
device
,
1
,
&
dst_surface
,
NULL
,
return
device_clear_render_targets
(
device
,
1
,
&
fb
,
1
,
dst_rect
,
&
draw_rect
,
WINED3DCLEAR_TARGET
,
color
,
0
.
0
f
,
0
);
}
...
...
@@ -6402,8 +6403,9 @@ static HRESULT ffp_blit_depth_fill(struct wined3d_device *device,
struct
wined3d_surface
*
surface
,
const
RECT
*
rect
,
float
depth
)
{
const
RECT
draw_rect
=
{
0
,
0
,
surface
->
resource
.
width
,
surface
->
resource
.
height
};
struct
wined3d_fb_state
fb
=
{
NULL
,
surface
};
return
device_clear_render_targets
(
device
,
0
,
NULL
,
surface
,
return
device_clear_render_targets
(
device
,
0
,
&
fb
,
1
,
rect
,
&
draw_rect
,
WINED3DCLEAR_ZBUFFER
,
0
,
depth
,
0
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
053071e3
...
...
@@ -1745,9 +1745,9 @@ struct wined3d_device
struct
WineD3DRectPatch
*
currentPatch
;
};
HRESULT
device_clear_render_targets
(
struct
wined3d_device
*
device
,
UINT
rt_count
,
struct
wined3d_surface
**
rts
,
struct
wined3d_surface
*
depth_stencil
,
UINT
rect_count
,
const
RECT
*
rects
,
const
RECT
*
draw_rect
,
DWORD
flags
,
const
WINED3DCOLORVALUE
*
color
,
float
depth
,
DWORD
stencil
)
DECLSPEC_HIDDEN
;
HRESULT
device_clear_render_targets
(
struct
wined3d_device
*
device
,
UINT
rt_count
,
const
struct
wined3d_fb_state
*
fb
,
UINT
rect_count
,
const
RECT
*
rects
,
const
RECT
*
draw_rect
,
DWORD
flags
,
const
WINED3DCOLORVALUE
*
color
,
float
depth
,
DWORD
stencil
)
DECLSPEC_HIDDEN
;
BOOL
device_context_add
(
struct
wined3d_device
*
device
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
void
device_context_remove
(
struct
wined3d_device
*
device
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
void
device_get_draw_rect
(
struct
wined3d_device
*
device
,
RECT
*
rect
)
DECLSPEC_HIDDEN
;
...
...
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