[PR #3936] [MERGED] fix(renderer): use flat draws on Intel Gen11 Vulkan to prevent section flicker (#3529) #5300

Closed
opened 2026-11-03 05:11:38 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3936
Author: @abit-foggy
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: fix/intel-gen11-section-flicker


📝 Commits (1)

  • 40b0467 fix(renderer): use flat draws on Intel Gen11 Vulkan to prevent section flicker (#3529)

📊 Changes

2 files changed (+26 additions, -7 deletions)

View changed files

📝 crates/horizon-client-render/src/gfx.rs (+9 -0)
📝 crates/horizon-client-render/src/gfx/flat.rs (+17 -7)

📄 Description

🤖 Opened by abit-foggy's AI agent (Antigravity), not by abit-foggy personally.

What and why

Fixes #3529

On Intel Gen11 (Ice Lake) GPUs running the Mesa ANV Vulkan driver, non-zero first_instance in multi_draw_indexed_indirect causes instance-step vertex attributes (section origins) to be fetched incorrectly or dropped, resulting in terrain sections flashing/flickering at wrong coordinates on ~10–25% of frames (as investigated by @E-Viktor2003 in #3529).

This PR automatically activates Horizon's existing flat-draw pipeline (FlatDraws) on Intel Gen11 Vulkan adapters with min_sections = 0. Because flat draws always uses first_instance = 0 and indexes origins from a storage buffer, it completely eliminates the corrupted frames with 0 measurable performance difference.

Confirmed to resolve the exact flickering on Intel Iris Plus Graphics G7 (Ice Lake GT2, PCI 8086:8a53, Mesa 26.2.5).

Vanilla reference

Horizon-only (GPU driver workaround for Vulkan backend)

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on foggy-MacBookPro, against upstream/main at d009ebd14, 6 min 5 s)

Check Result
Scope ✅ 2 files, +26 −7
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 423 passed (57 s)
rustfmt ✅ (16 s)
clippy ✅ (2 min 15 s)
tests: horizon-client-render ✅ 547 passed (2 min 0 s)
doc tests ✅ 0 passed (37 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 352 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 340 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/3936 **Author:** [@abit-foggy](https://github.com/abit-foggy) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/intel-gen11-section-flicker` --- ### 📝 Commits (1) - [`40b0467`](https://github.com/horizon-rust/horizon/commit/40b0467e20bdce6834ca2a212141e6d8893c14ad) fix(renderer): use flat draws on Intel Gen11 Vulkan to prevent section flicker (#3529) ### 📊 Changes **2 files changed** (+26 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/gfx.rs` (+9 -0) 📝 `crates/horizon-client-render/src/gfx/flat.rs` (+17 -7) </details> ### 📄 Description > 🤖 Opened by abit-foggy's AI agent (Antigravity), not by abit-foggy personally. ## What and why Fixes #3529 On Intel Gen11 (Ice Lake) GPUs running the Mesa ANV Vulkan driver, non-zero `first_instance` in `multi_draw_indexed_indirect` causes instance-step vertex attributes (section origins) to be fetched incorrectly or dropped, resulting in terrain sections flashing/flickering at wrong coordinates on ~10–25% of frames (as investigated by @E-Viktor2003 in #3529). This PR automatically activates Horizon's existing flat-draw pipeline (`FlatDraws`) on Intel Gen11 Vulkan adapters with `min_sections = 0`. Because flat draws always uses `first_instance = 0` and indexes origins from a storage buffer, it completely eliminates the corrupted frames with 0 measurable performance difference. Confirmed to resolve the exact flickering on Intel Iris Plus Graphics G7 (Ice Lake GT2, PCI `8086:8a53`, Mesa 26.2.5). ## Vanilla reference Horizon-only (GPU driver workaround for Vulkan backend) ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on foggy-MacBookPro, against upstream/main at d009ebd14, 6 min 5 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +26 −7 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 423 passed (57 s) | | rustfmt | ✅ (16 s) | | clippy | ✅ (2 min 15 s) | | tests: horizon-client-render | ✅ 547 passed (2 min 0 s) | | doc tests | ✅ 0 passed (37 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 352 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 340 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:11:38 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5300
No description provided.