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
493502b5
Commit
493502b5
authored
Mar 29, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_rendertarget_view to surface_cpu_blt_colour_fill().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e19e15d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
19 deletions
+13
-19
surface.c
dlls/wined3d/surface.c
+13
-19
No files found.
dlls/wined3d/surface.c
View file @
493502b5
...
...
@@ -3258,28 +3258,28 @@ release:
return
hr
;
}
static
HRESULT
surface_cpu_blt_colour_fill
(
struct
wined3d_
texture
*
texture
,
unsigned
int
sub_resource_idx
,
const
struct
wined3d_box
*
box
,
DWORD
c
)
static
HRESULT
surface_cpu_blt_colour_fill
(
struct
wined3d_
rendertarget_view
*
view
,
const
struct
wined3d_box
*
box
,
const
struct
wined3d_color
*
colour
)
{
struct
wined3d_resource
*
resource
=
&
texture
->
resource
;
unsigned
int
x
,
y
,
w
,
h
,
bpp
;
struct
wined3d_map_desc
map
;
BYTE
*
row
;
DWORD
c
;
TRACE
(
"texture %p, sub_resource_idx %u, box %s, colour 0x%08x.
\n
"
,
texture
,
sub_resource_idx
,
debug_box
(
box
),
c
);
TRACE
(
"view %p, box %s, colour %s.
\n
"
,
view
,
debug_box
(
box
),
debug_color
(
colour
));
if
(
resource
->
format_flags
&
WINED3DFMT_FLAG_BLOCKS
)
if
(
view
->
format_flags
&
WINED3DFMT_FLAG_BLOCKS
)
{
FIXME
(
"Not implemented for format %s.
\n
"
,
debug_d3dformat
(
resource
->
format
->
id
));
FIXME
(
"Not implemented for format %s.
\n
"
,
debug_d3dformat
(
view
->
format
->
id
));
return
E_NOTIMPL
;
}
bpp
=
resource
->
format
->
byte_count
;
c
=
wined3d_format_convert_from_float
(
view
->
format
,
colour
);
bpp
=
view
->
format
->
byte_count
;
w
=
box
->
right
-
box
->
left
;
h
=
box
->
bottom
-
box
->
top
;
wined3d_resource_map
(
resource
,
sub_resource_idx
,
&
map
,
box
,
0
);
wined3d_resource_map
(
view
->
resource
,
view
->
sub_resource_idx
,
&
map
,
box
,
0
);
switch
(
bpp
)
{
...
...
@@ -3317,7 +3317,7 @@ static HRESULT surface_cpu_blt_colour_fill(struct wined3d_texture *texture, unsi
default:
FIXME
(
"Not implemented for bpp %u.
\n
"
,
bpp
);
wined3d_resource_unmap
(
resource
,
sub_resource_idx
);
wined3d_resource_unmap
(
view
->
resource
,
view
->
sub_resource_idx
);
return
WINED3DERR_NOTAVAILABLE
;
}
...
...
@@ -3327,7 +3327,7 @@ static HRESULT surface_cpu_blt_colour_fill(struct wined3d_texture *texture, unsi
row
+=
map
.
row_pitch
;
memcpy
(
row
,
map
.
data
,
w
*
bpp
);
}
wined3d_resource_unmap
(
resource
,
sub_resource_idx
);
wined3d_resource_unmap
(
view
->
resource
,
view
->
sub_resource_idx
);
return
WINED3D_OK
;
}
...
...
@@ -3336,11 +3336,8 @@ static HRESULT cpu_blit_color_fill(struct wined3d_device *device, struct wined3d
const
RECT
*
rect
,
const
struct
wined3d_color
*
color
)
{
const
struct
wined3d_box
box
=
{
rect
->
left
,
rect
->
top
,
rect
->
right
,
rect
->
bottom
,
0
,
1
};
DWORD
c
;
c
=
wined3d_format_convert_from_float
(
view
->
format
,
color
);
return
surface_cpu_blt_colour_fill
(
texture_from_resource
(
view
->
resource
),
view
->
sub_resource_idx
,
&
box
,
c
);
return
surface_cpu_blt_colour_fill
(
view
,
&
box
,
color
);
}
static
HRESULT
cpu_blit_depth_fill
(
struct
wined3d_device
*
device
,
...
...
@@ -3349,7 +3346,6 @@ static HRESULT cpu_blit_depth_fill(struct wined3d_device *device,
{
const
struct
wined3d_box
box
=
{
rect
->
left
,
rect
->
top
,
rect
->
right
,
rect
->
bottom
,
0
,
1
};
struct
wined3d_color
color
=
{
depth
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
};
DWORD
c
;
if
(
clear_flags
!=
WINED3DCLEAR_ZBUFFER
)
{
...
...
@@ -3357,9 +3353,7 @@ static HRESULT cpu_blit_depth_fill(struct wined3d_device *device,
return
WINED3DERR_INVALIDCALL
;
}
c
=
wined3d_format_convert_from_float
(
view
->
format
,
&
color
);
return
surface_cpu_blt_colour_fill
(
texture_from_resource
(
view
->
resource
),
view
->
sub_resource_idx
,
&
box
,
c
);
return
surface_cpu_blt_colour_fill
(
view
,
&
box
,
&
color
);
}
static
void
cpu_blit_blit_surface
(
struct
wined3d_device
*
device
,
enum
wined3d_blit_op
op
,
...
...
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