Commit c8d13843 by Jamie Madill

Use mTopLevel in getSubresourceIndex.

We need to include this in every call, so might as well handle it automatically. BUG=angle:729 Change-Id: I5c230408a9eb80c8cfcc3f0d3a4ea531fa173aed Reviewed-on: https://chromium-review.googlesource.com/221760Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 1ea53509
......@@ -189,7 +189,7 @@ UINT TextureStorage11::getSubresourceIndex(int mipLevel, int layerTarget) const
UINT index = 0;
if (getResource())
{
index = D3D11CalcSubresource(mipLevel, layerTarget, mMipLevels);
index = D3D11CalcSubresource(mipLevel + mTopLevel, layerTarget, mMipLevels);
}
return index;
}
......@@ -307,7 +307,7 @@ gl::Error TextureStorage11::updateSubresourceLevel(ID3D11Resource *srcTexture, u
copyArea.depth == texSize.depth;
ID3D11Resource *dstTexture = getResource();
unsigned int dstSubresource = getSubresourceIndex(level + mTopLevel, layerTarget);
unsigned int dstSubresource = getSubresourceIndex(level, layerTarget);
ASSERT(dstTexture);
......@@ -348,7 +348,7 @@ bool TextureStorage11::copySubresourceLevel(ID3D11Resource* dstTexture, unsigned
if (dstTexture)
{
ID3D11Resource *srcTexture = getResource();
unsigned int srcSubresource = getSubresourceIndex(level + mTopLevel, layerTarget);
unsigned int srcSubresource = getSubresourceIndex(level, layerTarget);
ASSERT(srcTexture);
......
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