vkdt devel diary

Haaaa, that sounds martianese to me LOL

Here’s my bin/config.mk

# build time configuration.
# select your favourite bloat here.

# if you have freetype2 and png16, you can uncomment this:
# VKDT_USE_FREETYPE=1
# export VKDT_USE_FREETYPE

# if you disable this, the i-raw module will not be built
# and you will be unable to load raw images.
# since rawspeed is a submodule this is only useful if
# you want to avoid the recursive dependencies.
VKDT_USE_RAWSPEED=1
export VKDT_USE_RAWSPEED

# exiv2 can optionally be used to load some super basic metadata (iso speed,
# shutter time etc) inside the i-raw module. that is, you don't have that you
# don't need to disable this.
VKDT_USE_EXIV2=1
export VKDT_USE_EXIV2

CC=clang-11
CXX=clang++
GLSLC=glslangValidator
export CC CXX GLSLC

Not sure what I should do …

Edit : I’ll try to check what GLSL compiler I should install …
Edit2 : installed on my pc are: gcc 10.2, glslang-dev, glslang-tools, glslangValidator, libvulkan-dev, mesa-vulkan-drivers, libopengl-dev, libopengl0, libglfw3-dev, GNU make 4.3, pkgconfig

… if you make in the bin/ directory. do you get output lines such as

glslangValidator -Ipipe/modules -I./ --target-env vulkan1.1 -V pipe/modules/draw/main.frag -o pipe/modules/draw/main.frag.spv

and if you find ../src/pipe/modules/ -name "*spv", does it show the compiled spv files?

I do get those lines. There are a lot of them but they all look like

glslangValidator -Ipipe/modules -I./ --target-env vulkan1.1 -V pipe/modules/accum/main.comp -o pipe/modules/accum/main.comp.spv
pipe/modules/accum/main.comp
glslangValidator -Ipipe/modules -I./ --target-env vulkan1.1 -V pipe/modules/blend/main.comp -o pipe/modules/blend/main.comp.spv
pipe/modules/blend/main.comp
glslangValidator -Ipipe/modules -I./ --target-env vulkan1.1 -V pipe/modules/burst/dist.comp -o pipe/modules/burst/dist.comp.spv
pipe/modules/burst/dist.comp
glslangValidator -Ipipe/modules -I./ --target-env vulkan1.1 -V pipe/modules/burst/down2.comp -o pipe/modules/burst/down2.comp.spv
pipe/modules/burst/down2.comp
glslangValidator -Ipipe/modules -I./ --target-env vulkan1.1 -V pipe/modules/burst/down4.comp -o pipe/modules/burst/down4.comp.spv
pipe/modules/burst/down4.comp
glslangValidator -Ipipe/modules -I./ --target-env vulkan1.1 -V pipe/modules/burst/half.comp -o pipe/modules/burst/half.comp.spv
pipe/modules/burst/half.comp
glslangValidator -Ipipe/modules -I./ --target-env vulkan1.1 -V pipe/modules/burst/merge.comp -o pipe/modules/burst/merge.comp.spv
pipe/modules/burst/merge.comp
glslangValidator -Ipipe/modules -I./ --target-env vulkan1.1 -V pipe/modules/burst/visn.comp -o pipe/modules/burst/visn.comp.spv
pipe/modules/burst/visn.comp
glslangValidator -Ipipe/modules -I./ --target-env vulkan1.1 -V pipe/modules/burst/warp.comp -o pipe/modules/burst/warp.comp.spv
pipe/modules/burst/warp.comp
glslangValidator -Ipipe/modules -I./ --target-env vulkan1.1 -V pipe/modules/ciediag/collect.comp -o pipe/modules/ciediag/collect.comp.spv
pipe/modules/ciediag/collect.comp
glslangValidator -Ipipe/modules -I./ --target-env vulkan1.1 -V pipe/modules/ciediag/map.comp -o pipe/modules/ciediag/map.comp.spv
pipe/modules/ciediag/map.comp
glslangValidator -Ipipe/modules -I./ --target-env vulkan1.1 -V pipe/modules/colour/main.comp -o pipe/modules/colour/main.comp.spv
pipe/modules/colour/main.comp

Edit : I do realize they do not show the .frag you ask for, but instead a .comp !
I see no error/warning in the whole list.

when runnin find ../src/pipe/modules/ -name "*spv", I get

