Skip to content

Instantly share code, notes, and snippets.

@hikiko
hikiko / foobar.c
Created July 22, 2020 11:22
note to myself
struct {
float z;
uint32_t zs;
} *pixels;
int i;
pixels = calloc(w * h, 8);
glGetTextureImage(vkgl_depth_tex, 0,
GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV,
w * h * 8,
pixels);
#!/bin/bash
PS1="[isolated] $PS1"
export VK_ICD_FILENAMES=$HOME/igalia/install/share/vulkan/icd.d/intel_icd.x86_64.json
#export VK_ICD_FILENAMES=$HOME/igalia/install/share/vulkan/icd.d/radeon_icd.x86_64.json
export PATH=$PATH:$HOME/igalia/install/bin
export LD_LIBRARY_PATH=$HOME/igalia/install/lib
export LD_RUN_PATH=$HOME/igalia/install/lib
export XDG_DATA_DIRS=$XDG_DATA_DIRS:$HOME/igalia/install/share
@hikiko
hikiko / run_mustpass_selection.pl
Last active November 18, 2020 14:09
Reads CTS from files and runs them with run_cts.pl (previous gist).
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
use Getopt::Long;
use File::Copy 'move';
my $file_sel_tests = "";
@hikiko
hikiko / run_cts.pl
Last active November 18, 2020 14:11
Run and display a cts test, save the result image in a directory png/<testname.png> for later, ./run_cts -h
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
use Getopt::Long;
use Cwd qw(cwd);
my $test = "";
@hikiko
hikiko / iso_angle.sh
Created February 18, 2021 18:54
set env for angle just notes to myself (I set those paths better in shctx Makefiles check each branch)
#!/bin/sh
PS1='\[\033[0;32m\]\[\033[0m\033[0;32m\]\u\[\033[0;36m\] @ \[\033[0;36m\]\h \w\[\033[0;32m\]$(__git_ps1)\n\[\033[0;32m\]└─\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\] ▶\[\033[0m\] '
PS1="[angle] $PS1"
export PATH=$PATH:$HOME/igalia/install/bin:~/igalia/code/depot_tools
export LD_LIBRARY_PATH=/home/eleni/igalia/code/angle/out/Debug:/home/eleni/igalia/install/lib
export LD_RUN_PATH=/home/eleni/igalia/code/angle/out/Debug:/home/eleni/igalia/install/lib
export LIBGL_DRIVERS_PATH=$HOME/igalia/install/lib/x86_64-linux-gnu/dri/
export MESA_DEBUG=1
@hikiko
hikiko / args.gn
Last active March 7, 2021 18:30
gn args I use in angle, on GDB: set directories $HOME/igalia/code/angle/out/Debug
clang_emit_debug_info_for_profiling = true
enable_iterator_debugging = true
is_debug = true
symbol_level = 2
use_dwarf5 = false
strip_debug_info = false
use_debug_fission = false
@hikiko
hikiko / dump_float_rgba_tex.c
Last active March 7, 2021 18:34
copy paste it to dump float rgba textures (*data = the pointer I'd give in TexImage2D)
static bool
dump_float_image_rgba(const char *fname,
int w, int h,
float *data)
{
FILE *fp;
int i;
float *p;
if (!(fp = fopen(fname, "wb"))) {
@hikiko
hikiko / angle.gn
Last active May 18, 2021 10:57
gn args I've used to build ANGLE
use_debug_fission = false
strip_debug_info = false
enable_iterator_debugging = false
is_debug = true
use_dwarf5 = false
enable_dsyms = true
symbol_level = 2
dcheck_always_on = true
supports_llvm = false
@hikiko
hikiko / appleseed_env.sh
Last active August 7, 2021 18:58
the commands I use to setup the appleseed environment on Debian (made it it script mostly for the highlight), it's *different* from the instructions in the documentation
#!/usr/bin/bash
export APPLESEED_DEPENDENCIES=/home/eleni/code/forks/appleseed/prebuilt-linux-deps
export CMAKE_INCLUDE_PATH=$APPLESEED_DEPENDENCIES/include
export CMAKE_LIBRARY_PATH=$APPLESEED_DEPENDENCIES/lib
export LD_LIBRARY_PATH=$APPLESEED_DEPENDENCIES/lib:$LD_LIBRARY_PATH
export LD_RUN_PATH=$APPLESEED_DEPENDENCIES/lib:$LD_RUN_PATH
export QT5_DIR=/usr/lib/x86_64-linux-gnu/qt5
mkdir -p $HOME/code/forks/appleseed/build
cd $HOME/code/forks/appleseed/build
@hikiko
hikiko / .config
Created January 6, 2022 18:37
drm-tip kernel config - for experiments
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.15.0-rc5 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Debian 11.2.0-10) 11.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=110200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23700