| 408 | } |
| 409 | |
| 410 | bool CopyContext::textureBarrier(const Texture* pTexture, Resource::State newState) |
| 411 | { |
| 412 | auto resourceEncoder = getLowLevelData()->getResourceCommandEncoder(); |
| 413 | bool recorded = false; |
| 414 | if (pTexture->getGlobalState() != newState) |
| 415 | { |
| 416 | gfx::ITextureResource* textureResource = pTexture->getGfxTextureResource(); |
| 417 | resourceEncoder->textureBarrier( |
| 418 | 1, &textureResource, getGFXResourceState(pTexture->getGlobalState()), getGFXResourceState(newState) |
| 419 | ); |
| 420 | mCommandsPending = true; |
| 421 | recorded = true; |
| 422 | } |
| 423 | pTexture->setGlobalState(newState); |
| 424 | return recorded; |
| 425 | } |
| 426 | |
| 427 | bool CopyContext::bufferBarrier(const Buffer* pBuffer, Resource::State newState) |
| 428 | { |
no test coverage detected