Commit 14ed667f by Olli Etuaho Committed by Commit Bot

Remove a few GetDXGIFormatInfo queries

It's needlessly complex to query texture info when determining whether a format is a depth/stencil format. It can be tested simply by checking if the dsvFormat field of the format set is set. BUG=angleproject:1244 TEST=angle_end2end_tests, dEQP-GLES3.functional.texture.specification.*depth* (no regressions) Change-Id: I76d008462564657328dae35d664be5f5e22238fa Reviewed-on: https://chromium-review.googlesource.com/329104Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
parent 7208f699
......@@ -460,10 +460,9 @@ gl::Error TextureStorage11::updateSubresourceLevel(ID3D11Resource *srcTexture,
ASSERT(dstTexture);
const d3d11::DXGIFormat &dxgiFormatInfo = d3d11::GetDXGIFormatInfo(mTextureFormatSet.texFormat);
const d3d11::DXGIFormatSize &dxgiFormatSizeInfo =
d3d11::GetDXGIFormatSizeInfo(mTextureFormatSet.texFormat);
if (!fullCopy && (dxgiFormatInfo.depthBits > 0 || dxgiFormatInfo.stencilBits > 0))
if (!fullCopy && mTextureFormatSet.dsvFormat != DXGI_FORMAT_UNKNOWN)
{
// CopySubresourceRegion cannot copy partial depth stencils, use the blitter instead
Blit11 *blitter = mRenderer->getBlitter();
......@@ -533,8 +532,7 @@ gl::Error TextureStorage11::copySubresourceLevel(ID3D11Resource *dstTexture,
// However, D3D10Level9 doesn't always perform CopySubresourceRegion correctly unless the
// source box is specified. This is okay, since we don't perform CopySubresourceRegion on
// depth/stencil textures on 9_3.
ASSERT(d3d11::GetDXGIFormatInfo(mTextureFormatSet.texFormat).depthBits == 0);
ASSERT(d3d11::GetDXGIFormatInfo(mTextureFormatSet.texFormat).stencilBits == 0);
ASSERT(mTextureFormatSet.dsvFormat == DXGI_FORMAT_UNKNOWN);
srcBox.left = region.x;
srcBox.right = region.x + region.width;
srcBox.top = region.y;
......
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