Repository navigation
Lighting test level as the default level, and the Wayland frame cap fix - #253
Merged
Merged
Conversation
…e default level Assets/Levels/LightingTest.json holds what Game::LightingTest spawned: the floor, a sun, 128 moving point lights and a 56x56 grid of rotating meshes at the same 1.5 spacing (3136 meshes, to stress frustum culling). The Sandbox no longer spawns anything at start, and [Game] StartLevel is the new level. The offscreen descriptor pool held 1000 mesh sets per swap chain image, so a scene of this size crashed at start; it holds 5000 now. The pinned checksums and hashes of the Sandbox tests are measured again on the new scene. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NN37QrCqnwEJe9CqoCjqA
Wayland does not give a window its position: glfwGetWindowPos is always (0, 0), so GetRefreshRate chose the monitor at the origin whichever monitor the window was on. On a 60 Hz monitor at the origin and a 240 Hz one with the window, the GPU Options window showed a frame cap of 60 "from the monitor", and the frame limiter took the display to pace the frames, while the frames ran at 70 to 90 a second. GetRefreshRate now returns 0 (not known) in that case, and Engine::WindowMonitorHz turns a 0 into no value. Before, the periodic monitor check passed the 0 on, and LimiterFps read "cap >= 0 Hz" as "the display paces the frames" and removed the cap. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NN37QrCqnwEJe9CqoCjqA
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.
What
A lighting test level as a level file, made the default, in place of the code that spawned the same scene at start. It also fixes a wrong frame cap on Wayland that I found while testing it.
Level (
Assets/Levels/LightingTest.json)[Game] StartLevelis now this level, soSandboxopens it.Game::LightingTest,AddFloorand the unusedGenerateTestMeshesdeclaration are removed.OnStartGameonly makes the look camera when the level has none.Sandbox/CMakeLists.txt: the default and Level_1 tick dump hashes, the 600-tick dump hash, the lighting-test transform count and checksum, and the look camera checksum). Direct, inline and threaded modes give the same values.Descriptor pool (
OffscreenSubpass.cpp)vkAllocateDescriptorSetsfailed). It holds 5000 now.Wayland refresh rate (
DesktopWindow.cpp,Engine.cpp)glfwGetWindowPosis always 0,0), soGetRefreshRatepicked the monitor at the origin whichever monitor the window was on. With a 60 Hz monitor at the origin and the window on a 240 Hz one, GPU Options showed a frame cap of 60 "from the monitor", and the limiter let the display pace the frames, so frames ran at 70 to 90.Engine::WindowMonitorHzturns a 0 into no value. Before, the periodic monitor check passed the 0 on, andLimiterFpsread "cap >= 0 Hz" as "the display paces the frames". The cap falls back to 60 and the startup line says so.Test plan
ctest --test-dir build: 685 of 685 pass (Linux, Clang)check_comment_style.pyandcheck_string_types.pypassSandbox --null-render --unattended --frames 30loads "Lighting Test"; culling on and off give identical offscreen screenshots at this sizeNotes
LightingTest.jsonis large (about 121k lines, 3266 entities, written with 4-space indent). It is generated data, and the editor can reload it.MaxFps.🤖 Generated with Claude Code