mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
d3d: Pass the cube face to Create*Texture's surface creation callback.
This commit is contained in:
parent
7ca369d9b6
commit
94b3fddec8
7 changed files with 13 additions and 6 deletions
|
@ -626,7 +626,8 @@ size_t convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3d8_el
|
|||
/* Callbacks */
|
||||
extern HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
|
||||
WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
|
||||
IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
|
||||
WINED3DCUBEMAP_FACES Face, IWineD3DSurface** ppSurface,
|
||||
HANDLE* pSharedHandle);
|
||||
|
||||
extern HRESULT WINAPI D3D8CB_CreateVolume(IUnknown *pDevice, IUnknown *pSuperior, UINT Width, UINT Height, UINT Depth,
|
||||
WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage,
|
||||
|
|
|
@ -1769,7 +1769,8 @@ const IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl =
|
|||
/* Internal function called back during the CreateDevice to create a render target */
|
||||
HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
|
||||
WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
|
||||
IWineD3DSurface **ppSurface, HANDLE *pSharedHandle) {
|
||||
WINED3DCUBEMAP_FACES Face, IWineD3DSurface **ppSurface,
|
||||
HANDLE *pSharedHandle) {
|
||||
|
||||
HRESULT res = D3D_OK;
|
||||
IDirect3DSurface8Impl *d3dSurface = NULL;
|
||||
|
|
|
@ -552,7 +552,8 @@ typedef struct IDirect3DQuery9Impl {
|
|||
/* Callbacks */
|
||||
extern HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
|
||||
WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
|
||||
IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
|
||||
WINED3DCUBEMAP_FACES Face, IWineD3DSurface** ppSurface,
|
||||
HANDLE* pSharedHandle);
|
||||
|
||||
extern HRESULT WINAPI D3D9CB_CreateVolume(IUnknown *pDevice, IUnknown *pSuperior, UINT Width, UINT Height, UINT Depth,
|
||||
WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage,
|
||||
|
|
|
@ -1085,7 +1085,8 @@ const IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl =
|
|||
/* Internal function called back during the CreateDevice to create a render target */
|
||||
HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
|
||||
WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
|
||||
IWineD3DSurface** ppSurface, HANDLE* pSharedHandle) {
|
||||
WINED3DCUBEMAP_FACES Face,IWineD3DSurface** ppSurface,
|
||||
HANDLE* pSharedHandle) {
|
||||
|
||||
HRESULT res = D3D_OK;
|
||||
IDirect3DSurface9Impl *d3dSurface = NULL;
|
||||
|
|
|
@ -1578,6 +1578,7 @@ IDirectDrawImpl_RecreateAllSurfaces(IDirectDrawImpl *This)
|
|||
* Format: The requested format
|
||||
* Usage, Pool: D3DUSAGE and D3DPOOL of the surface
|
||||
* level: The mipmap level
|
||||
* Face: The cube map face type
|
||||
* Surface: Pointer to pass the created surface back at
|
||||
* SharedHandle: NULL
|
||||
*
|
||||
|
@ -1591,6 +1592,7 @@ D3D7CB_CreateSurface(IUnknown *device,
|
|||
UINT Width, UINT Height,
|
||||
WINED3DFORMAT Format,
|
||||
DWORD Usage, WINED3DPOOL Pool, UINT level,
|
||||
WINED3DCUBEMAP_FACES Face,
|
||||
IWineD3DSurface **Surface,
|
||||
HANDLE *SharedHandle)
|
||||
{
|
||||
|
|
|
@ -851,7 +851,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U
|
|||
for (i = 0; i < object->baseTexture.levels; i++)
|
||||
{
|
||||
/* use the callback to create the texture surface */
|
||||
hr = D3DCB_CreateSurface(This->parent, parent, tmpW, tmpH, Format, Usage, Pool, i, &object->surfaces[i],NULL);
|
||||
hr = D3DCB_CreateSurface(This->parent, parent, tmpW, tmpH, Format, Usage, Pool, i, WINED3DCUBEMAP_FACE_POSITIVE_X, &object->surfaces[i],NULL);
|
||||
if (hr!= WINED3D_OK || ( (IWineD3DSurfaceImpl *) object->surfaces[i])->Flags & SFLAG_OVERSIZE) {
|
||||
FIXME("Failed to create surface %p\n", object);
|
||||
/* clean up */
|
||||
|
@ -1046,7 +1046,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
|
|||
for (j = 0; j < 6; j++) {
|
||||
|
||||
hr=D3DCB_CreateSurface(This->parent, parent, tmpW, tmpW, Format, Usage, Pool,
|
||||
i /* Level */, &object->surfaces[j][i],pSharedHandle);
|
||||
i /* Level */, j, &object->surfaces[j][i],pSharedHandle);
|
||||
|
||||
if(hr!= WINED3D_OK) {
|
||||
/* clean up */
|
||||
|
|
|
@ -209,6 +209,7 @@ typedef HRESULT WINAPI (*D3DCB_CREATESURFACEFN) (IUnknown *pDevice,
|
|||
DWORD Usage,
|
||||
WINED3DPOOL Pool,
|
||||
UINT Level,
|
||||
WINED3DCUBEMAP_FACES Face,
|
||||
struct IWineD3DSurface **ppSurface,
|
||||
HANDLE *pSharedHandle);
|
||||
|
||||
|
|
Loading…
Reference in a new issue