diff --git a/.gitmodules b/.gitmodules
index ed1cdadac5..8edc1cead9 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -114,3 +114,6 @@
[submodule "3rdparty/libdeflate"]
path = 3rdparty/libdeflate
url = git@github.com:Devsh-Graphics-Programming/libdeflate.git
+[submodule "docker/compiler-explorer"]
+ path = docker/compiler-explorer
+ url = git@github.com:Devsh-Graphics-Programming/Compiler-Explorer-Docker.git
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
old mode 100755
new mode 100644
diff --git a/3rdparty/lzma/CS/7zip/Compress/LzmaAlone/obj/Debug/.NETFramework,Version=v4.0.AssemblyAttributes.cs b/3rdparty/lzma/CS/7zip/Compress/LzmaAlone/obj/Debug/.NETFramework,Version=v4.0.AssemblyAttributes.cs
new file mode 100644
index 0000000000..5d01041163
--- /dev/null
+++ b/3rdparty/lzma/CS/7zip/Compress/LzmaAlone/obj/Debug/.NETFramework,Version=v4.0.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]
diff --git a/3rdparty/lzma/CS/7zip/Compress/LzmaAlone/obj/Debug/LzmaAlone.csproj.AssemblyReference.cache b/3rdparty/lzma/CS/7zip/Compress/LzmaAlone/obj/Debug/LzmaAlone.csproj.AssemblyReference.cache
new file mode 100644
index 0000000000..b1d930460f
Binary files /dev/null and b/3rdparty/lzma/CS/7zip/Compress/LzmaAlone/obj/Debug/LzmaAlone.csproj.AssemblyReference.cache differ
diff --git a/3rdparty/lzma/CS/7zip/Compress/LzmaAlone/obj/Release/.NETFramework,Version=v4.0.AssemblyAttributes.cs b/3rdparty/lzma/CS/7zip/Compress/LzmaAlone/obj/Release/.NETFramework,Version=v4.0.AssemblyAttributes.cs
new file mode 100644
index 0000000000..5d01041163
--- /dev/null
+++ b/3rdparty/lzma/CS/7zip/Compress/LzmaAlone/obj/Release/.NETFramework,Version=v4.0.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]
diff --git a/3rdparty/lzma/CS/7zip/Compress/LzmaAlone/obj/Release/LzmaAlone.csproj.AssemblyReference.cache b/3rdparty/lzma/CS/7zip/Compress/LzmaAlone/obj/Release/LzmaAlone.csproj.AssemblyReference.cache
new file mode 100644
index 0000000000..b1d930460f
Binary files /dev/null and b/3rdparty/lzma/CS/7zip/Compress/LzmaAlone/obj/Release/LzmaAlone.csproj.AssemblyReference.cache differ
diff --git a/3rdparty/ngfx/ngfx.cmake b/3rdparty/ngfx/ngfx.cmake
new file mode 100644
index 0000000000..f038adc41d
--- /dev/null
+++ b/3rdparty/ngfx/ngfx.cmake
@@ -0,0 +1,68 @@
+option(NBL_BUILD_WITH_NGFX "Enable NGFX build" OFF)
+
+# NOTE: on windows default installation path is:
+# "C:/Program Files/NVIDIA Corporation/Nsight Graphics /SDKs/NsightGraphicsSDK" <- define as "NGFX_SDK" environment variable
+# then you can pick SDK version with "NGFX_SDK_VERSION" cache variable (CMake GUI list supported)
+
+if(NBL_BUILD_WITH_NGFX)
+ if(NOT DEFINED NGFX_SDK)
+ if(NOT DEFINED ENV{NGFX_SDK})
+ message(FATAL_ERROR "\"NGFX_SDK\" environment variable must be defined to build with NBL_BUILD_WITH_NGFX enabled!")
+ endif()
+ set(NGFX_SDK "$ENV{NGFX_SDK}")
+ endif()
+ cmake_path(NORMAL_PATH NGFX_SDK OUTPUT_VARIABLE NGFX_SDK)
+
+ if(NOT EXISTS "${NGFX_SDK}")
+ message(FATAL_ERROR "Found \"NGFX_SDK\" environment variable but it is invalid, env:NGFX_SDK=\"${NGFX_SDK}\" doesn't exist!")
+ endif()
+
+ file(GLOB ENTRIES "${NGFX_SDK}/*")
+
+ set(NGFX_VERSIONS "")
+ foreach(ENTRY ${ENTRIES})
+ if(IS_DIRECTORY ${ENTRY})
+ list(APPEND NGFX_VERSIONS ${ENTRY})
+ endif()
+ endforeach()
+
+ if(NOT NGFX_VERSIONS)
+ message(FATAL_ERROR "Could not find any NGFX SDK Version!")
+ endif()
+
+ list(TRANSFORM NGFX_VERSIONS REPLACE "${NGFX_SDK}/" "")
+ list(SORT NGFX_VERSIONS)
+ list(GET NGFX_VERSIONS -1 LATEST_NGFX_VERSION)
+
+ # on the cache variable init pick the latest version, then let user pick from list
+ set(NGFX_SDK_VERSION "${LATEST_NGFX_VERSION}" CACHE STRING "NGFX SDK Version")
+ set_property(CACHE NGFX_SDK_VERSION PROPERTY STRINGS ${NGFX_VERSIONS})
+
+ set(NGFX_SDK_VERSION "$CACHE{NGFX_SDK_VERSION}")
+ set(NGFX_SDK_BASE "${NGFX_SDK}/${NGFX_SDK_VERSION}")
+
+ # TODO: wanna support more *host* platforms? (*)
+ # NOTE: also I'm hardcoding windows x64 library requests till I know the answer for (*)
+ find_file(NBL_NGFX_INJECTION_HEADER NGFX_Injection.h PATHS ${NGFX_SDK_BASE}/include)
+ find_file(NBL_NGFX_INJECTION_DLL NGFX_Injection.dll PATHS ${NGFX_SDK_BASE}/lib/x64)
+ find_file(NBL_NGFX_INJECTION_IMPORT_LIBRARY NGFX_Injection.lib PATHS ${NGFX_SDK_BASE}/lib/x64)
+
+ if(NBL_NGFX_INJECTION_HEADER AND NBL_NGFX_INJECTION_DLL AND NBL_NGFX_INJECTION_IMPORT_LIBRARY)
+ message(STATUS "Enabled build with NVIDIA Nsight Graphics SDK ${NGFX_SDK_VERSION}\nlocated in: \"${NGFX_SDK_BASE}\"")
+ else()
+ message(STATUS "Could not enable build with NVIDIA Nsight Graphics SDK ${NGFX_SDK_VERSION} - invalid components!")
+ message(STATUS "Located in: \"${NGFX_SDK_BASE}\"")
+ message(STATUS "NBL_NGFX_INJECTION_HEADER=\"${NBL_NGFX_INJECTION_HEADER}\"")
+ message(STATUS "NBL_NGFX_INJECTION_DLL=\"${NBL_NGFX_INJECTION_DLL}\"")
+ message(STATUS "NBL_NGFX_INJECTION_IMPORT_LIBRARY=\"${NBL_NGFX_INJECTION_IMPORT_LIBRARY}\"")
+ message(FATAL_ERROR "You installation may be corupted, please fix it and re-run CMake or disable NBL_BUILD_WITH_NGFX!")
+ endif()
+
+ add_library(ngfx INTERFACE)
+ target_sources(ngfx INTERFACE "${NBL_NGFX_INJECTION_HEADER}")
+ target_include_directories(ngfx INTERFACE "${NGFX_SDK_BASE}/include")
+ target_link_libraries(ngfx INTERFACE "${NBL_NGFX_INJECTION_IMPORT_LIBRARY}")
+ target_link_options(ngfx INTERFACE "/DELAYLOAD:NGFX_Injection.dll")
+ target_compile_definitions(ngfx INTERFACE NGFX_INJECTION_DLL_DIR="${NGFX_SDK_BASE}/lib/x64")
+ target_compile_definitions(ngfx INTERFACE NGFX_VERSION="${NGFX_SDK_VERSION}")
+endif()
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 85aa9edd14..131c243181 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,4 +82,6 @@ endif()
add_subdirectory(artifacts EXCLUDE_FROM_ALL) # TODO: remove/refactor, old
-include(cpack/package)
\ No newline at end of file
+include(cpack/package)
+
+include(cmake/buildinfo/buildinfo.cmake)
\ No newline at end of file
diff --git a/README.md b/README.md
index e67258cf7f..ff6a4f5a01 100644
--- a/README.md
+++ b/README.md
@@ -1,311 +1,334 @@
-# Nabla
-[](https://opensource.org/licenses/Apache-2.0)
-
-**Nabla** (previously called **[IrrlichtBaW](https://github.com/buildaworldnet/IrrlichtBAW)** ) is a new renovated version of older **[Irrlicht](http://irrlicht.sourceforge.net/)** engine.
-The name change to Nabla allows for using Nabla side by side with the legacy Irrlicht and IrrlichtBaW engines.
-The project currently aims for a thread-able and *Vulkan*-centered API, the Vulkan backend is almost complete, and OpenGL and ES backends are currently in maintenance mode.
-
-This framework has been kindly begun by the founder ***[@devshgraphicsprogramming](https://github.com/devshgraphicsprogramming)*** of **[Devsh Graphics Programming Sp. z O.O.](http://devsh.eu/)** and was almost entirely sponsored by **Build A World Aps** in its early days, now it has been picked up by **[Ditt B.V.](https://www.ditt.nl/)**.
-
-## (Get Hired) Jobs and Internships
-
-If you are a programmer with a passion for High Performance Computing, Mathematics and Computer Graphics
-
-If you can be in charge of your own time managment and work 4-day work weeks 100% remotely
-
-Then make something impressive using **Nabla**, open a PR and contact us (`jobs@devsh.eu` or **[discord](https://discord.gg/4MTCVaN)**) with your CV. *Check our [Free Task List](https://github.com/Devsh-Graphics-Programming/Nabla/blob/master/CONTRIBUTING.md#free-tasks-to-take-do-any---we-can-hire-you-) for contribution ideas!*
-
-We would also be happy to sponsor your master or bachelor thesis as long as:
-- You are an above average student with an interest in Graphics
-- It will be written in English
-- It will produce contributions to Nabla which we can license under Apache 2.0
-
-For internships contact us with:
-- CV in english
-- A neat description of any paperwork you'll need (schools/universities)
-_Most importantly contact us at least 3 weeks in advance of your internship organisation deadline!_
-
-## (Hire Us) Contracting
-
-The members of **Devsh Graphics Programming Sp. z O.O.** (Company Registration (KRS) #: 0000764661) are available (individually or collectively) for contracts on projects of various scopes and timescales, especially on foreign frameworks, codebases and third-party 3D frameworks.
-
-**We provide expertise in:**
-
- - OpenGL
- - OpenGL ES
- - WebGL
- - WebGPU
- - Vulkan
- - OpenCL
- - CUDA
- - D3D12 and D3D11
- - computer vision
- - Audio programming
- - DSP
- - video encoding and decoding
- - High Performance Computing
-
-Our language of choice is C++20 however we're also amenable to C#, Java, Python and related languages.
-
-Contact `newclients@devsh.eu` with inquires into contracting.
-
-## Showcase
-
-### Screenshots
-
-### Our Production Mitsuba Compatible Path Tracer made for Ditt B.V.
-
-Currently working on the `ditt` branch, in the process of being ported to Vulkan KHR Raytracing.
-
-You can download a stable build [here](https://artifactory.devsh.eu/Ditt/ci/data/artifacts/public/Ditt.tar.bz2)
-
-
-
-### [Multiple Importance Sampling and Depth of Field](https://www.youtube.com/watch?v=BuyVlQPV7Ks)
-
-
-
-
-
-## Main Features
-
-- **Frontend API with Vulkan as First Class Citizen**
-- **Thread safe and context pollution safe OpenGL**
-- **Asset management pipeline**
-- **Automatic pipeline layout creation**
-- **Shader introspection**
-- **Using SPIR-V shaders in OpenGL and ES**
-- **Libraries of GLSL shader functions**
-- **Compute shaders**
-- **Virtual Texturing**
-- **Virtual Geometry (programmable and non programmble fetching) with triangle batching**
-- **CUDA and Vulkan interop**
-- **CPU asset manipulation (image filtering, image format transcoding, mesh optimization and manipulation)**
-- **GPU driven Scene Graph**
-- **Material Compiler for Path Tracing UberShaders**
-
-## Main Delivered Extensions
-
-- **Auto Exposure**
-- **Tonemapper**
-- **Mitsuba scene loader (auto-generated shaders)**
-- **Fastest blur on the planet**
-- **OptiX interop**
-- **Bullet physics beginner integration**
-- **GPU Radix Sort**
-
-## Platforms
-
-- [x] **Windows**
-
-- [x] **Linux**
-
-- [x] **Android 7.0 +**
-
-- [ ] **Mac OS**
-
-- [ ] **iOS**
-
-## Build summary
-
-| ![][BUILD_STATUS] | Release | RWDI | Debug |
-| :----------------------: | :----------: | :----------: | :----------: |
-| **Windows MSVC x64** | ![][MSVC_1] | ![][MSVC_2] | ![][MSVC_3] |
-| **Android Clang x86_64** | ![][CLANG_1] | ![][CLANG_2] | ![][CLANG_3] |
-| **Linux GCC x64** | ![][NA] | ![][NA] | ![][NA] |
-
-[MSVC_1]: https://ci.devsh.eu/buildStatus/icon?job=BuildNabla%2FDEVSH_CONFIGURATIONS%3DRelease%2CDEVSH_NODES%3Dpredator15%2CDEVSH_OS%3DWindows
-[MSVC_2]: https://ci.devsh.eu/buildStatus/icon?job=BuildNabla%2FDEVSH_CONFIGURATIONS%3DRelWithDebInfo%2CDEVSH_NODES%3Dpredator15%2CDEVSH_OS%3DWindows
-[MSVC_3]: https://ci.devsh.eu/buildStatus/icon?job=BuildNabla%2FDEVSH_CONFIGURATIONS%3DDebug%2CDEVSH_NODES%3Dpredator15%2CDEVSH_OS%3DWindows
-[CLANG_1]: https://ci.devsh.eu/buildStatus/icon?job=BuildNabla%2FDEVSH_CONFIGURATIONS%3DRelease%2CDEVSH_NODES%3Dnode1%2CDEVSH_OS%3DAndroid
-[CLANG_2]: https://ci.devsh.eu/buildStatus/icon?job=BuildNabla%2FDEVSH_CONFIGURATIONS%3DRelWithDebInfo%2CDEVSH_NODES%3Dnode1%2CDEVSH_OS%3DAndroid
-[CLANG_3]: https://ci.devsh.eu/buildStatus/icon?job=BuildNabla%2FDEVSH_CONFIGURATIONS%3DDebug%2CDEVSH_NODES%3Dnode1%2CDEVSH_OS%3DAndroid
-[NA]: https://img.shields.io/badge/free%20slot-n%2Fa-red
-[BUILD_STATUS]: https://img.shields.io/badge/build-status-blueviolet
-
-# Quick start
-
-### Use Nabla from package
-
-TODO - soon
-
-### Build Nabla with Docker
-
-TODO - soon
-
-### Build Nabla manually
-
-#### Minimal required dependencies
-
-- **[CMake 3.29.2](https://cmake.org/download/)** version or higher
-- **[Vulkan SDK 1.2.198.1](https://vulkan.lunarg.com/sdk/home)** version or higher
-- **[NASM 2.15](https://www.nasm.us/pub/nasm/releasebuilds/?C=M;O=D)** version or higher
-- **[Python 3.10.2](https://www.python.org/downloads/release/python-3102/)** version or higher
-
-### Cloning the project
-
-```shell
-git clone git@github.com:Devsh-Graphics-Programming/Nabla.git
+
+

+
+
+

+
+
+# Table of Contents
+
+1. [Showcase](#showcase)
+2. [Features](#features)
+ - [The Nabla Core Profile](#-the-nabla-core-profile)
+ - [Physical Device Selection and Filtering](#-physical-device-selection-and-filteration)
+ - [SPIR-V and Vulkan as First-Class Citizens](#-spir-v-and-vulkan-as-first-class-citizens)
+ - [Integration of Renderdoc](#-integration-of-renderdoc)
+ - [Nabla Event Handler: Seamless GPU-CPU Synchronization](#-nabla-event-handler-seamless-gpu-cpu-synchronization)
+ - [GPU Object Lifecycle Tracking](#-gpu-object-lifecycle-tracking)
+ - [HLSL2021 Standard Template Library](#-hlsl2021-standard-template-library)
+ - [Full Embrace of Buffer Device Address and Descriptor Indexing](#-full-embrace-of-buffer-device-address-and-descriptor-indexing)
+ - [Minimally Invasive Design](#-minimally-invasive-design)
+ - [Designed for Interoperation](#-designed-for-interoperation)
+ - [Cancellable Future-based Async I/O](#-cancellable-future-based-async-io)
+ - [Data Transfer Utilities](#-data-transfer-utilities)
+ - [Virtual File System](#-virtual-file-system)
+ - [Asset System](#-asset-system)
+ - [Asset Converter (CPU to GPU)](#-asset-converter-cpu-to-gpu)
+ - [Unit-Tested BxDFs for Physically Based Rendering](#-unit-tested-bxdfs-for-physically-based-rendering)
+ - [Property Pools (GPU Entity Component System)](#-in-progress-property-pools-gpu-entity-component-system)
+ - [SPIR-V Introspection and Layout Creation](#-spir-v-introspection-and-layout-creation)
+ - [Nabla Extensions](#-nabla-extensions)
+3. [Coming Soon](#-coming-soon)
+4. [Need Our Expertise?](#-need-our-expertise)
+5. [Join Our Team](#join-our-team)
+
+# Showcase
+
+
+
+
+
+# Features
+
+### 🧩 **The Nabla Core Profile**
+
+Nabla exposes [a curated set of Vulkan extensions and features](https://github.com/Devsh-Graphics-Programming/Nabla/blob/master/src/nbl/video/vulkan/profiles/NablaCore.json) compatible across the GPUs we aim to support on Windows, Linux, (coming soon MacOS, iOS as well as Android)
+
+Vulkan evolves fast—just when you think you've figured out [sync](https://github.com/KhronosGroup/Vulkan-Docs/wiki/Synchronization-Examples-(Legacy-synchronization-APIs)), you realize there's [sync2](https://registry.khronos.org/vulkan/specs/latest/man/html/VK_KHR_synchronization2.html). Keeping up with new extensions, best practices, and hardware quirks is exhausting.
+Instead of digging through [gpuinfo.org](gpuinfo.org) or [Vulkan specs](https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html), Nabla gives you a well-thought-out set of extensions—so you can focus on what you want to achieve, not get stuck in an eternal loop of:
+ - mastering a feature
+ - finding out about a new feature
+ - assesing whether obsoletes or just adds the one you've just mastered
+ - working if the feature is ubiquitous on the devices you target
+ - rewriting what you've just polished
+
+### 🧩 **Physical Device Selection and Filteration**
+
+Nabla allows you to select the best GPU for your compute or graphics workload.
+
+```c++
+void filterDevices(core::set& physicalDevices)
+{
+ nbl::video::SPhysicalDeviceFilter deviceFilter = {};
+ deviceFilter.minApiVersion = { 1,3,0 };
+ deviceFilter.minConformanceVersion = {1,3,0,0};
+ deviceFilter.requiredFeatures.rayQuery = true;
+ deviceFilter(physicalDevices);
+}
```
-#### Force HTTPS protocol (optional)
-
-We support cloning Nabla with **ssh only**, however you can still clone Nabla and it's all submodules with https by overriding global git configuration (sorry, must be global for it to work, currently we don't have smart scripts to change local configuration for each nested submodule).
-
-```powershell
-git init
-git config --global protocol.*.allow always
-git config --global url."https://github.com/".insteadOf "git@github.com:"
-git remote add origin https://github.com/Devsh-Graphics-Programming/Nabla.git
-git fetch origin master
-git checkout master
-```
+### 🧩 **SPIR-V and Vulkan as First-Class Citizens**
-### Configure & Generate with CMake
+Nabla treats **SPIR-V** and **Vulkan** as the preferred, reference standard—everything else is built around them, with all other backends adapting to them.
-#### Target platform
+### 🧩 **Integration of Renderdoc**
-Check individual instructions for building for a particular platform in **./docs/build** directory before going further. For each platform it is assumed minimal required dependencies are installed and additional may be specified depending on the target.
+Built-in support for capturing frames and debugging with [Renderdoc](https://renderdoc.org/).
+ This is how one debugs headless or async GPU workloads that are not directly involved in producing a swapchain frame to be captured by Renderdoc.
-#### Submodules
-
-CMake will update **all required submodules** for you by default but it doesn't mean the initialization & update attempt will be successful (it is often not when performed on a shaky internet connection, so you may end up with dirty, locked or un-versioned submodules) - if not successful then try to re-configure CMake again. We have a few options for managing submodules by CMake, for more details and description check the [update submodule script](https://github.com/Devsh-Graphics-Programming/Nabla/blob/master/cmake/submodules/update.cmake). For example sometimes it may appear that there won't be any files in submodules' directories because of an update fail or dirty git cache, you could fix it and bring them back by enabling `NBL_FORCE_ON_UPDATE_GIT_SUBMODULE` CMake option. Note that we do not recommend to initialize and update submodules by hand in cmd because of private submodules in the repository.
-
-#### More options
+```c++
+const IQueue::SSubmitInfo submitInfo = {
+ .waitSemaphores = {},
+ .commandBuffers = {&cmdbufInfo,1},
+ .signalSemaphores = {&signalInfo,1}
+};
+m_api->startCapture(); // Start Renderdoc Capture
+queue->submit({&submitInfo,1});
+m_api->endCapture(); // End Renderdoc Capture
+```
-You can disable generating projects for examples with `NBL_BUILD_EXAMPLES`. It's recommended to build Nabla as shared library however you can also build as static library by turning on `NBL_STATIC_BUILD`.
+### 🧩 **Nabla Event Handler: Seamless GPU-CPU Synchronization**
-#### CMake presets
+Nabla Event Handler's extensive usage of [Timeline Semaphores](https://www.khronos.org/blog/vulkan-timeline-semaphores) enables CPU Callbacks on GPU conditions.
-We have customised [presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) which may be handy to configure **Nabla** project for a target platform with predefined & common configurations.
+You can enqueue callbacks that trigger upon submission completion (workload finish), enabling amongst others, async readback of submission side effects, or deallocating an allocation after a workload is finished.
-# Caveats and Particular Behaviour
+```c++
+// This doesn't actually free the memory from the pool, the memory is queued up to be freed only after the `scratchSemaphore` reaches a value a future submit will signal
+memory_pool->deallocate(&offset,&size,nextSubmit.getFutureScratchSemaphore());
+```
-## Hardcoded Caps
+### 🧩 **GPU Object Lifecycle Tracking**
-### Max Descriptor Sets is always 4
+Nabla uses [reference counting](https://github.com/Devsh-Graphics-Programming/Nabla/blob/ff07cd71c4e21bc51fa416ccd151b2e92efea028/include/nbl/core/decl/smart_refctd_ptr.h#L22) to track the lifecycle of GPU objects. Descriptor sets and command buffers are responsible for maintaining reference counts on the resources (e.g., buffers, textures) they use. The queue itself also tracks command buffers, ensuring that objects remain alive as long as they are pending execution. This system guarantees the correct order of deletion and makes it difficult for GPU objects to go out of scope and be destroyed before the GPU has finished using them.
-## Debugging with RenderDoc
+### 🧩 **HLSL2021 Standard Template Library**
-### Non-programmatic OpenGL catpures will be delimited inconsistently
+- 🔄 Reusable: Unified single-source C++/HLSL libraries eliminate code duplication with reimplementation of STL's `type_traits`, `limits`, `functional`, `tgmath`, etc.
-Due to our no-pollution opengl state isolation policy, we have 1 queue or swapchain = 1 thread = 1 gl context + 1 master context and thread for device calls.
+- 🐞 Shader Logic, CPU-Tested: A subset of HLSL compiles as both C++ and SPIR-V, enabling CPU-side debugging of GPU logic, ensuring correctness in complex tasks like FFT, Prefix Sum, etc. (See our examples: [1. BxDF Unit Test](https://github.com/Devsh-Graphics-Programming/Nabla-Examples-and-Tests/blob/d7f7a87fa08a56a16cd1bcc7d4d9fd48fc8c278c/66_HLSLBxDFTests/app_resources/tests.hlsl#L436), [2. Math Funcs Unit Test](https://github.com/Devsh-Graphics-Programming/Nabla-Examples-and-Tests/blob/fd92730f0f5c8a120782c928309cb10e776c25db/22_CppCompat/main.cpp#L407))
-Renderdoc therefore serializes all calls, and presents them inside the capture in interleaved order (records them on a single timeline "as they happened").
+- 🔮 Future-Proof: C++20 [concepts](https://en.cppreference.com/w/cpp/language/constraints) in HLSL enable safe and documented polymorphism.
-Furthermore it has no idea what constitutes a frame, because swap-buffers call happens on a separate thread than all the other API calls. **So use the `IGPUQueue` start/end capture methods!**
+- 🧠 Insane: Boost Preprocessor and Template Metaprogramming in HLSL!
-### RenderDoc flips images for display in the ImageViewer tab on OpenGL captures
+- 🛠️ Real-World Problem Solvers: The library offers GPU-optimized solutions for tasks like Prefix Sum, Binary Search, FFT, Global Sort, and even emulated `shaderFloat64` when native GPU support is unavailable!
-Ctrl+F `localRenderer in https://github.com/baldurk/renderdoc/blob/4103f6a5455b9734e9bf74e254577f5c03188136/renderdoc/core/image_viewer.cpp
+🎤 Talks from us:
+ - [Vulkanised 2024: Beyond SPIR-V: Single Source C++ and Shader Programming](https://www.youtube.com/watch?v=JCJ35dlZJb4)
+ - [Vulkanised 2023: HLSL202x like its C++, building an `std::` like Library]()
-### OpenGL/Vulkan Inconsistencies
+### 🧩 **Full Embrace of [Buffer Device Address]() and [Descriptor Indexing]()**
-In certain cases same calls to Vulkan and OpenGL might result in y-flipped image relevant to the other API.
+By utilizing Buffer Device Addresses (BDAs), Nabla enables more direct access to memory through 64-bit GPU virtual addresses. Synergized with Descriptor Indexing, this approach enhances flexibility by enabling more dynamic, scalable resource binding without relying on traditional descriptor sets.
-Both APIs write (-1,-1) in NDC space to (0,0) in image space (two wrongs make right), and memory-wise (0,0) always represents the lowest byte in memory.
+### 🧩 **Minimally Invasive Design**
-This inconsistency comes from swapchain presentation. When presenting the swapchain, the image location (0,0) corresponds to **bottom-left** in OpenGL and **top-left** in Vulkan.
+No Singletons, No Main Thread—Nabla allows multiple instances of every object (including Vulkan devices) without assuming a main thread or thread-local contexts. Thread-agnostic by design, it avoids global state and explicitly passes contexts for easy multithreading.
-#### Solution by Surface Transforms
+Nabla's minimally invasive and flexible design with api handle acquisitions and multi-window support make it ideal for custom rendering setups and low-level GPU programming without unnecessary constraints such as assuming a main thread or a single window.
-We solve this inconsistency by using [surface transforms](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkSurfaceTransformFlagBitsKHR.html); This transforms are relative to `presentation engine’s natural orientation`. and we report `HORIZONTAL_MIRROR_180` support in our OpenGL backend and defer handling these rotations (relative to natural orientaion) to the user.
+Even Win32 windowing is wrapped for use across multiple threads, breaking free traditional single-thread limitations.
-We provide helper functions in both GLSL and C++ Nabla codebase to consider surface transforms, See [surface_transform.glsl](https://github.com/Devsh-Graphics-Programming/Nabla/tree/master/include/nbl/builtin/glsl/utils/surface_transform.glsl)
+This allows simpler porting of legacy OpenGL and DirectX applications.
-Note that it is common to apply surface transformation to projection matrices to account for this fact. See [getSurfaceTransformationMatrix](https://github.com/Devsh-Graphics-Programming/Nabla/tree/master/include/nbl/video/surface/ISurface.h) and [Android Developers Guide to Pre-rotation](https://developer.android.com/games/optimize/vulkan-prerotation)
+
+
+
-Use [`ISwapchain getSurfaceTransform()`](https://github.com/Devsh-Graphics-Programming/Nabla/tree/master/include/nbl/video/ISwapchain.h) to get the transformation from swapchain.
+### 🧩 **Designed for Interoperation**
+Nabla is built with interoperation in mind, supporting memory export and import between different compute and graphics APIs.
-- When generating projection matricies, take into account the aspect ratio (which is changed when rotating 90 or 270 degrees). For this, we have helper functions in both GLSL and the ISurface class:
- - [`float getTransformedAspectRatio(const E_SURFACE_TRANSFORM_FLAGS transform, uint32_t w, uint32_t h)`](https://github.com/Devsh-Graphics-Programming/Nabla/tree/master/include/nbl/video/surface/ISurface.h)
- - [`nbl_glsl_surface_transform_transformedExtents`](https://github.com/Devsh-Graphics-Programming/Nabla/tree/master/include/nbl/builtin/glsl/utils/surface_transform.glsl)
+### 🧩 **Cancellable Future based Async I/O**
-- On the swapchain rendering pass, perform **one** of the following transforms:
- - If rendering **directly to the swapchain**, you can apply the (post) transform matrix to your projection or combined view-projection matrix **for rendering** (don't pre-multiply with projection matrix for use outside rendering):
- - [`matrix4SIMD ISurface::getSurfaceTransformationMatrix(const E_SURFACE_TRANSFORM_FLAGS transform)`](https://github.com/Devsh-Graphics-Programming/Nabla/tree/master/include/nbl/video/surface/ISurface.h)
- - [`nbl_glsl_surface_transform_applyToNDC`](https://github.com/Devsh-Graphics-Programming/Nabla/tree/master/include/nbl/builtin/glsl/utils/surface_transform.glsl) (This takes in an NDC coordinate and multiplies it with the transform matrix in one function)
+File I/O is fully asynchronous, using [nbl::system::future_t](https://github.com/Devsh-Graphics-Programming/Nabla/blob/ff07cd71c4e21bc51fa416ccd151b2e92efea028/include/nbl/system/ISystem.h#L26), a cancellable MPSC circular buffer-based future implementation.
- - If using `imageStore` to write **directly to the swapchain**, you can either:
- - Apply a transform to the screen-space coordinates being written to the swapchain:
- - [`nbl_glsl_surface_transform_applyToScreenSpaceCoordinate`](https://github.com/Devsh-Graphics-Programming/Nabla/tree/master/include/nbl/builtin/glsl/utils/surface_transform.glsl)
- - Apply an **inverse** transform to the screen-space coordinates (taken from `gl_GlobalInvocationID.xy`) before turning them into UV/world-space coordinates for rendering:
- - [`nbl_glsl_surface_transform_applyInverseToScreenSpaceCoordinate`](https://github.com/Devsh-Graphics-Programming/Nabla/tree/master/include/nbl/builtin/glsl/utils/surface_transform.glsl)
+Requests start in a **PENDING** state and can be invalidated before execution if needed. This enables efficient async file reads and GPU memory writes, ensuring non-blocking execution:
-# Continuous integration
+```cpp
+ISystem::future_t bytesActuallyWritten;
+file->read(bytesActuallyWritten, gpuMemory->getMappedPointer(), offsetInFile, 2*1024*1024*1024);
+while (!bytesActuallyWritten.ready()) { /* Do other work */ }
+```
-## Nabla Python Framework
+### 🧩 **Data Transfer Utilities**
+Nabla's [Utilities](https://github.com/Devsh-Graphics-Programming/Nabla/blob/master/include/nbl/video/utilities/IUtilities.h) streamlines the process of pushing/pulling arbitrary-sized buffers and images with fixed staging memory to/from the GPU, ensuring seamless data transfers.
+ The system automatically handles submission when buffer memory overflows, while [promoting unsupported formats](https://github.com/Devsh-Graphics-Programming/Nabla/tree/dac9855ab4a98d764130e41a69abdc605a91092c/include/nbl/asset/format) during upload to handle color format conversions.
+By leveraging device-specific properties, the system respects alignment limits and ensures deterministic behavior. The user only provides initial submission info through [SIntendedSubmitInfo](https://github.com/Devsh-Graphics-Programming/Nabla/blob/ff07cd71c4e21bc51fa416ccd151b2e92efea028/include/nbl/video/utilities/SIntendedSubmitInfo.h#L18), and the utility manages subsequent submissions automatically.
-### CPU & GPU local tests shipped with the repository
+ - Learn more:
+ - 🎤 Our Talk at Vulkanised: [Vulkanised 2023: Keeping your staging buffer fixed size! ](https://www.youtube.com/watch?v=x8v656d3pc4)
+ - 📚 Our Blog post: [Uploading Textures to GPU - The Good Way](https://erfan-ahmadi.github.io/blog/Nabla/imageupload)
-#### Description
-**Nabla** aims to implement full CPU & GPU tests used by our CI in-house infrastructure groovy pipelines in relocatable way allowing users to execute and debug the tests locally on their own devices as well. Each test is a Python module which part of it gets created with the CMake build system configuration. A test is defined and created as a module by
+### 🧩 **Virtual File System**
-- top json configuration file
-- interface Python script
+Nabla provides a [**unified Virtual File System**] ([system::ISystem](https://github.com/Devsh-Graphics-Programming/Nabla/blob/ff07cd71c4e21bc51fa416ccd151b2e92efea028/include/nbl/system/ISystem.h#L19)) that supports **mounting archives and folders** under different virtual paths. This enables access to both external and embedded assets while preserving **original relative paths**.
-Top json configuration file contains run & build info, array of profiles and json inputs for a Python testing module. The file is processed and validated by CMake to create output profiles bound to the Python module. Single profile contains data used by the module to execute tests with and the implementation of the test is located in interface Python script - the script overrides common abstract interface defined as a integral part of Nabla Python framework module. The description is abstract and doesn't contain specific details, join our discord if you have any questions!
+For embedding, we provide an alternative to C++23's #embed, which allows embedding files directly into compiled binaries. Instead of relying on compiler support, we use **Python + CMake** to generate what we call **built-in resource archives**—packing files (e.g., images, shaders, `.obj`, `.mtl`, `.dds`) into DLLs as **memory-mapped [system::IFile](https://github.com/Devsh-Graphics-Programming/Nabla/blob/ff07cd71c4e21bc51fa416ccd151b2e92efea028/include/nbl/system/IFile.h#L9) objects** ensuring that dependent assets (e.g., models and their textures) **retain their correct relative paths** even when embedded.
-#### Development & Debug
+The embedding process:
+1. **At build time**, Python reads an input path table (generated by CMake).
+2. It serializes files into **constexpr arrays** with metadata (key + timestamps).
+3. The output **C++ source + header** define a **built-in resource library**, linked into Nabla or examples.
-Each valid Python module contains autogenerated .vscode's *launch.json* and *settings.json* to make development easy. You just need to `Open with Code`in the module's directory. Make sure to install [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) there to enable IntelliSense (Pylance), Linting, Debugging (multi-threaded, remote), code formatting, refactoring, unit tests, and more.
+This approach keeps assets self-contained, making file access efficient while maintaining asset dependencies.
-A target for which Python module is available for testing lists a special Python Framework section located in its solution's project file structure (**Visual Studio only!**) containing Nabla Python Framework sources, target's interface Python script, autogenerated json profiles and autogenerated` __main__.py` module script. Unfortunately pure Visual Studio works so-so with Python (issues with search module paths defined as `searchPath` .pyproj's property, issues with IntelliSense and Debugging) - we encourage to use Visual Studio Code if you need to Debug an interface or develop it.
+### 🧩 **Asset System**
+The asset system in Nabla maintains a 1:1 mapping between CPU and GPU representations, where every CPU asset has a direct GPU counterpart.
+The system also allows for coordination between loaders—for instance, the OBJ loader can trigger the MTL loader, and the MTL loader in turn invokes image loaders, ensuring smooth asset dependency management.
-#### Runtime
+### 🧩 **Asset Converter (CPU to GPU)**
+The Asset Converter transforms CPU objects (`asset::IAsset`) into GPU objects (`video::IBackendObject`) while eliminating duplicates with Merkle Trees. Instead of relying on pointer comparisons, it hashes asset contents to detect and reuse identical GPU objects.
-##### Command line
+### 🧩 **Unit-Tested BxDFs for Physically Based Rendering**
+A statically polymorphic library for defining Bidirectional Scattering Distribution Functions (BxDFs) in HLSL and C++. Each BxDF is rigorously unit-tested in C++ as well as HLSL. This is part of Nabla’s HLSL-C++ compatible library.
-To run all tests bound to a module with a command line you just need to execute `python3 -m `. You can also specify special arguments to have more control over the test execution, for more details see [template module script](https://github.com/Devsh-Graphics-Programming/Nabla-Continous-Integration-Python-Framework/blob/4f7a67a3fa9bb418bcb07fa2f7a5853e55b853c4/scripts/__main__.py.cmake)
+Snippet of our [BxDF Unit Test](https://github.com/Devsh-Graphics-Programming/Nabla-Examples-and-Tests/blob/d7f7a87fa08a56a16cd1bcc7d4d9fd48fc8c278c/66_HLSLBxDFTests/main.cpp#L93):
-##### Visual Studio
+```cpp
+TestJacobian>::run(initparams, cb);
+TestJacobian>::run(initparams, cb);
+TestJacobian, false>::run(initparams, cb);
+TestJacobian, true>::run(initparams, cb);
+TestJacobian, false>::run(initparams, cb);
+TestJacobian,true>::run(initparams, cb);
-You need to open a target's solution. To launch all tests bound to a module a module's `__main__.py` file located in Python Framework section must be selected and `Debug -> Execute File in Python interactive` executed.
+TestJacobian>::run(initparams, cb);
+TestJacobian>::run(initparams, cb);
+TestJacobian>::run(initparams, cb);
+TestJacobian, false>::run(initparams, cb);
+TestJacobian, true>::run(initparams, cb);
+TestJacobian, false>::run(initparams, cb);
+TestJacobian,true>::run(initparams, cb);
+```
-**Visual Studio Code**
+### 🔧 **In Progress: Property Pools (GPU Entity Component System)**
+*Property Pools* group related properties together in a Structure Of Arrays (SoA) manner, allowing efficient, cache-friendly access to data on the GPU. The system enables transferring properties (Components) between the CPU and GPU, with the `PropertyPoolHandler` managing scattered updates with a special compute shader. Handles are assigned for each object and remain constant as data is added or removed.
-You need to open module's directory as workspace with `Open with Code `, select `Run and Debug` icon, select `__main__.py` file and run it.
+### 🧩 **SPIR-V Introspection and Layout Creation**
-# License
+SPIR-V introspection in Nabla eliminates most of the boilerplate code required to set up descriptor and pipeline layouts, simplifying resource binding to shaders.
-**Nabla** is released under the **[Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)** license. See [**LICENSE.md**](https://github.com/Devsh-Graphics-Programming/Nabla/blob/master/LICENSE.md) for more details.
+### 🧩 **Nabla Extensions**
+- [ImGui integration](https://github.com/Devsh-Graphics-Programming/Nabla/tree/master/include/nbl/ext/ImGui) – `MultiDrawIndirect` based and draws in as little as a single drawcall.
+- [Fast Fourier Transform Extension](https://github.com/Devsh-Graphics-Programming/Nabla/tree/master/include/nbl/ext/FFT) – for image processing and all kind of frequncy-domain fun.
+- [Workgroup Prefix Sum](https://github.com/Devsh-Graphics-Programming/Nabla/tree/master/include/nbl/builtin/hlsl/workgroup) – Efficient parallel prefix sum computation.
+- [Blur](https://github.com/Devsh-Graphics-Programming/Nabla/blob/ff07cd71c4e21bc51fa416ccd151b2e92efea028/include/nbl/builtin/hlsl/prefix_sum_blur/blur.hlsl#L3) – Optimized GPU-based image blurring.
+- [Counting Sort](https://github.com/Devsh-Graphics-Programming/Nabla/blob/ff07cd71c4e21bc51fa416ccd151b2e92efea028/include/nbl/builtin/hlsl/sort/counting.hlsl) – High-performance, GPU-accelerated sorting algorithm.
+- [WIP] Autoexposure – Adaptive brightness adjustment for HDR rendering.
+- [WIP] Tonemapping
+- [WIP] GPU MPMC Queue – Multi-producer, multi-consumer GPU queue.
+- [WIP] OptiX interoperability for ray tracing.
+- [WIP] Global Scan – High-speed parallel scanning across large datasets.
-# Documentation
+### 🚀 **Coming Soon**
+- Full CUDA interoperability support.
+- Scene Loaders
+- GPU-Driven Scene Graph
+- Material Compiler 2.0 for efficient scheduling of BxDF graph evaluation
-**(WIP/TODO)**
+# 🤝 Need Our Expertise?
-# Official Support (Discord)
+We specialize in:
+- High-performance computing and performance optimization
+- Path Tracing and Physically Based Rendering
+- CAD Rendering
+- Audio Programming and Digital Signal Processing
+- Porting and Optimizing legacy Renderers
+- Graphics and Compute APIs:
+ - Vulkan, D3D12, CUDA, OpenCL, WebGPU, D3D11, OpenGL
-Permanent members of *Devsh Graphics Programming Sp. z O.O.* use this to organise publicly visible work. **[Join to the server](https://discord.gg/4MTCVaN)** to get into more details.
+Whether you're optimizing your **renderer** or **compute workloads**, looking to **port your legacy renderer**, or integrating complex **visual effects** into your product, our team can help you. As a specialized team, we're constantly learning, evolving, and discussing matters with each other. [Each member](#join-our-team) brings unique insights to the table, ensuring we approach every project from multiple angles to achieve the best possible solution.
-# Credits and Attribution
+Our primary language is **C++20**, but we also work with **C#**, **Java**, **Python**, and other related technologies.
-#### The authors of **Nabla** are:
+If you're already here reading this, We want to hear from you and learn more about what you're building.
-- **Mateusz Kielan** ***[@devshgraphicsprogramming](https://github.com/devshgraphicsprogramming)*** (Lead Programmer)
-- **Arkadiusz Lachowicz** ***[@AnastaZIuk](https://github.com/AnastaZIuk)*** (Associate Graphics Programmer/Senior Build System Engineer)
-- **Erfan Ahmadi [@Erfan](https://github.com/Erfan-Ahmadi)** (Mid Programmer)
-- **Achal Pandey [@achalpandeyy](https://github.com/achalpandeyy)** (Associate Programmer)
-- **Przemysław Pachytel** ***[@Przemog1](https://github.com/Przemog1)*** (Junior Programmer/Technical Writer)
+**Contact us** at **newclients@devsh.eu**.
-#### Past Authors and Contributors:
+The members of **Devsh Graphics Programming Sp. z O.O.** (Company Registration (KRS) #: 0000764661) are available (individually or collectively) for contracts on projects of various scopes and timescales.
-- **Krzysztof Szenk** ***[@crisspl](https://github.com/Crisspl)*** (Senior Programmer: Everything in Nabla has been touched by his golden hands!)
-- **Danylo Sadivnychyi [@sadiuk](https://github.com/sadiuk)** (Junior Programmer: Android system interfaces and buildsystem, FFT Ocean)
-- **Cyprian Skrzypczak** ***[@Hazardu](https://github.com/Hazardu)*** (embeded resources and optimalizations)
-- ***[@khom-khun](https://github.com/khom-khun)*** (Bullet Physics Extension + Example and **[the irrBaW-test repository of easy to understand demos](https://github.com/khom-khun/irrBAW-test)**)
-- **Søren Gronbech**
-- ***[@florastamine](https://github.com/florastamine)*** **Nguyễn Ngọc Huy** (sRGB-Correct Image Loaders, CEGUI and BRDF Explorer GUI)
-- ***[@manhnt9](https://github.com/manhnt9)*** **Nguyễn Tiến Mạnh** (CEGUI, Build System and Radeon Rays Proof-of-Concept Integration in Prime Engine X with IrrlichtBaW back-end)
+---
-#### Words of appreciation for developers whose software has been used in **Nabla**, currently and in the past:
+# Join our team
-- The initial Irrlicht 1.8.3 codebase
-- **[OpenSSL](https://github.com/openssl/openssl)** and **[aesGladman](https://github.com/BrianGladman/aes)**
-- **[SPIRV-Cross](https://github.com/KhronosGroup/SPIRV-Cross)**
-- **[shaderc](https://github.com/google/shaderc)**
-- **[zlib](https://github.com/madler/zlib)**, **[bzip](https://github.com/enthought/bzip2-1.0.6)**, **[libzip2](https://packages.debian.org/search?keywords=libzip2)**, **[lzma](https://github.com/jljusten/LZMA-SDK)** and **[lz4](https://github.com/lz4/lz4)**
-- **[libjpeg-turbo](https://github.com/libjpeg-turbo/libjpeg-turbo)**, **[jpeglib](http://libjpeg.sourceforge.net/)** (past), **[libpng](https://github.com/glennrp/libpng)**
-- Unicode convert_utf and utf8cpp (will be removed soon!)
+[TODO]: also link to achievements, personal blogs, websites, linkedin and presentations of each member
diff --git a/cmake/FindNabla.cmake b/cmake/FindNabla.cmake
new file mode 100644
index 0000000000..152933d02d
--- /dev/null
+++ b/cmake/FindNabla.cmake
@@ -0,0 +1,39 @@
+# Define NBL_CONFIG_ROOT_DIRECTORY
+# variable to help the module find
+# Nabla package
+
+if(NOT DEFINED CMAKE_CONFIGURATION_TYPES)
+ set(CMAKE_CONFIGURATION_TYPES Release;RelWithDebInfo;Debug)
+endif()
+
+if(NOT DEFINED NBL_PACKAGE_STATIC) # turn ON NBL_PACKAGE_STATIC to look for package with STATIC library type, turn off to look for DYNAMIC
+ if(${NBL_STATIC_BUILD}) # internal, if called with Nabla's build system it will get detected autoamtically
+ set(NBL_PACKAGE_STATIC ON)
+ else()
+ message(FATAL_ERROR "NBL_PACKAGE_STATIC must be defined!")
+ endif()
+endif()
+
+if(NBL_PACKAGE_STATIC)
+ set(NBL_LIBRARY_TYPE static)
+else()
+ set(NBL_LIBRARY_TYPE dynamic)
+endif()
+
+foreach(X IN LISTS CMAKE_CONFIGURATION_TYPES)
+ if(NOT "${X}" STREQUAL "")
+ string(TOLOWER "nabla-${NBL_LIBRARY_TYPE}-${X}" _NBL_TARGET_PACKAGE_)
+
+ if(DEFINED NBL_CONFIG_ROOT_DIRECTORY)
+ file(GLOB_RECURSE _NBL_G_CONFIG_ROOT_DIRECTORY_ "${NBL_CONFIG_ROOT_DIRECTORY}/*/${_NBL_TARGET_PACKAGE_}Config.cmake")
+ cmake_path(GET _NBL_G_CONFIG_ROOT_DIRECTORY_ PARENT_PATH _NBL_G_CONFIG_ROOT_DIRECTORY_)
+ else()
+ unset(_NBL_G_CONFIG_ROOT_DIRECTORY_)
+ endif()
+
+ find_package(${_NBL_TARGET_PACKAGE_} QUIET
+ GLOBAL
+ PATHS ${_NBL_G_CONFIG_ROOT_DIRECTORY_}
+ )
+ endif()
+endforeach()
\ No newline at end of file
diff --git a/cmake/adjust/flags.cmake b/cmake/adjust/flags.cmake
index c07aa051d5..25e893ea88 100644
--- a/cmake/adjust/flags.cmake
+++ b/cmake/adjust/flags.cmake
@@ -194,6 +194,6 @@ function(nbl_adjust_flags)
list(APPEND _D_NBL_COMPILE_OPTIONS_ $<$:${NBL_TO_CONFIG_COMPILE_OPTIONS}>)
endforeach()
- set_directory_properties(PROPERTIES COMPILE_OPTIONS ${_D_NBL_COMPILE_OPTIONS_})
+ set_directory_properties(PROPERTIES COMPILE_OPTIONS "${_D_NBL_COMPILE_OPTIONS_}")
endif()
endfunction()
\ No newline at end of file
diff --git a/cmake/adjust/template/windows/msvc.cmake b/cmake/adjust/template/windows/msvc.cmake
index e0eaa82e80..0f9fe365ee 100644
--- a/cmake/adjust/template/windows/msvc.cmake
+++ b/cmake/adjust/template/windows/msvc.cmake
@@ -12,6 +12,8 @@ if(NBL_REQUEST_SSE_AXV2)
NBL_REQUEST_COMPILE_OPTION_SUPPORT("/arch:AVX2")
endif()
+NBL_REQUEST_COMPILE_OPTION_SUPPORT(/Zc:preprocessor)
+
# Debug
set(NBL_C_DEBUG_COMPILE_OPTIONS
/Ob0 /Od /MP${_NBL_JOBS_AMOUNT_} /fp:fast /Zc:wchar_t /INCREMENTAL
diff --git a/cmake/buildinfo/buildinfo.cmake b/cmake/buildinfo/buildinfo.cmake
new file mode 100644
index 0000000000..b3e7f55463
--- /dev/null
+++ b/cmake/buildinfo/buildinfo.cmake
@@ -0,0 +1,29 @@
+cmake_host_system_information(RESULT CPU_NAME QUERY PROCESSOR_NAME)
+cmake_host_system_information(RESULT CPU_DESC QUERY PROCESSOR_DESCRIPTION)
+
+add_custom_command(
+ OUTPUT cmake_info.json
+ COMMAND ${CMAKE_COMMAND} -E capabilities >> cmake_info.json
+ COMMENT "Generating ${NBL_ROOT_PATH_BINARY}/cmake_info.json"
+)
+
+set(VKSDK_INFO_COMMAND "$ENV{VULKAN_SDK}/bin/vulkaninfoSDK")
+add_custom_command(
+ OUTPUT vulkan_info.json
+ COMMAND ${VKSDK_INFO_COMMAND} -j -o ${NBL_ROOT_PATH_BINARY}/vulkan_info.json
+ COMMENT "Generating ${NBL_ROOT_PATH_BINARY}/vulkan_info.json"
+)
+
+set(SYSTEM_INFO_DEPENDENCIES
+ cmake_info.json
+ vulkan_info.json
+ CMakeCache.txt
+ "${NBL_ROOT_PATH_BINARY}/3rdparty/git-version-tracking/nabla_git_info.cpp"
+ "${NBL_ROOT_PATH_BINARY}/3rdparty/git-version-tracking/dxc_git_info.cpp"
+)
+
+add_custom_target(build_info
+ DEPENDS ${SYSTEM_INFO_DEPENDENCIES}
+ COMMAND ${CMAKE_COMMAND} -E tar c build_info.zip --format=zip ${SYSTEM_INFO_DEPENDENCIES}
+ COMMENT "Generating ${NBL_ROOT_PATH_BINARY}/build_info.zip"
+)
\ No newline at end of file
diff --git a/cmake/common.cmake b/cmake/common.cmake
old mode 100755
new mode 100644
index 93df35d217..179f58613b
--- a/cmake/common.cmake
+++ b/cmake/common.cmake
@@ -29,8 +29,8 @@ function(nbl_handle_dll_definitions _TARGET_ _SCOPE_)
set(_NABLA_OUTPUT_DIR_ "${NBL_ROOT_PATH_BINARY}/src/nbl/$/devshgraphicsprogramming.nabla")
target_compile_definitions(${_TARGET_} ${_SCOPE_}
- _NABLA_DLL_NAME_="$";_NABLA_OUTPUT_DIR_="${_NABLA_OUTPUT_DIR_}";_NABLA_INSTALL_DIR_="${CMAKE_INSTALL_PREFIX}"
- )
+ _NABLA_DLL_NAME_="$>";_NABLA_OUTPUT_DIR_="${_NABLA_OUTPUT_DIR_}"
+ )
endif()
target_compile_definitions(${_TARGET_} ${_SCOPE_}
@@ -248,6 +248,8 @@ macro(nbl_create_executable_project _EXTRA_SOURCES _EXTRA_OPTIONS _EXTRA_INCLUDE
target_compile_definitions(${EXECUTABLE_NAME}
PRIVATE "-DNBL_CPACK_PACKAGE_NABLA_DLL_DIR=\"${_NBL_NABLA_PACKAGE_RUNTIME_DLL_DIR_PATH_REL_TO_TARGET_}\""
PRIVATE "-DNBL_CPACK_PACKAGE_DXC_DLL_DIR=\"${_NBL_DXC_PACKAGE_RUNTIME_DLL_DIR_PATH_REL_TO_TARGET_}\""
+ PRIVATE "-DNBL_CPACK_PACKAGE_NABLA_DLL_DIR_ABS_KEY=\"${_NBL_NABLA_PACKAGE_RUNTIME_DLL_DIR_PATH_}\""
+ PRIVATE "-DNBL_CPACK_PACKAGE_DXC_DLL_DIR_ABS_KEY=\"${_NBL_DXC_PACKAGE_RUNTIME_DLL_DIR_PATH_}\""
)
endif()
diff --git a/cmake/cpack/find/compoment/template.cmake b/cmake/cpack/find/compoment/template.cmake
new file mode 100644
index 0000000000..f65c1a5233
--- /dev/null
+++ b/cmake/cpack/find/compoment/template.cmake
@@ -0,0 +1,6 @@
+list(TRANSFORM @_NBL_PROXY_@ PREPEND "${CMAKE_CURRENT_LIST_DIR}/")
+
+set(@_NBL_COMPOMENT_D_@ "${CMAKE_CURRENT_LIST_DIR}/@_NBL_COMPOMENT_D_V_@")
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(@_NBL_PACKAGE_@ DEFAULT_MSG @_NBL_PROXY_@ @_NBL_COMPOMENT_D_@)
\ No newline at end of file
diff --git a/cmake/cpack/find/config/template.cmake b/cmake/cpack/find/config/template.cmake
new file mode 100644
index 0000000000..a9ba30e354
--- /dev/null
+++ b/cmake/cpack/find/config/template.cmake
@@ -0,0 +1,15 @@
+find_package(@_NBL_PACKAGE_@
+ REQUIRED
+ CONFIG
+ GLOBAL
+ PATHS "${CMAKE_CURRENT_LIST_DIR}/compoment"
+ NO_DEFAULT_PATH
+ NO_PACKAGE_ROOT_PATH
+ NO_CMAKE_PATH
+ NO_CMAKE_ENVIRONMENT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ NO_CMAKE_PACKAGE_REGISTRY
+ NO_CMAKE_SYSTEM_PATH
+ NO_CMAKE_INSTALL_PREFIX
+ NO_CMAKE_SYSTEM_PACKAGE_REGISTRY
+)
\ No newline at end of file
diff --git a/cmake/cpack/find/licence/template.cmake b/cmake/cpack/find/licence/template.cmake
new file mode 100644
index 0000000000..c9c56cbaaa
--- /dev/null
+++ b/cmake/cpack/find/licence/template.cmake
@@ -0,0 +1,3 @@
+# Copyright (C) 2018-2025 - DevSH Graphics Programming Sp. z O.O.
+# This file is part of the "Nabla Engine".
+# For conditions of distribution and use, see copyright notice in nabla.h
\ No newline at end of file
diff --git a/cmake/cpack/find/nabla.cmake b/cmake/cpack/find/nabla.cmake
new file mode 100644
index 0000000000..698157a6b7
--- /dev/null
+++ b/cmake/cpack/find/nabla.cmake
@@ -0,0 +1,97 @@
+function(NBL_GEN_FIND_NABLA_COMPONENT_CODE_IMPL _COMPOMENT_ _SPATH_)
+string(APPEND NBL_FIND_NABLA_IMPL "set(_COMPOMENT_ ${_COMPOMENT_})\nset(_SPATH_ ${_SPATH_})\nset(NBL_ROOT_PATH ${NBL_ROOT_PATH})\nset(NBL_STATIC_BUILD ${NBL_STATIC_BUILD})\n\n")
+string(APPEND NBL_FIND_NABLA_IMPL
+[=[
+if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")
+ set(NBL_CONFIG_PREFIX_PATH debug)
+elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$")
+ set(NBL_CONFIG_PREFIX_PATH relwithdebinfo)
+elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$")
+ unset(NBL_CONFIG_PREFIX_PATH)
+else()
+ message(FATAL_ERROR "Internal error, requested \"${CMAKE_INSTALL_CONFIG_NAME}\" configuration is invalid!")
+endif()
+
+string(TOUPPER "${_COMPOMENT_}" _Cu_)
+string(TOLOWER "${_COMPOMENT_}" _Cl_)
+
+string(TOUPPER "${_SPATH_}" _Su_)
+string(TOLOWER "${_SPATH_}" _Sl_)
+
+string(TOUPPER "${CMAKE_INSTALL_CONFIG_NAME}" _NBL_CONFIG_)
+string(TOLOWER "${CMAKE_INSTALL_CONFIG_NAME}" _NBL_CONFIG_L_)
+
+if(NBL_STATIC_BUILD)
+ set(NBL_LIBRARY_TYPE STATIC)
+else()
+ set(NBL_LIBRARY_TYPE DYNAMIC)
+endif()
+
+string(TOUPPER "${NBL_LIBRARY_TYPE}" _LTu_)
+string(TOLOWER "${NBL_LIBRARY_TYPE}" _LTl_)
+
+set(_NBL_PACKAGE_ nabla-${_Cl_}-${_LTl_}-${_NBL_CONFIG_L_})
+set(_NBL_COMPLETE_P_CONFIG_ nabla-${_LTl_}-${_NBL_CONFIG_L_})
+
+set(NBL_CMAKE_OUTPUT_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${NBL_CONFIG_PREFIX_PATH}/cmake")
+set(NBL_CMAKE_COMPOMENT_OUTPUT_DIRECTORY "${NBL_CMAKE_OUTPUT_DIRECTORY}/compoment")
+
+string(REPLACE "${CMAKE_INSTALL_PREFIX}" "" NBL_CMAKE_INSTALL_MANIFEST_CONTENT "${CMAKE_INSTALL_MANIFEST_FILES}")
+list(REMOVE_DUPLICATES NBL_CMAKE_INSTALL_MANIFEST_CONTENT)
+
+set(_NBL_PREFIX_ "${CMAKE_INSTALL_PREFIX}/${NBL_CONFIG_PREFIX_PATH}")
+
+set(NBL_CMAKE_COMPOMENT_OUTPUT_FILE "${NBL_CMAKE_COMPOMENT_OUTPUT_DIRECTORY}/${_NBL_PACKAGE_}Config.cmake")
+set(NBL_CMAKE_CONFIG_OUTPUT_FILE "${NBL_CMAKE_OUTPUT_DIRECTORY}/${_NBL_COMPLETE_P_CONFIG_}Config.cmake")
+
+cmake_path(RELATIVE_PATH CMAKE_INSTALL_PREFIX BASE_DIRECTORY "${NBL_CMAKE_COMPOMENT_OUTPUT_DIRECTORY}" OUTPUT_VARIABLE _NBL_REL_TO_PREFIX_)
+
+set(_NBL_PROXY_ NABLA_INSTALL_${_Cu_}_${_LTu_}_${_NBL_CONFIG_})
+set(_NBL_COMPOMENT_D_ "NABLA_INSTALL_${_Cu_}_DIRECTORY_${_LTu_}_${_NBL_CONFIG_}")
+set(_NBL_COMPOMENT_D_V_ "${_NBL_REL_TO_PREFIX_}")
+
+foreach(_MANIFEST_INSTALL_REL_FILE_ IN LISTS NBL_CMAKE_INSTALL_MANIFEST_CONTENT)
+ string(FIND "${_MANIFEST_INSTALL_REL_FILE_}" "/${_SPATH_}/" _NBL_FOUND_)
+
+ if(NOT "${_NBL_FOUND_}" STREQUAL "-1")
+ set(_X_ "${_NBL_REL_TO_PREFIX_}/${_MANIFEST_INSTALL_REL_FILE_}")
+ cmake_path(NORMAL_PATH _X_ OUTPUT_VARIABLE _X_)
+
+ list(APPEND ${_NBL_PROXY_} "${_X_}")
+ endif()
+endforeach()
+
+string(APPEND NBL_MANIFEST_IMPL "set(${_NBL_PROXY_}\n\t${${_NBL_PROXY_}}\n)")
+string(REPLACE ";" "\n\t" NBL_MANIFEST_IMPL "${NBL_MANIFEST_IMPL}")
+string(CONFIGURE "${NBL_MANIFEST_IMPL}" NBL_MANIFEST_IMPL_CONF)
+file(WRITE "${NBL_CMAKE_COMPOMENT_OUTPUT_FILE}" "${NBL_MANIFEST_IMPL_CONF}")
+
+# the reason behind this weird looking thing is you cannot nest bracket arguments https://cmake.org/cmake/help/latest/manual/cmake-language.7.html#bracket-argument
+# some variables need evaluation but some not and must be literals, to make this code read-able & work we do a small workaround
+
+# Compoment
+configure_file("${NBL_ROOT_PATH}/cmake/cpack/find/compoment/template.cmake" "${NBL_CMAKE_COMPOMENT_OUTPUT_FILE}.tmp" @ONLY)
+file(READ "${NBL_CMAKE_COMPOMENT_OUTPUT_FILE}.tmp" _NBL_COMPOMENT_INCLUDE_LIST_TRANFORM_)
+file(REMOVE "${NBL_CMAKE_COMPOMENT_OUTPUT_FILE}.tmp")
+file(APPEND "${NBL_CMAKE_COMPOMENT_OUTPUT_FILE}" "\n${_NBL_COMPOMENT_INCLUDE_LIST_TRANFORM_}")
+
+# Config
+if(NOT EXISTS "${NBL_CMAKE_CONFIG_OUTPUT_FILE}")
+ file(READ "${NBL_ROOT_PATH}/cmake/cpack/find/licence/template.cmake" _NBL_LICENCE_)
+ file(APPEND "${NBL_CMAKE_CONFIG_OUTPUT_FILE}" "${_NBL_LICENCE_}")
+endif()
+
+configure_file("${NBL_ROOT_PATH}/cmake/cpack/find/config/template.cmake" "${NBL_CMAKE_CONFIG_OUTPUT_FILE}.tmp" @ONLY)
+file(READ "${NBL_CMAKE_CONFIG_OUTPUT_FILE}.tmp" _NBL_CONFIG_FILE_CONTENT_)
+file(REMOVE "${NBL_CMAKE_CONFIG_OUTPUT_FILE}.tmp")
+file(APPEND "${NBL_CMAKE_CONFIG_OUTPUT_FILE}" "\n\n${_NBL_CONFIG_FILE_CONTENT_}")
+]=]
+)
+
+install(CODE "${NBL_FIND_NABLA_IMPL}" COMPONENT ${_COMPOMENT_})
+endfunction()
+
+# Generate compoment configurations
+NBL_GEN_FIND_NABLA_COMPONENT_CODE_IMPL(Headers include)
+NBL_GEN_FIND_NABLA_COMPONENT_CODE_IMPL(Libraries lib)
+NBL_GEN_FIND_NABLA_COMPONENT_CODE_IMPL(Runtimes runtime)
\ No newline at end of file
diff --git a/cmake/cpack/package.cmake b/cmake/cpack/package.cmake
index a72c7aadfe..3991bfeddf 100644
--- a/cmake/cpack/package.cmake
+++ b/cmake/cpack/package.cmake
@@ -87,4 +87,5 @@ set(CPACK_COMPONENT_HEADERS_DEPENDS Libraries Runtimes)
set(CPACK_THREADS 0) # try to use all threads for compression
-include(CPack)
\ No newline at end of file
+include(CPack)
+include("${CMAKE_CURRENT_LIST_DIR}/find/nabla.cmake")
\ No newline at end of file
diff --git a/cmake/install/nbl/sharedDefines.h.in b/cmake/install/nbl/sharedDefines.h.in
deleted file mode 100644
index d904c8a0b6..0000000000
--- a/cmake/install/nbl/sharedDefines.h.in
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- Those defines are included to the installed define.h header
- if the library has been built as DLL.
-*/
-
-#define _NABLA_DLL_NAME_ "@_NABLA_DLL_NAME_@"
-#define _DXC_DLL_NAME_ "@_DXC_DLL_NAME_@"
-#define _NABLA_INSTALL_DIR_ @_NABLA_INSTALL_DIR_@
\ No newline at end of file
diff --git a/cmake/scripts/nbl/nablaBuildInfo.cmake b/cmake/scripts/nbl/nablaBuildInfo.cmake
new file mode 100644
index 0000000000..d284cae37b
--- /dev/null
+++ b/cmake/scripts/nbl/nablaBuildInfo.cmake
@@ -0,0 +1,48 @@
+if (NOT DEFINED NBL_EXECUTABLE_PATH)
+ message(FATAL_ERROR "NBL_EXECUTABLE_PATH is not defined.")
+endif()
+
+if(NOT EXISTS "${NBL_EXECUTABLE_PATH}")
+ message(FATAL_ERROR "NBL_EXECUTABLE_PATH: \"${NBL_EXECUTABLE_PATH}\" doesn't exist!")
+endif()
+
+if (NOT DEFINED NBL_BUILD_INFO)
+ message(FATAL_ERROR "NBL_BUILD_INFO is not defined.")
+endif()
+
+cmake_path(NATIVE_PATH NBL_BUILD_INFO NORMALIZE NBL_BUILD_INFO)
+
+if(NOT EXISTS "${NBL_BUILD_INFO}")
+ message(FATAL_ERROR "NBL_BUILD_INFO: \"${NBL_BUILD_INFO}\" doesn't exist!")
+endif()
+
+if (NOT DEFINED NBL_OUTPUT_FILE)
+ message(FATAL_ERROR "NBL_OUTPUT_FILE is not defined.")
+endif()
+
+cmake_path(NATIVE_PATH NBL_OUTPUT_FILE NORMALIZE NBL_OUTPUT_FILE)
+
+if (DEFINED NBL_OUTPUT_EXE_OVERRIDE)
+ set(EXECUTABLE_PATH "${NBL_OUTPUT_EXE_OVERRIDE}")
+else()
+ set(EXECUTABLE_PATH "${NBL_EXECUTABLE_PATH}")
+endif()
+
+file(READ "${NBL_BUILD_INFO}" ORIGINAL_JSON)
+
+string(JSON NBL_MODULES ERROR_VARIABLE JSON_ERROR GET "${ORIGINAL_JSON}" modules)
+if(JSON_ERROR)
+ message(FATAL_ERROR "JSON_ERROR: \"${JSON_ERROR}\"")
+endif()
+
+file(TIMESTAMP "${NBL_EXECUTABLE_PATH}" EXE_TIMESTAMP "%Y-%m-%dT%H:%M:%S")
+string(SUBSTRING "${EXE_TIMESTAMP}" 0 10 EXE_DATE)
+string(SUBSTRING "${EXE_TIMESTAMP}" 11 8 EXE_TIME)
+
+string(JSON ORIGINAL_JSON SET "${ORIGINAL_JSON}" "exe.timestamp.date" "\"${EXE_DATE}\"")
+string(JSON ORIGINAL_JSON SET "${ORIGINAL_JSON}" "exe.timestamp.time" "\"${EXE_TIME}\"")
+string(JSON ORIGINAL_JSON SET "${ORIGINAL_JSON}" "exe.path" "\"${EXECUTABLE_PATH}\"")
+
+file(WRITE "${NBL_OUTPUT_FILE}" "${ORIGINAL_JSON}")
+message(STATUS "Updated build info JSON written to: ${NBL_OUTPUT_FILE}")
+message(STATUS "${ORIGINAL_JSON}")
\ No newline at end of file
diff --git a/docker/.env b/docker/.env
new file mode 100644
index 0000000000..623184f422
--- /dev/null
+++ b/docker/.env
@@ -0,0 +1,2 @@
+THIS_PROJECT_WORKING_DIRECTORY=C:\docker
+THIS_PROJECT_NABLA_DIRECTORY=C:/Users/ContainerAdministrator/Nabla/bind
\ No newline at end of file
diff --git a/docker/Dockerfile b/docker/Dockerfile
new file mode 100644
index 0000000000..cd85b933c3
--- /dev/null
+++ b/docker/Dockerfile
@@ -0,0 +1,119 @@
+# escape=`
+
+ARG BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022-amd64
+
+FROM ${BASE_IMAGE}
+
+SHELL ["cmd", "/S", "/C"]
+
+USER ContainerAdministrator
+
+ENV THIS_PROJECT_WORKING_DIRECTORY="C:\docker"
+ENV THIS_PROJECT_NABLA_DIRECTORY="C:/Users/ContainerAdministrator/Nabla/bind"
+ENV VULKAN_SDK_INSTALL_DIRECTORY="${THIS_PROJECT_WORKING_DIRECTORY}\dependencies\VulkanSDK"
+ENV VS_INSTALL_DIRECTORY="${THIS_PROJECT_WORKING_DIRECTORY}\dependencies\VS\BuildTools"
+
+RUN `
+ # Download the Build Tools (17.11.5 October 8, 2024 version) bootstrapper. https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history
+ `
+ curl -SL --output vs_buildtools.exe https://download.visualstudio.microsoft.com/download/pr/69e24482-3b48-44d3-af65-51f866a08313/471c9a89fa8ba27d356748ae0cf25eb1f362184992dc0bb6e9ccf10178c43c27/vs_BuildTools.exe `
+ `
+ # Install Build Tools with the Microsoft.VisualStudio.Workload.VCTools recommended workload and ATL & ATLMFC, excluding some Windows SDKs.
+ `
+ && (start /w vs_buildtools.exe --quiet --wait --norestart --nocache `
+ --installPath "%VS_INSTALL_DIRECTORY%" `
+ --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended `
+ --add Microsoft.VisualStudio.Component.VC.ATL `
+ --add Microsoft.VisualStudio.Component.VC.ATLMFC `
+ --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
+ --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
+ --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
+ --remove Microsoft.VisualStudio.Component.Windows81SDK `
+ || IF "%ERRORLEVEL%"=="3010" EXIT 0) `
+ `
+ # Add VS's CMake to the system PATH and cleanup
+ `
+ && setx PATH "%PATH%;%VS_INSTALL_DIRECTORY%\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin" /M `
+ `
+ # Cleanup
+ `
+ && del /q vs_buildtools.exe
+
+ENV VS_DEV_CMD_DIRECTORY="${VS_INSTALL_DIRECTORY}\Common7\Tools"
+
+RUN `
+ # Add VS_DEV_CMD_DIRECTORY to the system PATH
+ `
+ setx PATH "%PATH%;%VS_DEV_CMD_DIRECTORY%" /M
+
+RUN `
+ # Download VulkanSDK
+ `
+ curl -SL --output VulkanSDK-Installer.exe https://sdk.lunarg.com/sdk/download/1.3.268.0/windows/VulkanSDK-1.3.268.0-Installer.exe `
+ `
+ # Install VulkanSDK
+ `
+ && VulkanSDK-Installer.exe install --root "%VULKAN_SDK_INSTALL_DIRECTORY%" --default-answer --accept-licenses --confirm-command `
+ `
+ # Cleanup
+ `
+ && del /q VulkanSDK-Installer.exe
+
+RUN `
+ # Download & install choco packet manager
+ `
+ powershell Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
+
+RUN `
+ # Download & install executable Strawberry Perl
+ `
+ choco install -y strawberryperl --version 5.28.2.1
+
+RUN `
+ # Download & install Python
+ `
+ choco install -y python --version 3.11.6
+
+RUN `
+ # Download & install git
+ `
+ choco install -y git --version 2.43.0
+
+RUN `
+ # Download & install nasm
+ `
+ choco install -y nasm --version 2.16.1
+
+RUN `
+ # Download & install ninja
+ `
+ choco install -y ninja --version 1.12.1
+
+RUN `
+ # Enable Long Paths feature
+ `
+ reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v "LongPathsEnabled" /t REG_DWORD /d 1 /f
+
+RUN `
+ # Force git to use HTTPS protocol & trust containers
+ `
+ git config --system protocol.*.allow always `
+ `
+ && git config --system url."https://github.com/".insteadOf "git@github.com:" `
+ `
+ && git config --system --add safe.directory *
+
+RUN `
+ # Post environment setup
+ `
+ setx VS_INSTALL_DIRECTORY "%VS_INSTALL_DIRECTORY%" /M `
+ `
+ && setx PATH "%PATH%;%VS_INSTALL_DIRECTORY%\VC\Auxiliary\Build" /M `
+ `
+ && setx NBL_CI_MODE "ON"
+
+WORKDIR ${THIS_PROJECT_NABLA_DIRECTORY}
+
+COPY --from=dcr.devsh.eu/nabla/source/git-cache:latest /gitcache/.git ./.git
+
+ENTRYPOINT ["cmd.exe", "/K"]
\ No newline at end of file
diff --git a/docker/README.md b/docker/README.md
deleted file mode 100644
index 417e7cafe1..0000000000
--- a/docker/README.md
+++ /dev/null
@@ -1,147 +0,0 @@
-# Nabla docker CI build pipelines
-
-## Run Nabla build pipelines locally in containers and produce artifacts
-
-Currently only Windows platform with target *x86_64* architecture is supported.
-
-### Requirements
-
-- [***Docker Desktop***](https://www.docker.com/products/docker-desktop/)
-- [***Enabled HyperV if you want to virtualize environment or Windows Pro/Enterprise with minimum 19045 OS build version if you want to run containers with no virtualization as host processes (recommended for much better performance)***](https://docs.docker.com/desktop/install/windows-install/#system-requirements)
-
-### How To
-
-#### Wish to execute the pipelines with isolated virtualized environment or as processes with native performance?
-
-Worth to mention *whenever you launch any **terminal** you execute docker commands with* always grant **administrator privileges** or **[add yourself to docker-users group](https://stackoverflow.com/a/67831886),** it's annoying to do it each time.
-
-##### Hyper-V isolation (slow but production safe)
-
-By default Docker Desktop forces you to use either WSL or Hyper-V so you just need to run Docker Desktop Engine and make sure you are switched to `Windows Containers` mode - if you want to use virtualized environment then you can just skip to next paragraph with volumes.
-
-
-
-##### Process isolation (native performance, less safe)
-
-If you want to run containers without virtualization then you need to go through some steps and execute [Docker Daemon](https://docs.docker.com/config/daemon/) yourself. Process isolation is possible only with Windows Pro or Enterprise edition. Nabla docker pipelines use [Windows Server Core 2022 LTSC](https://hub.docker.com/_/microsoft-windows-servercore) tag images, you can override a base OS image but then you need to [make sure it will work on your machine](https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility?tabs=windows-server-2022%2Cwindows-11). By default Docker Desktop installs the Daemon in `C:\Program Files\Docker\Docker\resources` path and is called `dockerd.exe`. To execute the Daemon with process isolation mode you need to
-
-```bash
-dockerd --exec-opt isolation=process
-```
-
-and ***keep it running when working with containers***. If you see `failed to load listeners: open //./pipe/docker_engine_windows: Access is denied` error then Docker Desktop is most probably already running its own instance of the daemon - you need to kill all of its processes, task manager it is. If there are no issues and the Daemon is running correctly execute
-
-```bash
-docker ps
-```
-
-and check if there are any errors from client side. If there are no issues go to next paragraph with volumes, otherwise most probably your error is related to default `docker_engine_windows` pipe name set by Docker Desktop configuration file - you may need to adjust its name by creating yourown json configuration file with following content
-
-```json
-{
- "experimental": true,
- "hosts": [
- "npipe:////./pipe/docker_engine"
- ]
-}
-```
-
-and passing to the Daemon as argument by
-
-```bash
-dockerd --exec-opt isolation=process --config-file
-```
-
-#### Create volumes shared between containers
-
-Nabla doesn't support *https* clones hence you will need to share your SSH key with the containers. To do so you need to create [docker volume](https://docs.docker.com/storage/volumes/) which stores your SSH key. Nabla compose files expects this volume to be named `ssh`. Create the volume by
-
-```bash
-docker volume create ssh
-```
-
-A volume called `aritfactory.nabla` for Nabla output pipeline artifacts is required too
-
-```bash
-docker volume create aritfactory.nabla
-```
-
-Locate your SSH key, open your terminal and execute
-
-```bash
-type > /id_rsa
-```
-
-to copy your key to `ssh` volume.
-
-#### Build base image with OS setup
-
-```bash
-cd .\docker\platform\windows\compose\ci
-```
-
-and build the base image. If you want to build *with default setup*
-
-```bash
-docker compose build base
-```
-
-you may also want to change *its base* image (or any other available ARG variable)
-
-```bash
-docker compose build --build-arg BASE_IMAGE="mcr.microsoft.com/windows:ltsc2019" base
-```
-
-in case your operating system doesn't meet some requirements for instance due to your distribution build number which is too low - you should override `BASE_IMAGE` build argument.
-
-#### Adjust permissions of your SSH key in `ssh` volume
-
-To make sure there are no issues with the key ownership and permissions, grant them to containers by executing following command
-
-```bash
-docker run --rm -t -i --mount type=volume,src=ssh,dst=C:/Users/ContainerAdministrator/.ssh --mount type=volume,src=nabla,dst=C:/Users/ContainerAdministrator/Nabla artifactory.devsh.eu/nabla/windows/base icacls.exe C:/Users/ContainerAdministrator/.ssh/id_rsa /reset; icacls.exe C:/Users/ContainerAdministrator/.ssh/id_rsa /GRANT:R 'ContainerAdministrator:(R)'; icacls.exe C:/Users/ContainerAdministrator/.ssh/id_rsa /inheritance:r; ssh -T git@github.com
-```
-
-note that this creates intermediate container which terminates itself on finish with mounted `ssh` volume you created before, it grants permissions to the key and also performs ssh request to *github.com* with you key - you should see your nickname with a message about successful authentication.
-
-#### Run an instance container, cache build directories and commit to instance image
-
-Run base container which will clone Nabla, update submodules and configure build directories with static & dynamic library types, you can also specify additional optional `--target-revision ` runtime argument at the end to force the container to clone specified revision or branch - by default `docker` branch is taken and its HEAD commit is cloned.
-
-```bash
-docker compose run -i --name dev.nabla.base.x86_64.windows base
-```
-
-Once everything is built commit your container to an instance image by executing
-
-```bash
-docker commit dev.nabla.base.x86_64.windows artifactory.devsh.eu/nabla/windows/instance:latest
-```
-
-This will create `artifactory.devsh.eu/nabla/windows/instance:latest` image with configured build directories cached and ready to being built by all containers which will use this image.
-
-#### Run the Nabla CI build pipeline
-
-```bash
-cd .\instances
-```
-
-and
-
-```bash
-docker compose up
-```
-
-It will run all services as containers from the previously created instance image executing independently CI pipeline axes and output artifacts from the services to `artifactory.nabla` volume.
-
-### Remote Debugging Container build pipelines
-
-```
-set BUILD_SCRIPT_ARGS="--debug=True"
-```
-
-and `docker compose up` in the *instances* directory. Install [Visual Studio Code](https://code.visualstudio.com/), navigate to `/docker/scripts` directory, open the
-
-directory *with Code*, hit *Run and Debug* and pick the pipeline service configuration you would like to Debug.
-
-
diff --git a/docker/compiler-explorer b/docker/compiler-explorer
new file mode 160000
index 0000000000..e7d3e6ce85
--- /dev/null
+++ b/docker/compiler-explorer
@@ -0,0 +1 @@
+Subproject commit e7d3e6ce85d4b87bd9afadc5b2ba8c268ccbeb51
diff --git a/docker/compose.yml b/docker/compose.yml
new file mode 100644
index 0000000000..b7bbf59f37
--- /dev/null
+++ b/docker/compose.yml
@@ -0,0 +1,33 @@
+services:
+ git-cache-updater:
+ build:
+ context: ./git-cache
+ dockerfile: Dockerfile
+ image: dcr.devsh.eu/nabla/source/git-cache:latest
+ container_name: git.cache.update
+ networks:
+ docker_default:
+ nabla:
+ build:
+ context: .
+ dockerfile: Dockerfile
+ image: dcr.devsh.eu/nabla/source
+ container_name: dev.nabla.build
+ env_file:
+ - .env
+ environment:
+ - THIS_PROJECT_WORKING_DIRECTORY=${THIS_PROJECT_WORKING_DIRECTORY}
+ - THIS_PROJECT_NABLA_DIRECTORY=${THIS_PROJECT_NABLA_DIRECTORY}
+ networks:
+ docker_default:
+ deploy:
+ resources:
+ limits:
+ cpus: '6'
+ memory: 12G
+ depends_on:
+ - git-cache-updater
+
+networks:
+ docker_default:
+ external: true
\ No newline at end of file
diff --git a/docker/compose/Dockerfile b/docker/compose/Dockerfile
deleted file mode 100644
index 60637594b9..0000000000
--- a/docker/compose/Dockerfile
+++ /dev/null
@@ -1,162 +0,0 @@
-# escape=`
-
-ARG BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022
-
-ARG THIS_PROJECT_WORKING_DIRECTORY="C:\docker"
-ARG THIS_PROJECT_NABLA_DIRECTORY="C:/Users/ContainerAdministrator/Nabla/bind"
-ARG VULKAN_SDK_INSTALL_DIRECTORY="${THIS_PROJECT_WORKING_DIRECTORY}\dependencies\VulkanSDK"
-ARG VS_INSTALL_DIRECTORY="${THIS_PROJECT_WORKING_DIRECTORY}\dependencies\VS\BuildTools"
-ARG APACHE_ZOOKEEPER_INSTALL_DIRECTORY="${THIS_PROJECT_WORKING_DIRECTORY}\dependencies\ApacheZooKeeper"
-ARG JAVA_HOME_SCRIPT="${THIS_PROJECT_WORKING_DIRECTORY}\dependencies\scripts\java"
-ARG VS_DEV_CMD_DIRECTORY="${VS_INSTALL_DIRECTORY}\Common7\Tools"
-
-FROM ${BASE_IMAGE}
-
-SHELL ["cmd", "/S", "/C"]
-
-ARG VS_INSTALL_DIRECTORY
-
-RUN `
- # Download the Build Tools bootstrapper.
- `
- curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe `
- `
- # Install Build Tools with the Microsoft.VisualStudio.Workload.VCTools recommended workload and ATL & ATLMFC, excluding some Windows SDKs.
- `
- && (start /w vs_buildtools.exe --quiet --wait --norestart --nocache `
- --installPath "%VS_INSTALL_DIRECTORY%" `
- --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended `
- --add Microsoft.VisualStudio.Component.VC.ATL `
- --add Microsoft.VisualStudio.Component.VC.ATLMFC `
- --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
- --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
- --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
- --remove Microsoft.VisualStudio.Component.Windows81SDK `
- || IF "%ERRORLEVEL%"=="3010" EXIT 0) `
- `
- # add VS's CMake to the system PATH and cleanup
- `
- && setx PATH "%PATH%;%VS_INSTALL_DIRECTORY%\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin" /M `
- `
- # Cleanup
- `
- && del /q vs_buildtools.exe
-
-ARG VULKAN_SDK_INSTALL_DIRECTORY
-
-RUN `
- # Download VulkanSDK
- `
- curl -SL --output VulkanSDK-Installer.exe https://sdk.lunarg.com/sdk/download/1.3.268.0/windows/VulkanSDK-1.3.268.0-Installer.exe `
- `
- # Install VulkanSDK
- `
- && VulkanSDK-Installer.exe install --root "%VULKAN_SDK_INSTALL_DIRECTORY%" --default-answer --accept-licenses --confirm-command `
- `
- # Cleanup
- `
- && del /q VulkanSDK-Installer.exe
-
-RUN `
- # Download & install choco packet manager
- `
- powershell Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
-
-RUN `
- # Download & install executable Strawberry Perl 5.28.2.1
- `
- choco install -y strawberryperl --version 5.28.2.1
-
-RUN `
- # Download & install Python 3.11.7
- `
- choco install -y python --version 3.11.7
-
-RUN `
- # Donwload debugpy Python module
- `
- python -m pip install --upgrade debugpy
-
-RUN `
- # Download & install git 2.43.0
- `
- choco install -y git --version 2.43.0
-
-ARG APACHE_ZOOKEEPER_INSTALL_DIRECTORY
-
-RUN `
- # Download Apache ZooKeeper
- `
- curl -SL --output zookeeper.zip https://dlcdn.apache.org/zookeeper/zookeeper-3.8.3/apache-zookeeper-3.8.3-bin.tar.gz `
- `
- # Create install directory
- `
- && mkdir "%APACHE_ZOOKEEPER_INSTALL_DIRECTORY%" `
- `
- # Unpack
- `
- && tar -xf zookeeper.zip -C "%APACHE_ZOOKEEPER_INSTALL_DIRECTORY%" `
- `
- # Cleanup
- `
- && del /q zookeeper.zip `
- `
- && setx PATH "%PATH%;%APACHE_ZOOKEEPER_INSTALL_DIRECTORY%\apache-zookeeper-3.8.3-bin\bin" /M
-
-RUN `
- # Download kazoo 2.8.0 Python (more recent versions doesn't work well with Windows) module
- `
- python -m pip install kazoo==2.8.0
-
-RUN `
- # Download psutil Python module
- `
- python -m pip install psutil
-
-RUN `
- # Download OpenJDK 11 LTS
- `
- choco install -y openjdk11
-
-RUN `
- # Download & install nasm 2.16.1
- `
- choco install -y nasm --version 2.16.1
-
-RUN `
- # Download & install nano 7.2.36
- `
- choco install -y nano --version 7.2.36
-
-ARG THIS_PROJECT_WORKING_DIRECTORY
-
-RUN `
- setx THIS_PROJECT_WORKING_DIRECTORY "%THIS_PROJECT_WORKING_DIRECTORY%" /M
-
-ARG THIS_PROJECT_NABLA_DIRECTORY
-
-RUN `
- setx THIS_PROJECT_NABLA_DIRECTORY "%THIS_PROJECT_NABLA_DIRECTORY%" /M `
- && setx PATH "%PATH%;%THIS_PROJECT_NABLA_DIRECTORY%/docker/scripts" /M
-
-RUN `
- git config --system --add safe.directory *
-
-ARG JAVA_HOME_SCRIPT
-
-COPY scripts\os\javaHome.py ${JAVA_HOME_SCRIPT}\javaHome.py
-
-RUN `
- py "%JAVA_HOME_SCRIPT%\javaHome.py"
-
-COPY scripts\os\resources\zoo.cfg ${APACHE_ZOOKEEPER_INSTALL_DIRECTORY}\apache-zookeeper-3.8.3-bin\conf\zoo.cfg
-
-ARG VS_DEV_CMD_DIRECTORY
-
-RUN `
- setx PATH "%PATH%;%VS_DEV_CMD_DIRECTORY%" /M
-
-RUN `
- reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v "LongPathsEnabled" /t REG_DWORD /d 1 /f
-
-ENTRYPOINT ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
\ No newline at end of file
diff --git a/docker/compose/ci/stages/.env/platform/windows/.env b/docker/compose/ci/stages/.env/platform/windows/.env
deleted file mode 100644
index b0b0f41a5c..0000000000
--- a/docker/compose/ci/stages/.env/platform/windows/.env
+++ /dev/null
@@ -1,8 +0,0 @@
-THIS_PROJECT_PLATFORM=windows
-THIS_PROJECT_BASE_IMAGE=artifactory.devsh.eu/nabla/${THIS_PROJECT_PLATFORM}/base:latest
-THIS_PROJECT_ARCH=x86_64
-THIS_PROJECT_WORKING_DIRECTORY="C:\docker"
-THIS_PROJECT_ARTIFACTORY_NABLA_DIRECTORY="C:/Users/ContainerAdministrator/Nabla/artifactory"
-THIS_PROJECT_NABLA_DIRECTORY="C:/Users/ContainerAdministrator/Nabla/bind"
-NABLA_TARGET_REVISION="docker"
-THIS_PROJECT_DEBUG=""
\ No newline at end of file
diff --git a/docker/compose/ci/stages/dev/axes/dynamic/debug/compose.yml b/docker/compose/ci/stages/dev/axes/dynamic/debug/compose.yml
deleted file mode 100644
index 1ffbc08ae0..0000000000
--- a/docker/compose/ci/stages/dev/axes/dynamic/debug/compose.yml
+++ /dev/null
@@ -1,81 +0,0 @@
-version: '3'
-
-services:
- nabla.kazoo.server.dynamic.debug:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.kazoo.server.dynamic.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.kazoo.server.dynamic.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "dynamic", "dev.dynamic", "dev.dynamic.debug"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- entrypoint: ["zkServer.cmd"]
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- healthcheck:
- test: ["CMD", "ncpfmp.bat", "nbl.ci.dev.lib.kazoo", "--host", "localhost"]
- interval: 30s
- timeout: 10s
- retries: 3
-
- nabla.cmake.dynamic.debug:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.cmake.dynamic.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.cmake.dynamic.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "dynamic", "dev.dynamic", "dev.dynamic.debug"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- environment:
- - NBL_BUILD_DIR=${THIS_PROJECT_NABLA_DIRECTORY}/build/.docker/${THIS_PROJECT_PLATFORM}/${THIS_PROJECT_ARCH}/dynamic/debug
- networks:
- nabla.network:
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.cmake", "--libType", "dynamic", "--config", "debug"]
-
- nabla.build.dynamic.debug:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.build.dynamic.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.build.dynamic.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "dynamic", "dev.dynamic", "dev.dynamic.debug"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- depends_on:
- nabla.cmake.dynamic.debug:
- condition: service_completed_successfully
- nabla.kazoo.server.dynamic.debug:
- condition: service_healthy
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.build", "--config", "Debug", "--libType", "dynamic"]
-
- nabla.cpack.dynamic.debug:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.cpack.dynamic.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.cpack.dynamic.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "dynamic", "dev.dynamic", "dev.dynamic.debug"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- depends_on:
- nabla.build.dynamic.debug:
- condition: service_completed_successfully
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.cpack", "--libType", "dynamic", "--config", "Debug"]
-
-networks:
- nabla.network:
- external: true
\ No newline at end of file
diff --git a/docker/compose/ci/stages/dev/axes/dynamic/release/compose.yml b/docker/compose/ci/stages/dev/axes/dynamic/release/compose.yml
deleted file mode 100644
index cb902eb970..0000000000
--- a/docker/compose/ci/stages/dev/axes/dynamic/release/compose.yml
+++ /dev/null
@@ -1,79 +0,0 @@
-version: '3'
-
-services:
- nabla.kazoo.server.dynamic.release:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.kazoo.server.dynamic.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.kazoo.server.dynamic.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "dynamic", "dev.dynamic", "dev.dynamic.release"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- entrypoint: ["zkServer.cmd"]
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- healthcheck:
- test: ["CMD", "ncpfmp.bat", "nbl.ci.dev.lib.kazoo", "--host", "localhost"]
- interval: 30s
- timeout: 10s
- retries: 3
-
- nabla.cmake.dynamic.release:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.cmake.dynamic.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.cmake.dynamic.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "dynamic", "dev.dynamic", "dev.dynamic.release"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.cmake", "--libType", "dynamic", "--config", "release"]
-
- nabla.build.dynamic.release:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.build.dynamic.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.build.dynamic.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "dynamic", "dev.dynamic", "dev.dynamic.release"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- depends_on:
- nabla.cmake.dynamic.release:
- condition: service_completed_successfully
- nabla.kazoo.server.dynamic.release:
- condition: service_healthy
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.build", "--config", "Release", "--libType", "dynamic"]
-
- nabla.cpack.dynamic.release:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.cpack.dynamic.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.cpack.dynamic.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "dynamic", "dev.dynamic", "dev.dynamic.release"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- depends_on:
- nabla.build.dynamic.release:
- condition: service_completed_successfully
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.cpack", "--libType", "dynamic", "--config", "Release"]
-
-networks:
- nabla.network:
- external: true
\ No newline at end of file
diff --git a/docker/compose/ci/stages/dev/axes/dynamic/relwithdebinfo/compose.yml b/docker/compose/ci/stages/dev/axes/dynamic/relwithdebinfo/compose.yml
deleted file mode 100644
index f56329507e..0000000000
--- a/docker/compose/ci/stages/dev/axes/dynamic/relwithdebinfo/compose.yml
+++ /dev/null
@@ -1,81 +0,0 @@
-version: '3'
-
-services:
- nabla.kazoo.server.dynamic.relwithdebinfo:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.kazoo.server.dynamic.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.kazoo.server.dynamic.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "dynamic", "dev.dynamic", "dev.dynamic.relwithdebinfo"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- entrypoint: ["zkServer.cmd"]
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- healthcheck:
- test: ["CMD", "ncpfmp.bat", "nbl.ci.dev.lib.kazoo", "--host", "localhost"]
- interval: 30s
- timeout: 10s
- retries: 3
-
- nabla.cmake.dynamic.relwithdebinfo:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.cmake.dynamic.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.cmake.dynamic.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "dynamic", "dev.dynamic", "dev.dynamic.relwithdebinfo"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- environment:
- - NBL_BUILD_DIR=${THIS_PROJECT_NABLA_DIRECTORY}/build/.docker/${THIS_PROJECT_PLATFORM}/${THIS_PROJECT_ARCH}/dynamic/relwithdebinfo
- networks:
- nabla.network:
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.cmake", "--libType", "dynamic", "--config", "relwithdebinfo"]
-
- nabla.build.dynamic.relwithdebinfo:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.build.dynamic.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.build.dynamic.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "dynamic", "dev.dynamic", "dev.dynamic.relwithdebinfo"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- depends_on:
- nabla.cmake.dynamic.relwithdebinfo:
- condition: service_completed_successfully
- nabla.kazoo.server.dynamic.relwithdebinfo:
- condition: service_healthy
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.build", "--config", "RelWithDebInfo", "--libType", "dynamic"]
-
- nabla.cpack.dynamic.relwithdebinfo:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.cpack.dynamic.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.cpack.dynamic.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "dynamic", "dev.dynamic", "dev.dynamic.relwithdebinfo"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- depends_on:
- nabla.build.dynamic.relwithdebinfo:
- condition: service_completed_successfully
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.cpack", "--libType", "dynamic", "--config", "RelWithDebInfo"]
-
-networks:
- nabla.network:
- external: true
\ No newline at end of file
diff --git a/docker/compose/ci/stages/dev/axes/static/debug/compose.yml b/docker/compose/ci/stages/dev/axes/static/debug/compose.yml
deleted file mode 100644
index 48f2fd3800..0000000000
--- a/docker/compose/ci/stages/dev/axes/static/debug/compose.yml
+++ /dev/null
@@ -1,81 +0,0 @@
-version: '3'
-
-services:
- nabla.kazoo.server.static.debug:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.kazoo.server.static.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.kazoo.server.static.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "static", "dev.static", "dev.static.debug"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- entrypoint: ["zkServer.cmd"]
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- healthcheck:
- test: ["CMD", "ncpfmp.bat", "nbl.ci.dev.lib.kazoo", "--host", "localhost"]
- interval: 30s
- timeout: 10s
- retries: 3
-
- nabla.cmake.static.debug:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.cmake.static.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.cmake.static.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "static", "dev.static", "dev.static.debug"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- environment:
- - NBL_BUILD_DIR=${THIS_PROJECT_NABLA_DIRECTORY}/build/.docker/${THIS_PROJECT_PLATFORM}/${THIS_PROJECT_ARCH}/static/debug
- networks:
- nabla.network:
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.cmake", "--libType", "static", "--config", "debug"]
-
- nabla.build.static.debug:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.build.static.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.build.static.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "static", "dev.static", "dev.static.debug"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- depends_on:
- nabla.cmake.static.debug:
- condition: service_completed_successfully
- nabla.kazoo.server.static.debug:
- condition: service_healthy
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.build", "--config", "Debug", "--libType", "static"]
-
- nabla.cpack.static.debug:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.cpack.static.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.cpack.static.debug.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "static", "dev.static", "dev.static.debug"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- depends_on:
- nabla.build.static.debug:
- condition: service_completed_successfully
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.cpack", "--libType", "static", "--config", "Debug"]
-
-networks:
- nabla.network:
- external: true
\ No newline at end of file
diff --git a/docker/compose/ci/stages/dev/axes/static/release/compose.yml b/docker/compose/ci/stages/dev/axes/static/release/compose.yml
deleted file mode 100644
index 0856eb9e43..0000000000
--- a/docker/compose/ci/stages/dev/axes/static/release/compose.yml
+++ /dev/null
@@ -1,79 +0,0 @@
-version: '3'
-
-services:
- nabla.kazoo.server.static.release:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.kazoo.server.static.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.kazoo.server.static.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "static", "dev.static", "dev.static.release"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- entrypoint: ["zkServer.cmd"]
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- healthcheck:
- test: ["CMD", "ncpfmp.bat", "nbl.ci.dev.lib.kazoo", "--host", "localhost"]
- interval: 30s
- timeout: 10s
- retries: 3
-
- nabla.cmake.static.release:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.cmake.static.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.cmake.static.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "static", "dev.static", "dev.static.release"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.cmake", "--libType", "static", "--config", "release"]
-
- nabla.build.static.release:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.build.static.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.build.static.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "static", "dev.static", "dev.static.release"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- depends_on:
- nabla.cmake.static.release:
- condition: service_completed_successfully
- nabla.kazoo.server.static.release:
- condition: service_healthy
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.build", "--config", "Release", "--libType", "static"]
-
- nabla.cpack.static.release:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.cpack.static.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.cpack.static.release.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "static", "dev.static", "dev.static.release"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- depends_on:
- nabla.build.static.release:
- condition: service_completed_successfully
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.cpack", "--libType", "static", "--config", "Release"]
-
-networks:
- nabla.network:
- external: true
\ No newline at end of file
diff --git a/docker/compose/ci/stages/dev/axes/static/relwithdebinfo/compose.yml b/docker/compose/ci/stages/dev/axes/static/relwithdebinfo/compose.yml
deleted file mode 100644
index 792ffb8789..0000000000
--- a/docker/compose/ci/stages/dev/axes/static/relwithdebinfo/compose.yml
+++ /dev/null
@@ -1,81 +0,0 @@
-version: '3'
-
-services:
- nabla.kazoo.server.static.relwithdebinfo:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.kazoo.server.static.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.kazoo.server.static.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "static", "dev.static", "dev.static.relwithdebinfo"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- entrypoint: ["zkServer.cmd"]
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- healthcheck:
- test: ["CMD", "ncpfmp.bat", "nbl.ci.dev.lib.kazoo", "--host", "localhost"]
- interval: 30s
- timeout: 10s
- retries: 3
-
- nabla.cmake.static.relwithdebinfo:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.cmake.static.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.cmake.static.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "static", "dev.static", "dev.static.relwithdebinfo"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- environment:
- - NBL_BUILD_DIR=${THIS_PROJECT_NABLA_DIRECTORY}/build/.docker/${THIS_PROJECT_PLATFORM}/${THIS_PROJECT_ARCH}/static/relwithdebinfo
- networks:
- nabla.network:
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.cmake", "--libType", "static", "--config", "relwithdebinfo"]
-
- nabla.build.static.relwithdebinfo:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.build.static.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.build.static.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "static", "dev.static", "dev.static.relwithdebinfo"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- depends_on:
- nabla.cmake.static.relwithdebinfo:
- condition: service_completed_successfully
- nabla.kazoo.server.static.relwithdebinfo:
- condition: service_healthy
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.build", "--config", "RelWithDebInfo", "--libType", "static"]
-
- nabla.cpack.static.relwithdebinfo:
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.cpack.static.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.cpack.static.relwithdebinfo.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- profiles: ["dev", "static", "dev.static", "dev.static.relwithdebinfo"]
- env_file:
- - ../../../../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- networks:
- nabla.network:
- depends_on:
- nabla.build.static.relwithdebinfo:
- condition: service_completed_successfully
- volumes:
- - type: bind
- source: ../../../../../../../../
- target: ${THIS_PROJECT_NABLA_DIRECTORY}
- entrypoint: ["ncpfmp.bat", "nbl.ci.dev.cpack", "--libType", "static", "--config", "RelWithDebInfo"]
-
-networks:
- nabla.network:
- external: true
\ No newline at end of file
diff --git a/docker/compose/ci/stages/dev/compose.yml b/docker/compose/ci/stages/dev/compose.yml
deleted file mode 100644
index f1d0b64a3d..0000000000
--- a/docker/compose/ci/stages/dev/compose.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-include:
- - path:
- - axes/static/release/compose.yml
- project_directory: axes/static/release
- env_file: ../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- - path:
- - axes/static/relwithdebinfo/compose.yml
- project_directory: axes/static/relwithdebinfo
- env_file: ../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- - path:
- - axes/static/debug/compose.yml
- project_directory: axes/static/debug
- env_file: ../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- - path:
- - axes/dynamic/release/compose.yml
- project_directory: axes/dynamic/release
- env_file: ../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- - path:
- - axes/dynamic/relwithdebinfo/compose.yml
- project_directory: axes/dynamic/relwithdebinfo
- env_file: ../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- - path:
- - axes/dynamic/debug/compose.yml
- project_directory: axes/dynamic/debug
- env_file: ../.env/platform/${THIS_PROJECT_PLATFORM}/.env
-
-services:
- nabla.init:
- build:
- context: ../../../
- args:
- - THIS_PROJECT_NABLA_DIRECTORY=${THIS_PROJECT_NABLA_DIRECTORY}
- env_file:
- - ../.env/platform/${THIS_PROJECT_PLATFORM}/.env
- image: ${THIS_PROJECT_BASE_IMAGE}
- container_name: dev.nabla.init.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- hostname: dev.nabla.init.${THIS_PROJECT_ARCH}.${THIS_PROJECT_PLATFORM}
- networks:
- nabla.network:
\ No newline at end of file
diff --git a/docker/compose/scripts/os/javaHome.py b/docker/compose/scripts/os/javaHome.py
deleted file mode 100644
index 347a72def5..0000000000
--- a/docker/compose/scripts/os/javaHome.py
+++ /dev/null
@@ -1,23 +0,0 @@
-import subprocess, os, re
-
-completedProcess = subprocess.run(
- "java -XshowSettings:properties",
- shell=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- universal_newlines=True,
- check=False
-)
-
-output = completedProcess.stderr.strip()
-regexMatch = re.search(r'java\.home = (.+)', output)
-if regexMatch:
- JAVA_HOME = regexMatch.group(1).strip()
-else:
- JAVA_HOME = ""
-
-if JAVA_HOME:
- os.system(f'setx JAVA_HOME "{JAVA_HOME}" /M')
- print(f'JAVA_HOME has been set to: {JAVA_HOME}')
-else:
- print("Error: Unable to retrieve or set JAVA_HOME.")
\ No newline at end of file
diff --git a/docker/compose/scripts/os/resources/zoo.cfg b/docker/compose/scripts/os/resources/zoo.cfg
deleted file mode 100644
index 9dfefa90e1..0000000000
--- a/docker/compose/scripts/os/resources/zoo.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-tickTime=2000
-initLimit=10
-syncLimit=5
-dataDir=C:/tmp/zookeeper
-clientPort=2181
-maxClientCnxns=500
\ No newline at end of file
diff --git a/docker/dev.py b/docker/dev.py
deleted file mode 100644
index d0ef2187e1..0000000000
--- a/docker/dev.py
+++ /dev/null
@@ -1,62 +0,0 @@
-import os, subprocess, sys, argparse
-
-
-def parseInputArguments():
- parser = argparse.ArgumentParser(description="Nabla CI Pipeline compose Framework script")
-
- parser.add_argument("--platform", help="Target platform", type=str, default="windows")
- parser.add_argument("--arch", help="Target arch", type=str, default="x86_64")
- parser.add_argument('--profiles', nargs='*', default=["dev.dynamic.debug"], help='Target list of profiles to apply')
-
- args = parser.parse_args()
-
- return args
-
-
-def updateSubmodules(root):
- updateSubmoduleScript = os.path.normpath(os.path.join(root, "cmake/submodules/update.cmake"))
- return subprocess.run(f"cmake -P \"{updateSubmoduleScript}\"", check=True)
-
-
-def main():
- try:
- args = parseInputArguments()
-
- root = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../"))
-
- updateSubmodules(root)
-
- os.chdir(os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "compose/ci/stages/dev")))
-
- platform = args.platform
- arch = args.arch
-
- if subprocess.call(["docker", "network", "inspect", "nabla.network"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) != 0:
- subprocess.run(["docker", "network", "create", "--driver", "nat", "--subnet", "172.28.0.0/16", "--gateway", "172.28.5.1", "nabla.network"], check=True) # create nabla.network network if not present
-
- envFile = os.path.abspath(f"../.env/platform/{platform}/.env")
- profiles = (lambda profiles: [item for profile in profiles for item in ["--profile", profile]])(args.profiles)
-
- compose = [
- "docker", "compose",
- "-f", f"./compose.yml",
- "--env-file", envFile
- ] + profiles
-
- subprocess.run(compose + ["build"], check=True)
- subprocess.run(compose + ["config"], check=True)
- subprocess.run(compose + ["create", "--force-recreate"], check=True)
- subprocess.run(compose + ["up"], check=True)
- subprocess.run(compose + ["down"], check=True)
-
- except subprocess.CalledProcessError as e:
- print(f"Subprocess failed with exit code {e.returncode}")
- sys.exit(e.returncode)
-
- except Exception as e:
- print(f"Unexpected error: {e}")
- sys.exit(-1)
-
-
-if __name__ == "__main__":
- main()
diff --git a/docker/git-cache/Dockerfile b/docker/git-cache/Dockerfile
new file mode 100644
index 0000000000..6704869b2a
--- /dev/null
+++ b/docker/git-cache/Dockerfile
@@ -0,0 +1,47 @@
+# escape=`
+
+ARG BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022-amd64
+
+FROM ${BASE_IMAGE}
+
+SHELL ["cmd", "/S", "/C"]
+
+RUN `
+ # Install Chocolatey
+ `
+ powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"
+
+RUN `
+ # Install Git
+ `
+ choco install -y git --version 2.43.0
+
+RUN `
+ # Install CMake
+ `
+ curl -SL --output cmake.zip https://github.com/Kitware/CMake/releases/download/v3.31.0/cmake-3.31.0-windows-x86_64.zip `
+ `
+ && mkdir "./cmake" `
+ `
+ && tar -xf cmake.zip -C "./cmake" `
+ `
+ && del /q cmake.zip
+
+WORKDIR C:\gitcache
+
+RUN `
+ # Post environment setup
+ `
+ git config --system protocol.*.allow always `
+ `
+ && git config --system url."https://github.com/".insteadOf "git@github.com:" `
+ `
+ && git config --system --add safe.directory * `
+ `
+ && setx THIS_PROJECT_GIT_CACHE "C:\gitcache" `
+ `
+ && git init `
+ `
+ && git remote add origin https://github.com/Devsh-Graphics-Programming/Nabla.git
+
+ENTRYPOINT ["cmd.exe", "/K"]
\ No newline at end of file
diff --git a/docker/scripts/__init__.py b/docker/scripts/__init__.py
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/docker/scripts/nbl/ci/dev/.vscode/launch.json b/docker/scripts/nbl/ci/dev/.vscode/launch.json
deleted file mode 100644
index e664be35d1..0000000000
--- a/docker/scripts/nbl/ci/dev/.vscode/launch.json
+++ /dev/null
@@ -1,117 +0,0 @@
-{
- "version": "0.2.0",
- "configurations": [
- {
- "name": "dev.nabla.base.x86_64.windows Container Remote Debug",
- "type": "python",
- "request": "attach",
- "connect": {
- "host": "172.28.5.2",
- "port": 5678
- },
- "pathMappings": [
- {
- "localRoot": "${workspaceFolder}",
- "remoteRoot": "."
- }
- ],
- "justMyCode": true
- },
- {
- "name": "dev.nabla.static.release.x86_64.windows Container Remote Debug",
- "type": "python",
- "request": "attach",
- "connect": {
- "host": "172.28.5.3",
- "port": 5679
- },
- "pathMappings": [
- {
- "localRoot": "${workspaceFolder}",
- "remoteRoot": "."
- }
- ],
- "justMyCode": true
- },
- {
- "name": "dev.nabla.static.relwithdebinfo.x86_64.windows Container Remote Debug",
- "type": "python",
- "request": "attach",
- "connect": {
- "host": "172.28.5.4",
- "port": 5680
- },
- "pathMappings": [
- {
- "localRoot": "${workspaceFolder}",
- "remoteRoot": "."
- }
- ],
- "justMyCode": true
- },
- {
- "name": "dev.nabla.static.debug.x86_64.windows Container Remote Debug",
- "type": "python",
- "request": "attach",
- "connect": {
- "host": "172.28.5.5",
- "port": 5681
- },
- "pathMappings": [
- {
- "localRoot": "${workspaceFolder}",
- "remoteRoot": "."
- }
- ],
- "justMyCode": true
- },
- {
- "name": "dev.nabla.dynamic.release.x86_64.windows Container Remote Debug",
- "type": "python",
- "request": "attach",
- "connect": {
- "host": "172.28.5.6",
- "port": 5682
- },
- "pathMappings": [
- {
- "localRoot": "${workspaceFolder}",
- "remoteRoot": "."
- }
- ],
- "justMyCode": true
- },
- {
- "name": "dev.nabla.dynamic.relwithdebinfo.x86_64.windows Container Remote Debug",
- "type": "python",
- "request": "attach",
- "connect": {
- "host": "172.28.5.7",
- "port": 5683
- },
- "pathMappings": [
- {
- "localRoot": "${workspaceFolder}",
- "remoteRoot": "."
- }
- ],
- "justMyCode": true
- },
- {
- "name": "dev.nabla.dynamic.debug.x86_64.windows Container Remote Debug",
- "type": "python",
- "request": "attach",
- "connect": {
- "host": "172.28.5.8",
- "port": 5684
- },
- "pathMappings": [
- {
- "localRoot": "${workspaceFolder}",
- "remoteRoot": "."
- }
- ],
- "justMyCode": true
- }
- ]
-}
\ No newline at end of file
diff --git a/docker/scripts/nbl/ci/dev/__init__.py b/docker/scripts/nbl/ci/dev/__init__.py
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/docker/scripts/nbl/ci/dev/build.py b/docker/scripts/nbl/ci/dev/build.py
deleted file mode 100644
index b16f9d3a8b..0000000000
--- a/docker/scripts/nbl/ci/dev/build.py
+++ /dev/null
@@ -1,84 +0,0 @@
-import os, subprocess, sys, argparse
-from .lib.kazoo import *
-
-def parseInputArguments():
- parser = argparse.ArgumentParser(description="Nabla CI Pipeline nbl.ci.dev.build Framework Module")
-
- parser.add_argument("--config", help="Target CMake configuration", type=str, default="Release")
- parser.add_argument("--libType", help="Target library type", type=str, default="dynamic")
-
- args = parser.parse_args()
-
- return args
-
-def buildNabla(libType, config):
- return subprocess.run(f"cmake --build --preset ci-build-{libType}-msvc-{config}", check=False)
-
-
-def buildProject(libType, config, buildDirectory):
- return subprocess.run(f"cmake --build \"{buildDirectory}\" --config {config}", check=False)
-
-
-def getCPackBundleHash(buildDirectory, target, component = "ALL", relativeDirectory = "/"):
- return f"{buildDirectory};{target};{component};{relativeDirectory};"
-
-
-def main():
- try:
- THIS_PROJECT_NABLA_DIRECTORY = os.environ.get('THIS_PROJECT_NABLA_DIRECTORY', '')
-
- if not THIS_PROJECT_NABLA_DIRECTORY:
- raise ValueError("THIS_PROJECT_NABLA_DIRECTORY environment variables doesn't exist!")
-
- THIS_PROJECT_PLATFORM = os.environ.get('THIS_PROJECT_PLATFORM', '')
-
- if not THIS_PROJECT_PLATFORM:
- raise ValueError("THIS_PROJECT_PLATFORM environment variables doesn't exist!")
-
- THIS_PROJECT_ARCH = os.environ.get('THIS_PROJECT_ARCH', '')
-
- if not THIS_PROJECT_ARCH:
- raise ValueError("THIS_PROJECT_ARCH environment variables doesn't exist!")
-
- THIS_SERVICE_BINARY_PROJECT_PATH = os.environ.get('THIS_SERVICE_BINARY_PROJECT_PATH', '')
-
- os.chdir(THIS_PROJECT_NABLA_DIRECTORY)
-
- args = parseInputArguments()
-
- config = args.config
- lowerCaseConfig = config.lower()
- libType = args.libType
-
- topBuildDirectory = os.path.normpath(os.path.join(THIS_PROJECT_NABLA_DIRECTORY, f"build/.docker/{THIS_PROJECT_PLATFORM}/{THIS_PROJECT_ARCH}/{libType}/{lowerCaseConfig}"))
- targetBuildDirectory = os.path.normpath(os.path.join(topBuildDirectory, THIS_SERVICE_BINARY_PROJECT_PATH))
-
- if topBuildDirectory == targetBuildDirectory:
- buildNabla(libType, lowerCaseConfig)
- cpackBundleHash = getCPackBundleHash(topBuildDirectory, "Libraries") + getCPackBundleHash(topBuildDirectory, "Runtime")
- else:
- buildProject(libType, config, targetBuildDirectory)
- cpackBundleHash += getCPackBundleHash(targetBuildDirectory, "Executables") + getCPackBundleHash(targetBuildDirectory, "Media")
-
- kazooConnector = KazooConnector(f"dev.nabla.kazoo.server.{libType}.{lowerCaseConfig}.x86_64.{THIS_PROJECT_PLATFORM}") # DNS record as compose service name
- kazooConnector.connect()
-
- zNodePath = f"/CPACK_INSTALL_CMAKE_PROJECTS"
- kazooConnector.createKazooAtomic(zNodePath)
- kazooConnector.appendKazooAtomic(zNodePath, cpackBundleHash)
- print(f"Atomic update performed on {zNodePath} zNode path")
- print(f"cpackBundleHash = {cpackBundleHash}")
-
- kazooConnector.disconnect()
-
- except subprocess.CalledProcessError as e:
- print(f"Subprocess failed with exit code {e.returncode}")
- sys.exit(e.returncode)
-
- except Exception as e:
- print(f"Unexpected error: {e}")
- sys.exit(-1)
-
-
-if __name__ == "__main__":
- main()
diff --git a/docker/scripts/nbl/ci/dev/cmake.py b/docker/scripts/nbl/ci/dev/cmake.py
deleted file mode 100644
index b0ca2b86ed..0000000000
--- a/docker/scripts/nbl/ci/dev/cmake.py
+++ /dev/null
@@ -1,47 +0,0 @@
-import os, subprocess, sys, argparse
-
-def parseInputArguments():
- parser = argparse.ArgumentParser(description="Nabla CI Pipeline nbl.ci.dev.cmake Framework Module")
-
- parser.add_argument("--libType", help="Target library type", type=str, default="dynamic")
- parser.add_argument("--config", help="Target library type", type=str, default="release")
-
- args = parser.parse_args()
-
- return args
-
-def configure(libType, config):
- subprocess.run(f"cmake . --preset ci-configure-{libType}-msvc-{config}", check=True)
-
-def main():
- try:
- THIS_PROJECT_NABLA_DIRECTORY = os.environ.get('THIS_PROJECT_NABLA_DIRECTORY', '')
-
- if not THIS_PROJECT_NABLA_DIRECTORY:
- raise ValueError("THIS_PROJECT_NABLA_DIRECTORY environment variables doesn't exist!")
-
- THIS_PROJECT_ARCH = os.environ.get('THIS_PROJECT_ARCH', '')
-
- if not THIS_PROJECT_ARCH:
- raise ValueError("THIS_PROJECT_ARCH environment variables doesn't exist!")
-
- os.chdir(THIS_PROJECT_NABLA_DIRECTORY)
-
- args = parseInputArguments()
-
- libType = args.libType
- config = args.config
-
- configure(libType, config)
-
- except subprocess.CalledProcessError as e:
- print(f"Subprocess failed with exit code {e.returncode}")
- sys.exit(e.returncode)
-
- except Exception as e:
- print(f"Unexpected error: {e}")
- sys.exit(-1)
-
-
-if __name__ == "__main__":
- main()
diff --git a/docker/scripts/nbl/ci/dev/cpack.py b/docker/scripts/nbl/ci/dev/cpack.py
deleted file mode 100644
index 48a0adf790..0000000000
--- a/docker/scripts/nbl/ci/dev/cpack.py
+++ /dev/null
@@ -1,72 +0,0 @@
-import os, subprocess, argparse
-from .lib.kazoo import *
-
-def parseInputArguments():
- parser = argparse.ArgumentParser(description="Nabla CI Pipeline nbl.ci.dev.cpack Framework Module")
-
- parser.add_argument("--config", help="Target CMake configuration", type=str, default="Release")
- parser.add_argument("--libType", help="Target library type", type=str, default="dynamic")
-
- args = parser.parse_args()
-
- return args
-
-def cpack(libType, config, CPACK_INSTALL_CMAKE_PROJECTS, packageDirectory):
- if not packageDirectory:
- packageDirectory = f"./package/{config}/{libType}"
-
- return subprocess.run(f"cpack --preset ci-package-{libType}-msvc-{config} -B \"{packageDirectory}\" -D CPACK_INSTALL_CMAKE_PROJECTS=\"{CPACK_INSTALL_CMAKE_PROJECTS}\"", check=True)
-
-
-def main():
- try:
- THIS_PROJECT_NABLA_DIRECTORY = os.environ.get('THIS_PROJECT_NABLA_DIRECTORY', '')
-
- if not THIS_PROJECT_NABLA_DIRECTORY:
- raise ValueError("THIS_PROJECT_NABLA_DIRECTORY environment variables doesn't exist!")
-
- THIS_PROJECT_PLATFORM = os.environ.get('THIS_PROJECT_PLATFORM', '')
-
- if not THIS_PROJECT_PLATFORM:
- raise ValueError("THIS_PROJECT_PLATFORM environment variables doesn't exist!")
-
- THIS_PROJECT_ARCH = os.environ.get('THIS_PROJECT_ARCH', '')
-
- if not THIS_PROJECT_ARCH:
- raise ValueError("THIS_PROJECT_ARCH environment variables doesn't exist!")
-
- os.chdir(THIS_PROJECT_NABLA_DIRECTORY)
-
- args = parseInputArguments()
-
- config = args.config
- lowerCaseConfig = config.lower()
- libType = args.libType
-
- kazooConnector = KazooConnector(f"dev.nabla.kazoo.server.{libType}.{lowerCaseConfig}.x86_64.{THIS_PROJECT_PLATFORM}") # DNS record as compose service name
- kazooConnector.connect()
-
- zNodePath = f"/CPACK_INSTALL_CMAKE_PROJECTS"
- cpackBundleHash = kazooConnector.getKazooAtomic(zNodePath)
- print(f"Atomic read performed on {zNodePath} zNode path")
-
- kazooConnector.requestServerShutdown()
- kazooConnector.disconnect()
-
- if cpackBundleHash:
- print(f"CPACK_INSTALL_CMAKE_PROJECTS = {cpackBundleHash}")
- cpack(libType, lowerCaseConfig, cpackBundleHash, f"{THIS_PROJECT_NABLA_DIRECTORY}/build/artifacts/{THIS_PROJECT_PLATFORM}/{THIS_PROJECT_ARCH}/{config}/{libType}")
- else:
- print("CPACK_INSTALL_CMAKE_PROJECTS is empty, skipping cpack...")
-
- except subprocess.CalledProcessError as e:
- print(f"Subprocess failed with exit code {e.returncode}")
- sys.exit(e.returncode)
-
- except Exception as e:
- print(f"Unexpected error: {e}")
- sys.exit(-1)
-
-
-if __name__ == "__main__":
- main()
diff --git a/docker/scripts/nbl/ci/dev/lib/kazoo.py b/docker/scripts/nbl/ci/dev/lib/kazoo.py
deleted file mode 100644
index 47d5b54205..0000000000
--- a/docker/scripts/nbl/ci/dev/lib/kazoo.py
+++ /dev/null
@@ -1,113 +0,0 @@
-import os, subprocess, sys, argparse, kazoo.exceptions, kazoo.client, socket
-
-def getLocalIPV4():
- try:
- s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
- s.connect(('8.8.8.8', 80))
- local_ipv4 = s.getsockname()[0] # Get the local IPv4 address
- s.close()
-
- return local_ipv4
- except socket.error:
- return None
-
-
-def resolveServiceToIPv4(serviceName):
- try:
- ipv4Address = socket.gethostbyname(serviceName)
- return ipv4Address
- except socket.gaierror as e:
- print(f"Error while resolving {serviceName} to an IPv4 address: {e}")
- return None
-
-
-class KazooConnector:
- def __init__(self, dnsServiceName):
- self.dnsServiceName = dnsServiceName
- self.host = resolveServiceToIPv4(self.dnsServiceName)
- self.zk = kazoo.client.KazooClient(hosts=self.dnsServiceName)
-
- def connect(self):
- self.zk.start()
- print(f"Connected to {self.dnsServiceName} kazoo host")
-
- def disconnect(self):
- self.zk.stop()
- self.zk.close()
- print(f"Disconnected from {self.dnsServiceName} kazoo host")
-
- def requestServerShutdown(self):
- self.createKazooAtomic("/sdRequest")
- print(f"Requested shutdown of {self.dnsServiceName} kazoo host")
-
- def createKazooAtomic(self, zNodePath):
- if not self.zk.exists(zNodePath):
- self.zk.create(zNodePath, b"")
-
- def getKazooAtomic(self, zNodePath):
- if self.zk.exists(zNodePath):
- data, _ = self.zk.get(zNodePath)
- return data.decode()
- else:
- return ""
-
- def appendKazooAtomic(self, zNodePath, data):
- while True:
- try:
- currentData, stat = self.zk.get(zNodePath)
- newData = currentData.decode() + data
- self.zk.set(zNodePath, newData.encode(), version=stat.version)
- break
- except kazoo.exceptions.BadVersionException:
- pass
-
-
-def shutdownOs():
- if os.name == 'nt' or os.name == 'java': # For windows and java (in the rare case of running jython)
- return os.system('shutdown /s /f 0')
- elif os.name == 'posix': # For Unix, Linux, Mac
- return os.system('shutdown -h now')
- else:
- print('Unknown operating system') # Docs for os.name listed only the above three cases
- return 1
-
-
-def healthyCheck(host):
- try:
- with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
- ipv4 = host
-
- if host == "localhost" or host == "127.0.0.1":
- ipv4 = getLocalIPV4()
-
- s.settimeout(5)
- s.connect((ipv4, 2181))
-
- print(f"Connected to {ipv4} kazoo host")
-
- # TODO: find lib which does nice shutdown cross platform
- sdProcess = subprocess.run("zkCli.cmd get /sdRequest", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
- shutdown = not sdProcess.stderr.strip()
-
- if shutdown:
- print("Requested shutdown...")
-
- if shutdownOs() != 0:
- print(f"Could not shutdown container")
-
- return True
- except (socket.error, socket.timeout):
- print(f"Excpetion caught while trying to connect to kazoo host: \"{socket.error}\"")
- return False
-
-if __name__ == "__main__":
- parser = argparse.ArgumentParser(description="Nabla CI Pipeline nbl.ci.dev.kazoo Framework Module")
-
- parser.add_argument("--host", help="Kazoo Server host", type=str, default="localhost")
-
- args = parser.parse_args()
-
- if healthyCheck(args.host):
- sys.exit(0) # healthy
- else:
- sys.exit(1) # not healthy
diff --git a/docker/scripts/ncpfmp.bat b/docker/scripts/ncpfmp.bat
deleted file mode 100644
index ce13fa7ebd..0000000000
--- a/docker/scripts/ncpfmp.bat
+++ /dev/null
@@ -1,13 +0,0 @@
-:: Nabla CI Pipeline Framework Module proxy
-
-@echo off
-@setlocal
-
-:: Get the directory where this platform proxy script is located
-set scriptDirectory=%~dp0
-
-:: Change the current working directory to the cross-platform Python build script
-cd /d "%scriptDirectory%"
-
-:: Execute implementation of the pipeline build script in Python
-python -m %*
\ No newline at end of file
diff --git a/docker/update.cmd b/docker/update.cmd
new file mode 100644
index 0000000000..6d08e0455b
--- /dev/null
+++ b/docker/update.cmd
@@ -0,0 +1,80 @@
+@echo off
+REM Set cache image reference
+set IMAGE_NAME=dcr.devsh.eu/nabla/source/git-cache:latest
+
+REM Start the git-cache-updater container in detached mode and capture the container ID
+set CONTAINER_ID=
+for /f "delims=" %%i in ('docker-compose run --remove-orphans -d git-cache-updater') do set CONTAINER_ID=%%i
+
+REM Check if the container started successfully
+if "%CONTAINER_ID%"=="" (
+ echo Failed to start the git-cache-updater container.
+ exit /b 1
+)
+
+echo Started container with ID %CONTAINER_ID%
+
+REM Fetch master commits
+docker exec -i -t %CONTAINER_ID% git fetch origin master
+if %errorlevel% neq 0 (
+ echo "Error: git fetch failed"
+ docker stop %CONTAINER_ID%
+ exit /b %errorlevel%
+)
+
+REM Checkout master. TODO: since it happens at runtime I could loop over /remotes' CURRENT branches and track all history
+docker exec -i -t %CONTAINER_ID% git checkout master -f
+if %errorlevel% neq 0 (
+ echo "Error: git checkout failed"
+ docker stop %CONTAINER_ID%
+ exit /b %errorlevel%
+)
+
+REM Update & checkout submodules with CMake
+docker exec -i -t %CONTAINER_ID% "C:\cmake\cmake-3.31.0-windows-x86_64\bin\cmake" -P cmake\submodules\update.cmake
+if %errorlevel% neq 0 (
+ echo "Error: CMake submodule update failed"
+ docker stop %CONTAINER_ID%
+ exit /b %errorlevel%
+)
+
+docker exec -i -t %CONTAINER_ID% cmd /C "for /d %%i in (*) do if /i not %%i==.git rmdir /s /q %%i"
+
+if %errorlevel% neq 0 (
+ echo "Error: failed to clean up files"
+ docker stop %CONTAINER_ID%
+ exit /b %errorlevel%
+)
+
+docker exec -i -t %CONTAINER_ID% cmd /C "for %%i in (*) do if /i not %%i==.git del /q %%i"
+
+if %errorlevel% neq 0 (
+ echo "Error: failed to clean up files"
+ docker stop %CONTAINER_ID%
+ exit /b %errorlevel%
+)
+
+REM Stop the container before committing
+docker stop %CONTAINER_ID%
+if %errorlevel% neq 0 (
+ echo "Error: failed to stop container"
+ exit /b %errorlevel%
+)
+
+REM Commit the updated container as a new image
+docker commit %CONTAINER_ID% %IMAGE_NAME%
+if %errorlevel% neq 0 (
+ echo "Error: failed to commit the container"
+ exit /b %errorlevel%
+)
+
+echo Git cache updated and committed as %IMAGE_NAME%.
+
+REM Remove the update container
+docker rm %CONTAINER_ID%
+if %errorlevel% neq 0 (
+ echo "Error: failed to remove the update container"
+ exit /b %errorlevel%
+)
+
+echo Removed %CONTAINER_ID% update container.
\ No newline at end of file
diff --git a/include/nbl/asset/ICPUBuffer.h b/include/nbl/asset/ICPUBuffer.h
index 6206127b6c..5bb16bd0ac 100644
--- a/include/nbl/asset/ICPUBuffer.h
+++ b/include/nbl/asset/ICPUBuffer.h
@@ -27,10 +27,9 @@ class ICPUBuffer final : public asset::IBuffer, public IPreHashed
public:
struct SCreationParams : asset::IBuffer::SCreationParams
{
- size_t size;
void* data = nullptr;
- size_t alignment = _NBL_SIMD_ALIGNMENT;
core::smart_refctd_ptr memoryResource = nullptr;
+ size_t alignment = _NBL_SIMD_ALIGNMENT;
SCreationParams& operator =(const asset::IBuffer::SCreationParams& rhs)
{
@@ -67,7 +66,7 @@ class ICPUBuffer final : public asset::IBuffer, public IPreHashed
core::smart_refctd_ptr clone(uint32_t = ~0u) const override final
{
- auto cp = create({ .size = m_creationParams.size, .data = m_data, .alignment = m_alignment });
+ auto cp = create({ { m_creationParams.size }, m_data, nullptr, m_alignment });
memcpy(cp->getPointer(), m_data, m_creationParams.size);
cp->setContentHash(getContentHash());
return cp;
diff --git a/include/nbl/asset/ICPUSampler.h b/include/nbl/asset/ICPUSampler.h
index 1c76ab1950..27a918afaa 100644
--- a/include/nbl/asset/ICPUSampler.h
+++ b/include/nbl/asset/ICPUSampler.h
@@ -37,16 +37,16 @@ class ICPUSampler : public ISampler, public IAsset
};
switch (wrapModes[i])
{
- case ISampler::ETC_REPEAT:
+ case ISampler::E_TEXTURE_CLAMP::ETC_REPEAT:
repeat();
break;
- case ISampler::ETC_CLAMP_TO_EDGE:
- texelCoord[i] = core::clamp(texelCoord[i],0,mipLastCoord[i]);
+ case ISampler::E_TEXTURE_CLAMP::ETC_CLAMP_TO_EDGE:
+ texelCoord[i] = core::clamp(texelCoord[i], 0, mipLastCoord[i]);
break;
- case ISampler::ETC_MIRROR_CLAMP_TO_EDGE:
- texelCoord[i] = core::clamp(texelCoord[i],-int32_t(mipExtent[i]),mipExtent[i]+mipLastCoord[i]);
+ case ISampler::E_TEXTURE_CLAMP::ETC_MIRROR_CLAMP_TO_EDGE:
+ texelCoord[i] = core::clamp(texelCoord[i], -int32_t(mipExtent[i]), mipExtent[i] + mipLastCoord[i]);
[[fallthrough]];
- case ISampler::ETC_MIRROR:
+ case ISampler::E_TEXTURE_CLAMP::ETC_MIRROR:
{
int32_t repeatID = (originalWasNegative+texelCoord[i])/int32_t(mipExtent[i]);
repeat();
diff --git a/include/nbl/asset/ICPUShader.h b/include/nbl/asset/ICPUShader.h
index b304155b0c..ae8758d44f 100644
--- a/include/nbl/asset/ICPUShader.h
+++ b/include/nbl/asset/ICPUShader.h
@@ -33,7 +33,7 @@ class ICPUShader : public IAsset, public IShader
: IShader(stage, std::move(filepathHint)), m_code(std::move(code)), m_contentType(contentType) {}
ICPUShader(const char* code, const E_SHADER_STAGE stage, const E_CONTENT_TYPE contentType, std::string&& filepathHint)
- : ICPUShader(ICPUBuffer::create({ .size = strlen(code) + 1u }), stage, contentType, std::move(filepathHint))
+ : ICPUShader(ICPUBuffer::create({ strlen(code) + 1u }), stage, contentType, std::move(filepathHint))
{
assert(contentType != E_CONTENT_TYPE::ECT_SPIRV); // because using strlen needs `code` to be null-terminated
memcpy(m_code->getPointer(), code, m_code->getSize());
diff --git a/include/nbl/asset/IDescriptorSetLayout.h b/include/nbl/asset/IDescriptorSetLayout.h
index 34e7d2ccc4..44e8be71ea 100644
--- a/include/nbl/asset/IDescriptorSetLayout.h
+++ b/include/nbl/asset/IDescriptorSetLayout.h
@@ -330,7 +330,7 @@ class IDescriptorSetLayout : public IDescriptorSetLayoutBase
bindings[i].binding = i;
bindings[i].type = type;
bindings[i].createFlags = SBinding::E_CREATE_FLAGS::ECF_NONE;
- bindings[i].stageFlags = stageAccessFlags ? stageAccessFlags[i]:asset::IShader::ESS_ALL;
+ bindings[i].stageFlags = stageAccessFlags ? stageAccessFlags[i]:asset::IShader::ESS_ALL_OR_LIBRARY;
bindings[i].count = counts ? counts[i]:1u;
bindings[i].samplers = nullptr;
}
diff --git a/include/nbl/asset/IRenderpass.h b/include/nbl/asset/IRenderpass.h
index 7595911716..30be5c99e7 100644
--- a/include/nbl/asset/IRenderpass.h
+++ b/include/nbl/asset/IRenderpass.h
@@ -165,11 +165,11 @@ class NBL_API2 IRenderpass
{
enum RESOLVE_MODE : uint8_t
{
- NONE = nbl::hlsl::ResolveModeFlags::NONE,
- SAMPLE_ZERO_BIT = nbl::hlsl::ResolveModeFlags::SAMPLE_ZERO_BIT,
- AVERAGE_BIT = nbl::hlsl::ResolveModeFlags::AVERAGE_BIT,
- MIN_BIT = nbl::hlsl::ResolveModeFlags::MIN_BIT,
- MAX_BIT = nbl::hlsl::ResolveModeFlags::MAX_BIT
+ NONE = hlsl::ResolveModeFlags::NONE,
+ SAMPLE_ZERO_BIT = hlsl::ResolveModeFlags::SAMPLE_ZERO_BIT,
+ AVERAGE_BIT = hlsl::ResolveModeFlags::AVERAGE_BIT,
+ MIN_BIT = hlsl::ResolveModeFlags::MIN_BIT,
+ MAX_BIT = hlsl::ResolveModeFlags::MAX_BIT
};
struct ResolveMode
{
diff --git a/include/nbl/asset/ISampler.h b/include/nbl/asset/ISampler.h
index c9f7aa9834..b691808860 100644
--- a/include/nbl/asset/ISampler.h
+++ b/include/nbl/asset/ISampler.h
@@ -6,6 +6,7 @@
#define __NBL_ASSET_I_SAMPLER_H_INCLUDED__
#include "nbl/asset/IDescriptor.h"
+#include "nbl/builtin/hlsl/enums.hlsl"
namespace nbl
{
@@ -16,23 +17,7 @@ class ISampler : public IDescriptor
{
public:
//! Texture coord clamp mode outside [0.0, 1.0]
- enum E_TEXTURE_CLAMP
- {
- //! Texture repeats
- ETC_REPEAT = 0,
- //! Texture is clamped to the edge pixel
- ETC_CLAMP_TO_EDGE,
- //! Texture is clamped to the border pixel (if exists)
- ETC_CLAMP_TO_BORDER,
- //! Texture is alternatingly mirrored (0..1..0..1..0..)
- ETC_MIRROR,
- //! Texture is mirrored once and then clamped to edge
- ETC_MIRROR_CLAMP_TO_EDGE,
- //! Texture is mirrored once and then clamped to border
- ETC_MIRROR_CLAMP_TO_BORDER,
-
- ETC_COUNT
- };
+ using E_TEXTURE_CLAMP = hlsl::TextureClamp;
enum E_TEXTURE_BORDER_COLOR
{
@@ -75,11 +60,11 @@ class ISampler : public IDescriptor
{
struct {
//! Valeus taken from E_TEXTURE_CLAMP
- uint32_t TextureWrapU : 3 = ETC_REPEAT;
+ uint32_t TextureWrapU : 3 = E_TEXTURE_CLAMP::ETC_REPEAT;
//! Valeus taken from E_TEXTURE_CLAMP
- uint32_t TextureWrapV : 3 = ETC_REPEAT;
+ uint32_t TextureWrapV : 3 = E_TEXTURE_CLAMP::ETC_REPEAT;
//! Valeus taken from E_TEXTURE_CLAMP
- uint32_t TextureWrapW : 3 = ETC_REPEAT;
+ uint32_t TextureWrapW : 3 = E_TEXTURE_CLAMP::ETC_REPEAT;
//! Values taken from E_TEXTURE_BORDER_COLOR
uint32_t BorderColor : 3 = ETBC_FLOAT_OPAQUE_BLACK;
//! Values taken from E_TEXTURE_FILTER
diff --git a/include/nbl/asset/filters/CBlitImageFilter.h b/include/nbl/asset/filters/CBlitImageFilter.h
index 28dd60f63a..1dbc7809ba 100644
--- a/include/nbl/asset/filters/CBlitImageFilter.h
+++ b/include/nbl/asset/filters/CBlitImageFilter.h
@@ -34,7 +34,7 @@ class CBlitImageFilterBase : public impl::CSwizzleableAndDitherableFilterBaseaxisWraps[i]>=ISampler::ETC_COUNT)
+ if (state->axisWraps[i]>=ISampler::E_TEXTURE_CLAMP::ETC_COUNT)
return false;
if (state->borderColor>=ISampler::ETBC_COUNT)
diff --git a/include/nbl/asset/filters/CFlattenRegionsImageFilter.h b/include/nbl/asset/filters/CFlattenRegionsImageFilter.h
index 832c5629c5..0eeba246e2 100644
--- a/include/nbl/asset/filters/CFlattenRegionsImageFilter.h
+++ b/include/nbl/asset/filters/CFlattenRegionsImageFilter.h
@@ -89,7 +89,7 @@ class CFlattenRegionsImageFilter : public CImageFilteroutImage->setBufferAndRegions(std::move(buffer),std::move(regions));
};
diff --git a/include/nbl/asset/filters/CPaddedCopyImageFilter.h b/include/nbl/asset/filters/CPaddedCopyImageFilter.h
index 2f2e82c5dd..3c93927508 100644
--- a/include/nbl/asset/filters/CPaddedCopyImageFilter.h
+++ b/include/nbl/asset/filters/CPaddedCopyImageFilter.h
@@ -30,7 +30,7 @@ class CPaddedCopyImageFilter : public CImageFilter, publ
virtual ~CState() {}
_NBL_STATIC_INLINE_CONSTEXPR auto NumWrapAxes = 3;
- ISampler::E_TEXTURE_CLAMP axisWraps[NumWrapAxes] = {ISampler::ETC_REPEAT,ISampler::ETC_REPEAT,ISampler::ETC_REPEAT};
+ ISampler::E_TEXTURE_CLAMP axisWraps[NumWrapAxes] = {ISampler::E_TEXTURE_CLAMP::ETC_REPEAT,ISampler::E_TEXTURE_CLAMP::ETC_REPEAT,ISampler::E_TEXTURE_CLAMP::ETC_REPEAT};
ISampler::E_TEXTURE_BORDER_COLOR borderColor;
VkOffset3D relativeOffset;
VkExtent3D paddedExtent;
@@ -57,7 +57,7 @@ class CPaddedCopyImageFilter : public CImageFilter, publ
// TODO: eventually remove when we can encode blocks
for (auto i=0; iaxisWraps[i]!=ISampler::ETC_REPEAT)
+ if ((isBlockCompressionFormat(inFormat)||isBlockCompressionFormat(outFormat))&&state->axisWraps[i]!=ISampler::E_TEXTURE_CLAMP::ETC_REPEAT)
return false;
}
diff --git a/include/nbl/asset/filters/dithering/CPrecomputedDither.h b/include/nbl/asset/filters/dithering/CPrecomputedDither.h
index 36ff4f0b39..eb1c4627ca 100644
--- a/include/nbl/asset/filters/dithering/CPrecomputedDither.h
+++ b/include/nbl/asset/filters/dithering/CPrecomputedDither.h
@@ -58,7 +58,7 @@ namespace nbl
const size_t newDecodeBufferSize = extent.x * extent.y * extent.z * creationParams.arrayLayers * decodeTexelByteSize;
const core::vector3du32_SIMD decodeBufferByteStrides = TexelBlockInfo(decodeFormat).convert3DTexelStridesTo1DByteStrides(core::vector3du32_SIMD(extent.x, extent.y, extent.z));
- auto decodeFlattenBuffer = ICPUBuffer::create({ .size = newDecodeBufferSize });
+ auto decodeFlattenBuffer = ICPUBuffer::create({ newDecodeBufferSize });
decodeFlattenBuffer->setContentHash(IPreHashed::INVALID_HASH);
auto* inData = reinterpret_cast(flattenDitheringImage->getBuffer()->getPointer());
diff --git a/include/nbl/asset/interchange/IImageAssetHandlerBase.h b/include/nbl/asset/interchange/IImageAssetHandlerBase.h
index bbbf373908..b39ae2a8be 100644
--- a/include/nbl/asset/interchange/IImageAssetHandlerBase.h
+++ b/include/nbl/asset/interchange/IImageAssetHandlerBase.h
@@ -110,7 +110,7 @@ class IImageAssetHandlerBase : public virtual core::IReferenceCounted
bufferSize += memsize.getIntegerApprox();
}
- auto texelBuffer = ICPUBuffer::create({ .size = bufferSize });
+ auto texelBuffer = ICPUBuffer::create({ bufferSize });
newImage->setBufferAndRegions(std::move(texelBuffer), newRegions);
newImage->setContentHash(IPreHashed::INVALID_HASH);
}
diff --git a/include/nbl/asset/utils/CCompilerSet.h b/include/nbl/asset/utils/CCompilerSet.h
index 0b65db6b4e..3e5fd0d6ce 100644
--- a/include/nbl/asset/utils/CCompilerSet.h
+++ b/include/nbl/asset/utils/CCompilerSet.h
@@ -33,6 +33,8 @@ namespace nbl::asset
#ifdef _NBL_PLATFORM_WINDOWS_
return m_HLSLCompiler;
+#else
+ return nullptr;
#endif
}
else if (contentType == IShader::E_CONTENT_TYPE::ECT_GLSL)
diff --git a/include/nbl/asset/utils/CDirQuantCacheBase.h b/include/nbl/asset/utils/CDirQuantCacheBase.h
index 45cb920dc8..4057e3e4d9 100644
--- a/include/nbl/asset/utils/CDirQuantCacheBase.h
+++ b/include/nbl/asset/utils/CDirQuantCacheBase.h
@@ -297,7 +297,7 @@ class CDirQuantCacheBase : public impl::CDirQuantCacheBase
if (!file)
return false;
- auto buffer = asset::ICPUBuffer::create({ .size = file->getSize() });
+ auto buffer = asset::ICPUBuffer::create({ file->getSize() });
system::IFile::success_t succ;
file->read(succ, buffer->getPointer(), 0, file->getSize());
@@ -346,7 +346,7 @@ class CDirQuantCacheBase : public impl::CDirQuantCacheBase
asset::SBufferRange bufferRange;
bufferRange.offset = 0;
bufferRange.size = getSerializedCacheSizeInBytes();
- bufferRange.buffer = asset::ICPUBuffer::create({ .size = bufferRange.size });
+ bufferRange.buffer = asset::ICPUBuffer::create({ bufferRange.size });
saveCacheToBuffer(bufferRange);
diff --git a/include/nbl/asset/utils/CHLSLCompiler.h b/include/nbl/asset/utils/CHLSLCompiler.h
index 2e2ad1729f..1fca392c90 100644
--- a/include/nbl/asset/utils/CHLSLCompiler.h
+++ b/include/nbl/asset/utils/CHLSLCompiler.h
@@ -146,7 +146,6 @@ class NBL_API2 CHLSLCompiler final : public IShaderCompiler
L"-Wno-c++1z-extensions",
L"-Wno-c++14-extensions",
L"-Wno-gnu-static-float-init",
- L"-fspv-target-env=vulkan1.3",
L"-HV", L"202x"
});
};
diff --git a/include/nbl/asset/utils/IMeshManipulator.h b/include/nbl/asset/utils/IMeshManipulator.h
index c4c3d1ef59..f84d85c75d 100644
--- a/include/nbl/asset/utils/IMeshManipulator.h
+++ b/include/nbl/asset/utils/IMeshManipulator.h
@@ -557,7 +557,7 @@ class NBL_API2 IMeshManipulator : public virtual core::IReferenceCounted
core::smart_refctd_ptr iotaUint32Buffer;
if (iotaLength)
{
- iotaUint32Buffer = ICPUBuffer::create({ .size = sizeof(uint32_t)*iotaLength });
+ iotaUint32Buffer = ICPUBuffer::create({ sizeof(uint32_t)*iotaLength });
auto ptr = reinterpret_cast(iotaUint32Buffer->getPointer());
std::iota(ptr,ptr+iotaLength,0u);
}
@@ -599,13 +599,13 @@ class NBL_API2 IMeshManipulator : public virtual core::IReferenceCounted
if (indexType==EIT_16BIT)
{
auto inPtr = reinterpret_cast(correctlyOffsetIndexBufferPtr);
- newIndexBuffer = ICPUBuffer::create({ .size = sizeof(uint32_t)*indexCount });
+ newIndexBuffer = ICPUBuffer::create({ sizeof(uint32_t)*indexCount });
std::copy(inPtr,inPtr+indexCount,reinterpret_cast(newIndexBuffer->getPointer()));
}
else
{
auto inPtr = reinterpret_cast(correctlyOffsetIndexBufferPtr);
- newIndexBuffer = ICPUBuffer::create({ .size = sizeof(uint16_t)*indexCount });
+ newIndexBuffer = ICPUBuffer::create({ sizeof(uint16_t)*indexCount });
std::copy(inPtr,inPtr+indexCount,reinterpret_cast(newIndexBuffer->getPointer()));
}
}
diff --git a/include/nbl/asset/utils/IShaderCompiler.h b/include/nbl/asset/utils/IShaderCompiler.h
index f9c94569cc..447a1ed416 100644
--- a/include/nbl/asset/utils/IShaderCompiler.h
+++ b/include/nbl/asset/utils/IShaderCompiler.h
@@ -369,7 +369,7 @@ class NBL_API2 IShaderCompiler : public core::IReferenceCounted
// Used for late initialization while looking up a cache, so as not to always initialize an entry even if caching was not requested
inline SEntry& operator=(SEntry&& other) = default;
- bool setContent(const asset::ICPUBuffer* uncompressedSpirvBuffer, dependency_container_t&& dependencies);
+ bool setContent(const asset::ICPUBuffer* uncompressedSpirvBuffer);
core::smart_refctd_ptr decompressShader() const;
@@ -526,7 +526,7 @@ class NBL_API2 IShaderCompiler : public core::IReferenceCounted
constexpr size_t nullTerminatorSize = 1u;
size_t outSize = origLen + formatArgsCharSize + formatSize + nullTerminatorSize - 2 * templateArgsCount;
- nbl::core::smart_refctd_ptr outBuffer = ICPUBuffer::create({ .size = outSize });
+ nbl::core::smart_refctd_ptr outBuffer = ICPUBuffer::create({ outSize });
auto origCode = std::string_view(reinterpret_cast(original->getContent()->getPointer()), origLen);
auto outCode = reinterpret_cast(outBuffer->getPointer());
diff --git a/include/nbl/builtin/hlsl/algorithm.hlsl b/include/nbl/builtin/hlsl/algorithm.hlsl
index 757105081b..3a7c4963c2 100644
--- a/include/nbl/builtin/hlsl/algorithm.hlsl
+++ b/include/nbl/builtin/hlsl/algorithm.hlsl
@@ -11,6 +11,84 @@ namespace nbl
namespace hlsl
{
+namespace impl
+{
+#ifdef __HLSL_VERSION
+
+ // TODO: use structs
+
+ template
+ NBL_CONSTEXPR_INLINE_FUNC void swap(NBL_REF_ARG(T) lhs, NBL_REF_ARG(T) rhs)
+ {
+ T tmp = lhs;
+ lhs = rhs;
+ rhs = tmp;
+ }
+
+ template<>
+ NBL_CONSTEXPR_INLINE_FUNC void swap(NBL_REF_ARG(uint16_t) lhs, NBL_REF_ARG(uint16_t) rhs)
+ {
+ lhs ^= rhs;
+ rhs ^= lhs;
+ lhs ^= rhs;
+ }
+
+ template<>
+ NBL_CONSTEXPR_INLINE_FUNC void swap(NBL_REF_ARG(uint32_t) lhs, NBL_REF_ARG(uint32_t) rhs)
+ {
+ lhs ^= rhs;
+ rhs ^= lhs;
+ lhs ^= rhs;
+ }
+
+ template<>
+ NBL_CONSTEXPR_INLINE_FUNC void swap(NBL_REF_ARG(uint64_t) lhs, NBL_REF_ARG(uint64_t) rhs)
+ {
+ lhs ^= rhs;
+ rhs ^= lhs;
+ lhs ^= rhs;
+ }
+
+ template<>
+ NBL_CONSTEXPR_INLINE_FUNC void swap(NBL_REF_ARG(int16_t) lhs, NBL_REF_ARG(int16_t) rhs)
+ {
+ lhs ^= rhs;
+ rhs ^= lhs;
+ lhs ^= rhs;
+ }
+
+ template<>
+ NBL_CONSTEXPR_INLINE_FUNC void swap(NBL_REF_ARG(int32_t) lhs, NBL_REF_ARG(int32_t) rhs)
+ {
+ lhs ^= rhs;
+ rhs ^= lhs;
+ lhs ^= rhs;
+ }
+
+ template<>
+ NBL_CONSTEXPR_INLINE_FUNC void swap(NBL_REF_ARG(int64_t) lhs, NBL_REF_ARG(int64_t) rhs)
+ {
+ lhs ^= rhs;
+ rhs ^= lhs;
+ lhs ^= rhs;
+ }
+#else
+ template
+ NBL_CONSTEXPR_INLINE_FUNC void swap(NBL_REF_ARG(T) lhs, NBL_REF_ARG(T) rhs)
+ {
+ std::swap(lhs, rhs);
+ }
+#endif
+}
+
+template
+NBL_CONSTEXPR_INLINE_FUNC void swap(NBL_REF_ARG(T) lhs, NBL_REF_ARG(T) rhs)
+{
+ impl::swap(lhs, rhs);
+}
+
+
+#ifdef __HLSL_VERSION
namespace impl
{
@@ -35,7 +113,7 @@ struct bound_t
}
- uint operator()(inout Accessor accessor)
+ uint operator()(NBL_REF_ARG(Accessor) accessor)
{
if (isNPoT(len))
{
@@ -54,19 +132,19 @@ struct bound_t
return it;
}
- void iteration(inout Accessor accessor)
+ void iteration(NBL_REF_ARG(Accessor) accessor)
{
len >>= 1;
const uint mid = it+len;
comp_step(accessor,mid);
}
- void comp_step(inout Accessor accessor, const uint testPoint, const uint rightBegin)
+ void comp_step(NBL_REF_ARG(Accessor) accessor, const uint testPoint, const uint rightBegin)
{
if (comp(accessor[testPoint],value))
it = rightBegin;
}
- void comp_step(inout Accessor accessor, const uint testPoint)
+ void comp_step(NBL_REF_ARG(Accessor) accessor, const uint testPoint)
{
comp_step(accessor,testPoint,testPoint);
}
@@ -92,14 +170,14 @@ struct lower_to_upper_comparator_transform_t
template
-uint lower_bound(inout Accessor accessor, const uint begin, const uint end, const typename Accessor::value_type value, const Comparator comp)
+uint lower_bound(NBL_REF_ARG(Accessor) accessor, const uint begin, const uint end, const typename Accessor::value_type value, const Comparator comp)
{
impl::bound_t implementation = impl::bound_t::setup(begin,end,value,comp);
return implementation(accessor);
}
template
-uint upper_bound(inout Accessor accessor, const uint begin, const uint end, const typename Accessor::value_type value, const Comparator comp)
+uint upper_bound(NBL_REF_ARG(Accessor) accessor, const uint begin, const uint end, const typename Accessor::value_type value, const Comparator comp)
{
//using TransformedComparator = impl::lower_to_upper_comparator_transform_t;
//TransformedComparator transformedComparator;
@@ -115,7 +193,7 @@ namespace impl
// extra indirection due to https://github.com/microsoft/DirectXShaderCompiler/issues/4771
template
-uint lower_bound(inout Accessor accessor, const uint begin, const uint end, const T value)
+uint lower_bound(NBL_REF_ARG(Accessor) accessor, const uint begin, const uint end, const T value)
{
//using Comparator = nbl::hlsl::less;
//Comparator comp;
@@ -124,7 +202,7 @@ uint lower_bound(inout Accessor accessor, const uint begin, const uint end, cons
return nbl::hlsl::lower_bound >(accessor,begin,end,value,comp);
}
template
-uint upper_bound(inout Accessor accessor, const uint begin, const uint end, const T value)
+uint upper_bound(NBL_REF_ARG(Accessor) accessor, const uint begin, const uint end, const T value)
{
//using Comparator = nbl::hlsl::less;
//Comparator comp;
@@ -136,16 +214,17 @@ uint upper_bound(inout Accessor accessor, const uint begin, const uint end, cons
}
template
-uint lower_bound(inout Accessor accessor, const uint begin, const uint end, const typename Accessor::value_type value)
+uint lower_bound(NBL_REF_ARG(Accessor) accessor, const uint begin, const uint end, const typename Accessor::value_type value)
{
return impl::lower_bound(accessor,begin,end,value);
}
template
-uint upper_bound(inout Accessor accessor, const uint begin, const uint end, const typename Accessor::value_type value)
+uint upper_bound(NBL_REF_ARG(Accessor) accessor, const uint begin, const uint end, const typename Accessor::value_type value)
{
return impl::upper_bound(accessor,begin,end,value);
}
+#endif
}
}
diff --git a/include/nbl/builtin/hlsl/array_accessors.hlsl b/include/nbl/builtin/hlsl/array_accessors.hlsl
new file mode 100644
index 0000000000..b025f9d677
--- /dev/null
+++ b/include/nbl/builtin/hlsl/array_accessors.hlsl
@@ -0,0 +1,30 @@
+#ifndef _NBL_BUILTIN_HLSL_ARRAY_ACCESSORS_HLSL_INCLUDED_
+#define _NBL_BUILTIN_HLSL_ARRAY_ACCESSORS_HLSL_INCLUDED_
+
+#include
+
+namespace nbl
+{
+namespace hlsl
+{
+template
+struct array_get
+{
+ ComponentType operator()(NBL_CONST_REF_ARG(ArrayType) arr, const I ix) NBL_CONST_MEMBER_FUNC
+ {
+ return arr[ix];
+ }
+};
+
+template
+struct array_set
+{
+ void operator()(NBL_REF_ARG(ArrayType) arr, I index, ComponentType val) NBL_CONST_MEMBER_FUNC
+ {
+ arr[index] = val;
+ }
+};
+}
+}
+
+#endif
\ No newline at end of file
diff --git a/include/nbl/builtin/hlsl/bda/__ptr.hlsl b/include/nbl/builtin/hlsl/bda/__ptr.hlsl
index 3aad01a49e..f57add2465 100644
--- a/include/nbl/builtin/hlsl/bda/__ptr.hlsl
+++ b/include/nbl/builtin/hlsl/bda/__ptr.hlsl
@@ -1,7 +1,6 @@
// Copyright (C) 2018-2024 - DevSH Graphics Programming Sp. z O.O.
// This file is part of the "Nabla Engine".
// For conditions of distribution and use, see copyright notice in nabla.h
-
#include "nbl/builtin/hlsl/type_traits.hlsl"
#include "nbl/builtin/hlsl/bda/__ref.hlsl"
@@ -17,32 +16,64 @@ namespace bda
template
struct __ptr
{
- using this_t = __ptr ;
- uint64_t addr;
+ using this_t = __ptr;
+ uint32_t2 addr;
- static this_t create(const uint64_t _addr)
+ static this_t create(const uint32_t2 _addr)
{
this_t retval;
retval.addr = _addr;
return retval;
}
- template< uint64_t alignment=alignment_of_v >
- __ref deref()
+ // in non-64bit mode we only support "small" arithmetic on pointers (just offsets no arithmetic on pointers)
+ __ptr operator+(uint32_t i)
+ {
+ i *= sizeof(T);
+ uint32_t2 newAddr = addr;
+ spirv::AddCarryOutput lsbAddRes = spirv::addCarry(addr[0],i);
+ newAddr[0] = lsbAddRes.result;
+ newAddr[1] += lsbAddRes.carry;
+ return __ptr::create(newAddr);
+ }
+ __ptr operator-(uint32_t i)
+ {
+ i *= sizeof(T);
+ uint32_t2 newAddr = addr;
+ spirv::AddCarryOutput lsbSubRes = spirv::subBorrow(addr[0],i);
+ newAddr[0] = lsbSubRes.result;
+ newAddr[1] -= lsbSubRes.carry;
+ return __ptr::create(newAddr);
+ }
+
+ template, bool _restrict=false>
+ __ref deref()
{
// TODO: assert(addr&uint64_t(alignment-1)==0);
- using retval_t = __ref < T, alignment, false>;
- retval_t retval;
- retval.__init(addr);
+ __ref retval;
+ retval.__init(spirv::bitcast,uint32_t2>(addr));
return retval;
}
+
+ template >
+ __ref deref_restrict() {return deref();}
- __ptr operator +(int64_t i) {
- return __ptr::create(addr + sizeof(T) * i);
+ //! Dont use these, to avoid emitting shaderUint64 capability when compiling for crappy mobile GPUs
+ static this_t create(const uint64_t _addr)
+ {
+ this_t retval;
+ retval.addr = spirv::bitcast(_addr);
+ return retval;
}
-
- __ptr operator-(int64_t i) {
- return __ptr::create(addr - sizeof(T) * i);
+ __ptr operator+(int64_t i)
+ {
+ i *= sizeof(T);
+ return __ptr::create(spirv::bitcast(addr)+i);
+ }
+ __ptr operator-(int64_t i)
+ {
+ i *= sizeof(T);
+ return __ptr::create(spirv::bitcast(addr)-i);
}
};
diff --git a/include/nbl/builtin/hlsl/bda/__ref.hlsl b/include/nbl/builtin/hlsl/bda/__ref.hlsl
index 116ebef88c..bd631c4d8f 100644
--- a/include/nbl/builtin/hlsl/bda/__ref.hlsl
+++ b/include/nbl/builtin/hlsl/bda/__ref.hlsl
@@ -4,7 +4,9 @@
#ifndef _NBL_BUILTIN_HLSL_BDA_REF_INCLUDED_
#define _NBL_BUILTIN_HLSL_BDA_REF_INCLUDED_
+// TODO: this shouldn't be included IMHO
#include "nbl/builtin/hlsl/functional.hlsl"
+#include "nbl/builtin/hlsl/spirv_intrinsics/core.hlsl"
namespace nbl
{
@@ -12,31 +14,34 @@ namespace hlsl
{
namespace bda
{
+template
+struct __spv_ptr_t;
template
-using __spv_ptr_t = spirv::pointer_t;
-
+struct __spv_ptr_t
+{
+ [[vk::ext_decorate(spv::DecorationAliasedPointer)]] spirv::bda_pointer_t value;
+};
template
-struct __ptr;
+struct __spv_ptr_t
+{
+ [[vk::ext_decorate(spv::DecorationRestrictPointer)]] spirv::bda_pointer_t value;
+};
-// TODO: refactor this in terms of `nbl::hlsl::` when they fix the composite struct inline SPIR-V BDA issue
template
struct __base_ref
{
-// TODO:
-// static_assert(alignment>=alignof(T));
+ __spv_ptr_t ptr;
- using spv_ptr_t = uint64_t;
- spv_ptr_t ptr;
-
- __spv_ptr_t __get_spv_ptr()
+ void __init(const spirv::bda_pointer_t _ptr)
{
- return spirv::bitcast < __spv_ptr_t > (ptr);
+ ptr.value = _ptr;
}
-
- // TODO: Would like to use `spv_ptr_t` or OpAccessChain result instead of `uint64_t`
- void __init(const spv_ptr_t _ptr)
+
+ spirv::bda_pointer_t __get_spv_ptr()
{
- ptr = _ptr;
+ // BUG: https://github.com/microsoft/DirectXShaderCompiler/issues/7184
+ // if I don't launder the pointer through this I get "IsNonPtrAccessChain(ptrInst->opcode())"
+ return spirv::copyObject >(ptr.value);
}
T load()
@@ -50,16 +55,13 @@ struct __base_ref
}
};
-template, bool _restrict = false>
+// TODO: I wish HLSL had some things like C++ which would allow you to make a "stack only"/non-storable type
+// NOTE: I guess there's the Function/Private storage space variables?
+template, bool _restrict=false>
struct __ref : __base_ref
{
- using base_t = __base_ref < T, alignment, _restrict>;
- using this_t = __ref < T, alignment, _restrict>;
-
- __spv_ptr_t get_ptr()
- {
- return base_t::__get_spv_ptr();
- }
+ using base_t = __base_ref< T,alignment,_restrict>;
+ using this_t = __ref;
};
}
}
diff --git a/include/nbl/builtin/hlsl/bda/bda_accessor.hlsl b/include/nbl/builtin/hlsl/bda/bda_accessor.hlsl
index a391461571..caefc814c5 100644
--- a/include/nbl/builtin/hlsl/bda/bda_accessor.hlsl
+++ b/include/nbl/builtin/hlsl/bda/bda_accessor.hlsl
@@ -66,7 +66,7 @@ struct BdaAccessor : impl::BdaAccessorBase
atomicAdd(const uint64_t index, const T value)
{
bda::__ptr target = ptr + index;
- return glsl::atomicAdd(target.template deref().get_ptr(), value);
+ return glsl::atomicAdd(target.template deref().ptr.value, value);
}
template
@@ -74,7 +74,7 @@ struct BdaAccessor : impl::BdaAccessorBase
atomicSub(const uint64_t index, const T value)
{
bda::__ptr target = ptr + index;
- return glsl::atomicSub(target.template deref().get_ptr(), value);
+ return glsl::atomicSub(target.template deref().ptr.value, value);
}
bda::__ptr ptr;
diff --git a/include/nbl/builtin/hlsl/bda/struct_declare.hlsl b/include/nbl/builtin/hlsl/bda/struct_declare.hlsl
new file mode 100644
index 0000000000..f38a7cbf3c
--- /dev/null
+++ b/include/nbl/builtin/hlsl/bda/struct_declare.hlsl
@@ -0,0 +1,176 @@
+// Copyright (C) 2018-2024 - DevSH Graphics Programming Sp. z O.O.
+// This file is part of the "Nabla Engine".
+// For conditions of distribution and use, see copyright notice in nabla.h
+#ifndef _NBL_BUILTIN_HLSL_BDA_STRUCT_DECLARE_INCLUDED_
+#define _NBL_BUILTIN_HLSL_BDA_STRUCT_DECLARE_INCLUDED_
+
+#include "nbl/builtin/hlsl/type_traits.hlsl"
+#include "nbl/builtin/hlsl/mpl.hlsl"
+#ifdef __HLSL_VERSION
+#include "nbl/builtin/hlsl/bda/__ptr.hlsl"
+#endif // __HLSL_VERSION
+
+
+namespace nbl
+{
+namespace hlsl
+{
+namespace bda
+{
+// silly utility traits
+template
+struct member_count
+{
+ NBL_CONSTEXPR_STATIC_INLINE uint32_t value = 0;
+};
+template
+NBL_CONSTEXPR uint32_t member_count_v = member_count::value;
+
+template
+struct member_type;
+template
+using member_type_t = typename member_type::type;
+
+// default alignment is the alignment of the type
+template
+struct member_alignment
+{
+ NBL_CONSTEXPR_STATIC_INLINE uint32_t value = alignment_of_v >;
+};
+template
+NBL_CONSTEXPR uint32_t member_alignment_v = member_alignment::value;
+
+// the default specialization of the offset assumes scalar layout
+template
+struct member_offset
+{
+ // TODO: assert that the custom alignment is no less than the type's natural alignment?
+ // first byte past previous member, rounded up to out alignment
+ NBL_CONSTEXPR_STATIC_INLINE uint64_t value = mpl::align_up_v::value+size_of_v >,member_alignment_v >;
+};
+template
+struct member_offset
+{
+ NBL_CONSTEXPR_STATIC_INLINE uint64_t value = 0;
+};
+template
+NBL_CONSTEXPR uint64_t member_offset_v = member_offset::value;
+
+// stuff needed to compute alignment of the struct properly
+namespace impl
+{
+template
+struct default_alignment
+{
+ NBL_CONSTEXPR_STATIC_INLINE uint32_t value = mpl::max_v,default_alignment::value>;
+};
+// le invalid values
+template
+struct default_alignment
+{
+ NBL_CONSTEXPR_STATIC_INLINE uint32_t value = 0;
+};
+template >
+NBL_CONSTEXPR uint32_t default_alignment_v = default_alignment::value;
+}
+}
+}
+}
+
+//! Need to gen identical struct in HLSL and C++, right now this tool can declare non-templated structs and full explicit specialized ones
+
+//implementation details
+#define NBL_HLSL_IMPL_DEFINE_STRUCT_GET_MEMBER_TYPE(identifier,...) __VA_ARGS__
+#define NBL_HLSL_IMPL_DEFINE_STRUCT_GET_MEMBER_NAME(identifier,...) identifier
+#define NBL_HLSL_IMPL_DEFINE_STRUCT_MEMBER_TYPE(r,IDENTIFIER,i,e) template<> \
+struct ::nbl::hlsl::bda::member_type \
+{ \
+using type = NBL_HLSL_IMPL_DEFINE_STRUCT_GET_MEMBER_TYPE e; \
+};
+
+//! TODO: handle declarations for partial template specializations and non-specializations
+#define NBL_HLSL_IMPL_DECLARE_STRUCT_MEMBER(identifier,...) __VA_ARGS__ identifier;
+#ifdef __HLSL_VERSION
+#define NBL_HLSL_IMPL_DEFINE_STRUCT_MEMBER(r,IDENTIFIER,i,e) [[vk::ext_decorate(spv::DecorationOffset,::nbl::hlsl::bda::member_offset_v)]] NBL_HLSL_IMPL_DECLARE_STRUCT_MEMBER e
+#define NBL_HLSL_IMPL_DEFINE_STRUCT_MEMBER_REFERENCE(r,unused,i,e) ::nbl::hlsl::bda::__ref< \
+ NBL_HLSL_IMPL_DEFINE_STRUCT_GET_MEMBER_TYPE e, \
+ ::nbl::hlsl::mpl::min_v,alignment>, \
+_restrict> NBL_HLSL_IMPL_DEFINE_STRUCT_GET_MEMBER_NAME e;
+#define NBL_HLSL_IMPL_INIT_STRUCT_MEMBER_REFERENCE(r,unused,i,e) NBL_HLSL_IMPL_DEFINE_STRUCT_GET_MEMBER_NAME e .__init( \
+ ::nbl::hlsl::spirv::accessChain(base_t::ptr.value,i) \
+);
+#define NBL_HLSL_IMPL_DEFINE_STRUCT(IDENTIFIER,MEMBER_SEQ) NBL_EVAL IDENTIFIER \
+{ \
+BOOST_PP_SEQ_FOR_EACH_I(NBL_HLSL_IMPL_DEFINE_STRUCT_MEMBER,IDENTIFIER,MEMBER_SEQ) \
+}; \
+template \
+struct ::nbl::hlsl::bda::__ref : ::nbl::hlsl::bda::__base_ref \
+{ \
+ using __referenced_t = NBL_EVAL IDENTIFIER; \
+ using base_t = __base_ref<__referenced_t,alignment,_restrict>; \
+ using this_t = __ref<__referenced_t,alignment,_restrict>; \
+\
+ BOOST_PP_SEQ_FOR_EACH_I(NBL_HLSL_IMPL_DEFINE_STRUCT_MEMBER_REFERENCE,dummy,MEMBER_SEQ) \
+\
+ void __init(const ::nbl::hlsl::spirv::bda_pointer_t<__referenced_t> _ptr) \
+ { \
+ base_t::__init(_ptr); \
+ BOOST_PP_SEQ_FOR_EACH_I(NBL_HLSL_IMPL_INIT_STRUCT_MEMBER_REFERENCE,dummy,MEMBER_SEQ) \
+ } \
+}
+#else
+#define NBL_HLSL_IMPL_DEFINE_STRUCT_MEMBER(r,IDENTIFIER,i,e) alignas(::nbl::hlsl::bda::member_alignment_v) NBL_HLSL_IMPL_DECLARE_STRUCT_MEMBER e
+#define NBL_HLSL_IMPL_DEFINE_STRUCT(IDENTIFIER,MEMBER_SEQ) alignas(::nbl::hlsl::alignment_of_v) NBL_EVAL IDENTIFIER \
+{ \
+BOOST_PP_SEQ_FOR_EACH_I(NBL_HLSL_IMPL_DEFINE_STRUCT_MEMBER,IDENTIFIER,MEMBER_SEQ) \
+}
+#endif
+
+// some weird stuff to handle alignment
+#define NBL_HLSL_IMPL_DEFINE_STRUCT_BEGIN(IDENTIFIER,MEMBER_SEQ) template<> \
+struct ::nbl::hlsl::bda::member_count \
+{ \
+ NBL_CONSTEXPR_STATIC_INLINE uint32_t value = BOOST_PP_SEQ_SIZE(MEMBER_SEQ); \
+}; \
+BOOST_PP_SEQ_FOR_EACH_I(NBL_HLSL_IMPL_DEFINE_STRUCT_MEMBER_TYPE,IDENTIFIER,MEMBER_SEQ) \
+template <> \
+struct ::nbl::hlsl::alignment_of \
+{
+#define NBL_HLSL_IMPL_DEFINE_STRUCT_END(IDENTIFIER,MEMBER_SEQ,...) }; \
+template<> \
+struct ::nbl::hlsl::size_of \
+{ \
+ using type = NBL_EVAL IDENTIFIER; \
+ NBL_CONSTEXPR_STATIC_INLINE uint32_t __last_member_ix_v = ::nbl::hlsl::bda::member_count_v-1; \
+ NBL_CONSTEXPR_STATIC_INLINE uint64_t __last_member_offset_v = ::nbl::hlsl::bda::member_offset_v; \
+ NBL_CONSTEXPR_STATIC_INLINE uint64_t __last_member_size_v = ::nbl::hlsl::size_of_v<::nbl::hlsl::bda::member_type_t >; \
+ NBL_CONSTEXPR_STATIC_INLINE uint32_t value = ::nbl::hlsl::mpl::align_up_v<__last_member_offset_v + __last_member_size_v, alignment_of_v >; \
+\
+__VA_ARGS__ \
+\
+}; \
+struct NBL_HLSL_IMPL_DEFINE_STRUCT(IDENTIFIER,MEMBER_SEQ)
+
+#include
+#include
+// MEMBER_SEQ is to be a sequence of variable name and type (identifier0,Type0)...(identifierN,TypeN) @see NBL_HLSL_IMPL_DEFINE_STRUCT_GET_MEMBER_TYPE
+// the VA_ARGS is the struct alignment for alignas, usage example
+// ```
+// NBL_HLSL_DEFINE_STRUCT((MyStruct2),
+// ((a, float32_t))
+// ((b, int32_t))
+// ((c, int32_t2)),
+//
+// ... block of code for the methods ...
+//
+// );
+// ```
+#define NBL_HLSL_DEFINE_STRUCT(IDENTIFIER,MEMBER_SEQ,...) NBL_HLSL_IMPL_DEFINE_STRUCT_BEGIN(IDENTIFIER,MEMBER_SEQ) \
+ NBL_CONSTEXPR_STATIC_INLINE uint32_t value = ::nbl::hlsl::bda::impl::default_alignment_v; \
+NBL_HLSL_IMPL_DEFINE_STRUCT_END(IDENTIFIER,MEMBER_SEQ,__VA_ARGS__)
+// version allowing custom alignment on whole struct
+#define NBL_HLSL_DEFINE_ALIGNAS_STRUCT(IDENTIFIER,ALIGNMENT,MEMBER_SEQ,...) NBL_HLSL_IMPL_DEFINE_STRUCT_BEGIN(IDENTIFIER,MEMBER_SEQ) \
+ NBL_CONSTEXPR_STATIC_INLINE uint32_t value = ALIGNMENT; \
+NBL_HLSL_IMPL_DEFINE_STRUCT_END(IDENTIFIER,MEMBER_SEQ,__VA_ARGS__)
+
+#endif
\ No newline at end of file
diff --git a/include/nbl/builtin/hlsl/bit.hlsl b/include/nbl/builtin/hlsl/bit.hlsl
index fd7a663983..71075d5491 100644
--- a/include/nbl/builtin/hlsl/bit.hlsl
+++ b/include/nbl/builtin/hlsl/bit.hlsl
@@ -37,10 +37,9 @@ enable_if_t||is_vector_v)==(is_scalar_v
{
return spirv::bitcast(val);
}
-// unfortunately its impossible to deduce Storage Class right now,
-// also this function will only work as long as `inout` behaves as `__restrict &` in DXC
+// unfortunately its impossible to deduce Storage Class right now
template
-enable_if_t bit_cast(inout U val)
+enable_if_t bit_cast(NBL_REF_ARG(U) val)
{
using ptr_u_t = spirv::pointer_t;
// get the address of U
diff --git a/include/nbl/builtin/hlsl/complex.hlsl b/include/nbl/builtin/hlsl/complex.hlsl
index 249013b1b9..6728a9bf3d 100644
--- a/include/nbl/builtin/hlsl/complex.hlsl
+++ b/include/nbl/builtin/hlsl/complex.hlsl
@@ -5,14 +5,54 @@
#ifndef _NBL_BUILTIN_HLSL_COMPLEX_INCLUDED_
#define _NBL_BUILTIN_HLSL_COMPLEX_INCLUDED_
-#include "nbl/builtin/hlsl/functional.hlsl"
-#include "nbl/builtin/hlsl/cpp_compat/promote.hlsl"
+#include
+#include
+
+using namespace nbl::hlsl;
+
+// -------------------------------------- CPP VERSION ------------------------------------
+#ifndef __HLSL_VERSION
+
+#include
+
+namespace nbl
+{
+namespace hlsl
+{
+
+template
+using complex_t = std::complex;
+
+// Fast mul by i
+template
+complex_t rotateLeft(NBL_CONST_REF_ARG(complex_t) value)
+{
+ complex_t retVal = { -value.imag(), value.real() };
+ return retVal;
+}
+
+// Fast mul by -i
+template
+complex_t rotateRight(NBL_CONST_REF_ARG(complex_t) value)
+{
+ complex_t retVal = { value.imag(), -value.real() };
+ return retVal;
+}
+
+}
+}
+
+// -------------------------------------- END CPP VERSION ------------------------------------
+
+// -------------------------------------- HLSL VERSION ---------------------------------------
+#else
namespace nbl
{
namespace hlsl
{
+// TODO: make this BDA compatible (no unspecialized templates yet)
template
struct complex_t
{
@@ -126,6 +166,8 @@ struct complex_t
template
struct plus< complex_t >
{
+ using type_t = complex_t;
+
complex_t operator()(NBL_CONST_REF_ARG(complex_t) lhs, NBL_CONST_REF_ARG(complex_t) rhs)
{
return lhs + rhs;
@@ -137,6 +179,8 @@ struct plus< complex_t >
template
struct minus< complex_t >
{
+ using type_t = complex_t;
+
complex_t operator()(NBL_CONST_REF_ARG(complex_t) lhs, NBL_CONST_REF_ARG(complex_t) rhs)
{
return lhs - rhs;
@@ -148,6 +192,8 @@ struct minus< complex_t >
template
struct multiplies< complex_t >
{
+ using type_t = complex_t;
+
complex_t operator()(NBL_CONST_REF_ARG(complex_t) lhs, NBL_CONST_REF_ARG(complex_t) rhs)
{
return lhs * rhs;
@@ -164,6 +210,8 @@ struct multiplies< complex_t >
template
struct divides< complex_t >
{
+ using type_t = complex_t;
+
complex_t operator()(NBL_CONST_REF_ARG(complex_t) lhs, NBL_CONST_REF_ARG(complex_t) rhs)
{
return lhs / rhs;
@@ -379,6 +427,22 @@ complex_t rotateRight(NBL_CONST_REF_ARG(complex_t) value)
return retVal;
}
+template
+struct ternary_operator< complex_t >
+{
+ using type_t = complex_t;
+
+ complex_t operator()(bool condition, NBL_CONST_REF_ARG(complex_t) lhs, NBL_CONST_REF_ARG(complex_t) rhs)
+ {
+ const vector lhsVector = vector(lhs.real(), lhs.imag());
+ const vector rhsVector = vector(rhs.real(), rhs.imag());
+ const vector resultVector = condition ? lhsVector : rhsVector;
+ const complex_t result = { resultVector.x, resultVector.y };
+ return result;
+ }
+};
+
+
}
}
@@ -396,4 +460,7 @@ NBL_REGISTER_OBJ_TYPE(complex_t,::nbl::hlsl::alignment_of_v,::nbl::hlsl::alignment_of_v)
NBL_REGISTER_OBJ_TYPE(complex_t,::nbl::hlsl::alignment_of_v)
+// -------------------------------------- END HLSL VERSION ---------------------------------------
#endif
+
+#endif
\ No newline at end of file
diff --git a/include/nbl/builtin/hlsl/concepts.hlsl b/include/nbl/builtin/hlsl/concepts.hlsl
index 29660b8b45..c057fb0aff 100644
--- a/include/nbl/builtin/hlsl/concepts.hlsl
+++ b/include/nbl/builtin/hlsl/concepts.hlsl
@@ -68,7 +68,7 @@ concept NBL_CONCEPT_NAME = requires BOOST_PP_EXPR_IF(LOCAL_PARAM_COUNT,(BOOST_PP
//
#define NBL_IMPL_CONCEPT_REQ_TYPE(...) typename __VA_ARGS__;
#define NBL_IMPL_CONCEPT_REQ_EXPR(...) __VA_ARGS__;
-#define NBL_IMPL_CONCEPT_REQ_EXPR_RET_TYPE(E,C,...) {E}; C;
+#define NBL_IMPL_CONCEPT_REQ_EXPR_RET_TYPE(E,C,...) {E}; C;
//
#define NBL_IMPL_CONCEPT (NBL_IMPL_CONCEPT_REQ_TYPE,NBL_IMPL_CONCEPT_REQ_EXPR,NBL_IMPL_CONCEPT_REQ_EXPR_RET_TYPE)
//
@@ -77,56 +77,8 @@ concept NBL_CONCEPT_NAME = requires BOOST_PP_EXPR_IF(LOCAL_PARAM_COUNT,(BOOST_PP
#define NBL_CONCEPT_END(SEQ) BOOST_PP_SEQ_FOR_EACH_I(NBL_IMPL_CONCEPT_END_DEF, DUMMY, SEQ) \
}
-
-#include
-
-// Alias some of the std concepts in nbl. As this is C++20 only, we don't need to use
-// the macros here.
-template
-concept same_as = std::same_as;
-
-template
-concept derived_from = std::derived_from;
-
-template
-concept convertible_to = std::convertible_to;
-
-template
-concept assignable_from = std::assignable_from;
-
-template
-concept common_with = std::common_with;
-
-template
-concept integral = std::integral;
-
-template
-concept signed_integral = std::signed_integral;
-
-template
-concept unsigned_integral = std::unsigned_integral;
-
-template
-concept floating_point = std::floating_point;
-
-
-// Some other useful concepts.
-
-template
-concept any_of = (same_as || ...);
-
-template
-concept scalar = floating_point || integral;
-
-template
-concept vectorial = is_vector::value;
-
-template