Backed out changeset 0a2985a48339 (bug 1769747) for causing gl failures.

This commit is contained in:
Butkovits Atila
2022-10-05 01:38:13 +03:00
parent e0ff314b94
commit 81f677aaef
12 changed files with 98 additions and 266 deletions

View File

@@ -4049,35 +4049,6 @@ void webgl::TexUnpackBlobDesc::Shrink(const webgl::PackingInfo& pi) {
// -
// Because often you need a null-terminated copy for printf.
inline std::string ToString(std::string_view s) { return std::string{s}; }
std::string_view ToString(const layers::SurfaceDescriptor::Type t) {
switch (t) {
#define _(X) \
case layers::SurfaceDescriptor::X: \
return #X;
_(T__None)
_(TSurfaceDescriptorBuffer)
_(TSurfaceDescriptorD3D10)
_(TSurfaceDescriptorDXGIYCbCr)
_(TSurfaceDescriptorDMABuf)
_(TSurfaceTextureDescriptor)
_(TSurfaceDescriptorAndroidHardwareBuffer)
_(TEGLImageDescriptor)
_(TSurfaceDescriptorMacIOSurface)
_(TSurfaceDescriptorSharedGLTexture)
_(TSurfaceDescriptorGPUVideo)
_(TSurfaceDescriptorRecorded)
_(TSurfaceDescriptorRemoteTexture)
_(TSurfaceDescriptorDcompSurface)
_(Tnull_t)
#undef _
}
MOZ_ASSERT_UNREACHABLE();
}
void ClientWebGLContext::TexImage(uint8_t funcDims, GLenum imageTarget,
GLint level, GLenum respecFormat,
const ivec3& offset,
@@ -4275,8 +4246,7 @@ void ClientWebGLContext::TexImage(uint8_t funcDims, GLenum imageTarget,
const bool canUploadViaSd = contextInfo.uploadableSdTypes[sdType];
if (!canUploadViaSd) {
const nsPrintfCString msg(
"Fast uploads for resource type %s not implemented.",
ToString(ToString(sdType)).c_str());
"Fast uploads for resource type %i not implemented.", int(sdType));
return Some(ToString(msg));
}