Skip to content

Instantly share code, notes, and snippets.

View sauparna's full-sized avatar

Sauparna Palchowdhury sauparna

View GitHub Profile

Usage of virglrenderer

Introduction

virglrenderer is a library that gives emulators the necessary tools to implement a [virtio-gpu][] device, in particular one with 3D support. See capability sets below for a summary of the APIs virglrenderer can implement for the guest. It directly implements the logic behind some 3D commands like GET_CAPSET, CTX_CREATE, CTX_SUBMIT_3D, CREATE_RESOURCE_BLOB, and though it closely follows the semantics of virtio-gpu in most cases, it is in theory independent of virtio or any other transport.

Main user is [qemu][qemu-gpu-impl], but there also appears to be a [standalone virtio-gpu vhost-user][qemu-vhost-impl] implementation that uses virglrenderer in qemu/contrib.

virglrenderer's public header is at [src/virglrenderer.h][public-header]. This document attempts to outine the public API and contract, but you should look at the header for an authoritative source of truth since semantics described here could be slightly wrong or have changed, a

@SansPapyrus683
SansPapyrus683 / debugging.h
Last active June 3, 2025 09:30
A useful debugging template for C++.
#include <iostream>
#include <vector>
#include <deque>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
template <typename T>
std::ostream& operator<<(std::ostream& out, const std::vector<T>& vec) {
@leviathan
leviathan / xcode-utils.md
Last active June 9, 2025 12:44
xcrun cheat sheet

Environment Info

xcode-select --print-path
xcodebuild -version
swift --version
swift build --version
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version   // Check Xcode Command-Line-Tools Version