Project

General

Profile

Actions

Emulator Issues #4827

closed

Scissoring behavior is incorrect in the GL renderer (and probably DX)

Added by delroth over 13 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

  1. Game Name and ID (as it appears in right click > properties: "GZ2P01",
    "RSBE01", etc):

GKBEAF, but probably a lot of other games.

2) What is the expected output? What do you see instead?

Expected: http://i.imgur.com/bxhR2.jpg
Current master: http://i.imgur.com/bxhR2.jpg

3) Did the game ever work correctly (i.e. not have this problem) on an
earlier version of dolphin? Please specify the exact revision when the
problem began.

Don't know.

4) What steps will reproduce the problem?

  1. Use the memory card available at http://delroth.net/MemoryCardA.USA.raw.xz
  2. Load the game, use the last save on the memcard
  3. Open the menu (Y), then use the "Deck" option

5) What version of dolphin are you using (32bit/64bit along with the
version as it appears in the title bar: "R 4779", "R 6403M", "3.0", etc)?
On what operating system, drivers, and hardware? Be sure to list OS,
graphics driver information, and video card model if you are having
graphics problems, for example.

OGL plugin, the rest don't matter.

6) Please provide any additional information below.

Tracked this bug down to an invalid scissor behavior in the OGL renderer. The same code is also in the other renderers (at least DX9) but I only tested this with OGL.

Currently when a rectangle with left > right or top > bottom is used for scissoring, the two are swapped. Also, when left == right or top == bottom, the scissoring rectangle is not used at all (the whole screen is used instead). Changing that to accept 0 width or 0 height rectangles and clamping instead of swapping left-right/top-bottom fixes the problem.

This should be tested on real hardware to see how it really performs and if this fix is valid. I currently don't have the time to do that (maybe in about 14 hours). This should also be tested with the DX9/DX11 renderers to see if the same bug is present.

Patch fixing the problem: http://codepad.org/tor6CTjG

Actions #1

Updated by delroth over 13 years ago

Failed my copy-paste. The "current master" link should be http://i.imgur.com/7EhV2.jpg instead.

Actions #2

Updated by iandylan2000 over 13 years ago

I remember playing this game recently and a huge bug would occur on that screen if you had a LOT of cards in the deck. When scrolling down to the bottom of the deck, after a certain point, the card pictures would all get swapped. This would lead to cards having totally incorrect picture association for almost all cards. Hopefully your fix will smash that bug as well.

Actions #3

Updated by delroth over 13 years ago

Yeah, as far as I know this should fix this bug but I can't test it right now (I spend more time fixing bugs than playing the game so I haven't got very far :P).

If you've got a memcard with a save where that problem can be easily reproduced I could test that and confirm that this is indeed fixed.

Actions #4

Updated by NeoBrainX over 13 years ago

Wow, I didn't know there are actually people who can create proper issue reports.. ;)

I'll take a look at this once I've some time.

Actions #5

Updated by iandylan2000 over 13 years ago

@neobrain - Seems to be a real rarity these day. hah!
@delr... (secret!) - I've sent you an e-mail!

Actions #6

Updated by William79371 over 13 years ago

What is the name of the game?

Actions #7

Updated by delroth over 13 years ago

Sorry, should have given that info in the first post: Baten Kaitos (more precisely: Baten Kaitos: Eternal Wings and the Lost Ocean).

Actions #8

Updated by delroth over 13 years ago

Test code (modified version of NeheGX lesson3, use the d-pad to switch scissoring mode): http://codepad.org/uDjlmOru

Current master

Mode 0 (no scissoring): http://i.imgur.com/fjL60.png
Mode 1 (normal scissoring): http://i.imgur.com/xkpPT.png
Mode 2 (left/right inverted): http://i.imgur.com/m3prB.png
Mode 3 (top/bottom inverted): http://i.imgur.com/eY3Yz.png
Mode 4 (width = 0): http://i.imgur.com/YBlmB.png
Mode 5 (height = 0): http://i.imgur.com/esEIM.png

Real hardware (Wii) / patched Dolphin

Mode 0 (no scissoring): http://i.imgur.com/jGyPv.png
Mode 1 (normal scissoring): http://i.imgur.com/R16fI.png
Mode 2 (left/right inverted): http://i.imgur.com/0bowI.png
Mode 3 (top/bottom inverted): http://i.imgur.com/unAGW.png
Mode 4 (width = 0): http://i.imgur.com/HzyTJ.png
Mode 5 (height = 0): http://i.imgur.com/kpfZu.png

Actions #9

Updated by delroth over 13 years ago

  • Status changed from New to Fixed

Fixed by r11933bf6b5fd

Actions

Also available in: Atom PDF