Closed Bug 1305832 Opened 8 years ago Closed 8 years ago

Fix CopyTexImage format selection and texture zeroing

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox50 --- disabled
firefox51 --- fixed
firefox52 --- fixed
firefox53 --- fixed

People

(Reporter: jgilbert, Assigned: jgilbert)

References

Details

Attachments

(3 files, 1 obsolete file)

      No description provided.
Comment on attachment 8795453 [details]
Bug 1305832 - ZeroTextureData doesn't need x/y/zOffset, so remove those args. -

https://reviewboard.mozilla.org/r/81492/#review80288
Attachment #8795453 - Flags: review?(ethlin) → review+
Comment on attachment 8795452 [details]
Bug 1305832 - CopyTex[Sub]Image should specify using TexImage to convince the driver to use the right internal format. -

https://reviewboard.mozilla.org/r/81490/#review80290
Attachment #8795452 - Flags: review?(ethlin) → review+
Blocks: 1306454
Does this still need to land and possibly get uplifted? It's listed as a blocking crash for WebGL2.
Flags: needinfo?(jgilbert)
Yes, thanks.
Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5b70ccd12b42
Only use ZeroTexImageWithClear if we really have to. - r=ethlin
https://hg.mozilla.org/integration/mozilla-inbound/rev/f97b53fd3b7e
ZeroTextureData doesn't need x/y/zOffset, so remove those args. - r=ethlin
Flags: needinfo?(jgilbert)
Comment on attachment 8795452 [details]
Bug 1305832 - CopyTex[Sub]Image should specify using TexImage to convince the driver to use the right internal format. -

Approval Request Comment
[Feature/Bug causing the regression]: webgl2
[User impact if declined]:
[Is this code covered by automated tests?]:
[Has the fix been verified in Nightly?]:
[Needs manual test from QE? If yes, steps to reproduce]: 
[List of other uplifts needed for the feature/fix]:
[Is the change risky?]:
[Why is the change risky/not risky?]:
[String changes made/needed]:
Attachment #8795452 - Flags: approval-mozilla-beta?
Attachment #8795452 - Flags: approval-mozilla-aurora?
Comment on attachment 8795452 [details]
Bug 1305832 - CopyTex[Sub]Image should specify using TexImage to convince the driver to use the right internal format. -

OK, let's try this crash fix on aurora and beta.
Attachment #8795452 - Flags: approval-mozilla-beta?
Attachment #8795452 - Flags: approval-mozilla-beta+
Attachment #8795452 - Flags: approval-mozilla-aurora?
Attachment #8795452 - Flags: approval-mozilla-aurora+
And what I hope is the last one, Windows opt permaorange looking like it's just bug 1292461 but being perma: https://treeherder.mozilla.org/logviewer.html#?job_id=40146598&repo=mozilla-inbound
Sigh, and then considerably later backed out the other cset in https://hg.mozilla.org/integration/mozilla-inbound/rev/0a3b96cee2ea when I finally realized I'd only done one the first try.
Jeff, i guess comments 10-14 are for you. Seems we need to fix first the issues that came up on inbound before uplifting
Flags: needinfo?(jgilbert)
Attachment #8795453 - Attachment is obsolete: true
Blocks: 1320620
Comment on attachment 8817670 [details]
Bug 1305832 - Move texture clearing code into WebGLTexture.cpp. -

https://reviewboard.mozilla.org/r/97890/#review98900
Attachment #8817670 - Flags: review?(ethlin) → review+
Comment on attachment 8817669 [details]
Bug 1305832 - Only glClear for ANGLE's ANGLE_depth_texture textures. -

https://reviewboard.mozilla.org/r/97888/#review98898

::: dom/canvas/WebGLTextureUpload.cpp:1962
(Diff revision 1)
>      do {
>          const auto& idealUnpack = dstUsage->idealUnpack;
>          if (!isSubImage) {
> +            UniqueBuffer buffer;
> +
> +            if (rwWidth != dstWidth || rwHeight != dstHeight) {

Why do you do the calloc only when the size is mismatched? Can you explain a little bit?
Comment on attachment 8817669 [details]
Bug 1305832 - Only glClear for ANGLE's ANGLE_depth_texture textures. -

https://reviewboard.mozilla.org/r/97888/#review98898

> Why do you do the calloc only when the size is mismatched? Can you explain a little bit?

Sure: We don't need to upload zeros if we're going to copyTexSubImage over the whole texImage.
Comment on attachment 8817669 [details]
Bug 1305832 - Only glClear for ANGLE's ANGLE_depth_texture textures. -

https://reviewboard.mozilla.org/r/97888/#review99014
Attachment #8817669 - Flags: review?(ethlin) → review+
Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3beb2dd5adea
Only use ZeroTexImageWithClear if we really have to. - r=ethlin
https://hg.mozilla.org/integration/mozilla-inbound/rev/5504fbe50a91
ZeroTextureData doesn't need x/y/zOffset, so remove those args. - r=ethlin
https://hg.mozilla.org/integration/mozilla-inbound/rev/128cffb39a39
CopyTex[Sub]Image should specify using TexImage to convince the driver to use the right internal format. - r=ethlin
https://hg.mozilla.org/integration/mozilla-inbound/rev/ea8f02c6edba
Only glClear for ANGLE's ANGLE_depth_texture textures. - r=ethlin
https://hg.mozilla.org/integration/mozilla-inbound/rev/80265d017a07
Move texture clearing code into WebGLTexture.cpp. - r=ethlin
Summary: Crash in deqp/functional/gles3/shadertexturefunction/texturegradoffset.html → Fix CopyTexImage format selection and texture zeroing.
Summary: Fix CopyTexImage format selection and texture zeroing. → Fix CopyTexImage format selection and texture zeroing
Depends on: 1328539
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: