Commit 200e2d23 by Jamie Madill Committed by Commit Bot

D3D11: Force level zero render target in FL 9.3.

Since 9.3 doesn't support non-zero level render targets, we should always be getting the level zero render target. Previously the code would never try creating a render target when level zero mode was not enabled, but this can break if we refactor the code. Fixes a bug in a future patch which creates the storage as a render target instead of as a non-renderable texture first. BUG=angleproject:2107 Change-Id: Ib2732a35e586bc4956d07783325429e8edeb0c66 Reviewed-on: https://chromium-review.googlesource.com/614120Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent e59000c3
......@@ -1045,6 +1045,12 @@ gl::Error TextureStorage11_2D::getRenderTarget(const gl::Context *context,
return gl::NoError();
}
if (mRenderer->getWorkarounds().zeroMaxLodWorkaround)
{
ASSERT(index.mipIndex == 0);
useLevelZeroWorkaroundTexture(true);
}
const TextureHelper11 *texture = nullptr;
ANGLE_TRY(getResource(context, &texture));
......@@ -1986,6 +1992,12 @@ gl::Error TextureStorage11_Cube::getRenderTarget(const gl::Context *context,
if (!mRenderTarget[faceIndex][level])
{
if (mRenderer->getWorkarounds().zeroMaxLodWorkaround)
{
ASSERT(index.mipIndex == 0);
useLevelZeroWorkaroundTexture(true);
}
const TextureHelper11 *texture = nullptr;
ANGLE_TRY(getResource(context, &texture));
......
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