Skip to content

Instantly share code, notes, and snippets.

Niklas Haas haasn

Block or report user

Report or block haasn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@haasn
haasn / memperftest.md
Created May 24, 2020
/mem/perftest.md
View memperftest.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
libplacebo benchmarks (RX 560)
View libplacebo benchmarks (RX 560).md

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 Jul 24, 2016
HeroLine DPS calculator -- NOTE: moved to https://github.com/haasn/heroline
View heroline.hs
import Control.Monad (replicateM, guard)
import Data.Ord (comparing)
import Data.List (maximumBy)
-- Type definitions
data Item = Item
{ name :: String
, wdmg :: Int
, udmg :: Int
View 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 Apr 3, 2020
mvi - set of configuration for turning mpv into an image viewer
View image.lua
-- 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 Jun 7, 2016
Work-around for Kerbal Space Program under 10-bit displays (or any Unity game, really)
View kspfix.c
// 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 Mar 13, 2020
Firefox bullshit removal via about:config
View about:config.md

Firefox bullshit removal

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

You can’t perform that action at this time.