Fix D3D8 compilation. Change-Id: I29e493f91df9ebef948b02096421102eb328d545 Reviewed-on: https://swiftshader-review.googlesource.com/14490 Reviewed-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Nicolas Capens <nicolascapens@google.com> Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/D3D8/Direct3DDevice8.cpp b/src/D3D8/Direct3DDevice8.cpp index 7f6e769..5c85f83 100644 --- a/src/D3D8/Direct3DDevice8.cpp +++ b/src/D3D8/Direct3DDevice8.cpp
@@ -2149,7 +2149,7 @@ cursorBitmap->LockRect(&lock, 0, 0); delete cursor; - cursor = sw::Surface::create(0, desc.Width, desc.Height, 1, sw::FORMAT_A8R8G8B8, false, false); + cursor = sw::Surface::create(0, desc.Width, desc.Height, 1, 0, sw::FORMAT_A8R8G8B8, false, false); void *buffer = cursor->lockExternal(0, 0, 0, sw::LOCK_DISCARD, sw::PUBLIC); memcpy(buffer, lock.pBits, desc.Width * desc.Height * sizeof(unsigned int));
diff --git a/src/D3D8/Direct3DSurface8.cpp b/src/D3D8/Direct3DSurface8.cpp index c76b982..d744727 100644 --- a/src/D3D8/Direct3DSurface8.cpp +++ b/src/D3D8/Direct3DSurface8.cpp
@@ -58,7 +58,8 @@ return 1; } - Direct3DSurface8::Direct3DSurface8(Direct3DDevice8 *device, Unknown *container, int width, int height, D3DFORMAT format, D3DPOOL pool, D3DMULTISAMPLE_TYPE multiSample, bool lockable, unsigned long usage) : Surface(getParentResource(container), width, height, sampleCount(multiSample), translateFormat(format), lockable, (usage & D3DUSAGE_RENDERTARGET) == D3DUSAGE_RENDERTARGET || (usage & D3DUSAGE_DEPTHSTENCIL) == D3DUSAGE_DEPTHSTENCIL), device(device), container(container), width(width), height(height), format(format), pool(pool), multiSample(multiSample), lockable(lockable), usage(usage) + Direct3DSurface8::Direct3DSurface8(Direct3DDevice8 *device, Unknown *container, int width, int height, D3DFORMAT format, D3DPOOL pool, D3DMULTISAMPLE_TYPE multiSample, bool lockable, unsigned long usage) + : Surface(getParentResource(container), width, height, sampleCount(multiSample), 0, translateFormat(format), lockable, (usage & D3DUSAGE_RENDERTARGET) == D3DUSAGE_RENDERTARGET || (usage & D3DUSAGE_DEPTHSTENCIL) == D3DUSAGE_DEPTHSTENCIL), device(device), container(container), width(width), height(height), format(format), pool(pool), multiSample(multiSample), lockable(lockable), usage(usage) { parentTexture = dynamic_cast<Direct3DBaseTexture8*>(container);
diff --git a/src/D3D8/Direct3DVolume8.cpp b/src/D3D8/Direct3DVolume8.cpp index 0191a66..e04cb48 100644 --- a/src/D3D8/Direct3DVolume8.cpp +++ b/src/D3D8/Direct3DVolume8.cpp
@@ -23,7 +23,8 @@ namespace D3D8 { - Direct3DVolume8::Direct3DVolume8(Direct3DDevice8 *device, Direct3DVolumeTexture8 *container, int width, int height, int depth, D3DFORMAT format, D3DPOOL pool, bool lockable, unsigned long usage) : Surface(container->getResource(), width, height, depth, translateFormat(format), lockable, false), container(container), width(width), height(height), depth(depth), format(format), pool(pool), lockable(lockable), usage(usage) + Direct3DVolume8::Direct3DVolume8(Direct3DDevice8 *device, Direct3DVolumeTexture8 *container, int width, int height, int depth, D3DFORMAT format, D3DPOOL pool, bool lockable, unsigned long usage) + : Surface(container->getResource(), width, height, depth, 0, translateFormat(format), lockable, false), container(container), width(width), height(height), depth(depth), format(format), pool(pool), lockable(lockable), usage(usage) { resource = new Direct3DResource8(device, D3DRTYPE_VOLUME, memoryUsage(width, height, depth, format)); }