Commit graph

50 commits

Author SHA1 Message Date
6dce4b7c5f Vulkan compute: minor refactoring 2024-03-28 16:42:56 +09:00
abca3198e0 Vulkan compute: combine all minmax calls
This commit combines the minmax execution via Vulkan compute. The
previous implementation executed compute in vulkan_minmax with a new
command buffer each time. This implementation combines all required
executions of compute in vulkan_minmax in a single command buffer and
uses a pipeline to ensure the enqueued compute calls stay in order.
2024-03-28 16:33:55 +09:00
c55f6a1bd3 Do "minmax" on Vulkan compute
Was an attempt to speed up blue-noise-generation with Vulkan compute,
but this implementation seems to slow it down instead.
2024-03-27 16:04:16 +09:00
f3d1ad425c Vulkan compute: Minor refactoring 2024-03-27 11:27:43 +09:00
d137dc44ff inline get_filter in vulkan compute impl. 2024-03-26 13:49:37 +09:00
045d3ef18d Use "invalidate", not "flush" for buffer read 2024-03-26 13:37:51 +09:00
3a97f14199 Use "cached", not "coherent" for staging buffers 2024-03-26 12:21:40 +09:00
2d47b7f892 Attempt to optimize vulkan compute 2024-03-25 16:53:42 +09:00
47ba03337b Impl. Vulkan compute
Tests indicate Vulkan compute runs 2x slower than OpenCL, so there
probably is room for optimization.
2024-03-25 13:27:06 +09:00
d4661996d2 WIP Vulkan compute: descriptor set and command buf
Some more Vulkan initialization code to set up Vulkan compute.
2024-03-25 11:39:50 +09:00
ea66a44238 QueueFamilyIndices struct: fn definitions in .cpp
Instead of defining struct functions in header file, only declare them
in the header file and define them in the source file.
2024-03-22 17:03:56 +09:00
16f0e0e865 Define vulkan specific helper fns in header 2024-03-22 16:59:23 +09:00
03b3c90e9a Minor fix
Fix debug messenger initialization check.
2024-03-21 12:31:38 +09:00
6ed76af210 Restructure vulkan init code
Vulkan init code was resturctured so that "temporary" structs (e.g.
vulkan "info create" structs) are discarded after they are used.
2024-03-21 12:07:46 +09:00
020993fb19 Refactor: Move shader loading code to inner scope
This prevents the loaded shader data from persisting on the stack even
when it is no longer needed.
2024-03-20 19:25:22 +09:00
d29d2434ab utility::Cleanup: Replace "Nop"
A default constructor suffices where "Nop" was used, so it was removed.
2024-03-20 19:18:37 +09:00
3b0a5ab7dd WIP Vulkan compute: Fix buffer data
"filter_size" integer must be odd. This is how it is defined for the
OpenCL implementation.
2024-03-20 16:12:23 +09:00
5cee471f1f WIP Vulkan compute: create buffers 2024-03-20 16:00:47 +09:00
7cca2bfbff WIP vulkan compute: create command pool 2024-03-20 14:29:48 +09:00
a7dc666082 Refactor: code where neither Vulkan/OpenCL is used 2024-03-20 14:29:03 +09:00
bc02b924e2 WIP vulkan compute: create compute pipeline, fixes
Fix Cleanup class.

Implement setting up compute pipeline.
2024-03-20 11:54:38 +09:00
8c1190d923 Refactor glslc usage 2024-03-20 11:11:22 +09:00
6cefcc5f94 Compile glsl with glslc, fixes
Fix incorrectly set "bindings" for descriptors.

Fix blue_gen.glsl .

Program now attempts to compile blue_gen.glsl using "glslc".
2024-03-19 16:13:10 +09:00
b73c6fb94b WIP Vulkan compute: compute descriptors, glsl 2024-03-19 14:58:35 +09:00
a0de033d34 WIP Vulkan compute: initialize VkDevice 2024-03-08 13:48:42 +09:00
38f7248f49 Minor refactoring
Use `const std::array<...>` instead of `const std::vector<...>`.
2024-03-07 16:47:37 +09:00
d0f14585b6 WIP vulkan compute: query physical devices 2024-03-07 12:13:32 +09:00
aaa986b0eb Remove erronous Vulkan init. property
TODO: Vulkan compute
2024-03-06 17:56:30 +09:00
4e4ee7f558 Begin work on Vulkan compute (WIP)
Some Vulkan initialization stuff WIP.
2024-03-06 17:04:08 +09:00
ecd65fc42b clang-format --style=google 2023-03-31 18:47:33 +09:00
62d15771ad Make usage of OpenCL conditional (configuring) 2023-03-31 18:46:10 +09:00
2f768f43bd Add check for OpenCL kernel file 2023-03-31 15:00:27 +09:00
c9ec105664 Impl arg-parsing for generic use of blue-noise gen 2021-11-10 20:04:08 +09:00
2357fd9c05 Fix blue-noise when not using OpenCL 2021-11-10 19:21:33 +09:00
e715c18a4d Fix blue-noise generation 2021-11-10 18:48:16 +09:00
d44297d079 WIP Attempt to fix resulting blue-noise 2021-11-10 18:12:04 +09:00
e90834dc0a WIP work on generating blue-noise 2021-11-08 20:04:58 +09:00
73aa21e92a Some attempts at fixing grayscale blue-noise 2021-10-07 15:34:13 +09:00
a8f0ec788a Switch to CMake, try to fix grayscale blue-noise 2021-10-06 19:54:07 +09:00
e85412d61a Some fixes, progress with grayscale blue-noise 2021-10-06 18:22:31 +09:00
1eee20d6ae Some work on grayscale blue-noise 2021-10-06 17:59:27 +09:00
5826c3677c Fix image::Bl write, use image::Bl as result for blue_noise 2021-02-11 11:33:14 +09:00
6ca0db1e57 Split utility functions to utility.hpp 2021-01-26 19:53:11 +09:00
e24606ea2c Impl use of OpenCL for generating blue noise 2021-01-23 16:42:45 +09:00
26df83affc Use precomputed gaussian for filter function 2021-01-23 13:50:43 +09:00
850a5d22a9 Fixes and Refactorings 2021-01-23 11:58:16 +09:00
ad32671e19 Use int instead of std::size_t, float instead of double 2021-01-23 10:14:59 +09:00
949aaecaa6 Some refactoring 2021-01-22 22:53:31 +09:00
fe48341665 Impl blue noise generation (maybe still WIP) 2021-01-16 22:46:47 +09:00
3643dbea1a WIP blue_noise impl 2021-01-16 18:54:56 +09:00