Broken geometry on macOS Intel

Moderator: GZDoom Developers

Broken geometry on macOS Intel

Postby _mental_ » Sat Jun 15, 2019 9:00 am

I encountered a very specific hardware/driver issue, and I unable to fix it.

In very specific map spots with complex geometry, sector's floor and/or ceiling is rendered incorrectly.
The bug is limited to Intel Iris Pro integrated GPU and macOS. NVIDIA GPU in the same Mac isn't affected.

Screenshot_Doom_20190615_163522.jpg

Somehow, it's tightly coupled with sky rendering. When sky is visible, everything is correct.
Both screenshots were taken in the same map spot with slightly different angle.

Screenshot_Doom_20190615_163526.jpg

It's this map from Vinesauce Doom Mapping Contest II: Hellectric Boogaloo.
Code: Select allExpand view
-iwad doom2 -file bloodmind90x.-.Fists.in.Blood.2.by.Bloodmind90x.aka.Hevn.Demonic.pk3 +map map01 +warp 540 920 -nomonsters +noclip +god

With gl_no_skyclear CVAR set, broken geometry persists regardless of sky portal in view.
Curiously enough, Metal GPU capture in Xcode shows recorded frame without an issue.

At the moment, I have no idea what else I can check. Any advice will greatly appreciated.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Broken geometry on macOS Intel

Postby dpJudas » Sat Jun 15, 2019 11:29 am

I'm not really sure what could be causing this. It renders the entire scene in one render pass where it switches between pipeline objects (unless flushed, but then its starts a new immediately after). Inside a single subpass (which we only have one) the render order is guaranteed without a need for the application to set up any barriers.

My best bet would be an uninitialized variable, or a state variable that doesn't get reset properly. But which one? It looks like on the first screenshot that some vertex gets the wrong position as the textures don't match. It doesn't look completely corrupted though as the texture change makes it seem like a different valid vertex got used instead. Which primitive draw type does the ceiling use?
dpJudas
 
 
 
Joined: 28 May 2016

Re: Broken geometry on macOS Intel

Postby dpJudas » Sat Jun 15, 2019 11:38 am

If the draw type for the ceiling is DT_TriangleFan there's also the possibility that this line doesn't get executed. It could perhaps leave it in a situation where the drawIndexed call isn't using DT_Triangles as expected. It might be worth extending it with a mPipelineKey.DrawType != DT_Triangles check, just in case that's the reason.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Broken geometry on macOS Intel

Postby _mental_ » Sun Jun 16, 2019 4:23 am

That broken ceiling is rendered via triangle list. Also, floor of the same sector uses triangles too, but it's rendered properly.

At first, I suspected a bug in MoltenVK or in specific render state we have for it.
Although, it's not the case as everything is rendered correctly on the same Mac using NVIDIA GPU.
Validation layers are silent regardless of active graphics hardware.
_mental_
 
 
 
Joined: 07 Aug 2011


Return to Vulkan Renderer Bugs

Who is online

Users browsing this forum: No registered users and 1 guest