-
Notifications
You must be signed in to change notification settings - Fork 968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Metal/Intel] Shadow example rendering glitch #103
Comments
Thanks for filing! On the first sight, it looks like a driver bug. |
Thanks. I did as you suggested and ran with Metal validation enabled (this was on by default) but nothing appeared in the log. If it is a driver issue I assume there's not much I can do about it? Side-note: I have experimented with MoltenVK in the past but I'm not sure if this would affect anything. Running a GPU capture, the issue seems to crop up right near the last call; the call just before this one looks fine (see below): |
If metal validation finds something, you get a crash/breakpoint when running from XCode, so it's difficult to ignore :) If we confirm this to be a driver issue, we can submit a bug to Apple. I've had some success in them addressing the issues.
That is interesting. The artifacts are visible on the result of more than one draw call. Could you save the capture to disk and send it over to me by, say, Firefox Send? Please share the link in our gitter where we generally discuss things. |
In case it's relevant: under System Report the NVIDIA GeForce GT 650M shows |
Filed bug 48911699 on Apple radar for this. |
FWIW, I see the same behavior on macOS with the Intel chipset.
|
Yeah it happens on the motherboard GPU (Intel) not with the dedicated GPU, at least not with @jasondavies gpu (I got the same) So mention of |
AFAICT, this example was broken on dedicated GPUs (Radeon Pro 560 4 GB in my case; patching When I bisected this, the bad commit was #172 I haven't tried to investigate further. It looks like something in
More info: This is running on a different laptop from the one I reported earlier. Here are its specs:
|
@parasyte thank you for the data! I'm quite puzzled here. Looking at a GPU capture on Intel, I see that rendering into layers of the shadow is totally correct, but the texture looks wrong when it's being sampled from. End of rendering (to layer 0): My guess is that Apple runtime and/or driver doesn't insert proper transition barriers for the case of rendering being done to layers of a 2D array depth texture. I'd expect this to be a responsibility of the driver, in which case having it wrong in multiple IHVs is strange. Perhaps, it's Metal runtime that fails? @litherum fyi, this was filed on the radar as 48911699 (also got assigned FB5398663) for NVidia, but it appears to affect other vendors as well. Please let us know if there is anything we can provide. Reproducing today is easy:
|
3115: [mtl] Properly set store operation for depth attachment r=kvark a=cbrewster Found this while looking into gfx-rs/wgpu#103. Looks like this was a copy-paste mistake, this partially fixes the wgpu shadow example on mac. PR checklist: - [x] `make` succeeds (on macOS) - [x] `make reftests` succeeds - [ ] tested examples with the following backends: - [x] `rustfmt` run on changed code Co-authored-by: Connor Brewster <connor.brewster@eagles.oc.edu>
Whats the latest with this issue? On latest of Big Sur and using Intel Iris Pro graphics and it seems to have a similar rendering bug. Were any fixes applied by Apple?
|
@tomgreen66 I filed this issue years ago, and it got resolved by Apple. But apparently their fix only starts kicking in on a second frame, while the testing infrastructure has the first frame, which shows the same issue... So it's still a bug on Apple, but we need to report it again. And technically it's harmlesss. |
* Add multi line comment support to glsl-new * Fix glsl-new TokenMetadata for multi line comments
I'm going to close this, pending reproduction on up to date wgou/metal. |
People seem to easily reproduce in bevyengine/bevy#3315. I asked if someone there could put up a wgpu repro. |
macOS 10.14.3
MacBook Pro (Retina, Mid 2012)
NVIDIA GeForce GT 650M 1024 MB
rustc 1.35.0-nightly (e68bf8ae1 2019-03-11)
Latest wgpu master at time of writing (9f70c2e)
cargo run --release --bin shadow --features=metal
I'd be happy to dig deeper but I'm not sure of the best place to start.
The text was updated successfully, but these errors were encountered: