Conversation
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
…r logic in AdvancedVersionSettingPage.java
There was a problem hiding this comment.
Pull request overview
该 PR 旨在增强启动器对 Vulkan 相关渲染路径的支持,并改进“渲染器”选项的展示文案与可选项,以适配较新的 Minecraft 版本(26.2 snapshot 系列)及 Mesa Loader 相关能力。
Changes:
- 扩展
Renderer枚举,引入 Vulkan/OpenGL API 维度与 Vulkan 相关渲染器(如 Lavapipe)。 - 启动参数与环境变量层面增加 Vulkan/Mesa Loader 支持(
--graphicsBackend、Mesa Loader nativeDir、VK_* 环境变量等)。 - 更新 Windows 平台 mesa-loader 依赖版本,并调整多语言渲染器描述文案/条目。
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| HMCLCore/src/main/java/org/jackhuang/hmcl/launch/DefaultLauncher.java | 生成启动命令与环境变量时加入 Vulkan/Mesa Loader 相关参数与变量 |
| HMCLCore/src/main/java/org/jackhuang/hmcl/game/Renderer.java | 重构渲染器枚举:引入 API 概念、Vulkan/OpenGL 条目与 Mesa 相关元数据 |
| HMCL/src/main/resources/assets/natives.json | 升级 Windows mesa-loader 依赖版本与校验信息 |
| HMCL/src/main/resources/assets/lang/I18N.properties | 英文:更新渲染器描述并新增 Vulkan/Lavapipe/OpenGL 等条目文案 |
| HMCL/src/main/resources/assets/lang/I18N_zh.properties | 繁中:更新/新增渲染器条目文案 |
| HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties | 简中:更新/新增渲染器条目文案 |
| HMCL/src/main/resources/assets/lang/I18N_uk.properties | 删除既有渲染器 desc 翻译行 |
| HMCL/src/main/resources/assets/lang/I18N_ru.properties | 删除既有渲染器 desc 翻译行 |
| HMCL/src/main/resources/assets/lang/I18N_lzh.properties | 删除既有渲染器 desc 翻译行 |
| HMCL/src/main/resources/assets/lang/I18N_ja.properties | 删除既有渲染器 desc 翻译行 |
| HMCL/src/main/resources/assets/lang/I18N_es.properties | 删除既有渲染器 desc 翻译行 |
| HMCL/src/main/resources/assets/lang/I18N_ar.properties | 删除既有渲染器 desc 翻译行 |
| HMCL/src/main/java/org/jackhuang/hmcl/util/NativePatcher.java | 调整 Mesa Loader 获取方法的参数命名与引用一致性 |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/AdvancedVersionSettingPage.java | 按游戏版本控制渲染器下拉可选项(>= 26.2 snapshot 显示更多选项) |
| HMCL/src/main/java/org/jackhuang/hmcl/game/LauncherHelper.java | Windows 下为 Mesa 渲染器注入 javaagent 参数时改用 Mesa driverName |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
HMCLCore/src/main/java/org/jackhuang/hmcl/launch/DefaultLauncher.java
Outdated
Show resolved
Hide resolved
HMCLCore/src/main/java/org/jackhuang/hmcl/launch/DefaultLauncher.java
Outdated
Show resolved
Hide resolved
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/AdvancedVersionSettingPage.java
Outdated
Show resolved
Hide resolved
| settings.advanced.renderer=Рендерер | ||
| settings.advanced.renderer.default=По умолчанию | ||
| settings.advanced.renderer.default.desc=OpenGL | ||
| settings.advanced.renderer.d3d12=Mesa D3D12 | ||
| settings.advanced.renderer.d3d12.desc=DirectX 12 (Погана продуктивність та сумісність) | ||
| settings.advanced.renderer.llvmpipe=Mesa LLVMpipe | ||
| settings.advanced.renderer.llvmpipe.desc=Програмний (Погана продуктивність, найкраща сумісність) | ||
| settings.advanced.renderer.zink=Mesa Zink |
There was a problem hiding this comment.
This change removes existing localized renderer description keys. As a result, this locale will fall back to English for these descriptions (or show them missing depending on bundle fallback), which is a regression for non-English users. Please keep the previous translations or update them to match the new wording instead of deleting.
| settings.advanced.renderer=繪器 | ||
| settings.advanced.renderer.default=本 | ||
| settings.advanced.renderer.default.desc=開圖庫 | ||
| settings.advanced.renderer.d3d12=Mesa D3D12 | ||
| settings.advanced.renderer.d3d12.desc=DirectX 12 (效與所適皆差,勘誤之用) | ||
| settings.advanced.renderer.llvmpipe=Mesa LLVMpipe | ||
| settings.advanced.renderer.llvmpipe.desc=軟繪器 (效差,所適至) | ||
| settings.advanced.renderer.zink=Mesa Zink |
There was a problem hiding this comment.
This change removes existing localized renderer description keys. As a result, this locale will fall back to English for these descriptions (or show them missing depending on bundle fallback), which is a regression for non-English users. Please keep the previous translations or update them to match the new wording instead of deleting.
| settings.advanced.renderer=レンダラー | ||
| settings.advanced.renderer.default=デフォルト | ||
| settings.advanced.renderer.default.desc=OpenGL | ||
| settings.advanced.renderer.d3d12=Mesa D3D12 | ||
| settings.advanced.renderer.d3d12.desc=DirectX 12 (低パフォーマンス、低互換性) | ||
| settings.advanced.renderer.llvmpipe=Mesa LLVMpipe | ||
| settings.advanced.renderer.llvmpipe.desc=ソフトウェア (低速だが、互換性は最高) | ||
| settings.advanced.renderer.zink=Mesa Zink |
There was a problem hiding this comment.
This change removes existing localized renderer description keys. As a result, this locale will fall back to English for these descriptions (or show them missing depending on bundle fallback), which is a regression for non-English users. Please keep the previous translations or update them to match the new wording instead of deleting.
| settings.advanced.renderer=Renderizador | ||
| settings.advanced.renderer.default=Por defecto | ||
| settings.advanced.renderer.default.desc=OpenGL | ||
| settings.advanced.renderer.d3d12=Mesa D3D12 | ||
| settings.advanced.renderer.d3d12.desc=DirectX 12 (Rendimiento y compatibilidad deficientes) | ||
| settings.advanced.renderer.llvmpipe=Mesa LLVMpipe | ||
| settings.advanced.renderer.llvmpipe.desc=Software (Bajo rendimiento, máxima compatibilidad) | ||
| settings.advanced.renderer.zink=Mesa Zink |
There was a problem hiding this comment.
This change removes existing localized renderer description keys. As a result, this locale will fall back to English for these descriptions (or show them missing depending on bundle fallback), which is a regression for non-English users. Please keep the previous translations or update them to match the new wording instead of deleting.
| settings.advanced.renderer=المُصيِّر | ||
| settings.advanced.renderer.default=افتراضي | ||
| settings.advanced.renderer.default.desc=OpenGL | ||
| settings.advanced.renderer.d3d12=Mesa D3D12 | ||
| settings.advanced.renderer.d3d12.desc=DirectX 12 (أداء وتوافق ضعيفان) | ||
| settings.advanced.renderer.llvmpipe=Mesa LLVMpipe | ||
| settings.advanced.renderer.llvmpipe.desc=برمجي (أداء ضعيف، توافق أفضل) | ||
| settings.advanced.renderer.zink=Mesa Zink |
There was a problem hiding this comment.
This change removes existing localized renderer description keys. As a result, this locale will fall back to English for these descriptions (or show them missing depending on bundle fallback), which is a regression for non-English users. Please keep the previous translations or update them to match the new wording instead of deleting.
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3cccec02b8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (renderer.getApi() == Renderer.API.VULKAN) { | ||
| String icdFile = FileUtils.getAbsolutePath(nativeFolder.resolve("mesa-loader/" + renderer.getIcdFileName())); | ||
|
|
||
| env.put("VK_ICD_FILENAMES", icdFile); | ||
| env.put("VK_DRIVER_FILES", icdFile); |
There was a problem hiding this comment.
Guard Vulkan ICD env vars by available Windows loader
This path unconditionally sets VK_ICD_FILENAMES/VK_DRIVER_FILES for Vulkan Mesa renderers on Windows, but the loader agent is only attached when NativePatcher.getWindowsMesaLoader(...) returns a library; on Windows 7/8 it returns null for non-LLVMPIPE. In that case (e.g., LAVAPIPE), the process is forced to use an ICD file under mesa-loader that was never extracted, so Vulkan startup fails. Please gate these env vars by Windows version/loader availability (or block unsupported renderer selection earlier).
Useful? React with 👍 / 👎.
| if (gameVersion == null || gameVersion.compareTo("26.2-snapshot-1") >= 0) { | ||
| rendererPane.setItems(Renderer.ALL); |
There was a problem hiding this comment.
Align renderer availability gate with backend flag support
The UI enables Renderer.ALL starting at 26.2-snapshot-1, but launch argument generation only applies --graphicsBackend from 26.2-snapshot-2 onward (DefaultLauncher lines 404-407). For 26.2-snapshot-1, selecting OPENGL/VULKAN has no effective launch-time change (no Mesa driver/env path), so users can choose options that silently do nothing. The version gate should match the backend-flag support threshold.
Useful? React with 👍 / 👎.
… update UI bindings
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for selecting the Graphics API (OpenGL or Vulkan) in the game settings, specifically targeting Minecraft 26.2 and later. Key changes include updating the Mesa loader to version 26.0.4, refactoring the Renderer enum to associate specific renderers with their respective APIs, and adding UI components for backend selection. The launch logic has been updated to handle the new --graphicsBackend argument and configure environment variables for various rendering backends on both Windows and Linux. Review feedback identifies a type mismatch during UI initialization, a typo in a code comment, and a missing environment variable configuration for the D3D12 renderer on Linux.
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/AdvancedVersionSettingPage.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/AdvancedVersionSettingPage.java
Show resolved
Hide resolved
…om language files
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Uh oh!
There was an error while loading. Please reload this page.