Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7ede9788
Commit
7ede9788
authored
Aug 21, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make wined3d_device_clear_rendertarget_view() work with texture resources.
parent
fb7135ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
device.c
dlls/wined3d/device.c
+17
-7
No files found.
dlls/wined3d/device.c
View file @
7ede9788
...
...
@@ -3741,22 +3741,32 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
}
void
CDECL
wined3d_device_clear_rendertarget_view
(
struct
wined3d_device
*
device
,
struct
wined3d_rendertarget_view
*
rendertarget_
view
,
const
struct
wined3d_color
*
color
)
struct
wined3d_rendertarget_view
*
view
,
const
struct
wined3d_color
*
color
)
{
struct
wined3d_resource
*
resource
;
HRESULT
hr
;
RECT
rect
;
resource
=
rendertarget_view
->
resource
;
if
(
resource
->
type
!=
WINED3D_RTYPE_SURFACE
)
TRACE
(
"device %p, view %p, color {%.8e, %.8e, %.8e, %.8e}.
\n
"
,
device
,
view
,
color
->
r
,
color
->
g
,
color
->
b
,
color
->
a
);
resource
=
view
->
resource
;
if
(
resource
->
type
!=
WINED3D_RTYPE_TEXTURE
&&
resource
->
type
!=
WINED3D_RTYPE_CUBE_TEXTURE
)
{
FIXME
(
"Not implemented for %s resources.
\n
"
,
debug_d3dresourcetype
(
resource
->
type
));
return
;
}
if
(
view
->
depth
>
1
)
{
FIXME
(
"
Only supported on surface resources
\n
"
);
FIXME
(
"
Layered clears not implemented.
\n
"
);
return
;
}
SetRect
(
&
rect
,
0
,
0
,
resource
->
width
,
resource
->
height
);
hr
=
surface_color_fill
(
surface_from_resource
(
resource
),
&
rect
,
color
);
if
(
FAILED
(
hr
))
ERR
(
"Color fill failed, hr %#x.
\n
"
,
hr
);
SetRect
(
&
rect
,
0
,
0
,
view
->
width
,
view
->
height
);
resource
=
wined3d_texture_get_sub_resource
(
wined3d_texture_from_resource
(
resource
),
view
->
sub_resource_idx
);
if
(
FAILED
(
hr
=
surface_color_fill
(
surface_from_resource
(
resource
),
&
rect
,
color
)))
ERR
(
"Color fill failed, hr %#x.
\n
"
,
hr
);
}
struct
wined3d_surface
*
CDECL
wined3d_device_get_render_target
(
const
struct
wined3d_device
*
device
,
...
...
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