find ../src/pipe/modules/ -name "*spv"
../src/pipe/modules/y2srgb/main.comp.spv
../src/pipe/modules/accum/main.comp.spv
../src/pipe/modules/shared/guided2f.comp.spv
../src/pipe/modules/shared/resample.comp.spv
../src/pipe/modules/shared/blurs.comp.spv
../src/pipe/modules/shared/blurv.comp.spv
../src/pipe/modules/shared/guided2.comp.spv
../src/pipe/modules/shared/blurh.comp.spv
../src/pipe/modules/shared/guided3.comp.spv
../src/pipe/modules/shared/guided1.comp.spv
../src/pipe/modules/shared/blur.comp.spv
../src/pipe/modules/shared/guided1f.comp.spv
../src/pipe/modules/ciediag/map.comp.spv
../src/pipe/modules/ciediag/collect.comp.spv
../src/pipe/modules/demosaic/gauss.comp.spv
../src/pipe/modules/demosaic/fix.comp.spv
../src/pipe/modules/demosaic/halfsize.comp.spv
../src/pipe/modules/demosaic/xtrans.comp.spv
../src/pipe/modules/demosaic/down.comp.spv
../src/pipe/modules/demosaic/xtransc.comp.spv
../src/pipe/modules/demosaic/splat.comp.spv
../src/pipe/modules/filmcurv/main.comp.spv
../src/pipe/modules/rawhist/map.comp.spv
../src/pipe/modules/rawhist/collect.comp.spv
../src/pipe/modules/grad/main.comp.spv
../src/pipe/modules/zones/quant.comp.spv
../src/pipe/modules/zones/apply.comp.spv
../src/pipe/modules/colour/main.comp.spv
../src/pipe/modules/draw/main.vert.spv
../src/pipe/modules/draw/main.geom.spv
../src/pipe/modules/draw/main.frag.spv
../src/pipe/modules/test10b/main.comp.spv
../src/pipe/modules/blend/main.comp.spv
../src/pipe/modules/burst/warp.comp.spv
../src/pipe/modules/burst/half.comp.spv
../src/pipe/modules/burst/dist.comp.spv
../src/pipe/modules/burst/down4.comp.spv
../src/pipe/modules/burst/visn.comp.spv
../src/pipe/modules/burst/down2.comp.spv
../src/pipe/modules/burst/merge.comp.spv
../src/pipe/modules/hist/map.comp.spv
../src/pipe/modules/hist/collect.comp.spv
../src/pipe/modules/deconv/mul.comp.spv
../src/pipe/modules/deconv/deconv.comp.spv
../src/pipe/modules/deconv/div.comp.spv
../src/pipe/modules/sss/main.comp.spv
../src/pipe/modules/srgb2f/main.comp.spv
../src/pipe/modules/denoise/doub.comp.spv
../src/pipe/modules/denoise/half.comp.spv
../src/pipe/modules/denoise/noop.comp.spv
../src/pipe/modules/denoise/down.comp.spv
../src/pipe/modules/denoise/assemble.comp.spv
../src/pipe/modules/saturate/main.comp.spv
../src/pipe/modules/hilite/doub.comp.spv
../src/pipe/modules/hilite/half.comp.spv
../src/pipe/modules/hilite/reduce.comp.spv
../src/pipe/modules/hilite/assemble.comp.spv
../src/pipe/modules/contrast/combine.comp.spv
../src/pipe/modules/llap/curve.comp.spv
../src/pipe/modules/llap/reduce.comp.spv
../src/pipe/modules/llap/assemble.comp.spv
../src/pipe/modules/llap/colour.comp.spv
../src/pipe/modules/pick/collect.comp.spv
../src/pipe/modules/crop/main.comp.spv
../src/pipe/modules/f2srgb/main.comp.spv
../src/pipe/modules/exposure/main.comp.spv

so you have the file and still you get this error? does your file system support symlinks? does the above file exist?

I don’t know what I did, but I now see vkdt ! :slight_smile:

Thanks for your assistance !

PS : is it a limitation or a choice that JPG file cannot be loaded ? just curious.

:man_shrugging: glad to hear it’s working.

…i just don’t care about it. you will find quite a fair amount of missing features when playing with this. and jpg support is not even on my private priority list (exr a bit more, if it wasn’t for the bloaty support library. i mean even this tinyexr/tinyexr.h at release · syoyo/tinyexr · GitHub has ~15k loc). this is mostly a matter of implementing an i-jpg module, but also there’s some default handling of input filenames which will need to distinguish between raw and jpg and whatnot when creating thumbnails or putting default processing graphs in place.

