📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

gioui.org/cpu

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gioui.org/cpu

v0.0.0-20220412190645-f1e9e8c3b1f7
Go
Version published
Created
Source

Compile and run compute programs on CPU

This projects contains the compiler for turning Vulkan SPIR-V compute shaders into binaries for arm64, arm or amd64, using SwiftShader with a few modifications. A runtime implemented in C and Go is available for running the resulting binaries.

The primary use is to support a CPU-based rendering fallback for Gio. In particular, the gioui.org/shader/piet package contains arm, arm64, amd64 binaries for piet-gpu.

Compiling and running shaders

The init.sh script clones the modifed SwiftShader projects and builds it for 64-bit and 32-bit. SwiftShader is not designed to cross-compile which is why a 32-bit build is needed to compile shaders for arm.

The example/run.sh script demonstrates compiling and running a simple compute program.

Issues and contributions

See the Gio contribution guide.

FAQs

Package last updated on 12 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts