Skip to content

Instantly share code, notes, and snippets.

View haasn's full-sized avatar

Niklas Haas haasn

View GitHub Profile
@haasn
haasn / memperftest.md
Created May 24, 2020 09:59
/mem/perftest.md

wave32 performance tests

RADV_PERFTEST=''

'bilinear':	9616 frames in 2.575911 seconds => 0.267878 ms/frame (3733.05 FPS), gpu time: 0.255625 ms
'bicubic':	9856 frames in 2.944947 seconds => 0.298797 ms/frame (3346.75 FPS), gpu time: 0.286974 ms
'deband':	3024 frames in 2.960075 seconds => 0.978861 ms/frame (1021.60 FPS), gpu time: 0.963953 ms
'deband_heavy':	1264 frames in 2.983192 seconds => 2.360120 ms/frame (423.71 FPS), gpu time: 2.343436 ms
'polar':	3584 frames in 2.723650 seconds => 0.759947 ms/frame (1315.88 FPS), gpu time: 0.758262 ms
@haasn
haasn / libplacebo benchmarks (RX 560).md
Last active May 14, 2020 22:23
libplacebo benchmarks (RX 560)

OpenGL

radeonsi (llvm)

= Running benchmarks =
'bilinear':	2576 frames in 3.659612 seconds => 1.420657 ms/frame (703.90 FPS)
'bicubic':	1904 frames in 3.001828 seconds => 1.576590 ms/frame (634.28 FPS)
'deband':	1104 frames in 3.994922 seconds => 3.618589 ms/frame (276.35 FPS)
'deband_heavy':	 720 frames in 7.270412 seconds => 10.097795 ms/frame (99.03 FPS)
@haasn
haasn / heroline.hs
Last active July 24, 2016 08:07
HeroLine DPS calculator -- NOTE: moved to https://github.com/haasn/heroline
import Control.Monad (replicateM, guard)
import Data.Ord (comparing)
import Data.List (maximumBy)
-- Type definitions
data Item = Item
{ name :: String
, wdmg :: Int
, udmg :: Int
@haasn
haasn / keybase.md
Created July 6, 2016 02:27
keybase.md

Keybase proof

I hereby claim:

  • I am haasn on github.
  • I am haasn (https://keybase.io/haasn) on keybase.
  • I have a public key ASAN_wtvtyoVO_75tpC2zkdYGpL76sjwNWPDf_1p8ecGIAo

To claim this, I am signing this object:

@haasn
haasn / image.lua
Last active March 11, 2024 06:57
mvi - set of configuration for turning mpv into an image viewer
-- Allow changing a property with by zoom-adjusted amount
function zoom_invariant_add(prop, amt)
amt = amt / 2 ^ mp.get_property_number("video-zoom")
mp.set_property_number(prop, mp.get_property_number(prop) + amt)
end
-- Resets the pan if the entire image would be visible
function zoom_check_center()
local zoom = mp.get_property_number("video-zoom")
local rot = mp.get_property_number("video-rotate") * math.pi / 180
@haasn
haasn / kspfix.c
Last active June 7, 2016 19:09
Work-around for Kerbal Space Program under 10-bit displays (or any Unity game, really)
// Compile as kspfix.so and load with LD_PRELOAD
#define _GNU_SOURCE
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <GL/glx.h>
@haasn
haasn / about:config.md
Last active April 2, 2024 18:46
Firefox bullshit removal via about:config

Firefox bullshit removal

Updated: Just use qutebrowser (and disable javascript). The web is done for.