emscripten-core / emscripten-core/emscripten

Change WebGL powerPreference default to high-performance?

Aperta
#10,000 10 commenti 0 reazioni 0 assegnatari Vedi su GitHub
GL wontfix
Lingua principale
C++
Stelle
27.6k
Fork
3.6k
Merge medio
1g 14h
PR unite (30g)
125

Descrizione

Browsers are moving to change the default WebGL powerPreference from `high-performance` to `low-power` (e.g. coming soon in [Chrome 80](https://bugs.chromium.org/p/chromium/issues/detail?id=681341#c70)). In practice this change of default means that some users (with 2 GPUs) might see the lower-end one used, and for something like a game engine that could be noticeably slower.

When creating the WebGL context, perhaps Emscripten should default to `high-performance`? I'd guess most of our users are running higher-end content. However, I'm not totally happy about such a change either, as browsers are preferring the opposite in general.

Other options:

* Just document this more.
* Add a commandline option to make it easier to force `high-performance`, instead of writing the extra code to call the C API for context creation and set `EmscriptenWebGLContextAttributes.powerPreference = EM_WEBGL_POWER_PREFERENCE_HIGH_PERFORMANCE`.
* Emit a warning in ASSERTIONS mode if `high-performance` is not set, but by default that's likely excessive.

Thoughts?

cc @juj @kenrussell @kainino0x

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

L’issue non indica alcun file né alcun test. Inizia tracciando la creazione dei contesti WebGL di Emscripten e l’API EmscriptenWebGLContextAttributes.powerPreference; per considerare il lavoro completato, è necessario concordare un comportamento tra modificare il valore predefinito, documentarlo, aggiungere un’opzione da riga di comando o emettere un avviso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp, wasm
Ambito
computer-graphics, web-dev
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.