ddraw: Set the cube map flags for the root surface in ddraw_surface_create_texture() as well.

This commit is contained in:
Henri Verbeet 2013-11-14 10:47:18 +01:00 committed by Alexandre Julliard
parent 80055e1fcd
commit 9e44fadbfe
2 changed files with 3 additions and 11 deletions

View File

@ -3060,13 +3060,6 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD,
desc2.ddsCaps.dwCaps |= DDSCAPS_FRONTBUFFER;
}
/* The root surface in a cube map is positive x */
if(desc2.ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP)
{
desc2.ddsCaps.dwCaps2 &= ~DDSCAPS2_CUBEMAP_ALLFACES;
desc2.ddsCaps.dwCaps2 |= DDSCAPS2_CUBEMAP_POSITIVEX;
}
if ((desc2.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) && (ddraw->cooperative_level & DDSCL_EXCLUSIVE))
{
struct wined3d_swapchain_desc swapchain_desc;

View File

@ -5744,10 +5744,6 @@ HRESULT ddraw_surface_create_texture(struct ddraw *ddraw, DDSURFACEDESC2 *desc,
{
resource = wined3d_texture_get_sub_resource(wined3d_texture, i * levels + j);
mip = wined3d_resource_get_parent(resource);
if (mip == root)
continue;
mip_desc = &mip->surface_desc;
if (j)
@ -5783,6 +5779,9 @@ HRESULT ddraw_surface_create_texture(struct ddraw *ddraw, DDSURFACEDESC2 *desc,
}
if (mip == root)
continue;
*attach = mip;
attach = &mip->complex_array[0];
}