mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
Avoid initial lock surface copy for unmodified surfaces
This commit is contained in:
parent
d0289de9a2
commit
55e08f62d4
@ -59,7 +59,7 @@ namespace D3dDdi
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Resource resource(Resource::create(*this, data));
|
Resource resource(Resource::create(*this, data));
|
||||||
m_resources.emplace(resource, std::move(resource));
|
m_resources.emplace(resource, std::move(resource)).first->second.initialize();
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
catch (const HResultException& e)
|
catch (const HResultException& e)
|
||||||
@ -336,15 +336,19 @@ namespace D3dDdi
|
|||||||
}
|
}
|
||||||
|
|
||||||
Resource* Device::getResource(HANDLE resource)
|
Resource* Device::getResource(HANDLE resource)
|
||||||
|
{
|
||||||
|
auto it = m_resources.find(resource);
|
||||||
|
return it != m_resources.end() ? &it->second : nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
Resource* Device::findResource(HANDLE resource)
|
||||||
{
|
{
|
||||||
for (auto& device : s_devices)
|
for (auto& device : s_devices)
|
||||||
{
|
{
|
||||||
for (auto& res : device.second.getResources())
|
auto res = device.second.getResource(resource);
|
||||||
|
if (res)
|
||||||
{
|
{
|
||||||
if (resource == res.second)
|
return res;
|
||||||
{
|
|
||||||
return &res.second;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -364,7 +368,7 @@ namespace D3dDdi
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_gdiResourceHandle = resource;
|
g_gdiResourceHandle = resource;
|
||||||
g_gdiResource = getResource(resource);
|
g_gdiResource = findResource(resource);
|
||||||
|
|
||||||
if (g_gdiResource)
|
if (g_gdiResource)
|
||||||
{
|
{
|
||||||
|
@ -45,7 +45,7 @@ namespace D3dDdi
|
|||||||
|
|
||||||
Adapter& getAdapter() const { return m_adapter; }
|
Adapter& getAdapter() const { return m_adapter; }
|
||||||
const D3DDDI_DEVICEFUNCS& getOrigVtable() const { return m_origVtable; }
|
const D3DDDI_DEVICEFUNCS& getOrigVtable() const { return m_origVtable; }
|
||||||
std::unordered_map<HANDLE, Resource>& getResources() { return m_resources; }
|
Resource* getResource(HANDLE resource);
|
||||||
|
|
||||||
void addDirtyRenderTarget(Resource& resource, UINT subResourceIndex);
|
void addDirtyRenderTarget(Resource& resource, UINT subResourceIndex);
|
||||||
void addDirtyTexture(Resource& resource, UINT subResourceIndex);
|
void addDirtyTexture(Resource& resource, UINT subResourceIndex);
|
||||||
@ -58,8 +58,8 @@ namespace D3dDdi
|
|||||||
static Device& get(HANDLE device);
|
static Device& get(HANDLE device);
|
||||||
static void remove(HANDLE device);
|
static void remove(HANDLE device);
|
||||||
|
|
||||||
|
static Resource* findResource(HANDLE resource);
|
||||||
static Resource* getGdiResource();
|
static Resource* getGdiResource();
|
||||||
static Resource* getResource(HANDLE resource);
|
|
||||||
static void setGdiResourceHandle(HANDLE resource);
|
static void setGdiResourceHandle(HANDLE resource);
|
||||||
static void setReadOnlyGdiLock(bool enable);
|
static void setReadOnlyGdiLock(bool enable);
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ namespace
|
|||||||
{
|
{
|
||||||
DDraw::ScopedThreadLock ddLock;
|
DDraw::ScopedThreadLock ddLock;
|
||||||
D3dDdi::ScopedCriticalSection driverLock;
|
D3dDdi::ScopedCriticalSection driverLock;
|
||||||
auto primaryResource = D3dDdi::Device::getResource(DDraw::PrimarySurface::getFrontResource());
|
auto primaryResource = D3dDdi::Device::findResource(DDraw::PrimarySurface::getFrontResource());
|
||||||
if (primaryResource && pData->pMemory == primaryResource->getLockPtr(0) &&
|
if (primaryResource && pData->pMemory == primaryResource->getLockPtr(0) &&
|
||||||
(DDraw::PrimarySurface::getOrigCaps() & DDSCAPS_COMPLEX))
|
(DDraw::PrimarySurface::getOrigCaps() & DDSCAPS_COMPLEX))
|
||||||
{
|
{
|
||||||
|
@ -151,7 +151,7 @@ namespace D3dDdi
|
|||||||
data = const_cast<void*>(resource.m_fixedData.pSurfList[subResourceIndex].pSysMem);
|
data = const_cast<void*>(resource.m_fixedData.pSurfList[subResourceIndex].pSysMem);
|
||||||
pitch = resource.m_fixedData.pSurfList[subResourceIndex].SysMemPitch;
|
pitch = resource.m_fixedData.pSurfList[subResourceIndex].SysMemPitch;
|
||||||
}
|
}
|
||||||
else if (subResourceIndex < resource.m_lockData.size())
|
else if (resource.m_lockResource)
|
||||||
{
|
{
|
||||||
if (!resource.m_lockData[subResourceIndex].isSysMemUpToDate)
|
if (!resource.m_lockData[subResourceIndex].isSysMemUpToDate)
|
||||||
{
|
{
|
||||||
@ -189,30 +189,33 @@ namespace D3dDdi
|
|||||||
|
|
||||||
HRESULT Resource::blt(D3DDDIARG_BLT data)
|
HRESULT Resource::blt(D3DDDIARG_BLT data)
|
||||||
{
|
{
|
||||||
|
auto srcResource = m_device.getResource(data.hSrcResource);
|
||||||
|
if (srcResource &&
|
||||||
|
D3DDDIPOOL_SYSTEMMEM == m_fixedData.Pool &&
|
||||||
|
D3DDDIPOOL_SYSTEMMEM == srcResource->m_fixedData.Pool)
|
||||||
|
{
|
||||||
|
return m_device.getOrigVtable().pfnBlt(m_device, &data);
|
||||||
|
}
|
||||||
|
|
||||||
if (isOversized())
|
if (isOversized())
|
||||||
{
|
{
|
||||||
m_device.prepareForRendering(data.hSrcResource, data.SrcSubResourceIndex, true);
|
m_device.prepareForRendering(data.hSrcResource, data.SrcSubResourceIndex, true);
|
||||||
return splitBlt(data, data.DstSubResourceIndex, data.DstRect, data.SrcRect);
|
return splitBlt(data, data.DstSubResourceIndex, data.DstRect, data.SrcRect);
|
||||||
}
|
}
|
||||||
else
|
else if (srcResource)
|
||||||
{
|
{
|
||||||
auto& resources = m_device.getResources();
|
if (srcResource->isOversized())
|
||||||
auto it = resources.find(data.hSrcResource);
|
|
||||||
if (it != resources.end())
|
|
||||||
{
|
{
|
||||||
if (it->second.isOversized())
|
prepareForRendering(data.DstSubResourceIndex, false);
|
||||||
{
|
return srcResource->splitBlt(data, data.SrcSubResourceIndex, data.SrcRect, data.DstRect);
|
||||||
prepareForRendering(data.DstSubResourceIndex, false);
|
}
|
||||||
return it->second.splitBlt(data, data.SrcSubResourceIndex, data.SrcRect, data.DstRect);
|
else if (m_fixedData.Flags.Primary)
|
||||||
}
|
{
|
||||||
else if (m_fixedData.Flags.Primary)
|
return presentationBlt(data, *srcResource);
|
||||||
{
|
}
|
||||||
return presentationBlt(data, it->second);
|
else
|
||||||
}
|
{
|
||||||
else
|
return sysMemPreferredBlt(data, *srcResource);
|
||||||
{
|
|
||||||
return sysMemPreferredBlt(data, it->second);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prepareForRendering(data.DstSubResourceIndex, false);
|
prepareForRendering(data.DstSubResourceIndex, false);
|
||||||
@ -222,13 +225,8 @@ namespace D3dDdi
|
|||||||
HRESULT Resource::bltLock(D3DDDIARG_LOCK& data)
|
HRESULT Resource::bltLock(D3DDDIARG_LOCK& data)
|
||||||
{
|
{
|
||||||
LOG_FUNC("Resource::bltLock", data);
|
LOG_FUNC("Resource::bltLock", data);
|
||||||
if (data.SubResourceIndex >= m_lockData.size())
|
|
||||||
{
|
|
||||||
return LOG_RESULT(m_device.getOrigVtable().pfnLock(m_device, &data));
|
|
||||||
}
|
|
||||||
|
|
||||||
auto& lockData = m_lockData[data.SubResourceIndex];
|
auto& lockData = m_lockData[data.SubResourceIndex];
|
||||||
|
|
||||||
if (!lockData.isSysMemUpToDate)
|
if (!lockData.isSysMemUpToDate)
|
||||||
{
|
{
|
||||||
if (data.Flags.ReadOnly)
|
if (data.Flags.ReadOnly)
|
||||||
@ -260,11 +258,6 @@ namespace D3dDdi
|
|||||||
HRESULT Resource::bltUnlock(const D3DDDIARG_UNLOCK& data)
|
HRESULT Resource::bltUnlock(const D3DDDIARG_UNLOCK& data)
|
||||||
{
|
{
|
||||||
LOG_FUNC("Resource::bltUnlock", data);
|
LOG_FUNC("Resource::bltUnlock", data);
|
||||||
if (data.SubResourceIndex >= m_lockData.size())
|
|
||||||
{
|
|
||||||
return LOG_RESULT(m_device.getOrigVtable().pfnUnlock(m_device, &data));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (0 != m_lockData[data.SubResourceIndex].lockCount)
|
if (0 != m_lockData[data.SubResourceIndex].lockCount)
|
||||||
{
|
{
|
||||||
--m_lockData[data.SubResourceIndex].lockCount;
|
--m_lockData[data.SubResourceIndex].lockCount;
|
||||||
@ -275,7 +268,7 @@ namespace D3dDdi
|
|||||||
HRESULT Resource::colorFill(const D3DDDIARG_COLORFILL& data)
|
HRESULT Resource::colorFill(const D3DDDIARG_COLORFILL& data)
|
||||||
{
|
{
|
||||||
LOG_FUNC("Resource::colorFill", data);
|
LOG_FUNC("Resource::colorFill", data);
|
||||||
if (data.SubResourceIndex < m_lockData.size() && 0 != m_formatInfo.bytesPerPixel)
|
if (m_lockResource && 0 != m_formatInfo.bytesPerPixel)
|
||||||
{
|
{
|
||||||
auto& lockData = m_lockData[data.SubResourceIndex];
|
auto& lockData = m_lockData[data.SubResourceIndex];
|
||||||
if (lockData.isSysMemUpToDate)
|
if (lockData.isSysMemUpToDate)
|
||||||
@ -341,11 +334,16 @@ namespace D3dDdi
|
|||||||
surfaceInfo.pSysMem = gdiSurfaceDesc.lpSurface;
|
surfaceInfo.pSysMem = gdiSurfaceDesc.lpSurface;
|
||||||
surfaceInfo.SysMemPitch = gdiSurfaceDesc.lPitch;
|
surfaceInfo.SysMemPitch = gdiSurfaceDesc.lPitch;
|
||||||
|
|
||||||
|
m_lockData.resize(m_fixedData.SurfCount);
|
||||||
createSysMemResource({ surfaceInfo });
|
createSysMemResource({ surfaceInfo });
|
||||||
if (m_lockResource)
|
if (m_lockResource)
|
||||||
{
|
{
|
||||||
copySubResource(m_handle, m_lockResource, 0);
|
setSysMemUpToDate(0, true);
|
||||||
m_canCreateLockResource = false;
|
setVidMemUpToDate(0, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_lockData.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -378,6 +376,7 @@ namespace D3dDdi
|
|||||||
if (!m_lockResource)
|
if (!m_lockResource)
|
||||||
{
|
{
|
||||||
m_lockBuffers.clear();
|
m_lockBuffers.clear();
|
||||||
|
m_lockData.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -403,21 +402,17 @@ namespace D3dDdi
|
|||||||
reinterpret_cast<D3DDDIARG_CREATERESOURCE*>(&data));
|
reinterpret_cast<D3DDDIARG_CREATERESOURCE*>(&data));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(result))
|
if (SUCCEEDED(result))
|
||||||
{
|
{
|
||||||
LOG_RESULT(nullptr);
|
m_lockResource = data.hResource;
|
||||||
return;
|
for (std::size_t i = 0; i < surfaceInfo.size(); ++i)
|
||||||
|
{
|
||||||
|
m_lockData[i].data = const_cast<void*>(surfaceInfo[i].pSysMem);
|
||||||
|
m_lockData[i].pitch = surfaceInfo[i].SysMemPitch;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_lockResource = data.hResource;
|
m_canCreateLockResource = false;
|
||||||
m_lockData.resize(surfaceInfo.size());
|
|
||||||
for (std::size_t i = 0; i < surfaceInfo.size(); ++i)
|
|
||||||
{
|
|
||||||
m_lockData[i].data = const_cast<void*>(surfaceInfo[i].pSysMem);
|
|
||||||
m_lockData[i].pitch = surfaceInfo[i].SysMemPitch;
|
|
||||||
m_lockData[i].isSysMemUpToDate = false;
|
|
||||||
m_lockData[i].isVidMemUpToDate = true;
|
|
||||||
}
|
|
||||||
LOG_RESULT(m_lockResource);
|
LOG_RESULT(m_lockResource);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -453,9 +448,6 @@ namespace D3dDdi
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource.m_handle = data.hResource;
|
resource.m_handle = data.hResource;
|
||||||
resource.m_canCreateLockResource = D3DDDIPOOL_SYSTEMMEM != data.Pool &&
|
|
||||||
0 != resource.m_formatInfo.bytesPerPixel &&
|
|
||||||
!data.Flags.Primary;
|
|
||||||
data = origData;
|
data = origData;
|
||||||
data.hResource = resource.m_handle;
|
data.hResource = resource.m_handle;
|
||||||
return resource;
|
return resource;
|
||||||
@ -482,7 +474,6 @@ namespace D3dDdi
|
|||||||
}
|
}
|
||||||
m_device.getOrigVtable().pfnDestroyResource(m_device, m_lockResource);
|
m_device.getOrigVtable().pfnDestroyResource(m_device, m_lockResource);
|
||||||
m_lockResource = nullptr;
|
m_lockResource = nullptr;
|
||||||
m_lockData.clear();
|
|
||||||
m_lockBuffers.clear();
|
m_lockBuffers.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -514,15 +505,25 @@ namespace D3dDdi
|
|||||||
|
|
||||||
void* Resource::getLockPtr(UINT subResourceIndex)
|
void* Resource::getLockPtr(UINT subResourceIndex)
|
||||||
{
|
{
|
||||||
if (subResourceIndex < m_lockData.size())
|
return m_lockResource ? m_lockData[subResourceIndex].data
|
||||||
|
: const_cast<void*>(m_fixedData.pSurfList[subResourceIndex].pSysMem);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Resource::initialize()
|
||||||
|
{
|
||||||
|
m_canCreateLockResource = D3DDDIPOOL_SYSTEMMEM != m_fixedData.Pool &&
|
||||||
|
0 != m_formatInfo.bytesPerPixel &&
|
||||||
|
!m_fixedData.Flags.Primary;
|
||||||
|
|
||||||
|
if (m_canCreateLockResource)
|
||||||
{
|
{
|
||||||
return m_lockData[subResourceIndex].data;
|
m_lockData.resize(m_fixedData.SurfCount);
|
||||||
|
for (std::size_t i = 0; i < m_fixedData.SurfCount; ++i)
|
||||||
|
{
|
||||||
|
setSysMemUpToDate(i, true);
|
||||||
|
setVidMemUpToDate(i, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (subResourceIndex < m_fixedData.SurfCount)
|
|
||||||
{
|
|
||||||
return const_cast<void*>(m_fixedData.pSurfList[subResourceIndex].pSysMem);
|
|
||||||
}
|
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Resource::isOversized() const
|
bool Resource::isOversized() const
|
||||||
@ -546,7 +547,6 @@ namespace D3dDdi
|
|||||||
if (m_canCreateLockResource)
|
if (m_canCreateLockResource)
|
||||||
{
|
{
|
||||||
createLockResource();
|
createLockResource();
|
||||||
m_canCreateLockResource = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_lockResource)
|
if (m_lockResource)
|
||||||
@ -611,18 +611,13 @@ namespace D3dDdi
|
|||||||
|
|
||||||
HRESULT Resource::presentationBlt(const D3DDDIARG_BLT& data, Resource& srcResource)
|
HRESULT Resource::presentationBlt(const D3DDDIARG_BLT& data, Resource& srcResource)
|
||||||
{
|
{
|
||||||
if (data.SrcSubResourceIndex < srcResource.m_lockData.size())
|
if (srcResource.m_lockResource &&
|
||||||
|
srcResource.m_lockData[data.SrcSubResourceIndex].isSysMemUpToDate)
|
||||||
{
|
{
|
||||||
if (srcResource.m_lockData[data.SrcSubResourceIndex].isVidMemUpToDate)
|
copySubResource(srcResource.m_handle, srcResource.m_lockResource, data.SrcSubResourceIndex);
|
||||||
|
if (!srcResource.m_lockData[data.SrcSubResourceIndex].isVidMemUpToDate)
|
||||||
{
|
{
|
||||||
if (srcResource.m_lockData[data.SrcSubResourceIndex].isSysMemUpToDate)
|
srcResource.setVidMemUpToDate(data.SrcSubResourceIndex, true);
|
||||||
{
|
|
||||||
copySubResource(srcResource.m_handle, srcResource.m_lockResource, data.SrcSubResourceIndex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
srcResource.copyToVidMem(data.SrcSubResourceIndex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return m_device.getOrigVtable().pfnBlt(m_device, &data);
|
return m_device.getOrigVtable().pfnBlt(m_device, &data);
|
||||||
@ -733,34 +728,49 @@ namespace D3dDdi
|
|||||||
HRESULT Resource::sysMemPreferredBlt(const D3DDDIARG_BLT& data, Resource& srcResource)
|
HRESULT Resource::sysMemPreferredBlt(const D3DDDIARG_BLT& data, Resource& srcResource)
|
||||||
{
|
{
|
||||||
if (m_fixedData.Format == srcResource.m_fixedData.Format &&
|
if (m_fixedData.Format == srcResource.m_fixedData.Format &&
|
||||||
(D3DDDIPOOL_SYSTEMMEM == m_fixedData.Pool || data.Flags.MirrorLeftRight || data.Flags.MirrorUpDown ||
|
0 != m_formatInfo.bytesPerPixel)
|
||||||
(data.DstSubResourceIndex < m_lockData.size() && m_lockData[data.DstSubResourceIndex].isSysMemUpToDate)))
|
|
||||||
{
|
{
|
||||||
SysMemBltGuard srcGuard(srcResource, data.SrcSubResourceIndex, true);
|
if (data.Flags.MirrorLeftRight || data.Flags.MirrorUpDown)
|
||||||
if (srcGuard.data)
|
|
||||||
{
|
{
|
||||||
SysMemBltGuard dstGuard(*this, data.DstSubResourceIndex, false);
|
if (m_canCreateLockResource)
|
||||||
if (dstGuard.data)
|
|
||||||
{
|
{
|
||||||
auto dstBuf = static_cast<BYTE*>(dstGuard.data) +
|
createLockResource();
|
||||||
data.DstRect.top * dstGuard.pitch + data.DstRect.left * m_formatInfo.bytesPerPixel;
|
}
|
||||||
auto srcBuf = static_cast<const BYTE*>(srcGuard.data) +
|
if (srcResource.m_canCreateLockResource)
|
||||||
data.SrcRect.top * srcGuard.pitch + data.SrcRect.left * m_formatInfo.bytesPerPixel;
|
{
|
||||||
|
srcResource.createLockResource();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DDraw::Blitter::blt(
|
if (D3DDDIPOOL_SYSTEMMEM == m_fixedData.Pool ||
|
||||||
dstBuf,
|
(m_lockResource && m_lockData[data.DstSubResourceIndex].isSysMemUpToDate))
|
||||||
dstGuard.pitch,
|
{
|
||||||
data.DstRect.right - data.DstRect.left,
|
SysMemBltGuard srcGuard(srcResource, data.SrcSubResourceIndex, true);
|
||||||
data.DstRect.bottom - data.DstRect.top,
|
if (srcGuard.data)
|
||||||
srcBuf,
|
{
|
||||||
srcGuard.pitch,
|
SysMemBltGuard dstGuard(*this, data.DstSubResourceIndex, false);
|
||||||
(1 - 2 * data.Flags.MirrorLeftRight) * (data.SrcRect.right - data.SrcRect.left),
|
if (dstGuard.data)
|
||||||
(1 - 2 * data.Flags.MirrorUpDown) * (data.SrcRect.bottom - data.SrcRect.top),
|
{
|
||||||
m_formatInfo.bytesPerPixel,
|
auto dstBuf = static_cast<BYTE*>(dstGuard.data) +
|
||||||
data.Flags.DstColorKey ? reinterpret_cast<const DWORD*>(&data.ColorKey) : nullptr,
|
data.DstRect.top * dstGuard.pitch + data.DstRect.left * m_formatInfo.bytesPerPixel;
|
||||||
data.Flags.SrcColorKey ? reinterpret_cast<const DWORD*>(&data.ColorKey) : nullptr);
|
auto srcBuf = static_cast<const BYTE*>(srcGuard.data) +
|
||||||
|
data.SrcRect.top * srcGuard.pitch + data.SrcRect.left * m_formatInfo.bytesPerPixel;
|
||||||
|
|
||||||
return S_OK;
|
DDraw::Blitter::blt(
|
||||||
|
dstBuf,
|
||||||
|
dstGuard.pitch,
|
||||||
|
data.DstRect.right - data.DstRect.left,
|
||||||
|
data.DstRect.bottom - data.DstRect.top,
|
||||||
|
srcBuf,
|
||||||
|
srcGuard.pitch,
|
||||||
|
(1 - 2 * data.Flags.MirrorLeftRight) * (data.SrcRect.right - data.SrcRect.left),
|
||||||
|
(1 - 2 * data.Flags.MirrorUpDown) * (data.SrcRect.bottom - data.SrcRect.top),
|
||||||
|
m_formatInfo.bytesPerPixel,
|
||||||
|
data.Flags.DstColorKey ? reinterpret_cast<const DWORD*>(&data.ColorKey) : nullptr,
|
||||||
|
data.Flags.SrcColorKey ? reinterpret_cast<const DWORD*>(&data.ColorKey) : nullptr);
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ namespace D3dDdi
|
|||||||
void destroyLockResource();
|
void destroyLockResource();
|
||||||
void fixVertexData(UINT offset, UINT count, UINT stride);
|
void fixVertexData(UINT offset, UINT count, UINT stride);
|
||||||
void* getLockPtr(UINT subResourceIndex);
|
void* getLockPtr(UINT subResourceIndex);
|
||||||
|
void initialize();
|
||||||
HRESULT lock(D3DDDIARG_LOCK& data);
|
HRESULT lock(D3DDDIARG_LOCK& data);
|
||||||
void prepareForRendering(UINT subResourceIndex, bool isReadOnly);
|
void prepareForRendering(UINT subResourceIndex, bool isReadOnly);
|
||||||
void setAsGdiResource(bool isGdiResource);
|
void setAsGdiResource(bool isGdiResource);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user