Closed
Bug 942499
Opened 11 years ago
Closed 11 years ago
Remove from GLContext capability-check helper functions such as CanUploadSubTextures, CanReadSRGBFromFBOTexture, CanUploadNonPowerOfTwo, WantsSmallTiles, etc.
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: bjacob, Assigned: bjacob)
References
Details
(Whiteboard: [qa-])
Attachments
(3 files)
29.54 KB,
patch
|
BenWa
:
review+
|
Details | Diff | Splinter Review |
8.51 KB,
patch
|
gal
:
review+
BenWa
:
feedback+
|
Details | Diff | Splinter Review |
3.97 KB,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8340782 -
Flags: review?(bgirard)
Updated•11 years ago
|
Attachment #8340782 -
Flags: review?(bgirard) → review+
Assignee | ||
Comment 3•11 years ago
|
||
What do you think? The preference looked like something that had been useful at a precise point in the past, but doesn't really justify its complexity anymore (nontrivial interplay with gfxplatform and global variables to set up the bool var cache on the main thread on startup).
If we need to test, we can still do so by changing 1 line of code and recompile; and there has been no other instance of a GPU not supporting NPOT upload since those old versions of the Adreno driver that we had run into 1.5 years ago.
Attachment #8340783 -
Flags: review?(bgirard)
Assignee | ||
Comment 4•11 years ago
|
||
Also make it use nsCocoaFeatures::OnLionOrLater instead of custom calls to deprecated Gestalt function.
Attachment #8340784 -
Flags: review?(jgilbert)
Assignee | ||
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
Comment on attachment 8340783 [details] [diff] [review]
Move CanUploadNonPowerOfTwo out of GLContext; remove the gfx.textures.poweroftwo.force-enabled preference
Thanks for the weekend cleanup duty.
Attachment #8340783 -
Flags: review?(bgirard) → review+
Updated•11 years ago
|
Attachment #8340784 -
Flags: review?(jgilbert) → review+
Comment 7•11 years ago
|
||
Comment on attachment 8340783 [details] [diff] [review]
Move CanUploadNonPowerOfTwo out of GLContext; remove the gfx.textures.poweroftwo.force-enabled preference
Setting needinfo? for BenWa for the pref. If he minds we can always put it back in. I doubt he will.
Attachment #8340783 -
Flags: feedback?(bgirard)
Assignee | ||
Comment 8•11 years ago
|
||
Thanks. I have a try push running at the moment, I was hoping to land a bunch of things together tomorrow.
https://tbpl.mozilla.org/?tree=Try&rev=e1f5ae3e4519
hm, mochitest orange on Mac caused by my srgb patch here.
Assignee | ||
Comment 9•11 years ago
|
||
hah, accidentally removed a logical negation around WorkAroundDriverBugs:
+static bool
+CanReadSRGBFromFBOTexture(GLContext* gl)
+{
+ if (gl->WorkAroundDriverBugs())
+ return true;
https://tbpl.mozilla.org/?tree=Try&rev=5f4c19777851
Comment 10•11 years ago
|
||
When do we not want WorkAroundDriverBugs() to be true?
Comment 11•11 years ago
|
||
(In reply to Andreas Gal :gal from comment #10)
> When do we not want WorkAroundDriverBugs() to be true?
WorkAroundDriverBugs AFAIK is primarily for working around drivers in Android 2.x (maybe 3.x too) where GL drivers were made available mostly just for testing with very poor quality. I suspect for android 4.x and b2g we have good quality driver that don't have the problems we work around. We should plan to clean this up in the future. Some work-around may be causing slight performance regressions.
Not a huge priority but it would be nice to do away with these.
Comment 12•11 years ago
|
||
Comment on attachment 8340783 [details] [diff] [review]
Move CanUploadNonPowerOfTwo out of GLContext; remove the gfx.textures.poweroftwo.force-enabled preference
Review of attachment 8340783 [details] [diff] [review]:
-----------------------------------------------------------------
Remove pref is fine by made. We're past the point where it's useful.
Attachment #8340783 -
Flags: feedback?(bgirard) → feedback+
Assignee | ||
Comment 13•11 years ago
|
||
(In reply to Andreas Gal :gal from comment #10)
> When do we not want WorkAroundDriverBugs() to be true?
WorkAroundDriverBugs() just reflects the gfx.work-around-driver-bugs pref.
It's always true in default config, but for debugging purposes and to test whether a workaround is still needed, it's useful to be able to turn it off. Having work-arounds enclosed in if (WorkAroundDriverBugs()) { ... } also gives us nice code self-documentation.
Assignee | ||
Comment 14•11 years ago
|
||
Another side benefit is that just looking for occurences of WorkAroundDriverBugs in the codebase you can find most of our driver workarounds.
http://dxr.mozilla.org/mozilla-central/search?q=WorkAroundDriverBugs
Assignee | ||
Comment 15•11 years ago
|
||
Assignee | ||
Comment 16•11 years ago
|
||
Assignee | ||
Comment 17•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=01672e3e55a0
http://hg.mozilla.org/integration/mozilla-inbound/rev/7c7c405d9373
http://hg.mozilla.org/integration/mozilla-inbound/rev/22a1c5c13716
http://hg.mozilla.org/integration/mozilla-inbound/rev/c789f25ca86e
Target Milestone: --- → mozilla28
Comment 18•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7c7c405d9373
https://hg.mozilla.org/mozilla-central/rev/22a1c5c13716
https://hg.mozilla.org/mozilla-central/rev/c789f25ca86e
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•