Project

General

Profile

Actions

Emulator Issues #4827

closed

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

Added by delroth over 12 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

Also available in: Atom PDF