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
1cfbc903
Commit
1cfbc903
authored
May 06, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add some surface flags.
parent
c7bb8bd4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
48 deletions
+84
-48
device.c
dlls/wined3d/device.c
+8
-7
surface.c
dlls/wined3d/surface.c
+41
-31
wined3d_private.h
dlls/wined3d/wined3d_private.h
+35
-10
No files found.
dlls/wined3d/device.c
View file @
1cfbc903
...
...
@@ -702,9 +702,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid
/* Internal data */
object
->
pow2Width
=
pow2Width
;
object
->
pow2Height
=
pow2Height
;
object
->
nonpow2
=
(
pow2Width
!=
Width
||
pow2Height
!=
Height
)
?
TRUE
:
FALSE
;
object
->
discard
=
Discard
;
object
->
activeLock
=
FALSE
;
/* Flags */
object
->
Flags
=
0
;
/* We start without flags set */
object
->
Flags
|=
(
pow2Width
!=
Width
||
pow2Height
!=
Height
)
?
SFLAG_NONPOW2
:
0
;
object
->
Flags
|=
Discard
?
SFLAG_DISCARD
:
0
;
object
->
Flags
|=
(
WINED3DFMT_D16_LOCKABLE
==
Format
)
?
SFLAG_LOCKABLE
:
0
;
object
->
Flags
|=
Lockable
?
SFLAG_LOCKABLE
:
0
;
if
(
WINED3DFMT_UNKNOWN
!=
Format
)
{
object
->
bytesPerPixel
=
D3DFmtGetBpp
(
This
,
Format
);
...
...
@@ -751,10 +756,6 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid
FIXME
(
"Trying to create a render target that isn't in the default pool
\n
"
);
}
object
->
locked
=
FALSE
;
object
->
lockable
=
(
WINED3DFMT_D16_LOCKABLE
==
Format
)
?
TRUE
:
Lockable
;
/* mark the texture as dirty so that it get's loaded first time around*/
IWineD3DSurface_AddDirtyRect
(
*
ppSurface
,
NULL
);
TRACE
(
"(%p) : w(%d) h(%d) fmt(%d,%s) lockable(%d) surf@%p, surfmem@%p, %d bytes
\n
"
,
...
...
dlls/wined3d/surface.c
View file @
1cfbc903
This diff is collapsed.
Click to expand it.
dlls/wined3d/wined3d_private.h
View file @
1cfbc903
...
...
@@ -836,7 +836,7 @@ struct IWineD3DSurfaceImpl
UINT
bytesPerPixel
;
/* TODO: move this off into a management class(maybe!) */
BOOL
nonpow2
;
WORD
Flags
;
UINT
pow2Width
;
UINT
pow2Height
;
...
...
@@ -848,23 +848,48 @@ struct IWineD3DSurfaceImpl
float pow2scalingFactorY; /* = (Height / pow2Height) */
#endif
BOOL
lockable
;
BOOL
discard
;
BOOL
locked
;
BOOL
activeLock
;
RECT
lockedRect
;
RECT
dirtyRect
;
BOOL
Dirty
;
BOOL
inTexture
;
BOOL
inPBuffer
;
glDescriptor
glDescription
;
};
extern
const
IWineD3DSurfaceVtbl
IWineD3DSurface_Vtbl
;
/* Surface flags: */
#define SFLAG_OVERSIZE 0x0001
/* Surface is bigger than gl size, blts only */
#define SFLAG_CONVERTED 0x0002
/* Converted for color keying or Palettized */
#define SFLAG_DIBSECTION 0x0004
/* Has a DIB section attached for getdc */
#define SFLAG_DIRTY 0x0008
/* Surface was locked by the app */
#define SFLAG_LOCKABLE 0x0010
/* Surface can be locked */
#define SFLAG_DISCARD 0x0020
/* ??? */
#define SFLAG_LOCKED 0x0040
/* Surface is locked atm */
#define SFLAG_ACTIVELOCK 0x0080
/* Not locked, but surface memory is needed */
#define SFLAG_INTEXTURE 0x0100
/* ??? */
#define SFLAG_INPBUFFER 0x0200
/* ??? */
#define SFLAG_NONPOW2 0x0400
/* Surface sizes are not a power of 2 */
#define SFLAG_DYNLOCK 0x0800
/* Surface is often locked by the app */
#define SFLAG_DYNCHANGE 0x1800
/* Surface contents are changed very often, implies DYNLOCK */
/* In some conditions the surface memory must not be freed:
* SFLAG_OVERSIZE: Not all data can be kept in GL
* SFLAG_CONVERTED: Converting the data back would take too long
* SFLAG_DIBSECTION: The dib code manages the memory
* SFLAG_DIRTY: GL surface isn't up to date
* SFLAG_LOCKED: The app requires access to the surface data
* SFLAG_ACTIVELOCK: Some wined3d code needs the memory
* SFLAG_DYNLOCK: Avoid freeing the data for performance
* SFLAG_DYNCHANGE: Same reason as DYNLOCK
*/
#define SFLAG_DONOTFREE (SFLAG_OVERSIZE | \
SFLAG_CONVERTED | \
SFLAG_DIBSECTION | \
SFLAG_DIRTY | \
SFLAG_LOCKED | \
SFLAG_ACTIVELOCK | \
SFLAG_DYNLOCK | \
SFLAG_DYNCHANGE )
/*****************************************************************************
* IWineD3DVertexDeclaration implementation structure
*/
...
...
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