Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
de89a25
add a structure that holds information about vulkan devices
YasInvolved Sep 28, 2025
92fd0f0
small change in naming
YasInvolved Sep 30, 2025
a8f4dbb
store a reference to a coresponding profile in CVulkanPhysicalDevice,…
YasInvolved Sep 30, 2025
a8d9ea3
add vulkan-tools submodule and include it in nabla
YasInvolved Oct 6, 2025
67ee163
update vulkan headers, link vulkaninfo to nabla
YasInvolved Oct 8, 2025
e4207b8
link vulkaninfo as static library
YasInvolved Oct 10, 2025
dd4c7fd
update vulkan-tools
YasInvolved Oct 10, 2025
e645f4f
update vulkan-headers
YasInvolved Oct 10, 2025
824662a
fixed silly mistake in Vulkan-Tools, mimic headers from vulkansdk for…
YasInvolved Oct 10, 2025
0002aef
remove unused stuff
YasInvolved Oct 12, 2025
1361717
make vulkaninfo "callable" from nabla
YasInvolved Oct 12, 2025
9cb542d
update branch and resolve merge conflicts
YasInvolved Oct 15, 2025
6f6420b
link vulkaninfo to nabla again
YasInvolved Oct 15, 2025
471d128
make exportGpuProfile function in CVulkanConnection static
YasInvolved Oct 15, 2025
6e15b42
call exportGpuProfile in smoke
YasInvolved Oct 15, 2025
e2bb3cc
fix nonexistent vulkan-headers library
YasInvolved Oct 16, 2025
e3c34aa
do vulkan-headers stuff as it should be done from the beginning
YasInvolved Oct 18, 2025
2725307
update vulkan-tools
YasInvolved Oct 18, 2025
4c7386b
make vulkaninfo a standalone function and export a profile for all gp…
YasInvolved Oct 19, 2025
e956dca
fix broken submodule
YasInvolved Oct 19, 2025
58bceda
fix git-version-tracking
YasInvolved Oct 19, 2025
211ad29
fix dxc submodule
YasInvolved Oct 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,7 @@
path = ci
url = [email protected]:Devsh-Graphics-Programming/Nabla-CI.git
branch = ditt
update = none
update = none
[submodule "3rdparty/Vulkan-Tools"]
path = 3rdparty/Vulkan-Tools
url = [email protected]:Devsh-Graphics-Programming/Vulkan-Tools.git
5 changes: 5 additions & 0 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,10 @@ if (NBL_BUILD_BULLET)
set(BULLET_INCLUDE_PATH ${BULLET_INCLUDE_PATH} PARENT_SCOPE)
endif()

