Project

General

Profile

Actions

Emulator Issues #5466

closed

gx-optimization regression - viewport gets set to zero

Added by NeoBrainX 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):
    Any

2) What is the expected output? What do you see instead?
Working stuff. Crash (at least in debug builds)

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.
Ya, before gx-optimization merge

4) What steps will reproduce the problem?

  1. Compile Dolphin
  2. Run Dolphin
  3. Start a game (using D3D9)

5) What version of dolphin are you using (32bit/64bit along with the
version as it appears in the title bar, etc)? Do not say 'latest version'
this changes multiple times a day.
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.
Any after the gx-optimization merge

6) Please provide any additional information below.
UpdateViewport is getting called with invalid values, i.e. zero width/height/etc. The D3D9 debug runtime complains about this; adding a sanity check fixes the problem.

7) Attachments. IMPORTANT! We have a limited storage quota on
GoogleCode, so please use a 3rd party host for screenshots or any other
files (http://min.us/ for example).


Related issues 1 (0 open1 closed)

Blocks Emulator - Emulator Issues #5504: Dolphin 3.5 bug trackerFixed

Actions
Actions #1

Updated by NeoBrainX over 12 years ago

Oh yeah, the crash happens directly after starting a game, btw ;)

Actions #3

Updated by delroth over 12 years ago

  • Status changed from New to Accepted

Can't reproduce, where does it complain exactly? I'm using the debug version of D3D9 with "Break on D3D9 Error" enabled.

Actions #4

Updated by NeoBrainX over 12 years ago

It fails because you're setting the viewport width and height to zero. Even if you can't reproduce this it's just wrong if the code does that (I guess it's a driver specific thing what stuff causes errors and what stuff doesn't).
Fwiw, I don't have access to a windows system anymore, so I can't give any more information about it. However, for you it should be enough to find out from where and why the viewport is getting set to zero, anyway.

Actions #5

Updated by NeoBrainX over 12 years ago

  • Status changed from Accepted to Fixed

This issue was closed by revision ec859009b712.

Actions #6

Updated by NeoBrainX over 12 years ago

The order of BP writes in the very first frame are essential here; some games write the scissor rect BP registers first. We'll call SetScissor then, which in turn calls UpdateViewportWithCorrection. However, since the viewport dimension registers will still be zero at that point, we'll try to set an invalid viewport. That makes some D3D debug runtime + driver combinations pretty sad and results in crashes.

Actions

Also available in: Atom PDF