mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Backed out changeset b09d48d2b473 (bug 1655101) for causing mochitest webgl failures on dom/canvas/TexUnpackBlob.cpp
This commit is contained in:
parent
76a53558da
commit
deca8deb21
@ -4414,8 +4414,7 @@ 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, Limits());
|
||||
auto fallbackReason = BlitPreventReason(level, offset, pi, *desc);
|
||||
if (fallbackReason) return fallbackReason;
|
||||
|
||||
const bool canUploadViaSd = contextInfo.uploadableSdTypes[sdType];
|
||||
|
@ -660,8 +660,7 @@ bool TexUnpackImage::Validate(const WebGLContext* const webgl,
|
||||
|
||||
Maybe<std::string> BlitPreventReason(const int32_t level, const ivec3& offset,
|
||||
const webgl::PackingInfo& pi,
|
||||
const TexUnpackBlobDesc& desc,
|
||||
const Limits& limits) {
|
||||
const TexUnpackBlobDesc& desc) {
|
||||
const auto& size = desc.size;
|
||||
const auto& unpacking = desc.unpacking;
|
||||
|
||||
@ -692,12 +691,8 @@ Maybe<std::string> BlitPreventReason(const int32_t level, const ivec3& offset,
|
||||
}();
|
||||
if (premultReason) return premultReason;
|
||||
|
||||
if (pi.format != LOCAL_GL_RGBA && pi.format != LOCAL_GL_RGB) {
|
||||
return "`format` is not RGBA or RGB";
|
||||
}
|
||||
|
||||
if (pi.format == LOCAL_GL_RGB && !limits.rgbColorRenderable) {
|
||||
return "`format` is RGB, which is not color-renderable";
|
||||
if (pi.format != LOCAL_GL_RGBA) {
|
||||
return "`format` is not RGBA";
|
||||
}
|
||||
|
||||
if (pi.type != LOCAL_GL_UNSIGNED_BYTE) {
|
||||
@ -729,8 +724,8 @@ bool TexUnpackImage::TexOrSubImage(bool isSubImage, bool needsRespec,
|
||||
|
||||
// -
|
||||
|
||||
const auto reason = BlitPreventReason(level, {xOffset, yOffset, zOffset}, pi,
|
||||
mDesc, tex->mContext->Limits());
|
||||
const auto reason =
|
||||
BlitPreventReason(level, {xOffset, yOffset, zOffset}, pi, mDesc);
|
||||
if (reason) {
|
||||
webgl->GeneratePerfWarning(
|
||||
"Failed to hit GPU-copy fast-path."
|
||||
|
@ -43,8 +43,7 @@ struct DriverUnpackInfo;
|
||||
|
||||
Maybe<std::string> BlitPreventReason(int32_t level, const ivec3& offset,
|
||||
const webgl::PackingInfo&,
|
||||
const TexUnpackBlobDesc&,
|
||||
const Limits& limits);
|
||||
const TexUnpackBlobDesc&);
|
||||
|
||||
class TexUnpackBlob {
|
||||
public:
|
||||
|
@ -237,8 +237,6 @@ static webgl::Limits MakeLimits(const WebGLContext& webgl) {
|
||||
gl::GLContext::KHR_texture_compression_astc_hdr);
|
||||
}
|
||||
|
||||
limits.rgbColorRenderable = webgl.gl->IsRGBColorRenderable();
|
||||
|
||||
if (webgl.IsWebGL2() ||
|
||||
limits.supportedExtensions[WebGLExtensionID::WEBGL_draw_buffers]) {
|
||||
gl.GetUIntegerv(LOCAL_GL_MAX_DRAW_BUFFERS, &limits.maxColorDrawBuffers);
|
||||
|
@ -651,7 +651,6 @@ struct Limits final {
|
||||
|
||||
// Exts
|
||||
bool astcHdr = false;
|
||||
bool rgbColorRenderable = false;
|
||||
uint32_t maxColorDrawBuffers = 1;
|
||||
uint64_t queryCounterBitsTimeElapsed = 0;
|
||||
uint64_t queryCounterBitsTimestamp = 0;
|
||||
|
@ -282,7 +282,6 @@ class GLContext : public GenericAtomicRefCounted, public SupportsWeakPtr {
|
||||
}
|
||||
|
||||
bool HasPBOState() const { return (!IsGLES() || Version() >= 300); }
|
||||
bool IsRGBColorRenderable() { return !IsGLES() || Version() >= 300; }
|
||||
|
||||
/**
|
||||
* If this context is double-buffered, returns TRUE.
|
||||
|
Loading…
Reference in New Issue
Block a user