Skip to content

Instantly share code, notes, and snippets.

View raggi's full-sized avatar

James Tucker raggi

View GitHub Profile
@peppergrayxyz
peppergrayxyz / qemu-vulkan-virtio.md
Last active April 21, 2025 18:59
QEMU with VirtIO GPU Vulkan Support

QEMU with VirtIO GPU Vulkan Support

With its latest reales qemu added the Venus patches so that virtio-gpu now support venus encapsulation for vulkan. This is one more piece to the puzzle towards full Vulkan support.

An outdated blog post on clollabora described in 2021 how to enable 3D acceleration of Vulkan applications in QEMU through the Venus experimental Vulkan driver for VirtIO-GPU with a local development environment. Following up on the outdated write up, this is how its done today.

Definitions

Let's start with the brief description of the projects mentioned in the post & extend them:

@h3r2tic
h3r2tic / raymarch.hlsl
Last active April 14, 2025 09:52
Depth buffer raymarching for contact shadows, SSGI, SSR, etc.
// Copyright (c) 2023 Tomasz Stachowiak
//
// This contribution is dual licensed under EITHER OF
//
// Apache License, Version 2.0, (http://www.apache.org/licenses/LICENSE-2.0)
// MIT license (http://opensource.org/licenses/MIT)
//
// at your option.
#include "/inc/frame_constants.hlsl"
func checksumNoFoldTwoAccum(b []byte, initial uint64) uint64 {
ac := initial
var bc, bcarr uint64
var carry uint64
for len(b) >= 128 {
// add in chunks of eight up to 128
ac, carry = bits.Add64(ac, binary.BigEndian.Uint64(b[:8]), carry)
bc, bcarr = bits.Add64(bc, binary.BigEndian.Uint64(b[8:16]), bcarr)
ac, carry = bits.Add64(ac, binary.BigEndian.Uint64(b[16:24]), carry)
bc, bcarr = bits.Add64(bc, binary.BigEndian.Uint64(b[24:32]), bcarr)
func checksumNoFoldBy8s(b []byte, initial uint64) uint64 {
ac := initial
var carry uint64
for len(b) >= 128 {
// add in chunks of eight up to 128
ac, carry = bits.Add64(ac, binary.BigEndian.Uint64(b[:8]), carry)
ac, carry = bits.Add64(ac, binary.BigEndian.Uint64(b[8:16]), carry)
ac, carry = bits.Add64(ac, binary.BigEndian.Uint64(b[16:24]), carry)
ac, carry = bits.Add64(ac, binary.BigEndian.Uint64(b[24:32]), carry)

Recently, we've been working on extracting Ember conventions from applications we're working on into the framework. Our goal is to make it clearer how the parts of an Ember application work together, and how to organize and bootstrap your objects.

Routing

Routing is an important part of web applications. It allows your users to share the URL they see in their browser, and have the same things appear when their friends click on the link.

The Ember.js ecosystem has several great solutions for routing. But, since it is such an important part of most web applications, we've decided to build it right into the framework.

If you have already modeled your application state using Ember.StateManager, there are a few changes you'll need to make to enable routing. Once you've made those changes, you'll notice the browser's address bar spring to life as you start using your app—just by moving between states, Ember.js will update the URL automatically.