| 443 | } |
| 444 | |
| 445 | void CopyContext::apiSubresourceBarrier( |
| 446 | const Texture* pTexture, |
| 447 | Resource::State newState, |
| 448 | Resource::State oldState, |
| 449 | uint32_t arraySlice, |
| 450 | uint32_t mipLevel |
| 451 | ) |
| 452 | { |
| 453 | auto resourceEncoder = getLowLevelData()->getResourceCommandEncoder(); |
| 454 | auto subresourceState = pTexture->getSubresourceState(arraySlice, mipLevel); |
| 455 | if (subresourceState != newState) |
| 456 | { |
| 457 | gfx::ITextureResource* textureResource = pTexture->getGfxTextureResource(); |
| 458 | gfx::SubresourceRange subresourceRange = {}; |
| 459 | subresourceRange.baseArrayLayer = arraySlice; |
| 460 | subresourceRange.mipLevel = mipLevel; |
| 461 | subresourceRange.layerCount = 1; |
| 462 | subresourceRange.mipLevelCount = 1; |
| 463 | resourceEncoder->textureSubresourceBarrier( |
| 464 | textureResource, subresourceRange, getGFXResourceState(subresourceState), getGFXResourceState(newState) |
| 465 | ); |
| 466 | mCommandsPending = true; |
| 467 | } |
| 468 | } |
| 469 | |
| 470 | void CopyContext::uavBarrier(const Resource* pResource) |
| 471 | { |
nothing calls this directly
no test coverage detected