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
d75fd75d
Commit
d75fd75d
authored
Mar 28, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add WINED3DPOOL to wined3d_types.h.
parent
8358c63e
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
98 additions
and
89 deletions
+98
-89
cubetexture.c
dlls/d3d8/cubetexture.c
+1
-1
d3d8_private.h
dlls/d3d8/d3d8_private.h
+2
-2
device.c
dlls/d3d8/device.c
+8
-8
surface.c
dlls/d3d8/surface.c
+1
-1
texture.c
dlls/d3d8/texture.c
+1
-1
volume.c
dlls/d3d8/volume.c
+2
-2
volumetexture.c
dlls/d3d8/volumetexture.c
+1
-1
cubetexture.c
dlls/d3d9/cubetexture.c
+2
-2
d3d9_private.h
dlls/d3d9/d3d9_private.h
+2
-2
device.c
dlls/d3d9/device.c
+5
-5
indexbuffer.c
dlls/d3d9/indexbuffer.c
+1
-1
surface.c
dlls/d3d9/surface.c
+1
-1
texture.c
dlls/d3d9/texture.c
+2
-2
vertexbuffer.c
dlls/d3d9/vertexbuffer.c
+1
-1
volume.c
dlls/d3d9/volume.c
+2
-2
volumetexture.c
dlls/d3d9/volumetexture.c
+2
-2
basetexture.c
dlls/wined3d/basetexture.c
+3
-3
device.c
dlls/wined3d/device.c
+27
-27
resource.c
dlls/wined3d/resource.c
+1
-1
surface.c
dlls/wined3d/surface.c
+3
-3
utils.c
dlls/wined3d/utils.c
+6
-6
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
wined3d_interface.h
include/wine/wined3d_interface.h
+9
-9
wined3d_types.h
include/wine/wined3d_types.h
+13
-4
No files found.
dlls/d3d8/cubetexture.c
View file @
d75fd75d
...
...
@@ -142,7 +142,7 @@ HRESULT WINAPI IDirect3DCubeTexture8Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE8 ifa
wined3ddesc
.
Format
=
(
WINED3DFORMAT
*
)
&
pDesc
->
Format
;
wined3ddesc
.
Type
=
(
WINED3DRESOURCETYPE
*
)
&
pDesc
->
Type
;
wined3ddesc
.
Usage
=
&
pDesc
->
Usage
;
wined3ddesc
.
Pool
=
&
pDesc
->
Pool
;
wined3ddesc
.
Pool
=
(
WINED3DPOOL
*
)
&
pDesc
->
Pool
;
wined3ddesc
.
Size
=
&
tmpInt
;
wined3ddesc
.
MultiSampleType
=
(
WINED3DMULTISAMPLE_TYPE
*
)
&
pDesc
->
MultiSampleType
;
wined3ddesc
.
MultiSampleQuality
=
NULL
;
/* DirectX9 only */
...
...
dlls/d3d8/d3d8_private.h
View file @
d75fd75d
...
...
@@ -560,11 +560,11 @@ typedef struct IDirect3DPixelShader8Impl {
/* Callbacks */
extern
HRESULT
WINAPI
D3D8CB_CreateSurface
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
DWORD
Usage
,
D3DPOOL
Pool
,
UINT
Level
,
WINED3DFORMAT
Format
,
DWORD
Usage
,
WINE
D3DPOOL
Pool
,
UINT
Level
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
);
extern
HRESULT
WINAPI
D3D8CB_CreateVolume
(
IUnknown
*
pDevice
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
WINED3DFORMAT
Format
,
D3DPOOL
Pool
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
WINE
D3DPOOL
Pool
,
DWORD
Usage
,
IWineD3DVolume
**
ppVolume
,
HANDLE
*
pSharedHandle
);
...
...
dlls/d3d8/device.c
View file @
d75fd75d
...
...
@@ -303,7 +303,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateTexture(LPDIRECT3DDEVICE8 iface, UINT
object
->
lpVtbl
=
&
Direct3DTexture8_Vtbl
;
object
->
ref
=
1
;
hrc
=
IWineD3DDevice_CreateTexture
(
This
->
WineD3DDevice
,
Width
,
Height
,
Levels
,
Usage
,
(
WINED3DFORMAT
)
Format
,
Pool
,
&
object
->
wineD3DTexture
,
NULL
,
(
IUnknown
*
)
object
,
D3D8CB_CreateSurface
);
(
WINED3DFORMAT
)
Format
,
(
WINED3DPOOL
)
Pool
,
&
object
->
wineD3DTexture
,
NULL
,
(
IUnknown
*
)
object
,
D3D8CB_CreateSurface
);
if
(
FAILED
(
hrc
))
{
/* free up object */
...
...
@@ -339,7 +339,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateVolumeTexture(LPDIRECT3DDEVICE8 iface,
object
->
lpVtbl
=
&
Direct3DVolumeTexture8_Vtbl
;
object
->
ref
=
1
;
hrc
=
IWineD3DDevice_CreateVolumeTexture
(
This
->
WineD3DDevice
,
Width
,
Height
,
Depth
,
Levels
,
Usage
,
(
WINED3DFORMAT
)
Format
,
Pool
,
&
object
->
wineD3DVolumeTexture
,
NULL
,
(
WINED3DFORMAT
)
Format
,
(
WINED3DPOOL
)
Pool
,
&
object
->
wineD3DVolumeTexture
,
NULL
,
(
IUnknown
*
)
object
,
D3D8CB_CreateVolume
);
if
(
hrc
!=
D3D_OK
)
{
...
...
@@ -376,7 +376,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateCubeTexture(LPDIRECT3DDEVICE8 iface, U
object
->
lpVtbl
=
&
Direct3DCubeTexture8_Vtbl
;
object
->
ref
=
1
;
hr
=
IWineD3DDevice_CreateCubeTexture
(
This
->
WineD3DDevice
,
EdgeLength
,
Levels
,
Usage
,
(
WINED3DFORMAT
)
Format
,
Pool
,
&
object
->
wineD3DCubeTexture
,
NULL
,
(
IUnknown
*
)
object
,
(
WINED3DFORMAT
)
Format
,
(
WINED3DPOOL
)
Pool
,
&
object
->
wineD3DCubeTexture
,
NULL
,
(
IUnknown
*
)
object
,
D3D8CB_CreateSurface
);
if
(
hr
!=
D3D_OK
){
...
...
@@ -408,7 +408,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateVertexBuffer(LPDIRECT3DDEVICE8 iface,
object
->
lpVtbl
=
&
Direct3DVertexBuffer8_Vtbl
;
object
->
ref
=
1
;
hrc
=
IWineD3DDevice_CreateVertexBuffer
(
This
->
WineD3DDevice
,
Size
,
Usage
,
FVF
,
Pool
,
&
(
object
->
wineD3DVertexBuffer
),
NULL
,
(
IUnknown
*
)
object
);
hrc
=
IWineD3DDevice_CreateVertexBuffer
(
This
->
WineD3DDevice
,
Size
,
Usage
,
FVF
,
(
WINED3DPOOL
)
Pool
,
&
(
object
->
wineD3DVertexBuffer
),
NULL
,
(
IUnknown
*
)
object
);
if
(
D3D_OK
!=
hrc
)
{
...
...
@@ -439,7 +439,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateIndexBuffer(LPDIRECT3DDEVICE8 iface, U
object
->
lpVtbl
=
&
Direct3DIndexBuffer8_Vtbl
;
object
->
ref
=
1
;
TRACE
(
"Calling wined3d create index buffer
\n
"
);
hrc
=
IWineD3DDevice_CreateIndexBuffer
(
This
->
WineD3DDevice
,
Length
,
Usage
,
Format
,
Pool
,
&
object
->
wineD3DIndexBuffer
,
NULL
,
(
IUnknown
*
)
object
);
hrc
=
IWineD3DDevice_CreateIndexBuffer
(
This
->
WineD3DDevice
,
Length
,
Usage
,
Format
,
(
WINED3DPOOL
)
Pool
,
&
object
->
wineD3DIndexBuffer
,
NULL
,
(
IUnknown
*
)
object
);
if
(
D3D_OK
!=
hrc
)
{
...
...
@@ -487,7 +487,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateSurface(LPDIRECT3DDEVICE8 iface, UINT
TRACE
(
"(%p) : w(%d) h(%d) fmt(%d) surf@%p
\n
"
,
This
,
Width
,
Height
,
Format
,
*
ppSurface
);
hrc
=
IWineD3DDevice_CreateSurface
(
This
->
WineD3DDevice
,
Width
,
Height
,
Format
,
Lockable
,
Discard
,
Level
,
&
object
->
wineD3DSurface
,
Type
,
Usage
,
Pool
,
MultiSample
,
MultisampleQuality
,
NULL
,(
IUnknown
*
)
object
);
hrc
=
IWineD3DDevice_CreateSurface
(
This
->
WineD3DDevice
,
Width
,
Height
,
Format
,
Lockable
,
Discard
,
Level
,
&
object
->
wineD3DSurface
,
Type
,
Usage
,
(
WINED3DPOOL
)
Pool
,
MultiSample
,
MultisampleQuality
,
NULL
,(
IUnknown
*
)
object
);
if
(
hrc
!=
D3D_OK
||
NULL
==
object
->
wineD3DSurface
)
{
/* free up object */
FIXME
(
"(%p) call to IWineD3DDevice_CreateSurface failed
\n
"
,
This
);
...
...
@@ -1471,14 +1471,14 @@ const IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl =
/* Internal function called back during the CreateDevice to create a render target */
HRESULT
WINAPI
D3D8CB_CreateSurface
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
DWORD
Usage
,
D3DPOOL
Pool
,
UINT
Level
,
WINED3DFORMAT
Format
,
DWORD
Usage
,
WINE
D3DPOOL
Pool
,
UINT
Level
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
)
{
HRESULT
res
=
D3D_OK
;
IDirect3DSurface8Impl
*
d3dSurface
=
NULL
;
BOOL
Lockable
=
TRUE
;
if
((
D3DPOOL_DEFAULT
==
Pool
&&
D3DUSAGE_DYNAMIC
!=
Usage
))
if
((
WINED3DPOOL_DEFAULT
==
Pool
&&
WINE
D3DUSAGE_DYNAMIC
!=
Usage
))
Lockable
=
FALSE
;
TRACE
(
"relay
\n
"
);
...
...
dlls/d3d8/surface.c
View file @
d75fd75d
...
...
@@ -164,7 +164,7 @@ HRESULT WINAPI IDirect3DSurface8Impl_GetDesc(LPDIRECT3DSURFACE8 iface, D3DSURFAC
wined3ddesc
.
Format
=
(
WINED3DFORMAT
*
)
&
pDesc
->
Format
;
wined3ddesc
.
Type
=
(
WINED3DRESOURCETYPE
*
)
&
pDesc
->
Type
;
wined3ddesc
.
Usage
=
&
pDesc
->
Usage
;
wined3ddesc
.
Pool
=
&
pDesc
->
Pool
;
wined3ddesc
.
Pool
=
(
WINED3DPOOL
*
)
&
pDesc
->
Pool
;
wined3ddesc
.
Size
=
&
tmpInt
;
wined3ddesc
.
MultiSampleType
=
(
WINED3DMULTISAMPLE_TYPE
*
)
&
pDesc
->
MultiSampleType
;
wined3ddesc
.
Width
=
&
pDesc
->
Width
;
...
...
dlls/d3d8/texture.c
View file @
d75fd75d
...
...
@@ -143,7 +143,7 @@ HRESULT WINAPI IDirect3DTexture8Impl_GetLevelDesc(LPDIRECT3DTEXTURE8 iface, UINT
wined3ddesc
.
Format
=
(
WINED3DFORMAT
*
)
&
pDesc
->
Format
;
wined3ddesc
.
Type
=
(
WINED3DRESOURCETYPE
*
)
&
pDesc
->
Type
;
wined3ddesc
.
Usage
=
&
pDesc
->
Usage
;
wined3ddesc
.
Pool
=
&
pDesc
->
Pool
;
wined3ddesc
.
Pool
=
(
WINED3DPOOL
*
)
&
pDesc
->
Pool
;
wined3ddesc
.
Size
=
&
tmpInt
;
/* required for d3d8 */
wined3ddesc
.
MultiSampleType
=
(
WINED3DMULTISAMPLE_TYPE
*
)
&
pDesc
->
MultiSampleType
;
wined3ddesc
.
Width
=
&
pDesc
->
Width
;
...
...
dlls/d3d8/volume.c
View file @
d75fd75d
...
...
@@ -140,7 +140,7 @@ HRESULT WINAPI IDirect3DVolume8Impl_GetDesc(LPDIRECT3DVOLUME8 iface, D3DVOLUME_D
wined3ddesc
.
Format
=
(
WINED3DFORMAT
*
)
&
pDesc
->
Format
;
wined3ddesc
.
Type
=
(
WINED3DRESOURCETYPE
*
)
&
pDesc
->
Type
;
wined3ddesc
.
Usage
=
&
pDesc
->
Usage
;
wined3ddesc
.
Pool
=
&
pDesc
->
Pool
;
wined3ddesc
.
Pool
=
(
WINED3DPOOL
*
)
&
pDesc
->
Pool
;
wined3ddesc
.
Size
=
&
tmpInt
;
wined3ddesc
.
Width
=
&
pDesc
->
Width
;
wined3ddesc
.
Height
=
&
pDesc
->
Height
;
...
...
@@ -181,7 +181,7 @@ const IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl =
/* Internal function called back during the CreateVolumeTexture */
HRESULT
WINAPI
D3D8CB_CreateVolume
(
IUnknown
*
pDevice
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
WINED3DFORMAT
Format
,
D3DPOOL
Pool
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
WINE
D3DPOOL
Pool
,
DWORD
Usage
,
IWineD3DVolume
**
ppVolume
,
HANDLE
*
pSharedHandle
)
{
IDirect3DVolume8Impl
*
object
;
...
...
dlls/d3d8/volumetexture.c
View file @
d75fd75d
...
...
@@ -142,7 +142,7 @@ HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE8
wined3ddesc
.
Format
=
(
WINED3DFORMAT
*
)
&
pDesc
->
Format
;
wined3ddesc
.
Type
=
(
WINED3DRESOURCETYPE
*
)
&
pDesc
->
Type
;
wined3ddesc
.
Usage
=
&
pDesc
->
Usage
;
wined3ddesc
.
Pool
=
&
pDesc
->
Pool
;
wined3ddesc
.
Pool
=
(
WINED3DPOOL
*
)
&
pDesc
->
Pool
;
wined3ddesc
.
Size
=
&
tmpInt
;
wined3ddesc
.
Width
=
&
pDesc
->
Width
;
wined3ddesc
.
Height
=
&
pDesc
->
Height
;
...
...
dlls/d3d9/cubetexture.c
View file @
d75fd75d
...
...
@@ -163,7 +163,7 @@ HRESULT WINAPI IDirect3DCubeTexture9Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE9 ifa
wined3ddesc
.
Format
=
(
WINED3DFORMAT
*
)
&
pDesc
->
Format
;
wined3ddesc
.
Type
=
(
WINED3DRESOURCETYPE
*
)
&
pDesc
->
Type
;
wined3ddesc
.
Usage
=
&
pDesc
->
Usage
;
wined3ddesc
.
Pool
=
&
pDesc
->
Pool
;
wined3ddesc
.
Pool
=
(
WINED3DPOOL
*
)
&
pDesc
->
Pool
;
wined3ddesc
.
Size
=
&
tmpInt
;
wined3ddesc
.
MultiSampleType
=
(
WINED3DMULTISAMPLE_TYPE
*
)
&
pDesc
->
MultiSampleType
;
wined3ddesc
.
MultiSampleQuality
=
&
pDesc
->
MultiSampleQuality
;
...
...
@@ -261,7 +261,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(LPDIRECT3DDEVICE9 iface,
object
->
lpVtbl
=
&
Direct3DCubeTexture9_Vtbl
;
object
->
ref
=
1
;
hr
=
IWineD3DDevice_CreateCubeTexture
(
This
->
WineD3DDevice
,
EdgeLength
,
Levels
,
Usage
,
(
WINED3DFORMAT
)
Format
,
Pool
,
&
object
->
wineD3DCubeTexture
,
pSharedHandle
,
(
IUnknown
*
)
object
,
(
WINED3DFORMAT
)
Format
,
(
WINED3DPOOL
)
Pool
,
&
object
->
wineD3DCubeTexture
,
pSharedHandle
,
(
IUnknown
*
)
object
,
D3D9CB_CreateSurface
);
if
(
hr
!=
D3D_OK
){
...
...
dlls/d3d9/d3d9_private.h
View file @
d75fd75d
...
...
@@ -609,11 +609,11 @@ typedef struct IDirect3DQuery9Impl {
/* Callbacks */
extern
HRESULT
WINAPI
D3D9CB_CreateSurface
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
DWORD
Usage
,
D3DPOOL
Pool
,
UINT
Level
,
WINED3DFORMAT
Format
,
DWORD
Usage
,
WINE
D3DPOOL
Pool
,
UINT
Level
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
);
extern
HRESULT
WINAPI
D3D9CB_CreateVolume
(
IUnknown
*
pDevice
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
WINED3DFORMAT
Format
,
D3DPOOL
Pool
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
WINE
D3DPOOL
Pool
,
DWORD
Usage
,
IWineD3DVolume
**
ppVolume
,
HANDLE
*
pSharedHandle
);
...
...
dlls/d3d9/device.c
View file @
d75fd75d
...
...
@@ -234,7 +234,7 @@ void WINAPI IDirect3DDevice9Impl_GetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwa
}
HRESULT
WINAPI
IDirect3DDevice9Impl_CreateSurface
(
LPDIRECT3DDEVICE9
iface
,
UINT
Width
,
UINT
Height
,
D3DFORMAT
Format
,
BOOL
Lockable
,
BOOL
Discard
,
UINT
Level
,
IDirect3DSurface9
**
ppSurface
,
D3DRESOURCETYPE
Type
,
UINT
Usage
,
D3DPOOL
Pool
,
D3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
HANDLE
*
pSharedHandle
)
{
HRESULT
WINAPI
IDirect3DDevice9Impl_CreateSurface
(
LPDIRECT3DDEVICE9
iface
,
UINT
Width
,
UINT
Height
,
D3DFORMAT
Format
,
BOOL
Lockable
,
BOOL
Discard
,
UINT
Level
,
IDirect3DSurface9
**
ppSurface
,
D3DRESOURCETYPE
Type
,
UINT
Usage
,
D3DPOOL
Pool
,
D3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
HANDLE
*
pSharedHandle
)
{
HRESULT
hrc
;
IDirect3DSurface9Impl
*
object
;
IDirect3DDevice9Impl
*
This
=
(
IDirect3DDevice9Impl
*
)
iface
;
...
...
@@ -268,7 +268,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateSurface(LPDIRECT3DDEVICE9 iface, UINT
TRACE
(
"(%p) : w(%d) h(%d) fmt(%d) surf@%p
\n
"
,
This
,
Width
,
Height
,
Format
,
*
ppSurface
);
hrc
=
IWineD3DDevice_CreateSurface
(
This
->
WineD3DDevice
,
Width
,
Height
,
Format
,
Lockable
,
Discard
,
Level
,
&
object
->
wineD3DSurface
,
Type
,
Usage
,
Pool
,
MultiSample
,
MultisampleQuality
,
pSharedHandle
,(
IUnknown
*
)
object
);
hrc
=
IWineD3DDevice_CreateSurface
(
This
->
WineD3DDevice
,
Width
,
Height
,
Format
,
Lockable
,
Discard
,
Level
,
&
object
->
wineD3DSurface
,
Type
,
Usage
,
(
WINED3DPOOL
)
Pool
,
MultiSample
,
MultisampleQuality
,
pSharedHandle
,(
IUnknown
*
)
object
);
if
(
hrc
!=
D3D_OK
||
NULL
==
object
->
wineD3DSurface
)
{
...
...
@@ -368,7 +368,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateOffscreenPlainSurface(LPDIRECT3DDEVI
Why, their always lockable?
should I change the usage to dynamic?
*/
return
IDirect3DDevice9Impl_CreateSurface
(
iface
,
Width
,
Height
,
Format
,
TRUE
/*Loackable*/
,
FALSE
/*Discard*/
,
0
/*Level*/
,
ppSurface
,
D3DRTYPE_SURFACE
,
0
/*Usage (undefined/none)*/
,
Pool
,
D3DMULTISAMPLE_NONE
,
0
/*MultisampleQuality*/
,
pSharedHandle
);
return
IDirect3DDevice9Impl_CreateSurface
(
iface
,
Width
,
Height
,
Format
,
TRUE
/*Loackable*/
,
FALSE
/*Discard*/
,
0
/*Level*/
,
ppSurface
,
D3DRTYPE_SURFACE
,
0
/*Usage (undefined/none)*/
,
(
WINED3DPOOL
)
Pool
,
D3DMULTISAMPLE_NONE
,
0
/*MultisampleQuality*/
,
pSharedHandle
);
}
/* TODO: move to wineD3D */
...
...
@@ -939,7 +939,7 @@ const IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl =
/* Internal function called back during the CreateDevice to create a render target */
HRESULT
WINAPI
D3D9CB_CreateSurface
(
IUnknown
*
device
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
DWORD
Usage
,
D3DPOOL
Pool
,
UINT
Level
,
WINED3DFORMAT
Format
,
DWORD
Usage
,
WINE
D3DPOOL
Pool
,
UINT
Level
,
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
)
{
HRESULT
res
=
D3D_OK
;
...
...
@@ -950,7 +950,7 @@ HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, UINT Width, UINT Height,
Lockable
=
FALSE
;
TRACE
(
"relay
\n
"
);
res
=
IDirect3DDevice9Impl_CreateSurface
((
IDirect3DDevice9
*
)
device
,
Width
,
Height
,
(
D3DFORMAT
)
Format
,
Lockable
,
FALSE
/*Discard*/
,
Level
,
(
IDirect3DSurface9
**
)
&
d3dSurface
,
D3DRTYPE_SURFACE
,
Usage
,
Pool
,
D3DMULTISAMPLE_NONE
,
0
/* MultisampleQuality */
,
pSharedHandle
);
res
=
IDirect3DDevice9Impl_CreateSurface
((
IDirect3DDevice9
*
)
device
,
Width
,
Height
,
(
D3DFORMAT
)
Format
,
Lockable
,
FALSE
/*Discard*/
,
Level
,
(
IDirect3DSurface9
**
)
&
d3dSurface
,
D3DRTYPE_SURFACE
,
Usage
,
(
D3DPOOL
)
Pool
,
D3DMULTISAMPLE_NONE
,
0
/* MultisampleQuality */
,
pSharedHandle
);
if
(
res
==
D3D_OK
)
{
*
ppSurface
=
d3dSurface
->
wineD3DSurface
;
...
...
dlls/d3d9/indexbuffer.c
View file @
d75fd75d
...
...
@@ -173,7 +173,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(LPDIRECT3DDEVICE9 iface,
object
->
lpVtbl
=
&
Direct3DIndexBuffer9_Vtbl
;
object
->
ref
=
1
;
TRACE
(
"Calling wined3d create index buffer
\n
"
);
hrc
=
IWineD3DDevice_CreateIndexBuffer
(
This
->
WineD3DDevice
,
Length
,
Usage
,
Format
,
Pool
,
&
object
->
wineD3DIndexBuffer
,
pSharedHandle
,
(
IUnknown
*
)
object
);
hrc
=
IWineD3DDevice_CreateIndexBuffer
(
This
->
WineD3DDevice
,
Length
,
Usage
,
Format
,
(
WINED3DPOOL
)
Pool
,
&
object
->
wineD3DIndexBuffer
,
pSharedHandle
,
(
IUnknown
*
)
object
);
if
(
hrc
!=
D3D_OK
)
{
/* free up object */
...
...
dlls/d3d9/surface.c
View file @
d75fd75d
...
...
@@ -183,7 +183,7 @@ HRESULT WINAPI IDirect3DSurface9Impl_GetDesc(LPDIRECT3DSURFACE9 iface, D3DSURFAC
wined3ddesc
.
Format
=
(
WINED3DFORMAT
*
)
&
pDesc
->
Format
;
wined3ddesc
.
Type
=
(
WINED3DRESOURCETYPE
*
)
&
pDesc
->
Type
;
wined3ddesc
.
Usage
=
&
pDesc
->
Usage
;
wined3ddesc
.
Pool
=
&
pDesc
->
Pool
;
wined3ddesc
.
Pool
=
(
WINED3DPOOL
*
)
&
pDesc
->
Pool
;
wined3ddesc
.
Size
=
&
tmpInt
;
wined3ddesc
.
MultiSampleType
=
(
WINED3DMULTISAMPLE_TYPE
*
)
&
pDesc
->
MultiSampleType
;
wined3ddesc
.
MultiSampleQuality
=
&
pDesc
->
MultiSampleQuality
;
...
...
dlls/d3d9/texture.c
View file @
d75fd75d
...
...
@@ -162,7 +162,7 @@ HRESULT WINAPI IDirect3DTexture9Impl_GetLevelDesc(LPDIRECT3DTEXTURE9 iface, UINT
wined3ddesc
.
Format
=
(
WINED3DFORMAT
*
)
&
pDesc
->
Format
;
wined3ddesc
.
Type
=
(
WINED3DRESOURCETYPE
*
)
&
pDesc
->
Type
;
wined3ddesc
.
Usage
=
&
pDesc
->
Usage
;
wined3ddesc
.
Pool
=
&
pDesc
->
Pool
;
wined3ddesc
.
Pool
=
(
WINED3DPOOL
*
)
&
pDesc
->
Pool
;
wined3ddesc
.
Size
=
&
tmpInt
;
/* required for d3d8 */
wined3ddesc
.
MultiSampleType
=
(
WINED3DMULTISAMPLE_TYPE
*
)
&
pDesc
->
MultiSampleType
;
wined3ddesc
.
MultiSampleQuality
=
&
pDesc
->
MultiSampleQuality
;
...
...
@@ -255,7 +255,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(LPDIRECT3DDEVICE9 iface, UIN
object
->
lpVtbl
=
&
Direct3DTexture9_Vtbl
;
object
->
ref
=
1
;
hrc
=
IWineD3DDevice_CreateTexture
(
This
->
WineD3DDevice
,
Width
,
Height
,
Levels
,
Usage
,
(
WINED3DFORMAT
)
Format
,
Pool
,
&
object
->
wineD3DTexture
,
pSharedHandle
,
(
IUnknown
*
)
object
,
D3D9CB_CreateSurface
);
(
WINED3DFORMAT
)
Format
,
(
WINED3DPOOL
)
Pool
,
&
object
->
wineD3DTexture
,
pSharedHandle
,
(
IUnknown
*
)
object
,
D3D9CB_CreateSurface
);
if
(
FAILED
(
hrc
))
{
...
...
dlls/d3d9/vertexbuffer.c
View file @
d75fd75d
...
...
@@ -172,7 +172,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexBuffer(LPDIRECT3DDEVICE9 iface,
object
->
lpVtbl
=
&
Direct3DVertexBuffer9_Vtbl
;
object
->
ref
=
1
;
hrc
=
IWineD3DDevice_CreateVertexBuffer
(
This
->
WineD3DDevice
,
Size
,
Usage
,
FVF
,
Pool
,
&
(
object
->
wineD3DVertexBuffer
),
pSharedHandle
,
(
IUnknown
*
)
object
);
hrc
=
IWineD3DDevice_CreateVertexBuffer
(
This
->
WineD3DDevice
,
Size
,
Usage
,
FVF
,
(
WINED3DPOOL
)
Pool
,
&
(
object
->
wineD3DVertexBuffer
),
pSharedHandle
,
(
IUnknown
*
)
object
);
if
(
hrc
!=
D3D_OK
)
{
...
...
dlls/d3d9/volume.c
View file @
d75fd75d
...
...
@@ -160,7 +160,7 @@ HRESULT WINAPI IDirect3DVolume9Impl_GetDesc(LPDIRECT3DVOLUME9 iface, D3DVOLUME_D
wined3ddesc
.
Format
=
(
WINED3DFORMAT
*
)
&
pDesc
->
Format
;
wined3ddesc
.
Type
=
(
WINED3DRESOURCETYPE
*
)
&
pDesc
->
Type
;
wined3ddesc
.
Usage
=
&
pDesc
->
Usage
;
wined3ddesc
.
Pool
=
&
pDesc
->
Pool
;
wined3ddesc
.
Pool
=
(
WINED3DPOOL
*
)
&
pDesc
->
Pool
;
wined3ddesc
.
Size
=
&
tmpInt
;
wined3ddesc
.
Width
=
&
pDesc
->
Width
;
wined3ddesc
.
Height
=
&
pDesc
->
Height
;
...
...
@@ -201,7 +201,7 @@ const IDirect3DVolume9Vtbl Direct3DVolume9_Vtbl =
/* Internal function called back during the CreateVolumeTexture */
HRESULT
WINAPI
D3D9CB_CreateVolume
(
IUnknown
*
pDevice
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
WINED3DFORMAT
Format
,
D3DPOOL
Pool
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
WINE
D3DPOOL
Pool
,
DWORD
Usage
,
IWineD3DVolume
**
ppVolume
,
HANDLE
*
pSharedHandle
)
{
IDirect3DVolume9Impl
*
object
;
...
...
dlls/d3d9/volumetexture.c
View file @
d75fd75d
...
...
@@ -161,7 +161,7 @@ HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE9
wined3ddesc
.
Format
=
(
WINED3DFORMAT
*
)
&
pDesc
->
Format
;
wined3ddesc
.
Type
=
(
WINED3DRESOURCETYPE
*
)
&
pDesc
->
Type
;
wined3ddesc
.
Usage
=
&
pDesc
->
Usage
;
wined3ddesc
.
Pool
=
&
pDesc
->
Pool
;
wined3ddesc
.
Pool
=
(
WINED3DPOOL
*
)
&
pDesc
->
Pool
;
wined3ddesc
.
Size
=
&
tmpInt
;
wined3ddesc
.
Width
=
&
pDesc
->
Width
;
wined3ddesc
.
Height
=
&
pDesc
->
Height
;
...
...
@@ -257,7 +257,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9 ifac
object
->
lpVtbl
=
&
Direct3DVolumeTexture9_Vtbl
;
object
->
ref
=
1
;
hrc
=
IWineD3DDevice_CreateVolumeTexture
(
This
->
WineD3DDevice
,
Width
,
Height
,
Depth
,
Levels
,
Usage
,
(
WINED3DFORMAT
)
Format
,
Pool
,
&
object
->
wineD3DVolumeTexture
,
pSharedHandle
,
(
WINED3DFORMAT
)
Format
,
(
WINED3DPOOL
)
Pool
,
&
object
->
wineD3DVolumeTexture
,
pSharedHandle
,
(
IUnknown
*
)
object
,
D3D9CB_CreateVolume
);
...
...
dlls/wined3d/basetexture.c
View file @
d75fd75d
...
...
@@ -153,7 +153,7 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_GetParent(IWineD3DBaseTexture *iface, IUn
DWORD
WINAPI
IWineD3DBaseTextureImpl_SetLOD
(
IWineD3DBaseTexture
*
iface
,
DWORD
LODNew
)
{
IWineD3DBaseTextureImpl
*
This
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
if
(
This
->
resource
.
pool
!=
D3DPOOL_MANAGED
)
{
if
(
This
->
resource
.
pool
!=
WINE
D3DPOOL_MANAGED
)
{
return
D3DERR_INVALIDCALL
;
}
...
...
@@ -169,7 +169,7 @@ DWORD WINAPI IWineD3DBaseTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LO
DWORD
WINAPI
IWineD3DBaseTextureImpl_GetLOD
(
IWineD3DBaseTexture
*
iface
)
{
IWineD3DBaseTextureImpl
*
This
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
if
(
This
->
resource
.
pool
!=
D3DPOOL_MANAGED
)
{
if
(
This
->
resource
.
pool
!=
WINE
D3DPOOL_MANAGED
)
{
return
D3DERR_INVALIDCALL
;
}
...
...
@@ -247,7 +247,7 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_BindTexture(IWineD3DBaseTexture *iface) {
glGenTextures
(
1
,
&
This
->
baseTexture
.
textureName
);
checkGLcall
(
"glGenTextures"
);
TRACE
(
"Generated texture %d
\n
"
,
This
->
baseTexture
.
textureName
);
if
(
This
->
resource
.
pool
==
D3DPOOL_DEFAULT
)
{
if
(
This
->
resource
.
pool
==
WINE
D3DPOOL_DEFAULT
)
{
/* Tell opengl to try and keep this texture in video ram (well mostly) */
GLclampf
tmp
;
tmp
=
0
.
9
f
;
...
...
dlls/wined3d/device.c
View file @
d75fd75d
...
...
@@ -90,7 +90,7 @@ static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *ifac
object->resource.usage = Usage; \
object->resource.size = _size; \
/* Check that we have enough video ram left */
\
if (Pool == D3DPOOL_DEFAULT) { \
if (Pool ==
WINE
D3DPOOL_DEFAULT) { \
if (IWineD3DDevice_GetAvailableTextureMem(iface) <= _size) { \
WARN("Out of 'bogus' video memory\n"); \
HeapFree(GetProcessHeap(), 0, object); \
...
...
@@ -99,8 +99,8 @@ static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *ifac
} \
globalChangeGlRam(_size); \
} \
object->resource.allocatedMemory = (0 == _size ? NULL : Pool == D3DPOOL_DEFAULT ? NULL : HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, _size)); \
if (object->resource.allocatedMemory == NULL && _size != 0 && Pool != D3DPOOL_DEFAULT) { \
object->resource.allocatedMemory = (0 == _size ? NULL : Pool ==
WINE
D3DPOOL_DEFAULT ? NULL : HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, _size)); \
if (object->resource.allocatedMemory == NULL && _size != 0 && Pool !=
WINE
D3DPOOL_DEFAULT) { \
FIXME("Out of memory!\n"); \
HeapFree(GetProcessHeap(), 0, object); \
*pp##type = NULL; \
...
...
@@ -462,7 +462,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetParent(IWineD3DDevice *iface, IUnknown **pP
}
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateVertexBuffer
(
IWineD3DDevice
*
iface
,
UINT
Size
,
DWORD
Usage
,
DWORD
FVF
,
D3DPOOL
Pool
,
IWineD3DVertexBuffer
**
ppVertexBuffer
,
HANDLE
*
sharedHandle
,
DWORD
FVF
,
WINE
D3DPOOL
Pool
,
IWineD3DVertexBuffer
**
ppVertexBuffer
,
HANDLE
*
sharedHandle
,
IUnknown
*
parent
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DVertexBufferImpl
*
object
;
...
...
@@ -470,7 +470,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, UINT
D3DCREATERESOURCEOBJECTINSTANCE
(
object
,
VertexBuffer
,
WINED3DRTYPE_VERTEXBUFFER
,
Size
)
/*TODO: use VBO's */
if
(
Pool
==
D3DPOOL_DEFAULT
)
{
/* Allocate some system memory for now */
if
(
Pool
==
WINE
D3DPOOL_DEFAULT
)
{
/* Allocate some system memory for now */
object
->
resource
.
allocatedMemory
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
object
->
resource
.
size
);
}
object
->
fvf
=
FVF
;
...
...
@@ -482,7 +482,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, UINT
}
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateIndexBuffer
(
IWineD3DDevice
*
iface
,
UINT
Length
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
D3DPOOL
Pool
,
IWineD3DIndexBuffer
**
ppIndexBuffer
,
WINED3DFORMAT
Format
,
WINE
D3DPOOL
Pool
,
IWineD3DIndexBuffer
**
ppIndexBuffer
,
HANDLE
*
sharedHandle
,
IUnknown
*
parent
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DIndexBufferImpl
*
object
;
...
...
@@ -492,7 +492,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface, UINT
D3DCREATERESOURCEOBJECTINSTANCE
(
object
,
IndexBuffer
,
WINED3DRTYPE_INDEXBUFFER
,
Length
)
/*TODO: use VBO's */
if
(
Pool
==
D3DPOOL_DEFAULT
)
{
/* Allocate some system memory for now */
if
(
Pool
==
WINE
D3DPOOL_DEFAULT
)
{
/* Allocate some system memory for now */
object
->
resource
.
allocatedMemory
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
object
->
resource
.
size
);
}
...
...
@@ -636,7 +636,7 @@ If this flag is set, the contents of the depth stencil buffer will be invalid af
******************************** */
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateSurface
(
IWineD3DDevice
*
iface
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
BOOL
Lockable
,
BOOL
Discard
,
UINT
Level
,
IWineD3DSurface
**
ppSurface
,
WINED3DRESOURCETYPE
Type
,
DWORD
Usage
,
D3DPOOL
Pool
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
)
{
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateSurface
(
IWineD3DDevice
*
iface
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
BOOL
Lockable
,
BOOL
Discard
,
UINT
Level
,
IWineD3DSurface
**
ppSurface
,
WINED3DRESOURCETYPE
Type
,
DWORD
Usage
,
WINE
D3DPOOL
Pool
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DSurfaceImpl
*
object
;
/*NOTE: impl ref allowed since this is a create function */
unsigned
int
pow2Width
,
pow2Height
;
...
...
@@ -768,28 +768,28 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid
/** TODO: change this into a texture transform matrix so that it's processed in hardware **/
TRACE
(
"Pool %d %d %d %d"
,
Pool
,
D3DPOOL_DEFAULT
,
D3DPOOL_MANAGED
,
D3DPOOL_SYSTEMMEM
);
TRACE
(
"Pool %d %d %d %d"
,
Pool
,
WINED3DPOOL_DEFAULT
,
WINED3DPOOL_MANAGED
,
WINE
D3DPOOL_SYSTEMMEM
);
/** Quick lockable sanity check TODO: remove this after surfaces, usage and locablility have been debugged properly
* this function is too deap to need to care about things like this.
* Levels need to be checked too, and possibly Type wince they all affect what can be done.
* ****************************************/
switch
(
Pool
)
{
case
D3DPOOL_SCRATCH
:
case
WINE
D3DPOOL_SCRATCH
:
if
(
Lockable
==
FALSE
)
FIXME
(
"Create suface called with a pool of SCRATCH and a Lockable of FALSE \
which are mutually exclusive, setting lockable to true
\n
"
);
Lockable
=
TRUE
;
break
;
case
D3DPOOL_SYSTEMMEM
:
case
WINE
D3DPOOL_SYSTEMMEM
:
if
(
Lockable
==
FALSE
)
FIXME
(
"Create surface called with a pool of SYSTEMMEM and a Lockable of FALSE, \
this is acceptable but unexpected (I can't know how the surface can be usable!)
\n
"
);
case
D3DPOOL_MANAGED
:
case
WINE
D3DPOOL_MANAGED
:
if
(
Usage
==
WINED3DUSAGE_DYNAMIC
)
FIXME
(
"Create surface called with a pool of MANAGED and a \
Usage of DYNAMIC which are mutually exclusive, not doing \
anything just telling you.
\n
"
);
break
;
case
D3DPOOL_DEFAULT
:
/*TODO: Create offscreen plain can cause this check to fail..., find out if it should */
case
WINE
D3DPOOL_DEFAULT
:
/*TODO: Create offscreen plain can cause this check to fail..., find out if it should */
if
(
!
(
Usage
&
WINED3DUSAGE_DYNAMIC
)
&&
!
(
Usage
&
WINED3DUSAGE_RENDERTARGET
)
&&
!
(
Usage
&&
WINED3DUSAGE_DEPTHSTENCIL
)
&&
Lockable
==
TRUE
)
FIXME
(
"Creating a surface with a POOL of DEFAULT with Locable true, that doesn't specify DYNAMIC usage.
\n
"
);
...
...
@@ -799,7 +799,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid
break
;
};
if
(
Usage
&
WINED3DUSAGE_RENDERTARGET
&&
Pool
!=
D3DPOOL_DEFAULT
)
{
if
(
Usage
&
WINED3DUSAGE_RENDERTARGET
&&
Pool
!=
WINE
D3DPOOL_DEFAULT
)
{
FIXME
(
"Trying to create a render target that isn't in the default pool
\n
"
);
}
...
...
@@ -817,7 +817,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid
}
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateTexture
(
IWineD3DDevice
*
iface
,
UINT
Width
,
UINT
Height
,
UINT
Levels
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
D3DPOOL
Pool
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
WINE
D3DPOOL
Pool
,
IWineD3DTexture
**
ppTexture
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
,
D3DCB_CREATESURFACEFN
D3DCB_CreateSurface
)
{
...
...
@@ -906,7 +906,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, UINT Wid
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateVolumeTexture
(
IWineD3DDevice
*
iface
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
UINT
Levels
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
D3DPOOL
Pool
,
WINED3DFORMAT
Format
,
WINE
D3DPOOL
Pool
,
IWineD3DVolumeTexture
**
ppVolumeTexture
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
,
D3DCB_CREATEVOLUMEFN
D3DCB_CreateVolume
)
{
...
...
@@ -978,7 +978,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface,
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateVolume
(
IWineD3DDevice
*
iface
,
UINT
Width
,
UINT
Height
,
UINT
Depth
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
D3DPOOL
Pool
,
WINED3DFORMAT
Format
,
WINE
D3DPOOL
Pool
,
IWineD3DVolume
**
ppVolume
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
)
{
...
...
@@ -1006,7 +1006,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVolume(IWineD3DDevice *iface,
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateCubeTexture
(
IWineD3DDevice
*
iface
,
UINT
EdgeLength
,
UINT
Levels
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
D3DPOOL
Pool
,
WINED3DFORMAT
Format
,
WINE
D3DPOOL
Pool
,
IWineD3DCubeTexture
**
ppCubeTexture
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
,
D3DCB_CREATESURFACEFN
D3DCB_CreateSurface
)
{
...
...
@@ -4678,11 +4678,11 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD Stage,
}
if
(
pTexture
!=
NULL
)
{
/* SetTexture isn't allowed on textures in D3DPOOL_SCRATCH; The same is
* the case for D3DPOOL_SYSTEMMEM textures unless WINED3DDEVCAPS_TEXTURESYSTEMMORY is set.
/* SetTexture isn't allowed on textures in
WINE
D3DPOOL_SCRATCH; The same is
* the case for
WINE
D3DPOOL_SYSTEMMEM textures unless WINED3DDEVCAPS_TEXTURESYSTEMMORY is set.
* We don't check the caps as GetDeviceCaps is inefficient and we don't set the cap anyway.
*/
if
(((
IWineD3DTextureImpl
*
)
pTexture
)
->
resource
.
pool
==
D3DPOOL_SCRATCH
||
((
IWineD3DTextureImpl
*
)
pTexture
)
->
resource
.
pool
==
D3DPOOL_SYSTEMMEM
)
{
if
(((
IWineD3DTextureImpl
*
)
pTexture
)
->
resource
.
pool
==
WINED3DPOOL_SCRATCH
||
((
IWineD3DTextureImpl
*
)
pTexture
)
->
resource
.
pool
==
WINE
D3DPOOL_SYSTEMMEM
)
{
WARN
(
"(%p) Attempt to set scratch texture rejected
\n
"
,
pTexture
);
return
D3DERR_INVALIDCALL
;
}
...
...
@@ -5503,7 +5503,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, IWineD3
WINED3DFORMAT
destFormat
,
srcFormat
;
UINT
destSize
;
int
destLeft
,
destTop
;
D3DPOOL
srcPool
,
destPool
;
WINE
D3DPOOL
srcPool
,
destPool
;
int
offset
=
0
;
int
rowoffset
=
0
;
/* how many bytes to add onto the end of a row to wraparound to the beginning of the next */
glDescriptor
*
glDescription
=
NULL
;
...
...
@@ -5529,7 +5529,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, IWineD3
IWineD3DSurface_GetDesc
(
pDestinationSurface
,
&
winedesc
);
if
(
srcPool
!=
D3DPOOL_SYSTEMMEM
||
destPool
!=
D3DPOOL_DEFAULT
){
if
(
srcPool
!=
WINED3DPOOL_SYSTEMMEM
||
destPool
!=
WINE
D3DPOOL_DEFAULT
){
WARN
(
"source %p must be SYSTEMMEM and dest %p must be DEFAULT, returning D3DERR_INVALIDCALL
\n
"
,
pSourceSurface
,
pDestinationSurface
);
return
D3DERR_INVALIDCALL
;
}
...
...
@@ -5706,7 +5706,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CopyRects(IWineD3DDevice *iface,
pSourceSurface
,
pSourceRectsArray
,
cRects
,
pDestinationSurface
,
pDestPointsArray
);
/* Check that the source texture is in
D3DPOOL_SYSTEMMEM and the destination texture is in
D3DPOOL_DEFAULT */
/* Check that the source texture is in
WINED3DPOOL_SYSTEMMEM and the destination texture is in WINE
D3DPOOL_DEFAULT */
memset
(
&
winedesc
,
0
,
sizeof
(
winedesc
));
winedesc
.
Format
=
&
srcFormat
;
...
...
@@ -5847,8 +5847,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface, IWineD3DSurfa
DWORD
*
data
;
TRACE
(
"(%p) Colour fill Surface: %p rect: %p color: %ld
\n
"
,
This
,
pSurface
,
pRect
,
color
);
if
(
surface
->
resource
.
pool
!=
D3DPOOL_DEFAULT
)
{
FIXME
(
"call to colorfill with non D3DPOOL_DEFAULT surface
\n
"
);
if
(
surface
->
resource
.
pool
!=
WINE
D3DPOOL_DEFAULT
)
{
FIXME
(
"call to colorfill with non
WINE
D3DPOOL_DEFAULT surface
\n
"
);
return
D3DERR_INVALIDCALL
;
}
...
...
@@ -6501,7 +6501,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_TestCooperativeLevel(IWineD3DDevice* iface)
{
ResourceList
*
resourceList
=
This
->
resources
;
while
(
NULL
!=
resourceList
)
{
if
(((
IWineD3DResourceImpl
*
)
resourceList
->
resource
)
->
resource
.
pool
==
D3DPOOL_DEFAULT
/* TODO: IWineD3DResource_GetPool(resourceList->resource)*/
)
if
(((
IWineD3DResourceImpl
*
)
resourceList
->
resource
)
->
resource
.
pool
==
WINE
D3DPOOL_DEFAULT
/* TODO: IWineD3DResource_GetPool(resourceList->resource)*/
)
return
D3DERR_DEVICENOTRESET
;
resourceList
=
resourceList
->
next
;
}
...
...
dlls/wined3d/resource.c
View file @
d75fd75d
...
...
@@ -64,7 +64,7 @@ ULONG WINAPI IWineD3DResourceImpl_Release(IWineD3DResource *iface) {
void
IWineD3DResourceImpl_CleanUp
(
IWineD3DResource
*
iface
){
IWineD3DResourceImpl
*
This
=
(
IWineD3DResourceImpl
*
)
iface
;
TRACE
(
"(%p) Cleaning up resource
\n
"
,
This
);
if
(
This
->
resource
.
pool
==
D3DPOOL_DEFAULT
)
{
if
(
This
->
resource
.
pool
==
WINE
D3DPOOL_DEFAULT
)
{
TRACE
(
"Decrementing device memory pool by %u
\n
"
,
This
->
resource
.
size
);
globalChangeGlRam
(
-
This
->
resource
.
size
);
}
...
...
dlls/wined3d/surface.c
View file @
d75fd75d
...
...
@@ -143,7 +143,7 @@ void WINAPI IWineD3DSurfaceImpl_PreLoad(IWineD3DSurface *iface) {
FIXME
(
"Mipmap surface has a glTexture bound to it!
\n
"
);
}
}
if
(
This
->
resource
.
pool
==
D3DPOOL_DEFAULT
)
{
if
(
This
->
resource
.
pool
==
WINE
D3DPOOL_DEFAULT
)
{
/* Tell opengl to try and keep this texture in video ram (well mostly) */
GLclampf
tmp
;
tmp
=
0
.
9
f
;
...
...
@@ -258,7 +258,7 @@ void WINAPI IWineD3DSurfaceImpl_GetGlDesc(IWineD3DSurface *iface, glDescriptor *
const
void
*
WINAPI
IWineD3DSurfaceImpl_GetData
(
IWineD3DSurface
*
iface
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
/* This should only be called for sysmem textures, it may be a good idea to extend this to all pools at some point in the futture */
if
(
This
->
resource
.
pool
!=
D3DPOOL_SYSTEMMEM
)
{
if
(
This
->
resource
.
pool
!=
WINE
D3DPOOL_SYSTEMMEM
)
{
FIXME
(
" (%p)Attempting to get system memory for a non-system memory texture
\n
"
,
iface
);
}
return
(
CONST
void
*
)(
This
->
resource
.
allocatedMemory
);
...
...
@@ -951,7 +951,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) {
* In general never store scratch or system mem textures in the video ram. However it is allowed
* for system memory textures when WINED3DDEVCAPS_TEXTURESYSTEMMEMORY is set but it isn't right now.
*/
if
(
This
->
resource
.
pool
==
D3DPOOL_SCRATCH
||
This
->
resource
.
pool
==
D3DPOOL_SYSTEMMEM
)
if
(
This
->
resource
.
pool
==
WINED3DPOOL_SCRATCH
||
This
->
resource
.
pool
==
WINE
D3DPOOL_SYSTEMMEM
)
{
FIXME
(
"(%p) Operation not supported for scratch or SYSTEMMEM textures
\n
"
,
This
);
return
D3DERR_INVALIDCALL
;
...
...
dlls/wined3d/utils.c
View file @
d75fd75d
...
...
@@ -338,16 +338,16 @@ const char* debug_d3dtexturestate(DWORD state) {
}
}
const
char
*
debug_d3dpool
(
D3DPOOL
Pool
)
{
const
char
*
debug_d3dpool
(
WINE
D3DPOOL
Pool
)
{
switch
(
Pool
)
{
#define POOL_TO_STR(p) case p: return #p;
POOL_TO_STR
(
D3DPOOL_DEFAULT
);
POOL_TO_STR
(
D3DPOOL_MANAGED
);
POOL_TO_STR
(
D3DPOOL_SYSTEMMEM
);
POOL_TO_STR
(
D3DPOOL_SCRATCH
);
POOL_TO_STR
(
WINE
D3DPOOL_DEFAULT
);
POOL_TO_STR
(
WINE
D3DPOOL_MANAGED
);
POOL_TO_STR
(
WINE
D3DPOOL_SYSTEMMEM
);
POOL_TO_STR
(
WINE
D3DPOOL_SCRATCH
);
#undef POOL_TO_STR
default:
FIXME
(
"Unrecognized %u D3DPOOL!
\n
"
,
Pool
);
FIXME
(
"Unrecognized %u
WINE
D3DPOOL!
\n
"
,
Pool
);
return
"unrecognized"
;
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
d75fd75d
...
...
@@ -602,7 +602,7 @@ typedef struct IWineD3DResourceClass
IUnknown
*
parent
;
WINED3DRESOURCETYPE
resourceType
;
IWineD3DDeviceImpl
*
wineD3DDevice
;
D3DPOOL
pool
;
WINED3DPOOL
pool
;
UINT
size
;
DWORD
usage
;
WINED3DFORMAT
format
;
...
...
@@ -1075,7 +1075,7 @@ const char* debug_d3dusage(DWORD usage);
const
char
*
debug_d3dprimitivetype
(
D3DPRIMITIVETYPE
PrimitiveType
);
const
char
*
debug_d3drenderstate
(
DWORD
state
);
const
char
*
debug_d3dtexturestate
(
DWORD
state
);
const
char
*
debug_d3dpool
(
D3DPOOL
pool
);
const
char
*
debug_d3dpool
(
WINE
D3DPOOL
pool
);
/* Routines for GL <-> D3D values */
GLenum
StencilOp
(
DWORD
op
);
...
...
include/wine/wined3d_interface.h
View file @
d75fd75d
...
...
@@ -175,7 +175,7 @@ typedef HRESULT WINAPI (*D3DCB_CREATESURFACEFN) (IUnknown *pDevice,
UINT
Height
,
WINED3DFORMAT
Format
,
DWORD
Usage
,
D3DPOOL
Pool
,
WINED3DPOOL
Pool
,
UINT
Level
,
struct
IWineD3DSurface
**
ppSurface
,
HANDLE
*
pSharedHandle
);
...
...
@@ -196,7 +196,7 @@ typedef HRESULT WINAPI (*D3DCB_CREATEVOLUMEFN) (IUnknown *pDevice,
UINT
Height
,
UINT
Depth
,
WINED3DFORMAT
Format
,
D3DPOOL
Pool
,
WINED3DPOOL
Pool
,
DWORD
Usage
,
struct
IWineD3DVolume
**
ppVolume
,
HANDLE
*
pSharedHandle
);
...
...
@@ -303,14 +303,14 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
/*** IWineD3DBase methods ***/
STDMETHOD
(
GetParent
)(
THIS_
IUnknown
**
pParent
)
PURE
;
/*** IWineD3DDevice methods ***/
STDMETHOD
(
CreateVertexBuffer
)(
THIS_
UINT
Length
,
DWORD
Usage
,
DWORD
FVF
,
D3DPOOL
Pool
,
struct
IWineD3DVertexBuffer
**
ppVertexBuffer
,
HANDLE
*
sharedHandle
,
IUnknown
*
parent
)
PURE
;
STDMETHOD
(
CreateIndexBuffer
)(
THIS_
UINT
Length
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
D3DPOOL
Pool
,
struct
IWineD3DIndexBuffer
**
ppIndexBuffer
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
)
PURE
;
STDMETHOD
(
CreateVertexBuffer
)(
THIS_
UINT
Length
,
DWORD
Usage
,
DWORD
FVF
,
WINE
D3DPOOL
Pool
,
struct
IWineD3DVertexBuffer
**
ppVertexBuffer
,
HANDLE
*
sharedHandle
,
IUnknown
*
parent
)
PURE
;
STDMETHOD
(
CreateIndexBuffer
)(
THIS_
UINT
Length
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
WINE
D3DPOOL
Pool
,
struct
IWineD3DIndexBuffer
**
ppIndexBuffer
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
)
PURE
;
STDMETHOD
(
CreateStateBlock
)(
THIS_
WINED3DSTATEBLOCKTYPE
Type
,
struct
IWineD3DStateBlock
**
ppStateBlock
,
IUnknown
*
parent
)
PURE
;
STDMETHOD
(
CreateSurface
)(
THIS_
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
BOOL
Lockable
,
BOOL
Discard
,
UINT
Level
,
struct
IWineD3DSurface
**
ppSurface
,
WINED3DRESOURCETYPE
Type
,
DWORD
Usage
,
D3DPOOL
Pool
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
)
PURE
;
STDMETHOD
(
CreateTexture
)(
THIS_
UINT
Width
,
UINT
Height
,
UINT
Levels
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
D3DPOOL
Pool
,
struct
IWineD3DTexture
**
ppTexture
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
,
D3DCB_CREATESURFACEFN
pFn
)
PURE
;
STDMETHOD
(
CreateVolumeTexture
)(
THIS_
UINT
Width
,
UINT
Height
,
UINT
Depth
,
UINT
Levels
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
D3DPOOL
Pool
,
struct
IWineD3DVolumeTexture
**
ppVolumeTexture
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
,
D3DCB_CREATEVOLUMEFN
pFn
)
PURE
;
STDMETHOD
(
CreateVolume
)(
THIS_
UINT
Width
,
UINT
Height
,
UINT
Depth
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
D3DPOOL
Pool
,
struct
IWineD3DVolume
**
ppVolumeTexture
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
)
PURE
;
STDMETHOD
(
CreateCubeTexture
)(
THIS_
UINT
EdgeLength
,
UINT
Levels
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
D3DPOOL
Pool
,
struct
IWineD3DCubeTexture
**
ppCubeTexture
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
,
D3DCB_CREATESURFACEFN
pFn
)
PURE
;
STDMETHOD
(
CreateSurface
)(
THIS_
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
Format
,
BOOL
Lockable
,
BOOL
Discard
,
UINT
Level
,
struct
IWineD3DSurface
**
ppSurface
,
WINED3DRESOURCETYPE
Type
,
DWORD
Usage
,
WINE
D3DPOOL
Pool
,
WINED3DMULTISAMPLE_TYPE
MultiSample
,
DWORD
MultisampleQuality
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
)
PURE
;
STDMETHOD
(
CreateTexture
)(
THIS_
UINT
Width
,
UINT
Height
,
UINT
Levels
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
WINE
D3DPOOL
Pool
,
struct
IWineD3DTexture
**
ppTexture
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
,
D3DCB_CREATESURFACEFN
pFn
)
PURE
;
STDMETHOD
(
CreateVolumeTexture
)(
THIS_
UINT
Width
,
UINT
Height
,
UINT
Depth
,
UINT
Levels
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
WINE
D3DPOOL
Pool
,
struct
IWineD3DVolumeTexture
**
ppVolumeTexture
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
,
D3DCB_CREATEVOLUMEFN
pFn
)
PURE
;
STDMETHOD
(
CreateVolume
)(
THIS_
UINT
Width
,
UINT
Height
,
UINT
Depth
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
WINE
D3DPOOL
Pool
,
struct
IWineD3DVolume
**
ppVolumeTexture
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
)
PURE
;
STDMETHOD
(
CreateCubeTexture
)(
THIS_
UINT
EdgeLength
,
UINT
Levels
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
WINE
D3DPOOL
Pool
,
struct
IWineD3DCubeTexture
**
ppCubeTexture
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
,
D3DCB_CREATESURFACEFN
pFn
)
PURE
;
STDMETHOD
(
CreateQuery
)(
THIS_
WINED3DQUERYTYPE
Type
,
struct
IWineD3DQuery
**
ppQuery
,
IUnknown
*
pParent
);
STDMETHOD
(
CreateAdditionalSwapChain
)(
THIS_
WINED3DPRESENT_PARAMETERS
*
pPresentationParameters
,
struct
IWineD3DSwapChain
**
pSwapChain
,
IUnknown
*
pParent
,
D3DCB_CREATERENDERTARGETFN
pFn
,
D3DCB_CREATEDEPTHSTENCILSURFACEFN
pFn2
);
STDMETHOD
(
CreateVertexDeclaration
)(
THIS_
CONST
VOID
*
pDeclaration
,
struct
IWineD3DVertexDeclaration
**
ppDecl
,
IUnknown
*
pParent
)
PURE
;
...
...
include/wine/wined3d_types.h
View file @
d75fd75d
...
...
@@ -503,12 +503,21 @@ typedef enum _WINED3DRESOURCETYPE {
#define WINED3DRTYPECOUNT (WINED3DRTYPE_INDEXBUFFER+1)
typedef
enum
_WINED3DPOOL
{
WINED3DPOOL_DEFAULT
=
0
,
WINED3DPOOL_MANAGED
=
1
,
WINED3DPOOL_SYSTEMMEM
=
2
,
WINED3DPOOL_SCRATCH
=
3
,
WINED3DPOOL_FORCE_DWORD
=
0x7fffffff
}
WINED3DPOOL
;
typedef
struct
_WINED3DSURFACE_DESC
{
WINED3DFORMAT
*
Format
;
WINED3DRESOURCETYPE
*
Type
;
DWORD
*
Usage
;
D3DPOOL
*
Pool
;
WINED3DPOOL
*
Pool
;
UINT
*
Size
;
WINED3DMULTISAMPLE_TYPE
*
MultiSampleType
;
...
...
@@ -522,7 +531,7 @@ typedef struct _WINED3DVOLUME_DESC
WINED3DFORMAT
*
Format
;
WINED3DRESOURCETYPE
*
Type
;
DWORD
*
Usage
;
D3DPOOL
*
Pool
;
WINED3DPOOL
*
Pool
;
UINT
*
Size
;
UINT
*
Width
;
...
...
@@ -643,7 +652,7 @@ typedef struct _WINED3DVERTEXBUFFER_DESC {
WINED3DFORMAT
Format
;
WINED3DRESOURCETYPE
Type
;
DWORD
Usage
;
D3DPOOL
Pool
;
WINED3DPOOL
Pool
;
UINT
Size
;
DWORD
FVF
;
}
WINED3DVERTEXBUFFER_DESC
;
...
...
@@ -652,7 +661,7 @@ typedef struct _WINED3DINDEXBUFFER_DESC {
WINED3DFORMAT
Format
;
WINED3DRESOURCETYPE
Type
;
DWORD
Usage
;
D3DPOOL
Pool
;
WINED3DPOOL
Pool
;
UINT
Size
;
}
WINED3DINDEXBUFFER_DESC
;
...
...
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