flake.*: add Nix flakes for setting up a development shell
Signed-off-by: Elias Naur <mail@eliasnaur.com>
gio: make blit and cover shaders available for FBO rendering
Signed-off-by: Elias Naur <mail@eliasnaur.com>
gui: add opacity support to the blit shader
This is required to enable opacity layers in Gio.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
piet: properly quote shell environment variables
Signed-off-by: Elias Naur <mail@eliasnaur.com>
gio: make material.vert portable across GPU API
material.vert wasn't portable to the flipped coordinate systems of
Direct3D and Metal.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
piet: avoid shared bools to workaround a Metal compiler crash
Binning and tile_alloc fails to compile on (at least) iPhone SE and iPhone 6
devices. According to Apple engineering:
"
> Termination Description: METAL, Error message SHA256:
72c506019ccc01b7a5e462772dda490916b1e02d5776ce5d9855f303caad35ea Decoded
hash: "Store of byte to local memory is unsupported"
The crash suggests an attempt to do a store to memory that was
impossible on that device. We have no way of testing this but it may be
that replacing all the bool's in local memory with uint's fixes the
problem.
"
This change replaces shared bools with uints, which fixes the compiler
crash on both devices.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
cmd/convertshaders,piet: delete glsl 3.10 es variants
We've given up on supporting OpenGL ES 3.1 compute, so we don't need the
3.10 es variants anymore.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
gio: convert shaders to assume Vulkan coordinate system
Signed-off-by: Elias Naur <mail@eliasnaur.com>
cmd/convertshaders,piet: add StorageBuffers, Images reflection
Signed-off-by: Elias Naur <mail@eliasnaur.com>
all: add SPIR-V shaders variants
Switch to push constants from uniform buffers; push constants are easier
to manage in a Vulkan backend, and may be faster than uniform buffers.
Vulkan also require that vertex shader outputs match corresponding
fragment inputs. This change fullfills that requirement by promoting
fragment inputs to highp.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
all: remove glsl 1.30 and glsl 3.00 es variants
Remove simple.vert too; it uses gl_VertexID which is not available in
glsl 1.00.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
piet,cmd: add Direct3D 11 variants of compute programs
cmd/convertshaders: add support for compiling Metal shaders on Linux
Windows support is also added, but not tested.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
gio: fix OpenGL ES 2.0 compatibility
glGetUniformLocatino only works on named uniform blocks.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
shader: remove InputDesc
It belongs in Gio core because nothing in this repository refers to it.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
piet: execute memoryBarrierBuffers on all threads
memoryBarrierBuffer is mapped to the threadgroup_barrier function in
Metal, which is a control barrier that must be executed by all threads
(or none). This change establishes that property for the two memory
barriers used in the piet-gpu programs.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
gio: make material.vert portable to Metal, D3D11 coordinate systems
Signed-off-by: Elias Naur <mail@eliasnaur.com>