Commit 2a84d80f by Nicolas Capens Committed by Nicolas Capens

Fix D3D8 compilation.

Change-Id: I29e493f91df9ebef948b02096421102eb328d545 Reviewed-on: https://swiftshader-review.googlesource.com/14490Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 5815e125
...@@ -2149,7 +2149,7 @@ namespace D3D8 ...@@ -2149,7 +2149,7 @@ namespace D3D8
cursorBitmap->LockRect(&lock, 0, 0); cursorBitmap->LockRect(&lock, 0, 0);
delete cursor; 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); void *buffer = cursor->lockExternal(0, 0, 0, sw::LOCK_DISCARD, sw::PUBLIC);
memcpy(buffer, lock.pBits, desc.Width * desc.Height * sizeof(unsigned int)); memcpy(buffer, lock.pBits, desc.Width * desc.Height * sizeof(unsigned int));
......
...@@ -58,7 +58,8 @@ namespace D3D8 ...@@ -58,7 +58,8 @@ namespace D3D8
return 1; 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); parentTexture = dynamic_cast<Direct3DBaseTexture8*>(container);
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
namespace D3D8 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)); resource = new Direct3DResource8(device, D3DRTYPE_VOLUME, memoryUsage(width, height, depth, format));
} }
......
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