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
d25cc969
Commit
d25cc969
authored
Mar 12, 2015
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Correct ColorFill validation.
parent
ef9d3f11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
device.c
dlls/d3d9/device.c
+11
-7
No files found.
dlls/d3d9/device.c
View file @
d25cc969
...
...
@@ -1287,18 +1287,22 @@ static HRESULT WINAPI d3d9_device_ColorFill(IDirect3DDevice9Ex *iface,
wined3d_resource
=
wined3d_surface_get_resource
(
surface_impl
->
wined3d_surface
);
wined3d_resource_get_desc
(
wined3d_resource
,
&
desc
);
/* This method is only allowed with surfaces that are render targets, or
* offscreen plain surfaces in D3DPOOL_DEFAULT. */
if
(
!
(
desc
.
usage
&
WINED3DUSAGE_RENDERTARGET
)
&&
desc
.
pool
!=
WINED3D_POOL_DEFAULT
)
if
(
desc
.
pool
!=
WINED3D_POOL_DEFAULT
)
{
wined3d_mutex_unlock
();
WARN
(
"
Surface is not a render target, or not a stand-alone D3DPOOL_DEFAULT surface
\n
"
);
WARN
(
"
Colorfill is not allowed on surfaces in pool %#x, returning D3DERR_INVALIDCALL.
\n
"
,
desc
.
pool
);
return
D3DERR_INVALIDCALL
;
}
if
(
desc
.
pool
!=
WINED3D_POOL_DEFAULT
&&
desc
.
pool
!=
WINED3D_POOL_SYSTEM_MEM
)
if
((
desc
.
usage
&
(
WINED3DUSAGE_RENDERTARGET
|
WINED3DUSAGE_TEXTURE
))
==
WINED3DUSAGE_TEXTURE
)
{
wined3d_mutex_unlock
();
WARN
(
"Colorfill is not allowed on non-RT textures, returning D3DERR_INVALIDCALL.
\n
"
);
return
D3DERR_INVALIDCALL
;
}
if
(
desc
.
usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
{
WARN
(
"Color-fill not allowed on surfaces in pool %#x.
\n
"
,
desc
.
pool
);
wined3d_mutex_unlock
();
WARN
(
"Colorfill is not allowed on depth stencil surfaces, returning D3DERR_INVALIDCALL.
\n
"
);
return
D3DERR_INVALIDCALL
;
}
...
...
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