Closed Bug 594310 Opened 14 years ago Closed 14 years ago

Google WebGL pool demo displays a black screen when shader validator is ON and sometimes some black balls when it is OFF

Categories

(Core :: Graphics: CanvasWebGL, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: paul, Unassigned)

References

()

Details

Attachments

(1 file)

Most of the WebGL demos doesn't work on my computer (Windows 7 + ATI Mobility Radeon HD 3650) but work on a Mac or with a nVidia card.

This demo http://learningwebgl.com/blog/?p=684 doesn't work (but this one http://learningwebgl.com/lessons/lesson06/index.html _works_).

The texture are just "white squares".

Here http://o3d.googlecode.com/svn/trunk/samples_webgl/o3d-webgl-samples/pool.html it doesn't work neither.

Black screen (I can't see anything beside the HTML content).

I have this message in the error console:

"A texture is going to be rendered as if it were black, as per the OpenGL ES 2.0.24 spec section 3.8.2, because it is a 2D texture, with a minification filter requiring a mipmap, and is not mipmap complete (as defined in section 3.7.10)."
This is very strange: I do see the same messages as you are seeing, and they are indeed very worrying, .... but the funny thing is for me all these demos _do_ work! Linux/nvidia.

The other strange thing is that you say that in the first demo, the textures appear as white squares. Nothing in the spec seems to justify this behavior. Bad textures should give black, not white.

I'm going to investigate first things first: the first question is why does
    http://learningwebgl.com/blog/?p=684
give this warning about textures. The code looks fine:

  function handleLoadedTexture(texture) {
    gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);

    gl.bindTexture(gl.TEXTURE_2D, texture);
    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, texture.image);
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_NEAREST);
    gl.generateMipmap(gl.TEXTURE_2D);

    gl.bindTexture(gl.TEXTURE_2D, null);
  }

Since generateMipmap doesn't produce any message in the error console, it should have succeeded, so the texture should be mipmap complete, so the message we're getting sounds bogus.
For webgl texture issue, it is a dupe of bug 586946.
For pool webgl demo, I have the same issue with an Intel card on Windows 7 x64.
(In reply to comment #2)
> For webgl texture issue, it is a dupe of bug 586946.
> For pool webgl demo, I have the same issue with an Intel card on Windows 7 x64.

Thanks, I was forgetting about this one.

So the white texture issue can hardly be anything else than a driver bug. That part, IMO, can only be marked "RESOLVED INVALID" unless you can see a workaround or think there is something more to it.

But the other issue discussed here --- the spurious WebGL message about texture going to be rendered as black --- needs to be investigated.
Ok, the spurious WebGL message from comment 0 was easy to explain.

This demo sets a timer continuously redrawing the scene. The first time this timer ticks, happens _before_ the texture is actually loaded. I found out by adding dump() calls to the javascript:

--- WebGL context created: 0x2b96ac0
begin tick
begin drawscene
before draw
WebGL: A texture is going to be rendered as if it were black, as per the OpenGL ES 2.0.24 spec section 3.8.2, because it is
 a 2D texture, with a minification filter requiring a mipmap, and is not mipmap complete (as defined in section 3.7.10).
after draw
end drawscene
end tick
begin load texture 
end load texture 
begin tick
begin drawscene
before draw
after draw
end drawscene
end tick


So there really is nothing interesting about this message. I guess I'll just add another info message saying that "the black texture rendering reported earlier is no longer happening".

The rest really has got to be ATI bugs.
ah no, even better, I'll make it NOT print any message when a texture is of size 0x0 (as happens here with the not-yet-loaded texture).
Filed bug 594393 about the weird message.
Summary: WebGL textures don't work with ATI cards → Google WebGL pool demo does not work
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b6pre) Gecko/20100912 Firefox/4.0b6pre

