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