Commit 360361a4 by Nicolas Capens

Fix GL and D3D9 compilation.

Change-Id: I12fdf25465176ed9b0c2e95ef398b8b469419b6e Reviewed-on: https://swiftshader-review.googlesource.com/4311Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com>
parent a2d2055e
...@@ -148,6 +148,7 @@ namespace D3D9 ...@@ -148,6 +148,7 @@ namespace D3D9
HWND window = destWindowOverride ? destWindowOverride : presentParameters.hDeviceWindow; HWND window = destWindowOverride ? destWindowOverride : presentParameters.hDeviceWindow;
void *source = backBuffer[0]->lockInternal(0, 0, 0, sw::LOCK_READONLY, sw::PUBLIC); // FIXME: External void *source = backBuffer[0]->lockInternal(0, 0, 0, sw::LOCK_READONLY, sw::PUBLIC); // FIXME: External
sw::Format format = backBuffer[0]->getInternalFormat(); sw::Format format = backBuffer[0]->getInternalFormat();
int stride = backBuffer[0]->getInternalPitchB();
POINT point; POINT point;
GetCursorPos(&point); GetCursorPos(&point);
...@@ -157,7 +158,7 @@ namespace D3D9 ...@@ -157,7 +158,7 @@ namespace D3D9
if(!sourceRect && !destRect) // FIXME: More cases? if(!sourceRect && !destRect) // FIXME: More cases?
{ {
frameBuffer->flip(window, source, format); frameBuffer->flip(window, source, format, stride);
} }
else // FIXME: Check for SWAPEFFECT_COPY else // FIXME: Check for SWAPEFFECT_COPY
{ {
...@@ -180,7 +181,7 @@ namespace D3D9 ...@@ -180,7 +181,7 @@ namespace D3D9
dRect.y1 = destRect->bottom; dRect.y1 = destRect->bottom;
} }
frameBuffer->blit(window, source, sourceRect ? &sRect : 0, destRect ? &dRect : 0, format); frameBuffer->blit(window, source, sourceRect ? &sRect : 0, destRect ? &dRect : 0, format, stride);
} }
backBuffer[0]->unlockInternal(); // FIXME: External backBuffer[0]->unlockInternal(); // FIXME: External
......
...@@ -158,7 +158,7 @@ void Surface::swap() ...@@ -158,7 +158,7 @@ void Surface::swap()
if(backBuffer) if(backBuffer)
{ {
void *source = backBuffer->lockInternal(0, 0, 0, sw::LOCK_READONLY, sw::PUBLIC); void *source = backBuffer->lockInternal(0, 0, 0, sw::LOCK_READONLY, sw::PUBLIC);
frameBuffer->flip(source, backBuffer->getInternalFormat()); frameBuffer->flip(source, backBuffer->Surface::getInternalFormat(), backBuffer->getInternalPitchB());
backBuffer->unlockInternal(); backBuffer->unlockInternal();
checkForResize(); checkForResize();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment