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
7438e42f
Commit
7438e42f
authored
Jan 25, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Do checks at the start of surface_init() (LLVM/Clang).
parent
ccba04e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
40 deletions
+40
-40
surface.c
dlls/wined3d/surface.c
+40
-40
No files found.
dlls/wined3d/surface.c
View file @
7438e42f
...
...
@@ -431,6 +431,46 @@ HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type,
multisample_quality
=
0
;
}
/* Quick lockable sanity check.
* TODO: remove this after surfaces, usage and lockability have been debugged properly
* this function is too deep to need to care about things like this.
* Levels need to be checked too, since they all affect what can be done. */
switch
(
pool
)
{
case
WINED3DPOOL_SCRATCH
:
if
(
!
lockable
)
{
FIXME
(
"Called with a pool of SCRATCH and a lockable of FALSE "
"which are mutually exclusive, setting lockable to TRUE.
\n
"
);
lockable
=
TRUE
;
}
break
;
case
WINED3DPOOL_SYSTEMMEM
:
if
(
!
lockable
)
FIXME
(
"Called with a pool of SYSTEMMEM and a lockable of FALSE, this is acceptable but unexpected.
\n
"
);
break
;
case
WINED3DPOOL_MANAGED
:
if
(
usage
&
WINED3DUSAGE_DYNAMIC
)
FIXME
(
"Called with a pool of MANAGED and a usage of DYNAMIC which are mutually exclusive.
\n
"
);
break
;
case
WINED3DPOOL_DEFAULT
:
if
(
lockable
&&
!
(
usage
&
(
WINED3DUSAGE_DYNAMIC
|
WINED3DUSAGE_RENDERTARGET
|
WINED3DUSAGE_DEPTHSTENCIL
)))
WARN
(
"Creating a lockable surface with a POOL of DEFAULT, that doesn't specify DYNAMIC usage.
\n
"
);
break
;
default:
FIXME
(
"Unknown pool %#x.
\n
"
,
pool
);
break
;
};
if
(
usage
&
WINED3DUSAGE_RENDERTARGET
&&
pool
!=
WINED3DPOOL_DEFAULT
)
{
FIXME
(
"Trying to create a render target that isn't in the default pool.
\n
"
);
}
/* FIXME: Check that the format is supported by the device. */
resource_size
=
wined3d_format_calculate_size
(
format
,
alignment
,
width
,
height
);
...
...
@@ -477,46 +517,6 @@ HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type,
if
(
discard
)
surface
->
flags
|=
SFLAG_DISCARD
;
if
(
lockable
||
format_id
==
WINED3DFMT_D16_LOCKABLE
)
surface
->
flags
|=
SFLAG_LOCKABLE
;
/* Quick lockable sanity check.
* TODO: remove this after surfaces, usage and lockability have been debugged properly
* this function is too deep to need to care about things like this.
* Levels need to be checked too, since they all affect what can be done. */
switch
(
pool
)
{
case
WINED3DPOOL_SCRATCH
:
if
(
!
lockable
)
{
FIXME
(
"Called with a pool of SCRATCH and a lockable of FALSE "
"which are mutually exclusive, setting lockable to TRUE.
\n
"
);
lockable
=
TRUE
;
}
break
;
case
WINED3DPOOL_SYSTEMMEM
:
if
(
!
lockable
)
FIXME
(
"Called with a pool of SYSTEMMEM and a lockable of FALSE, this is acceptable but unexpected.
\n
"
);
break
;
case
WINED3DPOOL_MANAGED
:
if
(
usage
&
WINED3DUSAGE_DYNAMIC
)
FIXME
(
"Called with a pool of MANAGED and a usage of DYNAMIC which are mutually exclusive.
\n
"
);
break
;
case
WINED3DPOOL_DEFAULT
:
if
(
lockable
&&
!
(
usage
&
(
WINED3DUSAGE_DYNAMIC
|
WINED3DUSAGE_RENDERTARGET
|
WINED3DUSAGE_DEPTHSTENCIL
)))
WARN
(
"Creating a lockable surface with a POOL of DEFAULT, that doesn't specify DYNAMIC usage.
\n
"
);
break
;
default:
FIXME
(
"Unknown pool %#x.
\n
"
,
pool
);
break
;
};
if
(
usage
&
WINED3DUSAGE_RENDERTARGET
&&
pool
!=
WINED3DPOOL_DEFAULT
)
{
FIXME
(
"Trying to create a render target that isn't in the default pool.
\n
"
);
}
/* Mark the texture as dirty so that it gets loaded first time around. */
surface_add_dirty_rect
(
surface
,
NULL
);
list_init
(
&
surface
->
renderbuffers
);
...
...
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