Bug 1655101 - Allow webgl.texImage gpu-blit for RGB8 if supported. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D194943
This commit is contained in:
@@ -4394,6 +4394,8 @@ void ClientWebGLContext::TexImage(uint8_t funcDims, GLenum imageTarget,
|
||||
|
||||
// -
|
||||
|
||||
// -
|
||||
|
||||
mozilla::ipc::Shmem* pShmem = nullptr;
|
||||
// Image to release after WebGLContext::TexImage().
|
||||
RefPtr<layers::Image> keepAliveImage;
|
||||
@@ -4404,7 +4406,12 @@ void ClientWebGLContext::TexImage(uint8_t funcDims, GLenum imageTarget,
|
||||
const auto& contextInfo = mNotLost->info;
|
||||
|
||||
const auto fallbackReason = [&]() -> Maybe<std::string> {
|
||||
auto fallbackReason = BlitPreventReason(level, offset, pi, *desc);
|
||||
if (!respecFormat) {
|
||||
return Some(std::string{
|
||||
"Fast uploads not supported for TexSubImage. Use TexImage."});
|
||||
}
|
||||
auto fallbackReason = BlitPreventReason(
|
||||
level, offset, respecFormat, pi, *desc, contextInfo.isRgb8Renderable);
|
||||
if (fallbackReason) return fallbackReason;
|
||||
|
||||
const bool canUploadViaSd = contextInfo.uploadableSdTypes[sdType];
|
||||
|
||||
Reference in New Issue
Block a user