Closed Bug 1267149 Opened 8 years ago Closed 8 years ago

WebGL2 conformance test fail: conformance2/textures/misc/tex-input-validation.html

Categories

(Core :: Graphics: CanvasWebGL, defect)

Unspecified
Windows 8
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1305864

People

(Reporter: ethlin, Unassigned)

References

()

Details

(Keywords: correctness)

Attachments

(1 file)

We will have the assertion[1] in CopySubTexImage on windows.
[1] https://dxr.mozilla.org/mozilla-central/source/dom/canvas/WebGLTextureUpload.cpp#1942
OS: Unspecified → Windows 8
Assignee: nobody → vliu
From tracking with Visual Studio, the code returns before doing |context->copyTexSubImage2D|.

https://dxr.mozilla.org/mozilla-central/source/gfx/angle/src/libGLESv2/entry_points_gles_2_0.cpp?case=true&from=entry_points_gles_2_0.cpp#786

I will do further tracking to narrow down issue.
I tried to simplified the test case and found this test case also crashed in below when running [1].

[1]:https://dxr.mozilla.org/mozilla-central/source/dom/canvas/WebGLTextureUpload.cpp#1700 

Since destinationFormat was set to RGB565 which didn't defined in [2], it fall back to default.  

[2]:https://dxr.mozilla.org/mozilla-central/source/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp#512

I would tried to study the spec to find out root cause.
Hi Jeff,
The attached WIP intends to fix the crash happens in [1] when I tried to simplify the test and only keep CopyTexSubImage2D part.

[1]https://dxr.mozilla.org/mozilla-central/source/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp#512

The idea of WIP to fix it came from observing the code from Chrome. I'd also tried the same test in Chrome Canary, it turns out that Chrome Canary pass all test in CopyTexSubImage2D part.

In Chrome, it seems the dest_internal_format in [2] got from its caller, which was from internalFormat. ANGLE can recognizes the internalFormat and mapped to correct BlitShaderType.

[2]: https://code.google.com/p/chromium/codesearch#chromium/src/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc&sq=package:chromium&l=434&rcl=1464203926

I would like to got the feedback from you if you are also think it is fine for the the WIP.
Attachment #8756733 - Flags: feedback?(jgilbert)
Comment on attachment 8756733 [details] [diff] [review]
WIP-fix-assertion-for-mismatched-format.patch

Review of attachment 8756733 [details] [diff] [review]:
-----------------------------------------------------------------

This is complicated. I'm working on this in a different bug.
Attachment #8756733 - Flags: feedback?(jgilbert) → feedback-
Based on Comment 4, I will untake this bug to prevent duplicate work.
Assignee: vliu → nobody
Keywords: correctness
See Also: → 1305864
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Assignee: nobody → nobody
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: