Closed Bug 1087270 Opened 9 years ago Closed 9 years ago

Not all D3D11 result codes are checked.

Categories

(Core :: Graphics: Layers, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: nical, Assigned: nical)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Also, it's not clear what we are supposed to do when a command fails. Some cases should be recoverable like device resets (although we don't want to get into a loop of loosing and recreating devices so we should detect). In some cases we should crash debug builds, or maybe try to fallback to another backend (we don't have the infrastructure to switch backends at runtime, though).
We need a way to separate failures causing occasional glitches from the ones making the browser unusable.
By default a failing operation will crash debug builds. We can use this as a base to add more checks and logging (for instance we could crash release builds after N failures with N a pref or just a hard coded threshold).
Assignee: nobody → nical.bugzilla
Attachment #8509552 - Flags: review?(jmuizelaar)
Comment on attachment 8509552 [details] [diff] [review]
Check more d3d11 calls and add a hook to react in case of failure.

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

You will want to use gfxCriticalError() and gfxWarning() to message what's going on, even before doing a MOZ_CRASH.  gfxCriticalError() will show up in the crash reports as well.  See also bug 1074952.
Attachment #8509552 - Flags: review?(jmuizelaar) → review+
(In reply to Milan Sreckovic [:milan] from comment #2)
> You will want to use gfxCriticalError() and gfxWarning() to message what's
> going on, even before doing a MOZ_CRASH.  gfxCriticalError() will show up in
> the crash reports as well.  See also bug 1074952.

This would be awesome, I'll happily write the patch as soon as we can use gfxCriticalError off the main thread (or is it already the case?)
Hi Nical, sorry had to back this out for bustage on windows like https://treeherder.mozilla.org/ui/logviewer.html#?job_id=3240120&repo=mozilla-inbound
Ah, -WError did catch an actual bug this time, my bad.
green try push: https://tbpl.mozilla.org/?tree=Try&rev=49b03746dc55 (with the fix)
https://hg.mozilla.org/mozilla-central/rev/934e7c6d8811
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.