Jump to content
The Dark Mod Forums

TDM Engine Development Page


zergrush

Recommended Posts

Oh forgot fixed warnings in libpng ldap ffmpeg and openal.

Fixing warning in third-party libraries is not a good idea, since you usually don't control them (and next library update will revert all your fixes).

Better reduce warnings level or use pragma warnings to remove them.

Starting from TDM 2.06, all third-party libraries are compiled as a part of ExtLibs, so we don't even suppress any third-party warnings now --- ExtLibs is almost never recompiled, so they don't bother anyone.

 

Yikes the msvc profiler for msvc 2013 and upto 2017 is broken on win 7 with the latest update and theres no plans on fixing it.

It will hard reset your pc if run and probably ruin the solution files as well, just a warning.

I hit this issue on my work machine.

The problem is caused by Spectre/Meltdown mitigations, which break profiler driver on Windows 7.

You can disable these mitigations (leaving your OS vulnerable to potential Spectre/Meltdown exploits) to make profiler work. More details here (or here).

  • Like 1
Link to comment
Share on other sites

True, got a little carried away there :).

 

So the spectre/meltdown patches strike again...

had a number of those problems, luckily most where fixed in later updates to some programs i used but sheesh microsoft wont even fix the problem in there own software in an OS they still support (atleast untill im forced to use that abomination they made with Win10) sigh...

  • Like 1
Link to comment
Share on other sites

Btw i made an experiment of moving the depthcopy code to FBO like this

void FB_CopyDepthBuffer() { // AA off: already have depth texture attached to FBO. AA on: need to blit from multisampled storage
	if ( primaryOn && r_multiSamples.GetInteger() > 1 ) {
		FB_ResolveMultisampling( GL_DEPTH_BUFFER_BIT );
	} else {
		globalImages->currentDepthImage->CopyDepthBuffer(
			backEnd.viewDef->viewport.x1,
			backEnd.viewDef->viewport.y1,
			backEnd.viewDef->viewport.x2 -
			backEnd.viewDef->viewport.x1 + 1,
			backEnd.viewDef->viewport.y2 -
			backEnd.viewDef->viewport.y1 + 1, true);
	}
}

so a bit like the colorbuffer code just above which also ment i could remove the r_useFBO cvar check and simplify the code a great deal.

It seems to work when i test it in game, but are there any specific test maps avaliable where i can check to make sure that it works for certain ?

Link to comment
Share on other sites

Btw i made an experiment of moving the depthcopy code to FBO like this

void FB_CopyDepthBuffer() { // AA off: already have depth texture attached to FBO. AA on: need to blit from multisampled storage
	if ( primaryOn && r_multiSamples.GetInteger() > 1 ) {
		FB_ResolveMultisampling( GL_DEPTH_BUFFER_BIT );
	} else {
		globalImages->currentDepthImage->CopyDepthBuffer(
			backEnd.viewDef->viewport.x1,
			backEnd.viewDef->viewport.y1,
			backEnd.viewDef->viewport.x2 -
			backEnd.viewDef->viewport.x1 + 1,
			backEnd.viewDef->viewport.y2 -
			backEnd.viewDef->viewport.y1 + 1, true);
	}
}

so a bit like the colorbuffer code just above which also ment i could remove the r_useFBO cvar check and simplify the code a great deal.

It seems to work when i test it in game, but are there any specific test maps avaliable where i can check to make sure that it works for certain ?

That's an extra copy of depth buffer. It may not change anything visually but it will increase GPU load and potentially affect FPS when AA is off.

Link to comment
Share on other sites

  • 2 weeks later...

Ok upped my recent changes.

Fixed an attempt at minimizing scissoring in tr_render.cpp.

Non FBO DepthCopy and FrameCopy refined a bit.

Now using c++11 nullptr in places where NULL was used, In C++ NULL is not a pointer to 0 but an octal integer 0 in C NULL is a pointer to 0 but that does not apply to C++.

Fixed a function which was shadowed by another function of the same name.

Made some changes to make lightdepthbounds more uniform, cut down on having to use the same cvar all over to one.

Added lightdepthbounds to the GLSL renderers stencil shadow part also since it was missing there, was this intentional ?. (no adverse effects and i tested it extensively so id reckon no, but who knows).

Reordered a few ugly externs, i hope the readability is a bit better now :).

  • Like 1
