wined3d: Add WINED3DPOOL to wined3d_types.h.
This commit is contained in:
parent
8358c63e15
commit
d75fd75d48
|
@ -142,7 +142,7 @@ HRESULT WINAPI IDirect3DCubeTexture8Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE8 ifa
|
||||||
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
||||||
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
||||||
wined3ddesc.Usage = &pDesc->Usage;
|
wined3ddesc.Usage = &pDesc->Usage;
|
||||||
wined3ddesc.Pool = &pDesc->Pool;
|
wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool;
|
||||||
wined3ddesc.Size = &tmpInt;
|
wined3ddesc.Size = &tmpInt;
|
||||||
wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType;
|
wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType;
|
||||||
wined3ddesc.MultiSampleQuality = NULL; /* DirectX9 only */
|
wined3ddesc.MultiSampleQuality = NULL; /* DirectX9 only */
|
||||||
|
|
|
@ -560,11 +560,11 @@ typedef struct IDirect3DPixelShader8Impl {
|
||||||
|
|
||||||
/* Callbacks */
|
/* Callbacks */
|
||||||
extern HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, UINT Width, UINT Height,
|
extern HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, UINT Width, UINT Height,
|
||||||
WINED3DFORMAT Format, DWORD Usage, D3DPOOL Pool, UINT Level,
|
WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
|
||||||
IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
|
IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
|
||||||
|
|
||||||
extern HRESULT WINAPI D3D8CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth,
|
extern HRESULT WINAPI D3D8CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth,
|
||||||
WINED3DFORMAT Format, D3DPOOL Pool, DWORD Usage,
|
WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage,
|
||||||
IWineD3DVolume **ppVolume,
|
IWineD3DVolume **ppVolume,
|
||||||
HANDLE * pSharedHandle);
|
HANDLE * pSharedHandle);
|
||||||
|
|
||||||
|
|
|
@ -303,7 +303,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateTexture(LPDIRECT3DDEVICE8 iface, UINT
|
||||||
object->lpVtbl = &Direct3DTexture8_Vtbl;
|
object->lpVtbl = &Direct3DTexture8_Vtbl;
|
||||||
object->ref = 1;
|
object->ref = 1;
|
||||||
hrc = IWineD3DDevice_CreateTexture(This->WineD3DDevice, Width, Height, Levels, Usage,
|
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)) {
|
if (FAILED(hrc)) {
|
||||||
/* free up object */
|
/* free up object */
|
||||||
|
@ -339,7 +339,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateVolumeTexture(LPDIRECT3DDEVICE8 iface,
|
||||||
object->lpVtbl = &Direct3DVolumeTexture8_Vtbl;
|
object->lpVtbl = &Direct3DVolumeTexture8_Vtbl;
|
||||||
object->ref = 1;
|
object->ref = 1;
|
||||||
hrc = IWineD3DDevice_CreateVolumeTexture(This->WineD3DDevice, Width, Height, Depth, Levels, Usage,
|
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);
|
(IUnknown *)object, D3D8CB_CreateVolume);
|
||||||
|
|
||||||
if (hrc != D3D_OK) {
|
if (hrc != D3D_OK) {
|
||||||
|
@ -376,7 +376,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateCubeTexture(LPDIRECT3DDEVICE8 iface, U
|
||||||
object->lpVtbl = &Direct3DCubeTexture8_Vtbl;
|
object->lpVtbl = &Direct3DCubeTexture8_Vtbl;
|
||||||
object->ref = 1;
|
object->ref = 1;
|
||||||
hr = IWineD3DDevice_CreateCubeTexture(This->WineD3DDevice, EdgeLength, Levels, Usage,
|
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);
|
D3D8CB_CreateSurface);
|
||||||
|
|
||||||
if (hr != D3D_OK){
|
if (hr != D3D_OK){
|
||||||
|
@ -408,7 +408,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateVertexBuffer(LPDIRECT3DDEVICE8 iface,
|
||||||
|
|
||||||
object->lpVtbl = &Direct3DVertexBuffer8_Vtbl;
|
object->lpVtbl = &Direct3DVertexBuffer8_Vtbl;
|
||||||
object->ref = 1;
|
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) {
|
if (D3D_OK != hrc) {
|
||||||
|
|
||||||
|
@ -439,7 +439,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateIndexBuffer(LPDIRECT3DDEVICE8 iface, U
|
||||||
object->lpVtbl = &Direct3DIndexBuffer8_Vtbl;
|
object->lpVtbl = &Direct3DIndexBuffer8_Vtbl;
|
||||||
object->ref = 1;
|
object->ref = 1;
|
||||||
TRACE("Calling wined3d create index buffer\n");
|
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) {
|
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);
|
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) {
|
if (hrc != D3D_OK || NULL == object->wineD3DSurface) {
|
||||||
/* free up object */
|
/* free up object */
|
||||||
FIXME("(%p) call to IWineD3DDevice_CreateSurface failed\n", This);
|
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 */
|
/* Internal function called back during the CreateDevice to create a render target */
|
||||||
HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, UINT Width, UINT Height,
|
HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, UINT Width, UINT Height,
|
||||||
WINED3DFORMAT Format, DWORD Usage, D3DPOOL Pool, UINT Level,
|
WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
|
||||||
IWineD3DSurface **ppSurface, HANDLE *pSharedHandle) {
|
IWineD3DSurface **ppSurface, HANDLE *pSharedHandle) {
|
||||||
|
|
||||||
HRESULT res = D3D_OK;
|
HRESULT res = D3D_OK;
|
||||||
IDirect3DSurface8Impl *d3dSurface = NULL;
|
IDirect3DSurface8Impl *d3dSurface = NULL;
|
||||||
BOOL Lockable = TRUE;
|
BOOL Lockable = TRUE;
|
||||||
|
|
||||||
if((D3DPOOL_DEFAULT == Pool && D3DUSAGE_DYNAMIC != Usage))
|
if((WINED3DPOOL_DEFAULT == Pool && WINED3DUSAGE_DYNAMIC != Usage))
|
||||||
Lockable = FALSE;
|
Lockable = FALSE;
|
||||||
|
|
||||||
TRACE("relay\n");
|
TRACE("relay\n");
|
||||||
|
|
|
@ -164,7 +164,7 @@ HRESULT WINAPI IDirect3DSurface8Impl_GetDesc(LPDIRECT3DSURFACE8 iface, D3DSURFAC
|
||||||
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
||||||
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
||||||
wined3ddesc.Usage = &pDesc->Usage;
|
wined3ddesc.Usage = &pDesc->Usage;
|
||||||
wined3ddesc.Pool = &pDesc->Pool;
|
wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool;
|
||||||
wined3ddesc.Size = &tmpInt;
|
wined3ddesc.Size = &tmpInt;
|
||||||
wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType;
|
wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType;
|
||||||
wined3ddesc.Width = &pDesc->Width;
|
wined3ddesc.Width = &pDesc->Width;
|
||||||
|
|
|
@ -143,7 +143,7 @@ HRESULT WINAPI IDirect3DTexture8Impl_GetLevelDesc(LPDIRECT3DTEXTURE8 iface, UINT
|
||||||
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
||||||
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
||||||
wined3ddesc.Usage = &pDesc->Usage;
|
wined3ddesc.Usage = &pDesc->Usage;
|
||||||
wined3ddesc.Pool = &pDesc->Pool;
|
wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool;
|
||||||
wined3ddesc.Size = &tmpInt; /* required for d3d8 */
|
wined3ddesc.Size = &tmpInt; /* required for d3d8 */
|
||||||
wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType;
|
wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType;
|
||||||
wined3ddesc.Width = &pDesc->Width;
|
wined3ddesc.Width = &pDesc->Width;
|
||||||
|
|
|
@ -140,7 +140,7 @@ HRESULT WINAPI IDirect3DVolume8Impl_GetDesc(LPDIRECT3DVOLUME8 iface, D3DVOLUME_D
|
||||||
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
||||||
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
||||||
wined3ddesc.Usage = &pDesc->Usage;
|
wined3ddesc.Usage = &pDesc->Usage;
|
||||||
wined3ddesc.Pool = &pDesc->Pool;
|
wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool;
|
||||||
wined3ddesc.Size = &tmpInt;
|
wined3ddesc.Size = &tmpInt;
|
||||||
wined3ddesc.Width = &pDesc->Width;
|
wined3ddesc.Width = &pDesc->Width;
|
||||||
wined3ddesc.Height = &pDesc->Height;
|
wined3ddesc.Height = &pDesc->Height;
|
||||||
|
@ -181,7 +181,7 @@ const IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl =
|
||||||
|
|
||||||
/* Internal function called back during the CreateVolumeTexture */
|
/* Internal function called back during the CreateVolumeTexture */
|
||||||
HRESULT WINAPI D3D8CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth,
|
HRESULT WINAPI D3D8CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth,
|
||||||
WINED3DFORMAT Format, D3DPOOL Pool, DWORD Usage,
|
WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage,
|
||||||
IWineD3DVolume **ppVolume,
|
IWineD3DVolume **ppVolume,
|
||||||
HANDLE * pSharedHandle) {
|
HANDLE * pSharedHandle) {
|
||||||
IDirect3DVolume8Impl *object;
|
IDirect3DVolume8Impl *object;
|
||||||
|
|
|
@ -142,7 +142,7 @@ HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE8
|
||||||
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
||||||
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
||||||
wined3ddesc.Usage = &pDesc->Usage;
|
wined3ddesc.Usage = &pDesc->Usage;
|
||||||
wined3ddesc.Pool = &pDesc->Pool;
|
wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool;
|
||||||
wined3ddesc.Size = &tmpInt;
|
wined3ddesc.Size = &tmpInt;
|
||||||
wined3ddesc.Width = &pDesc->Width;
|
wined3ddesc.Width = &pDesc->Width;
|
||||||
wined3ddesc.Height = &pDesc->Height;
|
wined3ddesc.Height = &pDesc->Height;
|
||||||
|
|
|
@ -163,7 +163,7 @@ HRESULT WINAPI IDirect3DCubeTexture9Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE9 ifa
|
||||||
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
||||||
wined3ddesc.Type = (WINED3DRESOURCETYPE *) &pDesc->Type;
|
wined3ddesc.Type = (WINED3DRESOURCETYPE *) &pDesc->Type;
|
||||||
wined3ddesc.Usage = &pDesc->Usage;
|
wined3ddesc.Usage = &pDesc->Usage;
|
||||||
wined3ddesc.Pool = &pDesc->Pool;
|
wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool;
|
||||||
wined3ddesc.Size = &tmpInt;
|
wined3ddesc.Size = &tmpInt;
|
||||||
wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType;
|
wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType;
|
||||||
wined3ddesc.MultiSampleQuality = &pDesc->MultiSampleQuality;
|
wined3ddesc.MultiSampleQuality = &pDesc->MultiSampleQuality;
|
||||||
|
@ -261,7 +261,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(LPDIRECT3DDEVICE9 iface,
|
||||||
object->lpVtbl = &Direct3DCubeTexture9_Vtbl;
|
object->lpVtbl = &Direct3DCubeTexture9_Vtbl;
|
||||||
object->ref = 1;
|
object->ref = 1;
|
||||||
hr = IWineD3DDevice_CreateCubeTexture(This->WineD3DDevice, EdgeLength, Levels, Usage,
|
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);
|
D3D9CB_CreateSurface);
|
||||||
|
|
||||||
if (hr != D3D_OK){
|
if (hr != D3D_OK){
|
||||||
|
|
|
@ -609,11 +609,11 @@ typedef struct IDirect3DQuery9Impl {
|
||||||
|
|
||||||
/* Callbacks */
|
/* Callbacks */
|
||||||
extern HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, UINT Width, UINT Height,
|
extern HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, UINT Width, UINT Height,
|
||||||
WINED3DFORMAT Format, DWORD Usage, D3DPOOL Pool, UINT Level,
|
WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
|
||||||
IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
|
IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
|
||||||
|
|
||||||
extern HRESULT WINAPI D3D9CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth,
|
extern HRESULT WINAPI D3D9CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth,
|
||||||
WINED3DFORMAT Format, D3DPOOL Pool, DWORD Usage,
|
WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage,
|
||||||
IWineD3DVolume **ppVolume,
|
IWineD3DVolume **ppVolume,
|
||||||
HANDLE * pSharedHandle);
|
HANDLE * pSharedHandle);
|
||||||
|
|
||||||
|
|
|
@ -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;
|
HRESULT hrc;
|
||||||
IDirect3DSurface9Impl *object;
|
IDirect3DSurface9Impl *object;
|
||||||
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
|
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);
|
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) {
|
if (hrc != D3D_OK || NULL == object->wineD3DSurface) {
|
||||||
|
|
||||||
|
@ -368,7 +368,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateOffscreenPlainSurface(LPDIRECT3DDEVI
|
||||||
Why, their always lockable?
|
Why, their always lockable?
|
||||||
should I change the usage to dynamic?
|
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 */
|
/* TODO: move to wineD3D */
|
||||||
|
@ -939,7 +939,7 @@ const IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl =
|
||||||
|
|
||||||
/* Internal function called back during the CreateDevice to create a render target */
|
/* Internal function called back during the CreateDevice to create a render target */
|
||||||
HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, UINT Width, UINT Height,
|
HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, UINT Width, UINT Height,
|
||||||
WINED3DFORMAT Format, DWORD Usage, D3DPOOL Pool, UINT Level,
|
WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
|
||||||
IWineD3DSurface** ppSurface, HANDLE* pSharedHandle) {
|
IWineD3DSurface** ppSurface, HANDLE* pSharedHandle) {
|
||||||
|
|
||||||
HRESULT res = D3D_OK;
|
HRESULT res = D3D_OK;
|
||||||
|
@ -950,7 +950,7 @@ HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, UINT Width, UINT Height,
|
||||||
Lockable = FALSE;
|
Lockable = FALSE;
|
||||||
|
|
||||||
TRACE("relay\n");
|
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) {
|
if (res == D3D_OK) {
|
||||||
*ppSurface = d3dSurface->wineD3DSurface;
|
*ppSurface = d3dSurface->wineD3DSurface;
|
||||||
|
|
|
@ -173,7 +173,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(LPDIRECT3DDEVICE9 iface,
|
||||||
object->lpVtbl = &Direct3DIndexBuffer9_Vtbl;
|
object->lpVtbl = &Direct3DIndexBuffer9_Vtbl;
|
||||||
object->ref = 1;
|
object->ref = 1;
|
||||||
TRACE("Calling wined3d create index buffer\n");
|
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) {
|
if (hrc != D3D_OK) {
|
||||||
|
|
||||||
/* free up object */
|
/* free up object */
|
||||||
|
|
|
@ -183,7 +183,7 @@ HRESULT WINAPI IDirect3DSurface9Impl_GetDesc(LPDIRECT3DSURFACE9 iface, D3DSURFAC
|
||||||
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
||||||
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
||||||
wined3ddesc.Usage = &pDesc->Usage;
|
wined3ddesc.Usage = &pDesc->Usage;
|
||||||
wined3ddesc.Pool = &pDesc->Pool;
|
wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool;
|
||||||
wined3ddesc.Size = &tmpInt;
|
wined3ddesc.Size = &tmpInt;
|
||||||
wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType;
|
wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType;
|
||||||
wined3ddesc.MultiSampleQuality = &pDesc->MultiSampleQuality;
|
wined3ddesc.MultiSampleQuality = &pDesc->MultiSampleQuality;
|
||||||
|
|
|
@ -162,7 +162,7 @@ HRESULT WINAPI IDirect3DTexture9Impl_GetLevelDesc(LPDIRECT3DTEXTURE9 iface, UINT
|
||||||
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
||||||
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
||||||
wined3ddesc.Usage = &pDesc->Usage;
|
wined3ddesc.Usage = &pDesc->Usage;
|
||||||
wined3ddesc.Pool = &pDesc->Pool;
|
wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool;
|
||||||
wined3ddesc.Size = &tmpInt; /* required for d3d8 */
|
wined3ddesc.Size = &tmpInt; /* required for d3d8 */
|
||||||
wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType;
|
wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType;
|
||||||
wined3ddesc.MultiSampleQuality = &pDesc->MultiSampleQuality;
|
wined3ddesc.MultiSampleQuality = &pDesc->MultiSampleQuality;
|
||||||
|
@ -255,7 +255,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(LPDIRECT3DDEVICE9 iface, UIN
|
||||||
object->lpVtbl = &Direct3DTexture9_Vtbl;
|
object->lpVtbl = &Direct3DTexture9_Vtbl;
|
||||||
object->ref = 1;
|
object->ref = 1;
|
||||||
hrc = IWineD3DDevice_CreateTexture(This->WineD3DDevice, Width, Height, Levels, Usage,
|
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)) {
|
if (FAILED(hrc)) {
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexBuffer(LPDIRECT3DDEVICE9 iface,
|
||||||
|
|
||||||
object->lpVtbl = &Direct3DVertexBuffer9_Vtbl;
|
object->lpVtbl = &Direct3DVertexBuffer9_Vtbl;
|
||||||
object->ref = 1;
|
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) {
|
if (hrc != D3D_OK) {
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ HRESULT WINAPI IDirect3DVolume9Impl_GetDesc(LPDIRECT3DVOLUME9 iface, D3DVOLUME_D
|
||||||
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
||||||
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
||||||
wined3ddesc.Usage = &pDesc->Usage;
|
wined3ddesc.Usage = &pDesc->Usage;
|
||||||
wined3ddesc.Pool = &pDesc->Pool;
|
wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool;
|
||||||
wined3ddesc.Size = &tmpInt;
|
wined3ddesc.Size = &tmpInt;
|
||||||
wined3ddesc.Width = &pDesc->Width;
|
wined3ddesc.Width = &pDesc->Width;
|
||||||
wined3ddesc.Height = &pDesc->Height;
|
wined3ddesc.Height = &pDesc->Height;
|
||||||
|
@ -201,7 +201,7 @@ const IDirect3DVolume9Vtbl Direct3DVolume9_Vtbl =
|
||||||
|
|
||||||
/* Internal function called back during the CreateVolumeTexture */
|
/* Internal function called back during the CreateVolumeTexture */
|
||||||
HRESULT WINAPI D3D9CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth,
|
HRESULT WINAPI D3D9CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth,
|
||||||
WINED3DFORMAT Format, D3DPOOL Pool, DWORD Usage,
|
WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage,
|
||||||
IWineD3DVolume **ppVolume,
|
IWineD3DVolume **ppVolume,
|
||||||
HANDLE * pSharedHandle) {
|
HANDLE * pSharedHandle) {
|
||||||
IDirect3DVolume9Impl *object;
|
IDirect3DVolume9Impl *object;
|
||||||
|
|
|
@ -161,7 +161,7 @@ HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE9
|
||||||
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
|
||||||
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
|
||||||
wined3ddesc.Usage = &pDesc->Usage;
|
wined3ddesc.Usage = &pDesc->Usage;
|
||||||
wined3ddesc.Pool = &pDesc->Pool;
|
wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool;
|
||||||
wined3ddesc.Size = &tmpInt;
|
wined3ddesc.Size = &tmpInt;
|
||||||
wined3ddesc.Width = &pDesc->Width;
|
wined3ddesc.Width = &pDesc->Width;
|
||||||
wined3ddesc.Height = &pDesc->Height;
|
wined3ddesc.Height = &pDesc->Height;
|
||||||
|
@ -257,7 +257,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9 ifac
|
||||||
object->lpVtbl = &Direct3DVolumeTexture9_Vtbl;
|
object->lpVtbl = &Direct3DVolumeTexture9_Vtbl;
|
||||||
object->ref = 1;
|
object->ref = 1;
|
||||||
hrc = IWineD3DDevice_CreateVolumeTexture(This->WineD3DDevice, Width, Height, Depth, Levels, Usage,
|
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);
|
(IUnknown *)object, D3D9CB_CreateVolume);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_GetParent(IWineD3DBaseTexture *iface, IUn
|
||||||
DWORD WINAPI IWineD3DBaseTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LODNew) {
|
DWORD WINAPI IWineD3DBaseTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LODNew) {
|
||||||
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
|
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
|
||||||
|
|
||||||
if (This->resource.pool != D3DPOOL_MANAGED) {
|
if (This->resource.pool != WINED3DPOOL_MANAGED) {
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ DWORD WINAPI IWineD3DBaseTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LO
|
||||||
DWORD WINAPI IWineD3DBaseTextureImpl_GetLOD(IWineD3DBaseTexture *iface) {
|
DWORD WINAPI IWineD3DBaseTextureImpl_GetLOD(IWineD3DBaseTexture *iface) {
|
||||||
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
|
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
|
||||||
|
|
||||||
if (This->resource.pool != D3DPOOL_MANAGED) {
|
if (This->resource.pool != WINED3DPOOL_MANAGED) {
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_BindTexture(IWineD3DBaseTexture *iface) {
|
||||||
glGenTextures(1, &This->baseTexture.textureName);
|
glGenTextures(1, &This->baseTexture.textureName);
|
||||||
checkGLcall("glGenTextures");
|
checkGLcall("glGenTextures");
|
||||||
TRACE("Generated texture %d\n", This->baseTexture.textureName);
|
TRACE("Generated texture %d\n", This->baseTexture.textureName);
|
||||||
if (This->resource.pool == D3DPOOL_DEFAULT) {
|
if (This->resource.pool == WINED3DPOOL_DEFAULT) {
|
||||||
/* Tell opengl to try and keep this texture in video ram (well mostly) */
|
/* Tell opengl to try and keep this texture in video ram (well mostly) */
|
||||||
GLclampf tmp;
|
GLclampf tmp;
|
||||||
tmp = 0.9f;
|
tmp = 0.9f;
|
||||||
|
|
|
@ -90,7 +90,7 @@ static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *ifac
|
||||||
object->resource.usage = Usage; \
|
object->resource.usage = Usage; \
|
||||||
object->resource.size = _size; \
|
object->resource.size = _size; \
|
||||||
/* Check that we have enough video ram left */ \
|
/* Check that we have enough video ram left */ \
|
||||||
if (Pool == D3DPOOL_DEFAULT) { \
|
if (Pool == WINED3DPOOL_DEFAULT) { \
|
||||||
if (IWineD3DDevice_GetAvailableTextureMem(iface) <= _size) { \
|
if (IWineD3DDevice_GetAvailableTextureMem(iface) <= _size) { \
|
||||||
WARN("Out of 'bogus' video memory\n"); \
|
WARN("Out of 'bogus' video memory\n"); \
|
||||||
HeapFree(GetProcessHeap(), 0, object); \
|
HeapFree(GetProcessHeap(), 0, object); \
|
||||||
|
@ -99,8 +99,8 @@ static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *ifac
|
||||||
} \
|
} \
|
||||||
globalChangeGlRam(_size); \
|
globalChangeGlRam(_size); \
|
||||||
} \
|
} \
|
||||||
object->resource.allocatedMemory = (0 == _size ? NULL : Pool == D3DPOOL_DEFAULT ? NULL : HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, _size)); \
|
object->resource.allocatedMemory = (0 == _size ? NULL : Pool == WINED3DPOOL_DEFAULT ? NULL : HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, _size)); \
|
||||||
if (object->resource.allocatedMemory == NULL && _size != 0 && Pool != D3DPOOL_DEFAULT) { \
|
if (object->resource.allocatedMemory == NULL && _size != 0 && Pool != WINED3DPOOL_DEFAULT) { \
|
||||||
FIXME("Out of memory!\n"); \
|
FIXME("Out of memory!\n"); \
|
||||||
HeapFree(GetProcessHeap(), 0, object); \
|
HeapFree(GetProcessHeap(), 0, object); \
|
||||||
*pp##type = NULL; \
|
*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,
|
HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, UINT Size, DWORD Usage,
|
||||||
DWORD FVF, D3DPOOL Pool, IWineD3DVertexBuffer** ppVertexBuffer, HANDLE *sharedHandle,
|
DWORD FVF, WINED3DPOOL Pool, IWineD3DVertexBuffer** ppVertexBuffer, HANDLE *sharedHandle,
|
||||||
IUnknown *parent) {
|
IUnknown *parent) {
|
||||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||||
IWineD3DVertexBufferImpl *object;
|
IWineD3DVertexBufferImpl *object;
|
||||||
|
@ -470,7 +470,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, UINT
|
||||||
D3DCREATERESOURCEOBJECTINSTANCE(object, VertexBuffer, WINED3DRTYPE_VERTEXBUFFER, Size)
|
D3DCREATERESOURCEOBJECTINSTANCE(object, VertexBuffer, WINED3DRTYPE_VERTEXBUFFER, Size)
|
||||||
|
|
||||||
/*TODO: use VBO's */
|
/*TODO: use VBO's */
|
||||||
if (Pool == D3DPOOL_DEFAULT ) { /* Allocate some system memory for now */
|
if (Pool == WINED3DPOOL_DEFAULT ) { /* Allocate some system memory for now */
|
||||||
object->resource.allocatedMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, object->resource.size);
|
object->resource.allocatedMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, object->resource.size);
|
||||||
}
|
}
|
||||||
object->fvf = FVF;
|
object->fvf = FVF;
|
||||||
|
@ -482,7 +482,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, UINT
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface, UINT Length, DWORD Usage,
|
HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface, UINT Length, DWORD Usage,
|
||||||
WINED3DFORMAT Format, D3DPOOL Pool, IWineD3DIndexBuffer** ppIndexBuffer,
|
WINED3DFORMAT Format, WINED3DPOOL Pool, IWineD3DIndexBuffer** ppIndexBuffer,
|
||||||
HANDLE *sharedHandle, IUnknown *parent) {
|
HANDLE *sharedHandle, IUnknown *parent) {
|
||||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||||
IWineD3DIndexBufferImpl *object;
|
IWineD3DIndexBufferImpl *object;
|
||||||
|
@ -492,7 +492,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface, UINT
|
||||||
D3DCREATERESOURCEOBJECTINSTANCE(object,IndexBuffer,WINED3DRTYPE_INDEXBUFFER, Length)
|
D3DCREATERESOURCEOBJECTINSTANCE(object,IndexBuffer,WINED3DRTYPE_INDEXBUFFER, Length)
|
||||||
|
|
||||||
/*TODO: use VBO's */
|
/*TODO: use VBO's */
|
||||||
if (Pool == D3DPOOL_DEFAULT ) { /* Allocate some system memory for now */
|
if (Pool == WINED3DPOOL_DEFAULT ) { /* Allocate some system memory for now */
|
||||||
object->resource.allocatedMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,object->resource.size);
|
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, WINED3DPOOL Pool, WINED3DMULTISAMPLE_TYPE MultiSample ,DWORD MultisampleQuality, HANDLE* pSharedHandle, IUnknown *parent) {
|
||||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||||
IWineD3DSurfaceImpl *object; /*NOTE: impl ref allowed since this is a create function */
|
IWineD3DSurfaceImpl *object; /*NOTE: impl ref allowed since this is a create function */
|
||||||
unsigned int pow2Width, pow2Height;
|
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 **/
|
/** 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, WINED3DPOOL_SYSTEMMEM);
|
||||||
|
|
||||||
/** Quick lockable sanity check TODO: remove this after surfaces, usage and locablility have been debugged properly
|
/** 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.
|
* 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.
|
* Levels need to be checked too, and possibly Type wince they all affect what can be done.
|
||||||
* ****************************************/
|
* ****************************************/
|
||||||
switch(Pool) {
|
switch(Pool) {
|
||||||
case D3DPOOL_SCRATCH:
|
case WINED3DPOOL_SCRATCH:
|
||||||
if(Lockable == FALSE)
|
if(Lockable == FALSE)
|
||||||
FIXME("Create suface called with a pool of SCRATCH and a Lockable of FALSE \
|
FIXME("Create suface called with a pool of SCRATCH and a Lockable of FALSE \
|
||||||
which are mutually exclusive, setting lockable to true\n");
|
which are mutually exclusive, setting lockable to true\n");
|
||||||
Lockable = TRUE;
|
Lockable = TRUE;
|
||||||
break;
|
break;
|
||||||
case D3DPOOL_SYSTEMMEM:
|
case WINED3DPOOL_SYSTEMMEM:
|
||||||
if(Lockable == FALSE) FIXME("Create surface called with a pool of SYSTEMMEM and a Lockable of FALSE, \
|
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");
|
this is acceptable but unexpected (I can't know how the surface can be usable!)\n");
|
||||||
case D3DPOOL_MANAGED:
|
case WINED3DPOOL_MANAGED:
|
||||||
if(Usage == WINED3DUSAGE_DYNAMIC) FIXME("Create surface called with a pool of MANAGED and a \
|
if(Usage == WINED3DUSAGE_DYNAMIC) FIXME("Create surface called with a pool of MANAGED and a \
|
||||||
Usage of DYNAMIC which are mutually exclusive, not doing \
|
Usage of DYNAMIC which are mutually exclusive, not doing \
|
||||||
anything just telling you.\n");
|
anything just telling you.\n");
|
||||||
break;
|
break;
|
||||||
case D3DPOOL_DEFAULT: /*TODO: Create offscreen plain can cause this check to fail..., find out if it should */
|
case WINED3DPOOL_DEFAULT: /*TODO: Create offscreen plain can cause this check to fail..., find out if it should */
|
||||||
if(!(Usage & WINED3DUSAGE_DYNAMIC) && !(Usage & WINED3DUSAGE_RENDERTARGET)
|
if(!(Usage & WINED3DUSAGE_DYNAMIC) && !(Usage & WINED3DUSAGE_RENDERTARGET)
|
||||||
&& !(Usage && WINED3DUSAGE_DEPTHSTENCIL ) && Lockable == TRUE)
|
&& !(Usage && WINED3DUSAGE_DEPTHSTENCIL ) && Lockable == TRUE)
|
||||||
FIXME("Creating a surface with a POOL of DEFAULT with Locable true, that doesn't specify DYNAMIC usage.\n");
|
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;
|
break;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Usage & WINED3DUSAGE_RENDERTARGET && Pool != D3DPOOL_DEFAULT) {
|
if (Usage & WINED3DUSAGE_RENDERTARGET && Pool != WINED3DPOOL_DEFAULT) {
|
||||||
FIXME("Trying to create a render target that isn't in the default pool\n");
|
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,
|
HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, UINT Width, UINT Height, UINT Levels,
|
||||||
DWORD Usage, WINED3DFORMAT Format, D3DPOOL Pool,
|
DWORD Usage, WINED3DFORMAT Format, WINED3DPOOL Pool,
|
||||||
IWineD3DTexture** ppTexture, HANDLE* pSharedHandle, IUnknown *parent,
|
IWineD3DTexture** ppTexture, HANDLE* pSharedHandle, IUnknown *parent,
|
||||||
D3DCB_CREATESURFACEFN D3DCB_CreateSurface) {
|
D3DCB_CREATESURFACEFN D3DCB_CreateSurface) {
|
||||||
|
|
||||||
|
@ -906,7 +906,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, UINT Wid
|
||||||
HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface,
|
HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface,
|
||||||
UINT Width, UINT Height, UINT Depth,
|
UINT Width, UINT Height, UINT Depth,
|
||||||
UINT Levels, DWORD Usage,
|
UINT Levels, DWORD Usage,
|
||||||
WINED3DFORMAT Format, D3DPOOL Pool,
|
WINED3DFORMAT Format, WINED3DPOOL Pool,
|
||||||
IWineD3DVolumeTexture **ppVolumeTexture,
|
IWineD3DVolumeTexture **ppVolumeTexture,
|
||||||
HANDLE *pSharedHandle, IUnknown *parent,
|
HANDLE *pSharedHandle, IUnknown *parent,
|
||||||
D3DCB_CREATEVOLUMEFN D3DCB_CreateVolume) {
|
D3DCB_CREATEVOLUMEFN D3DCB_CreateVolume) {
|
||||||
|
@ -978,7 +978,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface,
|
||||||
HRESULT WINAPI IWineD3DDeviceImpl_CreateVolume(IWineD3DDevice *iface,
|
HRESULT WINAPI IWineD3DDeviceImpl_CreateVolume(IWineD3DDevice *iface,
|
||||||
UINT Width, UINT Height, UINT Depth,
|
UINT Width, UINT Height, UINT Depth,
|
||||||
DWORD Usage,
|
DWORD Usage,
|
||||||
WINED3DFORMAT Format, D3DPOOL Pool,
|
WINED3DFORMAT Format, WINED3DPOOL Pool,
|
||||||
IWineD3DVolume** ppVolume,
|
IWineD3DVolume** ppVolume,
|
||||||
HANDLE* pSharedHandle, IUnknown *parent) {
|
HANDLE* pSharedHandle, IUnknown *parent) {
|
||||||
|
|
||||||
|
@ -1006,7 +1006,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVolume(IWineD3DDevice *iface,
|
||||||
|
|
||||||
HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface, UINT EdgeLength,
|
HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface, UINT EdgeLength,
|
||||||
UINT Levels, DWORD Usage,
|
UINT Levels, DWORD Usage,
|
||||||
WINED3DFORMAT Format, D3DPOOL Pool,
|
WINED3DFORMAT Format, WINED3DPOOL Pool,
|
||||||
IWineD3DCubeTexture **ppCubeTexture,
|
IWineD3DCubeTexture **ppCubeTexture,
|
||||||
HANDLE *pSharedHandle, IUnknown *parent,
|
HANDLE *pSharedHandle, IUnknown *parent,
|
||||||
D3DCB_CREATESURFACEFN D3DCB_CreateSurface) {
|
D3DCB_CREATESURFACEFN D3DCB_CreateSurface) {
|
||||||
|
@ -4678,11 +4678,11 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD Stage,
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pTexture != NULL) {
|
if(pTexture != NULL) {
|
||||||
/* SetTexture isn't allowed on textures in D3DPOOL_SCRATCH; The same is
|
/* SetTexture isn't allowed on textures in WINED3DPOOL_SCRATCH; The same is
|
||||||
* the case for D3DPOOL_SYSTEMMEM textures unless WINED3DDEVCAPS_TEXTURESYSTEMMORY is set.
|
* the case for WINED3DPOOL_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.
|
* 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 == WINED3DPOOL_SYSTEMMEM) {
|
||||||
WARN("(%p) Attempt to set scratch texture rejected\n", pTexture);
|
WARN("(%p) Attempt to set scratch texture rejected\n", pTexture);
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
@ -5503,7 +5503,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, IWineD3
|
||||||
WINED3DFORMAT destFormat, srcFormat;
|
WINED3DFORMAT destFormat, srcFormat;
|
||||||
UINT destSize;
|
UINT destSize;
|
||||||
int destLeft, destTop;
|
int destLeft, destTop;
|
||||||
D3DPOOL srcPool, destPool;
|
WINED3DPOOL srcPool, destPool;
|
||||||
int offset = 0;
|
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 */
|
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;
|
glDescriptor *glDescription = NULL;
|
||||||
|
@ -5529,7 +5529,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, IWineD3
|
||||||
|
|
||||||
IWineD3DSurface_GetDesc(pDestinationSurface, &winedesc);
|
IWineD3DSurface_GetDesc(pDestinationSurface, &winedesc);
|
||||||
|
|
||||||
if(srcPool != D3DPOOL_SYSTEMMEM || destPool != D3DPOOL_DEFAULT){
|
if(srcPool != WINED3DPOOL_SYSTEMMEM || destPool != WINED3DPOOL_DEFAULT){
|
||||||
WARN("source %p must be SYSTEMMEM and dest %p must be DEFAULT, returning D3DERR_INVALIDCALL\n", pSourceSurface, pDestinationSurface);
|
WARN("source %p must be SYSTEMMEM and dest %p must be DEFAULT, returning D3DERR_INVALIDCALL\n", pSourceSurface, pDestinationSurface);
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
@ -5706,7 +5706,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CopyRects(IWineD3DDevice *iface,
|
||||||
pSourceSurface, pSourceRectsArray, cRects, pDestinationSurface, pDestPointsArray);
|
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 WINED3DPOOL_DEFAULT */
|
||||||
memset(&winedesc, 0, sizeof(winedesc));
|
memset(&winedesc, 0, sizeof(winedesc));
|
||||||
|
|
||||||
winedesc.Format = &srcFormat;
|
winedesc.Format = &srcFormat;
|
||||||
|
@ -5847,8 +5847,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface, IWineD3DSurfa
|
||||||
DWORD *data;
|
DWORD *data;
|
||||||
TRACE("(%p) Colour fill Surface: %p rect: %p color: %ld\n", This, pSurface, pRect, color);
|
TRACE("(%p) Colour fill Surface: %p rect: %p color: %ld\n", This, pSurface, pRect, color);
|
||||||
|
|
||||||
if (surface->resource.pool != D3DPOOL_DEFAULT) {
|
if (surface->resource.pool != WINED3DPOOL_DEFAULT) {
|
||||||
FIXME("call to colorfill with non D3DPOOL_DEFAULT surface\n");
|
FIXME("call to colorfill with non WINED3DPOOL_DEFAULT surface\n");
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6501,7 +6501,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_TestCooperativeLevel(IWineD3DDevice* iface)
|
||||||
{
|
{
|
||||||
ResourceList *resourceList = This->resources;
|
ResourceList *resourceList = This->resources;
|
||||||
while (NULL != resourceList) {
|
while (NULL != resourceList) {
|
||||||
if (((IWineD3DResourceImpl *)resourceList->resource)->resource.pool == D3DPOOL_DEFAULT /* TODO: IWineD3DResource_GetPool(resourceList->resource)*/)
|
if (((IWineD3DResourceImpl *)resourceList->resource)->resource.pool == WINED3DPOOL_DEFAULT /* TODO: IWineD3DResource_GetPool(resourceList->resource)*/)
|
||||||
return D3DERR_DEVICENOTRESET;
|
return D3DERR_DEVICENOTRESET;
|
||||||
resourceList = resourceList->next;
|
resourceList = resourceList->next;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ ULONG WINAPI IWineD3DResourceImpl_Release(IWineD3DResource *iface) {
|
||||||
void IWineD3DResourceImpl_CleanUp(IWineD3DResource *iface){
|
void IWineD3DResourceImpl_CleanUp(IWineD3DResource *iface){
|
||||||
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface;
|
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface;
|
||||||
TRACE("(%p) Cleaning up resource\n", This);
|
TRACE("(%p) Cleaning up resource\n", This);
|
||||||
if (This->resource.pool == D3DPOOL_DEFAULT) {
|
if (This->resource.pool == WINED3DPOOL_DEFAULT) {
|
||||||
TRACE("Decrementing device memory pool by %u\n", This->resource.size);
|
TRACE("Decrementing device memory pool by %u\n", This->resource.size);
|
||||||
globalChangeGlRam(-This->resource.size);
|
globalChangeGlRam(-This->resource.size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,7 +143,7 @@ void WINAPI IWineD3DSurfaceImpl_PreLoad(IWineD3DSurface *iface) {
|
||||||
FIXME("Mipmap surface has a glTexture bound to it!\n");
|
FIXME("Mipmap surface has a glTexture bound to it!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (This->resource.pool == D3DPOOL_DEFAULT) {
|
if (This->resource.pool == WINED3DPOOL_DEFAULT) {
|
||||||
/* Tell opengl to try and keep this texture in video ram (well mostly) */
|
/* Tell opengl to try and keep this texture in video ram (well mostly) */
|
||||||
GLclampf tmp;
|
GLclampf tmp;
|
||||||
tmp = 0.9f;
|
tmp = 0.9f;
|
||||||
|
@ -258,7 +258,7 @@ void WINAPI IWineD3DSurfaceImpl_GetGlDesc(IWineD3DSurface *iface, glDescriptor *
|
||||||
const void *WINAPI IWineD3DSurfaceImpl_GetData(IWineD3DSurface *iface) {
|
const void *WINAPI IWineD3DSurfaceImpl_GetData(IWineD3DSurface *iface) {
|
||||||
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)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 */
|
/* 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 != WINED3DPOOL_SYSTEMMEM) {
|
||||||
FIXME(" (%p)Attempting to get system memory for a non-system memory texture\n", iface);
|
FIXME(" (%p)Attempting to get system memory for a non-system memory texture\n", iface);
|
||||||
}
|
}
|
||||||
return (CONST void*)(This->resource.allocatedMemory);
|
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
|
* 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.
|
* 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 == WINED3DPOOL_SYSTEMMEM)
|
||||||
{
|
{
|
||||||
FIXME("(%p) Operation not supported for scratch or SYSTEMMEM textures\n",This);
|
FIXME("(%p) Operation not supported for scratch or SYSTEMMEM textures\n",This);
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
|
|
|
@ -338,16 +338,16 @@ const char* debug_d3dtexturestate(DWORD state) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* debug_d3dpool(D3DPOOL Pool) {
|
const char* debug_d3dpool(WINED3DPOOL Pool) {
|
||||||
switch (Pool) {
|
switch (Pool) {
|
||||||
#define POOL_TO_STR(p) case p: return #p;
|
#define POOL_TO_STR(p) case p: return #p;
|
||||||
POOL_TO_STR(D3DPOOL_DEFAULT);
|
POOL_TO_STR(WINED3DPOOL_DEFAULT);
|
||||||
POOL_TO_STR(D3DPOOL_MANAGED);
|
POOL_TO_STR(WINED3DPOOL_MANAGED);
|
||||||
POOL_TO_STR(D3DPOOL_SYSTEMMEM);
|
POOL_TO_STR(WINED3DPOOL_SYSTEMMEM);
|
||||||
POOL_TO_STR(D3DPOOL_SCRATCH);
|
POOL_TO_STR(WINED3DPOOL_SCRATCH);
|
||||||
#undef POOL_TO_STR
|
#undef POOL_TO_STR
|
||||||
default:
|
default:
|
||||||
FIXME("Unrecognized %u D3DPOOL!\n", Pool);
|
FIXME("Unrecognized %u WINED3DPOOL!\n", Pool);
|
||||||
return "unrecognized";
|
return "unrecognized";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -602,7 +602,7 @@ typedef struct IWineD3DResourceClass
|
||||||
IUnknown *parent;
|
IUnknown *parent;
|
||||||
WINED3DRESOURCETYPE resourceType;
|
WINED3DRESOURCETYPE resourceType;
|
||||||
IWineD3DDeviceImpl *wineD3DDevice;
|
IWineD3DDeviceImpl *wineD3DDevice;
|
||||||
D3DPOOL pool;
|
WINED3DPOOL pool;
|
||||||
UINT size;
|
UINT size;
|
||||||
DWORD usage;
|
DWORD usage;
|
||||||
WINED3DFORMAT format;
|
WINED3DFORMAT format;
|
||||||
|
@ -1075,7 +1075,7 @@ const char* debug_d3dusage(DWORD usage);
|
||||||
const char* debug_d3dprimitivetype(D3DPRIMITIVETYPE PrimitiveType);
|
const char* debug_d3dprimitivetype(D3DPRIMITIVETYPE PrimitiveType);
|
||||||
const char* debug_d3drenderstate(DWORD state);
|
const char* debug_d3drenderstate(DWORD state);
|
||||||
const char* debug_d3dtexturestate(DWORD state);
|
const char* debug_d3dtexturestate(DWORD state);
|
||||||
const char* debug_d3dpool(D3DPOOL pool);
|
const char* debug_d3dpool(WINED3DPOOL pool);
|
||||||
|
|
||||||
/* Routines for GL <-> D3D values */
|
/* Routines for GL <-> D3D values */
|
||||||
GLenum StencilOp(DWORD op);
|
GLenum StencilOp(DWORD op);
|
||||||
|
|
|
@ -175,7 +175,7 @@ typedef HRESULT WINAPI (*D3DCB_CREATESURFACEFN) (IUnknown *pDevice,
|
||||||
UINT Height,
|
UINT Height,
|
||||||
WINED3DFORMAT Format,
|
WINED3DFORMAT Format,
|
||||||
DWORD Usage,
|
DWORD Usage,
|
||||||
D3DPOOL Pool,
|
WINED3DPOOL Pool,
|
||||||
UINT Level,
|
UINT Level,
|
||||||
struct IWineD3DSurface **ppSurface,
|
struct IWineD3DSurface **ppSurface,
|
||||||
HANDLE *pSharedHandle);
|
HANDLE *pSharedHandle);
|
||||||
|
@ -196,7 +196,7 @@ typedef HRESULT WINAPI (*D3DCB_CREATEVOLUMEFN) (IUnknown *pDevice,
|
||||||
UINT Height,
|
UINT Height,
|
||||||
UINT Depth,
|
UINT Depth,
|
||||||
WINED3DFORMAT Format,
|
WINED3DFORMAT Format,
|
||||||
D3DPOOL Pool,
|
WINED3DPOOL Pool,
|
||||||
DWORD Usage,
|
DWORD Usage,
|
||||||
struct IWineD3DVolume **ppVolume,
|
struct IWineD3DVolume **ppVolume,
|
||||||
HANDLE *pSharedHandle);
|
HANDLE *pSharedHandle);
|
||||||
|
@ -303,14 +303,14 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
|
||||||
/*** IWineD3DBase methods ***/
|
/*** IWineD3DBase methods ***/
|
||||||
STDMETHOD(GetParent)(THIS_ IUnknown **pParent) PURE;
|
STDMETHOD(GetParent)(THIS_ IUnknown **pParent) PURE;
|
||||||
/*** IWineD3DDevice methods ***/
|
/*** IWineD3DDevice methods ***/
|
||||||
STDMETHOD(CreateVertexBuffer)(THIS_ UINT Length,DWORD Usage,DWORD FVF,D3DPOOL Pool,struct IWineD3DVertexBuffer **ppVertexBuffer, HANDLE *sharedHandle, IUnknown *parent) PURE;
|
STDMETHOD(CreateVertexBuffer)(THIS_ UINT Length,DWORD Usage,DWORD FVF,WINED3DPOOL 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(CreateIndexBuffer)(THIS_ UINT Length, DWORD Usage, WINED3DFORMAT Format, WINED3DPOOL Pool, struct IWineD3DIndexBuffer** ppIndexBuffer, HANDLE* pSharedHandle, IUnknown *parent) PURE;
|
||||||
STDMETHOD(CreateStateBlock)(THIS_ WINED3DSTATEBLOCKTYPE Type, struct IWineD3DStateBlock **ppStateBlock, 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(CreateSurface)(THIS_ UINT Width, UINT Height, WINED3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, struct IWineD3DSurface** ppSurface, WINED3DRESOURCETYPE Type, DWORD Usage, WINED3DPOOL 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(CreateTexture)(THIS_ UINT Width, UINT Height, UINT Levels, DWORD Usage, WINED3DFORMAT Format, WINED3DPOOL 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(CreateVolumeTexture)(THIS_ UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, WINED3DFORMAT Format, WINED3DPOOL 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(CreateVolume)(THIS_ UINT Width, UINT Height, UINT Depth, DWORD Usage, WINED3DFORMAT Format, WINED3DPOOL 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(CreateCubeTexture)(THIS_ UINT EdgeLength, UINT Levels, DWORD Usage, WINED3DFORMAT Format, WINED3DPOOL Pool, struct IWineD3DCubeTexture** ppCubeTexture, HANDLE* pSharedHandle, IUnknown *parent, D3DCB_CREATESURFACEFN pFn) PURE;
|
||||||
STDMETHOD(CreateQuery)(THIS_ WINED3DQUERYTYPE Type, struct IWineD3DQuery **ppQuery, IUnknown *pParent);
|
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(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;
|
STDMETHOD(CreateVertexDeclaration)(THIS_ CONST VOID* pDeclaration, struct IWineD3DVertexDeclaration** ppDecl, IUnknown* pParent) PURE;
|
||||||
|
|
|
@ -503,12 +503,21 @@ typedef enum _WINED3DRESOURCETYPE {
|
||||||
|
|
||||||
#define WINED3DRTYPECOUNT (WINED3DRTYPE_INDEXBUFFER+1)
|
#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
|
typedef struct _WINED3DSURFACE_DESC
|
||||||
{
|
{
|
||||||
WINED3DFORMAT *Format;
|
WINED3DFORMAT *Format;
|
||||||
WINED3DRESOURCETYPE *Type;
|
WINED3DRESOURCETYPE *Type;
|
||||||
DWORD *Usage;
|
DWORD *Usage;
|
||||||
D3DPOOL *Pool;
|
WINED3DPOOL *Pool;
|
||||||
UINT *Size;
|
UINT *Size;
|
||||||
|
|
||||||
WINED3DMULTISAMPLE_TYPE *MultiSampleType;
|
WINED3DMULTISAMPLE_TYPE *MultiSampleType;
|
||||||
|
@ -522,7 +531,7 @@ typedef struct _WINED3DVOLUME_DESC
|
||||||
WINED3DFORMAT *Format;
|
WINED3DFORMAT *Format;
|
||||||
WINED3DRESOURCETYPE *Type;
|
WINED3DRESOURCETYPE *Type;
|
||||||
DWORD *Usage;
|
DWORD *Usage;
|
||||||
D3DPOOL *Pool;
|
WINED3DPOOL *Pool;
|
||||||
UINT *Size;
|
UINT *Size;
|
||||||
|
|
||||||
UINT *Width;
|
UINT *Width;
|
||||||
|
@ -643,7 +652,7 @@ typedef struct _WINED3DVERTEXBUFFER_DESC {
|
||||||
WINED3DFORMAT Format;
|
WINED3DFORMAT Format;
|
||||||
WINED3DRESOURCETYPE Type;
|
WINED3DRESOURCETYPE Type;
|
||||||
DWORD Usage;
|
DWORD Usage;
|
||||||
D3DPOOL Pool;
|
WINED3DPOOL Pool;
|
||||||
UINT Size;
|
UINT Size;
|
||||||
DWORD FVF;
|
DWORD FVF;
|
||||||
} WINED3DVERTEXBUFFER_DESC;
|
} WINED3DVERTEXBUFFER_DESC;
|
||||||
|
@ -652,7 +661,7 @@ typedef struct _WINED3DINDEXBUFFER_DESC {
|
||||||
WINED3DFORMAT Format;
|
WINED3DFORMAT Format;
|
||||||
WINED3DRESOURCETYPE Type;
|
WINED3DRESOURCETYPE Type;
|
||||||
DWORD Usage;
|
DWORD Usage;
|
||||||
D3DPOOL Pool;
|
WINED3DPOOL Pool;
|
||||||
UINT Size;
|
UINT Size;
|
||||||
} WINED3DINDEXBUFFER_DESC;
|
} WINED3DINDEXBUFFER_DESC;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue