Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/de/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Schreibens – maßgeblich ist die Tag-Liste des jeweiligen Repositorys.
| [`lineedit`](https://github.com/go-widgets/lineedit) | v0.1.1 | ein Zeileneditor als reines Modell: Verlauf, Rückwärtssuche, Tab-Vervollständigung; nur die Standardbibliothek | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/lineedit) |
| [`vcs`](https://github.com/go-widgets/vcs) | v0.1.0 | welchen Zustand jede Datei eines Arbeitsverzeichnisses hat, und eine Registry für Treiber; nur die Standardbibliothek. Der Git-Treiber ist das verschachtelte Modul `vcs/git` (`git/v0.1.0`) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/vcs) |
| [`data`](https://github.com/go-widgets/data) | v0.4.0 | [typisierte Datensätze, Abfragen, ein lokaler oder entfernter Speicher]({{< relref "/state/data.md" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/data) |
| [`window`](https://github.com/go-widgets/window) | v0.90.0 | [ein natives Fenster]({{< relref "/surfaces/native-window.md" >}}) auf acht Back-Ends | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/window) |
| [`window`](https://github.com/go-widgets/window) | v0.91.0 | [ein natives Fenster]({{< relref "/surfaces/native-window.md" >}}) auf acht Back-Ends | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/window) |
| [`application`](https://github.com/go-widgets/application) | v0.8.1 | [der Anwendungslebenszyklus]({{< relref "/surfaces/application.md" >}}) oberhalb eines Fensters | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/application) |
| [`tray`](https://github.com/go-widgets/tray) | v0.15.0 | [ein Tray-Symbol und sein Menü]({{< relref "/surfaces/application.md#the-tray" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/tray) |
| [`webcanvas`](https://github.com/go-widgets/webcanvas) | v0.9.0 | [eine Szene in einem Browser-`<canvas>`]({{< relref "/surfaces/browser.md" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/webcanvas) |
Expand Down
22 changes: 21 additions & 1 deletion content/de/surfaces/native-window.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,27 @@ Unter macOS zeichnet `Config{GPU: true}` die Frames auf der GPU.
960 × 640 und 0,99 ms statt 5,96 ms bei 1920 × 1200 (Apple M4 Max).
- **Rückfall:** Ein Fenster mit transluzentem Material bleibt auf dem CPU-Pfad,
ebenso ein Rechner, auf dem Metal nicht startet. Beides ist kein Fehler.
Andere Back-ends ignorieren die Option.
Unter Linux siehe unten; die anderen Back-ends ignorieren die Option.

Unter Linux (X11 und Wayland) zeichnet `Config{GPU: true}` Frames mit Vulkan.
- **Wie:** dieselbe Aufzeichnung, gezeichnet vom Vulkan-Renderer von
go-gfx/gpu2d. Seine Pixel werden in den Framebuffer des Fensters kopiert, der
wie immer dargestellt wird: MIT-SHM (oder `PutImage`) unter X11, `wl_shm`
unter Wayland. Der Frame durchläuft die CPU einmal; per dma-buf wird noch
nichts mit dem Display-Server geteilt.
- **Genauigkeit:** auf Software-Vulkan (lavapipe) sind die Pixel Byte für Byte
die des CPU-Pfads, live auf beiden Protokollen belegt: das vom X-Server
zurückgelesene Fenster und der vom Fenster übergebene `wl_shm`-Puffer sind
gleich denen des CPU-Pfads. Eine Hardware-GPU wurde noch nicht gemessen.
- **Rückfall:** ist Vulkan nicht verfügbar oder wird ein Frame abgelehnt (für
das Gerät zu groß, Gerät verloren), zeichnet das Fenster auf der CPU und läuft
weiter. `GPUError()` am Back-end nennt den Grund, und jeder spätere Frame ist
ein CPU-Frame.
- **Kosten (nur Software):** lavapipe ist ein CPU-Rasterizer, daher kostet der
GPU-Pfad etwa das Zehnfache der CPU-Zeit des CPU-Pfads: 25,8 ms statt 2,48 ms
pro Frame bei 960 × 640 und 89,7 ms statt 8,46 ms bei 1920 × 1200 (X11,
lavapipe auf 16 Threads in einem arm64-Container auf einem Apple M4 Max). Ob es
sich auf einer echten GPU lohnt, ist noch nicht gemessen.

## HiDPI {#hidpi}

Expand Down
2 changes: 1 addition & 1 deletion content/en/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ writing — the repository's own tag list is the authority.
| [`lineedit`](https://github.com/go-widgets/lineedit) | v0.1.1 | a line editor as a pure model: history, reverse search, Tab completion; standard library only | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/lineedit) |
| [`vcs`](https://github.com/go-widgets/vcs) | v0.1.0 | what state each file of a working tree is in, and a registry of drivers; standard library only. The git driver is the nested module `vcs/git` (`git/v0.1.0`) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/vcs) |
| [`data`](https://github.com/go-widgets/data) | v0.4.0 | [typed records, queries, a local or remote store]({{< relref "/state/data.md" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/data) |
| [`window`](https://github.com/go-widgets/window) | v0.90.0 | [a native window]({{< relref "/surfaces/native-window.md" >}}) on eight back-ends | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/window) |
| [`window`](https://github.com/go-widgets/window) | v0.91.0 | [a native window]({{< relref "/surfaces/native-window.md" >}}) on eight back-ends | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/window) |
| [`application`](https://github.com/go-widgets/application) | v0.8.1 | [the application lifecycle]({{< relref "/surfaces/application.md" >}}) above a window | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/application) |
| [`tray`](https://github.com/go-widgets/tray) | v0.15.0 | [a tray icon and its menu]({{< relref "/surfaces/application.md#the-tray" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/tray) |
| [`webcanvas`](https://github.com/go-widgets/webcanvas) | v0.9.0 | [a scene in a browser `<canvas>`]({{< relref "/surfaces/browser.md" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/webcanvas) |
Expand Down
20 changes: 19 additions & 1 deletion content/en/surfaces/native-window.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,25 @@ On macOS, `Config{GPU: true}` draws frames on the GPU.
960 × 640, and 0.99 ms instead of 5.96 ms at 1920 × 1200 (Apple M4 Max).
- **Fallbacks:** a window with a translucent material stays on the CPU path,
and so does a machine where Metal will not start. Neither is an error.
Other back-ends ignore the option.
On Linux, see below; the other back-ends ignore the option.

On Linux (X11 and Wayland), `Config{GPU: true}` draws frames with Vulkan.
- **How:** the same recording, drawn by go-gfx/gpu2d's Vulkan renderer. Its
pixels are copied into the window's framebuffer, which is presented as ever:
MIT-SHM (or `PutImage`) on X11, `wl_shm` on Wayland. The frame crosses the CPU
once; nothing is shared with the display server by dma-buf yet.
- **Exactness:** on software Vulkan (lavapipe) the pixels are the CPU path's,
byte for byte, proven live on both protocols: the window read back from the X
server, and the `wl_shm` buffer the window committed, equal the CPU path's.
No hardware GPU has been measured yet.
- **Fallback:** where Vulkan is unavailable, or a frame is refused (too large
for the device, device lost), the window draws on the CPU and keeps running.
`GPUError()` on the back-end says why, and every later frame is a CPU frame.
- **Cost (software only):** lavapipe is a CPU rasterizer, so the GPU path costs
about ten times the CPU time of the CPU path: 25.8 ms instead of 2.48 ms per
frame at 960 × 640, and 89.7 ms instead of 8.46 ms at 1920 × 1200 (X11,
lavapipe on 16 threads in an arm64 container on an Apple M4 Max). Whether it
pays on a real GPU is not measured yet.

## HiDPI

Expand Down
2 changes: 1 addition & 1 deletion content/es/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ de escribir; la autoridad es la lista de etiquetas del propio repositorio.
| [`lineedit`](https://github.com/go-widgets/lineedit) | v0.1.1 | un editor de línea como modelo puro: historial, búsqueda inversa, completado con Tab; solo la biblioteca estándar | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/lineedit) |
| [`vcs`](https://github.com/go-widgets/vcs) | v0.1.0 | en qué estado está cada archivo de un árbol de trabajo, y un registro de controladores; solo la biblioteca estándar. El controlador de git es el módulo anidado `vcs/git` (`git/v0.1.0`) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/vcs) |
| [`data`](https://github.com/go-widgets/data) | v0.4.0 | [registros tipados, consultas, un almacén local o remoto]({{< relref "/state/data.md" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/data) |
| [`window`](https://github.com/go-widgets/window) | v0.90.0 | [una ventana nativa]({{< relref "/surfaces/native-window.md" >}}) sobre ocho backends | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/window) |
| [`window`](https://github.com/go-widgets/window) | v0.91.0 | [una ventana nativa]({{< relref "/surfaces/native-window.md" >}}) sobre ocho backends | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/window) |
| [`application`](https://github.com/go-widgets/application) | v0.8.1 | [el ciclo de vida de la aplicación]({{< relref "/surfaces/application.md" >}}) por encima de una ventana | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/application) |
| [`tray`](https://github.com/go-widgets/tray) | v0.15.0 | [un icono de bandeja y su menú]({{< relref "/surfaces/application.md#the-tray" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/tray) |
| [`webcanvas`](https://github.com/go-widgets/webcanvas) | v0.9.0 | [una escena en un `<canvas>` de navegador]({{< relref "/surfaces/browser.md" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/webcanvas) |
Expand Down
22 changes: 21 additions & 1 deletion content/es/surfaces/native-window.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,27 @@ En macOS, `Config{GPU: true}` dibuja los fotogramas en la GPU.
(Apple M4 Max).
- **Alternativa:** una ventana con un material translúcido se queda en el
camino de CPU, igual que una máquina donde Metal no arranca. Ninguno de los
dos casos es un error. Los demás back-ends ignoran la opción.
dos casos es un error. En Linux, véase más abajo; los demás back-ends ignoran la opción.

En Linux (X11 y Wayland), `Config{GPU: true}` dibuja los fotogramas con Vulkan.
- **Cómo:** el mismo registro, dibujado por el renderizador Vulkan de
go-gfx/gpu2d. Sus píxeles se copian en el framebuffer de la ventana, que se
presenta como siempre: MIT-SHM (o `PutImage`) en X11, `wl_shm` en Wayland. El
fotograma pasa una vez por la CPU; todavía no se comparte nada con el servidor
de pantalla mediante dma-buf.
- **Exactitud:** en Vulkan por software (lavapipe) los píxeles son los del camino
de CPU, byte a byte, demostrado en vivo en ambos protocolos: la ventana leída
de vuelta del servidor X y el búfer `wl_shm` que la ventana confirmó son
iguales a los del camino de CPU. Aún no se ha medido ninguna GPU de hardware.
- **Alternativa:** cuando Vulkan no está disponible, o se rechaza un fotograma
(demasiado grande para el dispositivo, dispositivo perdido), la ventana dibuja
en la CPU y sigue funcionando. `GPUError()` en el back-end dice el motivo, y
todo fotograma posterior es un fotograma de CPU.
- **Coste (solo software):** lavapipe es un rasterizador de CPU, así que el camino
de GPU cuesta unas diez veces el tiempo de CPU del camino de CPU: 25,8 ms en
lugar de 2,48 ms por fotograma a 960 × 640, y 89,7 ms en lugar de 8,46 ms a
1920 × 1200 (X11, lavapipe con 16 hilos en un contenedor arm64 sobre un Apple
M4 Max). Si compensa en una GPU real aún no está medido.

## HiDPI {#hidpi}

Expand Down
2 changes: 1 addition & 1 deletion content/fr/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ rédaction — la liste des étiquettes du dépôt lui-même fait foi.
| [`lineedit`](https://github.com/go-widgets/lineedit) | v0.1.1 | un éditeur de ligne en pur modèle : historique, recherche inversée, complétion par Tab ; bibliothèque standard seule | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/lineedit) |
| [`vcs`](https://github.com/go-widgets/vcs) | v0.1.0 | l'état de chaque fichier d'une arborescence de travail, et un registre de pilotes ; bibliothèque standard seule. Le pilote git est le module imbriqué `vcs/git` (`git/v0.1.0`) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/vcs) |
| [`data`](https://github.com/go-widgets/data) | v0.4.0 | [enregistrements typés, requêtes, stockage local ou distant]({{< relref "/state/data.md" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/data) |
| [`window`](https://github.com/go-widgets/window) | v0.90.0 | [une fenêtre native]({{< relref "/surfaces/native-window.md" >}}) sur huit back-ends | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/window) |
| [`window`](https://github.com/go-widgets/window) | v0.91.0 | [une fenêtre native]({{< relref "/surfaces/native-window.md" >}}) sur huit back-ends | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/window) |
| [`application`](https://github.com/go-widgets/application) | v0.8.1 | [le cycle de vie de l'application]({{< relref "/surfaces/application.md" >}}) au-dessus d'une fenêtre | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/application) |
| [`tray`](https://github.com/go-widgets/tray) | v0.15.0 | [une icône de zone de notification et son menu]({{< relref "/surfaces/application.md#the-tray" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/tray) |
| [`webcanvas`](https://github.com/go-widgets/webcanvas) | v0.9.0 | [une scène dans un `<canvas>` de navigateur]({{< relref "/surfaces/browser.md" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/webcanvas) |
Expand Down
22 changes: 21 additions & 1 deletion content/fr/surfaces/native-window.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,27 @@ Sous macOS, `Config{GPU: true}` dessine les images sur le GPU.
en 960 × 640, et 0,99 ms au lieu de 5,96 ms en 1920 × 1200 (Apple M4 Max).
- **Repli :** une fenêtre avec un matériau translucide reste sur le chemin CPU,
de même qu'une machine où Metal ne démarre pas. Ni l'un ni l'autre n'est une
erreur. Les autres back-ends ignorent l'option.
erreur. Sous Linux, voir ci-dessous ; les autres back-ends ignorent l'option.

Sous Linux (X11 et Wayland), `Config{GPU: true}` dessine les images avec Vulkan.
- **Comment :** le même enregistrement, dessiné par le moteur Vulkan de
go-gfx/gpu2d. Ses pixels sont copiés dans le framebuffer de la fenêtre, qui est
présenté comme toujours : MIT-SHM (ou `PutImage`) sous X11, `wl_shm` sous
Wayland. L'image traverse le CPU une fois ; rien n'est encore partagé avec le
serveur d'affichage par dma-buf.
- **Exactitude :** sur Vulkan logiciel (lavapipe), les pixels sont ceux du chemin
CPU, octet pour octet, prouvé en direct sur les deux protocoles : la fenêtre
relue depuis le serveur X, et le tampon `wl_shm` validé par la fenêtre, sont
égaux à ceux du chemin CPU. Aucun GPU matériel n'a encore été mesuré.
- **Repli :** quand Vulkan est indisponible, ou qu'une image est refusée (trop
grande pour le périphérique, périphérique perdu), la fenêtre dessine sur le CPU
et continue. `GPUError()` sur le back-end en donne la raison, et toute image
suivante est une image CPU.
- **Coût (logiciel seulement) :** lavapipe est un rastériseur CPU, donc le chemin
GPU coûte environ dix fois le temps CPU du chemin CPU : 25,8 ms au lieu de
2,48 ms par image en 960 × 640, et 89,7 ms au lieu de 8,46 ms en 1920 × 1200
(X11, lavapipe sur 16 threads dans un conteneur arm64 sur un Apple M4 Max). Ce
que cela donne sur un vrai GPU n'est pas encore mesuré.

## HiDPI {#hidpi}

Expand Down
2 changes: 1 addition & 1 deletion content/ja/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ API リファレンスは [pkg.go.dev](https://pkg.go.dev/) がソースから
| [`lineedit`](https://github.com/go-widgets/lineedit) | v0.1.1 | 純粋なモデルとしての行エディタ。履歴、逆方向検索、Tab 補完。標準ライブラリのみ | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/lineedit) |
| [`vcs`](https://github.com/go-widgets/vcs) | v0.1.0 | 作業ツリーの各ファイルがどの状態にあるかと、ドライバのレジストリ。標準ライブラリのみ。git ドライバはネストされたモジュール `vcs/git`(`git/v0.1.0`) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/vcs) |
| [`data`](https://github.com/go-widgets/data) | v0.4.0 | [型付きレコード、クエリ、ローカルまたはリモートのストア]({{< relref "/state/data.md" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/data) |
| [`window`](https://github.com/go-widgets/window) | v0.90.0 | 8 つのバックエンドに対応した[ネイティブウィンドウ]({{< relref "/surfaces/native-window.md" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/window) |
| [`window`](https://github.com/go-widgets/window) | v0.91.0 | 8 つのバックエンドに対応した[ネイティブウィンドウ]({{< relref "/surfaces/native-window.md" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/window) |
| [`application`](https://github.com/go-widgets/application) | v0.8.1 | ウィンドウの上に載る[アプリケーションのライフサイクル]({{< relref "/surfaces/application.md" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/application) |
| [`tray`](https://github.com/go-widgets/tray) | v0.15.0 | [トレイアイコンとそのメニュー]({{< relref "/surfaces/application.md#the-tray" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/tray) |
| [`webcanvas`](https://github.com/go-widgets/webcanvas) | v0.9.0 | [ブラウザの `<canvas>` 内のシーン]({{< relref "/surfaces/browser.md" >}}) | [pkg.go.dev](https://pkg.go.dev/github.com/go-widgets/webcanvas) |
Expand Down
19 changes: 18 additions & 1 deletion content/ja/surfaces/native-window.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,24 @@ macOS では `Config{GPU: true}` でフレームを GPU で描画します。
0.59 ms に、1920 × 1200 で 5.96 ms から 0.99 ms になります(Apple M4 Max)。
- **フォールバック:** 半透明マテリアルを持つウィンドウは CPU パスのままです。
Metal が起動しないマシンでも同様で、どちらもエラーではありません。
ほかのバックエンドはこのオプションを無視します。
Linux については下を参照してください。ほかのバックエンドはこのオプションを無視します。

Linux(X11 と Wayland)では、`Config{GPU: true}` でフレームを Vulkan で描画します。
- **仕組み:** 同じ記録を go-gfx/gpu2d の Vulkan レンダラーが描画します。そのピクセルは
ウィンドウのフレームバッファにコピーされ、これまでどおり表示されます(X11 では
MIT-SHM または `PutImage`、Wayland では `wl_shm`)。フレームは CPU を一度通ります。
dma-buf によるディスプレイサーバーとの共有はまだありません。
- **正確さ:** ソフトウェア Vulkan(lavapipe)では、ピクセルは CPU パスとバイト単位で
同一です。両方のプロトコルで実機上で確認済みで、X サーバーから読み戻したウィンドウと、
ウィンドウがコミットした `wl_shm` バッファは、CPU パスのものと一致します。
ハードウェア GPU ではまだ測定していません。
- **フォールバック:** Vulkan が使えない場合、またはフレームが拒否された場合(デバイスに
対して大きすぎる、デバイスの喪失)、ウィンドウは CPU で描画して動作を続けます。
理由はバックエンドの `GPUError()` で分かり、以後のフレームはすべて CPU フレームです。
- **コスト(ソフトウェアのみ):** lavapipe は CPU ラスタライザーなので、GPU パスの CPU 時間は
CPU パスの約 10 倍です。1 フレームあたり、960 × 640 で 2.48 ms に対して 25.8 ms、
1920 × 1200 で 8.46 ms に対して 89.7 ms です(X11、Apple M4 Max 上の arm64 コンテナで
16 スレッドの lavapipe)。実際の GPU で得になるかはまだ測定していません。

## HiDPI {#hidpi}

Expand Down
Loading
Loading