These WebGL sites don't work for me:
- http://o3d.googlecode.com/svn/trunk/samples_webgl/o3d-webgl-samples/pool.html (black)
- http://cubicvr.org/CubicVR.js/fluid_sim/GPUFluid.html (black)
- http://media.tojicode.com/q3bsp/ (only sound)
- http://www.iquilezles.org/apps/shadertoy/ (white field)
- http://www.ibiblio.org/e-notes/webgl/deflate/zmaj.html (black head on white background)
- http://www.ibiblio.org/e-notes/webgl/deflate/shark_anim.html (black shark)
- http://www.ibiblio.org/e-notes/webgl/deflate/enterprise.html (black)
- http://www.ibiblio.org/e-notes/webgl/deflate/bike.html (black)
- http://www.ibiblio.org/e-notes/webgl/deflate/yf23.html (wrong color compared to chrome 7)
- http://www.ibiblio.org/e-notes/webgl/fire.html (no fire, only black)
- http://www.ibiblio.org/e-notes/webgl/bump_hi.html (no reflexions/bump)
- http://www.ibiblio.org/e-notes/webgl/barkley3d.html (no animation)
- http://www.ibiblio.org/e-notes/webgl/ca/ca_mag.html (only white)
- http://www.ibiblio.org/e-notes/webgl/ca/life800.html (black)
- http://www.ibiblio.org/e-notes/webgl/ca/b34s34.html (black)
- http://www.ibiblio.org/e-notes/webgl/ca/b3s12345.html (black)
- http://www.ibiblio.org/e-notes/webgl/ca/b3s45678.html (black)
- http://www.ibiblio.org/e-notes/webgl/julia_de.html (wrong compared to chrome 7)
- http://www.ibiblio.org/e-notes/webgl/deep_zoom.html (black)