add_library(Vulkan-Headers INTERFACE)
target_include_directories(Vulkan-Headers INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/Vulkan-Headers/include")
add_subdirectory(Vulkan-Tools/vulkaninfo vulkaninfo EXCLUDE_FROM_ALL)

# Final gather
set(NBL_3RDPARTY_TARGETS
lzma
Expand All @@ -475,6 +479,7 @@ set(NBL_3RDPARTY_TARGETS
SPIRV
SPIRV-Tools-static # SPIRV-Tools-shared in case of SHARED lib
SPIRV-Tools-opt
vulkaninfo
Imath
freetype
${NBL_MSDFGEN_TARGETS}
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/Vulkan-Headers
Submodule Vulkan-Headers updated 61 files
+59 −8 .github/workflows/ci.yml
+2 −0 .gitignore
+5 −0 BUILD.gn
+78 −34 CMakeLists.txt
+60 −27 Makefile.release
+21 −21 include/vk_video/vulkan_video_codec_av1std.h
+8 −8 include/vk_video/vulkan_video_codec_h264std.h
+1 −1 include/vk_video/vulkan_video_codec_h264std_decode.h
+23 −23 include/vk_video/vulkan_video_codec_h265std.h
+1 −1 include/vk_video/vulkan_video_codec_h265std_decode.h
+151 −0 include/vk_video/vulkan_video_codec_vp9std.h
+68 −0 include/vk_video/vulkan_video_codec_vp9std_decode.h
+1,979 −99 include/vulkan/vulkan.cppm
+4 −0 include/vulkan/vulkan.h
+2,319 −646 include/vulkan/vulkan.hpp
+6 −0 include/vulkan/vulkan_android.h
+150 −1 include/vulkan/vulkan_beta.h
+2,678 −292 include/vulkan/vulkan_core.h
+4 −0 include/vulkan/vulkan_directfb.h
+1,752 −356 include/vulkan/vulkan_enums.hpp
+981 −615 include/vulkan/vulkan_extension_inspection.hpp
+6,419 −4,442 include/vulkan/vulkan_format_traits.hpp
+20 −0 include/vulkan/vulkan_fuchsia.h
+12,471 −10,204 include/vulkan/vulkan_funcs.hpp
+2 −0 include/vulkan/vulkan_ggp.h
+9,589 −6,308 include/vulkan/vulkan_handles.hpp
+1,739 −138 include/vulkan/vulkan_hash.hpp
+27 −27 include/vulkan/vulkan_hpp_macros.hpp
+2 −0 include/vulkan/vulkan_ios.h
+2 −0 include/vulkan/vulkan_macos.h
+8 −0 include/vulkan/vulkan_metal.h
+51 −0 include/vulkan/vulkan_ohos.h
+10,751 −8,144 include/vulkan/vulkan_raii.hpp
+6 −0 include/vulkan/vulkan_screen.h
+86 −39 include/vulkan/vulkan_shared.hpp
+926 −142 include/vulkan/vulkan_static_assertions.hpp
+88,309 −59,856 include/vulkan/vulkan_structs.hpp
+5,981 −5,186 include/vulkan/vulkan_to_string.hpp
+2 −0 include/vulkan/vulkan_vi.h
+323 −0 include/vulkan/vulkan_video.cppm
+1,758 −286 include/vulkan/vulkan_video.hpp
+4 −0 include/vulkan/vulkan_wayland.h
+30 −0 include/vulkan/vulkan_win32.h
+4 −0 include/vulkan/vulkan_xcb.h
+4 −0 include/vulkan/vulkan_xlib.h
+4 −0 include/vulkan/vulkan_xlib_xrandr.h
+1,164 −0 registry/base_generator.py
+47 −16 registry/cgenerator.py
+33 −32 registry/generator.py
+4 −4 registry/parse_dependency.py
+70 −7 registry/reg.py
+8 −9 registry/spec_tools/conventions.py
+12,622 −6,792 registry/validusage.json
+308 −118 registry/video.xml
+3,754 −1,703 registry/vk.xml
+4 −1 registry/vkconventions.py
+579 −0 registry/vulkan_object.py
+9 −2 tests/CMakeLists.txt
+20 −4 tests/integration/CMakeLists.txt
+13 −0 tests/vk_hpp.cpp
+13 −0 tests/vk_hpp_module.cpp
1 change: 1 addition & 0 deletions 3rdparty/Vulkan-Tools
Submodule Vulkan-Tools added at 096ed3
2 changes: 1 addition & 1 deletion examples_tests
Submodule examples_tests updated 83 files
+0 −1 .gitignore
+0 −29 13_MaterialCompilerTest/CMakeLists.txt
+0 −660 13_MaterialCompilerTest/main.cpp
+0 −34 20_AllocatorTest/main.cpp
+2 −10 22_RaytracedAO/CMakeLists.txt
+4 −10 22_RaytracedAO/CommandLineHandler.cpp
+20 −85 22_RaytracedAO/CommandLineHandler.hpp
+29 −144 22_RaytracedAO/README.md
+343 −604 22_RaytracedAO/Renderer.cpp
+15 −38 22_RaytracedAO/Renderer.h
+0 −150 22_RaytracedAO/SimpleJson.cpp
+0 −78 22_RaytracedAO/SimpleJson.h
+0 −51 22_RaytracedAO/addEnvironmentEmitters.comp
+0 −40 22_RaytracedAO/ci/dummy_4096spp_128depth.xml
+25 −59 22_RaytracedAO/closestHit.comp
+4 −20 22_RaytracedAO/common.h
+0 −28 22_RaytracedAO/config.json
+1 −1 22_RaytracedAO/denoiser_hook.bat
+28 −35 22_RaytracedAO/extractCubemap.bat
+1 −1 22_RaytracedAO/fillVisBuffer.frag
+0 −23 22_RaytracedAO/fillVisBuffer.vert
+241 −679 22_RaytracedAO/main.cpp
+15 −16 22_RaytracedAO/mergeCubemap.bat
+58 −95 22_RaytracedAO/raygen.comp
+52 −245 22_RaytracedAO/raytraceCommon.glsl
+15 −65 22_RaytracedAO/raytraceCommon.h
+11 −58 22_RaytracedAO/resolve.comp
+3 −3 22_RaytracedAO/virtualGeometry.glsl
+1 −0 39_DenoiserTonemapper/CMakeLists.txt
+1 −2 39_DenoiserTonemapper/CommonPushConstants.h
+9 −3 39_DenoiserTonemapper/ShaderCommon.glsl
+163 −159 39_DenoiserTonemapper/main.cpp
+13 −0 41_VisibilityBuffer/CMakeLists.txt
+68 −0 41_VisibilityBuffer/common.glsl
+20 −0 41_VisibilityBuffer/common.h
+28 −0 41_VisibilityBuffer/config.json.template
+102 −0 41_VisibilityBuffer/cull.comp
+32 −0 41_VisibilityBuffer/cullShaderCommon.h
+28 −0 41_VisibilityBuffer/fillVBuffer.frag
+20 −0 41_VisibilityBuffer/fillVBuffer.vert
+1,333 −0 41_VisibilityBuffer/main.cpp
+15 −0 41_VisibilityBuffer/occlusionCull.frag
+28 −0 41_VisibilityBuffer/occlusionCull.vert
+30 −0 41_VisibilityBuffer/occlusionCullMap.comp
+58 −0 41_VisibilityBuffer/occlusionCullingShaderCommon.glsl
+50 −0 41_VisibilityBuffer/pipeline.groovy
+21 −0 41_VisibilityBuffer/rasterizationCommon.h
+199 −0 41_VisibilityBuffer/shadeVBuffer.comp
+7 −0 43_SumAndCDFFilters/CMakeLists.txt
+28 −0 43_SumAndCDFFilters/config.json.template
+369 −0 43_SumAndCDFFilters/main.cpp
+50 −0 43_SumAndCDFFilters/pipeline.groovy
+0 −10 50.IESProfileTest/CMakeLists.txt
+0 −260 50.IESProfileTest/compute/cdc.comp
+0 −14 50.IESProfileTest/compute/common.h
+0 −14 50.IESProfileTest/inputs.json
+0 −823 50.IESProfileTest/main.cpp
+0 −71 50.IESProfileTest/shader.frag
+0 −16 50.IESProfileTest/shader.vert
+1 −1 67_RayQueryGeometry/app_resources/render.comp.hlsl
+37 −44 67_RayQueryGeometry/main.cpp
+1 −1 71_RayTracingPipeline/app_resources/common.hlsl
+3 −3 71_RayTracingPipeline/app_resources/raytrace.rgen.hlsl
+2 −2 CMakeLists.txt
+28 −0 old_to_refactor/04_Keyframe/config.json.template
+28 −0 old_to_refactor/07_SubpassBaking/config.json.template
+28 −0 old_to_refactor/11_LoDSystem/config.json.template
+28 −0 old_to_refactor/12_glTF/config.json.template
+28 −0 old_to_refactor/14_ComputeScan/config.json.template
+28 −0 old_to_refactor/16_OrderIndependentTransparency/config.json.template
+28 −0 old_to_refactor/17_SimpleBulletIntegration/config.json.template
+28 −0 old_to_refactor/18_MitsubaLoader/config.json.template
+28 −0 old_to_refactor/20_Megatexture/config.json.template
+7 −0 old_to_refactor/21_DynamicTextureIndexing/CMakeLists.txt
+28 −0 old_to_refactor/21_DynamicTextureIndexing/config.json.template
+690 −0 old_to_refactor/21_DynamicTextureIndexing/main.cpp
+29 −0 old_to_refactor/21_DynamicTextureIndexing/mesh.frag
+25 −0 old_to_refactor/21_DynamicTextureIndexing/mesh.vert
+50 −0 old_to_refactor/21_DynamicTextureIndexing/pipeline.groovy
+30 −0 old_to_refactor/51_RadixSort/config.json.template
+30 −0 old_to_refactor/51_RadixSort/config.json.template.orig
+28 −0 old_to_refactor/60_ClusteredRendering/config.json.template
+2 −0 tmp/.gitignore
4 changes: 4 additions & 0 deletions include/nbl/video/CVulkanConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ class NBL_API2 CVulkanConnection final : public IAPIConnection
core::smart_refctd_ptr<system::ILogger>&& logger, const SFeatures& featuresToEnable
);


inline VkInstance getInternalObject() const {return m_vkInstance;}

inline E_API_TYPE getAPIType() const override {return EAT_VULKAN;}

inline IDebugCallback* getDebugCallback() const override {return m_debugCallback.get();}


bool startCapture() override;
bool endCapture() override;

Expand All @@ -46,6 +48,8 @@ class NBL_API2 CVulkanConnection final : public IAPIConnection
std::atomic_flag flag;
};

NBL_API2 void vulkaninfo();

}

