Bug 1766282 - Do not use SharedHandle of ID3D11Texture2D of hardware decoded video during no video copy r=jgilbert,jrmuizel,gfx-reviewers

With CI's NVIDIA GPU, SharedHandle of ID3D11Texture2D of hardware decoded video during no video copy caused rendering problem. When SharedHandle is not used, the rendering problem did not happen. But when video is rendered to WebGL texture, SharedHandle need to be used.
In this case, D3D11TextureIMFSampleImage copies original ID3D11Texture2D to a new ID3D11Texture2D and use a shared handled of the copied texture. And no video copy of future video frames are disabled.

NoCopyNV12Texture is renamed to ZeroCopyNV12Texture to clarify its meaning.

Differential Revision: https://phabricator.services.mozilla.com/D144598
This commit is contained in:
sotaro
2022-05-20 04:37:53 +00:00
parent 37ebb43665
commit 72f2f9cb75
20 changed files with 394 additions and 54 deletions

View File

@@ -4219,6 +4219,15 @@ void ClientWebGLContext::TexImage(uint8_t funcDims, GLenum imageTarget,
}
}
if (sdType == layers::SurfaceDescriptor::TSurfaceDescriptorD3D10) {
const auto& sdD3D = sd.get_SurfaceDescriptorD3D10();
const auto& inProcess = mNotLost->inProcess;
if (sdD3D.gpuProcessTextureId().isSome() && inProcess) {
return Some(
std::string{"gpuProcessTextureId works only in GPU process."});
}
}
if (StaticPrefs::webgl_disable_DOM_blit_uploads()) {
return Some(std::string{"DOM blit uploads are disabled."});
}