Commit Graph

13 Commits

Author SHA1 Message Date
Elias Naur 13b93b27d8 gpu: update gioui.org/shader for portable materials.vert shader
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2021-08-21 08:31:46 +02:00
Elias Naur 3773daf155 go.*: update gioui.org/cpu dependency
Avoids panics when freeing cpu resources on unsupported platforms.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2021-08-17 10:02:56 +02:00
Elias Naur 8140e39c20 go.*,gpu: use gioui.org/cpu.Supported to determine CPU fallback support
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2021-08-17 09:44:17 +02:00
Elias Naur c7ea90c4e2 gpu,go.*: update gioui.org/shader dependency
Fixes the opengl example on macOS.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2021-08-16 18:22:32 +02:00
Elias Naur 6aee543234 all: switch to external shaders in the gioui.org/shaders module
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2021-08-08 13:47:41 +01:00
Elias Naur ea38195e2e gpu: [compute] add CPU fallback
This change adds a CPU fallback for devices that don't support the old
renderer nor have GPU support for compute programs.

Most of the hard work is implemented in the gioui.org/cpu module. It
uses the SwiftShader project with light modification to output
statically compiled CPU .o files for each compute program.

The CPU fallback only covers Linux and Android on arm, arm64, amd64
architectures. There is no fundamental reason support can't be extended
to other platforms:

- macOS and iOS are probably easy, but it's likely that virtually every
  device has GPU support for compute shaders.
- Windows needs a Cgo-less port, or a build constraint to require a C
  compiler (Gio core doesn't).
- FreeBSD and OpenBSD are probably also easy to do because they're so
  similar to Linux.
- The 386 binaries didn't work properly in my tests, so fixes to
  SwiftShader is probably needed. However, I expect virtually every
  Intel device can run amd64 binaries.

Updates gio#49
Fixes gio#228

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2021-07-27 14:56:50 +02:00
Elias Naur b7a983d7ff go.*: update dependencies, bump go.mod Go version to 1.16
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2021-07-27 14:33:52 +02:00
Elias Naur b1dfc94a9b app/internal/window: use golang.org/x/window UTF-16 routines
Less code, no functional change.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2021-03-04 14:08:39 +01:00
Elias Naur 7adc2a884b all: go mod tidy
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-12-19 11:41:24 +01:00
Elias Naur 7f836fa627 go.*: update golang.org/x/image
For the font fix: https://go-review.googlesource.com/c/image/+/237900

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-06-18 14:38:15 +02:00
Aaron Bieber ff6c798a28 app: Extend CI to build on OpenBSD now that golang.org/x/sys is updated.
I was able to get the Pipe2 syscall added for OpenBSD:
https://go.googlesource.com/sys/+/9fbb57f87de9ccfe3a99d4e3270ce8a926ebba4f

This also updates the dependencies to include the latest sys and gio.

I submitted a patch to the builder environment to include the xshare sets on
OpenBSD. Once that is in it will mean the "install_deps" block can be removed.

  https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/9640

Here is a link to a successful build: https://builds.sr.ht/~qbit/job/143004

Signed-off-by: Aaron Bieber <aaron@bolddaemon.com>
2020-01-28 17:21:01 +01:00
Elias Naur abb99eca5c theme/material: add the material theme
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-12 14:36:25 +02:00
Elias Naur 22cd88df9f all: rename the gioui.org/ui module to gioui.org
The "ui" is redundant and stutters.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 12:37:06 +02:00