wined3d: The currentDesc and pow2 width/height are the same for power of two textures.
This commit is contained in:
parent
65797d7f75
commit
7f6ab3c06e
|
@ -4515,22 +4515,10 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D
|
||||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, width);
|
glPixelStorei(GL_UNPACK_ROW_LENGTH, width);
|
||||||
LEAVE_GL();
|
LEAVE_GL();
|
||||||
|
|
||||||
if (This->Flags & SFLAG_NONPOW2) {
|
if (mem || (This->Flags & SFLAG_PBO))
|
||||||
TRACE("non power of two support\n");
|
{
|
||||||
if (mem || (This->Flags & SFLAG_PBO))
|
surface_upload_data(This, gl_info, &desc, srgb,
|
||||||
{
|
This->currentDesc.Width, This->currentDesc.Height, mem);
|
||||||
surface_upload_data(This, gl_info, &desc, srgb,
|
|
||||||
This->currentDesc.Width, This->currentDesc.Height, mem);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
/* When making the realloc conditional, keep in mind that GL_APPLE_client_storage may be in use, and This->resource.allocatedMemory
|
|
||||||
* changed. So also keep track of memory changes. In this case the texture has to be reallocated
|
|
||||||
*/
|
|
||||||
if (mem || (This->Flags & SFLAG_PBO))
|
|
||||||
{
|
|
||||||
surface_upload_data(This, gl_info, &desc, srgb,
|
|
||||||
This->pow2Width, This->pow2Height, mem);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Restore the default pitch */
|
/* Restore the default pitch */
|
||||||
|
|
Loading…
Reference in New Issue