What was the first version of zdoom to use sse2 for sw mode?

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
invictius
Posts: 429
Joined: Fri Aug 03, 2012 6:44 am

What was the first version of zdoom to use sse2 for sw mode?

Post by invictius »

^topic
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: What was the first version of zdoom to use sse2 for sw m

Post by Graf Zahl »

All versions which have the true color renderer. The paletted software renderer does not use SSE2.
invictius
Posts: 429
Joined: Fri Aug 03, 2012 6:44 am

Re: What was the first version of zdoom to use sse2 for sw m

Post by invictius »

Graf Zahl wrote:All versions which have the true color renderer. The paletted software renderer does not use SSE2.
Is the truecolor renderer only in a fork? This is all I've found about it so far: viewtopic.php?f=34&t=52270
User avatar
Rachael
Posts: 13532
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: What was the first version of zdoom to use sse2 for sw m

Post by Rachael »

What exactly are you trying to find out?

That pull request is what started QZDoom. I forked from GZDoom and pulled both together to create QZDoom. After that, myself and dpJudas (mostly dpJudas) worked together to fix problems and try to improve the renderer. After a while, Graf expressed his interest in merging it back to GZDoom and we prepared the source for that and everything got merged into GZDoom before 3.0.0. In all iterations the true-color renderer has always required SSE2.

Are you unable to use SSE2 for some reason? Why didn't you say anything in this thread if that issue was so important to you?
invictius
Posts: 429
Joined: Fri Aug 03, 2012 6:44 am

Re: What was the first version of zdoom to use sse2 for sw m

Post by invictius »

Rachael wrote:What exactly are you trying to find out?

That pull request is what started QZDoom. I forked from GZDoom and pulled both together to create QZDoom. After that, myself and dpJudas (mostly dpJudas) worked together to fix problems and try to improve the renderer. After a while, Graf expressed his interest in merging it back to GZDoom and we prepared the source for that and everything got merged into GZDoom before 3.0.0. In all iterations the true-color renderer has always required SSE2.

Are you unable to use SSE2 for some reason? Why didn't you say anything in this thread if that issue was so important to you?
You compiled a version of gzdoom (for me to run in sw mode) without sse2 for me a while ago as I was interested in seeing the performance difference. I ran a timedemo of planisphere 2 and there was only about a 12% difference. I can't tell whether the power of my sole 64-bit system is so much that it makes the sse2 boost meaningless, or if the boost it gets really is only 12% across all systems. The version you compiled for me was 64 bit only, I'd like to be able to run it on a 32 bit system where the single core performance is about 30% the speed of my aforementioned 64 bit system, any better performing than that and I won't be able to accurately gauge the performance benefit of sse2.

Tl;dr could you please compile a 32-bit version (preferably zdoom) that doesn't have sse2? I don't think you can actually disable the instruction set at a hardware level.
User avatar
Rachael
Posts: 13532
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: What was the first version of zdoom to use sse2 for sw m

Post by Rachael »

I'll have something for you, soon. I was busy so I didn't get to reading my PM's until recently.

EDIT: https://mega.nz/#!RUczjI6L!duuHTbFghijY ... aMPZIi2hOM
invictius
Posts: 429
Joined: Fri Aug 03, 2012 6:44 am

Re: What was the first version of zdoom to use sse2 for sw m

Post by invictius »

Rachael wrote:I'll have something for you, soon. I was busy so I didn't get to reading my PM's until recently.

EDIT: https://mega.nz/#!RUczjI6L!duuHTbFghijY ... aMPZIi2hOM
Thanks, does the linux port implement sse2 - just out of interest?
User avatar
Rachael
Posts: 13532
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: What was the first version of zdoom to use sse2 for sw m

Post by Rachael »

Yes, it does. You must pass -DNO_SSE into CMake or compile on a non-x86 device to not have it.
dpJudas
 
 
Posts: 3037
Joined: Sat May 28, 2016 1:01 pm

Re: What was the first version of zdoom to use sse2 for sw m

Post by dpJudas »

The performance difference on my computer is as follows:

i7-4770S, 1920x1080, 64bit, OpenGL framebuffer, E1M1 start:

no sse2: 11.7ms (85 fps)
sse2: 5.2ms (192 fps)

Speed gain: 125%

It is probably worth mentioning that SSE is only used in the drawers. If the rendering is slow due to general scene complexity then the speed advantage won't be as big. E1M1 is excellent for drawer speed testing as it has very low scene complexity - it is almost all drawer time.
Last edited by dpJudas on Sun May 21, 2017 8:27 am, edited 1 time in total.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: What was the first version of zdoom to use sse2 for sw m

Post by _mental_ »

Support for SSE instructions when building with GNU-compatible toolchain (i.e. GCC and Clang) is automatically detected.
I added it for and tested on PowerPC only but it should work on other architectures too.
invictius
Posts: 429
Joined: Fri Aug 03, 2012 6:44 am

Re: What was the first version of zdoom to use sse2 for sw m

Post by invictius »

Rachael wrote:I'll have something for you, soon. I was busy so I didn't get to reading my PM's until recently.

EDIT: https://mega.nz/#!RUczjI6L!duuHTbFghijY ... aMPZIi2hOM
Doesn't appear to like xp:

Image

If you're unable to fix it, do you know of any vista/7 live cd's that I could run it off of?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: What was the first version of zdoom to use sse2 for sw m

Post by Graf Zahl »

This function is available since XP SP 3. What dinosaur system are you running?
invictius
Posts: 429
Joined: Fri Aug 03, 2012 6:44 am

Re: What was the first version of zdoom to use sse2 for sw m

Post by invictius »

Graf Zahl wrote:This function is available since XP SP 3. What dinosaur system are you running?
P4-540 3.2, don't think I bothered to put sp3 on it. It's just used for games that simply won't work on 7 properly.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: What was the first version of zdoom to use sse2 for sw m

Post by Graf Zahl »

Ok. That'll mean, of course, that it won't run anything built with MSVC 2013 and later.
User avatar
Rachael
Posts: 13532
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: What was the first version of zdoom to use sse2 for sw m

Post by Rachael »

I can tell by the window color and shape that it is indeed Windows XP, but Graf's right - it must be an old version, because...

Code: Select all

CMakeCache.txt:CMAKE_GENERATOR_TOOLSET:INTERNAL=v140_xp
That's what it was compiled with.

I trust dpJudas's numbers even if they came from a more modern processor. I've made the builds as you asked but honestly this issue is not worth that much effort for me - if you get it working, great, if not, I am not making any special effort to get that working on any pre-SP3 system, it's really not that important to me. Even on your more modern system you've shown that SSE2 builds are faster - case closed.

That's not to say the non-SSE code can't be optimized - I am sure there's a few tricks that can be done to make it run faster - but I don't think it's worth it, at this point anyhow, I don't think there is much gain to be had in doing so. The code is there for readability and understandability of what it's actually doing - not for being actually used in a real-world scenario where time is critical in these steps.

If you want to use your own compiler, simply insert "#define NO_SSE" at the top of the files "src/swrenderer/r_all.cpp" and "src/polyrenderer/poly_all.cpp" - that's exactly how the no-sse build was compiled in both cases.
Post Reply

Return to “General”