Skip to content

Dev#219

Merged
gameknife merged 3 commits intomainfrom
dev
Jan 14, 2026
Merged

Dev#219
gameknife merged 3 commits intomainfrom
dev

Conversation

@gameknife
Copy link
Copy Markdown
Owner

No description provided.

- switch experiment feature off by default
- do some work to make strip works
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @gameknife, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the engine's build configuration and startup efficiency. By introducing conditional compilation for various features and libraries, it provides greater control over the engine's footprint and allows for tailored builds. The refactoring of the initialization process, coupled with detailed performance logging, aims to improve startup times and provide better insights into engine performance. These changes collectively contribute to a more robust, modular, and observable engine architecture.

Highlights

  • Conditional Compilation and Build System Refinements: Introduced extensive conditional compilation flags (e.g., WITH_OIDN, WITH_AVIF, WITH_PHYSIC, WITH_QUICKJS, WITH_OZZ, WITH_KTX2) across CMake files and source code. This allows for more granular control over which third-party libraries and features are compiled into the engine, improving modularity and build flexibility. The tinyobjloader dependency has been removed, streamlining asset loading.
  • Engine Initialization and Performance Logging: Refactored the engine's initialization sequence, moving renderer setup from the constructor to the Start() method. spdlog::stopwatch has been integrated to measure and log the duration of engine initialization, startup, and TypeScript compilation, providing valuable performance insights.
  • Streamline Integration Refinement: The NVIDIA Streamline integration has been refactored with a LazyInit function and internal flags (GStreamLineInit, GStreamLineEnabled) to ensure controlled and conditional initialization and shutdown. Unnecessary puts calls for Vulkan device information and uptime calculations have been removed for cleaner logging.
  • TypeScript Scripting Updates: The test.ts example script has been updated to demonstrate fetching and displaying the engine's test number, and QuickJS-related code is now conditionally compiled based on the WITH_QUICKJS flag.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a significant architectural improvement by making several third-party dependencies optional via CMake build flags. This includes libraries like Ozz, QuickJS, KTX2, and Jolt physics. The changes are well-implemented across CMake files and C++ source using preprocessor directives. Additionally, there are several cleanups and minor refactorings, such as improving the TypeScript test code and moving renderer initialization out of the engine's constructor.

I've found a couple of issues related to correctness that should be addressed. One is a bug in the scene AABB calculation, and the other is related to fragile logic for the lazy initialization of NVIDIA Streamline due to uninitialized member variables. I've provided detailed comments and code suggestions for both.

Comment on lines +310 to +311
supportDLSS_ = true;
supportDLSSRR_ = true;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Hardcoding supportDLSS_ and supportDLSSRR_ to true here is problematic. It masks an underlying issue where these member variables are not initialized in the constructor, leading to indeterminate values. The actual support should be determined by LazyInit.

These lines should be removed. I will provide a corresponding suggestion in UpdateStreamline to fix the lazy-initialization logic, which will make these lines unnecessary.

Comment on lines 1007 to +1009
if (!supportDLSS_) return;

StreamlineWrapper::LazyInit(device_->Handle(), instance_->Handle(), device_->PhysicalDevice(), 0, device_->ComputeFamilyIndex(), 0, device_->GraphicsFamilyIndex(), supportDLSS_, supportDLSSRR_);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

To fix the lazy-initialization logic for Streamline, LazyInit should be called before checking supportDLSS_. This ensures that supportDLSS_ is properly initialized before its value is used. This change, combined with removing the hardcoded true values in the Start() method, will create a more robust and clearer initialization pattern.

        StreamlineWrapper::LazyInit(device_->Handle(), instance_->Handle(), device_->PhysicalDevice(), 0, device_->ComputeFamilyIndex(), 0, device_->GraphicsFamilyIndex(), supportDLSS_, supportDLSSRR_);

        if (!supportDLSS_) return;

@gameknife gameknife merged commit fe66145 into main Jan 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant