Commit f9c7a67b by Austin Kinross Committed by Geoff Lang

Fix copyTexImage2D failures on D3D11 9_3

Change-Id: I16453248c2cb0aaf53a748eb8d6e32c63fa73394 Reviewed-on: https://chromium-review.googlesource.com/261983Tested-by: 's avatarAustin Kinross <aukinros@microsoft.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 7e8320d8
......@@ -1324,7 +1324,9 @@ gl::Error TextureD3D_Cube::copyImage(GLenum target, size_t level, const gl::Rect
gl::ImageIndex index = gl::ImageIndex::MakeCube(target, level);
gl::Offset destOffset(0, 0, 0);
if (!canCreateRenderTargetForImage(index))
// If the zero max LOD workaround is active, then we can't sample from individual layers of the framebuffer in shaders,
// so we should use the non-rendering copy path.
if (!canCreateRenderTargetForImage(index) || mRenderer->getWorkarounds().zeroMaxLodWorkaround)
{
gl::Error error = mImageArray[faceIndex][level]->copy(destOffset, sourceArea, source);
if (error.isError())
......@@ -1366,7 +1368,9 @@ gl::Error TextureD3D_Cube::copySubImage(GLenum target, size_t level, const gl::O
gl::ImageIndex index = gl::ImageIndex::MakeCube(target, level);
if (!canCreateRenderTargetForImage(index))
// If the zero max LOD workaround is active, then we can't sample from individual layers of the framebuffer in shaders,
// so we should use the non-rendering copy path.
if (!canCreateRenderTargetForImage(index) || mRenderer->getWorkarounds().zeroMaxLodWorkaround)
{
gl::Error error = mImageArray[faceIndex][level]->copy(destOffset, sourceArea, source);
if (error.isError())
......
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