Link to comment
Share on other sites

Ok upped my recent changes.

Fixed an attempt at minimizing scissoring in tr_render.cpp.

Non FBO DepthCopy and FrameCopy refined a bit.

Now using c++11 nullptr in places where NULL was used, In C++ NULL is not a pointer to 0 but an octal integer 0 in C NULL is a pointer to 0 but that does not apply to C++.

Fixed a function which was shadowed by another function of the same name.

Made some changes to make lightdepthbounds more uniform, cut down on having to use the same cvar all over to one.

Added lightdepthbounds to the GLSL renderers stencil shadow part also since it was missing there, was this intentional ?. (no adverse effects and i tested it extensively so id reckon no, but who knows).

Reordered a few ugly externs, i hope the readability is a bit better now :).

E.g. this part (image attached)

 

What was changed here and with what intent?

 

99% of that massive commit looks like re-formatting. It's impossible to understand what logic was actually changed.

post-3508-0-73504900-1534270444_thumb.png

  • Like 1
Link to comment
Share on other sites

Look for revelator in the comments, i commented the changes extensively.

Some formatting also took place to improve readability.

 

I will allways comment my changes in case formatting screws up where the real changes are.

 

lots more changes really but i left out the fixes for warnings in extlib since as we discussed they might change a lot with updates to curl jpeg png ldap etc,

so next time one of those libraries gets updated all those changes would have to be redone anyway.

Link to comment
Share on other sites

This might have been the culprit causing underwater to break ->

 

RB_DrawElementsWithCounters.

 

since this function was shadowed by a function of the same name but using 32 bit unsigned integers instead for the experimental multidraw function.

 

I renamed that one to RB_DrawElementsWithCountersBaseVertex.

 

It takes two arguments instead of one so it might have been ok to overload it but PVS studio bitched rather loudly about it so i went with the safer approach.

 

This was btw the only place it was used RB_FillDepthBuffer_Multi.

Link to comment
Share on other sites

Tried RB_FillDepthBuffer_Multi just for fun and it works sorta, it breaks skyportals so thats not so good but might be fixable.

 

Moving to batch rendering would be a nice goal though :)

 

I was also wondering if i should modify the whole shebang to use glew instead of the old way ?, it would not benefit us any performance wise but it would cut down on quite a lot of the clutter.

 

But it would also add to the complexity of the build scripts for linux since many distros use old versions of that library, so im a little conflicted.

Link to comment
Share on other sites

Replaced old TGA code with the more recent TGA2 code, benefit is that we no longer require the image flipping code hacks that has plaged TGA for years.

Also it supports way more formats ;) 8, 15 ,16 ,24, 32 bit with RLE or without.

 

Visually it's a bit crisper, but nothing fancy.

  • Like 3
Link to comment
Share on other sites

Since the engine supports loading bitmaps, i do actually have code for loading those from compiled resources.

While not exactly nessesary, one could use it for loading static images such as the background of the loading screen from the game dll.

Or it could also be used for loading default particlefonts without the need for any externals,

unless the mapper actually wants to use a non default particlefont, in which case they can be overridden.

 

I would adwise against loading all textures this way though since the exe would take on dimensions that only a 64 bit OS would be able to handle (think 100's of mb's or even gb's).

It was originally used in a quake engine of mine for particles and effects such as underwater caustics.

  • Like 1
Link to comment
Share on other sites

I didn't see any performance regressions in the little testing I did last night.

So far so good.

 

I was gonna check on the disposition of this tracker:

 

http://bugs.thedarkmod.com/view.php?id=4697

 

I fixed some of these myself, but my fixes are a little bit hacky.

 

If you wanna take a gander and improve things, that would be near the top of our remaining 2.07 priorities on the render side.

 

I'll post binaries to Moddb tonight.

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

Yeah formatting can be dangerous, for one do not ever use it on inline assembler code or you will have a mess on hand the likes which you would probably not like to fix again.

Ill keep further changes unformatted.

 

r_showtris bugs out ?, does this happen with FBO on or off or both ?

Link to comment
Share on other sites

I see what you mean now, looks like theres a broken mirror smacked up on the viewport.

 

Looks like the debug tool code has not been converted to use vertex attributes yet, not sure if that would cause this kind of breakage but its worth looking into, especially since most of the renderer is now GLSL based.

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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • 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
×
×
  • Create New...