#endif
5 changes: 5 additions & 0 deletions smoke/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,16 @@ class Smoke final : public system::IApplicationFramework
return false;
}

nbl::video::vulkaninfo();

return true;
}

void workLoopBody() override {}
bool keepRunning() override { return false; }

private:
smart_refctd_ptr<CVulkanConnection> m_api;
};

NBL_MAIN_FUNC(Smoke)
Expand Down
7 changes: 7 additions & 0 deletions src/nbl/CMakeLists.txt
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,13 @@ list(APPEND INTERFACE_BUILD_DEFINITIONS
# TODO: private
target_link_libraries(Nabla PUBLIC $<BUILD_INTERFACE:gtml>)

# vulkaninfo
if (NBL_STATIC_BUILD)
target_link_libraries(Nabla PUBLIC $<BUILD_INTERFACE:vulkaninfo>)
else()
target_link_libraries(Nabla PRIVATE $<BUILD_INTERFACE:vulkaninfo>)
endif()

# NGFX
if(TARGET ngfx)
if(NBL_STATIC_BUILD)
Expand Down
12 changes: 12 additions & 0 deletions src/nbl/video/CVulkanConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
// TODO: move inside `create` and call it LOG_FAIL and return nullptr
#define LOG(logger, ...) if (logger) {logger->log(__VA_ARGS__);}

extern int vulkaninfo(const std::span<const std::string_view>);

namespace nbl::video
{

Expand Down Expand Up @@ -306,6 +308,7 @@ core::smart_refctd_ptr<CVulkanConnection> CVulkanConnection::create(core::smart_
continue;
}
api->m_physicalDevices.emplace_back(std::move(device));
// device enumeration
}
#undef LOF

Expand Down Expand Up @@ -372,4 +375,13 @@ bool CVulkanConnection::endCapture()
return true;
}

