Jump to content
The Dark Mod Forums

Render bug, large black box occluding screen


V-Man339

Recommended Posts

Some more information after second session:

  1. Checking both colorModulate and colorAdd for NaN and resetting them if they are NaN seems to fix the issue. Fixing only one of these two parameters is not enough, although some glitches go away.
  2. The issue does not depend on gameplay modelling: timescale and g_stopTime does not stop or change flickering.
  3. The issue does not happen if one sets "r_useMultiDrawIndirect 0" on the new backend.
  4. The issue does not happen with "r_useMultiDrawIndirect 1" if I hardcode "maxBatchSize = 1" in DrawBatchExecutor::EnsureAvailableStorageInBuffers, but it happens if I hardcode "maxBatchSize = 2".

Also, there is absolutely no possibility to put NaNs into the two considered uniforms in C++ code, only -1, 0, 1 values are set in all cases. But nobody can be totally sure that the complicated framework of new backend does not spoil the data somehow, or does not mess up the syncing.

So the bottom line is: this issue is caused by "multi draw indirect" code path in the new backend, and only happens when you actually render several "draws" (at least 2) at once.

UPDATE: Oh yeah, and the last point:

      5. We did not manage to reproduce the problem on Debug With Inlines build, only on Release one. So I suppose it is timing-sensitive. Which means that it is hell even telling when it stops happening because it logically does not happen and when it stops happening simply because timings have changed.

UPDATE: Of course, there is another possible reason for Debug vs Release difference. Perhaps we messed something up with memory (aka "undefined behavior"), and this only breaks things when several other factors contribute (like Windows 11 heap for example).

  • Thanks 1
Link to comment
Share on other sites

I just pointed out that in Iris beta, I lose almost 100 fps going to old backend

BUT!!!! Once this crazy market for GPU's comes down a little bit more, I will be upgrading to an Nvidia card, like 3080ti or something like that.

 

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

Hey, I don't recall 100 fps difference!
But something like 160 vs 180 or 160 vs 190 was definitely there, I confirm.

That's without stuff like "single-pass shadow maps", and even without "multi draw indirect".
But... @AluminumHaste renamed executable to Doom3BFG.exe to get some crazy FPS boost.
Driver programmers are 100% mad 😲

Link to comment
Share on other sites

Another reason not to use AMD, stupid driver hacks like that.

Not just darkmod. ANY older OpenGL game.

Wrath Aeon of Ruin (base on DarkPlaces OpenGL Quake 1 port) gets extra 100 fps. Naming it DoomX64.exe (doom 2016 opengl) gets +150FPS but with rendering bugs.

There's so many of them, it's basically a go to for any older opengl title.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

24 minutes ago, AluminumHaste said:

Vulkan on AMD does run spectacularly.

How hard would it be to back port our modifications to this code base?

https://github.com/DustinHLand/vkDOOM3

Given that TDM is based on the older non-BFG code base and has then been heavily modified, I would guess very hard. It's good for inspiration, no doubt, but a direct copy is out of the question.

  • Sad 1
Link to comment
Share on other sites

27 minutes ago, AluminumHaste said:

With shadow maps, I lose about 10-15 fps

Sounds like the new backend with multi-draw enabled still wins by 85FPS over the old backend. We can probably just disable multi-draw by default and have a friendly user experience until 2.11 where we decide whether to fix it further or take another approach.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

So interestingly, on the computer with the i7 4770k and EVGA 980ti, I get worse performance with r_shadowmapsinglepass 1 by about 8 fps.

r_usemultidrawIndirect set to 0 or 1 makes no difference, maybe 1-2 fps.

Bizarre the AMD's architecture is so sensitive to the changes but Nivida's is not.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

FPS is often bad measure.
You have frontend thread and workers running in parallel: if they are slower, then backend performance does not matter.

The "new backend" took about a year, and it only changes a small part of OpenGL code. I think a lot of old OpenGL code is still around. You won't be able to mix old and new code with Vulkan, so better stop dreaming 😁

Disabling multidrawindirect sounds like an option: it is not as risky as switching back to the old backend. Although it would be great if at least one more beta tester reported the same problem...

Link to comment
Share on other sites

AMD's opengl has allways been a bad toothache among users, the problem however is not that it is broken it actually follows the khronos spec quite closely more so in fact than nvidia. There is a lot of info on the net about why it usually fails on things nvidia handles without problems.

Link to comment
Share on other sites

I opened 2 support tickets with AMD about the bindless texture issue, but never heard back.

EDIT: even this guy had to solve his own problem, with no one chiming in.

https://community.amd.com/t5/drivers-software/driver-apparently-does-not-implement-arb-bindless-texture/td-p/413689

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

  • 4 months later...

@stgatilov @duzenko @nbohr1more

So, AMD made big changes to their OpenGL driver 2 updates ago. I can confirm that all these bugs are gone for me on driver 22.5.2.

https://overclock3d.net/news/gpu_displays/radeon_s_targeting_poor_opengl_performance_with_a_future_amd_software_release/1

Bindless textures work as normal, no weird green tinge.
multidrawindirect set 1 causes an FPS boost with no visual glitches

  • Like 1

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
    • Ansome

      Well then, it's been about a week since I released my first FM and I must say that I was very pleasantly surprised by its reception. I had expected half as much interest in my short little FM as I received and even less when it came to positive feedback, but I am glad that the aspects of my mission that I put the most heart into were often the most appreciated. It was also delightful to read plenty of honest criticism and helpful feedback, as I've already been given plenty of useful pointers on improving my brushwork, level design, and gameplay difficulty.
      I've gotten back into the groove of chipping away at my reading and game list, as well as the endless FM catalogue here, but I may very well try my hand at the 15th anniversary contest should it materialize. That is assuming my eyes are ready for a few more months of Dark Radiant's bright interface while burning the midnight oil, of course!
      · 4 replies
×
×
  • Create New...