Graphics
Adapter Description = NVIDIA GeForce GT 240
Vendor ID = 10de
Device ID = 0ca3
Adapter RAM = 1024
Adapter Drivers = nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
Driver Version = 8.17.12.6052 (259.47 & 258.96 too)
Driver Date = 9-1-2010
Direct2D Enabled = true
DirectWrite Enabled = true
GPU Accelerated Windows = 1/1 Direct3D 9
Now bug 593850 is fixed.
I set webgl.shader_validator to false (http://www.ibiblio.org/e-notes/webgl/webgl.htm, may be due to bug 589268 or bug 594489 because my GPU supports Shader Model 4.0 features)
D2D is OFF (bug 594025)
I check every webgl demo in comment 7, here below are only those that still don't work :
- http://o3d.googlecode.com/svn/trunk/samples_webgl/o3d-webgl-samples/pool.html (black balls)
- http://cubicvr.org/CubicVR.js/fluid_sim/GPUFluid.html (black)
- http://www.ibiblio.org/e-notes/webgl/fire.html (no fire, only black)
- http://www.ibiblio.org/e-notes/webgl/ca/ca_mag.html (pause button does not pause)
- http://www.ibiblio.org/e-notes/webgl/ca/life800.html (black)
- http://www.ibiblio.org/e-notes/webgl/deep_zoom.html (black)

Adapter Description : Mobile Intel(R) 4 Series Express Chipset Family
Vendor ID : 8086
Device ID : 2a42
Adapter RAM : Unknown
Adapter Driversigdumd64 igd10umd64 igdumdx32 igd10umd32
Driver Version : 8.15.10.2202
Driver Date : 8-25-2010
Direct2D Enabled : false
DirectWrite Enabled : false
GPU Accelerated Windows : 1/1 Direct3D 9
(In reply to comment #8)
> Now bug 593850 is fixed.
> I set webgl.shader_validator to false
> (http://www.ibiblio.org/e-notes/webgl/webgl.htm, may be due to bug 589268 or
> bug 594489 because my GPU supports Shader Model 4.0 features)
> D2D is OFF (bug 594025)
> I check every webgl demo in comment 7, here below are only those that still
> don't work :
> - http://o3d.googlecode.com/svn/trunk/samples_webgl/o3d-webgl-samples/pool.html
> (black balls)

Hm, I can't reproduce (no problem here). I wonder if we need to manually enable GL_ARB_texture_rectange or something, to make some drivers happy.

> - http://cubicvr.org/CubicVR.js/fluid_sim/GPUFluid.html (black)
> - http://www.ibiblio.org/e-notes/webgl/fire.html (no fire, only black)
> - http://www.ibiblio.org/e-notes/webgl/ca/ca_mag.html (pause button does not
> pause)
> - http://www.ibiblio.org/e-notes/webgl/ca/life800.html (black)
> - http://www.ibiblio.org/e-notes/webgl/deep_zoom.html (black)
> 
> Adapter Description : Mobile Intel(R) 4 Series Express Chipset Family
> Vendor ID : 8086
> Device ID : 2a42
> Adapter RAM : Unknown
> Adapter Driversigdumd64 igd10umd64 igdumdx32 igd10umd32
> Driver Version : 8.15.10.2202
> Driver Date : 8-25-2010
> Direct2D Enabled : false
> DirectWrite Enabled : false
> GPU Accelerated Windows : 1/1 Direct3D 9
One more thing:
With Minefield b7pre x64, webgl pool demo crashes FF with shader validator ON or OFF.
Ah. Let me finish coding the GL debug mode today, then i'll ask you to reproduce and give me a stack trace.
attached a picture of what I'm getting, it's very distorted
I have a ATi Radeon HD 5570
(In reply to comment #12)
webgl.shader_validator = false or true ?
(with set to false it could work)
(In reply to comment #13)
> (In reply to comment #12)
> webgl.shader_validator = false or true ?
> (with set to false it could work)

It using the default of true, but I tried false and the exact result was the same
I just got the latest Minefield and it the webgl pool is working perfectly
For me, with Intel GMA 4500MHD:
Minefield b7pre/20101002 :
* shader_validator set to true:
Only bottom menu is displayed
* shader_validator set to false:
The balls are black
Chromium 7.0.532.0 (60288)
* OK
(In reply to comment #16)
> For me, with Intel GMA 4500MHD:
> Minefield b7pre/20101002 :
> * shader_validator set to true:
> Only bottom menu is displayed
> * shader_validator set to false:
> The balls are black
> Chromium 7.0.532.0 (60288)
> * OK

Vlad: does that mean that Chromium is using a more recent version of ANGLE than we are? Should we update our copy?
We don't use ANGLE directly for rendering, only for shader validation; so you're using the Intel OpenGL driver for all of those.
According to all the comments:
* Windows 7 aero + ATI Mobility Radeon HD 3650 + 4.0b5?  : black screen
* Windows 7 aero + ATI Radeon HD 5570          + 4.0b6   : distorted pool
* Windows 7 aero + ATI Radeon HD 5570          + 4.0b7pre: OK
* Windows 7 aero + Intel GMA4500MHD            + 4.0b7pre: black screen

Does anybody without an Intel chipset have an issue with this WebGL demo in 4.0b7pre?
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b7pre) Gecko/20101005 Firefox/4.0b7pre

Nvidia Geforce v260.63
* Windows 7 aero + Nvidia GT240 + 4.0b7pre + webgl.shader_validator;fale: OK
* Windows 7 aero + Nvidia GT240 + 4.0b7pre + webgl.shader_validator;true: black screen


ATI Catalyst 10.9
* Windows 7 aero + ATI HD6470 AGP + 4.0b7pre + webgl.shader_validator;fale: OK
* Windows 7 aero + ATI HD6470 AGP + 4.0b7pre + webgl.shader_validator;true: black screen & 100% CPU usage
one crash
http://crash-stats.mozilla.com/report/index/bp-d7f96f10-e71d-41e2-b6e1-c86912101005
Sorry not "ATI HD6470 AGP" it is "ATI HD4670 AGP".
Summary: Google WebGL pool demo does not work → Google WebGL pool demo displays a black screen when shader validator is ON and sometimes some black balls when it is OFF
should be fixed now --please reopen if not!
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Firefox 4.0b7: still fails (see the bug title)

Minefield 4.0b8pre:
I get this message: "Your browser does not appear to support WebGL."
For other google demos (http://o3d.googlecode.com/svn/trunk/samples_webgl), I get this message: "This page requires the O3D plugin to be installed.".
If I install O3D plugin, I get this message: "This page requires a newer version of the O3D plugin."
For this, I filed bug 619034.
(In reply to comment #22)
> should be fixed now --please reopen if not!

thx, it really seems fixed in firefox 4b8pre!

specs:
ATI Mobility Radeon HD 2600
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: