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
b98ece0d
Commit
b98ece0d
authored
Apr 04, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use the blitter interface in wined3d_cs_exec_clear().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
52979b6b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
35 deletions
+43
-35
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+3
-3
cs.c
dlls/wined3d/cs.c
+2
-3
device.c
dlls/wined3d/device.c
+2
-2
surface.c
dlls/wined3d/surface.c
+35
-26
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
b98ece0d
...
...
@@ -7877,14 +7877,14 @@ static void arbfp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bli
}
static
void
arbfp_blitter_clear
(
struct
wined3d_blitter
*
blitter
,
struct
wined3d_device
*
device
,
unsigned
int
rt_count
,
const
struct
wined3d_fb_state
*
fb
,
const
RECT
*
clear_rect
,
unsigned
int
rt_count
,
const
struct
wined3d_fb_state
*
fb
,
unsigned
int
rect_count
,
const
RECT
*
clear_rects
,
const
RECT
*
draw_rect
,
DWORD
flags
,
const
struct
wined3d_color
*
colour
,
float
depth
,
DWORD
stencil
)
{
struct
wined3d_blitter
*
next
;
if
((
next
=
blitter
->
next
))
next
->
ops
->
blitter_clear
(
next
,
device
,
rt_count
,
fb
,
clear_rect
,
draw_rect
,
flags
,
colour
,
depth
,
stencil
);
next
->
ops
->
blitter_clear
(
next
,
device
,
rt_count
,
fb
,
rect_count
,
clear_rect
s
,
draw_rect
,
flags
,
colour
,
depth
,
stencil
);
}
static
const
struct
wined3d_blitter_ops
arbfp_blitter_ops
=
...
...
dlls/wined3d/cs.c
View file @
b98ece0d
...
...
@@ -420,9 +420,8 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
device
=
cs
->
device
;
wined3d_get_draw_rect
(
state
,
&
draw_rect
);
device_clear_render_targets
(
device
,
device
->
adapter
->
gl_info
.
limits
.
buffers
,
state
->
fb
,
op
->
rect_count
,
op
->
rects
,
&
draw_rect
,
op
->
flags
,
&
op
->
color
,
op
->
depth
,
op
->
stencil
);
device
->
blitter
->
ops
->
blitter_clear
(
device
->
blitter
,
device
,
device
->
adapter
->
gl_info
.
limits
.
buffers
,
state
->
fb
,
op
->
rect_count
,
op
->
rects
,
&
draw_rect
,
op
->
flags
,
&
op
->
color
,
op
->
depth
,
op
->
stencil
);
if
(
op
->
flags
&
WINED3DCLEAR_TARGET
)
{
...
...
dlls/wined3d/device.c
View file @
b98ece0d
...
...
@@ -4190,13 +4190,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
{
struct
wined3d_fb_state
fb
=
{
&
view
,
NULL
};
device
->
blitter
->
ops
->
blitter_clear
(
device
->
blitter
,
device
,
1
,
&
fb
,
rect
,
&
draw_rect
,
flags
,
color
,
depth
,
stencil
);
1
,
rect
,
&
draw_rect
,
flags
,
color
,
depth
,
stencil
);
}
else
{
struct
wined3d_fb_state
fb
=
{
NULL
,
view
};
device
->
blitter
->
ops
->
blitter_clear
(
device
->
blitter
,
device
,
0
,
&
fb
,
rect
,
&
draw_rect
,
flags
,
color
,
depth
,
stencil
);
1
,
rect
,
&
draw_rect
,
flags
,
color
,
depth
,
stencil
);
}
return
WINED3D_OK
;
...
...
dlls/wined3d/surface.c
View file @
b98ece0d
...
...
@@ -2449,14 +2449,14 @@ static void fbo_blitter_destroy(struct wined3d_blitter *blitter, struct wined3d_
}
static
void
fbo_blitter_clear
(
struct
wined3d_blitter
*
blitter
,
struct
wined3d_device
*
device
,
unsigned
int
rt_count
,
const
struct
wined3d_fb_state
*
fb
,
const
RECT
*
clear_rect
,
unsigned
int
rt_count
,
const
struct
wined3d_fb_state
*
fb
,
unsigned
int
rect_count
,
const
RECT
*
clear_rects
,
const
RECT
*
draw_rect
,
DWORD
flags
,
const
struct
wined3d_color
*
colour
,
float
depth
,
DWORD
stencil
)
{
struct
wined3d_blitter
*
next
;
if
((
next
=
blitter
->
next
))
next
->
ops
->
blitter_clear
(
next
,
device
,
rt_count
,
fb
,
clear_rect
,
draw_rect
,
flags
,
colour
,
depth
,
stencil
);
next
->
ops
->
blitter_clear
(
next
,
device
,
rt_count
,
fb
,
rect_count
,
clear_rect
s
,
draw_rect
,
flags
,
colour
,
depth
,
stencil
);
}
static
void
fbo_blitter_blit
(
struct
wined3d_blitter
*
blitter
,
enum
wined3d_blit_op
op
,
...
...
@@ -2586,7 +2586,7 @@ static BOOL ffp_blit_supported(const struct wined3d_gl_info *gl_info,
}
static
void
ffp_blitter_clear
(
struct
wined3d_blitter
*
blitter
,
struct
wined3d_device
*
device
,
unsigned
int
rt_count
,
const
struct
wined3d_fb_state
*
fb
,
const
RECT
*
clear_rect
,
unsigned
int
rt_count
,
const
struct
wined3d_fb_state
*
fb
,
unsigned
int
rect_count
,
const
RECT
*
clear_rects
,
const
RECT
*
draw_rect
,
DWORD
flags
,
const
struct
wined3d_color
*
colour
,
float
depth
,
DWORD
stencil
)
{
struct
wined3d_rendertarget_view
*
view
;
...
...
@@ -2627,14 +2627,14 @@ static void ffp_blitter_clear(struct wined3d_blitter *blitter, struct wined3d_de
goto
next
;
}
device_clear_render_targets
(
device
,
rt_count
,
fb
,
1
,
clear_rect
,
draw_rect
,
flags
,
colour
,
depth
,
stencil
);
device_clear_render_targets
(
device
,
rt_count
,
fb
,
rect_count
,
clear_rect
s
,
draw_rect
,
flags
,
colour
,
depth
,
stencil
);
return
;
next:
if
((
next
=
blitter
->
next
))
next
->
ops
->
blitter_clear
(
next
,
device
,
rt_count
,
fb
,
clear_rect
,
draw_rect
,
flags
,
colour
,
depth
,
stencil
);
next
->
ops
->
blitter_clear
(
next
,
device
,
rt_count
,
fb
,
rect_count
,
clear_rect
s
,
draw_rect
,
flags
,
colour
,
depth
,
stencil
);
}
static
void
ffp_blitter_blit
(
struct
wined3d_blitter
*
blitter
,
enum
wined3d_blit_op
op
,
...
...
@@ -3425,35 +3425,44 @@ static void surface_cpu_blt_colour_fill(struct wined3d_rendertarget_view *view,
}
static
void
cpu_blitter_clear
(
struct
wined3d_blitter
*
blitter
,
struct
wined3d_device
*
device
,
unsigned
int
rt_count
,
const
struct
wined3d_fb_state
*
fb
,
const
RECT
*
clear_rect
,
unsigned
int
rt_count
,
const
struct
wined3d_fb_state
*
fb
,
unsigned
int
rect_count
,
const
RECT
*
clear_rects
,
const
RECT
*
draw_rect
,
DWORD
flags
,
const
struct
wined3d_color
*
colour
,
float
depth
,
DWORD
stencil
)
{
struct
wined3d_color
c
=
{
depth
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
};
struct
wined3d_rendertarget_view
*
view
;
struct
wined3d_box
box
;
unsigned
int
i
;
box
.
left
=
max
(
clear_rect
->
left
,
draw_rect
->
left
);
box
.
top
=
max
(
clear_rect
->
top
,
draw_rect
->
top
);
box
.
right
=
min
(
clear_rect
->
right
,
draw_rect
->
right
);
box
.
bottom
=
min
(
clear_rect
->
bottom
,
draw_rect
->
bottom
);
box
.
front
=
0
;
box
.
back
=
1
;
unsigned
int
i
,
j
;
if
(
box
.
left
>=
box
.
right
||
box
.
top
>=
box
.
bottom
)
return
;
if
(
!
rect_count
)
{
rect_count
=
1
;
clear_rects
=
draw_rect
;
}
if
(
flags
&
WINED3DCLEAR_TARGET
)
for
(
i
=
0
;
i
<
rect_count
;
++
i
)
{
for
(
i
=
0
;
i
<
rt_count
;
++
i
)
box
.
left
=
max
(
clear_rects
[
i
].
left
,
draw_rect
->
left
);
box
.
top
=
max
(
clear_rects
[
i
].
top
,
draw_rect
->
top
);
box
.
right
=
min
(
clear_rects
[
i
].
right
,
draw_rect
->
right
);
box
.
bottom
=
min
(
clear_rects
[
i
].
bottom
,
draw_rect
->
bottom
);
box
.
front
=
0
;
box
.
back
=
1
;
if
(
box
.
left
>=
box
.
right
||
box
.
top
>=
box
.
bottom
)
continue
;
if
(
flags
&
WINED3DCLEAR_TARGET
)
{
if
((
view
=
fb
->
render_targets
[
i
]))
surface_cpu_blt_colour_fill
(
view
,
&
box
,
colour
);
for
(
j
=
0
;
j
<
rt_count
;
++
j
)
{
if
((
view
=
fb
->
render_targets
[
j
]))
surface_cpu_blt_colour_fill
(
view
,
&
box
,
colour
);
}
}
}
if
((
flags
&
WINED3DCLEAR_ZBUFFER
)
&&
(
view
=
fb
->
depth_stencil
))
surface_cpu_blt_colour_fill
(
view
,
&
box
,
&
c
);
if
((
flags
&
WINED3DCLEAR_ZBUFFER
)
&&
(
view
=
fb
->
depth_stencil
))
surface_cpu_blt_colour_fill
(
view
,
&
box
,
&
c
);
}
if
(
flags
&
~
(
WINED3DCLEAR_TARGET
|
WINED3DCLEAR_ZBUFFER
))
FIXME
(
"flags %#x not implemented.
\n
"
,
flags
);
...
...
dlls/wined3d/wined3d_private.h
View file @
b98ece0d
...
...
@@ -1877,7 +1877,7 @@ struct wined3d_blitter_ops
{
void
(
*
blitter_destroy
)(
struct
wined3d_blitter
*
blitter
,
struct
wined3d_context
*
context
);
void
(
*
blitter_clear
)(
struct
wined3d_blitter
*
blitter
,
struct
wined3d_device
*
device
,
unsigned
int
rt_count
,
const
struct
wined3d_fb_state
*
fb
,
const
RECT
*
clear_rect
,
unsigned
int
rt_count
,
const
struct
wined3d_fb_state
*
fb
,
unsigned
int
rect_count
,
const
RECT
*
clear_rects
,
const
RECT
*
draw_rect
,
DWORD
flags
,
const
struct
wined3d_color
*
colour
,
float
depth
,
DWORD
stencil
);
void
(
*
blitter_blit
)(
struct
wined3d_blitter
*
blitter
,
enum
wined3d_blit_op
op
,
struct
wined3d_context
*
context
,
struct
wined3d_surface
*
src_surface
,
DWORD
src_location
,
const
RECT
*
src_rect
,
...
...
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