#265

I have this white glitches when im near at any fire torch or when im using fire skills.. please fix sir ty

Openjblitzyta-labopened 15d ago

哪一步出的问题 / Which step fails

你的环境 / Your setup

  • 电脑与系统 / Computer and OS:
  • Xcode 版本(如果用了)/ Xcode version (if used):
  • 手机型号与系统版本 / Phone model and iOS version:
  • 签名用的账号类型:付费 / 免费 / 自签工具 / Signing: paid account / free account / sideloading tool:
  • 仓库的提交号 / Commit of this repository:

./setup.sh check 的输出 / Output of ./setup.sh check

(贴在这里 / paste here)

发生了什么 / What happened

日志 / Log

Activity

10
tranco44715d ago

Same problem for me too. Any fire effect, fire spell effect etc, have a weird graphical glitch, white squares, rainbow squares,,, game is unplayable.

Device is a z fold 3. so adreno 660.. its probably a qualcom driver bug, and this app would benefit from the possibility to change the stock hard coded drivers to turnip.

Diablo-chia61915d ago

This looks like the same family as #256, so a few data points that may save you time.

What we see on an Adreno 830 (OnePlus Ace 5 Pro, Android 16): the artefact is not a soft bloom or a texture problem — it is a set of hard-edged rectangles that fill whole lighting tiles (74.25 × 54 px on a 2376 × 1080 output, a 32 × 20 grid), and they only ever appear in the top four tile rows. Going through the frames one by one, the same tile can be black where the scene is lit (lava, camp fires) — a white version of the same thing is entirely plausible, since a tile whose light list is empty goes dark in a lit scene and stays unlit / over-bright in a dark one. That is a guess, not a conclusion.

The useful bit: it follows the driver, not the engine build. On the same phone, same game files, same character, same waypoint, switching only the Vulkan driver changes the result:

  • stock Qualcomm driver (API=1.3, Driver Build a97e8c1cc4…): black tiles in the top band, reproducible
  • Mesa Turnip T30 (api=1.4.359, device string carries (git-xxxxxxxx)/unknown): clean in 98 s of 61 fps capture at Flame River and the ice path

So before chasing shaders or art, it is worth checking whether your device's driver is the variable. A cheap way to confirm the driver in use, without trusting any UI:

adb shell run-as <package> grep -a 'NVN caps device' files/dm/boot.log | tail -1

Three questions that would narrow yours down:

  1. Which phone/GPU, and what does that NVN caps device line say?
  2. Are the white patches tile-aligned — do their edges snap to a regular grid, and do they stop at a fixed horizontal line? (On our screen the change always ends at exactly y = 216 = 4 × 54.)
  3. Does it happen only near fire, or also near other bright sources (lava, torches, braziers, lightning)?

If you want to A/B a Turnip build: I publish the Android package I use myself on my fork — https://github.com/Diablo-chia619/d2r-mobile/releases/tag/own-2.3.0-t30-1 (source: android/turnip-and-stick branch, change log in OWN-CHANGES.zh-CN.md). It contains no game content — only the compatibility layer, a launcher icon and an open-source Vulkan driver (Mesa/Turnip, MIT); the game files and the import pack are your own. It is built from upstream v2.3.0 sources with a different application id, so it installs next to the official app and keeps its own saves; the driver is switched with DM_GPU_DRIVER=turnip in files/dm/env (remove it to fall back to the system driver).

Caveat: verified on one phone only (Adreno 830). If your device is an older Adreno, a Turnip build may not be an option at all — in that case the data points above are still useful for the maintainer.

tranco44715d ago

yea i dunno, im no programmer, you may have also replied in latin.

i only know that the game works perfectly on the s24 ultra... it DOESNT on the z fold 3, and the s22 ultra with the exynos 2200.

on the z fold 3, graphical glitches, tested this on 2 identical z fold 3s, so this is a 100% problem, imo, but the fps is good, perfectly playable, were not for the graphical errors. you can play a warrior instead of a mage, but the graphical glitches are there nevertheless...annoying.

on the exynos 2200, instant crash, game doesnt even launch, so those who got ripped off by samsung with the s22 ultra exynos variant...that sucks.

i would prefer the big screen of the z fold 3, as its much better for isometric rpgs.

