Open Bug 1278506 Opened 9 years ago Updated 3 years ago

webgl 2.0 glTexSubImage3D does not work properly

Categories

(Core :: Graphics: CanvasWebGL, defect, P3)

defect

Tracking

()

People

(Reporter: marcot, Unassigned)

Details

(Whiteboard: [gfx-noted])

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Steps to reproduce: We use glTexSubImage3D to update data into an array of 2d textures, then sample from the textures when rendering the objects in the scene. Actual results: the spheres look black in Firefox Nightly 48, so either the content of the textures was not uploaded or the texture sampling fails. Expected results: We tried the same on Chrome Canary, where we get better results. repro: https://oc.unity3d.com/index.php/s/Sm65T6cdXIueiGW
It might actually be caused by glFramebufferTextureLayer but i still need to confirm that.
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0 Build ID: 20160609130607 Indeed, the issue is reproducible on the latest Nightly 50.0a1 - the spheres look black while on Firefox 47 RC the spheres are magenta.
Status: UNCONFIRMED → NEW
Component: Untriaged → Canvas: WebGL
Ever confirmed: true
Product: Firefox → Core
Version: 48 Branch → Trunk
I investigated this bug a bit more and it turns out I get different errors depending on the object we render. So, I created two separate repro's, which at this point i don't know if they are related or not. 1- https://oc.unity3d.com/index.php/s/VeQjrqHrk6fd4q6 Error: WebGL: drawElements: Active texture 0 for target 0x8c1a is 'incomplete', and will be rendered as RGBA(0,0,0,1), as per the GLES 2.0.24 $3.8.2: Because the minification filter requires mipmapping, the texture must be "mipmap complete". 2- https://oc.unity3d.com/index.php/s/0EWtUx2HHGHb51p Error: WebGL: framebufferTextureLayer: attachment:: invalid enum value COLOR_ATTACHMENT0 64bdb23a-5803-a244-889c-9c9477d6e228:9280:2 Error: WebGL: clear: Incomplete framebuffer: Status 0x8cd7. both of them work fine in Google Canary. It would be nice to know if this is a bug in Firefox, or perhaps Chrome is a bit more forgiving regarding certain render states we don't set properly.
Whiteboard: [gfx-noted]
Could you use mozregression tool to find out in more detail when things broke between 47 and 48?
(In reply to Milan Sreckovic [:milan] from comment #4) > Could you use mozregression tool to find out in more detail when things > broke between 47 and 48? I'll take a look. It may be easy to introspect on our side.
Assignee: nobody → jgilbert
Flags: needinfo?(howareyou322)
Jeff, are you working on this?
(In reply to Peter Chang[:pchang] from comment #6) > Jeff, are you working on this? No, take a look.
Assignee: jgilbert → howareyou322
Flags: needinfo?(howareyou322)
Ethan, please help to check this.
Assignee: howareyou322 → ethlin
(In reply to Simona B [:simonab] from comment #2) > Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0 > Build ID: 20160609130607 > > Indeed, the issue is reproducible on the latest Nightly 50.0a1 - the spheres > look black while on Firefox 47 RC the spheres are magenta. Firefox 47 doesn't enable webgl2 by default. I turned it on to run the test on FF47 and the spheres looks black too. I think the test may use texImage2d in webgl1. So it's not regression.
I created a simple test case of glTexSubImage3D an array of 2d textures and the result looked fine. So it may be not just glTexSubImage3D problem. Need to check the origin test case more to figure out the problem.
Assignee: demo99 → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.