Skip to content

Instantly share code, notes, and snippets.

@spundun
spundun / README.md
Created June 27, 2022 15:34
Reproducing ERROR_SURFACE_LOST_KHR issue with Vulkan/Wayland/VirtIO

I build this code using the following command on Arch Linux virtual machine running in Crostini on top of Chrome OS

clang++ vulkaninfo.cpp -DVK_ENABLE_BETA_EXTENSIONS -DVK_NO_PROTOTYPES -DVK_USE_PLATFORM_WAYLAND_KHR -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -march=x86-64 -mtune=generic -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fno-strict-aliasing -fno-builtin-memcmp -Wimplicit-fallthrough -std=c++11 -fno-rtti -fvisibility=hidden -Wl,--sort-common,--as-needed,-z,relro,-z,now -ldl /usr/lib/libxcb.so /usr/lib/libSM.so /usr/lib/libICE.so /usr/lib/libX11.so /usr/lib/libXext.so /usr/lib/libwayland-client.so -O2

Some of those flags are probably unnecessary and could be removed for simplicity.

@spundun
spundun / vulkaninfo_output.txt
Created June 22, 2022 05:20
vulkaninfo output after bypassing the surface extension error
[spundun@penguin trunk]$ vulkaninfo
ERROR while creating surface for extension VK_KHR_wayland_surface : /home/spundun/svntogit-packages/trunk/src/Vulkan-Tools-1.3.217/vulkaninfo/vulkaninfo.h:231:vkGetPhysicalDeviceSurfaceFormats2KHR failed with ERROR_SURFACE_LOST_KHR
==========
VULKANINFO
==========
Vulkan Instance Version: 1.3.217
Instance Extensions: count = 14
@spundun
spundun / vulkaninfo_debug_output.txt
Created June 21, 2022 03:18
Output of `export VK_LOADER_DEBUG=all vulkaninfo`
INFO: Vulkan Loader Version 1.3.217
LAYER: Searching for layer manifest files
LAYER: In following folders:
LAYER: /home/spundun/.config/vulkan/implicit_layer.d
LAYER: /etc/xdg/vulkan/implicit_layer.d
LAYER: /etc/vulkan/implicit_layer.d
LAYER: /home/spundun/.local/share/vulkan/implicit_layer.d
LAYER: /home/spundun/.local/share/flatpak/exports/share/vulkan/implicit_layer.d
LAYER: /var/lib/flatpak/exports/share/vulkan/implicit_layer.d
LAYER: /usr/local/share/vulkan/implicit_layer.d
@spundun
spundun / gist:f01346a8d8789be861597690c7a849b8
Last active May 17, 2023 18:52 — forked from Usulyre/Vulkan virtio driver for Chrome OS crostini
How to install vulkan drivers on Debian on Crostini

Compiling/installing the experimental mesa virtio-venus-experimental driver-(below done with new linux container)

In chrome browser type or paste

chrome://flags

type in "search flags" box "crostini" without quotes.

@spundun
spundun / belnder_link_errors.txt
Created June 19, 2022 18:06
Build errors during the linking phase when building blender. With precompiled dependencies.
@spundun
spundun / arch_lib32_mesa_virtio.patch
Last active June 22, 2022 17:51
Patch to include new Venus/Virtio Vulkan Driver in mesa packages. This lets you use Vulkan 3D graphics capabilities from a virtual machine like Crostini on ChromeOS
commit 0907c0b16eb95bedc89f6131a0723cbb17ca862d
Author: Spundun Bhatt <[email protected]>
Date: Sat Jun 11 07:45:05 2022 -0700
Include virtio driver in lib32-mesa
diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD
index 944a3c4..1b9f886 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@spundun
spundun / main.cpp
Created March 31, 2015 05:41
Similarity based on Levenshtein Distance
//
// main.cpp
// StringSimilarity
//
// Created by Spundun Bhatt on 3/30/15.
// Copyright (c) 2015 Spundun Bhatt. All rights reserved.
//
#include <iostream>
#include <memory>
@spundun
spundun / Gemfile
Last active August 29, 2015 14:07
Treetop Nested Non-Unique Delimiters
gem 'rake'
gem 'pry'
gem 'treetop'
@spundun
spundun / Gemfile
Last active August 29, 2015 14:07
Ruby Treetop gem Parser Rules: Potential Bug
gem 'treetop'
gem 'pry'
@spundun
spundun / gist:ade33d22ef71bfb61d7d
Created August 26, 2014 19:53
2014081525420_add_blocked_to_users.rb
class AddBlockedToUsers < ActiveRecord::Migration
def change
add_column :users, :blocked, :bool
end
def self.up
execute "ALTER TABLE USERS DROP COLUMN BLOCKED"
end
end