fix(vk): disable equal_depth_bias on Intel Arc Battlemage (0xE2xx) #1801
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1801
Loading…
Reference in a new issue
No description provided.
Delete branch "tiktiki/Longshot:fix/intel-battlemage-equal-depth-bias"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: fix · Risk: low · Tested on: Windows 11, Intel Arc B570 · Needs: Windows, Intel Arc B580 (Death Mountain Trail check)
TL;DR
On discrete Intel Arc Battlemage GPUs on Windows (Arc B570 / B580), alpha-tested objects drawn after a depth prepass—such as fallen leaves, flowers, Link's hair, distant pine cards, and Hyrule Field billboards—rendered as solid opaque rectangles instead of clean cutouts. This PR turns off the Intel depth-bias workaround for discrete Battlemage cards while keeping it enabled on older and integrated Intel Windows GPUs. On an Arc B570, all alpha cutouts render cleanly in Castle Town Market, Hyrule Field, and the equipment menu with no ground holes, and the updated unit tests fail on main and pass here.
Breakdown
0xE2xx) running Windows.EQUALdepth tests intoLESS_OR_EQUALwith a-64bias let discarded alpha-tested prepass pixels pass depth over background geometry, drawing opaque quads.0xE2xx) default toequal_depth_bias = 0on Intel's Windows driver instead of64.0x56xx, Panther Lake / Arc B3900xB0xx) keep64, Mesa ANV / AMD / NVIDIA keep0,RX_VK_EQ_BIASstill overrides the default, and saves/caches stay compatible.32.0.101.9175) across Castle Town Market, Hyrule Field, and the equipment menu, plus updated game-free unit tests (test_device_policy.pyandtest_equal_depth_margin.py).0xE20B) for any ground holes without the depth margin.RX_VK_EQ_BIAS=64restores the previous behaviour immediately without rebuilding caches.Why
On Windows, Intel's proprietary Vulkan driver currently receives
equal_depth_bias = 64.0ffor every Intel GPU family. Whenequal_depth_bias > 0, non-blended colour passes that requestVK_COMPARE_OP_EQUALafter a Z-prepass are rewritten toVK_COMPARE_OP_LESS_OR_EQUALwith a-64depth bias. For alpha-tested Z-prepass geometry (fallen leaves, flowers, Link's hair strands, distant pine silhouettes, and Hyrule Field billboards), pixels discarded during the Z-prepass leave the farther background depth behind them; relaxingEQUALtoLESS_OR_EQUALwith a negative bias lets those discarded quad pixels pass the depth test, rendering solid opaque or black rectangles.While PR #1586 already disabled this workaround on Mesa ANV, discrete Intel Arc Battlemage GPUs on Windows (
0xE2xx, e.g. Arc B5700xE20C/ Arc B5800xE20B) still hit the opaque-cutout bug onmain. See #1413.How to reproduce
Seen on: Windows 11 (build 26300), Intel Arc B570 10 GB (
0x8086:0xE20C), Intel driver32.0.101.9175.Settings and switches: defaults (no
RX_VK_EQ_BIASoverride).Steps: load into Hyrule Castle Town Market, look at fallen leaves on the cobblestone ground, potted flowers, Link's hair, and the pine trees behind the Temple of Time stairs; then walk into Hyrule Field.
Expected: fallen leaves, flowers, hair strands, pine foliage, and distant billboards keep clean alpha-tested cutouts.
Actual: discarded alpha-tested regions pass depth and render as solid opaque green/purple squares on leaves and flowers, dark silhouettes behind pine trees, black fringes on Link's hair, and a floating black rectangle in Hyrule Field.
What changed
The default
equal_depth_biasselection is extracted into a small pure rule that returns0.0ffor discrete Intel Arc Battlemage (0xE2xx) while preserving64.0ffor older and integrated Intel Windows GPUs and0.0ffor all other drivers. The policy test suite and equal-depth-margin source check are updated to cover Battlemage (B570/B580) and verify older Intel families remain unchanged.gpu/vk/device_policy.h: addpolicy_rule::equal_depth_bias(VkDriverId driver, uint32_t device)returning0.0ffor non-Intel-Windows drivers and discrete Battlemage ((device & 0xFF00u) == 0xE200u), and64.0ffor earlier/integrated Intel Windows families; call it fromdevice_policy()and update theequal_depth_biasfield comment.tests/test_device_policy.py: update theArc B580, Intel's Windows driver 101.9154fixture to expectequal_depth_bias = 0, add anArc B570, Intel's Windows driver 101.9175(0xE20C) fixture, and add 7 rule-edge checks forpolicy_rule::equal_depth_bias.tests/test_equal_depth_margin.py: update the source check to verifydevice_policy()callspolicy_rule::equal_depth_bias(f.driver_id, f.device_id)and that the rule excludes0xE200uwhile keeping64.0ffor other Intel Windows GPUs.Measurements
Verdict: pass — alpha-tested Z-prepass cutouts render cleanly on Intel Arc B570 (
equal_depth_bias = 0) with zero ground holes observed, and the updatedtest_device_policy.pyfails onmain @ 621dae5and passes onthis PR @ e739aef.Baseline: in-game build tested on
v3.0.0-rc.8(sameequal_depth_biasconsumer invk_draw.cppand same Intel Windows64.0fdefault asmain @ 621dae5) with a locally compiledlongshot_vk.dllcarrying the exactequal_depth_bias = 0Battlemage rule and noRX_VK_EQ_BIASoverride; unit tests run directly onmain @ 621dae5vsthis PR @ e739aef.Hardware: Windows 11 (build 26300), Intel Arc B570 10 GB (
0x8086:0xE20C, driver32.0.101.9175), AMD Ryzen 5 5600 (6C/12T), 16 GB RAM.Scene: Hyrule Castle Town Market, Temple of Time stairs, Hyrule Field, and Equipment menu; 2560x1440, Intel XeSS Balanced, 60 FPS cap, frame generation off.
Method: visual inspection of alpha-tested Z-prepass cutouts before/after (
equal_depth_bias = 64vs0) and execution oftests/test_device_policy.pyandtests/test_equal_depth_margin.py.How to reproduce: run
python -I -B tests/test_device_policy.py --headers <vulkan-headers> --cxx clang++andpython -I -B tests/test_equal_depth_margin.py, and visit Castle Town Market and Hyrule Field on an Arc B570/B580 on Windows withoutRX_VK_EQ_BIAS.621dae5e739aefpolicy_rule::equal_depth_biason Arc B570 (0xE20C) / B580 (0xE20B)64(opaque alpha-cutout quads)0(clean alpha cutouts)tests/test_device_policy.py(with Arc B570/B580 = 0 check)Arc B580returns64)20 PCs,69 fields,62 rule edges)tests/test_equal_depth_margin.py64for all Intel Windows)0on0xE2xx,64on older Intel Windows)Flags and settings
None
Testing
Tested:
0x8086:0xE20C), driver32.0.101.9175: ran the game locally withequal_depth_bias = 0(compiledlongshot_vk.dllwithoutRX_VK_EQ_BIASset) in Hyrule Castle Town Market, Hyrule Field, and the Equipment menu; fallen leaves, flowers, Link's hair, distant pines, and Hyrule Field rendered cleanly with no opaque quads and no ground holes.llvm-mingwClang 23):tests/test_device_policy.py(pass),tests/test_equal_depth_margin.py(pass),tests/run_all.py --changed main(21/22 passed; the 1 failure,tests/test_vk_occlusion_queries.py, is a pre-existing failure onmain @ 621dae5due tono member named 'policy'in its fixture). Fulltests/run_all.pyran 814 checks (755 passed, 59 unrelated failures on this Windows environment where clang lacks MSVC<algorithm>headers or shallow-clone history, 52 skipped).Not tested: Death Mountain Trail ground on Intel Arc B570/B580 (not reached on this save yet) and Intel Arc B580 (
0xE20B) hardware directly.Must be tested:
0xE20B) or Arc B570 (0xE20C) on Death Mountain Trail and Castle Town Market: walk through Castle Town Market and Death Mountain Trail withoutRX_VK_EQ_BIASset, expecting clean alpha cutouts on leaves/hair/trees and no sky-through-ground holes (by hand: inspect leaves, Link's hair, and Death Mountain Trail ground on a Battlemage card, or Test Farm:@Beanstalk windows intelif a Battlemage node is available).Risks
What could break: if a specific area (such as Death Mountain Trail) or an older Battlemage driver version still has depth-precision mismatch between depth and colour passes on
0xE2xx, small holes could appear inEQUAL-tested terrain. Older and integrated Intel Windows GPUs (UHD,Arc A-series,Arc B390 / 0xB0xx) are completely unaffected and keepequal_depth_bias = 64.Turning it off: set
RX_VK_EQ_BIAS=64inlongshot_env.txt(or environment) to restore the previous margin immediately, or revert the commit.Compatibility: Nothing changes for saves,
longshot_options.ini, shader/pipeline caches (no pipeline cache or SPIR-V invalidation),MKWVK_API_VERSION, or builder tools.Issues
See #1413
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.Tested in game: Windows 11, Intel Arc B570 (0x8086:0xE20C), driver 32.0.101.9175: ran in Hyrule Castle Town Market, Hyrule Field, and the Equipment menu with equal_depth_bias = 0 (no RX_VK_EQ_BIAS override); fallen leaves, potted flowers, Link's hair, distant pine trees, and Hyrule Field rendered cleanly with no opaque alpha-cutout quads and no ground holes.
Panther Lake shows the same bug: the Arc B390 (
0x8086:0xB080, Windows 11, driver 101.9150, v3.0.0) has every symptom this PR describes. In Kokiri Forest, the floating dust draws as see-through squares, there are solid black "shadows" behind the foliage, and Link's hair has a dark background. WithRX_VK_EQ_BIAS=0all three are gone (the log showsequal_depth_bias=0*). I checked by eye in a windowed run from thekokiri-startsave.So keeping
64on0xB0xxleaves these cards with the bug. #1614 (Arc B370, also Panther Lake: hair and leaves) and #1771 (square shadows behind hair and grass, no GPU given) look like the same thing.One caution: #1586 says the margin was first made for an Arc B390, so turning it off there could bring back the ground holes it was made for. I haven't checked Death Mountain Trail's ground on the B390 with the margin off. If that is the worry, a per-draw rule like #1631's (no margin for prepass draws whose shader discards) may fit better than a device list.
Same bug on Lunar Lake, and the same fix holds there. Here's a branch on top of this one that adds it, if you want to take it: twisted89:fix/vk-lnl-equal-depth-on-1801. It's two commits after your
e739aef5, so it fast-forwards and your commit stays yours.What I saw: Windows 11 (26300), Intel Arc 140V (Lunar Lake iGPU,
0x8086:0x64A0), Core Ultra 7 258V, driver32.0.101.8991. In Kokiri Forest the ivy, leaves and grass drew as solid quads. The log's per-draw state (RX_VK_DUMP_KEY=1) has the foliage colour programs (d8e59341cf4f629c,6b4dea601798c255,43ec86f35fd937b9) testingdt1 dw0against a pre-pass that writes with LESS, and they showdop3once the margin has turned EQUAL into LESS_OR_EQUAL. That's the cause you describe.With
RX_VK_EQ_BIAS=0(the log showsequal_depth_bias=0*): the foliage is cut out and the ground in Kokiri Forest has no holes.The branch:
29dfc056test(vk): an Arc 140V row intest_device_policy.pywith the facts from its log (every field as your branch gives it, the margin 0), and a rule edge for0x64A0. On your head it fails with exactly those two lines:equal_depth_bias is 64, expected 0.40b25a8cfix(vk):policy_rule::equal_depth_biasreturns 0 for0x64xxtoo; the rule's comment says why. It also updatesRX_VK_EQ_BIAS's row inswitches.def, which still said "64 on Intel's Windows driver" for every Intel GPU on your branch.test_device_policy,test_equal_depth_margin,test_switch_tableandtest_doc_anchorspass. With the rule pointed at0x65xxinstead,test_device_policyfails again. The wholetests/run_all.py --strictfails nothing on the branch that doesn't fail on your head (Windows; the failures there are this PC's missing tools).Not done: the build with the branch itself hasn't run on the laptop yet; the evidence is the
RX_VK_EQ_BIAS=0run, which gives the same value. Only driver 101.8991 was tried. Panther Lake (0xB0xx, issue 17's B390) keeps 64, as in your branch.Recommendation: Request changes. The rule is right and it fixes the alpha cutouts on Battlemage, but the new Arc B570 test row is out of date against
main: merged as it is,tests/test_device_policy.pyfails onmain. It needs a one-word change after a rebase (below). I couldn't push it to the branch. After that it waits on one run: Death Mountain Trail's ground on a Battlemage card with the margin off.For players on an Arc B570/B580 (and the Pro B50/B60) on Windows, leaves, grass, flowers and Link's hair get clean cutouts again instead of solid squares. The cost: Battlemage loses the 64-unit margin that was kept on Intel's Windows driver for depth holes in the ground. The code is better for it: the one-line default becomes a small named rule with its own rule edges, in the same style as
native_fadd_listedbeside it.Does it help: Yes, by eye, for what it fixes. Clean cutouts in Castle Town Market, Hyrule Field and the equipment menu on an Arc B570 (Windows 11, 101.9175), where the 64 margin drew solid squares before. This is not a perf change, so there is nothing to time. Unproven for the ground: nobody has looked at Death Mountain Trail on Battlemage with the margin off, and that is where the margin still did work after invariant positions landed (see Questions).
Other systems: This only changes the policy's default for
VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWSwith a device ID of0xE2xx. Mesa ANV, AMD, NVIDIA, and Intel's other Windows families (UHD/Iris0x9Axx, Alchemist0x56xx, Meteor/Arrow Lake0x7Dxx, Lunar Lake0x64xx, Panther Lake0xB0xx) all keep what they had; the rule edges check that. Nothing is invalidated: the margin is dynamic state invk_draw.cpp dynamic_state, not in the program cache's stamp, so caches and saves are unaffected. The ID range is right. Every Battlemage part is in0xE2xx: G21 (E202,E209,E20BB580,E20CB570,E20D,E210,E211Pro B60,E212Pro B50,E215,E216) and G31 (E220-E223). No other Intel GPU uses0xE2xx.native_fadd_listeduses the same mask for Battlemage. The Pro B50/B60 are included, which is right: same Xe2 dGPU, same compiler.Switches:
RX_VK_EQ_BIASis unchanged as a switch. Its default is now 0 on Battlemage instead of 64. That default is right if Death Mountain Trail holds, andRX_VK_EQ_BIAS=64is the way back. Its row ingpu/vk/switches.defstill says "64 on Intel's Windows driver" for every Intel GPU and needs to name Battlemage (below). No new switch. This is a default, not a player knob, which is right.Reviewed:
e739aef5against621dae50(its merge base;mainis3df5c13eand the PR rebases on it cleanly). Read in full:gpu/vk/device_policy.h(the new rule, the field's comment,device_policy()'s line, anddevice_policy_env'sRX_VK_EQ_BIASand its log line),tests/test_device_policy.py's new row and rule edges, andtests/test_equal_depth_margin.py. Also read: the consumer invk_draw.cpp dynamic_state, theRX_VK_EQ_BIASrow inswitches.def, and the fixture'son/numcheck againstmain. I didn't recompute the B570 row's numbers (texture budget, workers etc.); they come from the author's run on the base. Nothing run (a code review).Fixed in this review: nothing pushed (the push to the head branch was refused). The fix is under Blocking 1 and Suggestions, as a ready diff.
Checked and fine:
RX_VK_EQ_BIASis still applied after the default, so=64restores the old behaviour, and the log'sequal_depth_bias=%g*marks it;vk_draw.cppreadsdev.policy.equal_depth_biasonce, after the policy is filled;numflips from 64 to 0 and nothing else changes;test_equal_depth_margin.pynow checks the call and the rule's three parts, not the old one-liner, and is no weaker;Blocking (to change before merge)
tests/test_device_policy.py:210:mainhas turnedacquire_aheadon for every PC since this branch's base (every other row onmainlists it first inon=). The test checks that every flag not listed is off, so after the squash-merge the new "Arc B570, Intel's Windows driver 101.9175" row fails onmainwithacquire_ahead. The B580 row merges without trouble becausemainalready edited itson=line. Fix: rebase onmain(it is clean) and start the B570 row'son=withacquire_ahead. It is a discrete card, sonative_zstd_keep_core(Intel integrated only) andreadback_late_newest(handhelds) stay off.Suggestions (the author may take or leave)
gpu/vk/switches.def(RX_VK_EQ_BIAS's row): the default text still says "64 on Intel's Windows driver, 0 (off) elsewhere". Suggested:"64 on Intel's Windows driver but on Battlemage (0xE2xx), 0 (off) there and elsewhere (Mesa's Intel driver too)". The same stale "64 on Intel's Windows driver" is invk_draw.cpp's comment onstatic const float eq_biasand intests/test_equal_depth_margin.py's comment above itseq_biascheck. The file docstring oftests/test_device_policy.pysays "two Arc cards"; it now has three. (twisted89's branch also fixes theswitches.defrow.)Questions
RX_VK_EQ_BIASunset.Testing: The author ran it in-game on an Arc B570 (Windows 11, 101.9175): Castle Town Market, Hyrule Field and the equipment menu, with clean cutouts and no holes. They also ran
test_device_policy.pyandtest_equal_depth_margin.pyon the base. The comments add the same bug and fix on a B390 (Panther Lake) and a 140V (Lunar Lake), both viaRX_VK_EQ_BIAS=0. Still missing: Death Mountain Trail's ground on Battlemage (this holds the merge), and a B580 run (it can't plausibly differ from the B570: same die and same driver). CI is blocked waiting for approval to run; only the description check has run.Overlaps and merge order: No textual conflicts with the other open PRs on
gpu/vk/device_policy.h. #1793 (Lunar Lake float adds) edits the last line ofnative_fadd_listedand its rule edges. Unchanged lines separate those hunks from this PR's, and the fields don't overlap. #1839 (RDNA 4 by PCI ID) and #1893 (RDNA 4 RADV submits) touchis_rdna4/batch_submitsand the AMD fixture rows, far from this. Any order works; each needs only a rebase. twisted89's Lunar Lake branch (one739aef5) builds on this one and needs a rebase after the fix above.@ -109,0 +113,4 @@/// discarded them, rendering opaque rectangles (issue #1413); keep it 0 there.inline float equal_depth_bias(VkDriverId driver, uint32_t device) {if (driver != VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS) return 0.0f;if ((device & 0xFF00u) == 0xE200u) return 0.0f;The range is right: every Battlemage part (G21 E202-E216, incl. B580 E20B, B570 E20C, Pro B60 E211, Pro B50 E212; G31 E220-E223) is 0xE2xx and no other Intel GPU is; same mask as native_fadd_listed.
@ -205,0 +207,4 @@dict(name="Arc B570, Intel's Windows driver 101.9175",facts=(0x8086, 0xE20C, "INTEL_PROPRIETARY_WINDOWS", INTEL | 9175, "DISCRETE_GPU", "101.9175", "Intel(R) Arc(TM) B570 Graphics",1, 0, 10074, 9305, 16311, 12, 12, 6, 1, 1, 1, 0, 0, 1, 1, 32, 32, 0xFF),on="fetch_bounds networks_left_out gather_offset position_invariant compute_builds_serial pcache_fetch_lock split_before_draw "On main every PC now has acquire_ahead on, and this check wants every flag not listed off: after the squash-merge this row fails on main. Rebase (clean) and start this on= with
acquire_ahead. A discrete card, so native_zstd_keep_core and readback_late_newest stay off.@fix
I changed this pull request as the review asked: the new head is
7c7dfffd45.Changed
Nothing was built or run: check the change. It will be reviewed again.
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
Recommendation: Request changes. The B570 run shows that strict depth equality fixes the cutouts, but disabling the margin across Battlemage could bring back terrain holes. The B570 fixture also needs to match current main before it can merge.
Windows players on discrete Intel Arc Battlemage get the game's original EQUAL depth test by default, restoring clean leaves, flowers, hair and billboards in the reported B570 run. The small policy helper fits the existing code. The trade-off is losing the depth tolerance on every eligible draw, including terrain.
Does it help: Yes on the tested B570 for cutouts. On Windows 11 with driver 101.9175, the author reports that changing the margin from 64 to 0 removed the opaque quads in Castle Town Market, Hyrule Field and the equipment menu, with zero ground holes observed there. The game comparison used v3.0.0-rc.8 and a locally patched renderer. The reported policy test at
e739aefcovered 20 PC profiles and 62 rule cases. The visual result on B580 and terrain safety on Death Mountain Trail are unproven.Other systems: The driver and PCI ID checks limit the runtime change to Intel's Windows driver on 0xE2xx. Mesa ANV, AMD, NVIDIA, Steam Deck and other Intel families retain their defaults. Panther Lake and Lunar Lake testers report the same artifact and a successful override in Kokiri Forest, so those reports remain open. The margin is draw-time dynamic state. Shader translation, cache formats, saves, audio, input, the renderer ABI and builder tooling are outside the changed path.
Switches: RX_VK_EQ_BIAS defaults from 64 to 0 on discrete Battlemage with Intel's Windows driver. It stays at 64 on other Intel Windows devices and 0 elsewhere. The switch table reflects the exception, and setting 64 before launch restores the old margin. The B570 result supports the new default for cutouts. Death Mountain Trail still needs verification. The PR's Flags and settings section should record the default change.
Reviewed:
7c7dfffd45against621dae5057: Read the full diff and both commits, AGENTS.md, CONTRIBUTING.md, the Forgejo template, the agent PR guidance, gpu/vk/device_policy.h and both changed tests. Read the changed switch row and its neighboring entries, the policy initialization and override, the dynamic-state consumer, the fixture runner and the guide source-check path. Skimmed the rest of the switch table, the guide manifest and historical run records. Read the supplied comments and visible review excerpt. The external Tooling repository and linked Lunar Lake branch were unavailable in this checkout. No review-checklist.md was present.; nothing run (a code review).Checked and fine:
Blocking (to change before merge)
7c7dfffdhas no attribution trailer even though the PR checks that box. A comment records the automation, but the commit history lacks it. Add the applicable AI attribution trailer and carry it into the squash commit.Waiting on the author (a run, a measurement or a decision; no edit does it)
Suggestions (the author may take or leave)
Testing: Read-only review. The reported Windows game-free passes predate the fix-up. The B390 and Lunar Lake comments provide useful override comparisons on those devices. The proposed Lunar Lake branch itself has no reported in-game run, and neither comment establishes Battlemage terrain safety.
Overlaps and merge order: Main already contains the acquire-ahead change from #1574 and the guide move from #1802. Rebase #1801 over both. The Lunar Lake branch in the comments edits the same policy, switch row and tests. If taken forward, rebase it after #1801 and verify its own terrain results. #1631 is already in the base and covers blended haze.
Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
@ -109,0 +113,4 @@/// discarded them, rendering opaque rectangles (issue #1413); keep it 0 there.inline float equal_depth_bias(VkDriverId driver, uint32_t device) {if (driver != VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS) return 0.0f;if ((device & 0xFF00u) == 0xE200u) return 0.0f;This also removes the margin from terrain. Compare Death Mountain Trail on Windows Battlemage with the override unset before shipping this default.
@ -510,3 +521,3 @@p.frag_shuffle_fallback = f.driver_id == VK_DRIVER_ID_AMD_PROPRIETARY;p.position_invariant = !f.nvidia();p.equal_depth_bias = f.driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS ? 64.0f : 0.0f;p.equal_depth_bias = policy_rule::equal_depth_bias(f.driver_id, f.device_id);The Graphics guide manifest fingerprints this header. Review the image and steps after rebasing and record whether to keep or recapture the image before updating the fingerprints.
@ -355,3 +355,3 @@SW(RX_VK_DUMP_STEPS, diag, string, "every step dumped", "Narrows a frame dump to the steps lo-hi.")SW(RX_VK_DUMP_W, diag, int, "320 pixels (16 to 4096)", "Width of the scaled pictures a frame dump writes.")SW(RX_VK_EQ_BIAS, hw, float, "64 on Intel's Windows driver, 0 (off) elsewhere (Mesa's Intel driver too)", "Sets the margin that turns EQUAL depth tests into LESS_OR_EQUAL with a bias; 0 is as the game asks.")SW(RX_VK_EQ_BIAS, hw, float, "64 on Intel's Windows driver except Battlemage, 0 (off) elsewhere (Mesa's Intel driver too)", "Sets the margin that turns EQUAL depth tests into LESS_OR_EQUAL with a bias; 0 is as the game asks.")Nit. Say “discrete Battlemage (0xE2xx)” here to match the rule and make the exception clear to Arc B390 owners.
@ -205,0 +207,4 @@dict(name="Arc B570, Intel's Windows driver 101.9175",facts=(0x8086, 0xE20C, "INTEL_PROPRIETARY_WINDOWS", INTEL | 9175, "DISCRETE_GPU", "101.9175", "Intel(R) Arc(TM) B570 Graphics",1, 0, 10074, 9305, 16311, 12, 12, 6, 1, 1, 1, 0, 0, 1, 1, 32, 32, 0xFF),on="fetch_bounds networks_left_out gather_offset position_invariant compute_builds_serial pcache_fetch_lock split_before_draw "After rebasing, add acquire_ahead to this row. Current main enables it for every driver, so this fixture will otherwise fail on the B570.
@ -415,2 +424,4 @@("(long long)policy_rule::native_fadd_listed(VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA, 0x7D55, 0xFFFFFFFFu)", 0),("(long long)policy_rule::native_fadd_listed(VK_DRIVER_ID_AMD_PROPRIETARY, 0x7550, 0xFFFFFFFFu)", 0),# (equal_depth_bias: 0 on discrete Battlemage 0xE2xx and Mesa ANV; 64 on older/integrated Intel Windows families)("(long long)policy_rule::equal_depth_bias(VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS, 0xE20Cu)", 0),Check the exact float result. A return of 0.5f truncates to 0 here and in the PC fixtures but still activates LESS_OR_EQUAL in the renderer.
@ -32,1 +31,3 @@raise SystemExit("the margin is not on by default on Intel's Windows driver only")if "p.equal_depth_bias = policy_rule::equal_depth_bias(f.driver_id, f.device_id);" not in policy:raise SystemExit("the margin is not computed by policy_rule::equal_depth_bias")eq_rule = block(policy, "inline float equal_depth_bias(VkDriverId driver, uint32_t device)")Nit. The compiled fixture can own the rule's behavior. Keep this source check focused on the policy wiring and draw-state guard so an equivalent rewrite of the helper needn't update literal snippets.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.