but its definitely the stock android adreno 660 gpu driver.. as emulating the switch iso instead of this apk, diablo 2 resurrected works perfectly on the z fold 3, with the proper turnip driver and the proper emulator...only,,,this jhaizhou apk is so much better than emulation,

--- this is all that i did my testing with this default 2.30 version today. im going to try your turnip fork, and see if it fixes this and let you know if youre interested, thanks :)

REPLY: ---TESTED your fork...NOPE, same visual glitch, no difference. what turnip are you using

NaceurBouhamed5d ago

Data point from an Adreno 650 (Xiaomi Mi 10T, Android 12, stock driver 512.502 / api=1.1.128), built from main + #282:

  • Stock driver: the fire/smoke squares are there. The log shows NVN pipeline c:098a126f92bf533a failed to build (result=-13); turning gfx-warp32 off doesn't change it.
  • Why it fails: I compiled the final SPIR-V (dumped just before vkCreateShaderModule) with a small standalone Vulkan program on the phone. The driver accepts it when the shader keeps any 1–4 of its 8 OpGroupNonUniformBallots and rejects it with all 8. So it looks like a compiler limit or bug in that driver version, not one bad instruction. An exact rewrite (each ballot(true) moved before its branch as ballot(cond) and computed with two subgroupOr reductions) passes spirv-val and compiles. But the fire still looked wrong in game, so this shader may not be the only problem on that driver.
  • Turnip fixes it: I loaded Mesa Turnip T30 (api=1.4.359) through libadrenotools. On this phone that needed a small change: libdm.so no longer links libvulkan.so, and its 117 Vulkan imports forward to the selected driver. With Turnip, fire, smoke, characters and the camp all render correctly, and the game plays fine.

So for #292: on Adreno 6xx, a driver option does fix this one. I'm happy to share the loader change as a PR if that's of interest.

yyan1604d ago

@NaceurBouhamed Thanks, this is the clearest explanation yet of the fire/smoke squares on Adreno 6xx. It matches #266: on an Adreno 660, 098a126f92bf533a also fails with -13, even with inlining (#287).

  • The ballot limit: an exact rewrite would fit as a load-time rewrite in the engine, limited to Adreno 6xx like the existing quad/warp32 rewrites, with a marker to turn it off. Since the fire still looked wrong with it, could you post the log from that run? It would show whether 098a then builds and whether another shader still fails or is skipped (failed to build / gfx-pipe-skip lines).
  • Turnip: loading a custom driver changes how libdm.so links Vulkan on every Android phone, so that's the maintainer's call (@jhaizhou-ops). An opt-in PR (off by default, with the player supplying the driver) would be the easiest to review. See also #292.

If you open either PR, we can run it on an Adreno 730 and an 830 to check nothing changes there.

jhaizhou-ops4d ago

v2.3.5 is out with Adreno 6xx inlining by default (#287) and the fragment-subgroup fix (#282), both by @yyan160. On some 6xx drivers the fire / smoke shader 098a126f92bf533a still fails to build (result=-13), so those effects can still look wrong there. @NaceurBouhamed's analysis of the ballot limit points to the next fix, a load-time rewrite for the 6xx; that work continues here. A log from v2.3.5 (adb logcat -d -s dm) from a fire scene helps us check each driver.

N1v0k1d ago

I fixed it with my version, you can also load custom drivers that may fix any other graphical issues

https://github.com/N1v0k/D2R-Rakanishu/releases/tag/v1.0.0

yyan1601d ago

@N1v0k Thanks. What does your version change for the Adreno 6xx fire / smoke squares? The cause is known here: @NaceurBouhamed found that the fluid shader 098a126f92bf533a hits a ballot-count limit in older Adreno drivers. Either a load-time rewrite of that shader or loading a newer driver such as Turnip fixes it. If your fork does one of those, a PR here would get it reviewed and into the releases for everyone.

N1v0k1d ago

@yyan160 loading turnip drivers solved it for me. My code is public, feel free to cherry pick.

yyan1601d ago

@N1v0k Thanks, good to know Turnip fixes it on your phone too. Since your code is public, could you open it here as a PR, with driver loading opt-in and players supplying the driver themselves? That keeps you as the author and gets it reviewed. Loading a different driver changes how the app talks to Vulkan on every Android phone, so @jhaizhou-ops has the final say. @NaceurBouhamed offered a loader too, so it may be worth comparing the two first.