NBL_API2 void vulkaninfo() {
uint32_t gpuIndex = 0;
std::string jsonArg = "--json=" + std::to_string(gpuIndex);
std::array<std::string_view, 2> args = { "", jsonArg };

while (::vulkaninfo(args) == 0)
jsonArg = "--json=" + std::to_string(++gpuIndex);
}

}
5 changes: 3 additions & 2 deletions src/nbl/video/CVulkanPhysicalDevice.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "nbl/video/CVulkanPhysicalDevice.h"
#include "nbl/video/CVulkanLogicalDevice.h"

#include "nlohmann/json.hpp" // TODO/FIXME: this is probably a mess making, consult someone how to do it better.

namespace nbl::video
{

Expand All @@ -25,7 +27,6 @@ std::unique_ptr<CVulkanPhysicalDevice> CVulkanPhysicalDevice::create(core::smart
}
});


auto& properties = initData.properties;
auto& features = initData.features;
// First call just with Vulkan 1.0 API because:
Expand Down Expand Up @@ -1365,7 +1366,7 @@ std::unique_ptr<CVulkanPhysicalDevice> CVulkanPhysicalDevice::create(core::smart
// bufferUsages.opticalFlowVector = anyFlag(bufferFeatures,VK_FORMAT_FEATURE_2_OPTICAL_FLOW_VECTOR_BIT_NV);
// bufferUsages.opticalFlowCost = anyFlag(bufferFeatures,VK_FORMAT_FEATURE_2_OPTICAL_FLOW_COST_BIT_NV);
}

success = true;
return std::unique_ptr<CVulkanPhysicalDevice>(new CVulkanPhysicalDevice(std::move(initData),rdoc,vk_physicalDevice,std::move(availableFeatureSet)));
}
Expand Down
Loading