Repository navigation
Conversation
- Win32 window manager and surface only on Windows; other platforms log that no window manager exists yet instead of #error (XCB is NAB-9 scope). - Depth attachment ref: brace-init SDepthStencilLayout explicitly (Clang doesn't elide braces in designated initializers). - 01_HelloCoreSystemAsset: ANSI stdout logger off Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With a required subgroup size the workgroup can't exceed requiredSubgroupSize*maxComputeWorkgroupSubgroups. Intel ANV (TGL GT1) reports 64, so SIMD8 x 1024 was invalid usage and hung the GPU. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NAB-7: Build headless examples on Linux, cap test 23 workgroup size
SimpleWindowedApplication and MonoWindowApplication create an IWindowManagerXcb and a CSurfaceVulkanXcb on Linux; 08_HelloSwapchain picks the surface class per platform. Windows paths are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
size_t is unsigned long on Linux, so clamping against 0ull failed to deduce. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NAB-9: XCB windows and Vulkan surfaces in the windowed examples on Linux
* NAB-13: Run 70_FLIPFluids on Linux
- Create an XCB surface on Linux, as the other windowed examples do.
- Drop the local CSwapchainFramebuffersAndDepth and CEventCallback, which
clash with the nbl::examples versions now in common, and fix two
narrowing/explicit-constructor errors Clang reports.
- Don't block the frame loop waiting for an input device. Without one the
camera orbits the tank and the drop restarts every 12 s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* NAB-16: Acquire FLIPFluids input without blocking
Checking for a device and then calling the blocking getDefault left a gap:
if the last mouse or keyboard disconnected in between, the frame waited
forever instead of falling back to autoplay.
InputSystem gains tryGetDefault{,Mouse,Keyboard}, which check for a device
and bind the reader under the same lock and return false when none is
connected. getDefault keeps blocking and shares the selection code.
Adds the NBL_EXAMPLES_INPUT_SYSTEM CTest (no GPU or display needed), which
covers absent and connected devices, disconnect after and during
acquisition, and the blocking getDefault still waiting for a device.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Companion to the Nabla Linux port PR (Devsh-Graphics-Programming/Nabla#1101). The examples' common code and a few examples assume Win32 or MSVC. This PR makes the common code build on Linux (Clang 20, X11/XCB), and the tested examples (01, 02, 08, 21, 23) run there. 09 builds and opens a window but waits for mouse input, which the XCB backend doesn't provide yet. The Win32 window-manager and surface selection is preserved. Three shared changes also apply on Windows: the depth-layout initialization, the 09 clamp expression and test 23's loop bound. Windows/MSVC has not been built.
common/.../SimpleWindowedApplication.hpp: createIWindowManagerXcbon Linux and log an error when there is no X server (DISPLAYunset). Other platforms log "No window manager is implemented for this platform yet!" and returnfalseinstead of hitting#error.common/.../MonoWindowApplication.hppand08_HelloSwapchain: createCSurfaceVulkanXcbon Linux,CSurfaceVulkanWin32on Windows.common/.../CSwapchainFramebuffersAndDepth.hpp: the depth-stencil attachment layout is a depth/stencil pair, so it is now set through its.depthmember. Initializing the pair from a single enum doesn't compile with Clang.01_HelloCoreSystemAsset: useCColoredStdoutLoggerANSIwhen not on Windows.09_GeometryCreator:core::clamp(gcIndex, 0ull, size()-1)mixesunsigned long longwithsize_t(unsigned longon LP64) and doesn't deduce. Usesize_t(0).23_Arithmetic2UnitTest(all platforms): withrequiredSubgroupSize, Vulkan caps the workgroup atrequiredSubgroupSize * maxComputeWorkgroupSubgroups(VUID-VkPipelineShaderStageCreateInfo-pNext-02756). The loop went up tomaxComputeWorkGroupInvocationsfor every subgroup size. On Intel (64 subgroups max, SIMD8) that made a 1024-invocation pipeline, a validation error and a GPU hang. The loop now stops atmin(maxComputeWorkGroupInvocations, subgroupSize*maxComputeWorkgroupSubgroups). NVIDIA (subgroup 32 only) is unaffected.Testing
These results come from the recorded runs of the merged fork PRs and their reviews, not one combined re-run. Ubuntu 24.04, Clang 20.1.2 + LLD, Release, LunarG SDK 1.4.363.0 with the Khronos validation layer, on an RTX 3050 (NVIDIA 580.178.04) and an Intel UHD TGL GT1 (Mesa 25.2.8), together with the Nabla Linux port branch.
01 and 21 are CPU/VFS tests, so passing with each ICD selected doesn't show GPU execution. 09_GeometryCreator builds but waits for a mouse, and XCB input is not implemented yet. Not tested: Windows/MSVC, GCC, Wayland, and any example not listed above.
TODO list:
maxComputeWorkgroupSubgroupslimits the workgroup size. The depth-layout initialization and the 09 clamp also change there.examples_testsin Nabla to the merge commit and restore the Devsh submodule URL.70_FLIPFluidshere or in a follow-up PR (still under review on the fork).