~eliasnaur/gio

internal/cmd/convertshaders: add Windows comp shader compilation

Use dxc (DirectXShaderCompiler) for compiling, which is newer than fxc
and doesn't not fail compilation with dynamically uniform flows with
barriers.

Currently requires -directcompute to enable generating the shaders.

Signed-off-by: Egon Elbre <egonelbre@gmail.com>
cmd/gogio: [android] update target sdk version

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
gpu,gpu/backend: [compute] handle loss of buffer contents during download

Signed-off-by: Elias Naur <mail@eliasnaur.com>
io/router: fix negative areas

Signed-off-by: Egon Elbre <egonelbre@gmail.com>
gpu: [compute] remove even more unused commands

Signed-off-by: Elias Naur <mail@eliasnaur.com>
cmd/gogio: raise end-to-end test timeout

Windows tests often flake:

TestEndToEnd/Windows: e2e_test.go:113: last error: encountered 6 color mismatches:
          5,5   got 0xffffffffffff, want 0xdedeadadbebe
        395,5   got 0xffffffffffff, want 0xdedeadadbebe
          5,305 got 0xdedeadadbebe, want 0x000000000000
        395,305 got 0xdedeadadbebe, want 0x000000000000
        405,305 got 0xffffffffffff, want 0xbbbbbbbbbbbb
        795,305 got 0xffffffffffff, want 0xbbbbbbbbbbbb

Bump the timeout as a quick workaround.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
io/router: improve areaOp methods performance

name             old time/op  new time/op  delta
AreaOp_Decode-8  10.5ns ± 2%   6.2ns ± 3%  -41.50%  (p=0.000 n=10+10)
AreaOp_Hit-8     4.44ns ± 4%  3.57ns ± 2%  -19.59%  (p=0.000 n=10+10)

Signed-off-by: pierre <pierre.curto@gmail.com>
cmd/gogio: [android] allow custom signature-key

That change makes possible to provide custom PKCS#12 (JKS/PFX) using `-signkey` and the password with `-signpass`.

By default the gogio will use the `debug.keystore`, if no key is provided.

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
io/router: avoid event copy for filtered events in pointerQueue

Signed-off-by: pierre <pierre.curto@gmail.com>
internal/opconst: removed unused TypeLayer

Signed-off-by: pierre <pierre.curto@gmail.com>
gpu: [compute] remove more unused commands

Signed-off-by: Elias Naur <mail@eliasnaur.com>
gpu/shaders: [compute] remove unused command from kernel4

Signed-off-by: Elias Naur <mail@eliasnaur.com>
gpu: [compute] use correct usage flags for output image

Signed-off-by: Elias Naur <mail@eliasnaur.com>
cmd/gogio: fix icon/resources for Android

Previously that patch, gogio unzip the `link.apk` (generated by AAPT2) to an temporary folder and then compress it again to a new `app.ap_` file.

For some unknown reason, that unzip-then-zip doesn't work. The resources are included but is corrupted in somehow. That PR aims to fix that by avoid the extraction to an temporary folder.

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
app/internal/window: fix Wayland clipboard reading

The Wayland protocol implicitly dup(2)s the pipe write end descriptor passed to
wl_data_offer_receive. As long as we also have an open descriptor for the write
end, the pipe will not close and signal the completion of the clipboard read.

This change explicitly and immediately closes our write descriptor. Before this
change, reading the Wayland clipboard worked with some delay because the Go
garbage collector closed the write end of the transfer pipe after some time.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
gpu: [compute] fix path gaps by eliminating redundant path points

See https://github.com/linebender/piet-gpu/issues/62 for description
of the issue. The fix is the Gio copy of the piet-gpu fix.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
gpu: [compute] use array type for scene elements

All scene elements have a fixed size in uint32s. Model them accordingly.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
gpu: [compute] pre-transform images before rendering

We're about to change the last stage of the compute pipeline to only
accept images, not sampled textures. This change prepares materials
for pixel-aligned image copying by pre-rendering images to a texture,
applying transforms.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
gpu/shader: fix mem.h comments

Signed-off-by: Elias Naur <mail@eliasnaur.com>
cmd/gogio/testdata: always clear background to white

The webassembly port changed to use transparent black to allow content
below Gio to show through. However, the end-to-end tests expect a white
background.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
.builds: enable headless rendering tests on FreeBSD

Signed-off-by: Elias Naur <mail@eliasnaur.com>
Next