Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox Quantum WebGL Warning #4496

Closed
marcus-sa opened this issue Nov 29, 2017 · 9 comments
Closed

Firefox Quantum WebGL Warning #4496

marcus-sa opened this issue Nov 29, 2017 · 9 comments
Labels
Stale Previously “Won’t Fix”, bots should tag with this for inactive issues or pull-requests. 💾 v4.x (Legacy) Legacy version 4 support

Comments

@marcus-sa
Copy link

marcus-sa commented Nov 29, 2017

I'm using the latest version of Firefox Quantum (I know it's experimental)

PixiJS 4.6.1 - WebGL - http://www.pixijs.com/

So practically isn't the purpose of autoDetectRenderer to detect whether or not the browser actually supports WebGL fully?
I get this error in console when initializing a new Pixi.js renderer and doing some basic stuff:

Error: WebGL warning: drawElements: This operation requires zeroing texture data. This is slow.

By the time I've finished writing this issue, it still haven't rendered anything at all, so the question is; wouldn't it be better to use canvas renderer in Firefox Quantum?

Renders in WebGL without problems in the latest version of Google Chrome

@ivanpopelyshev
Copy link
Collaborator

Error: WebGL warning: drawElements: This operation requires zeroing texture data. This is slow.

I still dont know what is this warning about. @GoodBoyDigital any ideas?

By the time I've finished writing this issue, it still haven't rendered anything at all

not related to that warning. What exactly is not working there?

@themoonrat
Copy link
Member

Just to say, we are also getting this Firefox issue in our games now; only happens since the first quantum release.
You can see the warning happen even on the basic Pixi example.
I believe it might be related to rendering sprites that have no loaded texture source yet.

@ivanpopelyshev
Copy link
Collaborator

That's strange, because if texture is not valid, sprites aren't rendered at all. May be it related to empty textures we use in renderer. They are small so slow does not affect us.

@garkin
Copy link

garkin commented Dec 12, 2017

Partial duplicate of #3897

This warning bugs me too. Maybe Firefox sources would help:
https://github.com/mozilla/gecko-dev/blob/1cdb198bd9e1d2605ac48d2588e29475fb01a74e/dom/canvas/WebGLTexture.cpp#L645

ZeroTextureData(WebGLContext* webgl, const char* funcName, GLuint tex,
                TexImageTarget target, uint32_t level,
                const webgl::FormatUsageInfo* usage, uint32_t width, uint32_t height,
                uint32_t depth)
{
    // This has two usecases:
    // 1. Lazy zeroing of uninitialized textures:
    //    a. Before draw, when FakeBlack isn't viable. (TexStorage + Draw*)
    //    b. Before partial upload. (TexStorage + TexSubImage)
    // 2. Zero subrects from out-of-bounds blits. (CopyTex(Sub)Image)

    // We have no sympathy for any of these cases.

    // "Doctor, it hurts when I do this!" "Well don't do that!"
    webgl->GenerateWarning("%s: This operation requires zeroing texture data. This is"
                           " slow.",
                           funcName);

@dennisdahlchristensen
Copy link

Is there something that can be done to avoid this performance hit ?
I have just tested the first basic Pixi example in FF, and even that triggers the warning.

@kdashg
Copy link

kdashg commented Mar 1, 2018

Firefox presently doesn't initialize texture images to zeros on creation, but rather only as necessary.
We will be moving to zeroing on creation Soon(tm), but that's the present cause of the warning: You're using a texture image before you initialize its data yourselves.

@samuel-gf
Copy link

I find this warning only after I add a text layer in Mozilla 59.0.2 running in a MacOS:

    var layerText = new PIXI.Container();
    message = new PIXI.Text("Hello World");
    message.style.fill = 0xFFFFFF;
    message.position.set(54, 96);
    layerText.addChild(message);
    app.stage.addChild(layerText);

I hope this can help somebody to solve the issue.

@stale
Copy link

stale bot commented Feb 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale Previously “Won’t Fix”, bots should tag with this for inactive issues or pull-requests. label Feb 24, 2019
@lock
Copy link

lock bot commented Feb 24, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Stale Previously “Won’t Fix”, bots should tag with this for inactive issues or pull-requests. 💾 v4.x (Legacy) Legacy version 4 support
Projects
None yet
Development

No branches or pull requests

8 participants