Page 1 of 1

[2.1.1] Bug : Broken HQNx algorithms (in comp. to 2.0.05)

Posted: Sun Apr 03, 2016 18:33
by theleo_ua
1) Run GZdoom 2.1.1 and 2.0.05 with -iwad heretic.wad
2) type "summon crossbow"
3) Choose next options: http://storage7.static.itmages.ru/i/16/ ... da66ff.png
4) Observe, that crossbow is displayed incorrectly in 2.1.1 (in comparison to 2.0.05), see screenshot above

NOTE: please dont pay attention to "mmx" option in screenshot, because bug reproduced on both "hq4x" and "hq4x mmx" options in 2.1.1

NOTE2: same bug was in 1.8.7 (and wasn't in 2.0.03)

Re: [2.1.1] Bug : Broken HQNx algorithms (in comp. to 2.0.05

Posted: Mon Apr 04, 2016 10:17
by _mental_
I made a pull request with the fix. I could commit it by myself, but looks like that damn alpha check is cursed :evil: I will be glad if someone else will verify the fix.

Re: [2.1.1] Bug : Broken HQNx algorithms (in comp. to 2.0.05

Posted: Mon Apr 04, 2016 12:16
by Graf Zahl
Why did you shuffle around the meanings of the values in the first place? That was the source of all the problems, it seems.

Re: [2.1.1] Bug : Broken HQNx algorithms (in comp. to 2.0.05

Posted: Mon Apr 04, 2016 12:50
by _mental_
Graf Zahl wrote:Why did you shuffle around the meanings of the values in the first place? That was the source of all the problems, it seems.
Where did I do so? In commit message?

Re: [2.1.1] Bug : Broken HQNx algorithms (in comp. to 2.0.05

Posted: Mon Apr 04, 2016 18:24
by Graf Zahl
Not this time. In earlier versions 4-6 and 7-9 were swapped and at some point - I think when the asm versions were replaced - they were changed. And this was causing the problems because all the checks were not changed along.

Re: [2.1.1] Bug : Broken HQNx algorithms (in comp. to 2.0.05

Posted: Tue Apr 05, 2016 9:11
by _mental_
Graf Zahl wrote:Not this time. In earlier versions 4-6 and 7-9 were swapped and at some point - I think when the asm versions were replaced - they were changed. And this was causing the problems because all the checks were not changed along.
No, they were not swapped.
Initially, indices from 4 to 6 were used by MMX version. Later it was replaced with generic implementation. Then MMX one was re-added but indices of generic one were not changes.
So, generic implementation occupies indices 4..6 and MMX occupies 7..9. You can check log/blame in your Git client or on GitHub website.

Here is a complete unified diff of changes done to src/gl/textures/gl_hqresize.cpp. It's not so easy to check it without syntax highlight though.
Spoiler: