Jump to content
The Dark Mod Forums

Recommended Posts

Posted

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
Posted

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
Posted

Sorry im afraid my astyle plugin was set to automatic :/ i have it turned off now, so if i want to format i will have to do it manually document by document.

 

Still need to setup a few things in my environment.

Posted

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 ?

Posted

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.

  • 2 weeks later...
Posted

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
Posted

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
Posted

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.

Posted

Can you update the beta binaries nbohr?

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Posted

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.

Posted

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.

Posted

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
Posted

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
Posted

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...)

Posted

The image contains no logic changes but improves the code readability by adding some curlies.

You understand that it leads to numerous unnecessary merge conflicts in branches other than trunk?

Posted

Btw. speaking of other debug commands not working properly in 2.06, r_showTris 1-3 displays glitches and artifacts when looking through visportals. Weird thing is that this bug doesn't appear on screenshots.

Posted

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 ?

Posted

This is with FBO on, I can't test it switched off as I have nvidia card where it's forced to be on.

Posted

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.

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...