/* Calculate the correct start address to report */
if(NULL==pRect){
This->lockedRect.left=0;
This->lockedRect.top=0;
This->lockedRect.right=This->currentDesc.Width;
This->lockedRect.bottom=This->currentDesc.Height;
TRACE("Locked Rect (%p) = l %d, t %d, r %d, b %d\n",&This->lockedRect,This->lockedRect.left,This->lockedRect.top,This->lockedRect.right,This->lockedRect.bottom);
}else{
This->lockedRect.left=pRect->left;
This->lockedRect.top=pRect->top;
This->lockedRect.right=pRect->right;
This->lockedRect.bottom=pRect->bottom;
TRACE("Locked Rect (%p) = l %d, t %d, r %d, b %d\n",pRect,pRect->left,pRect->top,pRect->right,pRect->bottom);
}
if(This->Flags&SFLAG_NONPOW2){
TRACE("Locking non-power 2 texture\n");
}
if(Flags&WINED3DLOCK_DISCARD){
/* Set SFLAG_INSYSMEM, so we'll never try to download the data from the texture. */