Hash :
275e6f4f
Author :
Date :
2024-02-02T16:46:14
D3D: Add multiplanar support to d3d11 glTexSubImage2D Add multiplanar format support to Angle's D3D11 glTexSubImage2D. This is needed with multiplanar shared images, where we write all planes of a d3d shared image through WritePixelsYUV in raster decoder and need to do this via an intermediate texture for d3d11. This change checks for multiplanar format supported by Image11 and then goes through TextureD3D::commitRegion and performs copyTexture and then copySubResource. Added necessary test that tests for full texture copy and a subregion copy and reads back and verifies. Bug: chromium:40262482 Change-Id: I74c9978e62339375f6623f7f0a609bcb16c4b970 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5263039 Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Saifuddin Hitawala <hitawala@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581
//
// Copyright 2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// TextureStorage9.cpp: Implements the abstract rx::TextureStorage9 class and its concrete derived
// classes TextureStorage9_2D and TextureStorage9_Cube, which act as the interface to the
// D3D9 texture.
#include "libANGLE/renderer/d3d/d3d9/TextureStorage9.h"
#include "common/utilities.h"
#include "libANGLE/Context.h"
#include "libANGLE/Texture.h"
#include "libANGLE/formatutils.h"
#include "libANGLE/renderer/d3d/EGLImageD3D.h"
#include "libANGLE/renderer/d3d/TextureD3D.h"
#include "libANGLE/renderer/d3d/d3d9/RenderTarget9.h"
#include "libANGLE/renderer/d3d/d3d9/Renderer9.h"
#include "libANGLE/renderer/d3d/d3d9/SwapChain9.h"
#include "libANGLE/renderer/d3d/d3d9/formatutils9.h"
#include "libANGLE/renderer/d3d/d3d9/renderer9_utils.h"
namespace rx
{
TextureStorage9::TextureStorage9(Renderer9 *renderer, DWORD usage, const std::string &label)
: TextureStorage(label),
mTopLevel(0),
mMipLevels(0),
mTextureWidth(0),
mTextureHeight(0),
mInternalFormat(GL_NONE),
mTextureFormat(D3DFMT_UNKNOWN),
mRenderer(renderer),
mD3DUsage(usage),
mD3DPool(mRenderer->getTexturePool(usage))
{}
TextureStorage9::~TextureStorage9() {}
DWORD TextureStorage9::GetTextureUsage(GLenum internalformat, bool renderTarget)
{
DWORD d3dusage = 0;
const gl::InternalFormat &formatInfo = gl::GetSizedInternalFormatInfo(internalformat);
const d3d9::TextureFormat &d3dFormatInfo = d3d9::GetTextureFormatInfo(internalformat);
if (formatInfo.depthBits > 0 || formatInfo.stencilBits > 0)
{
d3dusage |= D3DUSAGE_DEPTHSTENCIL;
}
else if (renderTarget && (d3dFormatInfo.renderFormat != D3DFMT_UNKNOWN))
{
d3dusage |= D3DUSAGE_RENDERTARGET;
}
return d3dusage;
}
bool TextureStorage9::isRenderTarget() const
{
return (mD3DUsage & (D3DUSAGE_RENDERTARGET | D3DUSAGE_DEPTHSTENCIL)) != 0;
}
bool TextureStorage9::isManaged() const
{
return (mD3DPool == D3DPOOL_MANAGED);
}
bool TextureStorage9::supportsNativeMipmapFunction() const
{
return false;
}
D3DPOOL TextureStorage9::getPool() const
{
return mD3DPool;
}
DWORD TextureStorage9::getUsage() const
{
return mD3DUsage;
}
int TextureStorage9::getTopLevel() const
{
return mTopLevel;
}
int TextureStorage9::getLevelCount() const
{
return static_cast<int>(mMipLevels) - mTopLevel;
}
bool TextureStorage9::isMultiplanar(const gl::Context *context)
{
// D3D9 does not support multiplanar formats yet.
return false;
}
angle::Result TextureStorage9::setData(const gl::Context *context,
const gl::ImageIndex &index,
ImageD3D *image,
const gl::Box *destBox,
GLenum type,
const gl::PixelUnpackState &unpack,
const uint8_t *pixelData)
{
ANGLE_HR_UNREACHABLE(GetImplAs<Context9>(context));
return angle::Result::Stop;
}
TextureStorage9_2D::TextureStorage9_2D(Renderer9 *renderer,
SwapChain9 *swapchain,
const std::string &label)
: TextureStorage9(renderer, D3DUSAGE_RENDERTARGET, label)
{
IDirect3DTexture9 *surfaceTexture = swapchain->getOffscreenTexture();
mTexture = surfaceTexture;
mMipLevels = surfaceTexture->GetLevelCount();
mInternalFormat = swapchain->getRenderTargetInternalFormat();
D3DSURFACE_DESC surfaceDesc;
surfaceTexture->GetLevelDesc(0, &surfaceDesc);
mTextureWidth = surfaceDesc.Width;
mTextureHeight = surfaceDesc.Height;
mTextureFormat = surfaceDesc.Format;
mRenderTargets.resize(mMipLevels, nullptr);
}
TextureStorage9_2D::TextureStorage9_2D(Renderer9 *renderer,
GLenum internalformat,
bool renderTarget,
GLsizei width,
GLsizei height,
int levels,
const std::string &label)
: TextureStorage9(renderer, GetTextureUsage(internalformat, renderTarget), label)
{
mTexture = nullptr;
mInternalFormat = internalformat;
const d3d9::TextureFormat &d3dFormatInfo = d3d9::GetTextureFormatInfo(internalformat);
mTextureFormat = d3dFormatInfo.texFormat;
d3d9::MakeValidSize(false, d3dFormatInfo.texFormat, &width, &height, &mTopLevel);
mTextureWidth = width;
mTextureHeight = height;
mMipLevels = mTopLevel + levels;
mRenderTargets.resize(levels, nullptr);
}
TextureStorage9_2D::~TextureStorage9_2D()
{
SafeRelease(mTexture);
for (RenderTargetD3D *renderTarget : mRenderTargets)
{
SafeDelete(renderTarget);
}
}
// Increments refcount on surface.
// caller must Release() the returned surface
angle::Result TextureStorage9_2D::getSurfaceLevel(const gl::Context *context,
gl::TextureTarget target,
int level,
bool dirty,
IDirect3DSurface9 **outSurface)
{
ASSERT(target == gl::TextureTarget::_2D);
IDirect3DBaseTexture9 *baseTexture = nullptr;
ANGLE_TRY(getBaseTexture(context, &baseTexture));
IDirect3DTexture9 *texture = static_cast<IDirect3DTexture9 *>(baseTexture);
HRESULT result = texture->GetSurfaceLevel(level + mTopLevel, outSurface);
ANGLE_TRY_HR(GetImplAs<Context9>(context), result, "Failed to get the surface from a texture");
// With managed textures the driver needs to be informed of updates to the lower mipmap levels
if (level + mTopLevel != 0 && isManaged() && dirty)
{
texture->AddDirtyRect(nullptr);
}
return angle::Result::Continue;
}
angle::Result TextureStorage9_2D::findRenderTarget(const gl::Context *context,
const gl::ImageIndex &index,
GLsizei samples,
RenderTargetD3D **outRT) const
{
ASSERT(index.getLevelIndex() < getLevelCount());
ASSERT(outRT);
*outRT = mRenderTargets[index.getLevelIndex()];
return angle::Result::Continue;
}
angle::Result TextureStorage9_2D::getRenderTarget(const gl::Context *context,
const gl::ImageIndex &index,
GLsizei samples,
RenderTargetD3D **outRT)
{
ASSERT(index.getLevelIndex() < getLevelCount());
if (!mRenderTargets[index.getLevelIndex()] && isRenderTarget())
{
IDirect3DBaseTexture9 *baseTexture = nullptr;
ANGLE_TRY(getBaseTexture(context, &baseTexture));
IDirect3DSurface9 *surface = nullptr;
ANGLE_TRY(getSurfaceLevel(context, gl::TextureTarget::_2D, index.getLevelIndex(), false,
&surface));
size_t textureMipLevel = mTopLevel + index.getLevelIndex();
size_t mipWidth = std::max<size_t>(mTextureWidth >> textureMipLevel, 1u);
size_t mipHeight = std::max<size_t>(mTextureHeight >> textureMipLevel, 1u);
baseTexture->AddRef();
mRenderTargets[index.getLevelIndex()] = new TextureRenderTarget9(
baseTexture, textureMipLevel, surface, mInternalFormat, static_cast<GLsizei>(mipWidth),
static_cast<GLsizei>(mipHeight), 1, 0);
}
ASSERT(outRT);
*outRT = mRenderTargets[index.getLevelIndex()];
return angle::Result::Continue;
}
angle::Result TextureStorage9_2D::generateMipmap(const gl::Context *context,
const gl::ImageIndex &sourceIndex,
const gl::ImageIndex &destIndex)
{
angle::ComPtr<IDirect3DSurface9> upper = nullptr;
ANGLE_TRY(getSurfaceLevel(context, gl::TextureTarget::_2D, sourceIndex.getLevelIndex(), false,
&upper));
angle::ComPtr<IDirect3DSurface9> lower = nullptr;
ANGLE_TRY(
getSurfaceLevel(context, gl::TextureTarget::_2D, destIndex.getLevelIndex(), true, &lower));
ASSERT(upper && lower);
return mRenderer->boxFilter(GetImplAs<Context9>(context), upper.Get(), lower.Get());
}
angle::Result TextureStorage9_2D::getBaseTexture(const gl::Context *context,
IDirect3DBaseTexture9 **outTexture)
{
// if the width or height is not positive this should be treated as an incomplete texture
// we handle that here by skipping the d3d texture creation
if (mTexture == nullptr && mTextureWidth > 0 && mTextureHeight > 0)
{
ASSERT(mMipLevels > 0);
IDirect3DDevice9 *device = mRenderer->getDevice();
HRESULT result = device->CreateTexture(static_cast<unsigned int>(mTextureWidth),
static_cast<unsigned int>(mTextureHeight),
static_cast<unsigned int>(mMipLevels), getUsage(),
mTextureFormat, getPool(), &mTexture, nullptr);
ANGLE_TRY_HR(GetImplAs<Context9>(context), result, "Failed to create 2D storage texture");
}
*outTexture = mTexture;
return angle::Result::Continue;
}
angle::Result TextureStorage9_2D::copyToStorage(const gl::Context *context,
TextureStorage *destStorage)
{
ASSERT(destStorage);
TextureStorage9_2D *dest9 = GetAs<TextureStorage9_2D>(destStorage);
int levels = getLevelCount();
for (int i = 0; i < levels; ++i)
{
angle::ComPtr<IDirect3DSurface9> srcSurf = nullptr;
ANGLE_TRY(getSurfaceLevel(context, gl::TextureTarget::_2D, i, false, &srcSurf));
angle::ComPtr<IDirect3DSurface9> dstSurf = nullptr;
ANGLE_TRY(dest9->getSurfaceLevel(context, gl::TextureTarget::_2D, i, true, &dstSurf));
ANGLE_TRY(
mRenderer->copyToRenderTarget(context, dstSurf.Get(), srcSurf.Get(), isManaged()));
}
return angle::Result::Continue;
}
TextureStorage9_EGLImage::TextureStorage9_EGLImage(Renderer9 *renderer,
EGLImageD3D *image,
RenderTarget9 *renderTarget9,
const std::string &label)
: TextureStorage9(renderer, D3DUSAGE_RENDERTARGET, label), mImage(image)
{
mInternalFormat = renderTarget9->getInternalFormat();
mTextureFormat = renderTarget9->getD3DFormat();
mTextureWidth = renderTarget9->getWidth();
mTextureHeight = renderTarget9->getHeight();
mTopLevel = static_cast<int>(renderTarget9->getTextureLevel());
mMipLevels = mTopLevel + 1;
}
TextureStorage9_EGLImage::~TextureStorage9_EGLImage() {}
angle::Result TextureStorage9_EGLImage::getSurfaceLevel(const gl::Context *context,
gl::TextureTarget target,
int level,
bool,
IDirect3DSurface9 **outSurface)
{
ASSERT(target == gl::TextureTarget::_2D);
ASSERT(level == 0);
RenderTargetD3D *renderTargetD3D = nullptr;
ANGLE_TRY(mImage->getRenderTarget(context, &renderTargetD3D));
RenderTarget9 *renderTarget9 = GetAs<RenderTarget9>(renderTargetD3D);
*outSurface = renderTarget9->getSurface();
return angle::Result::Continue;
}
angle::Result TextureStorage9_EGLImage::findRenderTarget(const gl::Context *context,
const gl::ImageIndex &index,
GLsizei samples,
RenderTargetD3D **outRT) const
{
// Since the render target of a EGL image will be updated when orphaning, trying to find a cache
// of it can be rarely useful.
ANGLE_HR_UNREACHABLE(GetImplAs<Context9>(context));
return angle::Result::Stop;
}
angle::Result TextureStorage9_EGLImage::getRenderTarget(const gl::Context *context,
const gl::ImageIndex &index,
GLsizei samples,
RenderTargetD3D **outRT)
{
ASSERT(!index.hasLayer());
ASSERT(index.getLevelIndex() == 0);
ASSERT(samples == 0);
return mImage->getRenderTarget(context, outRT);
}
angle::Result TextureStorage9_EGLImage::getBaseTexture(const gl::Context *context,
IDirect3DBaseTexture9 **outTexture)
{
RenderTargetD3D *renderTargetD3D = nullptr;
ANGLE_TRY(mImage->getRenderTarget(context, &renderTargetD3D));
RenderTarget9 *renderTarget9 = GetAs<RenderTarget9>(renderTargetD3D);
*outTexture = renderTarget9->getTexture();
ASSERT(*outTexture != nullptr);
return angle::Result::Continue;
}
angle::Result TextureStorage9_EGLImage::generateMipmap(const gl::Context *context,
const gl::ImageIndex &,
const gl::ImageIndex &)
{
ANGLE_HR_UNREACHABLE(GetImplAs<Context9>(context));
return angle::Result::Stop;
}
angle::Result TextureStorage9_EGLImage::copyToStorage(const gl::Context *context,
TextureStorage *destStorage)
{
ASSERT(destStorage);
ASSERT(getLevelCount() == 1);
TextureStorage9 *dest9 = GetAs<TextureStorage9>(destStorage);
IDirect3DBaseTexture9 *destBaseTexture9 = nullptr;
ANGLE_TRY(dest9->getBaseTexture(context, &destBaseTexture9));
IDirect3DTexture9 *destTexture9 = static_cast<IDirect3DTexture9 *>(destBaseTexture9);
angle::ComPtr<IDirect3DSurface9> destSurface = nullptr;
HRESULT result = destTexture9->GetSurfaceLevel(destStorage->getTopLevel(), &destSurface);
ANGLE_TRY_HR(GetImplAs<Context9>(context), result, "Failed to get the surface from a texture");
RenderTargetD3D *sourceRenderTarget = nullptr;
ANGLE_TRY(mImage->getRenderTarget(context, &sourceRenderTarget));
RenderTarget9 *sourceRenderTarget9 = GetAs<RenderTarget9>(sourceRenderTarget);
ANGLE_TRY(mRenderer->copyToRenderTarget(context, destSurface.Get(),
sourceRenderTarget9->getSurface(), isManaged()));
if (destStorage->getTopLevel() != 0)
{
destTexture9->AddDirtyRect(nullptr);
}
return angle::Result::Continue;
}
TextureStorage9_Cube::TextureStorage9_Cube(Renderer9 *renderer,
GLenum internalformat,
bool renderTarget,
int size,
int levels,
bool hintLevelZeroOnly,
const std::string &label)
: TextureStorage9(renderer, GetTextureUsage(internalformat, renderTarget), label)
{
mTexture = nullptr;
for (size_t i = 0; i < gl::kCubeFaceCount; ++i)
{
mRenderTarget[i] = nullptr;
}
mInternalFormat = internalformat;
const d3d9::TextureFormat &d3dFormatInfo = d3d9::GetTextureFormatInfo(internalformat);
mTextureFormat = d3dFormatInfo.texFormat;
int height = size;
d3d9::MakeValidSize(false, d3dFormatInfo.texFormat, &size, &height, &mTopLevel);
mTextureWidth = size;
mTextureHeight = size;
mMipLevels = mTopLevel + levels;
}
TextureStorage9_Cube::~TextureStorage9_Cube()
{
SafeRelease(mTexture);
for (size_t i = 0; i < gl::kCubeFaceCount; ++i)
{
SafeDelete(mRenderTarget[i]);
}
}
// Increments refcount on surface.
// caller must Release() the returned surface
angle::Result TextureStorage9_Cube::getSurfaceLevel(const gl::Context *context,
gl::TextureTarget target,
int level,
bool dirty,
IDirect3DSurface9 **outSurface)
{
IDirect3DBaseTexture9 *baseTexture = nullptr;
ANGLE_TRY(getBaseTexture(context, &baseTexture));
IDirect3DCubeTexture9 *texture = static_cast<IDirect3DCubeTexture9 *>(baseTexture);
D3DCUBEMAP_FACES face = gl_d3d9::ConvertCubeFace(target);
HRESULT result = texture->GetCubeMapSurface(face, level, outSurface);
ANGLE_TRY_HR(GetImplAs<Context9>(context), result, "Failed to get the surface from a texture");
// With managed textures the driver needs to be informed of updates to the lower mipmap levels
if (level != 0 && isManaged() && dirty)
{
texture->AddDirtyRect(face, nullptr);
}
return angle::Result::Continue;
}
angle::Result TextureStorage9_Cube::findRenderTarget(const gl::Context *context,
const gl::ImageIndex &index,
GLsizei samples,
RenderTargetD3D **outRT) const
{
ASSERT(outRT);
ASSERT(index.getLevelIndex() == 0);
ASSERT(samples == 0);
ASSERT(index.getType() == gl::TextureType::CubeMap &&
gl::IsCubeMapFaceTarget(index.getTarget()));
const size_t renderTargetIndex = index.cubeMapFaceIndex();
*outRT = mRenderTarget[renderTargetIndex];
return angle::Result::Continue;
}
angle::Result TextureStorage9_Cube::getRenderTarget(const gl::Context *context,
const gl::ImageIndex &index,
GLsizei samples,
RenderTargetD3D **outRT)
{
ASSERT(outRT);
ASSERT(index.getLevelIndex() == 0);
ASSERT(samples == 0);
ASSERT(index.getType() == gl::TextureType::CubeMap &&
gl::IsCubeMapFaceTarget(index.getTarget()));
const size_t renderTargetIndex = index.cubeMapFaceIndex();
if (mRenderTarget[renderTargetIndex] == nullptr && isRenderTarget())
{
IDirect3DBaseTexture9 *baseTexture = nullptr;
ANGLE_TRY(getBaseTexture(context, &baseTexture));
IDirect3DSurface9 *surface = nullptr;
ANGLE_TRY(getSurfaceLevel(context, index.getTarget(), mTopLevel + index.getLevelIndex(),
false, &surface));
baseTexture->AddRef();
mRenderTarget[renderTargetIndex] = new TextureRenderTarget9(
baseTexture, mTopLevel + index.getLevelIndex(), surface, mInternalFormat,
static_cast<GLsizei>(mTextureWidth), static_cast<GLsizei>(mTextureHeight), 1, 0);
}
*outRT = mRenderTarget[renderTargetIndex];
return angle::Result::Continue;
}
angle::Result TextureStorage9_Cube::generateMipmap(const gl::Context *context,
const gl::ImageIndex &sourceIndex,
const gl::ImageIndex &destIndex)
{
angle::ComPtr<IDirect3DSurface9> upper = nullptr;
ANGLE_TRY(getSurfaceLevel(context, sourceIndex.getTarget(), sourceIndex.getLevelIndex(), false,
&upper));
angle::ComPtr<IDirect3DSurface9> lower = nullptr;
ANGLE_TRY(
getSurfaceLevel(context, destIndex.getTarget(), destIndex.getLevelIndex(), true, &lower));
ASSERT(upper && lower);
return mRenderer->boxFilter(GetImplAs<Context9>(context), upper.Get(), lower.Get());
}
angle::Result TextureStorage9_Cube::getBaseTexture(const gl::Context *context,
IDirect3DBaseTexture9 **outTexture)
{
// if the size is not positive this should be treated as an incomplete texture
// we handle that here by skipping the d3d texture creation
if (mTexture == nullptr && mTextureWidth > 0 && mTextureHeight > 0)
{
ASSERT(mMipLevels > 0);
ASSERT(mTextureWidth == mTextureHeight);
IDirect3DDevice9 *device = mRenderer->getDevice();
HRESULT result = device->CreateCubeTexture(
static_cast<unsigned int>(mTextureWidth), static_cast<unsigned int>(mMipLevels),
getUsage(), mTextureFormat, getPool(), &mTexture, nullptr);
ANGLE_TRY_HR(GetImplAs<Context9>(context), result, "Failed to create cube storage texture");
}
*outTexture = mTexture;
return angle::Result::Continue;
}
angle::Result TextureStorage9_Cube::copyToStorage(const gl::Context *context,
TextureStorage *destStorage)
{
ASSERT(destStorage);
TextureStorage9_Cube *dest9 = GetAs<TextureStorage9_Cube>(destStorage);
int levels = getLevelCount();
for (gl::TextureTarget face : gl::AllCubeFaceTextureTargets())
{
for (int i = 0; i < levels; i++)
{
angle::ComPtr<IDirect3DSurface9> srcSurf = nullptr;
ANGLE_TRY(getSurfaceLevel(context, face, i, false, &srcSurf));
angle::ComPtr<IDirect3DSurface9> dstSurf = nullptr;
ANGLE_TRY(dest9->getSurfaceLevel(context, face, i, true, &dstSurf));
ANGLE_TRY(
mRenderer->copyToRenderTarget(context, dstSurf.Get(), srcSurf.Get(), isManaged()));
}
}
return angle::Result::Continue;
}
} // namespace rx