@Carmelo_DrRaw I have just installed the git master Version of Photoflow - Photoflow already uses a “pure-gpu-pipeline”, doesn’t it? Have you integrated vkdt code?
I have noticed artifacts (bugs?) here and there - when will a stable version be released?

@betazoid Where did you get that from? I don’t think so. Maybe I am wrong: to my understanding, PF is based on VIPS, which is not pure GPU. Are you looking here for the latest version? Release Continuous build · aferrero2707/PhotoFlow · GitHub

its the developer version from August 28 (git master)

If I remember correctly, @hanatos and @Carmelo_DrRaw had a long conversation here about integrating the engine of vkdt into Photoflow or something similar. I complied vkdt some time ago. Photoflow git master “feels” very similar to vkdt. I also ran Photoflow with and without my Nvidia card and there is a significant difference. To me, Photoflow feels very pure GPU. But I don’t know, maybe I am wrong.

btw, I got the git master version from the Arch User Repo

This is anecdotal but if PF were to turn to pure GPU its performance on my laptop would turn to :poop: because unlike yours all the integrated one is :poop:.

Apparently the performance of pure gpu pipelines is significantly better even with :poop: gpu’s.
But I don’t quite understand what VIPS is.

VIPS is a image processing library

yes, had good discussions about library design and algorithms. this is probably why results feel similar to you? we might have similar ideas about how to use which algorithm now.

however, we did not work on code together yet. partly because i’m terrible at productising vkdt’s core: i’m still introducing breaking changes, deleting and adding parameters, figuring out how to best draw/blend/mask/align/etc. i think i’m converging on many of these things, but there is no “library” version of vkdt’s processing graph. also when using vkdt’s processing in a qt application you’ll introduce quite a bit of bloat and lag. the gui layer i’m using just directly draws the texture from the descriptor set the graph outputs. not willing to compromise speed at this point :slight_smile:

1 Like

It’s possible to overlay a QML UI on something produced directly by the GPUs. Apparently this is done for UI on games.

hm. i think games will use imgui if they get a choice (e.g. Ubisoft Sponsors User Interface Library for C++ “Dear ImGui” - Ubisoft Montréal). also:

$ ls -lh ./vkdt
-rwxr-xr-x 1 jo jo 3.4M Nov 20 16:06 ./vkdt

and

 $ du -b /usr/lib/x86_64-linux-gnu/libQt5* | awk '{ sum += $1 } END { print sum }'
40042482

i.e. 40MB just qt vs 3.4MB all of vkdt (well, no spir-v modules). i would feel overwhelmed. paying enough for a gui/database already:

$ ls -lha ./vkdt-cli 
-rwxr-xr-x 1 jo jo 575K Nov 20 16:06 ./vkdt-cli

note that this is not to be compared to darktable-cli, where all the weight is in an external library:

-rw-r--r-- 1 root staff 38M Nov 19 12:28 /usr/local/lib/darktable/libdarktable.so

vkdt is indeed small, but Filmulator all-in (appimage or windows installer) is less than 40 megabytes.

okay 40 million bytes are no 40 megabytes after all. also you make a point that at least the copy to screen should be possible without wasting too many cycles, even using a bloaty monster.

not sure i want to continue the file size discussion, but it seems it is indeed true what you say:

$ ls -lha Filmulator_v0.9rc13.AppImage 
-rwxr-xr-x 1 jo jo 39M Sep 17 12:22 Filmulator_v0.9rc13.AppImage

and yeah qt comes with many different sub-libraries, probably you don’t need all of them (and probably i haven’t installed all of them either).

In any case I should try to find some time to fully implement Filmulation in vkdt…

1 Like

aaand here goes another round of small updates:

algorithmic

  • smoother highlight reconstruction (not entirely happy, may want to get back to this)
  • raw colour matrix fuzzy maker/model matching
  • smoother guided filter results (discovered there’s a lot of literature on fast blurs)

usability/ui

  • sort by create date (via dirty hack instead of exiv2)
  • list recently used tags, click to switch collection
  • jump back to original collection button
  • “open directory” button so vkdt can start without cmdline args
  • crop with fixed aspect ratio

other

  • binary packaging: generic build flag option, vkdt runs independent of pwd
  • bugfixes (infinite busy loops, /0, etc)
  • bash script to create static webpage from markdown docs (https://jo.dreggn.org/vkdt/). planning to put all the large screenshots/support files for the web site into this separate repo, so the main repo will remain small
2 Likes